Fel uppstod under bearbetning av mallen.
The following has evaluated to null or missing:
==> bankercode  [in template "10153#10191#6590055" at line 47, column 6]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if bankercode?starts_with("amp") && ...  [in template "10153#10191#6590055" at line 47, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign url404 = '/error/404.html' > 
3<#assign oadURL = propsUtil.get('elan.oad.url') > 
4<#assign url = themeDisplay.getURLCurrent() > 
5<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
6 
7<#if qstringmap["ecid"]?has_content> 
8    <#assign ecidExt = qstringmap["ecid"]?first> 
9    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
10    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
11    <#assign ecidExt = "&ecid=" + ecidExt> 
12<#else> 
13    <#assign ecidExt=""> 
14</#if> 
15 
16<#if qstringmap["bankercode"]?has_content> 
17    <#assign bankercode = qstringmap["bankercode"]?first> 
18    <#assign bankercode = htmlUtil.escape(bankercode)> 
19    <#assign bankercode = htmlUtil.escapeJS(bankercode)> 
20 
21    <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bankercode)> 
22    <#if fiData?first?has_content> 
23        <#assign fi = fiData?first> 
24        <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
25            <#assign subbu_special = fi.offerId> 
26        </#if> 
27    </#if> 
28 
29    <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bankercode)> 
30    <#list bData as b> 
31        <#assign rLC = b.reallocationcode > 
32        <#assign lc = b.locationcode > 
33        <#assign mappedLC = b.mappedLocationCode > 
34    </#list> 
35<#else> 
36    <script> 
37        console.log("MainProductBcode missing"); 
38        //location.href = '${url404}'; 
39    </script> 
40</#if> 
41 
42<#if url?contains('11t1')> 
43    <#assign tier = '11t1'> 
44<#elseif url?contains('11t2')> 
45    <#assign tier = '11t2'> 
46</#if> 
47<#if bankercode?starts_with("amp") && (url?contains("11t1m"))> 
48    <#assign ameriprise = true> 
49<#else> 
50    <#assign ameriprise = false> 
51</#if> 
52<#if ameriprise> 
53    <#assign tier = '11t1m'> 
54</#if> 
55<#assign environment = url?replace('/${tier}.*','','r')> 
56 
57 
58<#if mappedLC?has_content && !ameriprise> 
59    <#assign lc = mappedLC > 
60</#if> 
61 
62<#if lc?has_content> 
63    <#assign prefix = "00000" > 
64    <#assign lcWithPrefix = prefix + lc > 
65    <#assign withPrefixLength = lcWithPrefix?length > 
66    <#assign startHere = withPrefixLength - 5> 
67    <#assign lc = lcWithPrefix?substring(startHere)> 
68    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
69    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
70 
71    <#assign clientProfile = clientProfileList?first> 
72    <#assign partnerName = clientProfile.getMarketingNameLong()> 
73    <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
74    <#assign cdnLogoUrl = (propsUtil.get('rackspace.cdn.web.url'))!> 
75<#-- <#assign cdnLogoUrl = "https://828cf7dcac86961192f7-10b53e8cad49907c7863edad15b39700.ssl.cf2.rackcdn.com"> --> 
76    <#assign pbu = clientProfile.getPbu()> 
77    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
78    <script> 
79        console.log('pbu', '${pbu!''}'); 
80        console.log('subbu', '${subbu!''}'); 
81        console.log('url', '${url!''}'); 
82        console.log('environ', '${environment!''}'); 
83        console.log('tier', '${tier!''}'); 
84        console.log('logo from client profile:', "${clientProfile.getLogoBFormat1()!''}","logo after change:", "${logoFileName!''}"); 
85    </script> 
86    <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)> 
87    <#if (optoutData?size == 0)> 
88        <#if (subbu_special?has_content)> 
89            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)> 
90            <script> 
91                console.log('new subbu', '${subbu_special!''}'); 
92            </script> 
93        <#else> 
94            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)> 
95        </#if> 
96        <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
97        <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
98        <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
99        <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")> 
100            <#assign partnerUrl = 'https://' + partnerUrl> 
101        </#if> 
102        <#if (fiCardsData?size > 0)> 
103            <#assign temp = []> 
104            <#assign offerTypeList = []> 
105            <#assign index = 0> 
106            <#list fiCardsData as fib> 
107                <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))> 
108                    <#assign offerTypeList = offerTypeList + [fib.offerType]> 
109                    <#assign temp = temp + fiCardsData[index..index]> 
110                </#if> 
111                <#assign index = index + 1> 
112            </#list> 
113            <#assign fiCardsData = temp> 
114            <#if !(fiCardsData?size > 0)> 
115                <script> 
116                    console.log("empty card/offerType List"); 
117                    //location.href = '${url404}'; 
118                </script> 
119            </#if> 
120            <#if ameriprise> 
121                <#assign lc_used = mappedLC> 
122            <#else> 
123                <#assign lc_used = lc> 
124            </#if> 
125            <div class="content-container content-container-main" title="${partnerName!''}"> 
126                <header class="jn-header"> 
127                    <div class="back-overview hide-desktop"> 
128                        <a  href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a> 
129                    </div> 
130                    <div class="header-main-logo" title="${partnerName!''}"> 
131                        <img src="${cdnLogoUrl!''}/${logoFileName!''}" title="${partnerName!''} Logo" alt="${partnerName!''} Logo"> 
132                    </div> 
133 
134                    <div class="styled-select slate"> 
135                        <select> 
136                            <#list fiCardsData as fib> 
137                                <#if ameriprise> 
138                                    <#if (fib.offerType=="101")> 
139                                        <#assign productURL="premier-visa-signature"> 
140                                        <#assign productName="Ameriprise Premier Visa Signature"> 
141                                    <#elseif (fib.offerType=="103")> 
142                                        <#assign productURL = "visa-signature"> 
143                                        <#assign productName = "Ameriprise Visa Signature"> 
144                                    </#if> 
145                                <#else> 
146                                    <#if (fib.offerType=="108" || fib.offerType=="109")> 
147                                        <#assign productURL="consumer-platinum2103"> 
148                                        <#assign productName="Platinum Card"> 
149                                    <#elseif fib.offerType=="147"> 
150                                        <#assign productURL = "max-cash-secured"> 
151                                        <#assign productName = "Max Cash Secured Card" > 
152                                    <#elseif (fib.offerType=="104")> 
153                                        <#assign productURL = "max-cash"> 
154                                        <#assign productName = "Max Cash Preferred Card"> 
155                                    <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
156                                        <#assign productURL = "consumer-edr2112"> 
157                                        <#assign productName = "Everyday Rewards+"> 
158                                    <#elseif fib.offerType == "115"> 
159                                        <#assign productURL = "secured"> 
160                                        <#assign productName = "Secured Card" > 
161                                    <#elseif fib.offerType == "141"> 
162                                        <#assign productURL = "college-real-rewards"> 
163                                        <#assign productName = "College Real Rewards" > 
164                                    <#elseif fib.offerType == "144"> 
165                                        <#assign productURL = "smart-business-rewards"> 
166                                        <#assign productName = "Smart Business Rewards Card" > 
167                                    <#elseif fib.offerType == "128"> 
168                                        <#assign productURL = "business-cash-preferred"> 
169                                        <#assign productName = "Business Cash Preferred" > 
170                                    <#elseif fib.offerType == "143"> 
171                                        <#assign productURL = "business-real-rewards"> 
172                                        <#assign productName = "Business Real Rewards Card" > 
173                                    <#elseif fib.offerType == "121"> 
174                                        <#assign productURL = "business-platinum2103"> 
175                                        <#assign productName = "Business Card" > 
176                                    <#elseif fib.offerType == "138"> 
177                                        <#assign productURL = "travel-rewards-plus"> 
178                                        <#assign productName = "Travel Rewards+" > 
179                                    <#elseif fib.offerType == "154"> 
180                                        <#assign productURL = "reserve-rewards-plus"> 
181                                        <#assign productName = "Reserve Rewards+" > 
182                                    </#if> 
183                                </#if> 
184                                <#if url?matches(".*/${productURL}.*")> 
185                                    <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" selected="selected">${productName}</option> 
186                                <#else> 
187                                    <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">${productName}</option> 
188                                </#if> 
189                            </#list> 
190                        </select> 
191                        <nav class="styled-select__dropdown"> 
192                            <div class="back-overview hide-mobile"> 
193                                <a  href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a> 
194                            </div> 
195                            <a href="javascript:void(0)" class="dropdown-select" aria-expanded="false" > 
196                                <span class="selected-option"></span> 
197                                <div class="jn-arrow arrow arrow-right"></div> 
198                            </a> 
199                            <button href="javascript:void(0)" class="jn-hamburger hamburger" aria-expanded="false" aria-label="open navigation menu"> 
200                                <div class="first-line transform transformed1"></div> 
201                                <div></div> 
202                                <div class="transform transformed2"></div> 
203                                <div></div> 
204                            </button> 
205                            <ul> 
206                                <#list fiCardsData as fib> 
207                                    <#if ameriprise> 
208                                        <#if (fib.offerType=="101")> 
209                                            <#assign productURL="premier-visa-signature"> 
210                                            <#assign productName="Ameriprise Premier Visa Signature"> 
211                                        <#elseif (fib.offerType=="103")> 
212                                            <#assign productURL = "visa-signature"> 
213                                            <#assign productName = "Ameriprise Visa Signature"> 
214                                        </#if> 
215                                    <#else> 
216                                        <#if (fib.offerType=="108" || fib.offerType=="109")> 
217                                            <#assign productURL="consumer-platinum2103"> 
218                                            <#assign productName="Platinum Card"> 
219                                        <#elseif fib.offerType=="147"> 
220                                            <#assign productURL = "max-cash-secured"> 
221                                            <#assign productName = "Max Cash Secured Card" > 
222                                        <#elseif (fib.offerType=="104")> 
223                                            <#assign productURL = "max-cash"> 
224                                            <#assign productName = "Max Cash Preferred Card"> 
225                                        <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
226                                            <#assign productURL = "consumer-edr2112"> 
227                                            <#assign productName = "Everyday Rewards+"> 
228                                        <#elseif fib.offerType == "115"> 
229                                            <#assign productURL = "secured"> 
230                                            <#assign productName = "Secured Card" > 
231                                        <#elseif fib.offerType == "141"> 
232                                            <#assign productURL = "college-real-rewards"> 
233                                            <#assign productName = "College Real Rewards" > 
234                                        <#elseif fib.offerType == "144"> 
235                                            <#assign productURL = "smart-business-rewards"> 
236                                            <#assign productName = "Smart Business Rewards Card" > 
237                                        <#elseif fib.offerType == "128"> 
238                                            <#assign productURL = "business-cash-preferred"> 
239                                            <#assign productName = "Business Cash Preferred" > 
240                                        <#elseif fib.offerType == "143"> 
241                                            <#assign productURL = "business-real-rewards"> 
242                                            <#assign productName = "Business Real Rewards Card" > 
243                                        <#elseif fib.offerType == "121"> 
244                                            <#assign productURL = "business-platinum2103"> 
245                                            <#assign productName = "Business Card" > 
246                                        <#elseif fib.offerType == "138"> 
247                                            <#assign productURL = "travel-rewards-plus"> 
248                                            <#assign productName = "Travel Rewards+" > 
249                                        <#elseif fib.offerType == "154"> 
250                                            <#assign productURL = "reserve-rewards-plus"> 
251                                            <#assign productName = "Reserve Rewards+" > 
252                                        </#if> 
253                                    </#if> 
254                                    <#if url?matches(".*/${productURL}.*")> 
255                                        <#if (fib.offerType=="104" && url?contains("max-cash-secured"))> 
256                                        <#-- prevent from max cash overiding max cash secured. --> 
257                                            <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li> 
258                                        <#else> 
259                                            <li class="selected" data-value="${productName}"><a href="javascript:void(0)">${productName}</a></li> 
260                                        </#if> 
261                                    <#else> 
262                                        <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li> 
263                                    </#if> 
264                                </#list> 
265                            </ul> 
266                        </nav> 
267 
268                    </div> 
269                </header> 
270            </div> 
271            <script> 
272                var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
273                var partnerName = "${partnerName!0}"; 
274                var metaDesc = ""; 
275                switch (page) { 
276                    case "consumer-platinum2103": 
277                        document.title = "The purchasing power of Zero | "+partnerName+" Platinum Card"; 
278                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Limited Time Offer. 0% Intro APR on Purchases and Balance Transfers for 20 Billing Cycles Consolidate your Balances with the "+partnerName+" Intro APR Card."; 
279                        break; 
280                    case "max-cash-secured": 
281                        document.title = "Earn more on the categories you pick | "+partnerName+" Max Cash Secured Card"; 
282                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
283                        break; 
284                    case "max-cash": 
285                        document.title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card"; 
286                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select"; 
287                        break; 
288                    case "real-rewards": 
289                        document.title = "Sign up and earn bonus points | "+partnerName+" Everyday Rewards+"; 
290                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
291                        break; 
292                    case "secured": 
293                        document.title = "Strengthen your finances | "+partnerName+" Secured Card"; 
294                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
295                        break; 
296                    case "college-real-rewards": 
297                        document.title = "Sign up and earn bonus points. | "+partnerName+" College Real Rewards"; 
298                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
299                        break; 
300                    case "smart-business-rewards": 
301                        document.title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card"; 
302                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. More choices. More value for your business. Earn a $200 Bonus and 2x Rewards on your top 2 spend categories each month with the "+partnerName+" Credit Card."; 
303                        break; 
304                    case "business-cashback": 
305                        document.title = "Flexible rewards for your business | "+partnerName+" Business Cash Preferred"; 
306                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
307                        break; 
308                    case "business-real-rewards": 
309                        document.title = "Earn up to 3X points with no caps | "+partnerName+" Business Real Rewards Card"; 
310                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ; 
311                        break; 
312                    case "business-platinum2103": 
313                        document.title = "Pay down your other credit card balances faster | "+partnerName+" Business Card"; 
314                        metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
315                        break; 
316                    case "premier-visa-signature": 
317                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Premier Visa Signature® Card"; 
318                        metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $375 cash value when deposited into an eligible account after spending $3,000 in eligible net purchases within the first 90 days of account opening."; 
319                        break; 
320                    case "visa-signature": 
321                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Visa Signature® Card"; 
322                        metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $250 cash value when deposited into an eligible Ameriprise account after spending $2,000 in eligible net purchases within the first 90 days of account opening."; 
323                        break; 
324                    case "travel-rewards-plus": 
325                        document.title = partnerName + " | Travel Rewards+ Card"; 
326                        metaDesc = "Make travel more rewarding with unlimited 4x points on travel and frequent popular categories."; 
327                        break; 
328                    case "reserve-rewards-plus": 
329                        document.title = partnerName + " | Reserve Rewards+ Card"; 
330                        metaDesc = "Get exceptional rewards on travel and frequent purchases with this exclusive metal card."; 
331                        break; 
332
333                if (metaDesc.length > 0) { 
334                    var m = document.createElement('meta'); 
335                    m.name = 'description'; 
336                    m.content = metaDesc; 
337                    document.head.appendChild(m); 
338
339                function toggleFlyOutMenu() { 
340                    $('.styled-select').toggleClass('show-select'); 
341                    var ariaExpanded = $('.styled-select__dropdown .dropdown-select').attr('aria-expanded'); 
342                    if(ariaExpanded !== null) { 
343                        var isAriaExpanded; 
344                        if(ariaExpanded === "true") { 
345                            isAriaExpanded = true; 
346                            $('.styled-select__dropdown .jn-hamburger').attr('aria-label', 'open navigation menu'); 
347                        } else { 
348                            isAriaExpanded = false 
349                            $('.styled-select__dropdown .jn-hamburger').attr('aria-label', 'close navigation menu'); 
350 
351
352                        $('.styled-select__dropdown .dropdown-select').attr('aria-expanded', !isAriaExpanded); 
353                        $('.styled-select__dropdown .jn-hamburger').attr('aria-expanded', !isAriaExpanded); 
354 
355
356
357                AUI().ready(function () { 
358                    var pageSelected = $('.selected').attr('data-value'); 
359                    $('.jn-hamburger, .dropdown-select').click(function () { 
360                        toggleFlyOutMenu(); 
361                    }); 
362                    $('.styled-select__dropdown').keydown(function(event) { 
363                        var firstNavigationLink = $('.styled-select__dropdown ul li:visible a').first(); 
364                        var lastNavigationLink = $('.styled-select__dropdown ul li:visible a').last(); 
365 
366                        if(event.keyCode === 9 ) { 
367                            // if they tab outside of the nav close the navigation 
368                            //shift + tab pressed 
369                            if(event.shiftKey && firstNavigationLink.is(document.activeElement)) { 
370                                toggleFlyOutMenu(); 
371                            } else if(!event.shiftKey && lastNavigationLink.is(document.activeElement)) { 
372                                toggleFlyOutMenu(); 
373
374
375                    }); 
376                    $('.selected-option').text(pageSelected); 
377                }); 
378            </script> 
379 
380        <#else> 
381            <script> 
382                console.log("FI Cards Data empty"); 
383                //location.href = '${url404}'; 
384            </script> 
385        </#if> 
386    <#else> 
387        <script> 
388            console.log("FI opt out"); 
389            //location.href = '${url404}'; 
390        </script> 
391    </#if> 
392<#else> 
393    <script> 
394        console.log("location code empty"); 
395        //location.href = '${url404}'; 
396    </script> 
397</#if> 
Fel uppstod under bearbetning av mallen.
The following has evaluated to null or missing:
==> bCode  [in template "10153#10191#6991552" at line 66, column 6]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if bCode?starts_with("amp") && (url?...  [in template "10153#10191#6991552" at line 66, column 1]
----
1<#assign url = themeDisplay.getURLCurrent() > 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4<#assign url404 = '/error/404.html' > 
5<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
6<#assign environment = url?replace('/12t1.*','','r')> 
7<#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' > 
8 
9<#if oadURL?contains("uat-")> 
10    <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' > 
11<#else> 
12    <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
13</#if> 
14<#--  check bankercode validity  --> 
15 
16<#if qstringmap["bankercode"]?has_content> 
17    <#assign bCode= qstringmap["bankercode"]?first> 
18    <#assign bCode= htmlUtil.escapeJS(bCode)> 
19    <#assign bCode= htmlUtil.escape(bCode)> 
20 
21    <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bCode)> 
22    <#if fiData?first?has_content> 
23        <#assign fi = fiData?first> 
24        <#if (fi.projectId == "12" || fi.projectId == "13" || fi.projectId == "14")> 
25            <#assign subbu_special = fi.offerId> 
26        </#if> 
27    </#if>       
28    <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
29    <#list bData as b> 
30      <#assign lc = b.locationcode > 
31      <#assign bName = b.branch > 
32      <#assign bPhone = b.businessphone > 
33      <#assign boeid = b.oeid > 
34      <#assign fName = b.firstname?trim> 
35      <#assign lName = b.lastname?trim> 
36      <#assign rlc = b.reallocationcode > 
37      <#assign mappedLC = b.mappedLocationCode > 
38    </#list> 
39<#else> 
40    <script> 
41        console.log("MainProductBcode missing"); 
42        //location.href = '${url404}'; 
43    </script> 
44</#if> 
45 
46<#assign text_to_apply_source = "vanity url" > 
47<#if qstringmap["sms"]?has_content> 
48    <#assign sms = 1 > 
49    <#assign text_to_apply_source = "sms" > 
50</#if> 
51<#if qstringmap["qrCode"]?has_content> 
52    <#assign text_to_apply_source = "qr code" > 
53</#if> 
54<#assign campaignId = "" > 
55<#assign ecidExt=""> 
56<#if qstringmap["ecid"]?has_content> 
57    <#assign campaignId = qstringmap["ecid"]?first > 
58    <#assign campaignId  = htmlUtil.escape(campaignId)> 
59    <#assign campaignId  = htmlUtil.escapeJS(campaignId)> 
60 
61    <#assign ecidExt = qstringmap["ecid"]?first> 
62    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
63    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
64    <#assign ecidExt = "&ecid=" + ecidExt> 
65</#if> 
66<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
67    <#assign ameriprise = true> 
68<#else> 
69    <#assign ameriprise = false> 
70</#if> 
71 
72<#if mappedLC?has_content && !ameriprise> 
73    <#assign lc = mappedLC > 
74</#if> 
75 
76 
77 
78<#if lc?has_content> 
79 
80    <#assign firstNameLength = fName?length > 
81    <#assign lastNameLength = lName?length > 
82    <#if firstNameLength + lastNameLength &gt; 19 > 
83        <#if lastNameLength &gt; 18 > 
84            <#assign bLName = lName?substring(0,18)> 
85        <#else> 
86            <#assign bLName = lName> 
87        </#if> 
88        <#assign maxFirstName = 19 - bLName?length > 
89        <#if firstNameLength &gt; maxFirstName > 
90            <#assign bFName = fName?substring(0,maxFirstName)> 
91        <#else> 
92            <#assign bFName = fName> 
93        </#if> 
94    <#else> 
95        <#assign bFName = fName > 
96        <#assign bLName = lName > 
97    </#if> 
98       
99 
100    <#assign prefix = "00000" > 
101    <#assign lcWithPrefix = prefix + lc > 
102    <#assign withPrefixLength = lcWithPrefix?length > 
103    <#assign startHere = withPrefixLength - 5> 
104    <#assign lc = lcWithPrefix?substring(startHere)> 
105 
106    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
107    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>     
108 
109    <#if clientProfileList?first?has_content> 
110        <#assign clientProfile = clientProfileList?first> 
111        <#assign partnerName = clientProfile.getMarketingNameLong()> 
112        <#assign pbu = clientProfile.getPbu()> 
113        <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
114        <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)> 
115        <#if (optoutData?size == 0)>                 
116            <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
117            <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
118            <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
119            <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>             
120                <#assign partnerUrl = 'https://' + partnerUrl> 
121            </#if> 
122            <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
123            <#assign cdnLogoUrl = (propsUtil.get('rackspace.cdn.web.url'))!> 
124             
125            <#if pbu == "0864054"> 
126                <#assign override = "berkshire"> 
127            <#else> 
128                <#assign override = " "> 
129            </#if> 
130             
131            <#--  this one should be delete for prod  --> 
132                 
133            <#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!> 
134            <#assign pageClass = secondaryBackgroundImage.cardType.getData()> 
135             
136            <#if (subbu_special?has_content)> 
137                <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
138            <#else> 
139                <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
140            </#if> 
141 
142 
143            <#assign temp = []> 
144            <#assign offerTypeList = []>      
145            <#assign index = 0> 
146            <#list fiCardsData as fib> 
147                <#if !(offerTypeList?seq_contains(fib.offerType))>  
148                    <#assign offerTypeList = offerTypeList + [fib.offerType]>                   
149                    <#assign temp = temp + fiCardsData[index..index]>  
150                </#if>  
151                <#assign index = index + 1>                
152            </#list>  
153            <#assign fiCardsData = temp> 
154            <#if (fiCardsData?size > 0)>   
155                <#if (subbu_special?has_content)> 
156                    <#assign lc_used = fiCardsData?first.WebLocationCode>   
157                <#else> 
158                    <#if ameriprise> 
159                        <#assign lc_used = mappedLC>  
160                    <#else> 
161                        <#assign lc_used = lc>  
162                    </#if> 
163                </#if> 
164                <#assign productURL = ""> 
165                <#list fiCardsData as fib> 
166                    <#if ameriprise> 
167                        <#if (fib.offerType=="101")> 
168                            <#assign productURL="premier-visa-signature"> 
169                            <#assign productName="Premier Visa Signature"> 
170                            <#assign productClass="ameriprise-premier-visa-signature"> 
171                        <#elseif (fib.offerType=="103")>      
172                            <#assign productURL = "visa-signature"> 
173                            <#assign productName = "Visa Signature">   
174                            <#assign productClass="ameriprise-visa-signature">                            
175                        </#if> 
176                    <#else>                     
177                        <#if (fib.offerType=="108" || fib.offerType=="109")> 
178                            <#assign productURL="consumer-platinum2103"> 
179                            <#assign productName="Platinum"> 
180                        <#elseif (fib.offerType=="104")>    
181                            <#assign productURL = "max-cash"> 
182                            <#assign productName="Max Cash Preferred">                              
183                        <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
184                            <#assign productURL = "consumer-edr2112"> 
185                            <#assign productName="Everyday Rewards+"> 
186                        <#elseif fib.offerType == "115"> 
187                            <#assign productURL = "secured"> 
188                            <#assign productName="Secured"> 
189                        <#elseif fib.offerType == "141"> 
190                            <#assign productURL = "college-real-rewards"> 
191                            <#assign productName="College Real Rewards">    
192                        <#elseif fib.offerType == "144"> 
193                            <#assign productURL = "smart-business-rewards"> 
194                            <#assign productName="Smart Business Rewards">       
195                        <#elseif fib.offerType == "147"> 
196                            <#assign productURL = "max-cash-secured"> 
197                            <#assign productName="Max Cash Secured">                             
198                        <#elseif fib.offerType == "128"> 
199                            <#assign productURL = "business-cash-preferred"> 
200                            <#assign productName="Business Cash Preferred"> 
201                        <#elseif fib.offerType == "143"> 
202                            <#assign productURL = "business-real-rewards"> 
203                            <#assign productName="Business Real Rewards"> 
204                        <#elseif fib.offerType == "121"> 
205                            <#assign productURL = "business-platinum2103"> 
206                            <#assign productName="Business"> 
207                        <#elseif fib.offerType == "138"> 
208                            <#assign productURL = "travel-rewards-plus"> 
209                            <#assign productName = "Travel Rewards+" > 
210                        <#elseif fib.offerType == "154"> 
211                            <#assign productURL = "reserve-rewards-plus"> 
212                            <#assign productName = "Reserve Rewards+" > 
213                        </#if>  
214                    </#if>     
215 
216                    <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png"> 
217                    <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">   
218                    <#assign newSourceCode = fib.sourceCode>  
219                    <#assign newOfferId = fib.offerId>  
220                    
221                    <#if url?matches(".*/${productURL}\\?.*")> 
222                        <#assign APR=""> 
223                        <#assign AMF=""> 
224                        <#assign BAL=""> 
225                        <#assign sdata = utilServ.makeCall('crcDDCGetSchumerBox', newOfferId + '&' + newSourceCode)> 
226                        <#if (sdata?size > 0)> 
227                            <#list sdata as sItem> 
228                         
229                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
230                                    <#assign APR = sItem.scrapedValue> 
231                                <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
232                                    <#assign AMF = sItem.scrapedValue> 
233                                <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) > 
234                                    <#assign BAL = sItem.scrapedValue> 
235                                </#if> 
236                                <#if (APR?has_content && AMF?has_content && BAL?has_content)> 
237                                    <#break> 
238                                </#if> 
239                            </#list>                 
240                        <#else> 
241                            <script> 
242                                console.log('no scraped data'); 
243                            </script> 
244                        </#if>     
245                        <#if ((fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "121" ) && !ameriprise)> 
246                            <#if (sdata?size > 0)>   
247                                <#assign apr_string = "">                         
248                                <#list sdata as d> 
249                                    <#if (d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases") && (d.scrapedValue?has_content))> 
250                                        <#assign apr_string = d.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
251                                        <#break> 
252                                    </#if> 
253                                </#list> 
254                                <script> 
255                                        $(document).ready(function () { 
256                                            var aprText = "${apr_string}"; 
257                                            if (aprText) { 
258                                                var matches= aprText.match(/\d+(\.\d+)?%?/g); 
259                                                var billing_cycle = ""; 
260                                                var apr_min = ""; 
261                                                var apr_max = ""; 
262                                                if (aprText.indexOf("Platinum:") != -1 || aprText.indexOf("Business:") != -1) { 
263                                                    billing_cycle = matches[1]; 
264                                                    apr_min = matches[2]; 
265                                                    apr_max = matches[3]; 
266
267                                                console.log('billing_cycle', billing_cycle, 'apr_min', apr_min, 'apr_max', apr_max); 
268                                                if (billing_cycle) { 
269                                                    $(".scraped-billing-cycle").html(billing_cycle); 
270
271                                                if (apr_min) { 
272                                                    $(".scraped-apr-min").html(apr_min); 
273
274                                                if (apr_max) { 
275                                                    $('.scraped-apr-max').html(apr_max); 
276
277
278                                        }); 
279                                </script>                              
280                            </#if>   
281                        </#if>    
282                        <#if ameriprise> 
283                            <#assign card_art_alt =  partnerName + " " + productName + " " + " Card"> 
284                            <#assign rollover_text =  partnerName + " " + productName + " " + " Card"> 
285                        <#else> 
286                            <#assign card_art_alt = partnerName + " " + productName + " " + " Card"> 
287                            <#assign rollover_text =  partnerName + " " + productName + " " + " Credit Card"> 
288                            <#assign card_text = productName + " Card"> 
289                        </#if> 
290 
291                        <div class="hero-container ${pageClass} ${productClass!''}" title="${rollover_text!''}"> 
292                            <div class="hero-main"> 
293                                 
294                                <div class="hero-main-container"> 
295                                    <div class="hero-main-offer"> 
296                                        <div class="offer-detail"> 
297                                            <div class="offer-detail-cardArt cardArtImg"> 
298                                                  <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
299                                                    <p>${card_text!''}</p> 
300                                            </div> 
301                                            <div class="offer-detail-text text-color-default hide-desktop"> 
302                                                ${primaryHeadlineFeatureTop.getData()} 
303                                                ${primaryHeadlineFeatureBottom.getData()} 
304                                            </div> 
305                                                 
306                                            <form class="form1 hide-desktop" action='${oadURL}?locationCode=${lc_used}&amp;offerId=${newOfferId}&amp;preparerType=customer&amp;sourceCode=${newSourceCode}' method="post" id="BAAForm"> 
307                                                <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
308                                                <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
309                                                <button  
310                                                    type="submit"  
311                                                    data-button-name="cta-button-top"   
312                                                    class="jn-button apply-button button-bg-color-custom"  
313                                                    disabled  
314
315                                                    ${ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${productName!''} Card </span> 
316                                                </button> 
317                                            </form> 
318                                        </div> 
319                                        <div class="offer-header"> 
320                                            <div class="offer-text-top"> 
321                                                <div class="offer-title"> 
322                                                    ${primaryHeadlineText.getData()} 
323                                                </div> 
324                                                <h1 class="offer-subtitle"> 
325                                                    ${primaryHeadlineFeature.getData()} 
326                                                </h1> 
327                                            </div> 
328                                            <div class="offer-text-bottom hide-mobile"> 
329                                                <div class="offer-detail-text text-color-default "> 
330                                                    ${primaryHeadlineFeatureTop.getData()} 
331                                                    ${primaryHeadlineFeatureBottom.getData()} 
332                                                    <#-- allow for all except these url --> 
333                                                    <#if (fib.offerType == "108" ||  
334                                                        fib.offerType == "109" ||  
335                                                        fib.offerType == "121" || 
336                                                        fib.offerType == "144" 
337                                                    )> 
338                                                        <br> 
339                                                        <a class="whiteLink" href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}"  class="text-color-default" target="_blank"> 
340                                                            <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>See terms & conditions</a> 
341                                                    </#if> 
342                                                </div> 
343                                                <a tabindex="0" id="oadSecButton-top" data-button-name="cta-button-bottom" class="jn-button banner-cta-apply-button">${optionalCtaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${productName!''} Card </span></a>                                                                                
344 
345                                            </div> 
346                                        </div> 
347                                         
348                                    </div> 
349                                </div> 
350                            </div> 
351                            <div class="hero-primary-benefits"> 
352                                <#if secondaryFeatureText.getData() != ""> 
353                                    <#assign featureCounter = 0> 
354                                    <#list secondaryFeatureText.getSiblings() as item> 
355                                        <div class="primary-benefit"> 
356                                            <div class="primary-benefit-wrapper text-color-white"> 
357                                                ${item.getData()} 
358                                                <#if (fib.offerType=="108" || fib.offerType=="109") && (featureCounter == secondaryFeatureText.getSiblings()?size - 1)> 
359                                                <a  
360                                                    href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
361                                                    class="text-color-default"  
362                                                    target="_blank" 
363
364                                                    <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span> 
365                                                    Terms & Conditions 
366                                                </a> 
367                                                </#if> 
368                                            </div> 
369                                        </div> 
370                                        <#assign featureCounter = featureCounter + 1> 
371                                    </#list> 
372                                </#if> 
373                            </div> 
374                        </div> 
375                        <div class="standard-content-container" title="${rollover_text!''}"> 
376                            <div class="product-details-container"> 
377                                <div class="detail-background"> 
378                                    <h2>${secondaryHeadlineText.getData()}</h2> 
379                                    <div class="secondary-benefits"> 
380                                        <div class="option"> 
381                                            ${additionalInfoGroupA.getData()} 
382                                            <#if pbu != "0892445">                                              
383                                                <div> 
384                                                    <#assign col1AmfOfferTypes = ["101", "141", "138", "154", "128"] > 
385                                                    <#assign col1AprOfferTypes = ["104", "121", "143", "144"] > 
386                                                    <#if col1AmfOfferTypes?seq_contains(fib.offerType)> 
387                                                        <#if (fib.offerType == "101")> 
388                                                            <h3>Annual Fee<sup>*</sup></h3><br/> 
389                                                        <#else> 
390                                                            <h3>Annual Fee</h3><br/> 
391                                                        </#if> 
392                                                        <p>${AMF!''}  
393                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
394                                                                class="text-color-default" target="_blank"> 
395                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
396                                                            </a> 
397                                                        </p> 
398                                                    <#elseif col1AprOfferTypes?seq_contains(fib.offerType)> 
399                                                        <#if (fib.offerType == "104") > 
400                                                            <h3 >APR for Purchases:</h3> 
401                                                        <#elseif (fib.offerType == "144")> 
402                                                            <h3>APR for Purchases and Balance Transfers:</h3> 
403                                                        <#else> 
404                                                            <h3>Intro APR<sup>*</sup> for Purchases:</h3> 
405                                                        </#if> 
406                                                        <p>${APR!''}  
407                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
408                                                                class="text-color-default" target="_blank"> 
409                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
410                                                            </a> 
411                                                        </p> 
412 
413                                                    </#if> 
414                                                </div>                                             
415                                            </#if> 
416                                        </div> 
417                                        <div class="option"> 
418                                            ${additionalInfoGroupB.getData()}  
419                                            <#if pbu != "0892445"> 
420                                                <div> 
421                                                    <#assign col2AmfOfferTypes = ["108", "109", "115", "144"] > 
422                                                    <#assign col2AprOfferTypes = ["138", "154", "128"] > 
423                                                    <#assign col2BalOfferTypes = ["101", "104", "141", "121", "143"] > 
424                                                    <#if col2AmfOfferTypes?seq_contains(fib.offerType)> 
425                                                        <h3>Annual Fee</h3> 
426                                                        <p>${AMF!''}  
427                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
428                                                                class="text-color-default" target="_blank"> 
429                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
430                                                            </a> 
431                                                        </p> 
432                                                    <#elseif col2AprOfferTypes?seq_contains(fib.offerType)> 
433                                                        <#if (fib.offerType == "128")> 
434                                                            <h3>Intro APR<sup>*</sup> for Purchases:</h3> 
435                                                        <#else> 
436                                                            <h3>APR for Purchases:</h3>  
437                                                        </#if> 
438                                                        <p>${APR!''}  
439                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
440                                                                class="text-color-default" target="_blank"> 
441                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
442                                                            </a> 
443                                                        </p> 
444                                                    <#elseif col2BalOfferTypes?seq_contains(fib.offerType)> 
445                                                        <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3> 
446                                                        <p>${BAL!''}  
447                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
448                                                                class="text-color-default" target="_blank"> 
449                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
450                                                            </a> 
451                                                        </p> 
452 
453                                                    </#if> 
454                                                </div> 
455                                            </#if> 
456                                        </div> 
457                                        <#if (additionalInfoGroupC?has_content)> 
458                                            <div class="option">   
459                                                ${additionalInfoGroupC.getData()}  
460                                                <div> 
461                                                    <#assign col3AmfOfferTypes = ["104", "121", "143"] > 
462                                                    <#assign col3AprOfferTypes = ["101", "108", "109", "141", "147", "115"] > 
463                                                    <#assign col3BalOfferTypes = ["138", "154", "128"] > 
464                                                    <#if col3AmfOfferTypes?seq_contains(fib.offerType)> 
465                                                        <#if (fib.offerType == "104")> 
466                                                            <h3>Annual Fee<sup>*</sup></h3> 
467                                                        <#else> 
468                                                            <h3>Annual Fee</h3> 
469                                                        </#if> 
470                                                        <p>${AMF!''}  
471                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
472                                                                class="text-color-default" target="_blank"> 
473                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
474                                                            </a> 
475                                                        </p> 
476                                                    <#elseif col3AprOfferTypes?seq_contains(fib.offerType)> 
477                                                        <#if (fib.offerType == "115" || fib.offerType == "147")> 
478                                                            <h3>APR for Purchases and Balance Transfers:</h3> 
479                                                        <#else> 
480                                                            <h3>Intro APR<sup>*</sup> for Purchases:</h3> 
481                                                        </#if> 
482                                                        <p>${APR!''}  
483                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
484                                                                class="text-color-default" target="_blank"> 
485                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
486                                                            </a> 
487                                                        </p> 
488                                                    <#elseif col3BalOfferTypes?seq_contains(fib.offerType)> 
489                                                        <#if (fib.offerType == "128")> 
490                                                            <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3> 
491                                                        <#else> 
492                                                            <h3>APR for Balance Transfers:</h3>  
493                                                        </#if> 
494                                                        <p>${BAL!''}  
495                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
496                                                                class="text-color-default" target="_blank"> 
497                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
498                                                            </a> 
499                                                        </p> 
500 
501                                                    </#if> 
502                                                    <#if (fib.offerType == "147")> 
503                                                        <h3>Annual Fee<sup>*</sup></h3> 
504                                                        <p>${AMF!''}  
505                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
506                                                                class="text-color-default" target="_blank"> 
507                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
508                                                            </a>  
509                                                        </p> 
510                                                    </#if> 
511                                                    <#if (fib.offerType == "108" || fib.offerType == "109")> 
512                                                        <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3>                                                        
513                                                        <p>${BAL!''}  
514                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
515                                                                class="text-color-default" target="_blank"> 
516                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
517                                                            </a> 
518                                                        </p> 
519                                                    </#if> 
520                                                </div>                
521                                            </div>   
522                                        </#if>                                          
523                                    </div> 
524                                </div> 
525                            </div> 
526                        </div> 
527                        <div class="banner-wrapper" title="${rollover_text!''}"> 
528                            <div class="banner ${override}"> 
529                                <div class="banner-cardArt cardArtImg"> 
530                                   <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
531                                </div> 
532                                <div class="banner-cta"> 
533                                    <div class="banner-cta-text text-color-white text-bold"> 
534                                        ${optionalCtaFeatureText.getData()}                                    
535                                    </div> 
536                                    <a  
537                                        tabindex="0"  
538                                        id="oadSecButton"  
539                                        data-button-name="cta-button-bottom"  
540                                        class="jn-button banner-cta-apply-button button-bg-color-custom text-color-white" 
541
542                                        ${optionalCtaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${productName!''} Card</span></a> 
543                                </div> 
544                            </div> 
545                        </div> 
546                        <#break /> 
547                    </#if> 
548                </#list>                         
549 
550                <script> 
551                        var reportingData = window.reportingData || {}; 
552                    document.addEventListener('DOMContentLoaded', function() { 
553                        //console.log('inside ready'); 
554                        var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
555                        var hostName = location.hostname; 
556                     
557                        function getDomainFromHostname(hostname) { 
558                            var parts = hostname.split('.'); 
559                            return parts.length === 3 ? parts[1] : parts[0]; 
560
561                        var domain = getDomainFromHostname(hostName); 
562                        var partnerName = "${partnerName!''}"; 
563 
564                        var ameriprise = '${ameriprise?string("yes", "no")}'; 
565                        var locationCode = "${rlc!lc}"; 
566                        var eidAmp = ""; 
567                        if (ameriprise == "yes") { 
568                            var bankercode_amp = '${bCode}'; 
569                            eidAmp = bankercode_amp.substring(3); 
570                            locationCode =""; 
571                        }    
572                             
573                        var heroCardImgs = document.querySelectorAll('.cardArtImg img'); 
574                        for (var index = 0; index < heroCardImgs.length; index++) { 
575                            var heroCardImg = heroCardImgs[index]; 
576                            var heroCardSrc = heroCardImg.getAttribute("src"); 
577                            if(heroCardSrc != "") { 
578                                resizeImg(heroCardImg); 
579
580
581                        function resizeImg(img) { 
582                            img.addEventListener("load", function() { 
583                                var cardImgWidth = img.width; 
584                                var cardImgHeight = img.height; 
585                                //console.log('width', cardImgWidth); 
586                                //console.log('height', cardImgHeight); 
587                                if(cardImgWidth > cardImgHeight) { 
588                                    img.style.width = "285px"; 
589                                } else { 
590                                    img.style.width = "150px"; 
591
592                            }); 
593
594                         
595                         
596                        $('.jn-button').removeAttr('disabled'); 
597                        $('.jn-button').removeClass('jn-disabled'); 
598                        jQuery('#oadSecButton, #oadSecButton-top').on('click', function(e) { 
599                            jQuery('#BAAForm').submit(); 
600                        }); 
601                         
602                        jQuery('#BAAForm').on('submit', function(e){ 
603                            e.preventDefault(); 
604                            //console.log('in custom submit'); 
605                            var xmlData; 
606                            if(ameriprise == "yes") { 
607                                xmlData = '<?xml version="1.0"?>'+ 
608                                    "<prefillData>"+  
609                                    "<versionNumber>1.0</versionNumber>"+  
610                                    "<applicationData>"+  
611                                    "<referral>" +  
612                                    "<employeeId>" + eidAmp + "</employeeId>" + 
613                                    "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+ 
614                                    "<divisionNumber></divisionNumber>"+ 
615                                    "</referral>" +  
616                                    "<bankerInformation>"+  
617                                    "<locationCode>" + locationCode + "</locationCode>"+ 
618                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
619                                    "<employeeID>${boeid!0}</employeeID>"+ 
620                                    "<name>" + 
621                                    "<first>${bFName!'0'}</first>" + 
622                                    "<last>${bLName!'0'}</last>" + 
623                                    "</name>"+ 
624                                    "<phone>"+ 
625                                    "<areaCode>"+areaCode+"</areaCode>"+  
626                                    "<exchange>"+exchangeCode+"</exchange>"+ 
627                                    "<number>"+num+"</number>"+  
628                                    "</phone>"+  
629                                    "</bankerInformation>"+  
630                                    "</applicationData>"+  
631                                    "</prefillData>" 
632                            } else { 
633                                xmlData = '<?xml version="1.0"?>'+ 
634                                    "<prefillData>"+  
635                                    "<versionNumber>1.0</versionNumber>"+  
636                                    "<applicationData>"+  
637                                    "<bankerInformation>"+  
638                                    "<locationCode>" + locationCode + "</locationCode>"+ 
639                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
640                                    "<employeeID>${boeid!0}</employeeID>"+ 
641                                    "<name>" + 
642                                    "<first>${bFName!'0'}</first>" + 
643                                    "<last>${bLName!'0'}</last>" + 
644                                    "</name>"+ 
645                                    "<phone>"+ 
646                                    "<areaCode>"+areaCode+"</areaCode>"+  
647                                    "<exchange>"+exchangeCode+"</exchange>"+ 
648                                    "<number>"+num+"</number>"+  
649                                    "</phone>"+  
650                                    "</bankerInformation>"+  
651                                    "</applicationData>"+  
652                                    "</prefillData>" 
653                            }                                 
654                            jQuery('#appDataBAA').val(xmlData); 
655                            var buttonName = jQuery('.jn-button').data('button-name'); 
656                            /* SiteCatalyst  onClick tracking */ 
657                            reportingData.apply_button = buttonName; 
658                            AUI().ready(function() { 
659                                if (window.publisherFW) { 
660                                    window.publisherFW.publishEvent("onClick", reportingData); 
661
662                            }); 
663 
664                            var paramString = '${bCode}' + "&" + xmlData + "&" + '${htmlUtil.escapeURL(htmlUtil.escapeJS(url))}'; 
665                            /* CRC service call */ 
666                            Liferay.Service( 
667                                '/crc-utilities-portlet#crcremote/make-call', 
668
669                                    storedProcedure: 'crcDDCTextApplyLog', 
670                                    parameters: paramString 
671                                }, 
672                                function(obj) 
673
674                                    //console.log("T2A logging call"); 
675
676                            ); 
677 
678                            this.submit(); 
679                        }); 
680                        var regex = /\d+/g; 
681                        var bdNumber = "${bPhone!''}"; 
682                        var phoneNum = bdNumber.match(regex); 
683                        var areaCode = ""; 
684                        var exchangeCode = ""; 
685                        var num = ""; 
686                        if(phoneNum != null) { 
687                            phoneNum = phoneNum.join(""); 
688                            areaCode = phoneNum.substring(0,3); 
689                            exchangeCode = phoneNum.substring(3,6); 
690                            num = phoneNum.substring(6,10); 
691
692                        var product = ""; 
693                        switch(page) { 
694                            case "consumer-platinum2103": 
695                                product="Platinum Card" 
696                                break; 
697                            case "consumer-edr2112": 
698                                product="Everyday Rewards+ Card" 
699                                break; 
700                            case "secured": 
701                                product="Secured Card" 
702                                break; 
703                            case "business-cash-preferred": 
704                                product="Business Cash Preferred" 
705                                break; 
706                            case "business-real-rewards": 
707                                product="Business Real Rewards Card" 
708                                break; 
709                            case "business-rewards-plus": 
710                                product="Business Rewards PLUS Card" 
711                                break; 
712                            case "premier-visa-signature": 
713                                product="Premier Visa Signature Card" 
714                                break; 
715                            case "business-platinum2103": 
716                                product="Business Card" 
717                                break; 
718                            case "visa-signature": 
719                                product="Visa Signature Card" 
720                                break;         
721                            case "travel-rewards-plus": 
722                                product="Travel Rewards+ Card" 
723                                break;   
724                            case "reserve-rewards-plus": 
725                                product="Reserve Rewards+ Card" 
726                                break;         
727                            case "max-cash": 
728                                product="Max Cash Preferred Card" 
729                                break;     
730                            case "max-cash-secured": 
731                                product="Max Cash Secured Card" 
732                                break;    
733                            case "college-real-rewards": 
734                                product="College Real Rewards Card" 
735                                break;    
736                            case "smart-business-rewards": 
737                                product="Smart Business Rewards Card" 
738                                break;                              
739                            default:   
740                                product = "All Cards";                           
741                        }                                  
742                             
743                        /* update SiteCatalyst data object */ 
744                        reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
745                        reportingData.location_code = '${rlc!0}'; 
746                        reportingData.product = product; 
747                        reportingData.site_section = 'credit cards'; 
748                        reportingData.platform = 'microsite'; 
749                        reportingData.partner_name = "${partnerName}"; 
750                        reportingData.Banker_id = '${boeid}'; 
751                        reportingData.Banker_code = '${bCode}'; 
752                        reportingData.visitor_type = 'prospect'; 
753                        reportingData.text_to_apply_source = '${text_to_apply_source}'; 
754                        reportingData.page_type = 'product';  
755                        reportingData.campaign_id = '${campaignId}';  
756 
757                             
758                        }); 
759                </script> 
760                                     
761            <#else> 
762                <script> 
763                    console.log("FI Cards Data empty"); 
764                    //location.href = '${url404}'; 
765                </script> 
766            </#if>                   
767        <#else> 
768            <script> 
769                console.log("Fi opt-out"); 
770                //location.href = '${url404}'; 
771            </script> 
772        </#if>        
773    <#else> 
774        <script> 
775            console.log("client profile empty"); 
776            //location.href = '${url404}'; 
777        </script> 
778    </#if>   
779 
780</#if> 
781<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
782<#if (clientdata?size > 0)> 
783    <#assign backgroundColor = clientdata[0].backgroundHexColor>               
784</#if> 
785<script> 
786    // Makes the Header subtitle work if there is two lines of text  
787    var consumerHeader = document.getElementsByClassName("consumer-card")[0]; 
788    if(consumerHeader){ 
789        var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0]; 
790        const offerTextTop = consumerHeader.querySelector(".offer-text-top"); 
791        const gradientHeight = Math.max(offerTextTop.offsetHeight + 50, 200) + "px"; 
792        var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle")[0]; 
793        const consumerSubtitle = consumerOfferHeader.getElementsByTagName("p")[0]; 
794        console.log('consumerSubtitle.innerText.length', consumerSubtitle.innerText.length, offerTextTop.offsetHeight); 
795        if (consumerSubtitle.innerText.length >= 76){ 
796            //two lines 
797            consumerHeroContainer.style.background = "linear-gradient(180deg, ${backgroundColor!'#173989'} " + gradientHeight + ", #f8f8f8 " + gradientHeight + ")"; 
798
799
800 
801    var buisnessHeader = document.getElementsByClassName("business-card")[0];   
802    if(buisnessHeader) { 
803        var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0]; 
804        var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0]; 
805 
806        if(buisnessOfferHeader.innerText.length >= 31 && buisnessOfferHeader.innerText.length < 48){ 
807            //not two lines but the header on tablet gose outside of allocated space. 
808            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 40%, ${backgroundColor!'#173989'} 40%)"; 
809        } else if (buisnessOfferHeader.innerText.length >= 48){ 
810            //two lines 
811            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)"; 
812
813
814     
815</script> 
Fel uppstod under bearbetning av mallen.
The following has evaluated to null or missing:
==> url404  [in template "10153#10191#7958267" at line 28, column 30]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${url404}  [in template "10153#10191#7958267" at line 28, column 28]
----
1<#assign url = themeDisplay.getURLCurrent() > 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
3<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
4 
5<#if qstringmap["bankercode"]?has_content> 
6    <#assign bankercode = qstringmap["bankercode"]?first> 
7    <#assign bankercode = htmlUtil.escape(bankercode)> 
8    <#assign bankercode = htmlUtil.escapeJS(bankercode)> 
9    <#assign bankercode = htmlUtil.escapeURL(bankercode)> 
10 
11    <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bankercode)> 
12    <#if fiData?first?has_content> 
13        <#assign fi = fiData?first> 
14        <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
15            <#assign subbu_special = fi.offerId> 
16        </#if> 
17    </#if>  
18 
19    <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bankercode)> 
20    <#list bData as b>         
21      <#assign rLC = b.reallocationcode > 
22      <#assign lc = b.locationcode > 
23      <#assign mappedLC = b.mappedLocationCode > 
24    </#list>     
25<#else> 
26    <script> 
27        console.log("MainProductBcode missing"); 
28        //location.href = '${url404}'; 
29    </script> 
30</#if> 
31 
32<#if bankercode?starts_with("amp") && (url?contains("11t1m"))> 
33    <#assign ameriprise = true> 
34<#else> 
35    <#assign ameriprise = false> 
36</#if> 
37 
38<#if mappedLC?has_content && !ameriprise> 
39    <#assign lc = mappedLC > 
40</#if> 
41 
42 
43<#if lc?has_content> 
44    <#assign prefix = "00000" > 
45    <#assign lcWithPrefix = prefix + lc > 
46    <#assign withPrefixLength = lcWithPrefix?length > 
47    <#assign startHere = withPrefixLength - 5> 
48    <#assign lc = lcWithPrefix?substring(startHere)> 
49    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
50    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
51 
52    <#assign clientProfile = clientProfileList?first>  
53    <#assign partnerName=clientProfile.getMarketingNameLong()> 
54    <#assign pbu = clientProfile.getPbu()> 
55    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
56    <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)> 
57 
58    <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)> 
59    <#if (optoutData?size == 0)> 
60            <#if (subbu_special?has_content)> 
61                <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
62                <script> 
63                    console.log('new subbu', '${subbu_special!''}'); 
64                </script>  
65            <#else> 
66                <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
67            </#if> 
68            <#if (fiCardsData?size > 0)> 
69                <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)> 
70                <#assign cardProviderAbbreviated = ''> 
71                <#if (cardProvider?size > 0)> 
72                    <#-- This will be V for visa or M for mastercard. --> 
73                    <#assign cardProviderAbbreviated = cardProvider[0].cardType> 
74                <#else> 
75                    <script> 
76                        console.log('No V or M data') 
77                    </script> 
78                </#if> 
79                <#list fiCardsData as fib> 
80                    <#switch fib.offerType> 
81                        <#case "101"> 
82                            <#assign productURL = "consumer-edr2112"> 
83                            <#assign productName = "Everyday Rewards+"> 
84                            <#break> 
85                        <#case "104"> 
86                            <#assign productURL = "max-cash"> 
87                            <#assign productName = "Max Cash Preferred Card">       
88                            <#break> 
89                        <#case "108"> 
90                            <#assign productURL="consumer-platinum2103"> 
91                            <#assign productName="Platinum Card"> 
92                            <#break> 
93                        <#case "109"> 
94                            <#assign productURL="consumer-platinum2103"> 
95                            <#assign productName="Platinum Card"> 
96                            <#break> 
97                        <#case "115"> 
98                            <#assign productURL = "secured"> 
99                            <#assign productName = "Secured Card" > 
100                            <#break> 
101                        <#case "138"> 
102                            <#assign productURL = "travel-rewards-plus"> 
103                            <#assign productName = "Travel Rewards+" > 
104                            <#break> 
105                        <#case "141"> 
106                            <#assign productURL = "college-real-rewards"> 
107                            <#assign productName = "College Real Rewards" >     
108                            <#break> 
109                        <#case "147"> 
110                            <#assign productURL = "max-cash-secured"> 
111                            <#assign productName = "Max Cash Secured Card" >     
112                            <#break> 
113                        <#case "154"> 
114                            <#assign productURL = "reserve-rewards-plus"> 
115                            <#assign productName = "Reserve Rewards+" > 
116                            <#break> 
117                        <#case "121"> 
118                            <#assign productURL = "business-platinum2103"> 
119                            <#assign productName = "Business Card" > 
120                            <#break> 
121                        <#case "128"> 
122                            <#assign productURL = "business-cash-preferred"> 
123                            <#assign productName = "Business Cash Preferred" > 
124                            <#break> 
125                        <#case "143"> 
126                            <#assign productURL = "business-real-rewards"> 
127                            <#assign productName = "Business Real Rewards Card" > 
128                            <#break> 
129                        <#case "144"> 
130                            <#assign productURL = "smart-business-rewards"> 
131                            <#assign productName = "Smart Business Rewards Card" >     
132                            <#break> 
133                        <#default>                                                         
134                    </#switch> 
135                    <#if productURL?has_content && url?matches(".*/${productURL}\\?.*")> 
136                            <#list product.getSiblings() as card> 
137                                <#if (card.offerType.getData() == fib.offerType)> 
138                                    <div class="content-container" title="${partnerName!''} - Disclaimer"> 
139                                        <div class="jn-disclaimer"> 
140                                                 
141                                            <#if pbuList.getData()?has_content && pbuList.getData()?contains(pbu) && card.disclaimerAssociatedBank.getData()?has_content> 
142                                                ${card.disclaimerAssociatedBank.getData()} 
143                                            <#else> 
144                                                <#if (card.disclaimerVisa?has_content && cardProviderAbbreviated?contains('V'))> 
145                                                    ${card.disclaimerVisa.getData()} 
146                                                </#if> 
147                                                <#if (card.disclaimerMasterCard?has_content && cardProviderAbbreviated?contains('M')) > 
148                                                    ${card.disclaimerMasterCard.getData()} 
149                                                </#if> 
150                                            </#if> 
151                                             
152                                        </div> 
153                                    </div> 
154                                    <#break> 
155                                </#if> 
156                            </#list> 
157                        <#break> 
158                    </#if> 
159                </#list> 
160            <#else> 
161                <script> 
162                    console.log("Empty card data"); 
163                </script> 
164            </#if> 
165    <#else> 
166        <script> 
167            console.log("FI opt out"); 
168        </script> 
169    </#if> 
170 
171<#else> 
172    <script> 
173        console.log("No lc for disclaimer"); 
174    </script> 
175</#if> 
Fel uppstod under bearbetning av mallen.
The following has evaluated to null or missing:
==> url404  [in template "10153#10191#5433717" at line 20, column 30]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${url404}  [in template "10153#10191#5433717" at line 20, column 28]
----
1<#assign url = themeDisplay.getURLCurrent() > 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
3<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
4<#assign aDateTime = .now> 
5<#assign currentYear = aDateTime?string.yyyy> 
6 
7<#if  qstringmap["bankercode"]?has_content> 
8    <#assign bCode= qstringmap["bankercode"]?first> 
9    <#assign bCode = htmlUtil.escape(bCode)> 
10    <#assign bCode = htmlUtil.escapeJS(bCode)> 
11     
12    <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
13    <#list bData as b> 
14      <#assign lc = b.reallocationcode > 
15    </#list> 
16     
17<#else> 
18    <script> 
19        console.log("MainProductBcode missing"); 
20        //location.href = '${url404}'; 
21    </script> 
22</#if> 
23 
24<#assign prefix = "00000" > 
25<#assign lcWithPrefix = prefix + lc > 
26<#assign withPrefixLength = lcWithPrefix?length > 
27<#assign startHere = withPrefixLength - 5> 
28<#assign lc = lcWithPrefix?substring(startHere)> 
29<#if lc?has_content> 
30   <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
31   <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
32   <#assign clientProfile = clientProfileList?first> 
33   <#assign pbu = clientProfile.getPbu()> 
34   <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
35   <#assign partnerName=clientProfile.getMarketingNameLong()> 
36   <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
37   <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
38   <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
39   <script>console.log('partnerUrl: ${partnerUrl}')</script> 
40   <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")> 
41        <#assign partnerUrl = 'https://' + partnerUrl> 
42        <script>console.log('Come to here by accident')</script> 
43    </#if> 
44</#if> 
45<script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
46 
47<footer class="footer bg-color-black text-color-white"> 
48    ${footerContent.getData()} 
49</footer> 
50<!-- BEGIN CALIFORNIA OPT-OUT MODAL --> 
51 
52<style> 
53    #opt-out-button, 
54    .modal__btn.learn-more { 
55        background: #0C2074; 
56        border: 1px solid #0C2074; 
57        color: white; 
58        text-transform: uppercase; 
59        text-decoration: none; 
60        font-size: 16px; 
61        padding: 0.5rem 2rem; 
62        display: inline-block; 
63        border-radius: 0; 
64
65    #opt-out-button:hover, 
66    .modal__btn.learn-more:hover { 
67        color: white; 
68        border-color: #2C76AF !important; 
69        background-color: #2C76AF !important; 
70
71    .modal__btn.learn-more { 
72        background: white; 
73        border: 1px solid #0C2074; 
74        color: #0C2074; 
75
76    #opt-out-button[disabled="true"] { 
77        background-color: rgba(0,0,0,.15); 
78        color: rgba(0,0,0,.45); 
79        border-color: rgba(0,0,0,.25); 
80
81    #opt-out-button:hover[disabled="true"] { 
82        background-color: rgba(0,0,0,.15) !important; 
83        color: rgba(0,0,0,.45) !important; 
84        border-color: rgba(0,0,0,.25) !important; 
85
86    #opt-out-button:focus { 
87        outline-style: solid; 
88        outline-color: white; 
89        outline-offset: -3px; 
90        outline-width: 1px; 
91
92    .opt-out-link svg { 
93        width: 30px; 
94        height: 14px; 
95        width: auto; 
96        vertical-align: middle; 
97
98    .modal__overlay { 
99        position: fixed; 
100        top: 0; 
101        left: 0; 
102        right: 0; 
103        bottom: 0; 
104        background: rgba(0,0,0,0.6); 
105        display: flex; 
106        justify-content: center; 
107        align-items: center; 
108
109 
110    .modal__container { 
111        background-color: #fff; 
112        padding: 30px; 
113        max-width: 500px; 
114        max-height: 100vh; 
115        border-radius: 4px; 
116        overflow-y: auto; 
117        box-sizing: border-box; 
118
119 
120    .modal__header { 
121        display: flex; 
122        justify-content: space-between; 
123        align-items: center; 
124
125 
126    .modal__title { 
127        margin-top: 0; 
128        margin-bottom: 0; 
129        font-weight: 600; 
130        font-size: 20px; 
131        line-height: 1.25; 
132        color: #00449e; 
133        box-sizing: border-box; 
134
135 
136    .modal__close { 
137        background: transparent; 
138        border: 1px solid white; 
139        padding: 4px 8px; 
140
141    .modal__close:hover { 
142        border: 1px solid black; 
143
144 
145    .modal__header .modal__close:before { content: "\2715"; } 
146 
147    .modal__content { 
148        margin-top: 2rem; 
149        margin-bottom: 2rem; 
150        line-height: 1.5; 
151
152 
153    @keyframes mmfadeIn { 
154        from { opacity: 0; } 
155        to { opacity: 1; } 
156
157 
158    @keyframes mmfadeOut { 
159        from { opacity: 1; } 
160        to { opacity: 0; } 
161
162 
163    @keyframes mmslideIn { 
164        from { transform: translateY(15%); } 
165        to { transform: translateY(0); } 
166
167 
168    @keyframes mmslideOut { 
169        from { transform: translateY(0); } 
170        to { transform: translateY(-10%); } 
171
172 
173    .micromodal-slide { 
174        display: none; 
175
176 
177    .micromodal-slide.is-open { 
178        display: block; 
179
180 
181    .micromodal-slide[aria-hidden="false"] .modal__overlay { 
182        animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
183
184 
185    .micromodal-slide[aria-hidden="false"] .modal__container { 
186        animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
187
188 
189    .micromodal-slide[aria-hidden="true"] .modal__overlay { 
190        animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
191
192 
193    .micromodal-slide[aria-hidden="true"] .modal__container { 
194        animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
195
196 
197    .micromodal-slide .modal__container, 
198    .micromodal-slide .modal__overlay { 
199        will-change: transform; 
200
201</style> 
202 
203<div class="modal micromodal-slide" id="modal-1" aria-hidden="true"> 
204    <div class="modal__overlay" tabindex="-1" data-micromodal-close> 
205        <div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title"> 
206            <header class="modal__header"> 
207                <h2 class="modal__title" id="modal-1-title"> 
208                Your California privacy choices 
209                </h2> 
210                <button class="modal__close" aria-label="Close modal" data-micromodal-close></button> 
211            </header> 
212            <div class="modal__content" id="modal-1-content"> 
213                <div id="message-no-cookie"> 
214                    <p> 
215                    We use technologies, such as cookies, that gather information on our website. That information is used for a variety of purposes, such as to understand how visitors interact with our websites, or to serve advertisements on our websites or on other websites. The use of technologies, such as cookies, constitutes a ‘share’ or ‘sale’ of personal information under the California Privacy Rights Act. You can stop the use of certain third-party tracking technologies that are not considered our service providers by clicking on “Opt-Out” below or by broadcasting the global privacy control signal.</p> 
216                     
217                    <p>&nbsp;</p> 
218 
219                    <p>Note that due to technological limitations, if you visit our website from a different computer or device, or clear cookies on your browser that store your preferences, you will need to return to this screen to opt-out and/or rebroadcast the signal. You can find a description of the types of tracking technologies, and your options with respect to those technologies, by clicking “Learn more” below.</p> 
220                </div> 
221                <div id="message-with-cookie"> 
222                    <p>You have successfully opted-out.</p> 
223                </div> 
224            </div> 
225            <div class="modal__footer"> 
226                <a href="https://www.myaccountaccess.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank" class="modal__btn learn-more" aria-label="Learn more">Learn More</a>                
227                <button id="opt-out-button" class="modal__btn modal__btn-primary" aria-label="Opt Out and Close modal" onclick="window.californiaOptOut()">Opt Out</button> 
228            </div> 
229        </div> 
230    </div> 
231</div> 
232<!-- END CALIFORNIA OPT-OUT MODAL --> 
233 
234<script> 
235    const copyrightNode = document.querySelector('.footer .copyright'); 
236    const fdicNode = document.querySelector('.footer .fdic'); 
237    const agreementNode = document.querySelector('.footer .member-agreement'); 
238    if(agreementNode) { 
239        agreementNode.innerHTML='<p><a class="text-color-white" href="https://online1.elancard.com/oad/cmas.controller?locationCode=${lc!0}&preparerType=customer&isNewRequest=false" target="_blank">Cardmember Agreements</a></p>'; 
240
241    if (copyrightNode) { 
242        copyrightNode.innerHTML = '<sup>©</sup> Elan Financial Services ' + ${currentYear}; 
243        copyrightNode.classList.add('ecdma-footer-client-name-copyright'); 
244
245    if (fdicNode) { 
246        fdicNode.innerHTML = '<p><a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank">Privacy and Security</a></p>'; 
247        fdicNode.insertAdjacentHTML('afterend', '<div style="display: inline-block; margin-left: 100px;"><a class="text-color-white opt-out-link" href="javascript:void(0);" data-micromodal-trigger="modal-1">Your California privacy choices <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" xml:space="preserve"><path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#fff"/><path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#06f"/><path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" fill="#fff"/><path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" fill="#06f"/></svg></a></div>'); 
248
249     
250</script> 
251<#if partnerUrl?has_content> 
252    <script> 
253        const homelinkNode = document.querySelector('.footer .copyright .homelink'); 
254        if (homelinkNode) { 
255            homelinkNode.href="${partnerUrl!''}"; 
256            homelinkNode.title="${partnerName!''}"; 
257            homelinkNode.innerText="Home"; 
258
259    </script> 
260</#if> 
261<!-- BEGIN CALIFORNIA OPT-OUT MODAL LOGIC --> 
262 
263<script> 
264    window.getCookieDomain = function() { 
265        var hostname = window.location.hostname.split("."); 
266        return hostname && hostname.slice(hostname.length - 2).join("."); 
267
268    window.setToOptOut = function() { 
269        if (window.getCookie('privacy_optout')) { 
270                document.getElementById('message-no-cookie').style.display = 'none'; 
271                document.getElementById('message-with-cookie').style.display = 'block'; 
272                document.getElementById('opt-out-button').setAttribute('disabled', true) 
273            } else { 
274                document.getElementById('message-no-cookie').style.display = 'block'; 
275                document.getElementById('message-with-cookie').style.display = 'none'; 
276
277
278    window.getCookie = function(name) { 
279        var value = '; ' + document.cookie; 
280        var parts = value.split('; ' + name + '='); 
281        if (parts.length === 2) return parts.pop().split(';').shift(); 
282
283    window.californiaOptOut = function() { 
284        if (!window.getCookie('privacy_optout')) { 
285            document.cookie = 'privacy_optout=1; path=/; domain=' + window.getCookieDomain() + '; expires=Thu, 31 Dec 2099 00:00:00 GMT;'; 
286            try { 
287             if (window.CustomEvent) { 
288                window.dispatchEvent(new CustomEvent('privacy_optout')); 
289             } else { 
290                var privacyOptoutEvent = document.createEvent('Event'); 
291                privacyOptoutEvent.initEvent('privacy_optout', true, true); 
292                window.dispatchEvent(privacyOptoutEvent); 
293
294             window.setToOptOut(); 
295            } catch (err) { 
296             console.error(err); 
297
298
299
300    MicroModal.init({ 
301        onShow: window.setToOptOut 
302    }); 
303    AUI().ready(function() { 
304        // user browser setting for Global Privacy Control to opt out of sharing information with third parties 
305        const isBrowserGpcOptOut = navigator.globalPrivacyControl; 
306        if(isBrowserGpcOptOut === true) { 
307        window.californiaOptOut(); 
308
309    }); 
310</script> 
311<!-- END CALIFORNIA OPT-OUT MODAL LOGIC -->