{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./webpack/utils/external_links.js","webpack:///./webpack/packs/landing.js","webpack:///./webpack/utils/env.js","webpack:///./webpack/utils/storage.js"],"names":["i","chunkIds","length","deferredModules","j","deferredModule","enumerable","get","getter","value","key","bind","module","Object","prototype","hasOwnProperty","call","object","property","jsonpArray","webpackJsonpCallback","getSignupUrl","language","env","WHITELABEL_BRAND","slice","COMMON_DASHBOARD_SIGNUP_FR","COMMON_DASHBOARD_SIGNUP_EN","scrollArticle","scrollValue","optionsTop","performanceTop","links","whiteBg","invertBg","optionsScreen","performanceScreen","wealthbarChart","prevArea","prevLine","isIE","navigator","userAgent","indexOf","appVersion","plan","schedule","min","max","fee","Number","MAX_VALUE","chartOptions","low","showArea","showLine","showPoint","fullWidth","chartPadding","top","right","bottom","left","axisX","offset","showGrid","showLabel","axisY","series","startSliderValues","ongoingSliderValues","currencyStyle","style","currency","minimumFractionDigits","setLanguage","el","rect","getBoundingClientRect","scrollLeft","window","pageXOffset","document","documentElement","scrollTop","pageYOffset","backgroundSet","screenScrollPosition","opacity","color","removeAttribute","canUseSticky","CSS","supports","checkScroll","element","container","elementHeight","scrollHeight","scrollContainer","phone","getElementById","matchMedia","matches","querySelector","height","innerHeight","position","width","setAttribute","calculateFeePercentage","assets","bracket","bracketIndex","sliderValue","elementId","values","sliderElement","valueElement","setValue","textContent","toLocaleString","updateCalculatorValues","savingsElement","wbValueElement","mfValueElement","planData","start","ongoing","realMonthlyRate","savingsPeriods","depositAmt","ageInMonths","data","wealthBarData","mutualFundData","wealthBarFund","mutualFund","fees","mutualFundFees","month","payments","savings","Math","floor","wealthBarValue","mutualFundValue","calculatePlanData","sliderListener","rangeName","eventTrigger","addEventListener","chartValues","chartData","name","update","setToggle","toggle","section","getAttribute","sectionHeight","endTransition","removeEventListener","expandSection","elementTransition","transition","requestAnimationFrame","collapseSection","setSignupLink","signupLinkEls","getElementsByClassName","signupLink","setPageLanguage","Transifex","live","translateTo","storage","setItem","Chartist","plugins","ctAnimate","chart","on","type","animate","d","begin","dur","from","stringify","path","clone","scale","translate","chartRect","to","easing","Svg","Easing","easeOutQuint","onload","nav","steamedHam","close","onReady","id","getItem","getElementsByTagName","body","overflow","Line","onresize","scroll","scrollPage","SESSION_EXPIRY","FEATURE_TOOLS","FEATURE_BLOG","FEATURE_FINANCIAL_PLANS","FEATURE_SUPPORT_URL","WHITELABEL_SHARE_INFO_WITH_ADVISOR","FLINKS_IFRAME_URL","dataEl","getElementsByName","assign","JSON","parse","error","process","CookieStore","item","cookie","match","pop","removeItem","BrowserStorage","localStorage","isLocalStorageNameSupported","testKey","e"],"mappings":"aACA,cAQA,IAPA,IAMA,IANA,OACA,OACA,OAIA,SACQA,EAAIC,EAASC,OAAQF,IAC7B,OACA,MACA,gBAEA,OAEA,WACA,4CACA,WAKA,IAFA,QAEA,UACA,YAOA,OAHA,sBAGA,IAEA,aAEA,IADA,MACA,IAAkBA,EAAIG,EAAgBD,OAAQF,IAAK,CAGnD,IAFA,WACA,KACA,IAAmBI,EAAIC,EAAeH,OAAQE,IAAK,CACnD,WACA,iBAEA,IACA,gBACA,eAGA,SAIA,SAKA,GACA,MAGA,KAGA,cAGA,QACA,oBAGA,YACA,IACA,KACA,YAUA,OANA,mCAGA,OAGA,UAKA,MAGA,MAGA,oBACA,UACA,2BAA2CE,YAAY,EAAMC,IAAKC,KAKlE,gBACA,iDACA,4CAAyDC,MAAO,WAEhE,sCAAkDA,OAAO,KAQzD,kBAEA,GADA,cACA,aACA,sDACA,0BAGA,GAFA,OACA,mCAA0CH,YAAY,EAAMG,MAAOA,IACnE,2DAAiH,OAAOA,EAAMC,IAAQC,KAAK,KAAMD,IACjJ,UAIA,gBACA,sBACA,WAA4B,OAAOE,EAAgB,SACnD,WAAkC,OAAOA,GAEzC,OADA,aACA,GAIA,kBAAuD,OAAOC,OAAOC,UAAUC,eAAeC,KAAKC,EAAQC,IAG3G,cAEA,kDACA,iBACA,SACA,YACA,YAAiBlB,EAAIm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1CgO,WAPqB,SAOV/N,GACT,OAAOsE,OAAO2J,aAAaF,WAAW/N,KAI1BkO,IArChB,WACE,IAAMC,EAAU,gCAChB,IACE,IAAM7D,EAAUhG,OAAO2J,aAGvB,OAFA3D,EAAQC,QAAQ4D,EAAS,KACzB7D,EAAQyD,WAAWI,IACZ,EACP,MAAOC,GACP,OAAO,GA6BKF,GAAgCF,EAAiBN","file":"js/landing-a43781be909a12b78b19.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t17: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([3099,37]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import env from './env';\n\nexport function getSignupUrl(language = 'en') {\n if (env.WHITELABEL_BRAND === 'wealthbar') {\n return (language && language.slice(0, 2) === 'fr') ? env.COMMON_DASHBOARD_SIGNUP_FR : env.COMMON_DASHBOARD_SIGNUP_EN;\n } else {\n return '/';\n }\n}\n\nexport default {\n getSignupUrl,\n};\n","/* eslint-disable */\nimport Chartist from 'chartist';\nimport storage from '../utils/storage';\nimport { getSignupUrl } from '../utils/external_links';\n\nconst isIE = navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0;\n\nconst plan = {\n age: 35,\n savings: 60000,\n monthlyContribution: 500,\n retirementAge: 65,\n interestRate: 0.070,\n inflationRate: 0.020,\n};\n\nconst wealthBarMER = 0.0025;\nconst mutualFundMER = 0.0193;\n\nconst schedule = [\n { min: 0, max: 5000, fee: 0 },\n { min: 5000, max: 150000, fee: 0.006 },\n { min: 150000, max: 500000, fee: 0.004 },\n { min: 500000, max: Number.MAX_VALUE, fee: 0.0035 },\n];\n\nconst chartOptions = {\n low: 0,\n showArea: true,\n showLine: true,\n showPoint: false,\n fullWidth: true,\n chartPadding: {\n top: 0,\n right: 0,\n bottom: 24,\n left: 0,\n },\n axisX: {\n offset: 0,\n showGrid: false,\n showLabel: false,\n },\n axisY: {\n offset: 0,\n showGrid: false,\n showLabel: false,\n },\n series: {\n 'wealthbar': {\n showLine: false,\n },\n 'mutualfund': {\n showArea: false,\n },\n }\n};\n\nconst startSliderValues = [1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 55000, 60000, 65000, 70000, 75000, 80000, 85000, 90000, 95000, 100000, 125000, 150000, 175000, 200000, 225000, 250000, 275000, 300000, 325000, 350000, 375000, 400000, 425000, 450000, 475000, 500000, 525000, 550000, 575000, 600000, 625000, 650000, 675000, 700000, 725000, 750000, 775000, 800000, 825000, 850000, 875000, 900000, 925000, 950000, 975000, 1000000];\nconst ongoingSliderValues = [50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, 925, 950, 975, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250, 3500, 3750, 4000, 4250, 4500, 4750, 5000, 5250, 5500, 5750, 6000, 6250, 6500, 6750, 7000, 7250, 7500, 7750, 8000, 8250, 8500, 8750, 9000, 9250, 9500, 9750, 10000];\n\nconst currencyStyle = { style: 'currency', currency: 'CAD', minimumFractionDigits: 0 };\n\nlet setLanguage = 'en-CA';\n\nlet scrollArticle;\nlet scrollValue;\nlet optionsTop;\nlet performanceTop;\nlet links;\n\nlet whiteBg;\nlet invertBg;\nlet optionsScreen;\nlet performanceScreen;\n\nlet wealthbarChart;\nlet prevArea;\nlet prevLine;\n\n// ------ Scrolling effect functions ------ //\n\n// return element positioning\nfunction offset(el) {\n const rect = el.getBoundingClientRect();\n const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n\n return { top: rect.top + scrollTop, left: rect.left + scrollLeft };\n}\n\n// Change Background and phone screen based on scroll position\nfunction backgroundSet(screenScrollPosition) {\n if (screenScrollPosition < optionsTop) {\n whiteBg.style.opacity = 0;\n invertBg.style.opacity = 0;\n scrollArticle.style.color = '#303030';\n for (let i = 0; i < links.length; i++) { links[i].removeAttribute('style'); }\n } else if (screenScrollPosition >= optionsTop && screenScrollPosition < performanceTop) {\n whiteBg.style.opacity = 1;\n invertBg.style.opacity = 0;\n optionsScreen.style.opacity = 1;\n performanceScreen.style.opacity = 0;\n scrollArticle.style.color = '#303030';\n for (let i = 0; i < links.length; i++) { links[i].removeAttribute('style'); }\n } else if (screenScrollPosition >= performanceTop) {\n whiteBg.style.opacity = 1;\n invertBg.style.opacity = 0;\n optionsScreen.style.opacity = 0;\n performanceScreen.style.opacity = 1;\n scrollArticle.style.color = '#303030';\n for (let i = 0; i < links.length; i++) { links[i].removeAttribute('style'); }\n }\n}\n\nfunction setPage() {\n const screenScrollPosition = (window.pageYOffset || document.documentElement.scrollTop) + (window.innerHeight / 2);\n // remove background fallbacks\n const banner = document.getElementById('banner') || document.getElementById('header');\n banner.removeAttribute('class');\n document.getElementById('intro').removeAttribute('class');\n document.getElementById('main').removeAttribute('class');\n\n // setup scolling elements\n scrollArticle = document.getElementById('scroll-article');\n optionsTop = offset(document.getElementById('options')).top;\n performanceTop = offset(document.getElementById('performance')).top;\n links = scrollArticle.getElementsByTagName('a');\n whiteBg = document.getElementById('bg-white');\n invertBg = document.getElementById('bg-invert');\n\n // set phone screen elements\n optionsScreen = document.getElementById('scroll-phone-options');\n performanceScreen = document.getElementById('scroll-phone-performance');\n\n backgroundSet(screenScrollPosition);\n\n return true;\n}\n\n// Scroll fallback for no position:sticky support //\nfunction scrollElement(element, container) {\n const elementHeight = element.getBoundingClientRect().height;\n const scrollHeight = (window.innerHeight / 2) - (elementHeight / 2);\n const scrollContainer = container.getBoundingClientRect();\n\n // Check scrolling position\n if (scrollHeight < scrollContainer.top) {\n element.style.position = 'relative';\n element.style.top = '';\n element.style.left = '';\n element.style.width = scrollContainer.width + 'px';\n element.setAttribute('data-scroll', 'top');\n } else if (scrollHeight > scrollContainer.bottom - elementHeight) {\n element.style.position = 'relative';\n element.style.top = (scrollContainer.height - elementHeight) + 'px';\n element.style.left = '';\n element.style.width = scrollContainer.width + 'px';\n element.setAttribute('data-scroll', 'bottom');\n } else {\n element.style.position = 'fixed';\n element.style.top = scrollHeight + 'px';\n element.style.left = scrollContainer.left + 'px';\n element.style.width = scrollContainer.width + 'px';\n element.setAttribute('data-scroll', 'scroll');\n }\n}\n\n// checks browser support of position:sticky\nfunction canUseSticky() {\n return window.CSS && window.CSS.supports && (window.CSS.supports('position', 'sticky') || window.CSS.supports('position', '-webkit-sticky'));\n}\n\nfunction checkScroll() {\n const phone = document.getElementById('scroll-phone');\n if (window.matchMedia('(min-width: 48rem)').matches) {\n if (!canUseSticky()) {\n scrollElement(phone, document.querySelector('aside'));\n }\n return true;\n }\n phone.removeAttribute('style');\n return false;\n}\n\n// ------ Chart calculation functions ------ //\n\nfunction calculateFeePercentage(assets) {\n let bracket;\n for (let bracketIndex in schedule) {\n bracket = schedule[bracketIndex];\n if (assets <= bracket.max) {\n return bracket.fee;\n }\n }\n return bracket.fee;\n}\n\n// returns data to plot chart\nfunction calculatePlanData(start, ongoing) {\n const realRate = ((1 + plan.interestRate) / (1 + plan.inflationRate)) - 1;\n const realMonthlyRate = realRate / 12;\n const savingsPeriods = (plan.retirementAge - plan.age) * 12;\n const depositAmt = ongoing;\n const ageInMonths = plan.age * 12;\n const data = [];\n const wealthBarData = [];\n const mutualFundData = [];\n\n for (let i = 0; i <= savingsPeriods; i++) {\n if (i === 0) {\n data[i] = {\n wealthBarFund: start,\n mutualFund: start,\n fees: 0,\n mutualFundFees: 0,\n month: ageInMonths,\n payments: start,\n };\n wealthBarData[i] = start;\n mutualFundData[i] = start;\n } else {\n const fees = (data[i - 1].wealthBarFund / 12) * (calculateFeePercentage(data[i - 1].savings) + wealthBarMER);\n const mutualFundFees = (data[i - 1].mutualFund / 12) * mutualFundMER;\n data[i] = {\n wealthBarFund: Math.floor(((data[i - 1].wealthBarFund + depositAmt) - fees) * (1 + realMonthlyRate)),\n mutualFund: Math.floor(((data[i - 1].mutualFund + depositAmt) - mutualFundFees) * (1 + realMonthlyRate)),\n fees: fees,\n mutualFundFees: mutualFundFees,\n month: i + ageInMonths,\n payments: depositAmt,\n };\n wealthBarData[i] = data[i].wealthBarFund;\n mutualFundData[i] = data[i].mutualFund;\n }\n }\n return {\n wealthBarData: wealthBarData,\n wealthBarValue: data[data.length - 1].wealthBarFund,\n mutualFundData: mutualFundData,\n mutualFundValue: data[data.length - 1].mutualFund,\n };\n}\n\n// return slider value based on position\nfunction sliderValue(elementId, values) {\n const sliderElement = document.getElementById(elementId);\n const valueElement = document.getElementById(elementId + '-value');\n const setValue = values[sliderElement.value];\n\n sliderElement.setAttribute('max', values.length - 1);\n valueElement.textContent = setValue.toLocaleString(setLanguage, currencyStyle);\n\n return setValue;\n}\n\n// update values in calculator\nfunction updateCalculatorValues() {\n const savingsElement = document.getElementById('savings-value');\n const wbValueElement = document.getElementById('chart-wealthbar-value');\n const mfValueElement = document.getElementById('chart-mutualfund-value');\n\n const startValue = sliderValue('start-range', startSliderValues);\n const ongoingValue = sliderValue('ongoing-range', ongoingSliderValues);\n const planData = calculatePlanData(startValue, ongoingValue);\n\n savingsElement.textContent = (planData.wealthBarValue - planData.mutualFundValue).toLocaleString(setLanguage, currencyStyle);\n wbValueElement.textContent = planData.wealthBarValue.toLocaleString(setLanguage, currencyStyle);\n mfValueElement.textContent = planData.mutualFundValue.toLocaleString(setLanguage, currencyStyle);\n\n return planData;\n}\n\nfunction sliderListener(rangeName) {\n const eventTrigger = isIE ? 'change' : 'input';\n document.getElementById(rangeName).addEventListener(eventTrigger, function () {\n const chartValues = updateCalculatorValues();\n if (isIE) {\n const chartData = {\n series: [\n {\n name: 'wealthbar',\n data: chartValues.wealthBarData,\n },\n {\n name: 'mutualfund',\n data: chartValues.mutualFundData,\n }]\n };\n wealthbarChart.update(chartData);\n }\n // const chartData = { series: [chartValues.wealthBarData, chartValues.mutualFundData] };\n // wealthbarChart.update(chartData);\n });\n if (!isIE) {\n document.getElementById(rangeName).addEventListener('change', function () {\n const chartValues = updateCalculatorValues();\n const chartData = {\n series: [\n {\n name: 'wealthbar',\n data: chartValues.wealthBarData,\n },\n {\n name: 'mutualfund',\n data: chartValues.mutualFundData,\n }]\n };\n wealthbarChart.update(chartData);\n });\n }\n}\n\n\n// Chartist Animation\nChartist.plugins = Chartist.plugins || {};\nChartist.plugins.ctAnimate = function () {\n return function ctAnimate(chart) {\n chart.on('draw', function (data) {\n if (data.type === 'area') {\n data.element.animate({\n d: {\n begin: 0,\n dur: 1000,\n from: prevArea ? prevArea.stringify() : data.path.clone().scale(1, 0).translate(1, data.chartRect.height()).stringify(),\n to: data.path.stringify(),\n easing: Chartist.Svg.Easing.easeOutQuint,\n },\n });\n prevArea = data.path;\n }\n if (data.type === 'line') {\n data.element.animate({\n d: {\n begin: 0,\n dur: 1000,\n from: prevLine ? prevLine.stringify() : data.path.clone().scale(1, 0).translate(1, data.chartRect.height()).stringify(),\n to: data.path.stringify(),\n easing: Chartist.Svg.Easing.easeOutQuint,\n },\n });\n prevLine = data.path;\n }\n });\n };\n};\n\n// ------ Toggle Section functions ------ //\n\nfunction expandSection(element) {\n const sectionHeight = element.scrollHeight;\n element.style.height = sectionHeight + 'px';\n element.addEventListener('transitionend', function endTransition() {\n element.removeEventListener('transitionend', endTransition);\n element.style.height = null;\n });\n element.setAttribute('data-collapsed', 'false');\n}\n\nfunction collapseSection(element) {\n const sectionHeight = element.scrollHeight;\n const elementTransition = element.style.transition;\n element.style.transition = '';\n requestAnimationFrame(function () {\n element.style.height = sectionHeight + 'px';\n element.style.transition = elementTransition;\n requestAnimationFrame(function () {\n element.style.height = 0 + 'px';\n });\n });\n element.setAttribute('data-collapsed', 'true');\n}\n\nfunction setToggle(element) {\n const toggle = document.getElementById(element);\n const section = document.getElementById(toggle.getAttribute('data-toggle'));\n section.style.height = 0 + 'px';\n section.setAttribute('data-collapsed', 'true');\n toggle.addEventListener('click', function () {\n if (section.getAttribute('data-collapsed') === 'true') {\n expandSection(section);\n toggle.setAttribute('data-collapsed', 'false');\n } else {\n collapseSection(section);\n toggle.setAttribute('data-collapsed', 'true');\n }\n });\n}\n\n// set toggle specifically for Nav Menu\nfunction setNavigationToggle() {\n const nav = document.getElementById('banner') || document.getElementById('header');\n const toggle = document.getElementById('nav-dropdown-toggle');\n const steamedHam = document.getElementById('hamburger');\n const close = document.getElementById('close');\n toggle.addEventListener('click', function () {\n const isCollapsed = nav.getAttribute('data-collapsed') === 'true';\n if (isCollapsed) {\n nav.setAttribute('data-collapsed', 'false');\n nav.style.position = 'fixed';\n steamedHam.style.opacity = 0;\n close.style.opacity = 1;\n document.body.style.height = '0px';\n document.body.style.overflow = 'hidden';\n } else {\n nav.setAttribute('data-collapsed', 'true');\n nav.style.position = 'relative';\n steamedHam.style.opacity = 1;\n close.style.opacity = 0;\n document.body.removeAttribute('style');\n }\n });\n}\n\n// ------ Page Link functions ------ //\n\nfunction setSignupLink() {\n const signupLinkEls = document.getElementsByClassName('signup-link');\n for (const el of signupLinkEls) {\n const signupLink = getSignupUrl(setLanguage);\n el.setAttribute('href', signupLink);\n }\n}\n\n// ------ Language Functions ------ //\n\nfunction setPageLanguage(language) {\n if (language === 'fr-CA') {\n setLanguage = 'fr-CA';\n window.Transifex.live.translateTo('fr_CA', true);\n document.getElementById('header-image').setAttribute('src', ' /home/header-fr.png');\n document.getElementById('header-mobile').setAttribute('srcset', ' /home/header-fr.png 2x');\n document.getElementById('header-large').setAttribute('srcset', ' /home/header-fr-2x.png 2x');\n document.getElementById('lang-fr').setAttribute('data-active', true);\n document.getElementById('lang-en').removeAttribute('data-active');\n document.getElementById('screen-portfolio').setAttribute('xlink:href', 'home/iphonex-portfolio-fr-2x.png');\n document.getElementById('screen-dashboard').setAttribute('xlink:href', 'home/iphonex-dashboard-fr-2x.png');\n document.getElementById('translate-investment').setAttribute('src', '/home/robo-invest-fr-2x.png');\n storage.setItem('language', 'french');\n } else {\n setLanguage = 'en-CA';\n window.Transifex.live.translateTo('en', true);\n document.getElementById('header-image').setAttribute('src', ' /home/header-en.png');\n document.getElementById('header-mobile').setAttribute('srcset', ' /home/header-en.png 2x');\n document.getElementById('header-large').setAttribute('srcset', ' /home/header-en-2x.png 2x');\n document.getElementById('lang-en').setAttribute('data-active', true);\n document.getElementById('lang-fr').removeAttribute('data-active');\n document.getElementById('screen-portfolio').setAttribute('xlink:href', 'home/iphonex-portfolio-en-2x.png');\n document.getElementById('screen-dashboard').setAttribute('xlink:href', 'home/iphonex-dashboard-en-2x.png');\n document.getElementById('translate-investment').setAttribute('src', '/home/robo-invest-en-2x.png');\n storage.setItem('language', 'english');\n }\n sliderValue('start-range', startSliderValues);\n sliderValue('ongoing-range', ongoingSliderValues);\n}\n\nfunction checkLanguage() {\n if (storage.getItem('language')) {\n if (storage.getItem('language') === 'french') {\n setPageLanguage('fr-CA');\n } else {\n setPageLanguage('en-CA');\n }\n } else if (navigator.language === 'fr-CA' || navigator.language === 'fr') {\n setPageLanguage('fr-CA');\n } else {\n setPageLanguage('en-CA');\n }\n}\n\nfunction setLanguageToggle(id) {\n document.getElementById(id).addEventListener('click', function () {\n if (setLanguage === 'fr-CA') {\n setPageLanguage('en-CA');\n } else {\n setPageLanguage('fr-CA');\n }\n updateCalculatorValues();\n setSignupLink();\n });\n}\n\n// ------ JS Load setup ------ //\n\nwindow.onload = function () {\n window.Transifex.live.onReady(function () {\n checkLanguage();\n setLanguageToggle('language-toggle');\n });\n\n setPage();\n checkScroll();\n setNavigationToggle();\n setToggle('calc-toggle');\n setSignupLink();\n\n const chartValues = updateCalculatorValues();\n const chartData = {\n series: [{\n name: 'wealthbar',\n data: chartValues.wealthBarData,\n },\n {\n name: 'mutualfund',\n data: chartValues.mutualFundData,\n }]\n };\n chartOptions.plugins = [Chartist.plugins.ctAnimate()];\n wealthbarChart = new Chartist.Line('#wb-chart', chartData, chartOptions);\n\n sliderListener('start-range');\n sliderListener('ongoing-range');\n};\n\n// ------ JS resize setup ------ //\n\nwindow.onresize = function () {\n if (!canUseSticky()) {\n // adjust phone position on resize\n const phone = document.getElementById('scroll-phone');\n const scrollContainer = document.querySelector('aside').getBoundingClientRect();\n phone.style.width = scrollContainer.width + 'px';\n const scroll = phone.getAttribute('data-scroll');\n if (scroll === 'scroll') {\n phone.style.left = scrollContainer.left + 'px';\n } else if (scroll === 'bottom') {\n phone.style.top = (scrollContainer.height - phone.getBoundingClientRect().height) + 'px';\n }\n }\n if (window.matchMedia('(min-width: 48rem)').matches) {\n //unset navToggle styles\n document.body.removeAttribute('style');\n }\n};\n\n// ------ JS scrolling setup ------ //\n\nwindow.addEventListener('scroll', function () {\n const scrollPage = window.pageYOffset || document.documentElement.scrollTop;\n let screenScrollPosition;\n\n // Adjust fade position when scrolling up or down\n if (scrollValue > scrollPage) {\n screenScrollPosition = scrollPage + (window.innerHeight / 4);\n } else {\n screenScrollPosition = scrollPage + (window.innerHeight / 2);\n }\n scrollValue = scrollPage;\n\n backgroundSet(screenScrollPosition);\n checkScroll();\n});\n","// Set ENV defaults\nconst env = {\n SESSION_EXPIRY: 30,\n FEATURE_TOOLS: true,\n FEATURE_BLOG: true,\n FEATURE_FINANCIAL_PLANS: true,\n FEATURE_SUPPORT_URL: 'https://help.cidirectinvesting.com',\n WHITELABEL_BRAND: 'wealthbar',\n WHITELABEL_SHARE_INFO_WITH_ADVISOR: false,\n FLINKS_IFRAME_URL: 'https://wealthbar-dev-iframe.private.fin.ag/v2/?demo=true&consentEnable=true&accountSelectorEnable=true&accountSelectorMultiple=true&customerName=WealthBar',\n};\n\nconst dataEl = document.getElementsByName('wealthbar-env')[0]\nif (dataEl) {\n try {\n const data = dataEl.getAttribute('data');\n Object.assign(env, JSON.parse(data));\n } catch (error) {\n // continue regardless of error\n }\n}\n\nwindow.process = { env };\n\nexport default env;\n","// An abstraction around session/local storage\n//\n// If session/local storage is available then we use on of this. If the uses has\n// asked to be \"remembered\" then we choose localStorage. If these are not\n// available we use an InProcStore which will only persist until another page\n// load happens.\n\nfunction isLocalStorageNameSupported() {\n const testKey = 'testLocalStorageNameSupported';\n try {\n const storage = window.localStorage;\n storage.setItem(testKey, '1');\n storage.removeItem(testKey);\n return true;\n } catch (e) {\n return false;\n }\n}\n\nconst CookieStore = {\n getItem(key) {\n const item = document.cookie.match(`(^|;)\\\\s*${key}\\\\s*=\\\\s*([^;]+)`);\n return item ? item.pop() : null;\n },\n setItem(key, value) {\n document.cookie = `${key}=${value}`;\n },\n removeItem(key) {\n document.cookie = `${key}=`;\n },\n};\n\nconst BrowserStorage = {\n getItem(key) {\n return window.localStorage.getItem(key);\n },\n setItem(key, value) {\n return window.localStorage.setItem(key, value);\n },\n removeItem(key) {\n return window.localStorage.removeItem(key);\n },\n};\n\nexport default (isLocalStorageNameSupported() ? BrowserStorage : CookieStore);\n"],"sourceRoot":""}