@kiva/kv-components 4.8.6 → 5.0.0
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/build/copyFlags.js +11 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/data/ne_110m_admin_0_countries.json.js +9 -0
- package/dist/index.js +181 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
- package/dist/node_modules/embla-carousel-fade/esm/embla-carousel-fade.esm.js +143 -0
- package/dist/node_modules/popper.js/dist/esm/popper.js +1037 -0
- package/dist/utils/Alea.js +31 -7
- package/dist/utils/attrs.js +17 -5
- package/dist/utils/carousels.js +96 -6
- package/dist/utils/expander.js +34 -7
- package/dist/utils/imageUtils.js +20 -7
- package/dist/utils/loanCard.js +122 -7
- package/dist/utils/loanUtils.js +78 -21
- package/dist/utils/mapUtils.js +177 -13
- package/dist/utils/printing.js +8 -7
- package/dist/utils/scrollLock.js +16 -11
- package/dist/utils/themeUtils.js +13 -0
- package/dist/utils/throttle.js +8 -5
- package/dist/utils/touchEvents.js +16 -9
- package/dist/utils/treemap.js +59 -5
- package/dist/vue/KvAccordionItem.js +95 -0
- package/dist/vue/KvActivityRow.js +36 -0
- package/dist/vue/KvBorrowerImage.js +140 -0
- package/dist/vue/KvButton.js +184 -0
- package/dist/vue/KvCarousel.css +1 -0
- package/dist/vue/KvCarousel.js +246 -0
- package/dist/vue/KvCartModal.css +1 -0
- package/dist/vue/KvCartModal.js +235 -0
- package/dist/vue/KvCheckbox.js +134 -0
- package/dist/vue/KvChip.js +43 -0
- package/dist/vue/KvClassicLoanCard.css +1 -0
- package/dist/vue/KvClassicLoanCard.js +464 -0
- package/dist/vue/KvCommentsAdd.css +1 -0
- package/dist/vue/KvCommentsAdd.js +106 -0
- package/dist/vue/KvCommentsContainer.js +80 -0
- package/dist/vue/KvCommentsHeartButton.css +1 -0
- package/dist/vue/KvCommentsHeartButton.js +62 -0
- package/dist/vue/KvCommentsList.js +65 -0
- package/dist/vue/KvCommentsListItem.js +221 -0
- package/dist/vue/KvCommentsReplyButton.css +1 -0
- package/dist/vue/KvCommentsReplyButton.js +42 -0
- package/dist/vue/KvContentfulImg.js +196 -0
- package/dist/vue/KvCountdownTimer.js +31 -0
- package/dist/vue/KvExpandable.js +65 -0
- package/dist/vue/KvExpandableQuestion.js +99 -0
- package/dist/vue/KvFlag.css +1 -0
- package/dist/vue/KvFlag.js +628 -0
- package/dist/vue/KvGrid.js +26 -0
- package/dist/vue/KvImpactDashboardHeader.css +1 -0
- package/dist/vue/KvImpactDashboardHeader.js +31 -0
- package/dist/vue/KvInlineActivityCard.css +1 -0
- package/dist/vue/KvInlineActivityCard.js +53 -0
- package/dist/vue/KvInlineActivityFeed.css +1 -0
- package/dist/vue/KvInlineActivityFeed.js +30 -0
- package/dist/vue/KvIntroductionLoanCard.css +1 -0
- package/dist/vue/KvIntroductionLoanCard.js +387 -0
- package/dist/vue/KvLendAmountButton.js +60 -0
- package/dist/vue/KvLendCta.css +1 -0
- package/dist/vue/KvLendCta.js +490 -0
- package/dist/vue/KvLightbox.js +195 -0
- package/dist/vue/KvLineGraph.js +74 -0
- package/dist/vue/KvLoadingPlaceholder.css +1 -0
- package/dist/vue/KvLoadingPlaceholder.js +11 -0
- package/dist/vue/KvLoadingSpinner.js +49 -0
- package/dist/vue/KvLoanActivities.css +1 -0
- package/dist/vue/KvLoanActivities.js +211 -0
- package/dist/vue/KvLoanBookmark.js +41 -0
- package/dist/vue/KvLoanCallouts.css +1 -0
- package/dist/vue/KvLoanCallouts.js +30 -0
- package/dist/vue/KvLoanProgressGroup.css +1 -0
- package/dist/vue/KvLoanProgressGroup.js +68 -0
- package/dist/vue/KvLoanTag.js +88 -0
- package/dist/vue/KvLoanTeamPick.js +12 -0
- package/dist/vue/KvLoanUse.js +73 -0
- package/dist/vue/KvMap.css +1 -0
- package/dist/vue/KvMap.js +372 -0
- package/dist/vue/KvMaterialIcon.js +34 -0
- package/dist/vue/KvPageContainer.js +15 -0
- package/dist/vue/KvPagination.js +163 -0
- package/dist/vue/KvPieChart.css +1 -0
- package/dist/vue/KvPieChart.js +166 -0
- package/dist/vue/KvPopper.js +132 -0
- package/dist/vue/KvProgressBar.js +118 -0
- package/dist/vue/KvRadio.js +130 -0
- package/dist/vue/KvSelect.js +92 -0
- package/dist/vue/KvSideSheet.js +158 -0
- package/dist/vue/KvSwitch.js +88 -0
- package/dist/vue/KvTab.js +67 -0
- package/dist/vue/KvTabPanel.js +56 -0
- package/dist/vue/KvTabs.js +86 -0
- package/dist/vue/KvTextInput.js +185 -0
- package/dist/vue/KvTextLink.js +93 -0
- package/dist/vue/KvThemeProvider.css +1 -0
- package/dist/vue/KvThemeProvider.js +65 -0
- package/dist/vue/KvToast.js +123 -0
- package/dist/vue/KvTooltip.css +1 -0
- package/dist/vue/KvTooltip.js +91 -0
- package/dist/vue/KvTreeMapChart.css +1 -0
- package/dist/vue/KvTreeMapChart.js +177 -0
- package/dist/vue/KvUserAvatar.js +99 -0
- package/dist/vue/KvVerticalCarousel.js +175 -0
- package/dist/vue/KvVotingCard.css +1 -0
- package/dist/vue/KvVotingCard.js +131 -0
- package/dist/vue/KvVotingCardV2.css +1 -0
- package/dist/vue/KvVotingCardV2.js +120 -0
- package/dist/vue/KvWideLoanCard.css +1 -0
- package/dist/vue/KvWideLoanCard.js +367 -0
- package/dist/vue/flags/1x1/ad.svg.js +4 -0
- package/dist/vue/flags/1x1/ae.svg.js +4 -0
- package/dist/vue/flags/1x1/af.svg.js +4 -0
- package/dist/vue/flags/1x1/ag.svg.js +4 -0
- package/dist/vue/flags/1x1/ai.svg.js +4 -0
- package/dist/vue/flags/1x1/al.svg.js +4 -0
- package/dist/vue/flags/1x1/am.svg.js +4 -0
- package/dist/vue/flags/1x1/ao.svg.js +4 -0
- package/dist/vue/flags/1x1/aq.svg.js +4 -0
- package/dist/vue/flags/1x1/ar.svg.js +4 -0
- package/dist/vue/flags/1x1/arab.svg.js +4 -0
- package/dist/vue/flags/1x1/as.svg.js +4 -0
- package/dist/vue/flags/1x1/at.svg.js +4 -0
- package/dist/vue/flags/1x1/au.svg.js +4 -0
- package/dist/vue/flags/1x1/aw.svg.js +4 -0
- package/dist/vue/flags/1x1/ax.svg.js +4 -0
- package/dist/vue/flags/1x1/az.svg.js +4 -0
- package/dist/vue/flags/1x1/ba.svg.js +4 -0
- package/dist/vue/flags/1x1/bb.svg.js +4 -0
- package/dist/vue/flags/1x1/bd.svg.js +4 -0
- package/dist/vue/flags/1x1/be.svg.js +4 -0
- package/dist/vue/flags/1x1/bf.svg.js +4 -0
- package/dist/vue/flags/1x1/bg.svg.js +4 -0
- package/dist/vue/flags/1x1/bh.svg.js +4 -0
- package/dist/vue/flags/1x1/bi.svg.js +4 -0
- package/dist/vue/flags/1x1/bj.svg.js +4 -0
- package/dist/vue/flags/1x1/bl.svg.js +4 -0
- package/dist/vue/flags/1x1/bm.svg.js +4 -0
- package/dist/vue/flags/1x1/bn.svg.js +4 -0
- package/dist/vue/flags/1x1/bo.svg.js +4 -0
- package/dist/vue/flags/1x1/bq.svg.js +4 -0
- package/dist/vue/flags/1x1/br.svg.js +4 -0
- package/dist/vue/flags/1x1/bs.svg.js +4 -0
- package/dist/vue/flags/1x1/bt.svg.js +4 -0
- package/dist/vue/flags/1x1/bv.svg.js +4 -0
- package/dist/vue/flags/1x1/bw.svg.js +4 -0
- package/dist/vue/flags/1x1/by.svg.js +4 -0
- package/dist/vue/flags/1x1/bz.svg.js +4 -0
- package/dist/vue/flags/1x1/ca.svg.js +4 -0
- package/dist/vue/flags/1x1/cc.svg.js +4 -0
- package/dist/vue/flags/1x1/cd.svg.js +4 -0
- package/dist/vue/flags/1x1/cefta.svg.js +4 -0
- package/dist/vue/flags/1x1/cf.svg.js +4 -0
- package/dist/vue/flags/1x1/cg.svg.js +4 -0
- package/dist/vue/flags/1x1/ch.svg.js +4 -0
- package/dist/vue/flags/1x1/ci.svg.js +4 -0
- package/dist/vue/flags/1x1/ck.svg.js +4 -0
- package/dist/vue/flags/1x1/cl.svg.js +4 -0
- package/dist/vue/flags/1x1/cm.svg.js +4 -0
- package/dist/vue/flags/1x1/cn.svg.js +4 -0
- package/dist/vue/flags/1x1/co.svg.js +4 -0
- package/dist/vue/flags/1x1/cp.svg.js +4 -0
- package/dist/vue/flags/1x1/cr.svg.js +4 -0
- package/dist/vue/flags/1x1/cu.svg.js +4 -0
- package/dist/vue/flags/1x1/cv.svg.js +4 -0
- package/dist/vue/flags/1x1/cw.svg.js +4 -0
- package/dist/vue/flags/1x1/cx.svg.js +4 -0
- package/dist/vue/flags/1x1/cy.svg.js +4 -0
- package/dist/vue/flags/1x1/cz.svg.js +4 -0
- package/dist/vue/flags/1x1/de.svg.js +4 -0
- package/dist/vue/flags/1x1/dg.svg.js +4 -0
- package/dist/vue/flags/1x1/dj.svg.js +4 -0
- package/dist/vue/flags/1x1/dk.svg.js +4 -0
- package/dist/vue/flags/1x1/dm.svg.js +4 -0
- package/dist/vue/flags/1x1/do.svg.js +4 -0
- package/dist/vue/flags/1x1/dz.svg.js +4 -0
- package/dist/vue/flags/1x1/eac.svg.js +4 -0
- package/dist/vue/flags/1x1/ec.svg.js +4 -0
- package/dist/vue/flags/1x1/ee.svg.js +4 -0
- package/dist/vue/flags/1x1/eg.svg.js +4 -0
- package/dist/vue/flags/1x1/eh.svg.js +4 -0
- package/dist/vue/flags/1x1/er.svg.js +4 -0
- package/dist/vue/flags/1x1/es-ct.svg.js +4 -0
- package/dist/vue/flags/1x1/es-ga.svg.js +4 -0
- package/dist/vue/flags/1x1/es-pv.svg.js +4 -0
- package/dist/vue/flags/1x1/es.svg.js +4 -0
- package/dist/vue/flags/1x1/et.svg.js +4 -0
- package/dist/vue/flags/1x1/eu.svg.js +4 -0
- package/dist/vue/flags/1x1/fi.svg.js +4 -0
- package/dist/vue/flags/1x1/fj.svg.js +4 -0
- package/dist/vue/flags/1x1/fk.svg.js +4 -0
- package/dist/vue/flags/1x1/fm.svg.js +4 -0
- package/dist/vue/flags/1x1/fo.svg.js +4 -0
- package/dist/vue/flags/1x1/fr.svg.js +4 -0
- package/dist/vue/flags/1x1/ga.svg.js +4 -0
- package/dist/vue/flags/1x1/gb-eng.svg.js +4 -0
- package/dist/vue/flags/1x1/gb-nir.svg.js +4 -0
- package/dist/vue/flags/1x1/gb-sct.svg.js +4 -0
- package/dist/vue/flags/1x1/gb-wls.svg.js +4 -0
- package/dist/vue/flags/1x1/gb.svg.js +4 -0
- package/dist/vue/flags/1x1/gd.svg.js +4 -0
- package/dist/vue/flags/1x1/ge.svg.js +4 -0
- package/dist/vue/flags/1x1/gf.svg.js +4 -0
- package/dist/vue/flags/1x1/gg.svg.js +4 -0
- package/dist/vue/flags/1x1/gh.svg.js +4 -0
- package/dist/vue/flags/1x1/gi.svg.js +4 -0
- package/dist/vue/flags/1x1/gl.svg.js +4 -0
- package/dist/vue/flags/1x1/gm.svg.js +4 -0
- package/dist/vue/flags/1x1/gn.svg.js +4 -0
- package/dist/vue/flags/1x1/gp.svg.js +4 -0
- package/dist/vue/flags/1x1/gq.svg.js +4 -0
- package/dist/vue/flags/1x1/gr.svg.js +4 -0
- package/dist/vue/flags/1x1/gs.svg.js +4 -0
- package/dist/vue/flags/1x1/gt.svg.js +4 -0
- package/dist/vue/flags/1x1/gu.svg.js +4 -0
- package/dist/vue/flags/1x1/gw.svg.js +4 -0
- package/dist/vue/flags/1x1/gy.svg.js +4 -0
- package/dist/vue/flags/1x1/hk.svg.js +4 -0
- package/dist/vue/flags/1x1/hm.svg.js +4 -0
- package/dist/vue/flags/1x1/hn.svg.js +4 -0
- package/dist/vue/flags/1x1/hr.svg.js +4 -0
- package/dist/vue/flags/1x1/ht.svg.js +4 -0
- package/dist/vue/flags/1x1/hu.svg.js +4 -0
- package/dist/vue/flags/1x1/ic.svg.js +4 -0
- package/dist/vue/flags/1x1/id.svg.js +4 -0
- package/dist/vue/flags/1x1/ie.svg.js +4 -0
- package/dist/vue/flags/1x1/il.svg.js +4 -0
- package/dist/vue/flags/1x1/im.svg.js +4 -0
- package/dist/vue/flags/1x1/in.svg.js +4 -0
- package/dist/vue/flags/1x1/io.svg.js +4 -0
- package/dist/vue/flags/1x1/iq.svg.js +4 -0
- package/dist/vue/flags/1x1/ir.svg.js +4 -0
- package/dist/vue/flags/1x1/is.svg.js +4 -0
- package/dist/vue/flags/1x1/it.svg.js +4 -0
- package/dist/vue/flags/1x1/je.svg.js +4 -0
- package/dist/vue/flags/1x1/jm.svg.js +4 -0
- package/dist/vue/flags/1x1/jo.svg.js +4 -0
- package/dist/vue/flags/1x1/jp.svg.js +4 -0
- package/dist/vue/flags/1x1/ke.svg.js +4 -0
- package/dist/vue/flags/1x1/kg.svg.js +4 -0
- package/dist/vue/flags/1x1/kh.svg.js +4 -0
- package/dist/vue/flags/1x1/ki.svg.js +4 -0
- package/dist/vue/flags/1x1/km.svg.js +4 -0
- package/dist/vue/flags/1x1/kn.svg.js +4 -0
- package/dist/vue/flags/1x1/kp.svg.js +4 -0
- package/dist/vue/flags/1x1/kr.svg.js +4 -0
- package/dist/vue/flags/1x1/kw.svg.js +4 -0
- package/dist/vue/flags/1x1/ky.svg.js +4 -0
- package/dist/vue/flags/1x1/kz.svg.js +4 -0
- package/dist/vue/flags/1x1/la.svg.js +4 -0
- package/dist/vue/flags/1x1/lb.svg.js +4 -0
- package/dist/vue/flags/1x1/lc.svg.js +4 -0
- package/dist/vue/flags/1x1/li.svg.js +4 -0
- package/dist/vue/flags/1x1/lk.svg.js +4 -0
- package/dist/vue/flags/1x1/lr.svg.js +4 -0
- package/dist/vue/flags/1x1/ls.svg.js +4 -0
- package/dist/vue/flags/1x1/lt.svg.js +4 -0
- package/dist/vue/flags/1x1/lu.svg.js +4 -0
- package/dist/vue/flags/1x1/lv.svg.js +4 -0
- package/dist/vue/flags/1x1/ly.svg.js +4 -0
- package/dist/vue/flags/1x1/ma.svg.js +4 -0
- package/dist/vue/flags/1x1/mc.svg.js +4 -0
- package/dist/vue/flags/1x1/md.svg.js +4 -0
- package/dist/vue/flags/1x1/me.svg.js +4 -0
- package/dist/vue/flags/1x1/mf.svg.js +4 -0
- package/dist/vue/flags/1x1/mg.svg.js +4 -0
- package/dist/vue/flags/1x1/mh.svg.js +4 -0
- package/dist/vue/flags/1x1/mk.svg.js +4 -0
- package/dist/vue/flags/1x1/ml.svg.js +4 -0
- package/dist/vue/flags/1x1/mm.svg.js +4 -0
- package/dist/vue/flags/1x1/mn.svg.js +4 -0
- package/dist/vue/flags/1x1/mo.svg.js +4 -0
- package/dist/vue/flags/1x1/mp.svg.js +4 -0
- package/dist/vue/flags/1x1/mq.svg.js +4 -0
- package/dist/vue/flags/1x1/mr.svg.js +4 -0
- package/dist/vue/flags/1x1/ms.svg.js +4 -0
- package/dist/vue/flags/1x1/mt.svg.js +4 -0
- package/dist/vue/flags/1x1/mu.svg.js +4 -0
- package/dist/vue/flags/1x1/mv.svg.js +4 -0
- package/dist/vue/flags/1x1/mw.svg.js +4 -0
- package/dist/vue/flags/1x1/mx.svg.js +4 -0
- package/dist/vue/flags/1x1/my.svg.js +4 -0
- package/dist/vue/flags/1x1/mz.svg.js +4 -0
- package/dist/vue/flags/1x1/na.svg.js +4 -0
- package/dist/vue/flags/1x1/nc.svg.js +4 -0
- package/dist/vue/flags/1x1/ne.svg.js +4 -0
- package/dist/vue/flags/1x1/nf.svg.js +4 -0
- package/dist/vue/flags/1x1/ng.svg.js +4 -0
- package/dist/vue/flags/1x1/ni.svg.js +4 -0
- package/dist/vue/flags/1x1/nl.svg.js +4 -0
- package/dist/vue/flags/1x1/no.svg.js +4 -0
- package/dist/vue/flags/1x1/np.svg.js +4 -0
- package/dist/vue/flags/1x1/nr.svg.js +4 -0
- package/dist/vue/flags/1x1/nu.svg.js +4 -0
- package/dist/vue/flags/1x1/nz.svg.js +4 -0
- package/dist/vue/flags/1x1/om.svg.js +4 -0
- package/dist/vue/flags/1x1/pa.svg.js +4 -0
- package/dist/vue/flags/1x1/pc.svg.js +4 -0
- package/dist/vue/flags/1x1/pe.svg.js +4 -0
- package/dist/vue/flags/1x1/pf.svg.js +4 -0
- package/dist/vue/flags/1x1/pg.svg.js +4 -0
- package/dist/vue/flags/1x1/ph.svg.js +4 -0
- package/dist/vue/flags/1x1/pk.svg.js +4 -0
- package/dist/vue/flags/1x1/pl.svg.js +4 -0
- package/dist/vue/flags/1x1/pm.svg.js +4 -0
- package/dist/vue/flags/1x1/pn.svg.js +4 -0
- package/dist/vue/flags/1x1/pr.svg.js +4 -0
- package/dist/vue/flags/1x1/ps.svg.js +4 -0
- package/dist/vue/flags/1x1/pt.svg.js +4 -0
- package/dist/vue/flags/1x1/pw.svg.js +4 -0
- package/dist/vue/flags/1x1/py.svg.js +4 -0
- package/dist/vue/flags/1x1/qa.svg.js +4 -0
- package/dist/vue/flags/1x1/re.svg.js +4 -0
- package/dist/vue/flags/1x1/ro.svg.js +4 -0
- package/dist/vue/flags/1x1/rs.svg.js +4 -0
- package/dist/vue/flags/1x1/ru.svg.js +4 -0
- package/dist/vue/flags/1x1/rw.svg.js +4 -0
- package/dist/vue/flags/1x1/sa.svg.js +4 -0
- package/dist/vue/flags/1x1/sb.svg.js +4 -0
- package/dist/vue/flags/1x1/sc.svg.js +4 -0
- package/dist/vue/flags/1x1/sd.svg.js +4 -0
- package/dist/vue/flags/1x1/se.svg.js +4 -0
- package/dist/vue/flags/1x1/sg.svg.js +4 -0
- package/dist/vue/flags/1x1/sh-ac.svg.js +4 -0
- package/dist/vue/flags/1x1/sh-hl.svg.js +4 -0
- package/dist/vue/flags/1x1/sh-ta.svg.js +4 -0
- package/dist/vue/flags/1x1/sh.svg.js +4 -0
- package/dist/vue/flags/1x1/si.svg.js +4 -0
- package/dist/vue/flags/1x1/sj.svg.js +4 -0
- package/dist/vue/flags/1x1/sk.svg.js +4 -0
- package/dist/vue/flags/1x1/sl.svg.js +4 -0
- package/dist/vue/flags/1x1/sm.svg.js +4 -0
- package/dist/vue/flags/1x1/sn.svg.js +4 -0
- package/dist/vue/flags/1x1/so.svg.js +4 -0
- package/dist/vue/flags/1x1/sr.svg.js +4 -0
- package/dist/vue/flags/1x1/ss.svg.js +4 -0
- package/dist/vue/flags/1x1/st.svg.js +4 -0
- package/dist/vue/flags/1x1/sv.svg.js +4 -0
- package/dist/vue/flags/1x1/sx.svg.js +4 -0
- package/dist/vue/flags/1x1/sy.svg.js +4 -0
- package/dist/vue/flags/1x1/sz.svg.js +4 -0
- package/dist/vue/flags/1x1/tc.svg.js +4 -0
- package/dist/vue/flags/1x1/td.svg.js +4 -0
- package/dist/vue/flags/1x1/tf.svg.js +4 -0
- package/dist/vue/flags/1x1/tg.svg.js +4 -0
- package/dist/vue/flags/1x1/th.svg.js +4 -0
- package/dist/vue/flags/1x1/tj.svg.js +4 -0
- package/dist/vue/flags/1x1/tk.svg.js +4 -0
- package/dist/vue/flags/1x1/tl.svg.js +4 -0
- package/dist/vue/flags/1x1/tm.svg.js +4 -0
- package/dist/vue/flags/1x1/tn.svg.js +4 -0
- package/dist/vue/flags/1x1/to.svg.js +4 -0
- package/dist/vue/flags/1x1/tr.svg.js +4 -0
- package/dist/vue/flags/1x1/tt.svg.js +4 -0
- package/dist/vue/flags/1x1/tv.svg.js +4 -0
- package/dist/vue/flags/1x1/tw.svg.js +4 -0
- package/dist/vue/flags/1x1/tz.svg.js +4 -0
- package/dist/vue/flags/1x1/ua.svg.js +4 -0
- package/dist/vue/flags/1x1/ug.svg.js +4 -0
- package/dist/vue/flags/1x1/um.svg.js +4 -0
- package/dist/vue/flags/1x1/un.svg.js +4 -0
- package/dist/vue/flags/1x1/us.svg.js +4 -0
- package/dist/vue/flags/1x1/uy.svg.js +4 -0
- package/dist/vue/flags/1x1/uz.svg.js +4 -0
- package/dist/vue/flags/1x1/va.svg.js +4 -0
- package/dist/vue/flags/1x1/vc.svg.js +4 -0
- package/dist/vue/flags/1x1/ve.svg.js +4 -0
- package/dist/vue/flags/1x1/vg.svg.js +4 -0
- package/dist/vue/flags/1x1/vi.svg.js +4 -0
- package/dist/vue/flags/1x1/vn.svg.js +4 -0
- package/dist/vue/flags/1x1/vu.svg.js +4 -0
- package/dist/vue/flags/1x1/wf.svg.js +4 -0
- package/dist/vue/flags/1x1/ws.svg.js +4 -0
- package/dist/vue/flags/1x1/xk.svg.js +4 -0
- package/dist/vue/flags/1x1/xx.svg.js +4 -0
- package/dist/vue/flags/1x1/ye.svg.js +4 -0
- package/dist/vue/flags/1x1/yt.svg.js +4 -0
- package/dist/vue/flags/1x1/za.svg.js +4 -0
- package/dist/vue/flags/1x1/zm.svg.js +4 -0
- package/dist/vue/flags/1x1/zw.svg.js +4 -0
- package/dist/vue/flags/4x3/ad.svg.js +4 -0
- package/dist/vue/flags/4x3/ae.svg.js +4 -0
- package/dist/vue/flags/4x3/af.svg.js +4 -0
- package/dist/vue/flags/4x3/ag.svg.js +4 -0
- package/dist/vue/flags/4x3/ai.svg.js +4 -0
- package/dist/vue/flags/4x3/al.svg.js +4 -0
- package/dist/vue/flags/4x3/am.svg.js +4 -0
- package/dist/vue/flags/4x3/ao.svg.js +4 -0
- package/dist/vue/flags/4x3/aq.svg.js +4 -0
- package/dist/vue/flags/4x3/ar.svg.js +4 -0
- package/dist/vue/flags/4x3/arab.svg.js +4 -0
- package/dist/vue/flags/4x3/as.svg.js +4 -0
- package/dist/vue/flags/4x3/at.svg.js +4 -0
- package/dist/vue/flags/4x3/au.svg.js +4 -0
- package/dist/vue/flags/4x3/aw.svg.js +4 -0
- package/dist/vue/flags/4x3/ax.svg.js +4 -0
- package/dist/vue/flags/4x3/az.svg.js +4 -0
- package/dist/vue/flags/4x3/ba.svg.js +4 -0
- package/dist/vue/flags/4x3/bb.svg.js +4 -0
- package/dist/vue/flags/4x3/bd.svg.js +4 -0
- package/dist/vue/flags/4x3/be.svg.js +4 -0
- package/dist/vue/flags/4x3/bf.svg.js +4 -0
- package/dist/vue/flags/4x3/bg.svg.js +4 -0
- package/dist/vue/flags/4x3/bh.svg.js +4 -0
- package/dist/vue/flags/4x3/bi.svg.js +4 -0
- package/dist/vue/flags/4x3/bj.svg.js +4 -0
- package/dist/vue/flags/4x3/bl.svg.js +4 -0
- package/dist/vue/flags/4x3/bm.svg.js +4 -0
- package/dist/vue/flags/4x3/bn.svg.js +4 -0
- package/dist/vue/flags/4x3/bo.svg.js +4 -0
- package/dist/vue/flags/4x3/bq.svg.js +4 -0
- package/dist/vue/flags/4x3/br.svg.js +4 -0
- package/dist/vue/flags/4x3/bs.svg.js +4 -0
- package/dist/vue/flags/4x3/bt.svg.js +4 -0
- package/dist/vue/flags/4x3/bv.svg.js +4 -0
- package/dist/vue/flags/4x3/bw.svg.js +4 -0
- package/dist/vue/flags/4x3/by.svg.js +4 -0
- package/dist/vue/flags/4x3/bz.svg.js +4 -0
- package/dist/vue/flags/4x3/ca.svg.js +4 -0
- package/dist/vue/flags/4x3/cc.svg.js +4 -0
- package/dist/vue/flags/4x3/cd.svg.js +4 -0
- package/dist/vue/flags/4x3/cefta.svg.js +4 -0
- package/dist/vue/flags/4x3/cf.svg.js +4 -0
- package/dist/vue/flags/4x3/cg.svg.js +4 -0
- package/dist/vue/flags/4x3/ch.svg.js +4 -0
- package/dist/vue/flags/4x3/ci.svg.js +4 -0
- package/dist/vue/flags/4x3/ck.svg.js +4 -0
- package/dist/vue/flags/4x3/cl.svg.js +4 -0
- package/dist/vue/flags/4x3/cm.svg.js +4 -0
- package/dist/vue/flags/4x3/cn.svg.js +4 -0
- package/dist/vue/flags/4x3/co.svg.js +4 -0
- package/dist/vue/flags/4x3/cp.svg.js +4 -0
- package/dist/vue/flags/4x3/cr.svg.js +4 -0
- package/dist/vue/flags/4x3/cu.svg.js +4 -0
- package/dist/vue/flags/4x3/cv.svg.js +4 -0
- package/dist/vue/flags/4x3/cw.svg.js +4 -0
- package/dist/vue/flags/4x3/cx.svg.js +4 -0
- package/dist/vue/flags/4x3/cy.svg.js +4 -0
- package/dist/vue/flags/4x3/cz.svg.js +4 -0
- package/dist/vue/flags/4x3/de.svg.js +4 -0
- package/dist/vue/flags/4x3/dg.svg.js +4 -0
- package/dist/vue/flags/4x3/dj.svg.js +4 -0
- package/dist/vue/flags/4x3/dk.svg.js +4 -0
- package/dist/vue/flags/4x3/dm.svg.js +4 -0
- package/dist/vue/flags/4x3/do.svg.js +4 -0
- package/dist/vue/flags/4x3/dz.svg.js +4 -0
- package/dist/vue/flags/4x3/eac.svg.js +4 -0
- package/dist/vue/flags/4x3/ec.svg.js +4 -0
- package/dist/vue/flags/4x3/ee.svg.js +4 -0
- package/dist/vue/flags/4x3/eg.svg.js +4 -0
- package/dist/vue/flags/4x3/eh.svg.js +4 -0
- package/dist/vue/flags/4x3/er.svg.js +4 -0
- package/dist/vue/flags/4x3/es-ct.svg.js +4 -0
- package/dist/vue/flags/4x3/es-ga.svg.js +4 -0
- package/dist/vue/flags/4x3/es-pv.svg.js +4 -0
- package/dist/vue/flags/4x3/es.svg.js +4 -0
- package/dist/vue/flags/4x3/et.svg.js +4 -0
- package/dist/vue/flags/4x3/eu.svg.js +4 -0
- package/dist/vue/flags/4x3/fi.svg.js +4 -0
- package/dist/vue/flags/4x3/fj.svg.js +4 -0
- package/dist/vue/flags/4x3/fk.svg.js +4 -0
- package/dist/vue/flags/4x3/fm.svg.js +4 -0
- package/dist/vue/flags/4x3/fo.svg.js +4 -0
- package/dist/vue/flags/4x3/fr.svg.js +4 -0
- package/dist/vue/flags/4x3/ga.svg.js +4 -0
- package/dist/vue/flags/4x3/gb-eng.svg.js +4 -0
- package/dist/vue/flags/4x3/gb-nir.svg.js +4 -0
- package/dist/vue/flags/4x3/gb-sct.svg.js +4 -0
- package/dist/vue/flags/4x3/gb-wls.svg.js +4 -0
- package/dist/vue/flags/4x3/gb.svg.js +4 -0
- package/dist/vue/flags/4x3/gd.svg.js +4 -0
- package/dist/vue/flags/4x3/ge.svg.js +4 -0
- package/dist/vue/flags/4x3/gf.svg.js +4 -0
- package/dist/vue/flags/4x3/gg.svg.js +4 -0
- package/dist/vue/flags/4x3/gh.svg.js +4 -0
- package/dist/vue/flags/4x3/gi.svg.js +4 -0
- package/dist/vue/flags/4x3/gl.svg.js +4 -0
- package/dist/vue/flags/4x3/gm.svg.js +4 -0
- package/dist/vue/flags/4x3/gn.svg.js +4 -0
- package/dist/vue/flags/4x3/gp.svg.js +4 -0
- package/dist/vue/flags/4x3/gq.svg.js +4 -0
- package/dist/vue/flags/4x3/gr.svg.js +4 -0
- package/dist/vue/flags/4x3/gs.svg.js +4 -0
- package/dist/vue/flags/4x3/gt.svg.js +4 -0
- package/dist/vue/flags/4x3/gu.svg.js +4 -0
- package/dist/vue/flags/4x3/gw.svg.js +4 -0
- package/dist/vue/flags/4x3/gy.svg.js +4 -0
- package/dist/vue/flags/4x3/hk.svg.js +4 -0
- package/dist/vue/flags/4x3/hm.svg.js +4 -0
- package/dist/vue/flags/4x3/hn.svg.js +4 -0
- package/dist/vue/flags/4x3/hr.svg.js +4 -0
- package/dist/vue/flags/4x3/ht.svg.js +4 -0
- package/dist/vue/flags/4x3/hu.svg.js +4 -0
- package/dist/vue/flags/4x3/ic.svg.js +4 -0
- package/dist/vue/flags/4x3/id.svg.js +4 -0
- package/dist/vue/flags/4x3/ie.svg.js +4 -0
- package/dist/vue/flags/4x3/il.svg.js +4 -0
- package/dist/vue/flags/4x3/im.svg.js +4 -0
- package/dist/vue/flags/4x3/in.svg.js +4 -0
- package/dist/vue/flags/4x3/io.svg.js +4 -0
- package/dist/vue/flags/4x3/iq.svg.js +4 -0
- package/dist/vue/flags/4x3/ir.svg.js +4 -0
- package/dist/vue/flags/4x3/is.svg.js +4 -0
- package/dist/vue/flags/4x3/it.svg.js +4 -0
- package/dist/vue/flags/4x3/je.svg.js +4 -0
- package/dist/vue/flags/4x3/jm.svg.js +4 -0
- package/dist/vue/flags/4x3/jo.svg.js +4 -0
- package/dist/vue/flags/4x3/jp.svg.js +4 -0
- package/dist/vue/flags/4x3/ke.svg.js +4 -0
- package/dist/vue/flags/4x3/kg.svg.js +4 -0
- package/dist/vue/flags/4x3/kh.svg.js +4 -0
- package/dist/vue/flags/4x3/ki.svg.js +4 -0
- package/dist/vue/flags/4x3/km.svg.js +4 -0
- package/dist/vue/flags/4x3/kn.svg.js +4 -0
- package/dist/vue/flags/4x3/kp.svg.js +4 -0
- package/dist/vue/flags/4x3/kr.svg.js +4 -0
- package/dist/vue/flags/4x3/kw.svg.js +4 -0
- package/dist/vue/flags/4x3/ky.svg.js +4 -0
- package/dist/vue/flags/4x3/kz.svg.js +4 -0
- package/dist/vue/flags/4x3/la.svg.js +4 -0
- package/dist/vue/flags/4x3/lb.svg.js +4 -0
- package/dist/vue/flags/4x3/lc.svg.js +4 -0
- package/dist/vue/flags/4x3/li.svg.js +4 -0
- package/dist/vue/flags/4x3/lk.svg.js +4 -0
- package/dist/vue/flags/4x3/lr.svg.js +4 -0
- package/dist/vue/flags/4x3/ls.svg.js +4 -0
- package/dist/vue/flags/4x3/lt.svg.js +4 -0
- package/dist/vue/flags/4x3/lu.svg.js +4 -0
- package/dist/vue/flags/4x3/lv.svg.js +4 -0
- package/dist/vue/flags/4x3/ly.svg.js +4 -0
- package/dist/vue/flags/4x3/ma.svg.js +4 -0
- package/dist/vue/flags/4x3/mc.svg.js +4 -0
- package/dist/vue/flags/4x3/md.svg.js +4 -0
- package/dist/vue/flags/4x3/me.svg.js +4 -0
- package/dist/vue/flags/4x3/mf.svg.js +4 -0
- package/dist/vue/flags/4x3/mg.svg.js +4 -0
- package/dist/vue/flags/4x3/mh.svg.js +4 -0
- package/dist/vue/flags/4x3/mk.svg.js +4 -0
- package/dist/vue/flags/4x3/ml.svg.js +4 -0
- package/dist/vue/flags/4x3/mm.svg.js +4 -0
- package/dist/vue/flags/4x3/mn.svg.js +4 -0
- package/dist/vue/flags/4x3/mo.svg.js +4 -0
- package/dist/vue/flags/4x3/mp.svg.js +4 -0
- package/dist/vue/flags/4x3/mq.svg.js +4 -0
- package/dist/vue/flags/4x3/mr.svg.js +4 -0
- package/dist/vue/flags/4x3/ms.svg.js +4 -0
- package/dist/vue/flags/4x3/mt.svg.js +4 -0
- package/dist/vue/flags/4x3/mu.svg.js +4 -0
- package/dist/vue/flags/4x3/mv.svg.js +4 -0
- package/dist/vue/flags/4x3/mw.svg.js +4 -0
- package/dist/vue/flags/4x3/mx.svg.js +4 -0
- package/dist/vue/flags/4x3/my.svg.js +4 -0
- package/dist/vue/flags/4x3/mz.svg.js +4 -0
- package/dist/vue/flags/4x3/na.svg.js +4 -0
- package/dist/vue/flags/4x3/nc.svg.js +4 -0
- package/dist/vue/flags/4x3/ne.svg.js +4 -0
- package/dist/vue/flags/4x3/nf.svg.js +4 -0
- package/dist/vue/flags/4x3/ng.svg.js +4 -0
- package/dist/vue/flags/4x3/ni.svg.js +4 -0
- package/dist/vue/flags/4x3/nl.svg.js +4 -0
- package/dist/vue/flags/4x3/no.svg.js +4 -0
- package/dist/vue/flags/4x3/np.svg.js +4 -0
- package/dist/vue/flags/4x3/nr.svg.js +4 -0
- package/dist/vue/flags/4x3/nu.svg.js +4 -0
- package/dist/vue/flags/4x3/nz.svg.js +4 -0
- package/dist/vue/flags/4x3/om.svg.js +4 -0
- package/dist/vue/flags/4x3/pa.svg.js +4 -0
- package/dist/vue/flags/4x3/pc.svg.js +4 -0
- package/dist/vue/flags/4x3/pe.svg.js +4 -0
- package/dist/vue/flags/4x3/pf.svg.js +4 -0
- package/dist/vue/flags/4x3/pg.svg.js +4 -0
- package/dist/vue/flags/4x3/ph.svg.js +4 -0
- package/dist/vue/flags/4x3/pk.svg.js +4 -0
- package/dist/vue/flags/4x3/pl.svg.js +4 -0
- package/dist/vue/flags/4x3/pm.svg.js +4 -0
- package/dist/vue/flags/4x3/pn.svg.js +4 -0
- package/dist/vue/flags/4x3/pr.svg.js +4 -0
- package/dist/vue/flags/4x3/ps.svg.js +4 -0
- package/dist/vue/flags/4x3/pt.svg.js +4 -0
- package/dist/vue/flags/4x3/pw.svg.js +4 -0
- package/dist/vue/flags/4x3/py.svg.js +4 -0
- package/dist/vue/flags/4x3/qa.svg.js +4 -0
- package/dist/vue/flags/4x3/re.svg.js +4 -0
- package/dist/vue/flags/4x3/ro.svg.js +4 -0
- package/dist/vue/flags/4x3/rs.svg.js +4 -0
- package/dist/vue/flags/4x3/ru.svg.js +4 -0
- package/dist/vue/flags/4x3/rw.svg.js +4 -0
- package/dist/vue/flags/4x3/sa.svg.js +4 -0
- package/dist/vue/flags/4x3/sb.svg.js +4 -0
- package/dist/vue/flags/4x3/sc.svg.js +4 -0
- package/dist/vue/flags/4x3/sd.svg.js +4 -0
- package/dist/vue/flags/4x3/se.svg.js +4 -0
- package/dist/vue/flags/4x3/sg.svg.js +4 -0
- package/dist/vue/flags/4x3/sh-ac.svg.js +4 -0
- package/dist/vue/flags/4x3/sh-hl.svg.js +4 -0
- package/dist/vue/flags/4x3/sh-ta.svg.js +4 -0
- package/dist/vue/flags/4x3/sh.svg.js +4 -0
- package/dist/vue/flags/4x3/si.svg.js +4 -0
- package/dist/vue/flags/4x3/sj.svg.js +4 -0
- package/dist/vue/flags/4x3/sk.svg.js +4 -0
- package/dist/vue/flags/4x3/sl.svg.js +4 -0
- package/dist/vue/flags/4x3/sm.svg.js +4 -0
- package/dist/vue/flags/4x3/sn.svg.js +4 -0
- package/dist/vue/flags/4x3/so.svg.js +4 -0
- package/dist/vue/flags/4x3/sr.svg.js +4 -0
- package/dist/vue/flags/4x3/ss.svg.js +4 -0
- package/dist/vue/flags/4x3/st.svg.js +4 -0
- package/dist/vue/flags/4x3/sv.svg.js +4 -0
- package/dist/vue/flags/4x3/sx.svg.js +4 -0
- package/dist/vue/flags/4x3/sy.svg.js +4 -0
- package/dist/vue/flags/4x3/sz.svg.js +4 -0
- package/dist/vue/flags/4x3/tc.svg.js +4 -0
- package/dist/vue/flags/4x3/td.svg.js +4 -0
- package/dist/vue/flags/4x3/tf.svg.js +4 -0
- package/dist/vue/flags/4x3/tg.svg.js +4 -0
- package/dist/vue/flags/4x3/th.svg.js +4 -0
- package/dist/vue/flags/4x3/tj.svg.js +4 -0
- package/dist/vue/flags/4x3/tk.svg.js +4 -0
- package/dist/vue/flags/4x3/tl.svg.js +4 -0
- package/dist/vue/flags/4x3/tm.svg.js +4 -0
- package/dist/vue/flags/4x3/tn.svg.js +4 -0
- package/dist/vue/flags/4x3/to.svg.js +4 -0
- package/dist/vue/flags/4x3/tr.svg.js +4 -0
- package/dist/vue/flags/4x3/tt.svg.js +4 -0
- package/dist/vue/flags/4x3/tv.svg.js +4 -0
- package/dist/vue/flags/4x3/tw.svg.js +4 -0
- package/dist/vue/flags/4x3/tz.svg.js +4 -0
- package/dist/vue/flags/4x3/ua.svg.js +4 -0
- package/dist/vue/flags/4x3/ug.svg.js +4 -0
- package/dist/vue/flags/4x3/um.svg.js +4 -0
- package/dist/vue/flags/4x3/un.svg.js +4 -0
- package/dist/vue/flags/4x3/us.svg.js +4 -0
- package/dist/vue/flags/4x3/uy.svg.js +4 -0
- package/dist/vue/flags/4x3/uz.svg.js +4 -0
- package/dist/vue/flags/4x3/va.svg.js +4 -0
- package/dist/vue/flags/4x3/vc.svg.js +4 -0
- package/dist/vue/flags/4x3/ve.svg.js +4 -0
- package/dist/vue/flags/4x3/vg.svg.js +4 -0
- package/dist/vue/flags/4x3/vi.svg.js +4 -0
- package/dist/vue/flags/4x3/vn.svg.js +4 -0
- package/dist/vue/flags/4x3/vu.svg.js +4 -0
- package/dist/vue/flags/4x3/wf.svg.js +4 -0
- package/dist/vue/flags/4x3/ws.svg.js +4 -0
- package/dist/vue/flags/4x3/xk.svg.js +4 -0
- package/dist/vue/flags/4x3/xx.svg.js +4 -0
- package/dist/vue/flags/4x3/ye.svg.js +4 -0
- package/dist/vue/flags/4x3/yt.svg.js +4 -0
- package/dist/vue/flags/4x3/za.svg.js +4 -0
- package/dist/vue/flags/4x3/zm.svg.js +4 -0
- package/dist/vue/flags/4x3/zw.svg.js +4 -0
- package/package.json +60 -52
- package/.eslintrc.cjs +0 -23
- package/CHANGELOG.md +0 -3615
- package/__mocks__/ResizeObserver.js +0 -13
- package/babel.config.cjs +0 -12
- package/data/countries-borders.json +0 -1
- package/data/ne_110m_admin_0_countries.json +0 -1
- package/dist/components/.storybook/main.js +0 -88
- package/dist/components/.storybook/package.json +0 -3
- package/dist/components/.storybook/preview.js +0 -53
- package/dist/components/.storybook/tailwind.css +0 -5
- package/dist/components/KvAccordionItem.vue +0 -130
- package/dist/components/KvActivityRow.vue +0 -33
- package/dist/components/KvBorrowerImage.vue +0 -179
- package/dist/components/KvButton.vue +0 -288
- package/dist/components/KvCarousel.vue +0 -314
- package/dist/components/KvCartModal.vue +0 -365
- package/dist/components/KvCheckbox.vue +0 -203
- package/dist/components/KvChip.vue +0 -54
- package/dist/components/KvClassicLoanCard.vue +0 -527
- package/dist/components/KvCommentsAdd.vue +0 -135
- package/dist/components/KvCommentsContainer.vue +0 -84
- package/dist/components/KvCommentsHeartButton.vue +0 -70
- package/dist/components/KvCommentsList.vue +0 -68
- package/dist/components/KvCommentsListItem.vue +0 -241
- package/dist/components/KvCommentsReplyButton.vue +0 -52
- package/dist/components/KvContentfulImg.vue +0 -273
- package/dist/components/KvCountdownTimer.vue +0 -59
- package/dist/components/KvExpandable.vue +0 -84
- package/dist/components/KvExpandableQuestion.vue +0 -120
- package/dist/components/KvFlag.vue +0 -120
- package/dist/components/KvGrid.vue +0 -28
- package/dist/components/KvImpactDashboardHeader.vue +0 -40
- package/dist/components/KvInlineActivityCard.vue +0 -55
- package/dist/components/KvInlineActivityFeed.vue +0 -38
- package/dist/components/KvIntroductionLoanCard.vue +0 -449
- package/dist/components/KvLendAmountButton.vue +0 -65
- package/dist/components/KvLendCta.vue +0 -589
- package/dist/components/KvLightbox.vue +0 -334
- package/dist/components/KvLineGraph.vue +0 -128
- package/dist/components/KvLoadingPlaceholder.vue +0 -38
- package/dist/components/KvLoadingSpinner.vue +0 -81
- package/dist/components/KvLoanActivities.vue +0 -268
- package/dist/components/KvLoanBookmark.vue +0 -39
- package/dist/components/KvLoanCallouts.vue +0 -53
- package/dist/components/KvLoanProgressGroup.vue +0 -76
- package/dist/components/KvLoanTag.vue +0 -88
- package/dist/components/KvLoanTeamPick.vue +0 -44
- package/dist/components/KvLoanUse.vue +0 -92
- package/dist/components/KvMap.vue +0 -599
- package/dist/components/KvMaterialIcon.vue +0 -47
- package/dist/components/KvPageContainer.vue +0 -15
- package/dist/components/KvPagination.vue +0 -198
- package/dist/components/KvPieChart.vue +0 -257
- package/dist/components/KvPopper.vue +0 -178
- package/dist/components/KvProgressBar.vue +0 -149
- package/dist/components/KvRadio.vue +0 -198
- package/dist/components/KvSelect.vue +0 -114
- package/dist/components/KvSideSheet.vue +0 -196
- package/dist/components/KvSwitch.vue +0 -143
- package/dist/components/KvTab.vue +0 -90
- package/dist/components/KvTabPanel.vue +0 -64
- package/dist/components/KvTabs.vue +0 -182
- package/dist/components/KvTextInput.vue +0 -250
- package/dist/components/KvTextLink.vue +0 -138
- package/dist/components/KvThemeProvider.vue +0 -122
- package/dist/components/KvToast.vue +0 -221
- package/dist/components/KvTooltip.vue +0 -168
- package/dist/components/KvTreeMapChart.vue +0 -229
- package/dist/components/KvUserAvatar.vue +0 -132
- package/dist/components/KvVerticalCarousel.vue +0 -219
- package/dist/components/KvVotingCard.vue +0 -160
- package/dist/components/KvVotingCardV2.vue +0 -154
- package/dist/components/KvWideLoanCard.vue +0 -433
- package/dist/components/stories/Forms.stories.js +0 -62
- package/dist/components/stories/KvAccordionItem.stories.js +0 -24
- package/dist/components/stories/KvActivityRow.stories.js +0 -27
- package/dist/components/stories/KvBorrowerImage.stories.js +0 -62
- package/dist/components/stories/KvButton.stories.js +0 -142
- package/dist/components/stories/KvCarousel.stories.js +0 -489
- package/dist/components/stories/KvCartModal.stories.js +0 -51
- package/dist/components/stories/KvCheckbox.stories.js +0 -163
- package/dist/components/stories/KvChip.stories.js +0 -43
- package/dist/components/stories/KvClassicLoanCard.stories.js +0 -458
- package/dist/components/stories/KvCommentsAdd.stories.js +0 -32
- package/dist/components/stories/KvCommentsContainer.stories.js +0 -42
- package/dist/components/stories/KvCommentsHeartButton.stories.js +0 -25
- package/dist/components/stories/KvCommentsList.stories.js +0 -39
- package/dist/components/stories/KvCommentsListItem.stories.js +0 -45
- package/dist/components/stories/KvCommentsReplyButton.stories.js +0 -21
- package/dist/components/stories/KvContentfulImg.stories.js +0 -173
- package/dist/components/stories/KvCountdownTimer.stories.js +0 -31
- package/dist/components/stories/KvExpandableQuestion.stories.js +0 -129
- package/dist/components/stories/KvFlag.stories.js +0 -38
- package/dist/components/stories/KvGrid.stories.js +0 -97
- package/dist/components/stories/KvImpactDashboardHeader.stories.js +0 -22
- package/dist/components/stories/KvInlineActivityCard.stories.js +0 -69
- package/dist/components/stories/KvInlineActivityFeed.stories.js +0 -76
- package/dist/components/stories/KvIntroductionLoanCard.stories.js +0 -204
- package/dist/components/stories/KvLendAmountButton.stories.js +0 -31
- package/dist/components/stories/KvLendCta.stories.js +0 -332
- package/dist/components/stories/KvLightbox.stories.js +0 -308
- package/dist/components/stories/KvLineGraph.stories.js +0 -53
- package/dist/components/stories/KvLoadingPlaceholder.stories.js +0 -17
- package/dist/components/stories/KvLoadingSpinner.stories.js +0 -50
- package/dist/components/stories/KvLoanActivities.stories.js +0 -103
- package/dist/components/stories/KvLoanBookmark.stories.js +0 -23
- package/dist/components/stories/KvLoanCallouts.stories.js +0 -23
- package/dist/components/stories/KvLoanProgressGroup.stories.js +0 -29
- package/dist/components/stories/KvLoanTag.stories.js +0 -62
- package/dist/components/stories/KvLoanTeamPick.stories.js +0 -20
- package/dist/components/stories/KvLoanUse.stories.js +0 -54
- package/dist/components/stories/KvMap.stories.js +0 -108
- package/dist/components/stories/KvMaterialIcon.stories.js +0 -210
- package/dist/components/stories/KvPageContainer.stories.js +0 -50
- package/dist/components/stories/KvPagination.stories.js +0 -66
- package/dist/components/stories/KvPieChart.stories.js +0 -47
- package/dist/components/stories/KvProgressBar.stories.js +0 -48
- package/dist/components/stories/KvRadio.stories.js +0 -140
- package/dist/components/stories/KvSelect.stories.js +0 -125
- package/dist/components/stories/KvSideSheet.stories.js +0 -68
- package/dist/components/stories/KvSwitch.stories.js +0 -66
- package/dist/components/stories/KvTabs.stories.js +0 -106
- package/dist/components/stories/KvTextInput.stories.js +0 -194
- package/dist/components/stories/KvTextLink.stories.js +0 -51
- package/dist/components/stories/KvThemeProvider.stories.js +0 -212
- package/dist/components/stories/KvToast.stories.js +0 -111
- package/dist/components/stories/KvTooltip.stories.js +0 -26
- package/dist/components/stories/KvTreeMapChart.stories.js +0 -42
- package/dist/components/stories/KvUserAvatar.stories.js +0 -47
- package/dist/components/stories/KvVerticalCarousel.stories.js +0 -294
- package/dist/components/stories/KvVotingCard.stories.js +0 -33
- package/dist/components/stories/KvVotingCardV2.stories.js +0 -89
- package/dist/components/stories/KvWideLoanCard.stories.js +0 -278
- package/dist/components/stories/StyleguidePrimitives.stories.js +0 -498
- package/dist/components/stories/StyleguideProse.stories.js +0 -271
- package/dist/data/countries-borders.json +0 -1
- package/dist/data/ne_110m_admin_0_countries.json +0 -1
- package/dist/utils/Alea.cjs +0 -87
- package/dist/utils/attrs.cjs +0 -50
- package/dist/utils/carousels.cjs +0 -220
- package/dist/utils/chunk-3HK4G4NT.js +0 -27
- package/dist/utils/chunk-55HF2ORX.js +0 -201
- package/dist/utils/chunk-AY3PR5S4.js +0 -54
- package/dist/utils/chunk-B5J5WLAH.js +0 -18
- package/dist/utils/chunk-GPSH6OPA.js +0 -64
- package/dist/utils/chunk-HIY5IW65.js +0 -28
- package/dist/utils/chunk-HV3AUBFT.js +0 -15
- package/dist/utils/chunk-MSMZIN54.js +0 -110
- package/dist/utils/chunk-OXJCCNNW.js +0 -30
- package/dist/utils/chunk-S3MABILA.js +0 -22
- package/dist/utils/chunk-TR3NWLTZ.js +0 -184
- package/dist/utils/chunk-VIGEMAKO.js +0 -249
- package/dist/utils/chunk-YCNMJ4YV.js +0 -37
- package/dist/utils/chunk-YFEC5ODJ.js +0 -129
- package/dist/utils/expander.cjs +0 -78
- package/dist/utils/imageUtils.cjs +0 -54
- package/dist/utils/index.cjs +0 -1154
- package/dist/utils/index.js +0 -166
- package/dist/utils/loanCard.cjs +0 -222
- package/dist/utils/loanUtils.cjs +0 -170
- package/dist/utils/mapUtils.cjs +0 -276
- package/dist/utils/printing.cjs +0 -42
- package/dist/utils/scrollLock.cjs +0 -54
- package/dist/utils/throttle.cjs +0 -38
- package/dist/utils/touchEvents.cjs +0 -47
- package/dist/utils/treemap.cjs +0 -133
- package/jest.config.cjs +0 -47
- package/postcss.config.cjs +0 -6
- package/tailwind.config.cjs +0 -64
- package/tests/fixtures/mockCommentsData.js +0 -36
- package/tests/fixtures/mockLenderCountries.js +0 -674
- package/tests/unit/.eslintrc +0 -5
- package/tests/unit/jest-setup.js +0 -5
- package/tests/unit/specs/components/KvButton.spec.js +0 -92
- package/tests/unit/specs/components/KvCarousel.spec.js +0 -78
- package/tests/unit/specs/components/KvCheckbox.spec.js +0 -109
- package/tests/unit/specs/components/KvClassicLoanCard.spec.js +0 -201
- package/tests/unit/specs/components/KvCommentsAdd.spec.js +0 -108
- package/tests/unit/specs/components/KvCommentsContainer.spec.js +0 -40
- package/tests/unit/specs/components/KvCommentsHeartButton.spec.js +0 -32
- package/tests/unit/specs/components/KvCommentsList.spec.js +0 -83
- package/tests/unit/specs/components/KvCommentsListItem.spec.js +0 -120
- package/tests/unit/specs/components/KvCommentsReplyButton.spec.js +0 -23
- package/tests/unit/specs/components/KvExpandableQuestion.spec.js +0 -55
- package/tests/unit/specs/components/KvLendAmountButton.spec.js +0 -36
- package/tests/unit/specs/components/KvLightbox.spec.js +0 -14
- package/tests/unit/specs/components/KvLineGraph.spec.js +0 -58
- package/tests/unit/specs/components/KvLoanProgressGroup.spec.js +0 -50
- package/tests/unit/specs/components/KvPagination.spec.js +0 -132
- package/tests/unit/specs/components/KvProgressBar.spec.js +0 -11
- package/tests/unit/specs/components/KvRadio.spec.js +0 -184
- package/tests/unit/specs/components/KvSelect.spec.js +0 -113
- package/tests/unit/specs/components/KvSwitch.spec.js +0 -120
- package/tests/unit/specs/components/KvTabPanel.spec.js +0 -32
- package/tests/unit/specs/components/KvTabs.spec.js +0 -167
- package/tests/unit/specs/components/KvTextInput.spec.js +0 -151
- package/tests/unit/specs/components/KvTextLink.spec.js +0 -53
- package/tests/unit/specs/components/KvToast.spec.js +0 -11
- package/tests/unit/specs/components/KvWideLoanCard.spec.js +0 -136
- package/tests/unit/specs/utils/imageUtils.spec.js +0 -29
- package/tests/unit/specs/utils/loanUtils.spec.js +0 -437
- package/tests/unit/specs/utils/mapUtils.spec.js +0 -72
- package/tests/unit/specs/utils/treemap.spec.js +0 -248
- package/tests/unit/utils/addVueRouter.js +0 -18
- package/utils/Alea.js +0 -92
- package/utils/attrs.js +0 -62
- package/utils/carousels.js +0 -252
- package/utils/expander.js +0 -72
- package/utils/imageUtils.js +0 -43
- package/utils/index.js +0 -14
- package/utils/loanCard.js +0 -204
- package/utils/loanUtils.js +0 -209
- package/utils/mapUtils.js +0 -360
- package/utils/printing.js +0 -13
- package/utils/scrollLock.js +0 -25
- package/utils/themeUtils.cjs +0 -29
- package/utils/throttle.js +0 -11
- package/utils/touchEvents.js +0 -22
- package/utils/treemap.js +0 -138
- package/vue/.storybook/main.js +0 -88
- package/vue/.storybook/package.json +0 -3
- package/vue/.storybook/preview.js +0 -53
- package/vue/.storybook/tailwind.css +0 -5
- package/vue/KvAccordionItem.vue +0 -130
- package/vue/KvActivityRow.vue +0 -33
- package/vue/KvBorrowerImage.vue +0 -179
- package/vue/KvButton.vue +0 -288
- package/vue/KvCarousel.vue +0 -314
- package/vue/KvCartModal.vue +0 -365
- package/vue/KvCheckbox.vue +0 -203
- package/vue/KvChip.vue +0 -54
- package/vue/KvClassicLoanCard.vue +0 -527
- package/vue/KvCommentsAdd.vue +0 -135
- package/vue/KvCommentsContainer.vue +0 -84
- package/vue/KvCommentsHeartButton.vue +0 -70
- package/vue/KvCommentsList.vue +0 -68
- package/vue/KvCommentsListItem.vue +0 -241
- package/vue/KvCommentsReplyButton.vue +0 -52
- package/vue/KvContentfulImg.vue +0 -273
- package/vue/KvCountdownTimer.vue +0 -59
- package/vue/KvExpandable.vue +0 -84
- package/vue/KvExpandableQuestion.vue +0 -120
- package/vue/KvFlag.vue +0 -120
- package/vue/KvGrid.vue +0 -28
- package/vue/KvImpactDashboardHeader.vue +0 -40
- package/vue/KvInlineActivityCard.vue +0 -55
- package/vue/KvInlineActivityFeed.vue +0 -38
- package/vue/KvIntroductionLoanCard.vue +0 -449
- package/vue/KvLendAmountButton.vue +0 -65
- package/vue/KvLendCta.vue +0 -589
- package/vue/KvLightbox.vue +0 -334
- package/vue/KvLineGraph.vue +0 -128
- package/vue/KvLoadingPlaceholder.vue +0 -38
- package/vue/KvLoadingSpinner.vue +0 -81
- package/vue/KvLoanActivities.vue +0 -268
- package/vue/KvLoanBookmark.vue +0 -39
- package/vue/KvLoanCallouts.vue +0 -53
- package/vue/KvLoanProgressGroup.vue +0 -76
- package/vue/KvLoanTag.vue +0 -88
- package/vue/KvLoanTeamPick.vue +0 -44
- package/vue/KvLoanUse.vue +0 -92
- package/vue/KvMap.vue +0 -599
- package/vue/KvMaterialIcon.vue +0 -47
- package/vue/KvPageContainer.vue +0 -15
- package/vue/KvPagination.vue +0 -198
- package/vue/KvPieChart.vue +0 -257
- package/vue/KvPopper.vue +0 -178
- package/vue/KvProgressBar.vue +0 -149
- package/vue/KvRadio.vue +0 -198
- package/vue/KvSelect.vue +0 -114
- package/vue/KvSideSheet.vue +0 -196
- package/vue/KvSwitch.vue +0 -143
- package/vue/KvTab.vue +0 -90
- package/vue/KvTabPanel.vue +0 -64
- package/vue/KvTabs.vue +0 -182
- package/vue/KvTextInput.vue +0 -250
- package/vue/KvTextLink.vue +0 -138
- package/vue/KvThemeProvider.vue +0 -122
- package/vue/KvToast.vue +0 -221
- package/vue/KvTooltip.vue +0 -168
- package/vue/KvTreeMapChart.vue +0 -229
- package/vue/KvUserAvatar.vue +0 -132
- package/vue/KvVerticalCarousel.vue +0 -219
- package/vue/KvVotingCard.vue +0 -160
- package/vue/KvVotingCardV2.vue +0 -154
- package/vue/KvWideLoanCard.vue +0 -433
- package/vue/stories/Forms.stories.js +0 -62
- package/vue/stories/KvAccordionItem.stories.js +0 -24
- package/vue/stories/KvActivityRow.stories.js +0 -27
- package/vue/stories/KvBorrowerImage.stories.js +0 -62
- package/vue/stories/KvButton.stories.js +0 -142
- package/vue/stories/KvCarousel.stories.js +0 -489
- package/vue/stories/KvCartModal.stories.js +0 -51
- package/vue/stories/KvCheckbox.stories.js +0 -163
- package/vue/stories/KvChip.stories.js +0 -43
- package/vue/stories/KvClassicLoanCard.stories.js +0 -458
- package/vue/stories/KvCommentsAdd.stories.js +0 -32
- package/vue/stories/KvCommentsContainer.stories.js +0 -42
- package/vue/stories/KvCommentsHeartButton.stories.js +0 -25
- package/vue/stories/KvCommentsList.stories.js +0 -39
- package/vue/stories/KvCommentsListItem.stories.js +0 -45
- package/vue/stories/KvCommentsReplyButton.stories.js +0 -21
- package/vue/stories/KvContentfulImg.stories.js +0 -173
- package/vue/stories/KvCountdownTimer.stories.js +0 -31
- package/vue/stories/KvExpandableQuestion.stories.js +0 -129
- package/vue/stories/KvFlag.stories.js +0 -38
- package/vue/stories/KvGrid.stories.js +0 -97
- package/vue/stories/KvImpactDashboardHeader.stories.js +0 -22
- package/vue/stories/KvInlineActivityCard.stories.js +0 -69
- package/vue/stories/KvInlineActivityFeed.stories.js +0 -76
- package/vue/stories/KvIntroductionLoanCard.stories.js +0 -204
- package/vue/stories/KvLendAmountButton.stories.js +0 -31
- package/vue/stories/KvLendCta.stories.js +0 -332
- package/vue/stories/KvLightbox.stories.js +0 -308
- package/vue/stories/KvLineGraph.stories.js +0 -53
- package/vue/stories/KvLoadingPlaceholder.stories.js +0 -17
- package/vue/stories/KvLoadingSpinner.stories.js +0 -50
- package/vue/stories/KvLoanActivities.stories.js +0 -103
- package/vue/stories/KvLoanBookmark.stories.js +0 -23
- package/vue/stories/KvLoanCallouts.stories.js +0 -23
- package/vue/stories/KvLoanProgressGroup.stories.js +0 -29
- package/vue/stories/KvLoanTag.stories.js +0 -62
- package/vue/stories/KvLoanTeamPick.stories.js +0 -20
- package/vue/stories/KvLoanUse.stories.js +0 -54
- package/vue/stories/KvMap.stories.js +0 -108
- package/vue/stories/KvMaterialIcon.stories.js +0 -210
- package/vue/stories/KvPageContainer.stories.js +0 -50
- package/vue/stories/KvPagination.stories.js +0 -66
- package/vue/stories/KvPieChart.stories.js +0 -47
- package/vue/stories/KvProgressBar.stories.js +0 -48
- package/vue/stories/KvRadio.stories.js +0 -140
- package/vue/stories/KvSelect.stories.js +0 -125
- package/vue/stories/KvSideSheet.stories.js +0 -68
- package/vue/stories/KvSwitch.stories.js +0 -66
- package/vue/stories/KvTabs.stories.js +0 -106
- package/vue/stories/KvTextInput.stories.js +0 -194
- package/vue/stories/KvTextLink.stories.js +0 -51
- package/vue/stories/KvThemeProvider.stories.js +0 -212
- package/vue/stories/KvToast.stories.js +0 -111
- package/vue/stories/KvTooltip.stories.js +0 -26
- package/vue/stories/KvTreeMapChart.stories.js +0 -42
- package/vue/stories/KvUserAvatar.stories.js +0 -47
- package/vue/stories/KvVerticalCarousel.stories.js +0 -294
- package/vue/stories/KvVotingCard.stories.js +0 -33
- package/vue/stories/KvVotingCardV2.stories.js +0 -89
- package/vue/stories/KvWideLoanCard.stories.js +0 -278
- package/vue/stories/StyleguidePrimitives.stories.js +0 -498
- package/vue/stories/StyleguideProse.stories.js +0 -271
package/dist/utils/index.cjs
DELETED
|
@@ -1,1154 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
-
};
|
|
10
|
-
var __export = (target, all) => {
|
|
11
|
-
for (var name in all)
|
|
12
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
-
};
|
|
14
|
-
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
-
mod
|
|
30
|
-
));
|
|
31
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
-
|
|
33
|
-
// utils/themeUtils.cjs
|
|
34
|
-
var require_themeUtils = __commonJS({
|
|
35
|
-
"utils/themeUtils.cjs"(exports, module2) {
|
|
36
|
-
var headerNumberCase = (str) => str.replace("h-1", "h1").replace("h-2", "h2").replace("h-3", "h3").replace("h-4", "h4").replace("h-5", "h5");
|
|
37
|
-
var buildTailwindClassName = (prefix, value) => {
|
|
38
|
-
let name = `${prefix}-${value}`;
|
|
39
|
-
name = name.replace("-DEFAULT", "");
|
|
40
|
-
return name;
|
|
41
|
-
};
|
|
42
|
-
var kebabCase = (str) => str.split("").map((letter, idx) => letter.toUpperCase() === letter ? `${idx !== 0 ? "-" : ""}${letter.toLowerCase()}` : letter).join("");
|
|
43
|
-
var removeObjectProperty = (object, key) => {
|
|
44
|
-
const ret = { ...object };
|
|
45
|
-
delete ret[key];
|
|
46
|
-
return ret;
|
|
47
|
-
};
|
|
48
|
-
module2.exports = {
|
|
49
|
-
buildTailwindClassName,
|
|
50
|
-
headerNumberCase,
|
|
51
|
-
kebabCase,
|
|
52
|
-
removeObjectProperty
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
// utils/index.js
|
|
58
|
-
var utils_exports = {};
|
|
59
|
-
__export(utils_exports, {
|
|
60
|
-
BALANCE_CAMPAIGN: () => BALANCE_CAMPAIGN,
|
|
61
|
-
BASE_CAMPAIGN: () => BASE_CAMPAIGN,
|
|
62
|
-
ERL_COOKIE_NAME: () => ERL_COOKIE_NAME,
|
|
63
|
-
Mash: () => Mash,
|
|
64
|
-
NO_BALANCE_CAMPAIGN: () => NO_BALANCE_CAMPAIGN,
|
|
65
|
-
TOP_UP_CAMPAIGN: () => TOP_UP_CAMPAIGN,
|
|
66
|
-
animationCoordinator: () => animationCoordinator,
|
|
67
|
-
carouselUtil: () => carouselUtil,
|
|
68
|
-
collapse: () => collapse,
|
|
69
|
-
expand: () => expand,
|
|
70
|
-
generateMapMarkers: () => generateMapMarkers,
|
|
71
|
-
getCoordinatesBetween: () => getCoordinatesBetween,
|
|
72
|
-
getCountryColor: () => getCountryColor,
|
|
73
|
-
getDropdownPriceArray: () => getDropdownPriceArray,
|
|
74
|
-
getLendCtaSelectedOption: () => getLendCtaSelectedOption,
|
|
75
|
-
getLoansIntervals: () => getLoansIntervals,
|
|
76
|
-
getTreemap: () => getTreemap,
|
|
77
|
-
isBetween25And50: () => isBetween25And50,
|
|
78
|
-
isLegacyPlaceholderAvatar: () => isLegacyPlaceholderAvatar,
|
|
79
|
-
isLessThan25: () => isLessThan25,
|
|
80
|
-
isTargetElement: () => isTargetElement,
|
|
81
|
-
loanCardComputedProperties: () => loanCardComputedProperties,
|
|
82
|
-
loanCardMethods: () => loanCardMethods,
|
|
83
|
-
lockPrintSingleEl: () => lockPrintSingleEl,
|
|
84
|
-
lockScroll: () => lockScroll,
|
|
85
|
-
lockScrollSmallOnly: () => lockScrollSmallOnly,
|
|
86
|
-
offBodyTouchstart: () => offBodyTouchstart,
|
|
87
|
-
onBodyTouchstart: () => onBodyTouchstart,
|
|
88
|
-
randomizedUserAvatarClass: () => randomizedUserAvatarClass,
|
|
89
|
-
throttle: () => throttle,
|
|
90
|
-
unlockPrintSingleEl: () => unlockPrintSingleEl,
|
|
91
|
-
unlockScroll: () => unlockScroll,
|
|
92
|
-
unlockScrollSmallOnly: () => unlockScrollSmallOnly,
|
|
93
|
-
useAttrs: () => useAttrs
|
|
94
|
-
});
|
|
95
|
-
module.exports = __toCommonJS(utils_exports);
|
|
96
|
-
|
|
97
|
-
// utils/Alea.js
|
|
98
|
-
function Mash() {
|
|
99
|
-
let n = 4022871197;
|
|
100
|
-
const mash = function(data) {
|
|
101
|
-
data = data.toString();
|
|
102
|
-
for (let i = 0; i < data.length; i++) {
|
|
103
|
-
n += data.charCodeAt(i);
|
|
104
|
-
let h = 0.02519603282416938 * n;
|
|
105
|
-
n = h >>> 0;
|
|
106
|
-
h -= n;
|
|
107
|
-
h *= n;
|
|
108
|
-
n = h >>> 0;
|
|
109
|
-
h -= n;
|
|
110
|
-
n += h * 4294967296;
|
|
111
|
-
}
|
|
112
|
-
return (n >>> 0) * 23283064365386963e-26;
|
|
113
|
-
};
|
|
114
|
-
mash.version = "Mash 0.9";
|
|
115
|
-
return mash;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// utils/attrs.js
|
|
119
|
-
function asArray(input) {
|
|
120
|
-
if (!input)
|
|
121
|
-
return [];
|
|
122
|
-
return Array.isArray(input) ? input : [input];
|
|
123
|
-
}
|
|
124
|
-
function useAttrs({ attrs, listeners }, ownEvents = []) {
|
|
125
|
-
const classes = asArray(attrs == null ? void 0 : attrs.class);
|
|
126
|
-
const styles = asArray(attrs == null ? void 0 : attrs.style);
|
|
127
|
-
const inputListeners = listeners ? { ...listeners } : {};
|
|
128
|
-
ownEvents.forEach((event) => {
|
|
129
|
-
delete inputListeners[event];
|
|
130
|
-
});
|
|
131
|
-
const inputAttrs = { ...attrs };
|
|
132
|
-
delete inputAttrs.class;
|
|
133
|
-
delete inputAttrs.style;
|
|
134
|
-
return {
|
|
135
|
-
classes,
|
|
136
|
-
styles,
|
|
137
|
-
inputAttrs,
|
|
138
|
-
inputListeners
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// utils/carousels.js
|
|
143
|
-
var import_vue_demi = require("vue-demi");
|
|
144
|
-
var import_embla_carousel = __toESM(require("embla-carousel"), 1);
|
|
145
|
-
var import_embla_carousel_autoplay = __toESM(require("embla-carousel-autoplay"), 1);
|
|
146
|
-
var import_embla_carousel_fade = __toESM(require("embla-carousel-fade"), 1);
|
|
147
|
-
|
|
148
|
-
// utils/throttle.js
|
|
149
|
-
function throttle(func, timeFrame) {
|
|
150
|
-
let lastTime = 0;
|
|
151
|
-
return function t(...args) {
|
|
152
|
-
const now = /* @__PURE__ */ new Date();
|
|
153
|
-
if (now - lastTime >= timeFrame) {
|
|
154
|
-
func(...args);
|
|
155
|
-
lastTime = now;
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// utils/carousels.js
|
|
161
|
-
function carouselUtil(props, { emit, slots }, extraEmblaOptions) {
|
|
162
|
-
var _a;
|
|
163
|
-
const {
|
|
164
|
-
autoplayOptions,
|
|
165
|
-
fadeEnabled,
|
|
166
|
-
emblaOptions,
|
|
167
|
-
slidesToScroll
|
|
168
|
-
} = (0, import_vue_demi.toRefs)(props);
|
|
169
|
-
const rootEl = (0, import_vue_demi.ref)(null);
|
|
170
|
-
const embla = (0, import_vue_demi.ref)(null);
|
|
171
|
-
const slides = (0, import_vue_demi.ref)([]);
|
|
172
|
-
const isAutoplaying = (0, import_vue_demi.ref)(false);
|
|
173
|
-
const startIndex = ((_a = emblaOptions.value) == null ? void 0 : _a.startIndex) ?? 0;
|
|
174
|
-
const currentIndex = (0, import_vue_demi.ref)(startIndex);
|
|
175
|
-
const slideIndicatorCount = (0, import_vue_demi.ref)(0);
|
|
176
|
-
const componentSlotKeys = (0, import_vue_demi.computed)(() => {
|
|
177
|
-
const keys = Object.keys(slots);
|
|
178
|
-
return keys;
|
|
179
|
-
});
|
|
180
|
-
const nextIndex = (0, import_vue_demi.computed)(() => {
|
|
181
|
-
const nextSlideIndex = currentIndex.value + 1;
|
|
182
|
-
if (nextSlideIndex < slides.value.length) {
|
|
183
|
-
return nextSlideIndex;
|
|
184
|
-
}
|
|
185
|
-
return 0;
|
|
186
|
-
});
|
|
187
|
-
const previousIndex = (0, import_vue_demi.computed)(() => {
|
|
188
|
-
const previousSlideIndex = currentIndex.value - 1;
|
|
189
|
-
if (previousSlideIndex >= 0) {
|
|
190
|
-
return previousSlideIndex;
|
|
191
|
-
}
|
|
192
|
-
return slides.value.length - 1;
|
|
193
|
-
});
|
|
194
|
-
const goToSlide = (index) => {
|
|
195
|
-
var _a2, _b;
|
|
196
|
-
const autoplay = (_b = (_a2 = embla.value) == null ? void 0 : _a2.plugins()) == null ? void 0 : _b.autoplay;
|
|
197
|
-
if (autoplay) {
|
|
198
|
-
autoplay.stop();
|
|
199
|
-
}
|
|
200
|
-
embla.value.scrollTo(index);
|
|
201
|
-
};
|
|
202
|
-
const handleUserInteraction = async (index, interactionType) => {
|
|
203
|
-
if (index !== null && typeof index !== "undefined") {
|
|
204
|
-
await (0, import_vue_demi.nextTick)();
|
|
205
|
-
goToSlide(index);
|
|
206
|
-
}
|
|
207
|
-
emit("interact-carousel", interactionType);
|
|
208
|
-
};
|
|
209
|
-
const toggleAutoPlay = () => {
|
|
210
|
-
var _a2, _b;
|
|
211
|
-
const autoplay = (_b = (_a2 = embla.value) == null ? void 0 : _a2.plugins()) == null ? void 0 : _b.autoplay;
|
|
212
|
-
if (!autoplay)
|
|
213
|
-
return;
|
|
214
|
-
const playOrStop = autoplay.isPlaying() ? autoplay.stop : autoplay.play;
|
|
215
|
-
playOrStop();
|
|
216
|
-
};
|
|
217
|
-
const slideIndicatorListLength = () => {
|
|
218
|
-
const indicator = embla.value ? embla.value.scrollSnapList().length : 0;
|
|
219
|
-
slideIndicatorCount.value = indicator;
|
|
220
|
-
return indicator;
|
|
221
|
-
};
|
|
222
|
-
const reInitVisible = () => {
|
|
223
|
-
const slidesInView = embla.value.slidesInView(true).length;
|
|
224
|
-
if (slidesInView) {
|
|
225
|
-
embla.value.reInit({
|
|
226
|
-
slidesToScroll: slidesInView,
|
|
227
|
-
inViewThreshold: 0.9
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
const reInit = () => {
|
|
232
|
-
embla.value.reInit();
|
|
233
|
-
if (slidesToScroll.value === "visible") {
|
|
234
|
-
reInitVisible();
|
|
235
|
-
}
|
|
236
|
-
slides.value = embla.value.slideNodes();
|
|
237
|
-
slideIndicatorListLength();
|
|
238
|
-
};
|
|
239
|
-
const isAriaHidden = (index) => {
|
|
240
|
-
if (embla.value) {
|
|
241
|
-
return !embla.value.slidesInView(true).includes(index);
|
|
242
|
-
}
|
|
243
|
-
return false;
|
|
244
|
-
};
|
|
245
|
-
const combinedPluginOptions = (0, import_vue_demi.computed)(() => {
|
|
246
|
-
const options = [];
|
|
247
|
-
if (Object.keys(autoplayOptions.value).length !== 0) {
|
|
248
|
-
options.push((0, import_embla_carousel_autoplay.default)(autoplayOptions.value));
|
|
249
|
-
}
|
|
250
|
-
if (fadeEnabled.value) {
|
|
251
|
-
options.push((0, import_embla_carousel_fade.default)());
|
|
252
|
-
}
|
|
253
|
-
return options;
|
|
254
|
-
});
|
|
255
|
-
(0, import_vue_demi.onMounted)(async () => {
|
|
256
|
-
var _a2, _b, _c;
|
|
257
|
-
embla.value = (0, import_embla_carousel.default)(rootEl.value, {
|
|
258
|
-
loop: true,
|
|
259
|
-
containScroll: "trimSnaps",
|
|
260
|
-
inViewThreshold: 0.9,
|
|
261
|
-
align: "start",
|
|
262
|
-
...extraEmblaOptions,
|
|
263
|
-
...emblaOptions.value
|
|
264
|
-
}, combinedPluginOptions.value);
|
|
265
|
-
if (slidesToScroll.value === "visible") {
|
|
266
|
-
reInitVisible();
|
|
267
|
-
embla.value.on(
|
|
268
|
-
"resize",
|
|
269
|
-
throttle(() => {
|
|
270
|
-
embla.value.reInit({
|
|
271
|
-
slidesToScroll: embla.value.slidesInView(true).length || "auto",
|
|
272
|
-
inViewThreshold: 0.9
|
|
273
|
-
});
|
|
274
|
-
slides.value = embla.value.slideNodes();
|
|
275
|
-
slideIndicatorListLength();
|
|
276
|
-
}, 250)
|
|
277
|
-
);
|
|
278
|
-
}
|
|
279
|
-
slides.value = embla.value.slideNodes();
|
|
280
|
-
slideIndicatorListLength();
|
|
281
|
-
(_a2 = embla == null ? void 0 : embla.value) == null ? void 0 : _a2.on("select", () => {
|
|
282
|
-
var _a3, _b2;
|
|
283
|
-
currentIndex.value = embla.value.selectedScrollSnap();
|
|
284
|
-
const autoplay = (_b2 = (_a3 = embla.value) == null ? void 0 : _a3.plugins()) == null ? void 0 : _b2.autoplay;
|
|
285
|
-
if (autoplay) {
|
|
286
|
-
embla.value.plugins().autoplay.options.playOnInit = autoplay.isPlaying();
|
|
287
|
-
}
|
|
288
|
-
(0, import_vue_demi.nextTick)(() => {
|
|
289
|
-
emit("change", currentIndex);
|
|
290
|
-
});
|
|
291
|
-
});
|
|
292
|
-
(_b = embla == null ? void 0 : embla.value) == null ? void 0 : _b.on("autoplay:play", () => {
|
|
293
|
-
isAutoplaying.value = true;
|
|
294
|
-
});
|
|
295
|
-
(_c = embla == null ? void 0 : embla.value) == null ? void 0 : _c.on("autoplay:stop", () => {
|
|
296
|
-
isAutoplaying.value = false;
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
(0, import_vue_demi.onUnmounted)(async () => {
|
|
300
|
-
var _a2, _b, _c, _d;
|
|
301
|
-
(_a2 = embla == null ? void 0 : embla.value) == null ? void 0 : _a2.off("select");
|
|
302
|
-
(_b = embla == null ? void 0 : embla.value) == null ? void 0 : _b.off("autoplay:play");
|
|
303
|
-
(_c = embla == null ? void 0 : embla.value) == null ? void 0 : _c.off("autoplay:stop");
|
|
304
|
-
(_d = embla == null ? void 0 : embla.value) == null ? void 0 : _d.destroy();
|
|
305
|
-
});
|
|
306
|
-
return {
|
|
307
|
-
rootEl,
|
|
308
|
-
embla,
|
|
309
|
-
slides,
|
|
310
|
-
currentIndex,
|
|
311
|
-
componentSlotKeys,
|
|
312
|
-
nextIndex,
|
|
313
|
-
previousIndex,
|
|
314
|
-
slideIndicatorCount,
|
|
315
|
-
handleUserInteraction,
|
|
316
|
-
goToSlide,
|
|
317
|
-
reInit,
|
|
318
|
-
reInitVisible,
|
|
319
|
-
isAriaHidden,
|
|
320
|
-
isAutoplaying,
|
|
321
|
-
slideIndicatorListLength,
|
|
322
|
-
toggleAutoPlay
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
// utils/expander.js
|
|
327
|
-
function setInitialStyle(el, { property, delay, easing }) {
|
|
328
|
-
el.style.overflow = "hidden";
|
|
329
|
-
el.style.transition = `${property} ${delay}ms ${easing}`;
|
|
330
|
-
}
|
|
331
|
-
function unsetStyles(el, { property }) {
|
|
332
|
-
el.style[property] = null;
|
|
333
|
-
el.style.overflow = null;
|
|
334
|
-
el.style.transition = null;
|
|
335
|
-
}
|
|
336
|
-
function expand(el, {
|
|
337
|
-
easing = "ease",
|
|
338
|
-
delay = 500,
|
|
339
|
-
done = () => {
|
|
340
|
-
},
|
|
341
|
-
from = 0,
|
|
342
|
-
property = "height"
|
|
343
|
-
}) {
|
|
344
|
-
setInitialStyle(el, { property, delay, easing });
|
|
345
|
-
el.style[property] = "auto";
|
|
346
|
-
el.style.display = null;
|
|
347
|
-
const propValue = window.getComputedStyle(el).getPropertyValue(property);
|
|
348
|
-
el.style[property] = from;
|
|
349
|
-
el.addEventListener("transitionend", function listener() {
|
|
350
|
-
unsetStyles(el, { property });
|
|
351
|
-
done();
|
|
352
|
-
el.removeEventListener("transitionend", listener, true);
|
|
353
|
-
}, true);
|
|
354
|
-
void el.offsetWidth;
|
|
355
|
-
el.style[property] = propValue;
|
|
356
|
-
}
|
|
357
|
-
function collapse(el, {
|
|
358
|
-
easing = "ease",
|
|
359
|
-
delay = 500,
|
|
360
|
-
done = () => {
|
|
361
|
-
},
|
|
362
|
-
to = 0,
|
|
363
|
-
property = "height"
|
|
364
|
-
}) {
|
|
365
|
-
setInitialStyle(el, { property, delay, easing });
|
|
366
|
-
el.style[property] = window.getComputedStyle(el).getPropertyValue(property);
|
|
367
|
-
el.addEventListener("transitionend", function listener() {
|
|
368
|
-
unsetStyles(el, { property });
|
|
369
|
-
done();
|
|
370
|
-
el.removeEventListener("transitionend", listener, true);
|
|
371
|
-
}, true);
|
|
372
|
-
void el.offsetWidth;
|
|
373
|
-
el.style[property] = to;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
// utils/imageUtils.js
|
|
377
|
-
function isLegacyPlaceholderAvatar(filename) {
|
|
378
|
-
if (!filename) {
|
|
379
|
-
return false;
|
|
380
|
-
}
|
|
381
|
-
let filenameCleaned = filename.toString();
|
|
382
|
-
if (filenameCleaned.includes(".")) {
|
|
383
|
-
[filenameCleaned] = filenameCleaned.split(".");
|
|
384
|
-
}
|
|
385
|
-
const defaultProfileIds = ["726677", "315726", "4d844ac2c0b77a8a522741b908ea5c32"];
|
|
386
|
-
return defaultProfileIds.includes(filenameCleaned);
|
|
387
|
-
}
|
|
388
|
-
function randomizedUserAvatarClass() {
|
|
389
|
-
const userCardStyleOptions = [
|
|
390
|
-
{ color: "tw-text-action", bg: "tw-bg-brand-100" },
|
|
391
|
-
{ color: "tw-text-black", bg: "tw-bg-brand-100" },
|
|
392
|
-
{ color: "tw-text-white", bg: "tw-bg-action" },
|
|
393
|
-
{ color: "tw-text-brand-100", bg: "tw-bg-action" },
|
|
394
|
-
{ color: "tw-text-primary-inverse", bg: "tw-bg-action" },
|
|
395
|
-
{ color: "tw-text-white", bg: "tw-bg-black" },
|
|
396
|
-
{ color: "tw-text-action", bg: "tw-bg-black" }
|
|
397
|
-
];
|
|
398
|
-
const randomStyle = userCardStyleOptions[Math.floor(Math.random() * userCardStyleOptions.length)];
|
|
399
|
-
return `${randomStyle.color} ${randomStyle.bg}`;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
// utils/loanCard.js
|
|
403
|
-
var import_vue_demi2 = require("vue-demi");
|
|
404
|
-
var import_js = require("@mdi/js");
|
|
405
|
-
var LSE_LOAN_KEY = "N/A";
|
|
406
|
-
var ECO_FRIENDLY_KEY = "ECO-FRIENDLY";
|
|
407
|
-
var SUSTAINABLE_AG_KEY = "SUSTAINABLE AG";
|
|
408
|
-
var SINGLE_PARENT_KEY = "SINGLE PARENT";
|
|
409
|
-
var REFUGEE_KEY = "REFUGEES/DISPLACED";
|
|
410
|
-
var findCalloutData = (tags, tagName) => (tags == null ? void 0 : tags.find((t) => t.name.replace("#", "").toUpperCase() === tagName.toUpperCase())) ?? {};
|
|
411
|
-
function loanCardComputedProperties(props, hideUnitedStatesText = false) {
|
|
412
|
-
const {
|
|
413
|
-
externalLinks,
|
|
414
|
-
customLoanDetails,
|
|
415
|
-
loanId,
|
|
416
|
-
loan,
|
|
417
|
-
categoryPageName,
|
|
418
|
-
customCallouts
|
|
419
|
-
} = (0, import_vue_demi2.toRefs)(props);
|
|
420
|
-
const tag = (0, import_vue_demi2.computed)(() => externalLinks.value ? "a" : "router-link");
|
|
421
|
-
const readMorePath = (0, import_vue_demi2.computed)(() => customLoanDetails.value ? "" : `/lend/${loanId.value}`);
|
|
422
|
-
const isLoading = (0, import_vue_demi2.computed)(() => !loanId.value || !loan.value);
|
|
423
|
-
const borrowerName = (0, import_vue_demi2.computed)(() => {
|
|
424
|
-
var _a;
|
|
425
|
-
return ((_a = loan.value) == null ? void 0 : _a.name) || "";
|
|
426
|
-
});
|
|
427
|
-
const countryName = (0, import_vue_demi2.computed)(() => {
|
|
428
|
-
var _a, _b, _c;
|
|
429
|
-
return ((_c = (_b = (_a = loan.value) == null ? void 0 : _a.geocode) == null ? void 0 : _b.country) == null ? void 0 : _c.name) || "";
|
|
430
|
-
});
|
|
431
|
-
const countryCode = (0, import_vue_demi2.computed)(() => {
|
|
432
|
-
var _a, _b, _c;
|
|
433
|
-
return ((_c = (_b = (_a = loan.value) == null ? void 0 : _a.geocode) == null ? void 0 : _b.country) == null ? void 0 : _c.isoCode) || "";
|
|
434
|
-
});
|
|
435
|
-
const city = (0, import_vue_demi2.computed)(() => {
|
|
436
|
-
var _a, _b;
|
|
437
|
-
return ((_b = (_a = loan.value) == null ? void 0 : _a.geocode) == null ? void 0 : _b.city) || "";
|
|
438
|
-
});
|
|
439
|
-
const state = (0, import_vue_demi2.computed)(() => {
|
|
440
|
-
var _a, _b;
|
|
441
|
-
return ((_b = (_a = loan.value) == null ? void 0 : _a.geocode) == null ? void 0 : _b.state) || "";
|
|
442
|
-
});
|
|
443
|
-
const distributionModel = (0, import_vue_demi2.computed)(() => {
|
|
444
|
-
var _a;
|
|
445
|
-
return ((_a = loan.value) == null ? void 0 : _a.distributionModel) || "";
|
|
446
|
-
});
|
|
447
|
-
const imageHash = (0, import_vue_demi2.computed)(() => {
|
|
448
|
-
var _a, _b;
|
|
449
|
-
return ((_b = (_a = loan.value) == null ? void 0 : _a.image) == null ? void 0 : _b.hash) ?? "";
|
|
450
|
-
});
|
|
451
|
-
const hasProgressData = (0, import_vue_demi2.computed)(() => {
|
|
452
|
-
var _a, _b;
|
|
453
|
-
return typeof ((_a = loan.value) == null ? void 0 : _a.unreservedAmount) !== "undefined" && typeof ((_b = loan.value) == null ? void 0 : _b.fundraisingPercent) !== "undefined";
|
|
454
|
-
});
|
|
455
|
-
const allDataLoaded = (0, import_vue_demi2.computed)(() => !isLoading.value && hasProgressData.value);
|
|
456
|
-
const fundraisingPercent = (0, import_vue_demi2.computed)(() => {
|
|
457
|
-
var _a;
|
|
458
|
-
return ((_a = loan.value) == null ? void 0 : _a.fundraisingPercent) ?? 0;
|
|
459
|
-
});
|
|
460
|
-
const unreservedAmount = (0, import_vue_demi2.computed)(() => {
|
|
461
|
-
var _a;
|
|
462
|
-
const stringAmount = ((_a = loan.value) == null ? void 0 : _a.unreservedAmount) ?? "0";
|
|
463
|
-
return Number(stringAmount);
|
|
464
|
-
});
|
|
465
|
-
const formattedLocation = (0, import_vue_demi2.computed)(() => {
|
|
466
|
-
if (distributionModel.value === "direct") {
|
|
467
|
-
const countryText = hideUnitedStatesText && countryName.value.toLowerCase() === "united states" ? "" : `, ${countryName.value}`;
|
|
468
|
-
return `${city.value}, ${state.value}${countryText}`;
|
|
469
|
-
}
|
|
470
|
-
if (countryName.value === "Puerto Rico") {
|
|
471
|
-
return `${city.value}, PR`;
|
|
472
|
-
}
|
|
473
|
-
return countryName.value;
|
|
474
|
-
});
|
|
475
|
-
const loanUse = (0, import_vue_demi2.computed)(() => {
|
|
476
|
-
var _a;
|
|
477
|
-
return ((_a = loan.value) == null ? void 0 : _a.use) ?? "";
|
|
478
|
-
});
|
|
479
|
-
const loanStatus = (0, import_vue_demi2.computed)(() => {
|
|
480
|
-
var _a;
|
|
481
|
-
return ((_a = loan.value) == null ? void 0 : _a.status) ?? "";
|
|
482
|
-
});
|
|
483
|
-
const loanAmount = (0, import_vue_demi2.computed)(() => {
|
|
484
|
-
var _a;
|
|
485
|
-
return ((_a = loan.value) == null ? void 0 : _a.loanAmount) ?? "0";
|
|
486
|
-
});
|
|
487
|
-
const loanBorrowerCount = (0, import_vue_demi2.computed)(() => {
|
|
488
|
-
var _a;
|
|
489
|
-
return ((_a = loan.value) == null ? void 0 : _a.borrowerCount) ?? 0;
|
|
490
|
-
});
|
|
491
|
-
const loanCallouts = (0, import_vue_demi2.computed)(() => {
|
|
492
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
493
|
-
const callouts = [];
|
|
494
|
-
const activityName = ((_b = (_a = loan.value) == null ? void 0 : _a.activity) == null ? void 0 : _b.name) ?? "";
|
|
495
|
-
const activityId = ((_d = (_c = loan.value) == null ? void 0 : _c.activity) == null ? void 0 : _d.id) ?? null;
|
|
496
|
-
const sectorName = ((_f = (_e = loan.value) == null ? void 0 : _e.sector) == null ? void 0 : _f.name) ?? "";
|
|
497
|
-
const sectorId = ((_h = (_g = loan.value) == null ? void 0 : _g.sector) == null ? void 0 : _h.id) ?? null;
|
|
498
|
-
const tags = ((_j = (_i = loan.value) == null ? void 0 : _i.tags) == null ? void 0 : _j.filter((loantag) => loantag.charAt(0) === "#").map((loantag) => loantag.substring(1))) ?? [];
|
|
499
|
-
const themes = ((_k = loan.value) == null ? void 0 : _k.themes) ?? [];
|
|
500
|
-
const categories = {
|
|
501
|
-
ecoFriendly: !!tags.filter((t) => t.toUpperCase() === ECO_FRIENDLY_KEY || t.toUpperCase() === SUSTAINABLE_AG_KEY).length,
|
|
502
|
-
refugeesIdps: !!themes.filter((t) => t.toUpperCase() === REFUGEE_KEY).length,
|
|
503
|
-
singleParents: !!tags.filter((t) => t.toUpperCase() === SINGLE_PARENT_KEY).length
|
|
504
|
-
};
|
|
505
|
-
const isLseLoan = (_m = (_l = loan.value) == null ? void 0 : _l.partnerName) == null ? void 0 : _m.toUpperCase().includes(LSE_LOAN_KEY);
|
|
506
|
-
const tagsData = ((_n = loan.value) == null ? void 0 : _n.tagsData) ?? [];
|
|
507
|
-
const themesData = ((_o = loan.value) == null ? void 0 : _o.themesData) ?? [];
|
|
508
|
-
if (isLseLoan && tags.length) {
|
|
509
|
-
const position = Math.floor(Math.random() * tags.length);
|
|
510
|
-
const p1Tag = tags[position];
|
|
511
|
-
const tagData = findCalloutData(tagsData, p1Tag);
|
|
512
|
-
const id = (tagData == null ? void 0 : tagData.id) ?? null;
|
|
513
|
-
callouts.push({ label: p1Tag, type: "tag", id });
|
|
514
|
-
}
|
|
515
|
-
if (!categoryPageName.value) {
|
|
516
|
-
if (categories.ecoFriendly && !callouts.find((c) => c.label.toUpperCase() === ECO_FRIENDLY_KEY || c.label.toUpperCase() === SUSTAINABLE_AG_KEY)) {
|
|
517
|
-
callouts.push({ label: "Eco-friendly", type: "tag", id: 9 });
|
|
518
|
-
} else if (categories.refugeesIdps) {
|
|
519
|
-
callouts.push({ label: "Refugees and IDPs", type: "attribute", id: 28 });
|
|
520
|
-
} else if (categories.singleParents && !callouts.find((c) => c.label.toUpperCase() === SINGLE_PARENT_KEY)) {
|
|
521
|
-
callouts.push({ label: "Single Parent", type: "tag", id: 17 });
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
if (activityName && activityId && ((_p = categoryPageName.value) == null ? void 0 : _p.toUpperCase()) !== activityName.toUpperCase()) {
|
|
525
|
-
callouts.push({ id: activityId, label: activityName, type: "activity" });
|
|
526
|
-
}
|
|
527
|
-
if (sectorName && sectorId && activityName.toUpperCase() !== sectorName.toUpperCase() && sectorName.toUpperCase() !== ((_q = categoryPageName.value) == null ? void 0 : _q.toUpperCase()) && callouts.length < 2) {
|
|
528
|
-
callouts.push({ id: sectorId, label: sectorName, type: "sector" });
|
|
529
|
-
}
|
|
530
|
-
if (!!tags.length && callouts.length < 2) {
|
|
531
|
-
const position = Math.floor(Math.random() * tags.length);
|
|
532
|
-
const p4Tag = tags[position];
|
|
533
|
-
const tagData = findCalloutData(tagsData, p4Tag);
|
|
534
|
-
const id = (tagData == null ? void 0 : tagData.id) ?? null;
|
|
535
|
-
if (!callouts.filter((c) => c.label.toUpperCase() === p4Tag.toUpperCase()).length) {
|
|
536
|
-
callouts.push({ label: p4Tag, type: "tag", id });
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
if (!!themes.length && callouts.length < 2) {
|
|
540
|
-
const position = Math.floor(Math.random() * themes.length);
|
|
541
|
-
const theme = themes[position];
|
|
542
|
-
const themeData = findCalloutData(themesData, theme);
|
|
543
|
-
const id = (themeData == null ? void 0 : themeData.id) ?? null;
|
|
544
|
-
if (!callouts.filter((c) => c.label.toUpperCase() === theme.toUpperCase()).length && theme.toUpperCase() !== ((_r = categoryPageName.value) == null ? void 0 : _r.toUpperCase())) {
|
|
545
|
-
callouts.push({ label: theme, type: "attribute", id });
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
if (isLseLoan && callouts.length > 1)
|
|
549
|
-
return [callouts.shift()];
|
|
550
|
-
const customTags = ((_s = customCallouts.value) == null ? void 0 : _s.map((c) => ({ label: c }))) ?? [];
|
|
551
|
-
callouts.push(...customTags);
|
|
552
|
-
return callouts;
|
|
553
|
-
});
|
|
554
|
-
return {
|
|
555
|
-
tag,
|
|
556
|
-
readMorePath,
|
|
557
|
-
isLoading,
|
|
558
|
-
borrowerName,
|
|
559
|
-
countryName,
|
|
560
|
-
countryCode,
|
|
561
|
-
city,
|
|
562
|
-
state,
|
|
563
|
-
distributionModel,
|
|
564
|
-
imageHash,
|
|
565
|
-
hasProgressData,
|
|
566
|
-
allDataLoaded,
|
|
567
|
-
fundraisingPercent,
|
|
568
|
-
unreservedAmount,
|
|
569
|
-
formattedLocation,
|
|
570
|
-
loanUse,
|
|
571
|
-
loanStatus,
|
|
572
|
-
loanAmount,
|
|
573
|
-
loanBorrowerCount,
|
|
574
|
-
mdiMapMarker: import_js.mdiMapMarker,
|
|
575
|
-
loanCallouts
|
|
576
|
-
};
|
|
577
|
-
}
|
|
578
|
-
function loanCardMethods(props, emit) {
|
|
579
|
-
const {
|
|
580
|
-
loanId,
|
|
581
|
-
customLoanDetails,
|
|
582
|
-
kvTrackFunction
|
|
583
|
-
} = (0, import_vue_demi2.toRefs)(props);
|
|
584
|
-
function clickReadMore(target, event) {
|
|
585
|
-
kvTrackFunction.value("Lending", "click-Read more", target, loanId.value);
|
|
586
|
-
if (customLoanDetails.value) {
|
|
587
|
-
event.preventDefault();
|
|
588
|
-
emit("show-loan-details");
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
return {
|
|
592
|
-
clickReadMore
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
// utils/loanUtils.js
|
|
597
|
-
var import_numeral = __toESM(require("numeral"), 1);
|
|
598
|
-
var ERL_COOKIE_NAME = "kverlfivedollarnotes";
|
|
599
|
-
var TOP_UP_CAMPAIGN = "TOPUP-VB-BALANCE-MPV1";
|
|
600
|
-
var BASE_CAMPAIGN = "BASE-VB_BALANCE_MPV1";
|
|
601
|
-
var BALANCE_CAMPAIGN = "REPAYMENT-NOTIFICATION_BALANCE_MPV1";
|
|
602
|
-
var NO_BALANCE_CAMPAIGN = "REPAYMENT-NOTIFICATION_NO-BALANCE_MPV1";
|
|
603
|
-
function balanceCampaignOptions(val) {
|
|
604
|
-
if (val > 20)
|
|
605
|
-
return 25;
|
|
606
|
-
if (val > 15)
|
|
607
|
-
return 20;
|
|
608
|
-
if (val > 10)
|
|
609
|
-
return 15;
|
|
610
|
-
if (val > 5)
|
|
611
|
-
return 10;
|
|
612
|
-
return 5;
|
|
613
|
-
}
|
|
614
|
-
function isBetween25And50(unreservedAmount) {
|
|
615
|
-
return unreservedAmount <= 50 && unreservedAmount > 25;
|
|
616
|
-
}
|
|
617
|
-
function isLessThan25(unreservedAmount) {
|
|
618
|
-
return unreservedAmount < 25 && unreservedAmount > 0;
|
|
619
|
-
}
|
|
620
|
-
function getLendCtaSelectedOption(getCookie, setCookie, enableFiveDollarsNotes, campaign, unreservedAmount, userBalance, fiveDollarsSelected) {
|
|
621
|
-
if (enableFiveDollarsNotes && fiveDollarsSelected) {
|
|
622
|
-
return "5";
|
|
623
|
-
}
|
|
624
|
-
if (enableFiveDollarsNotes && typeof userBalance !== "undefined") {
|
|
625
|
-
let currentCampaign = getCookie == null ? void 0 : getCookie(ERL_COOKIE_NAME);
|
|
626
|
-
if (campaign && typeof campaign === "string" && !currentCampaign) {
|
|
627
|
-
const expires = /* @__PURE__ */ new Date();
|
|
628
|
-
expires.setHours(expires.getHours() + 24);
|
|
629
|
-
const campaignToCheck = campaign.toUpperCase();
|
|
630
|
-
currentCampaign = campaignToCheck.includes(TOP_UP_CAMPAIGN) ? TOP_UP_CAMPAIGN : campaignToCheck.includes(BASE_CAMPAIGN) ? BASE_CAMPAIGN : campaignToCheck.includes(BALANCE_CAMPAIGN) ? BALANCE_CAMPAIGN : campaignToCheck.includes(NO_BALANCE_CAMPAIGN) ? NO_BALANCE_CAMPAIGN : "";
|
|
631
|
-
if (currentCampaign && setCookie) {
|
|
632
|
-
setCookie(ERL_COOKIE_NAME, currentCampaign, { expires });
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
if (currentCampaign) {
|
|
636
|
-
let val = Math.floor(userBalance / 5) * 5;
|
|
637
|
-
if (currentCampaign === BASE_CAMPAIGN) {
|
|
638
|
-
val = val === 0 ? 5 : val > 25 ? 25 : val;
|
|
639
|
-
return Number(val <= unreservedAmount ? val : unreservedAmount).toFixed();
|
|
640
|
-
}
|
|
641
|
-
if (currentCampaign === BALANCE_CAMPAIGN) {
|
|
642
|
-
val = balanceCampaignOptions(val);
|
|
643
|
-
return Number(val).toFixed();
|
|
644
|
-
}
|
|
645
|
-
return Number(unreservedAmount > 5 ? 5 : unreservedAmount).toFixed();
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
if (isBetween25And50(unreservedAmount) || isLessThan25(unreservedAmount)) {
|
|
649
|
-
return Number(unreservedAmount).toFixed();
|
|
650
|
-
}
|
|
651
|
-
return "25";
|
|
652
|
-
}
|
|
653
|
-
function buildHugePriceArray(amountLeft) {
|
|
654
|
-
const priceArray = [];
|
|
655
|
-
let minAmount = 100;
|
|
656
|
-
let limitAmount = amountLeft > 1e3 ? 1e3 : amountLeft;
|
|
657
|
-
let optionCount = limitAmount / minAmount;
|
|
658
|
-
for (let i = 1; i <= optionCount; i += 1) {
|
|
659
|
-
const price = minAmount * i + 500;
|
|
660
|
-
if (price > limitAmount)
|
|
661
|
-
break;
|
|
662
|
-
priceArray.push((0, import_numeral.default)(price).format("0,0"));
|
|
663
|
-
}
|
|
664
|
-
minAmount = 1e3;
|
|
665
|
-
limitAmount = amountLeft > 1e4 ? 1e4 : amountLeft;
|
|
666
|
-
optionCount = limitAmount / minAmount;
|
|
667
|
-
for (let i = 1; i <= optionCount; i += 1) {
|
|
668
|
-
const price = minAmount * i + 1e3;
|
|
669
|
-
if (price > limitAmount)
|
|
670
|
-
break;
|
|
671
|
-
priceArray.push((0, import_numeral.default)(price).format("0,0"));
|
|
672
|
-
}
|
|
673
|
-
if (!priceArray.includes((0, import_numeral.default)(limitAmount).format("0,0"))) {
|
|
674
|
-
priceArray.push((0, import_numeral.default)(limitAmount).format("0,0"));
|
|
675
|
-
}
|
|
676
|
-
return priceArray;
|
|
677
|
-
}
|
|
678
|
-
function build5DollarsPriceArray(amountLeft) {
|
|
679
|
-
const limit5Notes = amountLeft < 50 ? amountLeft : 50;
|
|
680
|
-
const numberOf5 = limit5Notes / 5;
|
|
681
|
-
const numberOf25 = Math.ceil((amountLeft - limit5Notes) / 25) + 1;
|
|
682
|
-
const priceArray = [];
|
|
683
|
-
for (let i = 1; i <= numberOf5; i += 1) {
|
|
684
|
-
priceArray.push((0, import_numeral.default)(5 * i).format("0,0"));
|
|
685
|
-
}
|
|
686
|
-
if (amountLeft > limit5Notes) {
|
|
687
|
-
for (let i = 3; i <= numberOf25; i += 1) {
|
|
688
|
-
priceArray.push((0, import_numeral.default)(25 * i).format("0,0"));
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
return priceArray;
|
|
692
|
-
}
|
|
693
|
-
function buildPriceArray(amountLeft, minAmount) {
|
|
694
|
-
const optionCount = amountLeft / minAmount;
|
|
695
|
-
const priceArray = [];
|
|
696
|
-
for (let i = 1; i <= optionCount; i += 1) {
|
|
697
|
-
priceArray.push((0, import_numeral.default)(minAmount * i).format("0,0"));
|
|
698
|
-
}
|
|
699
|
-
return priceArray;
|
|
700
|
-
}
|
|
701
|
-
function getDropdownPriceArray(unreservedAmount, isCompleteLoanActive = false, minAmount = 25, enableFiveDollarsNotes = false, enableHugeAmount = false, isVisitor = true, inPfp = false) {
|
|
702
|
-
const parsedAmountLeft = parseFloat(unreservedAmount);
|
|
703
|
-
let priceArray = enableFiveDollarsNotes && !inPfp ? build5DollarsPriceArray(parsedAmountLeft).slice(0, 28) : buildPriceArray(parsedAmountLeft, minAmount).slice(0, 20);
|
|
704
|
-
if (enableHugeAmount && parsedAmountLeft > 500 && !isVisitor) {
|
|
705
|
-
const hugePriceArray = buildHugePriceArray(parsedAmountLeft);
|
|
706
|
-
priceArray = priceArray.concat(hugePriceArray);
|
|
707
|
-
}
|
|
708
|
-
if (isCompleteLoanActive && !priceArray.includes(Number(unreservedAmount).toFixed())) {
|
|
709
|
-
priceArray.push(Number(unreservedAmount).toFixed());
|
|
710
|
-
}
|
|
711
|
-
return priceArray;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
// utils/mapUtils.js
|
|
715
|
-
function getRandomInRange(from, to, fixed) {
|
|
716
|
-
return (Math.random() * (to - from) + from).toFixed(fixed) * 1;
|
|
717
|
-
}
|
|
718
|
-
var randomCoordinates = Array.from(
|
|
719
|
-
{ length: 20 },
|
|
720
|
-
() => [getRandomInRange(-180, 180, 3), getRandomInRange(-90, 90, 3)]
|
|
721
|
-
);
|
|
722
|
-
var mapColors = [
|
|
723
|
-
100,
|
|
724
|
-
300,
|
|
725
|
-
500,
|
|
726
|
-
650,
|
|
727
|
-
800,
|
|
728
|
-
1e3
|
|
729
|
-
];
|
|
730
|
-
function getCoordinatesBetween(startCoordinates, endCoordinates, numberOfSteps) {
|
|
731
|
-
if (!startCoordinates || !endCoordinates || !numberOfSteps || numberOfSteps < 1 || !Array.isArray(startCoordinates) || !Array.isArray(endCoordinates) || startCoordinates.length !== 2 || endCoordinates.length !== 2) {
|
|
732
|
-
return [];
|
|
733
|
-
}
|
|
734
|
-
const diffX = endCoordinates[0] - startCoordinates[0];
|
|
735
|
-
const diffY = endCoordinates[1] - startCoordinates[1];
|
|
736
|
-
const sfX = diffX / numberOfSteps;
|
|
737
|
-
const sfY = diffY / numberOfSteps;
|
|
738
|
-
let i = 0;
|
|
739
|
-
let j = 0;
|
|
740
|
-
const lineCoordinates = [];
|
|
741
|
-
while (Math.abs(i) < Math.abs(diffX) || Math.abs(j) < Math.abs(diffY)) {
|
|
742
|
-
lineCoordinates.push([startCoordinates[0] + i, startCoordinates[1] + j]);
|
|
743
|
-
if (Math.abs(i) < Math.abs(diffX)) {
|
|
744
|
-
i += sfX;
|
|
745
|
-
}
|
|
746
|
-
if (Math.abs(j) < Math.abs(diffY)) {
|
|
747
|
-
j += sfY;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
lineCoordinates[lineCoordinates.length - 1] = [endCoordinates[0], endCoordinates[1]];
|
|
751
|
-
return lineCoordinates;
|
|
752
|
-
}
|
|
753
|
-
function animateLines(mapInstance, originPoints, endPoint) {
|
|
754
|
-
const speedFactor = 100;
|
|
755
|
-
return new Promise((resolve) => {
|
|
756
|
-
mapInstance.addSource("endpoint", {
|
|
757
|
-
type: "geojson",
|
|
758
|
-
data: {
|
|
759
|
-
type: "Point",
|
|
760
|
-
coordinates: [
|
|
761
|
-
endPoint[0],
|
|
762
|
-
endPoint[1]
|
|
763
|
-
]
|
|
764
|
-
}
|
|
765
|
-
});
|
|
766
|
-
const lineFlight = (startCoordinates, endCoordinates, index, lastLine = false) => {
|
|
767
|
-
const lineCoordinates = getCoordinatesBetween(startCoordinates, endCoordinates, speedFactor);
|
|
768
|
-
let animationCounter = 0;
|
|
769
|
-
const geojson = {
|
|
770
|
-
type: "FeatureCollection",
|
|
771
|
-
features: [{
|
|
772
|
-
type: "Feature",
|
|
773
|
-
geometry: {
|
|
774
|
-
type: "LineString",
|
|
775
|
-
coordinates: []
|
|
776
|
-
}
|
|
777
|
-
}]
|
|
778
|
-
};
|
|
779
|
-
mapInstance.addSource(`startPoint${index}`, {
|
|
780
|
-
type: "geojson",
|
|
781
|
-
data: {
|
|
782
|
-
type: "Point",
|
|
783
|
-
coordinates: [
|
|
784
|
-
startCoordinates[0],
|
|
785
|
-
startCoordinates[1]
|
|
786
|
-
]
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
mapInstance.addLayer({
|
|
790
|
-
id: `line-animation${index}`,
|
|
791
|
-
type: "line",
|
|
792
|
-
source: {
|
|
793
|
-
type: "geojson",
|
|
794
|
-
data: geojson
|
|
795
|
-
},
|
|
796
|
-
layout: {
|
|
797
|
-
"line-cap": "round",
|
|
798
|
-
"line-join": "round"
|
|
799
|
-
},
|
|
800
|
-
paint: {
|
|
801
|
-
"line-color": "#277056",
|
|
802
|
-
"line-width": 2
|
|
803
|
-
}
|
|
804
|
-
});
|
|
805
|
-
const animateLine = () => {
|
|
806
|
-
if (animationCounter < lineCoordinates.length) {
|
|
807
|
-
geojson.features[0].geometry.coordinates.push(lineCoordinates[animationCounter]);
|
|
808
|
-
mapInstance.getSource(`line-animation${index}`).setData(geojson);
|
|
809
|
-
requestAnimationFrame(animateLine);
|
|
810
|
-
animationCounter += 1;
|
|
811
|
-
} else {
|
|
812
|
-
const coord = geojson.features[0].geometry.coordinates;
|
|
813
|
-
coord.shift();
|
|
814
|
-
coord.shift();
|
|
815
|
-
if (coord.length > 0) {
|
|
816
|
-
geojson.features[0].geometry.coordinates = coord;
|
|
817
|
-
mapInstance.getSource(`line-animation${index}`).setData(geojson);
|
|
818
|
-
requestAnimationFrame(animateLine);
|
|
819
|
-
} else {
|
|
820
|
-
mapInstance.removeLayer(`line-animation${index}`);
|
|
821
|
-
mapInstance.removeSource(`line-animation${index}`);
|
|
822
|
-
mapInstance.removeSource(`startPoint${index}`);
|
|
823
|
-
if (lastLine) {
|
|
824
|
-
mapInstance.removeSource("endpoint");
|
|
825
|
-
resolve();
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
};
|
|
830
|
-
animateLine();
|
|
831
|
-
};
|
|
832
|
-
originPoints.forEach((coordinate, index) => {
|
|
833
|
-
lineFlight(coordinate, endPoint, index, index === originPoints.length - 1);
|
|
834
|
-
});
|
|
835
|
-
});
|
|
836
|
-
}
|
|
837
|
-
function generateMapMarkers(mapInstance, borrowerPoints) {
|
|
838
|
-
const geojson = {
|
|
839
|
-
type: "FeatureCollection"
|
|
840
|
-
};
|
|
841
|
-
geojson.features = borrowerPoints.map((borrower) => ({
|
|
842
|
-
type: "Feature",
|
|
843
|
-
properties: {
|
|
844
|
-
message: "test",
|
|
845
|
-
image: borrower.image,
|
|
846
|
-
iconSize: [80, 80]
|
|
847
|
-
},
|
|
848
|
-
geometry: {
|
|
849
|
-
type: "Point",
|
|
850
|
-
coordinates: borrower.location
|
|
851
|
-
}
|
|
852
|
-
}));
|
|
853
|
-
geojson.features.forEach((marker) => {
|
|
854
|
-
const el = document.createElement("div");
|
|
855
|
-
el.className = "map-marker";
|
|
856
|
-
el.style.backgroundImage = `url(${marker.properties.image})`;
|
|
857
|
-
el.style.width = `${marker.properties.iconSize[0]}px`;
|
|
858
|
-
el.style.height = `${marker.properties.iconSize[1]}px`;
|
|
859
|
-
new maplibregl.Marker({ element: el }).setLngLat(marker.geometry.coordinates).addTo(mapInstance);
|
|
860
|
-
});
|
|
861
|
-
}
|
|
862
|
-
function animationCoordinator(mapInstance, borrowerPoints) {
|
|
863
|
-
return new Promise((resolve) => {
|
|
864
|
-
const destinationPoints = borrowerPoints.map((borrower) => borrower.location);
|
|
865
|
-
const totalNumberOfPoints = destinationPoints.length;
|
|
866
|
-
let currentPointIndex = 0;
|
|
867
|
-
const flyToPoint = (index) => {
|
|
868
|
-
mapInstance.flyTo({
|
|
869
|
-
// These options control the ending camera position: centered at
|
|
870
|
-
// the target, at zoom level 9, and north up.
|
|
871
|
-
center: destinationPoints[index],
|
|
872
|
-
zoom: 4,
|
|
873
|
-
bearing: 0,
|
|
874
|
-
// These options control the flight curve, making it move
|
|
875
|
-
// slowly and zoom out almost completely before starting
|
|
876
|
-
// to pan.
|
|
877
|
-
speed: 0.9,
|
|
878
|
-
// make the flying slow
|
|
879
|
-
curve: 1,
|
|
880
|
-
// change the speed at which it zooms out
|
|
881
|
-
// This can be any easing function: it takes a number between
|
|
882
|
-
// 0 and 1 and returns another number between 0 and 1.
|
|
883
|
-
easing(t) {
|
|
884
|
-
return t;
|
|
885
|
-
},
|
|
886
|
-
// this animation is considered essential with respect to prefers-reduced-motion
|
|
887
|
-
essential: true
|
|
888
|
-
}, { flyEnd: true });
|
|
889
|
-
};
|
|
890
|
-
mapInstance.on("moveend", (event) => {
|
|
891
|
-
if (event.flyEnd === true) {
|
|
892
|
-
animateLines(mapInstance, randomCoordinates, destinationPoints[currentPointIndex]).then(() => {
|
|
893
|
-
if (currentPointIndex < totalNumberOfPoints - 1) {
|
|
894
|
-
currentPointIndex += 1;
|
|
895
|
-
flyToPoint(currentPointIndex);
|
|
896
|
-
} else {
|
|
897
|
-
resolve();
|
|
898
|
-
}
|
|
899
|
-
});
|
|
900
|
-
}
|
|
901
|
-
});
|
|
902
|
-
flyToPoint(currentPointIndex);
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
var getLoansIntervals = (min, max, nbIntervals) => {
|
|
906
|
-
const size = Math.floor((max - min) / nbIntervals);
|
|
907
|
-
const result = [];
|
|
908
|
-
if (size <= 0)
|
|
909
|
-
return [[min, max]];
|
|
910
|
-
for (let i = 0; i < nbIntervals; i += 1) {
|
|
911
|
-
let inf = min + i * size;
|
|
912
|
-
let sup = inf + size < max ? inf + size : max;
|
|
913
|
-
if (i > 0) {
|
|
914
|
-
inf += 1 * i;
|
|
915
|
-
sup += 1 * i;
|
|
916
|
-
}
|
|
917
|
-
if (i > 0 && sup > max) {
|
|
918
|
-
sup = max;
|
|
919
|
-
}
|
|
920
|
-
if (i === nbIntervals - 1) {
|
|
921
|
-
if (sup < max || sup > max)
|
|
922
|
-
sup = max;
|
|
923
|
-
}
|
|
924
|
-
result.push([inf, sup]);
|
|
925
|
-
if (sup >= max)
|
|
926
|
-
break;
|
|
927
|
-
}
|
|
928
|
-
return result;
|
|
929
|
-
};
|
|
930
|
-
var getCountryColor = (lenderLoans, countriesData, kvTokensPrimitives) => {
|
|
931
|
-
const loanCountsArray = [];
|
|
932
|
-
countriesData.forEach((country) => {
|
|
933
|
-
loanCountsArray.push(country.value);
|
|
934
|
-
});
|
|
935
|
-
const maxNumLoansToOneCountry = Math.max(...loanCountsArray);
|
|
936
|
-
const intervals = getLoansIntervals(1, maxNumLoansToOneCountry, 6);
|
|
937
|
-
if (intervals.length === 1) {
|
|
938
|
-
const [inf, sup] = intervals[0];
|
|
939
|
-
for (let i = 0; i < sup; i += 1) {
|
|
940
|
-
const loansNumber = i + 1;
|
|
941
|
-
if (lenderLoans && lenderLoans >= loansNumber && lenderLoans < loansNumber + 1) {
|
|
942
|
-
return kvTokensPrimitives.colors.brand[mapColors[i]];
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
} else {
|
|
946
|
-
for (let i = 0; i < intervals.length; i += 1) {
|
|
947
|
-
const [inf, sup] = intervals[i];
|
|
948
|
-
if (lenderLoans && lenderLoans >= inf && lenderLoans <= sup) {
|
|
949
|
-
return kvTokensPrimitives.colors.brand[mapColors[i]];
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
return kvTokensPrimitives.colors.gray[300];
|
|
954
|
-
};
|
|
955
|
-
|
|
956
|
-
// utils/printing.js
|
|
957
|
-
function lockPrintSingleEl(domNode) {
|
|
958
|
-
if (typeof window !== "undefined" && domNode) {
|
|
959
|
-
document.body.classList.add("print:tw-invisible", "print:tw-overflow-hidden");
|
|
960
|
-
domNode.classList.add("print:tw-visible", "print:tw-overflow-auto");
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
function unlockPrintSingleEl(domNode) {
|
|
964
|
-
if (typeof window !== "undefined" && domNode) {
|
|
965
|
-
document.body.classList.remove("print:tw-invisible", "print:tw-overflow-hidden");
|
|
966
|
-
domNode.classList.remove("print:tw-visible", "print:tw-overflow-auto");
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
// utils/scrollLock.js
|
|
971
|
-
function lockScroll() {
|
|
972
|
-
if (typeof window !== "undefined") {
|
|
973
|
-
document.body.style.overflow = "hidden";
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
function unlockScroll() {
|
|
977
|
-
if (typeof window !== "undefined") {
|
|
978
|
-
document.body.style.overflow = null;
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
function lockScrollSmallOnly() {
|
|
982
|
-
if (typeof window !== "undefined") {
|
|
983
|
-
document.body.classList.add("tw-overflow-hidden", "md:tw-overflow-auto");
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
function unlockScrollSmallOnly() {
|
|
987
|
-
if (typeof window !== "undefined") {
|
|
988
|
-
document.body.classList.remove("tw-overflow-hidden", "md:tw-overflow-auto");
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
// utils/index.js
|
|
993
|
-
__reExport(utils_exports, __toESM(require_themeUtils(), 1), module.exports);
|
|
994
|
-
|
|
995
|
-
// utils/touchEvents.js
|
|
996
|
-
function onBodyTouchstart(handler) {
|
|
997
|
-
[...document.body.children].forEach((child) => child.addEventListener("touchstart", handler));
|
|
998
|
-
}
|
|
999
|
-
function offBodyTouchstart(handler) {
|
|
1000
|
-
[...document.body.children].forEach((child) => child.removeEventListener("touchstart", handler));
|
|
1001
|
-
}
|
|
1002
|
-
function isTargetElement(event, elements) {
|
|
1003
|
-
const els = Array.isArray(elements) ? elements : [elements];
|
|
1004
|
-
for (let i = 0; i < els.length; i += 1) {
|
|
1005
|
-
if (els[i] === event.target || els[i].contains(event.target)) {
|
|
1006
|
-
return true;
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
return false;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
// utils/treemap.js
|
|
1013
|
-
var getMaximum = (array) => Math.max(...array);
|
|
1014
|
-
var getMinimum = (array) => Math.min(...array);
|
|
1015
|
-
var sumReducer = (acc, cur) => acc + cur;
|
|
1016
|
-
var roundValue = (number) => Math.max(Math.round(number * 100) / 100, 0);
|
|
1017
|
-
var validateArguments = ({ data, width, height }) => {
|
|
1018
|
-
if (!width || typeof width !== "number" || width < 0) {
|
|
1019
|
-
throw new Error("You need to specify the width of your treemap");
|
|
1020
|
-
}
|
|
1021
|
-
if (!height || typeof height !== "number" || height < 0) {
|
|
1022
|
-
throw new Error("You need to specify the height of your treemap");
|
|
1023
|
-
}
|
|
1024
|
-
if (!data || !Array.isArray(data) || data.length === 0 || !data.every((dataPoint) => Object.prototype.hasOwnProperty.call(dataPoint, "value") && typeof dataPoint.value === "number" && dataPoint.value >= 0 && !Number.isNaN(dataPoint.value))) {
|
|
1025
|
-
throw new Error("You data must be in this format [{ value: 1 }, { value: 2 }], 'value' being a positive number");
|
|
1026
|
-
}
|
|
1027
|
-
};
|
|
1028
|
-
function getTreemap({ data, width, height }) {
|
|
1029
|
-
let Rectangle = {};
|
|
1030
|
-
let initialData = [];
|
|
1031
|
-
function worstRatio(row, width2) {
|
|
1032
|
-
const sum = row.reduce(sumReducer, 0);
|
|
1033
|
-
const rowMax = getMaximum(row);
|
|
1034
|
-
const rowMin = getMinimum(row);
|
|
1035
|
-
return Math.max(width2 ** 2 * rowMax / sum ** 2, sum ** 2 / (width2 ** 2 * rowMin));
|
|
1036
|
-
}
|
|
1037
|
-
const getMinWidth = () => {
|
|
1038
|
-
if (Rectangle.totalHeight ** 2 > Rectangle.totalWidth ** 2) {
|
|
1039
|
-
return { value: Rectangle.totalWidth, vertical: false };
|
|
1040
|
-
}
|
|
1041
|
-
return { value: Rectangle.totalHeight, vertical: true };
|
|
1042
|
-
};
|
|
1043
|
-
const layoutRow = (row, width2, vertical) => {
|
|
1044
|
-
const rowHeight = row.reduce(sumReducer, 0) / width2;
|
|
1045
|
-
row.forEach((rowItem) => {
|
|
1046
|
-
const rowWidth = rowItem / rowHeight;
|
|
1047
|
-
const { xBeginning } = Rectangle;
|
|
1048
|
-
const { yBeginning } = Rectangle;
|
|
1049
|
-
let data2;
|
|
1050
|
-
if (vertical) {
|
|
1051
|
-
data2 = {
|
|
1052
|
-
x: xBeginning,
|
|
1053
|
-
y: yBeginning,
|
|
1054
|
-
width: rowHeight,
|
|
1055
|
-
height: rowWidth,
|
|
1056
|
-
data: initialData[Rectangle.data.length]
|
|
1057
|
-
};
|
|
1058
|
-
Rectangle.yBeginning += rowWidth;
|
|
1059
|
-
} else {
|
|
1060
|
-
data2 = {
|
|
1061
|
-
x: xBeginning,
|
|
1062
|
-
y: yBeginning,
|
|
1063
|
-
width: rowWidth,
|
|
1064
|
-
height: rowHeight,
|
|
1065
|
-
data: initialData[Rectangle.data.length]
|
|
1066
|
-
};
|
|
1067
|
-
Rectangle.xBeginning += rowWidth;
|
|
1068
|
-
}
|
|
1069
|
-
Rectangle.data.push(data2);
|
|
1070
|
-
});
|
|
1071
|
-
if (vertical) {
|
|
1072
|
-
Rectangle.xBeginning += rowHeight;
|
|
1073
|
-
Rectangle.yBeginning -= width2;
|
|
1074
|
-
Rectangle.totalWidth -= rowHeight;
|
|
1075
|
-
} else {
|
|
1076
|
-
Rectangle.xBeginning -= width2;
|
|
1077
|
-
Rectangle.yBeginning += rowHeight;
|
|
1078
|
-
Rectangle.totalHeight -= rowHeight;
|
|
1079
|
-
}
|
|
1080
|
-
};
|
|
1081
|
-
const layoutLastRow = (rows, children, width2) => {
|
|
1082
|
-
const { vertical } = getMinWidth();
|
|
1083
|
-
layoutRow(rows, width2, vertical);
|
|
1084
|
-
layoutRow(children, width2, vertical);
|
|
1085
|
-
};
|
|
1086
|
-
const squarify = (children, row, width2) => {
|
|
1087
|
-
if (children.length === 1) {
|
|
1088
|
-
return layoutLastRow(row, children, width2);
|
|
1089
|
-
}
|
|
1090
|
-
const rowWithChild = [...row, children[0]];
|
|
1091
|
-
if (row.length === 0 || worstRatio(row, width2) >= worstRatio(rowWithChild, width2)) {
|
|
1092
|
-
children.shift();
|
|
1093
|
-
return squarify(children, rowWithChild, width2);
|
|
1094
|
-
}
|
|
1095
|
-
layoutRow(row, width2, getMinWidth().vertical);
|
|
1096
|
-
return squarify(children, [], getMinWidth().value);
|
|
1097
|
-
};
|
|
1098
|
-
validateArguments({ data, width, height });
|
|
1099
|
-
Rectangle = {
|
|
1100
|
-
data: [],
|
|
1101
|
-
xBeginning: 0,
|
|
1102
|
-
yBeginning: 0,
|
|
1103
|
-
totalWidth: width,
|
|
1104
|
-
totalHeight: height
|
|
1105
|
-
};
|
|
1106
|
-
initialData = data;
|
|
1107
|
-
const totalValue = data.map((dataPoint) => dataPoint.value).reduce(sumReducer, 0);
|
|
1108
|
-
const dataScaled = data.map((dataPoint) => dataPoint.value * height * width / totalValue);
|
|
1109
|
-
squarify(dataScaled, [], getMinWidth().value);
|
|
1110
|
-
return Rectangle.data.map((dataPoint) => ({
|
|
1111
|
-
...dataPoint,
|
|
1112
|
-
x: roundValue(dataPoint.x),
|
|
1113
|
-
y: roundValue(dataPoint.y),
|
|
1114
|
-
width: roundValue(dataPoint.width),
|
|
1115
|
-
height: roundValue(dataPoint.height)
|
|
1116
|
-
}));
|
|
1117
|
-
}
|
|
1118
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1119
|
-
0 && (module.exports = {
|
|
1120
|
-
BALANCE_CAMPAIGN,
|
|
1121
|
-
BASE_CAMPAIGN,
|
|
1122
|
-
ERL_COOKIE_NAME,
|
|
1123
|
-
Mash,
|
|
1124
|
-
NO_BALANCE_CAMPAIGN,
|
|
1125
|
-
TOP_UP_CAMPAIGN,
|
|
1126
|
-
animationCoordinator,
|
|
1127
|
-
carouselUtil,
|
|
1128
|
-
collapse,
|
|
1129
|
-
expand,
|
|
1130
|
-
generateMapMarkers,
|
|
1131
|
-
getCoordinatesBetween,
|
|
1132
|
-
getCountryColor,
|
|
1133
|
-
getDropdownPriceArray,
|
|
1134
|
-
getLendCtaSelectedOption,
|
|
1135
|
-
getLoansIntervals,
|
|
1136
|
-
getTreemap,
|
|
1137
|
-
isBetween25And50,
|
|
1138
|
-
isLegacyPlaceholderAvatar,
|
|
1139
|
-
isLessThan25,
|
|
1140
|
-
isTargetElement,
|
|
1141
|
-
loanCardComputedProperties,
|
|
1142
|
-
loanCardMethods,
|
|
1143
|
-
lockPrintSingleEl,
|
|
1144
|
-
lockScroll,
|
|
1145
|
-
lockScrollSmallOnly,
|
|
1146
|
-
offBodyTouchstart,
|
|
1147
|
-
onBodyTouchstart,
|
|
1148
|
-
randomizedUserAvatarClass,
|
|
1149
|
-
throttle,
|
|
1150
|
-
unlockPrintSingleEl,
|
|
1151
|
-
unlockScroll,
|
|
1152
|
-
unlockScrollSmallOnly,
|
|
1153
|
-
useAttrs
|
|
1154
|
-
});
|