{"version":3,"sources":["webpack:///./src/shared/utilities/getUrlParams.js","webpack:///./src/shared/utilities/screenSize.js","webpack:///./node_modules/process/browser.js","webpack:///./src/components/templates/dcf-manager/dcf-manager.js","webpack:///./src/shared/utilities/debounce.js","webpack:///./src/shared/utilities/pubsub.js","webpack:///./src/framework/base/base.js","webpack:///./src/shared/utilities/case.ts","webpack:///./src/shared/utilities/id.ts"],"names":["getUrlParams","url","arguments","length","undefined","window","location","search","test","slice","split","reduce","params","param","_param$split2","_slicedToArray","key","value","decodeURIComponent","replace","getLowerCaseUrlParams","casedParams","Object","keys","acc","val","_objectSpread","_defineProperty","toLowerCase","defaultWidths","sm","md","lg","xl","getBreakpoint","getComputedStyle","document","querySelector","getPropertyValue","screenSmallerThan","size","widths","prototype","hasOwnProperty","call","Error","concat","join","innerWidth","screenGreatOrEqualTo","cachedSetTimeout","cachedClearTimeout","process","module","exports","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","e","this","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","args","Array","i","push","apply","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","name","binding","cwd","chdir","dir","umask","classes","DCFManager","_BaseBehavior","element","_this","closeBtn","_classCallCheck","_callSuper","initDomCache","columnFull","getElementById","getAttribute","columnHide","fullWidth","addEventListeners","exiturl","addEventListener","preventDefault","href","_inherits","_this2","detail","isFullWidth","updateWidth","removeEventListener","classList","add","remove","removeEventListeners","BaseBehavior","debounce","func","wait","immediate","_len","_key","later","callNow","pubsub","PubSub","subscriptions","topic","_step","_iterator","_createForOfIteratorHelper","s","n","done","fn","err","f","forEach","index","splice","state","events","behaviorName","camelCaseToDashCase","instanceId","generateId","attachInstanceId","partialState","setAttribute","removeAttribute","dom","from","querySelectorAll","filter","el","closest","ref","dashCaseToCamelCase","console","error","_this3","delay","breakpoint","publish","debouncedGetBreakpoint","newBreakPoint","event","useCapture","obj","subscribe","unsubscribe","navigation","getBoundingClientRect","bottom","scrollY","scroll","reason","promise","log","str","x","chr","toUpperCase","alphabet","id","charAt","Math","floor","random"],"mappings":"gzEAAO,SAASA,IAA2C,IAA9BC,EAAGC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGG,OAAOC,SAASC,OAClD,OAAKN,GAIG,QAAQO,KAAKP,GAAOA,EAAIQ,MAAM,GAAKR,GAAKS,MAAM,KAAKC,QAAO,SAACC,EAAQC,GAC1E,IAAqCC,EAAAC,EAAhBF,EAAMH,MAAM,KAAI,GAA9BM,EAAGF,EAAA,GAAEG,EAAKH,EAAA,GAIjB,MAHY,KAARE,IACHJ,EAAOI,GAAOC,EAAQC,mBAAmBD,EAAME,QAAQ,MAAO,MAAQ,IAEhEP,IACL,IATK,GAYF,SAASQ,IAAoD,IAA9BnB,EAAGC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGG,OAAOC,SAASC,OACrDc,EAAcrB,EAAaC,GAEjC,OAAOqB,OAAOC,KAAKF,GAAaV,QAC/B,SAACa,EAAKC,GAAG,OAAAC,IAAA,GACLF,GAAG,GAAAG,EAAA,GACLF,EAAIG,cAAgBP,EAAYI,OAElC,I,sGCtBF,sGAAO,IAAMI,EAAgB,CAC5BC,GAAI,IACJC,GAAI,KACJC,GAAI,KACJC,GAAI,MAIQC,EAAgB,WAAH,OACzB7B,OACE8B,iBAAiBC,SAASC,cAAc,QAAS,WACjDC,iBAAiB,WACjBnB,QAAQ,KAAM,KAGV,SAASoB,EAAkBC,GAA8B,IAAxBC,EAAMvC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG2B,EAChD,IAAKP,OAAOoB,UAAUC,eAAeC,KAAKH,EAAQD,GACjD,MAAM,IAAIK,MAAM,wBAADC,OAAyBxB,OAAOC,KAAKkB,GAAQM,KAAK,QAElE,OAAO1C,OAAO2C,WA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/.test(url) ? url.slice(1) : url).split('&').reduce((params, param) => {\r\n\t\tconst [key, value] = param.split('=');\r\n\t\tif (key !== '') {\r\n\t\t\tparams[key] = value ? decodeURIComponent(value.replace(/\\+/g, ' ')) : '';\r\n\t\t}\r\n\t\treturn params;\r\n\t}, {});\r\n}\r\n\r\nexport function getLowerCaseUrlParams(url = window.location.search) {\r\n\tconst casedParams = getUrlParams(url);\r\n\r\n\treturn Object.keys(casedParams).reduce(\r\n\t\t(acc, val) => ({\r\n\t\t\t...acc,\r\n\t\t\t[val.toLowerCase()]: casedParams[val]\r\n\t\t}),\r\n\t\t{}\r\n\t);\r\n}\r\n","export const defaultWidths = {\r\n\tsm: 768,\r\n\tmd: 1024,\r\n\tlg: 1280,\r\n\txl: 1400\r\n};\r\n\r\n// getBreakpoint :: Void -> String\r\nexport const getBreakpoint = () =>\r\n\twindow\r\n\t\t.getComputedStyle(document.querySelector('body'), ':before')\r\n\t\t.getPropertyValue('content')\r\n\t\t.replace(/\"/g, '');\r\n\r\n// function :: String -> ?Object -> Boolean\r\nexport function screenSmallerThan(size, widths = defaultWidths) {\r\n\tif (!Object.prototype.hasOwnProperty.call(widths, size)) {\r\n\t\tthrow new Error(`size must be one of: ${Object.keys(widths).join(', ')}`);\r\n\t}\r\n\treturn window.innerWidth < widths[size];\r\n}\r\n\r\nexport function screenGreatOrEqualTo(size, widths = defaultWidths) {\r\n\tif (!Object.prototype.hasOwnProperty.call(widths, size)) {\r\n\t\tthrow new Error(`size must be one of: ${Object.keys(widths).join(', ')}`);\r\n\t}\r\n\treturn window.innerWidth >= widths[size];\r\n}\r\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import BaseBehavior from '../../../framework/base/base';\r\nimport { getLowerCaseUrlParams } from '../../../shared/utilities/getUrlParams';\r\n\r\nconst classes = {\r\n\tcolumn_full: 'v2-dcf-openaccount__content-item--full',\r\n\tcolumn_hide: 'v2-dcf-openaccount__content-item--hide',\r\n\tdcf_background: 'v2-bg--dcf-background'\r\n};\r\n\r\nconst overrideCloseButton = () => {\r\n\tconst closeBtn = document.querySelector('.v2-dcf-openaccount__close');\r\n\tconst params = getLowerCaseUrlParams();\r\n\r\n\tif (closeBtn && params.exiturl) {\r\n\t\tcloseBtn.addEventListener('click', e => {\r\n\t\t\te.preventDefault();\r\n\t\t\twindow.location.href = params.exiturl;\r\n\t\t});\r\n\t}\r\n};\r\nclass DCFManager extends BaseBehavior {\r\n\tconstructor(element) {\r\n\t\tsuper(element);\r\n\r\n\t\tthis.initDomCache();\r\n\r\n\t\tthis.columnFull = document.getElementById(this.element.getAttribute('data-target-full'));\r\n\t\tthis.columnHide = document.getElementById(this.element.getAttribute('data-target-hide'));\r\n\t\tthis.fullWidth = false;\r\n\r\n\t\tthis.addEventListeners();\r\n\r\n\t\toverrideCloseButton();\r\n\t}\r\n\r\n\taddEventListeners() {\r\n\t\tif (!this.columnFull || !this.columnHide) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.addEventListener(this.element, 'dcfLoaded', e => {\r\n\t\t\tthis.fullWidth = e.detail && e.detail.isFullWidth;\r\n\t\t\tthis.updateWidth();\r\n\t\t});\r\n\r\n\t\tthis.addEventListener(this.element, 'dcfStepChanged', e => {\r\n\t\t\tthis.fullWidth = e.detail && e.detail.isFullWidth;\r\n\t\t\tthis.updateWidth();\r\n\t\t});\r\n\r\n\t\tthis.addEventListener(window, 'resize', (/* e */) => {\r\n\t\t\tthis.updateWidth();\r\n\t\t});\r\n\r\n\t\t/*\r\n\t\tthis.addEventListener(this.element, 'dcfBackClicked', (e) => {\r\n\t\t});\r\n\t\tthis.addEventListener(this.element, 'dcfCloseClicked', (e) => {\r\n\t\t});\r\n\t\t*/\r\n\t}\r\n\r\n\tremoveEventListeners() {\r\n\t\tthis.removeEventListener(this.element, 'dcfLoaded');\r\n\t\tthis.removeEventListener(this.element, 'dcfStepChanged');\r\n\t\tthis.removeEventListener(window, 'resize');\r\n\t}\r\n\r\n\tupdateWidth() {\r\n\t\tif (this.fullWidth) {\r\n\t\t\tthis.columnFull.classList.add(classes.column_full);\r\n\t\t\tthis.columnHide.classList.add(classes.column_hide);\r\n\t\t\tthis.columnFull.classList.remove(classes.dcf_background);\r\n\t\t} else {\r\n\t\t\tthis.columnFull.classList.add(classes.dcf_background);\r\n\t\t\tthis.columnFull.classList.remove(classes.column_full);\r\n\t\t\tthis.columnHide.classList.remove(classes.column_hide);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanup() {\r\n\t\tthis.removeEventListeners();\r\n\t}\r\n}\r\n\r\nexport default DCFManager;\r\n","// debounce :: Function, Number, Bool -> (Any -> Void)\r\nexport function debounce(func, wait, immediate) {\r\n\tlet timeout;\r\n\treturn function debounced(...args) {\r\n\t\tconst later = () => {\r\n\t\t\ttimeout = null;\r\n\t\t\tif (!immediate) func(args);\r\n\t\t};\r\n\t\tconst callNow = immediate && !timeout;\r\n\t\tclearTimeout(timeout);\r\n\t\ttimeout = setTimeout(later, wait);\r\n\t\tif (callNow) func(args);\r\n\t};\r\n}\r\n","class PubSub {\r\n\tconstructor() {\r\n\t\tthis.subscriptions = {};\r\n\t}\r\n\r\n\tpublish(topic, ...args) {\r\n\t\tif (this.subscriptions[topic]) {\r\n\t\t\t// eslint-disable-next-line no-restricted-syntax\r\n\t\t\tfor (const fn of this.subscriptions[topic]) {\r\n\t\t\t\tfn(...args);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(topic, fn) {\r\n\t\tthis.subscriptions[topic] = this.subscriptions[topic] || [];\r\n\t\tthis.subscriptions[topic].push(fn);\r\n\t}\r\n\r\n\tunsubscribe(topic, fn) {\r\n\t\tif (this.subscriptions[topic]) {\r\n\t\t\tthis.subscriptions[topic].forEach((value, index) => {\r\n\t\t\t\tif (value === fn) {\r\n\t\t\t\t\tthis.subscriptions[topic].splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nconst pubsub = new PubSub();\r\n\r\nexport default pubsub;\r\n","import pubsub from '../../shared/utilities/pubsub';\r\nimport { generateId } from '../../shared/utilities/id';\r\nimport { camelCaseToDashCase, dashCaseToCamelCase } from '../../shared/utilities/case';\r\nimport { getBreakpoint } from '../../shared/utilities/screenSize';\r\nimport { debounce } from '../../shared/utilities/debounce';\r\n\r\nexport default class BaseBehavior {\r\n\tconstructor(element) {\r\n\t\tthis.element = element;\r\n\t\tthis.state = undefined;\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptions = {};\r\n\t\tthis.behaviorName = camelCaseToDashCase(element.getAttribute('data-behavior'));\r\n\t\tthis.instanceId = generateId();\r\n\t\tthis.attachInstanceId();\r\n\t}\r\n\r\n\tsetState(partialState) {\r\n\t\tObject.keys(partialState).forEach(key => {\r\n\t\t\tif (!{}.hasOwnProperty.call(this.state, key)) {\r\n\t\t\t\tthrow new Error(\r\n\t\t\t\t\t`${this.behaviorName} does not have ${key} on the state object,\r\n\t\t\t\t\tmake sure to define all state properties in the constructor.`\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.state = { ...(this.state || {}), ...partialState };\r\n\t}\r\n\r\n\tattachInstanceId() {\r\n\t\tthis.element.setAttribute('data-instance', `${this.behaviorName}__${this.instanceId}`);\r\n\t\tthis.element.removeAttribute('data-instance-init');\r\n\t}\r\n\r\n\tinitDomCache() {\r\n\t\tthis.dom = {};\r\n\r\n\t\t// Filter out ref's that embedded in another instance of the same behavior.\r\n\t\tArray.from(this.element.querySelectorAll(`[data-ref^=${this.behaviorName}]`))\r\n\t\t\t.filter(el => el.closest(`[data-behavior*=\"${this.behaviorName}\"]`) === this.element)\r\n\t\t\t.forEach(element => {\r\n\t\t\t\tconst ref = element.getAttribute('data-ref');\r\n\t\t\t\tconst key = dashCaseToCamelCase(ref).split('__')[1];\r\n\r\n\t\t\t\tif (key) {\r\n\t\t\t\t\tthis.dom[key] = element;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.error(\r\n\t\t\t\t\t\t`Element cannot be cached. Reference \"${ref}\" should have the format \"behavior-name__element-name\"`\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\tpublishBreakpointOnResize(delay = 250) {\r\n\t\tif (this.breakpoint) return;\r\n\r\n\t\tthis.breakpoint = getBreakpoint();\r\n\t\tthis.publish('SITE.BREAKPOINT', this.breakpoint);\r\n\r\n\t\tconst debouncedGetBreakpoint = debounce(() => {\r\n\t\t\tconst newBreakPoint = getBreakpoint();\r\n\t\t\tif (this.breakpoint !== newBreakPoint) {\r\n\t\t\t\tthis.publish('SITE.BREAKPOINT', newBreakPoint);\r\n\t\t\t\tthis.breakpoint = newBreakPoint;\r\n\t\t\t}\r\n\t\t}, delay);\r\n\r\n\t\twindow.addEventListener('resize', debouncedGetBreakpoint);\r\n\t}\r\n\r\n\taddEventListener(element, event, fn, useCapture = false) {\r\n\t\tif (element) {\r\n\t\t\tthis.events[event] = fn;\r\n\t\t\telement.addEventListener(event.split('.')[0], this.events[event], useCapture);\r\n\t\t}\r\n\t}\r\n\r\n\tremoveEventListener(element, event) {\r\n\t\telement.removeEventListener(event.split('.')[0], this.events[event]);\r\n\t\tthis.events[event] = null;\r\n\t\tdelete this.events[event];\r\n\t}\r\n\r\n\t// eslint-disable-next-line class-methods-use-this\r\n\tpublish(topic, obj) {\r\n\t\tpubsub.publish(topic, obj);\r\n\t}\r\n\r\n\tsubscribe(topic, fn) {\r\n\t\tthis.subscriptions[topic] = fn;\r\n\t\tpubsub.subscribe(topic, fn);\r\n\t}\r\n\r\n\tunsubscribe(topic) {\r\n\t\tpubsub.unsubscribe(topic, this.subscriptions[topic]);\r\n\t\tthis.subscriptions[topic] = null;\r\n\t\tdelete this.subscriptions[topic];\r\n\t}\r\n}\r\n\r\n// Below code is added for fixing scrolling issue on page refresh.\r\nwindow.addEventListener('load', () => {\r\n\tsetTimeout(() => {\r\n\t\tconst navigation = document.querySelector('#navigation');\r\n\t\t// eslint-disable-next-line\r\n\t\tif (navigation && navigation.getBoundingClientRect().bottom === scrollY) {\r\n\t\t\twindow.scroll(0, 0);\r\n\t\t}\r\n\t}, 0);\r\n});\r\n\r\nprocess.on('unhandledRejection', (reason, promise) => {\r\n\t// eslint-disable-next-line no-console\r\n\tconsole.log('Reason for this failure is : ', reason);\r\n\t// eslint-disable-next-line no-console\r\n\tconsole.log('promise is', promise);\r\n\t// Application specific logging, throwing an error, or other logic here\r\n});\r\n","export function camelCaseToDashCase(str: string): string {\r\n\treturn str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\r\n}\r\n\r\nexport function dashCaseToCamelCase(str: string): string {\r\n\treturn str.replace(/\\W+(.)/g, (x, chr) => chr.toUpperCase());\r\n}\r\n","const alphabet = '23456789ABDEGJKMNPQRVWXYZ';\r\n\r\nexport function generateId(length: number = 6): string {\r\n\tlet id:string = '';\r\n\r\n\tfor (let i:number = 0; i < length; i++) {\r\n\t\tid += alphabet.charAt(Math.floor(Math.random() * alphabet.length));\r\n\t}\r\n\r\n\treturn id;\r\n}\r\n"],"sourceRoot":""}