An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417670" at line 19, column 15]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417670" at line 19, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() > 
4<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
5<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
6<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
7<#assign url404 = '/error/404.html' > 
8<#assign environment = url?replace('/11t3.*','','r')> 
9 
10<#assign text_to_apply_source = "vanity url" > 
11<#if qstringmap["sms"]?has_content> 
12    <#assign sms = 1 > 
13    <#assign text_to_apply_source = "sms" > 
14</#if> 
15<#if qstringmap["qrCode"]?has_content> 
16    <#assign text_to_apply_source = "qr code" > 
17</#if> 
18 
19<#assign lc = qstringmap["ecdma-lc"]?first>  
20<#assign lc = htmlUtil.escape(lc)> 
21<#assign lc = htmlUtil.escapeJS(lc)> 
22 
23<#assign prefix = "00000" > 
24<#assign lcWithPrefix = prefix + lc > 
25<#assign withPrefixLength = lcWithPrefix?length > 
26<#assign startHere = withPrefixLength - 5> 
27<#assign lc = lcWithPrefix?substring(startHere)> 
28 
29<#if qstringmap["ecid"]?has_content> 
30    <#assign ecidExt = qstringmap["ecid"]?first> 
31    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
32    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
33    <#assign ecidExt = "&ecid=" + ecidExt> 
34 
35 
36    <#assign campaignId = qstringmap["ecid"]?first > 
37    <#assign campaignId = htmlUtil.escape(campaignId)> 
38    <#assign campaignId = htmlUtil.escapeJS(campaignId)> 
39<#else> 
40    <#assign ecidExt=""> 
41    <#assign campaignId = "" > 
42</#if> 
43 
44<#assign isFromDCOLink = false> 
45<#assign dcoSourceCode = ''> 
46<#if qstringmap["sourcecode"]?has_content> 
47    <#assign dcoSourceCode = qstringmap["sourcecode"]?first> 
48    <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> 
49    <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> 
50<#elseif qstringmap["sourceCode"]?has_content> 
51    <#assign dcoSourceCode = qstringmap["sourceCode"]?first> 
52    <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> 
53    <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> 
54</#if> 
55 
56<#if dcoSourceCode?has_content> 
57    <#assign isFromDCOLink = true> 
58</#if> 
59 
60<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
61<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
62<#assign clientProfile = clientProfileList?first> 
63<#assign partnerName = clientProfile.getMarketingNameLong()> 
64<#assign pbu = clientProfile.getPbu()> 
65<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
66 
67<#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
68<#assign cdnLogoUrl = (propsUtil.get('rackspace.cdn.web.url'))!> 
69<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+pbu+'&'+subbu)> 
70 
71 <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
72<#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
73<#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
74<script> 
75//console.log('Partner URL', ${partnerUrl}); 
76</script> 
77<#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>     
78    <#assign partnerUrl = 'https://' + partnerUrl> 
79</#if> 
80<script> 
81//console.log('Partner URL', ${partnerUrl}); 
82 
83</script> 
84<#-- Begin: filter duplicated cards--> 
85<#assign temp = []> 
86<#assign offerTypeList = []>   
87<#if (fiCardsData?size > 0)>      
88    <#assign index = 0> 
89    <#list fiCardsData as fib> 
90        <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>  
91            <#assign offerTypeList = offerTypeList + [fib.offerType]>                   
92            <#assign temp = temp + fiCardsData[index..index]>  
93        </#if>   
94        <#assign index = index + 1>               
95    </#list>  
96    <#assign fiCardsData = temp> 
97    <#if (fiCardsData?size > 0)> 
98        <div class="content-container content-container-main" title="${partnerName!''}"> 
99            <#if url?contains("index")> 
100                <#assign product="All Cards"> 
101                <header class="jn-header"> 
102                    <div class="header-logo">  
103 
104                        <#if partnerUrl?has_content> 
105                            <a href="${partnerUrl!''}" title="${partnerName!''}"> 
106                                <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo"> 
107                            </a> 
108                        <#else> 
109                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo"> 
110                        </#if> 
111                    </div>  
112                </header>         
113            <#else> 
114                <header class="jn-header"> 
115                    <#if !isFromDCOLink> 
116                        <div class="back-overview hide-desktop">  
117                            <a href="${environment}/11t3/index?ecdma-lc=${lc}${ecidExt}">Home</a> 
118                        </div>  
119                    </#if> 
120 
121                    <div class="header-main-logo" title="${partnerName!''}"> 
122                        <#if partnerUrl?has_content> 
123                            <a href="${partnerUrl!''}" title="${partnerName!''}"> 
124                                <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo"> 
125                            </a> 
126                        <#else>                            
127                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo">                             
128                        </#if> 
129                    </div> 
130                    <#if !isFromDCOLink> 
131                        <div class="styled-select slate"> 
132                            <nav class="styled-select__dropdown"> 
133                                <div class="back-overview hide-mobile">  
134                                    <a href="${environment}/11t3/index?ecdma-lc=${lc}${ecidExt}">Home</a> 
135                                </div>   
136                                <a href="javascript:void(0)" class="dropdown-select" aria-expanded="false"> 
137                                    <span class="selected-option"></span>  
138                                    <div class="jn-arrow arrow arrow-right"></div> 
139                                </a> 
140                                <a href="javascript:void(0)" class="jn-hamburger hamburger" aria-expanded="false"> 
141                                    <div class="first-line transform transformed1"></div> 
142                                    <div></div> 
143                                    <div class="transform transformed2"></div> 
144                                    <div></div> 
145                                </a> 
146                                <ul> 
147                                    <#list fiCardsData as fib> 
148                                        <#switch fib.offerType> 
149                                            <#case "101"> 
150                                                <#assign productURL = "202302/consumer-edr"> 
151                                                <#assign productName = "Everyday Rewards+"> 
152                                                <#break> 
153                                            <#case "103"> 
154                                                <#assign productURL = "202302/consumer-edr"> 
155                                                <#assign productName = "Everyday Rewards+"> 
156                                                <#break> 
157                                            <#case "104"> 
158                                                <#assign productURL = "max-cash"> 
159                                                <#assign productName = "Max Cash Preferred Card">       
160                                                <#break> 
161                                            <#case "108"> 
162                                                <#assign productURL="202308/consumer-platinum"> 
163                                                <#assign productName="Platinum Card"> 
164                                                <#break> 
165                                            <#case "109"> 
166                                                <#assign productURL="202308/consumer-platinum"> 
167                                                <#assign productName="Platinum Card"> 
168                                                <#break> 
169                                            <#case "115"> 
170                                                <#assign productURL = "secured"> 
171                                                <#assign productName = "Secured Card" > 
172                                                <#break> 
173                                            <#case "138"> 
174                                                <#assign productURL = "202305/travel-rewards-plus"> 
175                                                <#assign productName = "Travel Rewards+" > 
176                                                <#break> 
177                                            <#case "141"> 
178                                                <#assign productURL = "college-real-rewards"> 
179                                                <#assign productName = "College Real Rewards" >     
180                                                <#break> 
181                                            <#case "147"> 
182                                                <#assign productURL = "max-cash-secured"> 
183                                                <#assign productName = "Max Cash Secured Card" >     
184                                                <#break> 
185                                            <#case "154"> 
186                                                <#assign productURL = "202305/reserve-rewards-plus"> 
187                                                <#assign productName = "Reserve Rewards+" > 
188                                                <#break> 
189                                            <#case "121"> 
190                                                <#assign productURL = "202208/business-platinum"> 
191                                                <#assign productName = "Business Card" > 
192                                                <#break> 
193                                            <#case "128"> 
194                                                <#assign productURL = "business-cash-preferred"> 
195                                                <#assign productName = "Business Cash Preferred" > 
196                                                <#break> 
197                                            <#case "143"> 
198                                                <#assign productURL = "business-real-rewards"> 
199                                                <#assign productName = "Business Real Rewards Card" > 
200                                                <#break> 
201                                            <#case "144"> 
202                                                <#assign productURL = "smart-business-rewards"> 
203                                                <#assign productName = "Smart Business Rewards Card" >     
204                                                <#break> 
205                                            <#default>                                                         
206                                        </#switch> 
207                                        <#if url?matches(".*/${productURL}\\?.*")> 
208                                            <li class="selected" data-value="${productName}" selected="selected"><a href="javascript:void(0)">${productName}</a></li> 
209                                        <#else>                                 
210                                            <li class="dropdown-item" data-value="${productName}"> 
211                                                <a href="${environment}/11t3/${productURL}?ecdma-lc=${lc}${ecidExt}"> 
212                                                ${productName}  
213                                                </a> 
214                                            </li>                                    
215                                        </#if> 
216                                    </#list> 
217                                </ul> 
218                            </nav> 
219                             
220                        </div> 
221                    </#if> 
222                </header> 
223                <script> 
224                    function toggleFlyOutMenu() { 
225                        $('.styled-select').toggleClass('show-select'); 
226                        var ariaExpanded = $('.styled-select__dropdown .dropdown-select').attr('aria-expanded'); 
227                        if(ariaExpanded !== null) { 
228                            var isAriaExpanded; 
229                            if(ariaExpanded === "true") { 
230                                isAriaExpanded = true; 
231                            } else {  
232                                isAriaExpanded = false  
233
234                            $('.styled-select__dropdown .dropdown-select').attr('aria-expanded', !isAriaExpanded); 
235                            $('.styled-select__dropdown .jn-hamburger').attr('aria-expanded', !isAriaExpanded); 
236
237
238                    AUI().ready(function () { 
239                        var pageSelected = $('.selected').attr('data-value'); 
240                        $('.jn-hamburger, .dropdown-select').click(function () { 
241                            toggleFlyOutMenu(); 
242                        }); 
243                        $('.styled-select__dropdown').keydown(function(event) { 
244                            var firstNavigationLink = $('.styled-select__dropdown ul li:visible a').first(); 
245                            var lastNavigationLink = $('.styled-select__dropdown ul li:visible a').last(); 
246 
247                            if(event.keyCode === 9 ) { 
248                                // if they tab outside of the nav close the navigation 
249                                //shift + tab pressed 
250                                if(event.shiftKey && firstNavigationLink.is(document.activeElement)) { 
251                                    toggleFlyOutMenu(); 
252                                } else if(!event.shiftKey && lastNavigationLink.is(document.activeElement)) { 
253                                    toggleFlyOutMenu(); 
254                                }                             
255
256                        }); 
257                        $('.selected-option').text(pageSelected); 
258                    }); 
259                </script>            
260            </#if> 
261        </div> 
262        <script> 
263                var reportingData = {}; 
264                                                             
265                //document.addEventListener('DOMContentLoaded', function() { 
266                AUI().ready(function () { 
267                    //console.log('inside ready'); 
268                    var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
269                    var hostName = location.hostname;                                 
270                    function getDomainFromHostname(hostname) { 
271                        var parts = hostname.split('.'); 
272                        return parts.length === 3 ? parts[1] : parts[0]; 
273
274                    var domain = getDomainFromHostname(hostName); 
275                    var partnerName = "${partnerName!''}"; 
276                    var product = "All Cards"; 
277                    var title = ""; 
278                    var metaDesc = ""; 
279                    var m = document.createElement('meta');  
280                    switch(page) { 
281                        case "max-cash-secured": 
282                            product="Max Cash Secured Card"; 
283                            title = "Earn more on the categories you pick | "+partnerName+" Max Cash Secured Card"; 
284                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
285                            break;  
286                        case "max-cash": 
287                            product="Max Cash Preferred Card"; 
288                            title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card"; 
289                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select"; 
290                            break;                         
291                        case "consumer-platinum": 
292                            product="Platinum Card"; 
293                            title = "The purchasing power of Zero | "+partnerName+" Platinum Card"; 
294                            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."; 
295                            break; 
296                        case "consumer-edr": 
297                            product="Everyday Rewards+"; 
298                            title = "Sign up and earn bonus points | "+partnerName+" Everyday Rewards+"; 
299                            break; 
300                        case "secured": 
301                            product="Secured Card"; 
302                            title = "Strengthen your finances | "+partnerName+" Secured Card"; 
303                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
304                            break; 
305                        case "college-real-rewards": 
306                            product="College Real Rewards"; 
307                            title = "Sign up and earn bonus points. | "+partnerName+" College Real Rewards"; 
308                            break; 
309                        case "smart-business-rewards": 
310                            product="Smart Business Rewards Card"; 
311                            title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card"; 
312                            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."; 
313                            break;                             
314                        case "business-cash-preferred": 
315                            product="Business Cash Preferred"; 
316                            title = "Flexible rewards for your business | "+partnerName+" Business Cash Preferred"; 
317                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
318                            break; 
319                        case "business-real-rewards": 
320                            product="Business Real Rewards Card"; 
321                            title = "Earn up to 3X points with no caps | "+partnerName+" Business Real Rewards Card"; 
322                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ; 
323                            break; 
324                        case "business-platinum": 
325                            product="Business Card"; 
326                            title = "Pay down your other credit card balances faster | "+partnerName+" Business Card"; 
327                            metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
328                            break; 
329                        case "travel-rewards-plus": 
330                            product="Travel Rewards+" 
331                            title = partnerName + " | Travel Rewards+ Card"; 
332                            metaDesc = "Make travel more rewarding with unlimited 4x points on travel and frequent popular categories." 
333                            break; 
334                        case "reserve-rewards-plus": 
335                            product="Reserve Rewards+" 
336                            title = partnerName + " | Reserve Rewards+ Card"; 
337                            metaDesc = "Get exceptional rewards on travel and frequent purchases with this exclusive metal card."; 
338                            break; 
339                        default:   
340                            product = "All Cards";    
341                            title = partnerName + " Credit Card Index Page";                        
342
343                    document.title = title; 
344                    m.name = 'description';  
345                    m.content = metaDesc;  
346                    document.head.appendChild(m); 
347 
348                    var lc = "${lc!'0'}"; 
349 
350                    /* update SiteCatalyst data object */ 
351                        reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
352                        reportingData.page_type = 'product';  
353                        reportingData.site_section = 'credit cards'; 
354                        reportingData.platform = 'microsite'; 
355                        reportingData.campaign_id = '${campaignId}'; 
356                        reportingData.location_code = lc; 
357                        reportingData.partner_name = partnerName; 
358                        reportingData.product = product; 
359                        reportingData.text_to_apply_source = '${text_to_apply_source}'; 
360                        reportingData.visitor_type = 'prospect';         
361                        reportingData.Banker_id = '0'; 
362                        reportingData.Banker_code = '0';        
363 
364 
365                    /* SiteCatalyst  pageView tracking */ 
366                        AUI().ready(function() { 
367                            if (window.publisherFW) { 
368                                //console.log("pageView"); 
369                                window.publisherFW.publishEvent("pageView", reportingData); 
370                            }  
371                        }); 
372 
373                    jQuery('.jn-button, .applyNowLink').on('click', function(e){ 
374                        var buttonName = $(this).data('button-name'); 
375                        var productName = $(this).data('product-name'); 
376                        /* SiteCatalyst  onClick tracking */ 
377                        reportingData.applyButton = buttonName; 
378                        reportingData.product = productName; 
379 
380                            if (window.publisherFW) { 
381                                //console.log('clicked', reportingData); 
382                                window.publisherFW.publishEvent("onClick", reportingData); 
383                            }   
384 
385                    }); 
386 
387                    jQuery('.applyNowLink').on('click', function(e){ 
388                        ga("send", { 
389                            hitType: "event", 
390                            eventAction: "ApplyNow", 
391                            eventCategory: "click", 
392                            eventLabel: "BottomButton" 
393                        }); 
394                    }); 
395             
396                }); 
397        </script>    
398    <#else> 
399        <script> 
400            console.log("Empty card list"); 
401            location.href = '${url404}'; 
402        </script> 
403    </#if>    
404<#else> 
405    <script> 
406        console.log("FI Cards Data empty", "pbu:", "${pbu}", ",subbu:","${subbu}"); 
407        location.href = '${url404}'; 
408    </script> 
409</#if> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417688" at line 10, column 14]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417688" at line 10, column 1]
----
1<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
5<#assign url404 = '/error/404.html'> 
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
7<#assign currentEnvironment = 'prod' > 
8<#assign prcaURL = propsUtil.get('elan.prca.url')> 
9 
10<#assign lc= qstringmap["ecdma-lc"]?first>   
11<#assign lc = htmlUtil.escape(lc)> 
12<#assign lc = htmlUtil.escapeJS(lc)> 
13 
14<#assign prefix = "00000" > 
15<#assign lcWithPrefix = prefix + lc > 
16<#assign withPrefixLength = lcWithPrefix?length > 
17<#assign startHere = withPrefixLength - 5> 
18<#assign lc = lcWithPrefix?substring(startHere)> 
19 
20 
21<#if qstringmap["ecid"]?has_content> 
22    <#assign ecidExt = qstringmap["ecid"]?first> 
23    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
24    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
25    <#assign ecidExt = "&ecid=" + ecidExt> 
26<#else> 
27    <#assign ecidExt=""> 
28</#if> 
29<#if oadURL?contains("uat-")> 
30    <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' > 
31    <#assign currentEnvironment = 'uat' > 
32<#else> 
33    <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
34</#if> 
35    <script> 
36        //console.log('%ccurrentEnvironment: ', 'font-weight: bold; color: green;', '${currentEnvironment}'); 
37    </script> 
38<#assign campaignId = "" > 
39<#assign useprcaValue = "" > 
40<#assign ecidExt=""> 
41<#if qstringmap["ecid"]?has_content> 
42    <#assign campaignId = qstringmap["ecid"]?first > 
43    <#assign campaignId = htmlUtil.escape(campaignId)> 
44    <#assign campaignId = htmlUtil.escapeJS(campaignId)> 
45     
46    <#assign ecidExt = qstringmap["ecid"]?first> 
47    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
48    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
49    <#assign ecidExt = "&ecid=" + ecidExt> 
50</#if> 
51 
52<#assign dcoSourceCode = ""> 
53<#assign dcoSourceCodeQueryParameter = ""> 
54 
55<#if qstringmap["sourcecode"]?has_content> 
56    <#assign dcoSourceCode = qstringmap["sourcecode"]?first> 
57    <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> 
58    <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> 
59    <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}"> 
60<#elseif qstringmap["sourceCode"]?has_content> 
61    <#assign dcoSourceCode = qstringmap["sourceCode"]?first> 
62    <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> 
63    <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> 
64    <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}"> 
65</#if> 
66 
67<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
68<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
69<#assign clientProfile = clientProfileList?first> 
70<#assign partnerName = clientProfile.getMarketingNameLong()> 
71<#assign pbu = clientProfile.getPbu()> 
72<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
73<#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!> 
74 
75<#assign fiCardsData=utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu + '&'+subbu + '&' + lc)> 
76<#assign temp = []> 
77<#assign consumerCards = []> 
78<#assign businessCards = []>  
79<#assign offerTypeList = []>       
80<#assign index = 0> 
81<#assign consumerOfferTypes = ["101", "103", "108", "109", "115", "104", "141", "147", "138", "154"]> 
82<#assign businessOfferTypes = ["128", "121", "143", "144"]> 
83<#list fiCardsData as fib>  
84   <#assign useprcaValue = fib.useprca!""> 
85    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))> 
86        <#assign offerTypeList = offerTypeList + [fib.offerType]>  
87        <#if (consumerOfferTypes?seq_contains(fib.offerType))> 
88            <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
89        <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
90            <#assign businessCards = businessCards + fiCardsData[index..index]> 
91        </#if>                            
92        <#assign temp = temp + fiCardsData[index..index]>  
93    </#if>   
94    <#assign index = index + 1>               
95</#list>  
96 
97<#assign fiCardsData = temp> 
98 <script> 
99    //console.log("fi card data count", ${fiCardsData?size}) 
100</script> 
101 
102<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
103<#if (clientdata?size > 0)> 
104    <#assign backgroundColor = clientdata[0].backgroundHexColor>               
105</#if> 
106 
107<#if (fiCardsData?size > 0)>    
108    <style> 
109        .excludeModal__overlay { 
110            position: fixed; 
111            top: 0; 
112            left: 0; 
113            right: 0; 
114            bottom: 0; 
115            background: rgba(0,0,0,0.6); 
116            display: flex; 
117            justify-content: center; 
118            align-items: center; 
119
120 
121        .excludeModal__container { 
122            background-color: #fff; 
123            padding: 30px; 
124            min-width: 500px; 
125            max-width: 500px; 
126            max-height: 100vh; 
127            border-radius: 4px; 
128            overflow-y: auto; 
129            box-sizing: border-box; 
130
131 
132        .excludeModal__header { 
133            display: flex; 
134            justify-content: space-between; 
135            align-items: center; 
136
137 
138        .modal .excludeModal__container .excludeModal__title { 
139            margin-top: 0; 
140            margin-bottom: 0; 
141            font-weight: 600; 
142            font-size: 20px; 
143            line-height: 1.25; 
144            color: #00449e; 
145            box-sizing: border-box; 
146
147         
148        .excludeModal__close { 
149            background: transparent; 
150            border: 1px solid white; 
151            padding: 4px 8px; 
152            float: right; 
153
154 
155        .excludeModal__close:hover { 
156            border: 1px solid black; 
157
158 
159        .excludeModal__close:before { content: "\2715"; } 
160 
161        @keyframes mmfadeIn { 
162            from { opacity: 0; } 
163            to { opacity: 1; } 
164
165 
166        @keyframes mmfadeOut { 
167            from { opacity: 1; } 
168            to { opacity: 0; } 
169
170 
171        @keyframes mmslideIn { 
172            from { transform: translateY(15%); } 
173            to { transform: translateY(0); } 
174
175 
176        @keyframes mmslideOut { 
177            from { transform: translateY(0); } 
178            to { transform: translateY(-10%); } 
179
180 
181        .micromodal-slide { 
182            display: none; 
183
184 
185        .micromodal-slide.is-open { 
186            display: block; 
187
188 
189        .micromodal-slide[aria-hidden="false"] .excludeModal__overlay { 
190            animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
191
192 
193        .micromodal-slide[aria-hidden="false"] .excludeModal__container { 
194            animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
195
196 
197        .micromodal-slide[aria-hidden="true"] .excludeModal__overlay { 
198            animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
199
200 
201        .micromodal-slide[aria-hidden="true"] .excludeModal__container { 
202            animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
203
204 
205        .micromodal-slide .excludeModal__container, 
206        .micromodal-slide .excludeModal__overlay { 
207            will-change: transform; 
208
209    </style> 
210    <#if url?contains("index")>   
211        <#assign isExcluded = 0>                
212        <#assign offerId = ""> 
213        <#assign sourceCode = ""> 
214        <#assign cardArtImage = ""> 
215        <#assign productUrlHero = ""> 
216        <#assign product = ""> 
217        <#assign cardIndex = 0> 
218        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
219            <#if (offerTypeList?seq_contains("108")) ||  (offerTypeList?seq_contains("109"))> 
220                <#list consumerCards as card> 
221                    <#if (card.offerType=="108") || (card.offerType=="109")> 
222                        <#assign isExcluded = 0> 
223                        <#if card.dmaexclude??> 
224                            <#assign isExcluded = card.dmaexclude?number!0> 
225                        </#if>  
226                        <#assign offerId = card.offerId> 
227                        <#assign sourceCode = card.sourceCode> 
228                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
229                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
230 
231                        <#assign productUrlHero="consumer-platinum2103"> 
232                        <#assign product="Platinum"> 
233                        <#assign cardIndex = 1> 
234                        <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&' + sourceCode)> 
235                        <#if (scrapedData?size > 0)> 
236                            <#list scrapedData as sItem> 
237                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
238                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
239                                    <#break> 
240                                </#if> 
241                            </#list> 
242                            <script> 
243                                $(document).ready(function () { 
244                                    var aprText = "${apr}"; 
245                                    //console.log('aprText: ${aprText!''}'); 
246                                    if (aprText) { 
247                                        $(".apr-full-text").html(aprText); 
248                                        try { 
249                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
250                                            var billing_cycle = matches[1]; 
251                                            var apr_min = apr_min = matches[2]; 
252                                            var apr_max = apr_max = matches[3]; 
253                                            //console.log('billing_cycle', billing_cycle); 
254                                            //console.log('apr_min', apr_min); 
255                                            //console.log('apr_max', apr_max); 
256                                            if (billing_cycle) { 
257                                                //console.log($(".scraped-billing-cycle")); 
258                                                $(".scraped-billing-cycle").html(billing_cycle); 
259
260                                            if (apr_min) { 
261                                                $(".scraped-apr-min").html(apr_min); 
262
263                                            if (apr_max) { 
264                                                $('.scraped-apr-max').html(apr_max); 
265
266 
267                                        } catch (e) { 
268                                            console.log(e); 
269
270
271                                }); 
272                            </script> 
273                        </#if> 
274                        <script> 
275                            $(document).ready(function () { 
276                                $(".see-terms").replaceWith('<a href="${oadURL_TC}?step=display&offerId=${card.offerId}&locationCode=${lc}"  target="_blank"><span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions</a>'); 
277                            }); 
278                        </script> 
279                    </#if>                   
280                </#list> 
281            <#else> 
282                <#assign isExcluded = 0> 
283                <#if consumerCards[0].dmaexclude??> 
284                    <#assign isExcluded = consumerCards[0].dmaexclude?number!0> 
285                </#if>    
286                <#assign displayedCard = consumerCards[0]> 
287                <#assign offerId = displayedCard.offerId> 
288                <#assign sourceCode = displayedCard.sourceCode> 
289                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
290                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
291                <#if (displayedCard.offerType=="108" || displayedCard.offerType=="109")> 
292                    <#assign productUrlHero="consumer-platinum"> 
293                    <#assign product="Platinum"> 
294                    <#assign cardIndex = 1> 
295                <#elseif (displayedCard.offerType=="104")> 
296                    <#assign productUrlHero = "max-cash"> 
297                    <#assign product="Max Cash Preferred"> 
298                    <#assign cardIndex = 0> 
299                <#elseif (displayedCard.offerType=="115")> 
300                    <#assign productUrlHero = "secured"> 
301                    <#assign product="Secured"> 
302                    <#assign cardIndex = 2> 
303                </#if> 
304            </#if> 
305            <#if product?has_content && product != ""> 
306                <#assign card_text = product + " Card"> 
307            </#if>  
308        </#if> 
309        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
310            <#if (offerTypeList?seq_contains("128")) > 
311                <#list businessCards as card> 
312                    <#if (card.offerType=="128")> 
313                        <#assign isExcluded = 0> 
314                        <#if card.dmaexclude??> 
315                            <#assign isExcluded = card.dmaexclude?number!0>  
316                        </#if> 
317                        <#assign offerId = card.offerId> 
318                        <#assign sourceCode = card.sourceCode> 
319                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
320                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
321 
322                        <#assign productUrlHero="business-cash-preferred"> 
323                        <#assign product="Business Cash Preferred"> 
324                        <#assign cardIndex = 1> 
325                    </#if> 
326                </#list> 
327            <#else> 
328                <#assign isExcluded = 0> 
329                <#if businessCards[0].dmaexclude??> 
330                    <#assign isExcluded = businessCards[0].dmaexclude?number!0> 
331                </#if>  
332                <#assign displayedCard = businessCards[0]> 
333                <#assign offerId = displayedCard.offerId> 
334                <#assign sourceCode = displayedCard.sourceCode> 
335                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
336                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
337                <#if (displayedCard.offerType=="143")> 
338                    <#assign productUrlHero="business-real-rewards"> 
339                    <#assign product="Business Real Rewards"> 
340                    <#assign cardIndex = 2> 
341                <#elseif (displayedCard.offerType=="144")> 
342                    <#assign productUrlHero="smart-business-rewards"> 
343                    <#assign product="Smart Business Rewards"> 
344                    <#assign cardIndex = 0> 
345                <#elseif (displayedCard.offerType=="121")> 
346                    <#assign productUrlHero = "business-platinum"> 
347                    <#assign product="Business"> 
348                    <#assign cardIndex = 3>                     
349                </#if> 
350            </#if> 
351            <#if product?has_content && product != ""> 
352                <#assign card_text = product + " Card"> 
353            </#if>  
354        </#if>		 
355            <div class="hero-container product-${productUrlHero} tier3-hero-${class.getData()}"> 
356                <div class="hero-main"> 
357                    <div class="hero-main-container"> 
358                        <div class="hero-main-offer"> 
359                            <div class="offer-detail"> 
360                                <div class="offer-detail-cardArt cardArtImg"> 
361                                    <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" 
362                                    class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
363                                    <#-- <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!'' }" 
364                                     class="jn-img-responsive">--> 
365                                    <p>${card_text!''}</p> 
366                                </div> 
367                                <div class="offer-detail-text text-color-default hide-desktop"> 
368                                    ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}                                 
369                                </div>                                                                        
370                                <#if isExcluded == 0>    
371								<#if useprcaValue == "1"> 
372								<form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer" method="post"> 
373									<input id='locationCode' type="hidden" name="locationCode" value="${lc}"> 
374									<input id='offerId' type="hidden" name="offerId" value="${offerId}"> 
375									<input type="hidden" name="preparerType" value="customer">  
376                                    </form> 
377								<a  
378									class="jn-button hide-desktop btn"  
379									data-button-name="cta-button-top"  
380									data-product-name="${productUrlHero!''}"  
381									href="#" 
382									offerId="${offerId!''}" 
383									onclick="submitForm(event)"									 
384
385									${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
386								</a> 
387								 
388								 
389								 
390							<#else> 
391								<a  
392									class="jn-button hide-desktop btn"  
393									data-button-name="cta-button-top"  
394									data-product-name="${productUrlHero!''}"  
395									href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"                                    
396
397									${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
398								</a> 
399							</#if> 
400 
401                                <#else> 
402                                    <a  
403                                        class="jn-button hide-desktop btn"  
404                                        data-button-name="cta-button-top"  
405                                        data-product-name="${productUrlHero!''}"  
406                                        data-micromodal-trigger="modal-index-hero" 
407                                        href="javascript:void(0);" 
408
409                                        ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
410                                    </a> 
411                                </#if> 
412                            </div> 
413                            <div class="offer-header"> 
414                                <div class="offer-text-top"> 
415                                    ${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()} 
416                                </div> 
417                                <div class="offer-text-bottom hide-mobile"> 
418                                    <div class="offer-detail-text text-color-default "> 
419                                        ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}                                        
420                                    </div> 
421                                     
422                                    <#if isExcluded == 0>  
423									<#if useprcaValue == "1"> 
424									 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer" method="post"> 
425												<input id='locationCode' type="hidden" name="locationCode" value="${lc}"> 
426												<input id='offerId' type="hidden" name="offerId" value="${offerId!''}"> 
427												<input type="hidden" name="preparerType" value="customer">	 
428												</form> 
429									<a  
430                                            class="jn-button"  
431                                            data-button-name="cta-button-top"  
432                                            data-product-name="${productUrlHero!''}" 
433                                            href="#" 
434											offerId="${offerId!''}" 
435											onclick="submitForm(event)" 
436
437                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
438                                        </a> 
439									     
440									     <#else> 
441                                        <a  
442                                            class="jn-button"  
443                                            data-button-name="cta-button-top"  
444                                            data-product-name="${productUrlHero!''}" 
445                                            href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"  
446
447                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
448                                        </a> 
449										</#if> 
450                                    <#else> 
451                                        <a  
452                                            class="jn-button"  
453                                            data-button-name="cta-button-top"  
454                                            data-product-name="${productUrlHero!''}" 
455                                            data-micromodal-trigger="modal-index-hero" 
456                                            href="javascript:void(0);" 
457
458                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
459                                        </a> 
460                                    </#if> 
461                                </div> 
462                            </div>                           
463                        </div> 
464                    </div> 
465                </div> 
466            </div> 
467 
468            <div aria-hidden="true" class="modal micromodal-slide" id="modal-index-hero" > 
469                <div class="excludeModal__overlay" data-micromodal-close tabindex="-1"> 
470                    <div  
471                        aria-modal="true"  
472                        aria-labelledby="modal-index-hero-title"  
473                        class="excludeModal__container"  
474                        role="dialog" 
475
476                        <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button> 
477                        <header class="excludeModal__header"> 
478                            <h2 class="excludeModal__title" id="modal-index-hero-title"> 
479                                <#if productTitle.getSiblings()[cardIndex].excludedMessage?? > 
480                                    ${productTitle.getSiblings()[cardIndex].excludedMessage.getData()!""} 
481                                </#if> 
482                            </h2> 
483                        </header> 
484                    </div> 
485                </div> 
486            </div> 
487    <#else>      
488        <#assign hasBalanceTransferCalculator = false> 
489        <#list fiCardsData as fib>     
490            <#switch fib.offerType>     
491                <#case "101"> 
492                    <#assign cardIndex = 3 > 
493                    <#assign productUrlHero = "consumer-edr"> 
494                    <#assign product="Everyday Rewards+">                     
495                    <#assign hasBalanceTransferCalculator = false>                   
496                    <#break>  
497                <#case "103">              
498                    <#assign cardIndex = 3 > 
499                    <#assign productUrlHero = "consumer-edr"> 
500                    <#assign product="Everyday Rewards+">                     
501                     <#assign hasBalanceTransferCalculator = false>                   
502                   <#break>          
503                <#case "104"> 
504                    <#assign cardIndex = 0 > 
505                    <#assign productUrlHero="max-cash"> 
506                    <#assign product="Max Cash Preferred">                       
507                    <#assign hasBalanceTransferCalculator = false>                   
508                    <#break> 
509                <#case "108"> 
510                    <#assign cardIndex = 1 > 
511                    <#assign productUrlHero = "consumer-platinum"> 
512                    <#assign product="Platinum">     
513                    <#assign hasBalanceTransferCalculator = true>                   
514                    <#break> 
515                <#case "109"> 
516                    <#assign cardIndex = 1 > 
517                    <#assign productUrlHero = "consumer-platinum"> 
518                    <#assign product="Platinum">    
519                    <#assign hasBalanceTransferCalculator = true>                                                          
520                    <#break>                                         
521                 <#case "141">                  
522                    <#assign cardIndex = 4 > 
523                    <#assign productUrlHero = "college-real-rewards"> 
524                    <#assign product = "College Real Rewards" >  
525                     <#assign hasBalanceTransferCalculator = false>                   
526                   <#break>  
527                <#case "147"> 
528                    <#assign cardIndex = 5 > 
529                    <#assign productUrlHero = "max-cash-secured"> 
530                    <#assign product = "Max Cash Secured" >  
531                    <#assign hasBalanceTransferCalculator = false>                   
532                    <#break>   
533                <#case "115"> 
534                    <#assign cardIndex = 2 > 
535                    <#assign productUrlHero = "secured"> 
536                    <#assign product="Secured">                     
537                    <#assign hasBalanceTransferCalculator = false>                   
538                    <#break>  
539                <#case "138"> 
540                    <#assign cardIndex = 6 > 
541                    <#assign productUrlHero = "travel-rewards-plus"> 
542                    <#assign product="Travel Rewards+">                     
543                    <#assign hasBalanceTransferCalculator = false>                   
544                    <#break>  
545                <#case "154"> 
546                    <#assign cardIndex = 7 > 
547                    <#assign productUrlHero = "reserve-rewards-plus"> 
548                    <#assign product="Reserve Rewards+">                     
549                    <#assign hasBalanceTransferCalculator = false>                   
550                    <#break>  
551                <#case "128"> 
552                    <#assign cardIndex = 1 > 
553                    <#assign productUrlHero = "business-cash-preferred"> 
554                    <#assign product="Business Cash Preferred">                     
555                    <#assign hasBalanceTransferCalculator = false>                   
556                    <#break>     
557                <#case "143"> 
558                    <#assign cardIndex = 2 > 
559                    <#assign productUrlHero = "business-real-rewards"> 
560                    <#assign product="Business Real Rewards">                     
561                    <#assign hasBalanceTransferCalculator = false>                   
562                    <#break>     
563                <#case "144"> 
564                    <#assign cardIndex = 0 > 
565                    <#assign productUrlHero = "smart-business-rewards"> 
566                    <#assign product="Smart Business Rewards">                                          
567                    <#assign hasBalanceTransferCalculator = false>                   
568                    <#break>                                   
569                <#case "121"> 
570                    <#assign cardIndex = 3 > 
571                    <#assign productUrlHero = "business-platinum"> 
572                    <#assign product="Business">                      
573                    <#assign hasBalanceTransferCalculator = false>                   
574                    <#break>                                      
575                <#default> 
576            </#switch>                          
577            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">  
578            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg">   
579             
580            <script> 
581               console.log("offerType ${fib.offerType} productUrlHero ${productUrlHero} show calculator ${hasBalanceTransferCalculator?c}")                         
582            </script> 
583                                                                         
584            <#if url?matches(".*/${productUrlHero}\\?.*")>  
585                <#assign isExcluded = 0> 
586				 <script> 
587               console.log("fib.dmaexclude------>"+'${fib.dmaexclude}');                        
588            </script> 
589                <#if fib.dmaexclude??> 
590                    <#assign isExcluded = fib.dmaexclude?number!0> 
591                </#if>    
592                <#if (fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "121")> 
593 
594                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', '${fib.offerId}' + '&'+ '${fib.sourceCode}')> 
595                    <#if (scrapedData?size > 0)> 
596                            <#list scrapedData as sItem> 
597                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
598                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
599                                    <#break> 
600                                </#if> 
601 
602                            </#list> 
603                            <script> 
604                                $(document).ready(function () { 
605                                    var aprText = "${apr}"; 
606                                    //console.log('aprText',aprText); 
607                                    if (aprText) { 
608                                      $(".apr-full-text").html(aprText); 
609                                        try { 
610                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
611                                            var billing_cycle = matches[1]; 
612                                            var apr_min = apr_min = matches[2]; 
613                                            var apr_max = apr_max = matches[3]; 
614                                            //console.log('billing_cycle', billing_cycle); 
615                                            //console.log('apr_min', apr_min); 
616                                            //console.log('apr_max', apr_max); 
617                                            if (billing_cycle) { 
618                                                //console.log($(".scraped-billing-cycle")); 
619                                                $(".scraped-billing-cycle").html(billing_cycle); 
620
621                                            if (apr_min) { 
622                                                $(".scraped-apr-min").html(apr_min); 
623
624                                            if (apr_max) { 
625                                                $('.scraped-apr-max').html(apr_max); 
626
627 
628                                        } catch (e) { 
629                                            console.log(e); 
630
631
632                                }); 
633                            </script> 
634                    </#if>   
635                </#if>      
636                <#if product?has_content && product != ""> 
637                    <#assign card_text = product + " Card"> 
638                </#if>    
639                <#assign tc_offerTypes = ['108', '109', '121', '144']> 
640                <#assign calculator_offerTypes = ['101', '104', '138', '154', '128', '143', '144']> 
641                <div class="hero-container ${class.getData()}"> 
642                    <div class="hero-main"> 
643                        <div class="hero-main-container"> 
644                            <div class="hero-main-offer"> 
645                                <div class="offer-detail"> 
646                                    <div class="offer-detail-cardArt cardArtImg"> 
647                                        <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" 
648                                        onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'" class="jn-img-responsive"> 
649                                        <p>${card_text!''}</p> 
650                                        <#if (hasBalanceTransferCalculator)> 
651                                            <a href="javascript:void(0);" data-micromodal-trigger="modal-2"aria-hidden="true" >See how much you could save with a balance transfer</a> 
652                                        </#if> 
653                                    </div> 
654                                    <div class="offer-detail-text text-color-default hide-desktop"> 
655                                        ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()} 
656 
657                                        <#if (tc_offerTypes?seq_contains(fib.offerType))> 
658                                            <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}"  target="_blank"> 
659                                                <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions 
660                                            </a> 
661                                        </#if> 
662                                        <#if (calculator_offerTypes?seq_contains(fib.offerType))> 
663                                            <a class="whiteLink" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' target="_blank" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
664                                        </#if> 
665                                    </div> 
666                                     
667                                    <#if isExcluded == 0> 
668									 <#if useprcaValue == "1"> 
669									  <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId!''}&preparerType=customer" method="post"> 
670								<input id='locationCode' type="hidden" name="locationCode" value="${lc}"> 
671								<input id='offerId' type="hidden" name="offerId" value="${fib.offerId!''}"> 
672								<input type="hidden" name="preparerType" value="customer"> 
673								</form> 
674 
675									  <a  
676                                            class="jn-button hide-desktop btn"  
677                                            data-button-name="cta-button-top"  
678                                            data-product-name="${productUrlHero!''}"   
679                                            href="#"  
680											offerId="${fib.offerId!''}" 
681											onclick="submitForm(event)" > 
682                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
683                                        </a> 
684									     
685									     <#else> 
686                                        <a  
687                                            class="jn-button hide-desktop btn"  
688                                            data-button-name="cta-button-top"  
689                                            data-product-name="${productUrlHero!''}"   
690                                            href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"                               
691
692                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
693											 
694                                        </a> 
695										</#if> 
696                                    <#else> 
697                                        <a                                              
698                                            class="jn-button hide-desktop btn"  
699                                            data-button-name="cta-button-top"  
700                                            data-product-name="${productUrlHero!''}"    
701                                            data-micromodal-trigger="modal-product-hero" 
702                                            href="javascript:void(0);"                             
703
704                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
705                                        </a> 
706                                    </#if> 
707                                </div> 
708                                <div class="offer-header"> 
709                                    <div class="offer-text-top"> 
710                                        ${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()} 
711                                    </div> 
712                                    <div class="offer-text-bottom hide-mobile"> 
713                                        <div class="offer-detail-text text-color-default "> 
714                                            ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()} 
715                                            <#if (tc_offerTypes?seq_contains(fib.offerType))> 
716                                                <a class="whiteLink" href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}"  target="_blank"> 
717                                                    <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions 
718                                                </a> 
719                                            </#if> 
720                                        </div> 
721                                         
722                                         <#if isExcluded == 0>  
723										    <#if useprcaValue == "1"> 
724											<form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  method="post" >	 
725													<input id='locationCode' type="hidden" name="locationCode" value="${lc}"> 
726													<input id='offerId' type="hidden" name="offerId" value="${fib.offerId!''}"> 
727													<input type="hidden" name="preparerType" value="customer"> 
728													</form> 
729                                            <a  
730                                                class="jn-button"  
731                                                data-button-name="cta-button-top"  
732                                                data-product-name="${productUrlHero!''}"  
733                                                href="#"  
734												offerId="${fib.offerId!''}" 
735												onclick="submitForm(event)" > 
736                                                ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
737                                            </a> 
738												 
739											 <#else> 
740											   <a  
741                                                class="jn-button"  
742                                                data-button-name="cta-button-top"  
743                                                data-product-name="${productUrlHero!''}"  
744                                                href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"  
745
746                                                ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
747												 
748                                            </a> 
749											 </#if> 
750                                         <#else> 
751                                            <a  
752                                                class="jn-button"  
753                                                data-button-name="cta-button-top"  
754                                                data-product-name="${productUrlHero!''}"  
755                                                data-micromodal-trigger="modal-product-hero" 
756                                                href="javascript:void(0);"  
757
758                                                ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
759                                            </a> 
760                                         </#if> 
761                                         <#if (calculator_offerTypes?seq_contains(fib.offerType))> 
762                                            <a class="whiteLink" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' target="_blank" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
763                                        </#if> 
764                                    </div> 
765                                </div> 
766                                 
767                            </div> 
768                        </div> 
769                    </div> 
770                </div> 
771 
772                <div aria-hidden="true" class="modal micromodal-slide" id="modal-product-hero" > 
773                    <div class="excludeModal__overlay" data-micromodal-close tabindex="-1"> 
774                        <div  
775                            aria-modal="true"  
776                            aria-labelledby="modal-prodcut-hero-title"  
777                            class="excludeModal__container"  
778                            role="dialog" 
779
780                            <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button> 
781                            <header class="excludeModal__header"> 
782                                <h2 class="excludeModal__title" id="modal-prodcut-hero-title"> 
783                                    <#if productTitle.getSiblings()[cardIndex].excludedMessage?? > 
784                                        ${productTitle.getSiblings()[cardIndex].excludedMessage.getData()!""} 
785                                    </#if> 
786                                </h2> 
787                            </header> 
788                        </div> 
789                    </div> 
790                </div> 
791                <#break /> 
792            </#if> 
793        </#list>    
794 
795    </#if> 
796</#if> 
797<!-- https://micromodal.vercel.app/ --> 
798<script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
799 
800<script> 
801   
802    AUI().ready(function(){ 
803        //The below script is there to add vertical card art in UAT only so that QA has an easier time auditing. Note that the script only applies to FI SouthState (location code 20419) which is currently the only bank with vertical card art at the moment  
804        var locationCodeParam = '${lc}'; 
805        var currentEnvironmentParam = '${currentEnvironment}'; 
806        if(locationCodeParam == '20419' && currentEnvironmentParam == 'uat'){ 
807            Array.prototype.slice.call(document.querySelectorAll('.cardArtImg')).map(function(e){e.firstElementChild.src = "https://39f6f821fa03de239594-9f1c16ccc3b26ce57656bb4af99947b6.ssl.cf2.rackcdn.com/f20cf80a-6aea-46ec-84fc-c2a6583773d9.png"}) 
808        }    
809 
810        MicroModal.init();      
811    }); 
812</script> 
813<script> 
814    if(typeof setHeaderBackground === 'undefined') { let setHeaderBackground = () => {};} 
815    setHeaderBackground = () => { 
816        // Makes the Header subtitle work if there is two lines of text  
817        //product page header 
818        var consumerHeader = document.getElementsByClassName("landing-consumer")[0]; 
819        if(!consumerHeader) { 
820            //index page header 
821            consumerHeader = document.getElementsByClassName("tier3-hero-landing-consumer")[0]; 
822
823         
824        if(consumerHeader) { 
825            var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0]; 
826            var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle")[0]; 
827            const offerTextTop = consumerHeader.querySelector(".offer-text-top"); 
828             
829            if (consumerOfferHeader.innerText.length >= 76){ 
830                const gradientHeight = Math.max(offerTextTop.offsetHeight + 40, 200) + "px"; 
831                //two lines 
832                //offerTextTop.style.marginTop = '0px'; 
833                //document.querySelector('.offer-text-bottom').style.marginTop = '25px'; 
834                //prevent button and text going into blue section 
835                //consumerHeader.querySelector('.offer-text-top h1').style.minHeight = "120px"; 
836                consumerHeroContainer.style.background = "linear-gradient(180deg, ${backgroundColor!'#173989'} " + gradientHeight + ", #f8f8f8 " + gradientHeight + ")"; 
837
838
839        //product page header 
840        var buisnessHeader = document.getElementsByClassName("landing-business")[0]; 
841        if(!buisnessHeader) { 
842            //index page header 
843            buisnessHeader = document.getElementsByClassName("tier3-hero-landing-business")[0]; 
844
845 
846        if(buisnessHeader) { 
847            var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0]; 
848            var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0]; 
849 
850            if (buisnessOfferHeader.innerText.length >= 48){ 
851                //two lines 
852                buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)"; 
853
854
855    }; 
856    /* 
857        sometimes this runs before the text height it is refercning is loaded. Resulting in incorect background styles. If only in aui.ready then it flashes incorect styles then goes to correct styles everytime. 
858        With the aui.ready and imediate call it normal loads correctly but if it loads before header text it will still flash incorect styles and then be fixed. 
859    */ 
860    setHeaderBackground(); 
861    AUI().ready(function(){setHeaderBackground();});	 
862	  
863 
864</script> 
865<script> 
866    var excluded = '${isExcluded}';  
867	var useprcaValue = '${useprcaValue}'; 
868	var url23 ='${url}'; 
869    function submitForm(event) { 
870        event.preventDefault(); 
871		var offerId = event.target.getAttribute("offerId");		 
872		console.log("offerId::::::::::::::"+offerId); 
873 
874        var lc = document.getElementById('locationCode').value; 
875        //var offerId = document.getElementById('offerId').value; 
876		//var sourceCode = document.getElementById('sourceCode').value; 
877         
878        // Construct the URL         
879		var url = "${prcaURL}?locationCode=" + lc + "&offerId=" + offerId + "&preparerType=customer"; 
880 
881 
882        // Set the form action to the constructed URL 
883        document.getElementById('applyForm').action = url; 
884 
885        // Submit the form 
886		postCreditcardLearnMore(url); 
887        //document.getElementById('applyForm').submit(); 
888
889	function postCreditcardLearnMore(path, method='post') { 
890    // Create a form element 
891    const form = document.createElement('form'); 
892    form.method = method; 
893	//form.target = '_blank'; // Open in a new tab 
894    form.action = path; 
895 
896    // Add each parameter as a hidden input field     
897 
898    document.body.appendChild(form); 
899    form.submit(); 
900
901	 
902</script> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417688" at line 10, column 14]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417688" at line 10, column 1]
----
1<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
5<#assign url404 = '/error/404.html'> 
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
7<#assign currentEnvironment = 'prod' > 
8<#assign prcaURL = propsUtil.get('elan.prca.url')> 
9 
10<#assign lc= qstringmap["ecdma-lc"]?first>   
11<#assign lc = htmlUtil.escape(lc)> 
12<#assign lc = htmlUtil.escapeJS(lc)> 
13 
14<#assign prefix = "00000" > 
15<#assign lcWithPrefix = prefix + lc > 
16<#assign withPrefixLength = lcWithPrefix?length > 
17<#assign startHere = withPrefixLength - 5> 
18<#assign lc = lcWithPrefix?substring(startHere)> 
19 
20 
21<#if qstringmap["ecid"]?has_content> 
22    <#assign ecidExt = qstringmap["ecid"]?first> 
23    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
24    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
25    <#assign ecidExt = "&ecid=" + ecidExt> 
26<#else> 
27    <#assign ecidExt=""> 
28</#if> 
29<#if oadURL?contains("uat-")> 
30    <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' > 
31    <#assign currentEnvironment = 'uat' > 
32<#else> 
33    <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
34</#if> 
35    <script> 
36        //console.log('%ccurrentEnvironment: ', 'font-weight: bold; color: green;', '${currentEnvironment}'); 
37    </script> 
38<#assign campaignId = "" > 
39<#assign useprcaValue = "" > 
40<#assign ecidExt=""> 
41<#if qstringmap["ecid"]?has_content> 
42    <#assign campaignId = qstringmap["ecid"]?first > 
43    <#assign campaignId = htmlUtil.escape(campaignId)> 
44    <#assign campaignId = htmlUtil.escapeJS(campaignId)> 
45     
46    <#assign ecidExt = qstringmap["ecid"]?first> 
47    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
48    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
49    <#assign ecidExt = "&ecid=" + ecidExt> 
50</#if> 
51 
52<#assign dcoSourceCode = ""> 
53<#assign dcoSourceCodeQueryParameter = ""> 
54 
55<#if qstringmap["sourcecode"]?has_content> 
56    <#assign dcoSourceCode = qstringmap["sourcecode"]?first> 
57    <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> 
58    <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> 
59    <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}"> 
60<#elseif qstringmap["sourceCode"]?has_content> 
61    <#assign dcoSourceCode = qstringmap["sourceCode"]?first> 
62    <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> 
63    <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> 
64    <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}"> 
65</#if> 
66 
67<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
68<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
69<#assign clientProfile = clientProfileList?first> 
70<#assign partnerName = clientProfile.getMarketingNameLong()> 
71<#assign pbu = clientProfile.getPbu()> 
72<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
73<#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!> 
74 
75<#assign fiCardsData=utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu + '&'+subbu + '&' + lc)> 
76<#assign temp = []> 
77<#assign consumerCards = []> 
78<#assign businessCards = []>  
79<#assign offerTypeList = []>       
80<#assign index = 0> 
81<#assign consumerOfferTypes = ["101", "103", "108", "109", "115", "104", "141", "147", "138", "154"]> 
82<#assign businessOfferTypes = ["128", "121", "143", "144"]> 
83<#list fiCardsData as fib>  
84   <#assign useprcaValue = fib.useprca!""> 
85    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))> 
86        <#assign offerTypeList = offerTypeList + [fib.offerType]>  
87        <#if (consumerOfferTypes?seq_contains(fib.offerType))> 
88            <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
89        <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
90            <#assign businessCards = businessCards + fiCardsData[index..index]> 
91        </#if>                            
92        <#assign temp = temp + fiCardsData[index..index]>  
93    </#if>   
94    <#assign index = index + 1>               
95</#list>  
96 
97<#assign fiCardsData = temp> 
98 <script> 
99    //console.log("fi card data count", ${fiCardsData?size}) 
100</script> 
101 
102<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
103<#if (clientdata?size > 0)> 
104    <#assign backgroundColor = clientdata[0].backgroundHexColor>               
105</#if> 
106 
107<#if (fiCardsData?size > 0)>    
108    <style> 
109        .excludeModal__overlay { 
110            position: fixed; 
111            top: 0; 
112            left: 0; 
113            right: 0; 
114            bottom: 0; 
115            background: rgba(0,0,0,0.6); 
116            display: flex; 
117            justify-content: center; 
118            align-items: center; 
119
120 
121        .excludeModal__container { 
122            background-color: #fff; 
123            padding: 30px; 
124            min-width: 500px; 
125            max-width: 500px; 
126            max-height: 100vh; 
127            border-radius: 4px; 
128            overflow-y: auto; 
129            box-sizing: border-box; 
130
131 
132        .excludeModal__header { 
133            display: flex; 
134            justify-content: space-between; 
135            align-items: center; 
136
137 
138        .modal .excludeModal__container .excludeModal__title { 
139            margin-top: 0; 
140            margin-bottom: 0; 
141            font-weight: 600; 
142            font-size: 20px; 
143            line-height: 1.25; 
144            color: #00449e; 
145            box-sizing: border-box; 
146
147         
148        .excludeModal__close { 
149            background: transparent; 
150            border: 1px solid white; 
151            padding: 4px 8px; 
152            float: right; 
153
154 
155        .excludeModal__close:hover { 
156            border: 1px solid black; 
157
158 
159        .excludeModal__close:before { content: "\2715"; } 
160 
161        @keyframes mmfadeIn { 
162            from { opacity: 0; } 
163            to { opacity: 1; } 
164
165 
166        @keyframes mmfadeOut { 
167            from { opacity: 1; } 
168            to { opacity: 0; } 
169
170 
171        @keyframes mmslideIn { 
172            from { transform: translateY(15%); } 
173            to { transform: translateY(0); } 
174
175 
176        @keyframes mmslideOut { 
177            from { transform: translateY(0); } 
178            to { transform: translateY(-10%); } 
179
180 
181        .micromodal-slide { 
182            display: none; 
183
184 
185        .micromodal-slide.is-open { 
186            display: block; 
187
188 
189        .micromodal-slide[aria-hidden="false"] .excludeModal__overlay { 
190            animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
191
192 
193        .micromodal-slide[aria-hidden="false"] .excludeModal__container { 
194            animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
195
196 
197        .micromodal-slide[aria-hidden="true"] .excludeModal__overlay { 
198            animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
199
200 
201        .micromodal-slide[aria-hidden="true"] .excludeModal__container { 
202            animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
203
204 
205        .micromodal-slide .excludeModal__container, 
206        .micromodal-slide .excludeModal__overlay { 
207            will-change: transform; 
208
209    </style> 
210    <#if url?contains("index")>   
211        <#assign isExcluded = 0>                
212        <#assign offerId = ""> 
213        <#assign sourceCode = ""> 
214        <#assign cardArtImage = ""> 
215        <#assign productUrlHero = ""> 
216        <#assign product = ""> 
217        <#assign cardIndex = 0> 
218        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
219            <#if (offerTypeList?seq_contains("108")) ||  (offerTypeList?seq_contains("109"))> 
220                <#list consumerCards as card> 
221                    <#if (card.offerType=="108") || (card.offerType=="109")> 
222                        <#assign isExcluded = 0> 
223                        <#if card.dmaexclude??> 
224                            <#assign isExcluded = card.dmaexclude?number!0> 
225                        </#if>  
226                        <#assign offerId = card.offerId> 
227                        <#assign sourceCode = card.sourceCode> 
228                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
229                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
230 
231                        <#assign productUrlHero="consumer-platinum2103"> 
232                        <#assign product="Platinum"> 
233                        <#assign cardIndex = 1> 
234                        <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&' + sourceCode)> 
235                        <#if (scrapedData?size > 0)> 
236                            <#list scrapedData as sItem> 
237                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
238                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
239                                    <#break> 
240                                </#if> 
241                            </#list> 
242                            <script> 
243                                $(document).ready(function () { 
244                                    var aprText = "${apr}"; 
245                                    //console.log('aprText: ${aprText!''}'); 
246                                    if (aprText) { 
247                                        $(".apr-full-text").html(aprText); 
248                                        try { 
249                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
250                                            var billing_cycle = matches[1]; 
251                                            var apr_min = apr_min = matches[2]; 
252                                            var apr_max = apr_max = matches[3]; 
253                                            //console.log('billing_cycle', billing_cycle); 
254                                            //console.log('apr_min', apr_min); 
255                                            //console.log('apr_max', apr_max); 
256                                            if (billing_cycle) { 
257                                                //console.log($(".scraped-billing-cycle")); 
258                                                $(".scraped-billing-cycle").html(billing_cycle); 
259
260                                            if (apr_min) { 
261                                                $(".scraped-apr-min").html(apr_min); 
262
263                                            if (apr_max) { 
264                                                $('.scraped-apr-max').html(apr_max); 
265
266 
267                                        } catch (e) { 
268                                            console.log(e); 
269
270
271                                }); 
272                            </script> 
273                        </#if> 
274                        <script> 
275                            $(document).ready(function () { 
276                                $(".see-terms").replaceWith('<a href="${oadURL_TC}?step=display&offerId=${card.offerId}&locationCode=${lc}"  target="_blank"><span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions</a>'); 
277                            }); 
278                        </script> 
279                    </#if>                   
280                </#list> 
281            <#else> 
282                <#assign isExcluded = 0> 
283                <#if consumerCards[0].dmaexclude??> 
284                    <#assign isExcluded = consumerCards[0].dmaexclude?number!0> 
285                </#if>    
286                <#assign displayedCard = consumerCards[0]> 
287                <#assign offerId = displayedCard.offerId> 
288                <#assign sourceCode = displayedCard.sourceCode> 
289                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
290                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
291                <#if (displayedCard.offerType=="108" || displayedCard.offerType=="109")> 
292                    <#assign productUrlHero="consumer-platinum"> 
293                    <#assign product="Platinum"> 
294                    <#assign cardIndex = 1> 
295                <#elseif (displayedCard.offerType=="104")> 
296                    <#assign productUrlHero = "max-cash"> 
297                    <#assign product="Max Cash Preferred"> 
298                    <#assign cardIndex = 0> 
299                <#elseif (displayedCard.offerType=="115")> 
300                    <#assign productUrlHero = "secured"> 
301                    <#assign product="Secured"> 
302                    <#assign cardIndex = 2> 
303                </#if> 
304            </#if> 
305            <#if product?has_content && product != ""> 
306                <#assign card_text = product + " Card"> 
307            </#if>  
308        </#if> 
309        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
310            <#if (offerTypeList?seq_contains("128")) > 
311                <#list businessCards as card> 
312                    <#if (card.offerType=="128")> 
313                        <#assign isExcluded = 0> 
314                        <#if card.dmaexclude??> 
315                            <#assign isExcluded = card.dmaexclude?number!0>  
316                        </#if> 
317                        <#assign offerId = card.offerId> 
318                        <#assign sourceCode = card.sourceCode> 
319                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
320                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
321 
322                        <#assign productUrlHero="business-cash-preferred"> 
323                        <#assign product="Business Cash Preferred"> 
324                        <#assign cardIndex = 1> 
325                    </#if> 
326                </#list> 
327            <#else> 
328                <#assign isExcluded = 0> 
329                <#if businessCards[0].dmaexclude??> 
330                    <#assign isExcluded = businessCards[0].dmaexclude?number!0> 
331                </#if>  
332                <#assign displayedCard = businessCards[0]> 
333                <#assign offerId = displayedCard.offerId> 
334                <#assign sourceCode = displayedCard.sourceCode> 
335                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
336                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
337                <#if (displayedCard.offerType=="143")> 
338                    <#assign productUrlHero="business-real-rewards"> 
339                    <#assign product="Business Real Rewards"> 
340                    <#assign cardIndex = 2> 
341                <#elseif (displayedCard.offerType=="144")> 
342                    <#assign productUrlHero="smart-business-rewards"> 
343                    <#assign product="Smart Business Rewards"> 
344                    <#assign cardIndex = 0> 
345                <#elseif (displayedCard.offerType=="121")> 
346                    <#assign productUrlHero = "business-platinum"> 
347                    <#assign product="Business"> 
348                    <#assign cardIndex = 3>                     
349                </#if> 
350            </#if> 
351            <#if product?has_content && product != ""> 
352                <#assign card_text = product + " Card"> 
353            </#if>  
354        </#if>		 
355            <div class="hero-container product-${productUrlHero} tier3-hero-${class.getData()}"> 
356                <div class="hero-main"> 
357                    <div class="hero-main-container"> 
358                        <div class="hero-main-offer"> 
359                            <div class="offer-detail"> 
360                                <div class="offer-detail-cardArt cardArtImg"> 
361                                    <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" 
362                                    class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
363                                    <#-- <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!'' }" 
364                                     class="jn-img-responsive">--> 
365                                    <p>${card_text!''}</p> 
366                                </div> 
367                                <div class="offer-detail-text text-color-default hide-desktop"> 
368                                    ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}                                 
369                                </div>                                                                        
370                                <#if isExcluded == 0>    
371								<#if useprcaValue == "1"> 
372								<form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer" method="post"> 
373									<input id='locationCode' type="hidden" name="locationCode" value="${lc}"> 
374									<input id='offerId' type="hidden" name="offerId" value="${offerId}"> 
375									<input type="hidden" name="preparerType" value="customer">  
376                                    </form> 
377								<a  
378									class="jn-button hide-desktop btn"  
379									data-button-name="cta-button-top"  
380									data-product-name="${productUrlHero!''}"  
381									href="#" 
382									offerId="${offerId!''}" 
383									onclick="submitForm(event)"									 
384
385									${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
386								</a> 
387								 
388								 
389								 
390							<#else> 
391								<a  
392									class="jn-button hide-desktop btn"  
393									data-button-name="cta-button-top"  
394									data-product-name="${productUrlHero!''}"  
395									href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"                                    
396
397									${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
398								</a> 
399							</#if> 
400 
401                                <#else> 
402                                    <a  
403                                        class="jn-button hide-desktop btn"  
404                                        data-button-name="cta-button-top"  
405                                        data-product-name="${productUrlHero!''}"  
406                                        data-micromodal-trigger="modal-index-hero" 
407                                        href="javascript:void(0);" 
408
409                                        ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
410                                    </a> 
411                                </#if> 
412                            </div> 
413                            <div class="offer-header"> 
414                                <div class="offer-text-top"> 
415                                    ${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()} 
416                                </div> 
417                                <div class="offer-text-bottom hide-mobile"> 
418                                    <div class="offer-detail-text text-color-default "> 
419                                        ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}                                        
420                                    </div> 
421                                     
422                                    <#if isExcluded == 0>  
423									<#if useprcaValue == "1"> 
424									 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer" method="post"> 
425												<input id='locationCode' type="hidden" name="locationCode" value="${lc}"> 
426												<input id='offerId' type="hidden" name="offerId" value="${offerId!''}"> 
427												<input type="hidden" name="preparerType" value="customer">	 
428												</form> 
429									<a  
430                                            class="jn-button"  
431                                            data-button-name="cta-button-top"  
432                                            data-product-name="${productUrlHero!''}" 
433                                            href="#" 
434											offerId="${offerId!''}" 
435											onclick="submitForm(event)" 
436
437                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
438                                        </a> 
439									     
440									     <#else> 
441                                        <a  
442                                            class="jn-button"  
443                                            data-button-name="cta-button-top"  
444                                            data-product-name="${productUrlHero!''}" 
445                                            href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"  
446
447                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
448                                        </a> 
449										</#if> 
450                                    <#else> 
451                                        <a  
452                                            class="jn-button"  
453                                            data-button-name="cta-button-top"  
454                                            data-product-name="${productUrlHero!''}" 
455                                            data-micromodal-trigger="modal-index-hero" 
456                                            href="javascript:void(0);" 
457
458                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
459                                        </a> 
460                                    </#if> 
461                                </div> 
462                            </div>                           
463                        </div> 
464                    </div> 
465                </div> 
466            </div> 
467 
468            <div aria-hidden="true" class="modal micromodal-slide" id="modal-index-hero" > 
469                <div class="excludeModal__overlay" data-micromodal-close tabindex="-1"> 
470                    <div  
471                        aria-modal="true"  
472                        aria-labelledby="modal-index-hero-title"  
473                        class="excludeModal__container"  
474                        role="dialog" 
475
476                        <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button> 
477                        <header class="excludeModal__header"> 
478                            <h2 class="excludeModal__title" id="modal-index-hero-title"> 
479                                <#if productTitle.getSiblings()[cardIndex].excludedMessage?? > 
480                                    ${productTitle.getSiblings()[cardIndex].excludedMessage.getData()!""} 
481                                </#if> 
482                            </h2> 
483                        </header> 
484                    </div> 
485                </div> 
486            </div> 
487    <#else>      
488        <#assign hasBalanceTransferCalculator = false> 
489        <#list fiCardsData as fib>     
490            <#switch fib.offerType>     
491                <#case "101"> 
492                    <#assign cardIndex = 3 > 
493                    <#assign productUrlHero = "consumer-edr"> 
494                    <#assign product="Everyday Rewards+">                     
495                    <#assign hasBalanceTransferCalculator = false>                   
496                    <#break>  
497                <#case "103">              
498                    <#assign cardIndex = 3 > 
499                    <#assign productUrlHero = "consumer-edr"> 
500                    <#assign product="Everyday Rewards+">                     
501                     <#assign hasBalanceTransferCalculator = false>                   
502                   <#break>          
503                <#case "104"> 
504                    <#assign cardIndex = 0 > 
505                    <#assign productUrlHero="max-cash"> 
506                    <#assign product="Max Cash Preferred">                       
507                    <#assign hasBalanceTransferCalculator = false>                   
508                    <#break> 
509                <#case "108"> 
510                    <#assign cardIndex = 1 > 
511                    <#assign productUrlHero = "consumer-platinum"> 
512                    <#assign product="Platinum">     
513                    <#assign hasBalanceTransferCalculator = true>                   
514                    <#break> 
515                <#case "109"> 
516                    <#assign cardIndex = 1 > 
517                    <#assign productUrlHero = "consumer-platinum"> 
518                    <#assign product="Platinum">    
519                    <#assign hasBalanceTransferCalculator = true>                                                          
520                    <#break>                                         
521                 <#case "141">                  
522                    <#assign cardIndex = 4 > 
523                    <#assign productUrlHero = "college-real-rewards"> 
524                    <#assign product = "College Real Rewards" >  
525                     <#assign hasBalanceTransferCalculator = false>                   
526                   <#break>  
527                <#case "147"> 
528                    <#assign cardIndex = 5 > 
529                    <#assign productUrlHero = "max-cash-secured"> 
530                    <#assign product = "Max Cash Secured" >  
531                    <#assign hasBalanceTransferCalculator = false>                   
532                    <#break>   
533                <#case "115"> 
534                    <#assign cardIndex = 2 > 
535                    <#assign productUrlHero = "secured"> 
536                    <#assign product="Secured">                     
537                    <#assign hasBalanceTransferCalculator = false>                   
538                    <#break>  
539                <#case "138"> 
540                    <#assign cardIndex = 6 > 
541                    <#assign productUrlHero = "travel-rewards-plus"> 
542                    <#assign product="Travel Rewards+">                     
543                    <#assign hasBalanceTransferCalculator = false>                   
544                    <#break>  
545                <#case "154"> 
546                    <#assign cardIndex = 7 > 
547                    <#assign productUrlHero = "reserve-rewards-plus"> 
548                    <#assign product="Reserve Rewards+">                     
549                    <#assign hasBalanceTransferCalculator = false>                   
550                    <#break>  
551                <#case "128"> 
552                    <#assign cardIndex = 1 > 
553                    <#assign productUrlHero = "business-cash-preferred"> 
554                    <#assign product="Business Cash Preferred">                     
555                    <#assign hasBalanceTransferCalculator = false>                   
556                    <#break>     
557                <#case "143"> 
558                    <#assign cardIndex = 2 > 
559                    <#assign productUrlHero = "business-real-rewards"> 
560                    <#assign product="Business Real Rewards">                     
561                    <#assign hasBalanceTransferCalculator = false>                   
562                    <#break>     
563                <#case "144"> 
564                    <#assign cardIndex = 0 > 
565                    <#assign productUrlHero = "smart-business-rewards"> 
566                    <#assign product="Smart Business Rewards">                                          
567                    <#assign hasBalanceTransferCalculator = false>                   
568                    <#break>                                   
569                <#case "121"> 
570                    <#assign cardIndex = 3 > 
571                    <#assign productUrlHero = "business-platinum"> 
572                    <#assign product="Business">                      
573                    <#assign hasBalanceTransferCalculator = false>                   
574                    <#break>                                      
575                <#default> 
576            </#switch>                          
577            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">  
578            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg">   
579             
580            <script> 
581               console.log("offerType ${fib.offerType} productUrlHero ${productUrlHero} show calculator ${hasBalanceTransferCalculator?c}")                         
582            </script> 
583                                                                         
584            <#if url?matches(".*/${productUrlHero}\\?.*")>  
585                <#assign isExcluded = 0> 
586				 <script> 
587               console.log("fib.dmaexclude------>"+'${fib.dmaexclude}');                        
588            </script> 
589                <#if fib.dmaexclude??> 
590                    <#assign isExcluded = fib.dmaexclude?number!0> 
591                </#if>    
592                <#if (fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "121")> 
593 
594                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', '${fib.offerId}' + '&'+ '${fib.sourceCode}')> 
595                    <#if (scrapedData?size > 0)> 
596                            <#list scrapedData as sItem> 
597                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
598                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
599                                    <#break> 
600                                </#if> 
601 
602                            </#list> 
603                            <script> 
604                                $(document).ready(function () { 
605                                    var aprText = "${apr}"; 
606                                    //console.log('aprText',aprText); 
607                                    if (aprText) { 
608                                      $(".apr-full-text").html(aprText); 
609                                        try { 
610                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
611                                            var billing_cycle = matches[1]; 
612                                            var apr_min = apr_min = matches[2]; 
613                                            var apr_max = apr_max = matches[3]; 
614                                            //console.log('billing_cycle', billing_cycle); 
615                                            //console.log('apr_min', apr_min); 
616                                            //console.log('apr_max', apr_max); 
617                                            if (billing_cycle) { 
618                                                //console.log($(".scraped-billing-cycle")); 
619                                                $(".scraped-billing-cycle").html(billing_cycle); 
620
621                                            if (apr_min) { 
622                                                $(".scraped-apr-min").html(apr_min); 
623
624                                            if (apr_max) { 
625                                                $('.scraped-apr-max').html(apr_max); 
626
627 
628                                        } catch (e) { 
629                                            console.log(e); 
630
631
632                                }); 
633                            </script> 
634                    </#if>   
635                </#if>      
636                <#if product?has_content && product != ""> 
637                    <#assign card_text = product + " Card"> 
638                </#if>    
639                <#assign tc_offerTypes = ['108', '109', '121', '144']> 
640                <#assign calculator_offerTypes = ['101', '104', '138', '154', '128', '143', '144']> 
641                <div class="hero-container ${class.getData()}"> 
642                    <div class="hero-main"> 
643                        <div class="hero-main-container"> 
644                            <div class="hero-main-offer"> 
645                                <div class="offer-detail"> 
646                                    <div class="offer-detail-cardArt cardArtImg"> 
647                                        <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" 
648                                        onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'" class="jn-img-responsive"> 
649                                        <p>${card_text!''}</p> 
650                                        <#if (hasBalanceTransferCalculator)> 
651                                            <a href="javascript:void(0);" data-micromodal-trigger="modal-2"aria-hidden="true" >See how much you could save with a balance transfer</a> 
652                                        </#if> 
653                                    </div> 
654                                    <div class="offer-detail-text text-color-default hide-desktop"> 
655                                        ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()} 
656 
657                                        <#if (tc_offerTypes?seq_contains(fib.offerType))> 
658                                            <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}"  target="_blank"> 
659                                                <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions 
660                                            </a> 
661                                        </#if> 
662                                        <#if (calculator_offerTypes?seq_contains(fib.offerType))> 
663                                            <a class="whiteLink" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' target="_blank" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
664                                        </#if> 
665                                    </div> 
666                                     
667                                    <#if isExcluded == 0> 
668									 <#if useprcaValue == "1"> 
669									  <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId!''}&preparerType=customer" method="post"> 
670								<input id='locationCode' type="hidden" name="locationCode" value="${lc}"> 
671								<input id='offerId' type="hidden" name="offerId" value="${fib.offerId!''}"> 
672								<input type="hidden" name="preparerType" value="customer"> 
673								</form> 
674 
675									  <a  
676                                            class="jn-button hide-desktop btn"  
677                                            data-button-name="cta-button-top"  
678                                            data-product-name="${productUrlHero!''}"   
679                                            href="#"  
680											offerId="${fib.offerId!''}" 
681											onclick="submitForm(event)" > 
682                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
683                                        </a> 
684									     
685									     <#else> 
686                                        <a  
687                                            class="jn-button hide-desktop btn"  
688                                            data-button-name="cta-button-top"  
689                                            data-product-name="${productUrlHero!''}"   
690                                            href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"                               
691
692                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
693											 
694                                        </a> 
695										</#if> 
696                                    <#else> 
697                                        <a                                              
698                                            class="jn-button hide-desktop btn"  
699                                            data-button-name="cta-button-top"  
700                                            data-product-name="${productUrlHero!''}"    
701                                            data-micromodal-trigger="modal-product-hero" 
702                                            href="javascript:void(0);"                             
703
704                                            ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
705                                        </a> 
706                                    </#if> 
707                                </div> 
708                                <div class="offer-header"> 
709                                    <div class="offer-text-top"> 
710                                        ${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()} 
711                                    </div> 
712                                    <div class="offer-text-bottom hide-mobile"> 
713                                        <div class="offer-detail-text text-color-default "> 
714                                            ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()} 
715                                            <#if (tc_offerTypes?seq_contains(fib.offerType))> 
716                                                <a class="whiteLink" href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}"  target="_blank"> 
717                                                    <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions 
718                                                </a> 
719                                            </#if> 
720                                        </div> 
721                                         
722                                         <#if isExcluded == 0>  
723										    <#if useprcaValue == "1"> 
724											<form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  method="post" >	 
725													<input id='locationCode' type="hidden" name="locationCode" value="${lc}"> 
726													<input id='offerId' type="hidden" name="offerId" value="${fib.offerId!''}"> 
727													<input type="hidden" name="preparerType" value="customer"> 
728													</form> 
729                                            <a  
730                                                class="jn-button"  
731                                                data-button-name="cta-button-top"  
732                                                data-product-name="${productUrlHero!''}"  
733                                                href="#"  
734												offerId="${fib.offerId!''}" 
735												onclick="submitForm(event)" > 
736                                                ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
737                                            </a> 
738												 
739											 <#else> 
740											   <a  
741                                                class="jn-button"  
742                                                data-button-name="cta-button-top"  
743                                                data-product-name="${productUrlHero!''}"  
744                                                href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"  
745
746                                                ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
747												 
748                                            </a> 
749											 </#if> 
750                                         <#else> 
751                                            <a  
752                                                class="jn-button"  
753                                                data-button-name="cta-button-top"  
754                                                data-product-name="${productUrlHero!''}"  
755                                                data-micromodal-trigger="modal-product-hero" 
756                                                href="javascript:void(0);"  
757
758                                                ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${product!''} Credit Card </span> 
759                                            </a> 
760                                         </#if> 
761                                         <#if (calculator_offerTypes?seq_contains(fib.offerType))> 
762                                            <a class="whiteLink" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' target="_blank" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
763                                        </#if> 
764                                    </div> 
765                                </div> 
766                                 
767                            </div> 
768                        </div> 
769                    </div> 
770                </div> 
771 
772                <div aria-hidden="true" class="modal micromodal-slide" id="modal-product-hero" > 
773                    <div class="excludeModal__overlay" data-micromodal-close tabindex="-1"> 
774                        <div  
775                            aria-modal="true"  
776                            aria-labelledby="modal-prodcut-hero-title"  
777                            class="excludeModal__container"  
778                            role="dialog" 
779
780                            <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button> 
781                            <header class="excludeModal__header"> 
782                                <h2 class="excludeModal__title" id="modal-prodcut-hero-title"> 
783                                    <#if productTitle.getSiblings()[cardIndex].excludedMessage?? > 
784                                        ${productTitle.getSiblings()[cardIndex].excludedMessage.getData()!""} 
785                                    </#if> 
786                                </h2> 
787                            </header> 
788                        </div> 
789                    </div> 
790                </div> 
791                <#break /> 
792            </#if> 
793        </#list>    
794 
795    </#if> 
796</#if> 
797<!-- https://micromodal.vercel.app/ --> 
798<script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
799 
800<script> 
801   
802    AUI().ready(function(){ 
803        //The below script is there to add vertical card art in UAT only so that QA has an easier time auditing. Note that the script only applies to FI SouthState (location code 20419) which is currently the only bank with vertical card art at the moment  
804        var locationCodeParam = '${lc}'; 
805        var currentEnvironmentParam = '${currentEnvironment}'; 
806        if(locationCodeParam == '20419' && currentEnvironmentParam == 'uat'){ 
807            Array.prototype.slice.call(document.querySelectorAll('.cardArtImg')).map(function(e){e.firstElementChild.src = "https://39f6f821fa03de239594-9f1c16ccc3b26ce57656bb4af99947b6.ssl.cf2.rackcdn.com/f20cf80a-6aea-46ec-84fc-c2a6583773d9.png"}) 
808        }    
809 
810        MicroModal.init();      
811    }); 
812</script> 
813<script> 
814    if(typeof setHeaderBackground === 'undefined') { let setHeaderBackground = () => {};} 
815    setHeaderBackground = () => { 
816        // Makes the Header subtitle work if there is two lines of text  
817        //product page header 
818        var consumerHeader = document.getElementsByClassName("landing-consumer")[0]; 
819        if(!consumerHeader) { 
820            //index page header 
821            consumerHeader = document.getElementsByClassName("tier3-hero-landing-consumer")[0]; 
822
823         
824        if(consumerHeader) { 
825            var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0]; 
826            var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle")[0]; 
827            const offerTextTop = consumerHeader.querySelector(".offer-text-top"); 
828             
829            if (consumerOfferHeader.innerText.length >= 76){ 
830                const gradientHeight = Math.max(offerTextTop.offsetHeight + 40, 200) + "px"; 
831                //two lines 
832                //offerTextTop.style.marginTop = '0px'; 
833                //document.querySelector('.offer-text-bottom').style.marginTop = '25px'; 
834                //prevent button and text going into blue section 
835                //consumerHeader.querySelector('.offer-text-top h1').style.minHeight = "120px"; 
836                consumerHeroContainer.style.background = "linear-gradient(180deg, ${backgroundColor!'#173989'} " + gradientHeight + ", #f8f8f8 " + gradientHeight + ")"; 
837
838
839        //product page header 
840        var buisnessHeader = document.getElementsByClassName("landing-business")[0]; 
841        if(!buisnessHeader) { 
842            //index page header 
843            buisnessHeader = document.getElementsByClassName("tier3-hero-landing-business")[0]; 
844
845 
846        if(buisnessHeader) { 
847            var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0]; 
848            var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0]; 
849 
850            if (buisnessOfferHeader.innerText.length >= 48){ 
851                //two lines 
852                buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)"; 
853
854
855    }; 
856    /* 
857        sometimes this runs before the text height it is refercning is loaded. Resulting in incorect background styles. If only in aui.ready then it flashes incorect styles then goes to correct styles everytime. 
858        With the aui.ready and imediate call it normal loads correctly but if it loads before header text it will still flash incorect styles and then be fixed. 
859    */ 
860    setHeaderBackground(); 
861    AUI().ready(function(){setHeaderBackground();});	 
862	  
863 
864</script> 
865<script> 
866    var excluded = '${isExcluded}';  
867	var useprcaValue = '${useprcaValue}'; 
868	var url23 ='${url}'; 
869    function submitForm(event) { 
870        event.preventDefault(); 
871		var offerId = event.target.getAttribute("offerId");		 
872		console.log("offerId::::::::::::::"+offerId); 
873 
874        var lc = document.getElementById('locationCode').value; 
875        //var offerId = document.getElementById('offerId').value; 
876		//var sourceCode = document.getElementById('sourceCode').value; 
877         
878        // Construct the URL         
879		var url = "${prcaURL}?locationCode=" + lc + "&offerId=" + offerId + "&preparerType=customer"; 
880 
881 
882        // Set the form action to the constructed URL 
883        document.getElementById('applyForm').action = url; 
884 
885        // Submit the form 
886		postCreditcardLearnMore(url); 
887        //document.getElementById('applyForm').submit(); 
888
889	function postCreditcardLearnMore(path, method='post') { 
890    // Create a form element 
891    const form = document.createElement('form'); 
892    form.method = method; 
893	//form.target = '_blank'; // Open in a new tab 
894    form.action = path; 
895 
896    // Add each parameter as a hidden input field     
897 
898    document.body.appendChild(form); 
899    form.submit(); 
900
901	 
902</script> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#155407401" at line 14, column 15]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#155407401" at line 14, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
4<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
5<#assign environment = url?replace('/index.*','','r')> 
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
7<#assign prcaURL = propsUtil.get('elan.prca.url')> 
8 
9<script> 
10var currentUrl = '${url}'; 
11 
12</script> 
13<#assign useprcaValue = "" > 
14<#assign lc = qstringmap["ecdma-lc"]?first>  
15<#assign lc = htmlUtil.escape(lc)> 
16<#assign lc = htmlUtil.escapeJS(lc)> 
17 
18<#assign prefix = "00000" > 
19<#assign lcWithPrefix = prefix + lc > 
20<#assign withPrefixLength = lcWithPrefix?length > 
21<#assign startHere = withPrefixLength - 5> 
22<#assign lc = lcWithPrefix?substring(startHere)> 
23 
24 
25<#if qstringmap["ecid"]?has_content> 
26    <#assign ecidExt = qstringmap["ecid"]?first> 
27    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
28    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
29    <#assign ecidExt = "&ecid=" + ecidExt> 
30<#else> 
31    <#assign ecidExt=""> 
32</#if> 
33 
34<#if oadURL?contains("uat-")> 
35    <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' > 
36<#else> 
37    <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
38</#if> 
39 
40 
41<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
42<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
43<#assign clientProfile = clientProfileList?first> 
44<#assign partnerName = clientProfile.getMarketingNameLong()> 
45<#assign pbu = clientProfile.getPbu()> 
46<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
47<#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!> 
48 
49<#if qstringmap["ecid"]?has_content> 
50    <#assign ecidExt = qstringmap["ecid"]?first> 
51    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
52    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
53    <#assign ecidExt = "&ecid=" + ecidExt> 
54 
55    <#assign campaignId = qstringmap["ecid"]?first > 
56    <#assign campaignId = htmlUtil.escape(campaignId)> 
57    <#assign campaignId = htmlUtil.escapeJS(campaignId)> 
58<#else> 
59    <#assign ecidExt=""> 
60    <#assign campaignId = "" > 
61</#if> 
62 
63<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu + '&' + lc)>  
64<#-- filter duplicated cards--> 
65<#assign consumerCards = []> 
66<#assign businessCards = []>  
67<#assign offerTypeList = []>  
68<#assign consumerOfferTypes =['101', '104', '108', '109', '115', '141','147', '138', '154']> 
69<#assign businessOfferTypes =['144', '128', '143', '121']>      
70<#assign index = 0> 
71<#list fiCardsData as fib> 
72  <#assign useprcaValue = fib.useprca!"">   
73    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
74        <#assign offerTypeList = offerTypeList + [fib.offerType]>     
75        <#if consumerOfferTypes?seq_contains(fib.offerType)> 
76            <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
77        <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
78            <#assign businessCards = businessCards + fiCardsData[index..index]> 
79        </#if>                  
80    </#if>  
81    <#assign index = index + 1>                
82</#list>  
83 
84<style> 
85    .excludeModal__overlay { 
86        position: fixed; 
87        top: 0; 
88        left: 0; 
89        right: 0; 
90        bottom: 0; 
91        background: rgba(0,0,0,0.6); 
92        display: flex; 
93        justify-content: center; 
94        align-items: center; 
95
96 
97    .excludeModal__container { 
98        background-color: #fff; 
99        padding: 30px; 
100        min-width: 500px; 
101        max-width: 500px; 
102        max-height: 100vh; 
103        border-radius: 4px; 
104        overflow-y: auto; 
105        box-sizing: border-box; 
106
107 
108    .excludeModal__header { 
109        display: flex; 
110        justify-content: space-between; 
111        align-items: center; 
112
113 
114    .modal .excludeModal__container .excludeModal__title { 
115        margin-top: 0; 
116        margin-bottom: 0; 
117        font-weight: 600; 
118        font-size: 20px; 
119        line-height: 1.25; 
120        color: #00449e; 
121        box-sizing: border-box; 
122
123     
124    .excludeModal__close { 
125        background: transparent; 
126        border: 1px solid white; 
127        padding: 4px 8px; 
128        float: right; 
129
130 
131    .excludeModal__close:hover { 
132        border: 1px solid black; 
133
134 
135    .excludeModal__close:before { content: "\2715"; } 
136 
137    @keyframes mmfadeIn { 
138        from { opacity: 0; } 
139        to { opacity: 1; } 
140
141 
142    @keyframes mmfadeOut { 
143        from { opacity: 1; } 
144        to { opacity: 0; } 
145
146 
147    @keyframes mmslideIn { 
148        from { transform: translateY(15%); } 
149        to { transform: translateY(0); } 
150
151 
152    @keyframes mmslideOut { 
153        from { transform: translateY(0); } 
154        to { transform: translateY(-10%); } 
155
156 
157    .micromodal-slide { 
158        display: none; 
159
160 
161    .micromodal-slide.is-open { 
162        display: block; 
163
164 
165    .micromodal-slide[aria-hidden="false"] .excludeModal__overlay { 
166        animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
167
168 
169    .micromodal-slide[aria-hidden="false"] .excludeModal__container { 
170        animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
171
172 
173    .micromodal-slide[aria-hidden="true"] .excludeModal__overlay { 
174        animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
175
176 
177    .micromodal-slide[aria-hidden="true"] .excludeModal__container { 
178        animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
179
180 
181    .micromodal-slide .excludeModal__container, 
182    .micromodal-slide .excludeModal__overlay { 
183        will-change: transform; 
184
185</style> 
186 
187<#if ((consumerCards?size > 0) || (businessCards?size > 0))> 
188    <div class="content-container content-container-main jn-consumer-content"> 
189        <#if ((consumerCards?size > 0) && (businessCards?size > 0))> 
190            <nav class="jn-primary-nav two-tabs"> 
191                <ul> 
192                    <li title="${partnerName!''} - Personal products"> 
193                        <a href="#" class="tab-nav active" id="consumerTab"><span>Personal</span></a> 
194                    </li> 
195                    <li title="${partnerName!''} - Business products"> 
196                        <a href="#" class="tab-nav" id="businessTab"><span>Business</span></a> 
197                    </li> 
198                </ul> 
199            </nav> 
200        <#else> 
201            <#if (consumerCards?size > 0)> 
202                <nav class="jn-primary-nav" title="${partnerName!''} - Personal products"> 
203                    <ul> 
204                        <li> 
205                            <p class="tab-nav" id="consumerTab"><span>Personal</span></p> 
206                        </li> 
207                    </ul> 
208                </nav> 
209            </#if> 
210            <#if (businessCards?size > 0)> 
211                <nav class="jn-primary-nav" title="${partnerName!''} - Business products"> 
212                    <ul> 
213                        <li> 
214                            <p class="tab-nav" id="businessTab"><span>Business</span></p> 
215                        </li> 
216                    </ul> 
217                </nav> 
218            </#if> 
219        </#if> 
220        <#if (consumerCards?size > 0)> 
221            <div class="tab-more-wrapper">   
222                <div class="jn-consumer-content-wrapper jn-tab-content active transition-start" data-id="consumerTab" title="${partnerName!''} - Personal products"> 
223                     
224                    <#list consumerCards as fib>    
225                            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png" > 
226                            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg" > 
227                            <#assign hasBalanceTransferCalculator = false> 
228                            <#switch fib.offerType> 
229                                <#case "101"> 
230                                    <#assign productName = "consumer-edr"> 
231                                    <#assign productUrl = "202302/consumer-edr"> 
232                                    <#assign product="Everyday Rewards+"> 
233                                    <#assign cardIndex = 0> 
234                                    <#break> 
235                                <#case "108"> 
236                                    <#assign productName = "consumer-platinum"> 
237                                    <#assign productUrl = "202308/consumer-platinum"> 
238                                    <#assign product="Platinum"> 
239                                    <#assign cardIndex = 2> 
240                                    <#assign hasBalanceTransferCalculator = true> 
241                                    <#break> 
242                                <#case "109"> 
243                                    <#assign productName = "consumer-platinum"> 
244                                    <#assign productUrl = "202308/consumer-platinum"> 
245                                    <#assign product="Platinum"> 
246                                    <#assign cardIndex = 2> 
247                                    <#assign hasBalanceTransferCalculator = true> 
248                                    <#break>                                            
249                                <#case "115"> 
250                                    <#assign productName = "secured"> 
251                                    <#assign productUrl = "secured"> 
252                                    <#assign product="Secured"> 
253                                    <#assign cardIndex = 5> 
254                                    <#break> 
255                                <#case "104"> 
256                                    <#assign productName = "max-cash"> 
257                                    <#assign productUrl = "max-cash"> 
258                                    <#assign product="Max Cash Preferred"> 
259                                    <#assign cardIndex = 1> 
260                                    <#break> 
261                                <#case "147"> 
262                                    <#assign productName = "max-cash-secured"> 
263                                    <#assign productUrl = "max-cash-secured"> 
264                                    <#assign product="Max Cash Secured"> 
265                                    <#assign cardIndex = 4> 
266                                    <#break> 
267                                <#case "141"> 
268                                    <#assign productName = "college-real-rewards"> 
269                                    <#assign productUrl = "college-real-rewards"> 
270                                    <#assign product="College Real Rewards"> 
271                                    <#assign cardIndex = 3> 
272                                    <#break> 
273                                <#case "138"> 
274                                    <#assign productName = "travel-rewards-plus"> 
275                                    <#assign productUrl = "202305/travel-rewards-plus"> 
276                                    <#assign product="Travel Rewards+"> 
277                                    <#assign cardIndex = 10> 
278                                    <#break> 
279                                <#case "154"> 
280                                    <#assign productName = "reserve-rewards-plus"> 
281                                    <#assign productUrl = "202305/reserve-rewards-plus"> 
282                                    <#assign product="Reserve Rewards+"> 
283                                    <#assign cardIndex = 11> 
284                                    <#break> 
285                                <#default> 
286                            </#switch> 
287                            <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
288                            <#assign titleText = titleText?replace('<[^>]+>','','r')> 
289                            <#assign newTag = ""> 
290                            <#if (consumerTitle.getSiblings()[cardIndex].addNewTag?has_content && consumerTitle.getSiblings()[cardIndex].addNewTag.getData() == "true")> 
291                                <#assign newTag = "with-new-tag"> 
292                            </#if> 
293                            <#assign APR=""> 
294                            <#assign AMF=""> 
295                            <#assign BAL=""> 
296                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
297                            <#if (scrapedData?size > 0)> 
298                                <#list scrapedData as sItem> 
299                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
300                                        <#assign APR = sItem.scrapedValue>                                    
301                                    <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
302                                        <#assign AMF = sItem.scrapedValue> 
303                                    <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) > 
304                                        <#assign BAL = sItem.scrapedValue> 
305                                    </#if> 
306                                    <#if (APR?has_content && AMF?has_content && BAL?has_content)> 
307                                        <#break> 
308                                    </#if> 
309                                </#list> 
310                            </#if>                                      
311                            <div class="${newTag} jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
312                                <div class="tag-container"> 
313                                    <div class="tag-corner"> 
314                                        <div class="tag-label">NEW</div> 
315                                    </div> 
316                                </div> 
317                                <div class="consumer-card-heading hide-desktop"> 
318                                    <div class="consumer-card-heading__subheading">${consumerTitle.getSiblings()[cardIndex].Title.getData()}</div> 
319                                    ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
320                                </div> 
321                                <div class="jn-consumer-card-image"> 
322                                    <img src="${cardArtImage!''}" alt="${partnerName!''} ${product!''} Card" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
323                                    <#assign calculatorConsumerOfferTypes = ["101", "103", "104", "138", "154"] > 
324                                    <#if (calculatorConsumerOfferTypes?seq_contains(fib.offerType))> 
325                                        <a class="reward-calculator-link" target="_blank" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' class="whiteLink" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
326                                    </#if> 
327                                    <#if consumerTitle.getSiblings()[cardIndex].cardArtDescription?has_content> 
328                                        <p class="tier3-tabs-card-art-description">${consumerTitle.getSiblings()[cardIndex].cardArtDescription.getData()}</p> 
329                                    </#if> 
330                                    <#if (hasBalanceTransferCalculator)> 
331                                        <a style="display: block; text-align: center; max-width: 285px; margin: auto;" href="javascript:void(0);" data-micromodal-trigger="modal-2">See how much you could save with a balance transfer</a> 
332                                    </#if> 
333                                </div> 
334                                 
335                                <div class="jn-consumer-card-info"> 
336                                    <div class="consumer-card-heading hide-mobile"> 
337                                        <div class="consumer-card-heading__subheading">${consumerTitle.getSiblings()[cardIndex].Title.getData()}</div> 
338                                        ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
339                                    </div> 
340                                    <div class="jn-additional"> 
341                                            <ul class="${fib.offerType}">    
342                                                <li> 
343                                                    <p> 
344                                                        <#if (fib.offerType == "104")> 
345                                                          <strong>APR for Purchases: </strong> 
346                                                        <#elseif (fib.offerType == "101" || 
347                                                            fib.offerType == "108" || 
348                                                            fib.offerType == "109" || 
349                                                            fib.offerType == "141"  
350                                                        )> 
351                                                            <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
352                                                        <#else> 
353                                                            <strong>APR for Purchases and Balance Transfers: </strong> 
354                                                        </#if> 
355                                                        ${APR!''}  
356                                                        <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank" class="t_c_link"> 
357                                                            <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions. 
358                                                        </a> 
359                                                    </p> 
360                                                </li> 
361                                                <#if (fib.offerType == "104")> 
362                                                    <li class="${fib.offerType}"> 
363                                                        <p> 
364                                                            <strong>Intro APR<sup>*</sup> for Balance Transfers: </strong> 
365                                                            ${BAL!''}  
366                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank" class="t_c_link"> 
367                                                                <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions. 
368                                                            </a> 
369                                                        </p> 
370                                                    </li> 
371                                                </#if>          
372         
373                                                <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
374                                                    <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
375                                                        <li>${marketingInfo.getData()}</li> 
376                                                    </#list> 
377                                                </#if> 
378                                                <li> 
379                                                    <p>Annual Fee: ${AMF!''}  
380                                                        <a  href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}"  target="_blank" class="t_c_link"> 
381                                                            <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions. 
382                                                        </a> 
383                                                    </p> 
384                                                </li> 
385                                            </ul> 
386                                    </div> 
387                                    <ul class="actions"> 
388                                        <li> 
389                                            <#assign isExcluded = 0> 
390                                            <#if fib.dmaexclude??> 
391                                                <#assign isExcluded = fib.dmaexclude?number!0> 
392                                            </#if>                                           
393                                            <#if isExcluded == 0>  
394											 <#if useprcaValue == "1"> 
395												<a  
396                                                    class="applyNowLink"  
397                                                    data-button-name="apply-now-link"  
398                                                    data-product-name="${productName!''}" 
399                                                    href="#" 
400													offerId="${fib.offerId}" 
401													onclick="submitForm(event)"	 
402
403                                                    ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
404                                                </a>											  
405											  <form id="applyForm" action="${prcaURL}?locationCode=${lc}&amp;offerId=${fib.offerId}&amp;preparerType=customer" method="post"> 
406													<input type="hidden" name="locationCode" value="${lc}" id="locationCode"> 
407													<input type="hidden" name="offerId" value="${fib.offerId}" id="offerId"> 
408													<input type="hidden" name="preparerType" value="customer"> 
409													</form> 
410											<#else> 
411                                                <a  
412                                                    class="applyNowLink"  
413                                                    data-button-name="apply-now-link"  
414                                                    data-product-name="${productName!''}" 
415                                                    href="${oadURL}?locationCode=${lc}&amp;offerId=${fib.offerId}&amp;preparerType=customer"  
416
417                                                    ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
418                                                </a> 
419											  </#if> 
420                                            <#else> 
421                                                <a  
422                                                    class="applyNowLink"  
423                                                    data-button-name="apply-now-link"  
424                                                    data-product-name="${productName!''}" 
425                                                    data-micromodal-trigger="modal-consumer-tabs-${fib.offerType}" 
426                                                    href="javascript:void(0);" 
427
428                                                    ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
429                                                </a> 
430 
431                                            </#if> 
432                                        </li> 
433                                        <li><a href="${environment}/${productUrl}?ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}<span class="screen-reader-only"> about ${partnerName!''} ${product!''} Card </span></a> 
434                                        </li> 
435                                    </ul> 
436                                </div> 
437                            </div> 
438                    </#list> 
439                </div> 
440            </div> 
441        </#if> 
442        <#if (businessCards?size > 0)>   
443        <div class="tab-more-wrapper">      
444            <div class="jn-consumer-content-wrapper jn-tab-content transition-start" data-id="businessTab" title="${partnerName!''} - Business products"> 
445                 
446                <#list businessCards as fib> 
447                        <#assign cardArtImage = cdnCardArtUrl + "/"+fib.filename+".png"> 
448                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg"> 
449                        <#switch fib.offerType> 
450                            <#case "128"> 
451                                <#assign productName = "business-cash-preferred"> 
452                                <#assign productUrl = "business-cash-preferred"> 
453                                <#assign product="Business Cash Preferred"> 
454                                <#assign cardIndex = 6> 
455                                <#break> 
456                            <#case "121"> 
457                                <#assign productName = "business-platinum"> 
458                                <#assign productUrl = "202208/business-platinum"> 
459                                <#assign product="Business Card"> 
460                                <#assign cardIndex = 7> 
461                                <#break> 
462                            <#case "144"> 
463                                <#assign productName = "smart-business-rewards"> 
464                                <#assign productUrl = "smart-business-rewards"> 
465                                <#assign product="Smart Business Rewards"> 
466                                <#assign cardIndex = 8> 
467                                <#break>                             
468                            <#case "143"> 
469                                <#assign productName = "business-real-rewards"> 
470                                <#assign productUrl = "business-real-rewards"> 
471                                <#assign product="Business Real Rewards"> 
472                                <#assign cardIndex = 9> 
473                                <#break> 
474                             
475                            <#default> 
476                        </#switch> 
477                        <#assign newTag = ""> 
478                        <#if (consumerTitle.getSiblings()[cardIndex].addNewTag?has_content && consumerTitle.getSiblings()[cardIndex].addNewTag.getData() == "true")> 
479                            <#assign newTag = "with-new-tag"> 
480                        </#if> 
481                         
482                        <#assign APR=""> 
483                        <#assign AMF="">                                           
484                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
485                            <#if (scrapedData?size > 0)> 
486                                <#list scrapedData as sItem> 
487                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
488                                        <#assign APR = sItem.scrapedValue> 
489                                    <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
490                                        <#assign AMF = sItem.scrapedValue> 
491                                    </#if> 
492                                    <#if (APR?has_content && AMF?has_content)> 
493                                        <#break> 
494                                    </#if> 
495                                </#list> 
496                            </#if> 
497 
498                        <div class="${newTag} jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
499                            <div class="tag-container"> 
500                                <div class="tag-corner"> 
501                                    <div class="tag-label">NEW</div> 
502                                </div> 
503                            </div> 
504                            <div class="consumer-card-heading hide-desktop"> 
505                                <div class="consumer-card-heading__subheading">${consumerTitle.getSiblings()[cardIndex].Title.getData()}</div> 
506                                ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
507                            </div> 
508                            <div class="jn-consumer-card-image"> 
509 
510                                <img  
511                                    src="${cardArtImage!''}"  
512                                    alt="${partnerName!''} ${product!''} Card"  
513                                    class="jn-img-responsive"  
514                                    onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'" 
515
516                                <#assign calculatorBizOfferTypes = ["144", "143", "128"] > 
517                                <#if (calculatorBizOfferTypes?seq_contains(fib.offerType))> 
518                                 <a class="reward-calculator-link" target="_blank" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' class="whiteLink" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
519                                </#if> 
520                                <#if consumerTitle.getSiblings()[cardIndex].cardArtDescription?has_content> 
521                                    <p class="tier3-tabs-card-art-description">${consumerTitle.getSiblings()[cardIndex].cardArtDescription.getData()}</p> 
522                                </#if> 
523                            </div> 
524                            <div class="jn-consumer-card-info"> 
525                                <div class="consumer-card-heading hide-mobile"> 
526                                    <div class="consumer-card-heading__subheading">${consumerTitle.getSiblings()[cardIndex].Title.getData()}</div> 
527                                    ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
528                                </div> 
529                                <div class="jn-additional"> 
530                                    <ul class="${fib.offerType}"> 
531                                        <li> 
532                                            <p> 
533                                            <#if (fib.offerType == "144")> 
534                                                <strong>APR for Purchases and Balance Transfers: </strong> 
535                                            <#else> 
536                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
537                                            </#if> 
538                                                ${APR!''} 
539                                                <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank" class="t_c_link"><span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions.</a> 
540                                            </p> 
541                                        </li> 
542                                         
543                                        <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
544                                            <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
545                                                <li>${marketingInfo.getData()}</li> 
546                                            </#list> 
547                                        </#if> 
548                                        <li><p>Annual Fee: ${AMF!''} <a 
549                                            href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank" class="t_c_link"><span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions.</a></p> 
550                                        </li> 
551                                    </ul> 
552                                </div> 
553                                <ul class="actions"> 
554                                    <li> 
555                                        <#assign isExcluded = 0> 
556                                        <#if fib.dmaexclude??> 
557                                            <#assign isExcluded = fib.dmaexclude?number!0> 
558                                        </#if>                                                                                    
559                                        <#if isExcluded == 0>   
560										 <#if useprcaValue == "1"> 
561												<a  
562                                                    class="applyNowLink"  
563                                                    data-button-name="apply-now-link"  
564                                                    data-product-name="${productName!''}" 
565                                                    href="#" 
566													offerId="${fib.offerId}" 
567													onclick="submitForm(event)"	 
568
569                                                    ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
570                                                </a>											  
571											  <form id="applyForm" action="${prcaURL}?locationCode=${lc}&amp;offerId=${fib.offerId}&amp;preparerType=customer" method="post"> 
572													<input type="hidden" name="locationCode" value="${lc}" id="locationCode"> 
573													<input type="hidden" name="offerId" value="${fib.offerId}" id="offerId"> 
574													<input type="hidden" name="preparerType" value="customer"> 
575													</form> 
576											<#else> 
577                                            <a  
578                                                href="${oadURL}?locationCode=${lc}&amp;offerId=${fib.offerId}&amp;preparerType=customer"  
579                                                class="applyNowLink"  
580                                                data-button-name="apply-now-link"  
581                                                data-product-name="${productName!''}" 
582
583                                                ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
584                                            </a> 
585											</#if> 
586                                        <#else> 
587                                            <a  
588                                                class="applyNowLink"  
589                                                data-button-name="apply-now-link"  
590                                                data-product-name="${productName!''}" 
591                                                data-micromodal-trigger="modal-business-tabs-${fib.offerType}" 
592                                                href="javascript:void(0);" 
593
594                                                ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
595                                            </a> 
596 
597                                        </#if> 
598                                    </li> 
599                                    <li><a href="${environment}/${productUrl}?ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}<span class="screen-reader-only"> about ${partnerName!''} ${product!''} Card </span></a></li> 
600                                </ul> 
601                            </div> 
602                        </div> 
603                         
604                </#list> 
605            </div> 
606            </div> 
607        </#if>  
608    </div> 
609 
610    <#if (consumerCards?size > 0)> 
611        <#list consumerCards as fib>  
612            <#assign isExcluded = 0> 
613            <#if fib.dmaexclude??> 
614                <#assign isExcluded = fib.dmaexclude?number!0> 
615            </#if>                                                        
616            <#if isExcluded == 1>     
617                <div aria-hidden="true" class="modal micromodal-slide" id="modal-consumer-tabs-${fib.offerType}" > 
618                    <div class="excludeModal__overlay" data-micromodal-close tabindex="-1" > 
619                        <div   
620                            aria-modal="true"  
621                            aria-labelledby="modal-consumer-tabs-title-${fib.offerType}"  
622                            class="excludeModal__container"  
623                            role="dialog" 
624
625                            <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button> 
626                            <header class="excludeModal__header"> 
627                                <h2 class="excludeModal__title" id="modal-consumer-tabs-title-${fib.offerType}"> 
628                                    <#if consumerTitle.getSiblings()[cardIndex].excludedMessage?? > 
629                                        ${consumerTitle.getSiblings()[cardIndex].excludedMessage.getData()!""} 
630                                    </#if> 
631                                </h2> 
632                            </header> 
633                        </div> 
634                    </div> 
635                </div> 
636            </#if> 
637        </#list> 
638    </#if> 
639 
640    <#if (businessCards?size > 0)>  
641        <#list businessCards as fib> 
642            <#assign isExcluded = 0> 
643            <#if fib.dmaexclude??>   
644                <#assign isExcluded = fib.dmaexclude?number!0> 
645            </#if>                                                    
646            <#if isExcluded == 1>    
647                <div aria-hidden="true" class="modal micromodal-slide" id="modal-business-tabs-${fib.offerType}" > 
648                    <div class="excludeModal__overlay" data-micromodal-close tabindex="-1"> 
649                        <div  
650                            aria-modal="true"  
651                            aria-labelledby="modal-business-tabs-title-${fib.offerType}"  
652                            class="excludeModal__container"  
653                            role="dialog" 
654
655                            <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button> 
656                            <header class="excludeModal__header"> 
657                                <h2 class="excludeModal__title" id="modal-business-tabs-title-${fib.offerType}"> 
658                                    <#if consumerTitle.getSiblings()[cardIndex].excludedMessage?? > 
659                                        ${consumerTitle.getSiblings()[cardIndex].excludedMessage.getData()!""} 
660                                    </#if> 
661                                </h2> 
662                            </header> 
663                        </div> 
664                    </div> 
665                </div> 
666            </#if> 
667        </#list> 
668    </#if> 
669 
670    <!-- https://micromodal.vercel.app/ --> 
671    <script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
672 
673    <script> 
674		 function submitForm(event) { 
675			event.preventDefault();  
676			 var offerId = event.target.getAttribute("offerId");			 
677			 console.log("offerId::::::::::::::"+offerId); 
678            var lc = document.getElementById('locationCode').value; 
679       // var offerId = document.getElementById('offerId').value;		 
680         
681        // Construct the URL 
682        var url = "${prcaURL}?locationCode=" + lc + "&offerId=" + offerId + "&preparerType=customer"; 
683		 
684		// Set the form action to the constructed URL 
685        document.getElementById('applyForm').action = url; 
686		 
687 
688		postCreditcardLearnMore(url); 
689		//document.getElementById('applyForm').submit(); 
690
691		 
692	function postCreditcardLearnMore(path, method='post') { 
693    // Create a form element 
694    const form = document.createElement('form'); 
695    form.method = method; 
696	//form.target = '_blank'; // Open in a new tab 
697    form.action = path; 
698 
699    // Add each parameter as a hidden input field     
700 
701    document.body.appendChild(form); 
702    form.submit(); 
703
704		 
705        AUI().ready(function() {                      
706            var tabs=$('.tab-nav'); 
707            var consumerSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="consumerTab"]'; 
708            var businessSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="businessTab"]'; 
709            var screenWidthMobile = 768; 
710            var screenWidth = window.innerWidth; 
711            var heroCardImgs = document.querySelectorAll('.jn-consumer-card-image img, .cardArtImg img'); 
712            for (var index = 0; index < heroCardImgs.length; index++) { 
713                var heroCardImg = heroCardImgs[index]; 
714                var heroCardSrc = heroCardImg.getAttribute("src"); 
715                if(heroCardSrc != "") { 
716                    resizeImg(heroCardImg); 
717
718
719             
720            if (tabs.length == 1) { 
721                $(tabs).parent().css('margin', '0'); 
722                if ($(consumerSelector).length > 0) { 
723                    hideHeroAndDisclaimer('business'); 
724                    showHeroAndDisclaimer('consumer'); 
725                    changeCardLayout(consumerSelector); 
726                    renumberFootnote("consumer"); 
727                    createMetaTag("consumer"); 
728                }  
729                if ($(businessSelector).length > 0) { 
730                    $(businessSelector).addClass('active'); 
731                    hideHeroAndDisclaimer('consumer'); 
732                    showHeroAndDisclaimer('business'); 
733                    changeCardLayout(businessSelector); 
734                    renumberFootnote("business"); 
735                    createMetaTag("business"); 
736
737            }  
738            if (tabs.length == 2) { 
739                renumberFootnote("consumer"); 
740                renumberFootnote("business"); 
741                createMetaTag("consumer"); 
742                 
743                if ($(consumerSelector + ' .jn-consumer-item').length < 3) { 
744                    changeCardLayout(consumerSelector); 
745
746                if ($(businessSelector + ' .jn-consumer-item').length < 3) { 
747                    changeCardLayout(businessSelector); 
748
749                 
750                var tabsNav = document.querySelectorAll('.tab-nav'); 
751                togglePrimaryNav(tabsNav); 
752                 
753                if(window.location.href.indexOf('#business') > -1 ) { 
754                    $(consumerSelector).removeClass('active'); 
755                    $(businessSelector).addClass('active'); 
756                    $('#consumerTab').removeClass('active'); 
757                    $('#businessTab').addClass('active'); 
758                    hideHeroAndDisclaimer('consumer'); 
759                    showHeroAndDisclaimer('business'); 
760                    changeCardLayout(businessSelector); 
761                    renumberFootnote("business"); 
762                    createMetaTag("business"); 
763 
764                    $(tabs).click(function(){ 
765                        if ($(this).attr('id') === "consumerTab") { 
766                            var newUrl = window.location.toString(); 
767                            window.location = newUrl.replace(/#business/, '#consumer'); 
768
769                        if ($(this).attr('id') === "businessTab") { 
770                            var url = window.location.toString(); 
771                            window.location = url.replace(/#consumer/, '#business'); 
772
773                    }); 
774
775                 
776
777        }); 
778 
779        // Primary Nav function      
780        function togglePrimaryNav(elem) { 
781            for (var i = 0; i < elem.length; i++) { 
782                elem[i].addEventListener("click", function(e) { 
783 
784                    var current = this, 
785                        allSections = document.querySelectorAll('[data-id]'), 
786                        section = document.querySelector("[data-id='"+ current.id +"']"); 
787 
788                    for (var a = 0; a < allSections.length; a++) { 
789                        allSections[a].classList.remove('active'); 
790
791                    for (var c = 0; c < elem.length; c++) { 
792                        if (current != elem[c]) { 
793                            elem[c].classList.remove('active'); 
794                        } else { 
795                            current.classList.add('active'); 
796                            section.classList.add('active'); 
797                            hideHeroAndDisclaimer('consumer'); 
798                            hideHeroAndDisclaimer('business'); 
799                            if(current.getAttribute('id') === "consumerTab"){ 
800                                showHeroAndDisclaimer('consumer'); 
801                            } else if(current.getAttribute('id') === "businessTab"){ 
802                                showHeroAndDisclaimer('business'); 
803
804
805
806                    e.preventDefault(); 
807                }); 
808
809
810         
811        function renumberFootnote(type) { 
812            var discriptionSelector = '.jn-consumer-content-wrapper.jn-tab-content' + '[data-id="' + type + 'Tab"]'; 
813            var disclaimerSelector = '.tier3-disclaimer-landing-' + type; 
814            var heroSelector = '.tier3-hero-landing-' + type; 
815            var numOfFootnote = $(disclaimerSelector + ' sup').length; 
816            var showList = []; 
817            var hideList=[]; 
818            for (var i = 1; i <= numOfFootnote; i++) { 
819                var cssClass="tag-" + i; 
820                if ($(discriptionSelector + ' sup').hasClass(cssClass) || $(heroSelector + ' sup').hasClass(cssClass)) { 
821                    showList.push(i);      
822                } else { 
823                    hideList.push(i); 
824
825            }  
826            /* 
827            for (var i = 1; i < showList.length + 1; i++) { 
828                if(showList[i-1] != i) { 
829                    var className="tag-" + showList[i-1]; 
830                     
831                    //$(heroSelector).find("." +  className).html(i); 
832                    // $(discriptionSelector).find("." +  className).html(i); 
833                    //$(disclaimerSelector).find("." +  className).html(i); 
834
835
836            */ 
837            for (var i = 0; i <hideList.length; i++) { 
838                var cname="tag-" + hideList[i]; 
839                $(disclaimerSelector).find("." + cname).parent().hide(); 
840            }    
841
842         
843        function changeCardLayout(cssSelector) { 
844            var numOfCards = $(cssSelector + ' .jn-consumer-item').length; 
845            if(numOfCards == 1) { 
846                $(cssSelector).addClass('one-card'); 
847            } else if (numOfCards == 2) { 
848                $(cssSelector).addClass('two-card'); 
849            }   
850
851 
852        function hideHeroAndDisclaimer(type) { 
853            try { 
854                document.querySelector('.tier3-hero-landing-'+ type).classList.remove('show'); 
855                document.querySelector('.tier3-hero-landing-'+ type).classList.add('hide'); 
856            } catch (e) { 
857                console.log(e); 
858
859 
860            try { 
861                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.remove('show'); 
862                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.add('hide');  
863            } catch (e) { 
864                console.log(e); 
865
866 
867
868 
869        function showHeroAndDisclaimer(type) { 
870            try { 
871                document.querySelector('.tier3-hero-landing-'+ type).classList.add('show'); 
872                document.querySelector('.tier3-hero-landing-'+ type).classList.remove('hide'); 
873            } catch (e) { 
874                console.log(e); 
875
876             
877            try { 
878                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.add('show'); 
879                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.remove('hide');  
880            } catch (e) { 
881                console.log(e); 
882
883 
884
885 
886        function createMetaTag(type) { 
887            var partnerName = "${partnerName!0}"; 
888            var product_name = $('.jn-hero-container .jn-button').data('product-name'); 
889            var metaDesc =""; 
890            if (type == "consumer") {             
891                if(product_name ==  "consumer-platinum") { 
892                    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."; 
893                } else if(product_name ==  "real-rewards") { 
894                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
895                } else if(product_name ==  "secured") { 
896                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
897                } else if(product_name ==  "max-cash") { 
898                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus."; 
899                } else if(product_name ==  "max-cash-secured") { 
900                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn more on the categories you pick."; 
901                } else if(product_name ==  "travel-rewards-plus") { 
902                    metaDesc = "Apply Today for a "+partnerName+" Credit Card."; 
903                } else if(product_name ==  "reserve-rewards-plus") { 
904                    metaDesc = "Apply Today for a "+partnerName+" Credit Card."; 
905
906 
907            } else if (type == "business") { 
908                if(product_name ==  "business-cashback") {               
909                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
910                } else if(product_name ==  "business-real-rewards") { 
911                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on."; 
912                } else if(product_name ==  "business-platinum") { 
913                    metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
914                } else if(product_name ==  "smart-business-rewards") { 
915                    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."; 
916
917
918            var m = document.createElement('meta');  
919            m.name = 'description';  
920            m.content = metaDesc;  
921            document.head.appendChild(m); 
922
923         
924        function resizeImg(img) { 
925            img.addEventListener("load", function() { 
926                var cardImgWidth = img.width; 
927                var cardImgHeight = img.height; 
928                if(cardImgWidth > cardImgHeight) { 
929                    img.style.width = "285px"; 
930                } else { 
931                    img.style.width = "150px"; 
932
933            }); 
934
935 
936        AUI().ready(function() { 
937            MicroModal.init(); 
938        }); 
939	 
940    </script>                 
941</#if> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417682" at line 5, column 15]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417682" at line 5, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4 
5<#assign lc = qstringmap["ecdma-lc"]?first>   
6<#assign lc = htmlUtil.escape(lc)> 
7<#assign lc = htmlUtil.escapeJS(lc)> 
8 
9<#assign prefix = "00000" > 
10<#assign lcWithPrefix = prefix + lc > 
11<#assign withPrefixLength = lcWithPrefix?length > 
12<#assign startHere = withPrefixLength - 5> 
13<#assign lc = lcWithPrefix?substring(startHere)> 
14<#if lc?has_content> 
15 
16    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
17    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
18    <#assign clientProfile = clientProfileList?first> 
19    <#assign partnerName = clientProfile.getMarketingNameLong()> 
20 
21    <#assign pbu = clientProfile.getPbu()> 
22    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
23 
24    <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu)>  
25    <#if (fiCardsData?size > 0) > 
26        <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)> 
27 
28        <#if (cardProvider?size > 0)> 
29            <#-- This will be V for visa or M for mastercard. --> 
30            <#assign cardProviderAbbreviated = cardProvider[0].cardType> 
31        <#else> 
32            <script> 
33                console.log("No card provider(Visa/Master Card) found for disclaimer"); 
34            </script> 
35        </#if> 
36 
37        <div class="jn-disclaimer tier3-disclaimer-${class.getData()}" title="${partnerName!''} - Disclaimer"> 
38            <div class="disclaimer"> 
39                <#if (disclaimersVisa?has_content && cardProviderAbbreviated?contains("V"))> 
40                    ${disclaimersVisa.getData()} 
41                </#if> 
42                <#if (disclaimersMasterCard?has_content && cardProviderAbbreviated?contains("M")) > 
43                    ${disclaimersMasterCard.getData()} 
44                </#if> 
45            </div> 
46        </div> 
47    <#else> 
48        <script> 
49            console.log("card data empty"); 
50        </script> 
51    </#if> 
52<#else> 
53    <script> 
54        console.log("No lc for disclaimer"); 
55    </script> 
56</#if> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417682" at line 5, column 15]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417682" at line 5, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4 
5<#assign lc = qstringmap["ecdma-lc"]?first>   
6<#assign lc = htmlUtil.escape(lc)> 
7<#assign lc = htmlUtil.escapeJS(lc)> 
8 
9<#assign prefix = "00000" > 
10<#assign lcWithPrefix = prefix + lc > 
11<#assign withPrefixLength = lcWithPrefix?length > 
12<#assign startHere = withPrefixLength - 5> 
13<#assign lc = lcWithPrefix?substring(startHere)> 
14<#if lc?has_content> 
15 
16    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
17    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
18    <#assign clientProfile = clientProfileList?first> 
19    <#assign partnerName = clientProfile.getMarketingNameLong()> 
20 
21    <#assign pbu = clientProfile.getPbu()> 
22    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
23 
24    <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu)>  
25    <#if (fiCardsData?size > 0) > 
26        <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)> 
27 
28        <#if (cardProvider?size > 0)> 
29            <#-- This will be V for visa or M for mastercard. --> 
30            <#assign cardProviderAbbreviated = cardProvider[0].cardType> 
31        <#else> 
32            <script> 
33                console.log("No card provider(Visa/Master Card) found for disclaimer"); 
34            </script> 
35        </#if> 
36 
37        <div class="jn-disclaimer tier3-disclaimer-${class.getData()}" title="${partnerName!''} - Disclaimer"> 
38            <div class="disclaimer"> 
39                <#if (disclaimersVisa?has_content && cardProviderAbbreviated?contains("V"))> 
40                    ${disclaimersVisa.getData()} 
41                </#if> 
42                <#if (disclaimersMasterCard?has_content && cardProviderAbbreviated?contains("M")) > 
43                    ${disclaimersMasterCard.getData()} 
44                </#if> 
45            </div> 
46        </div> 
47    <#else> 
48        <script> 
49            console.log("card data empty"); 
50        </script> 
51    </#if> 
52<#else> 
53    <script> 
54        console.log("No lc for disclaimer"); 
55    </script> 
56</#if> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417685" at line 3, column 15]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417685" at line 3, column 1]
----
1<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>  
3<#assign lc = qstringmap["ecdma-lc"]?first> 
4<#assign lc = htmlUtil.escape(lc)> 
5<#assign lc = htmlUtil.escapeJS(lc)> 
6 
7<#if (lc?has_content && lc?length gt 5)> 
8    <#assign lc = lc[0..4] > 
9</#if> 
10<#assign lc = lc?web_safe> 
11<#assign aDateTime = .now> 
12<#assign currentYear = aDateTime?string.yyyy> 
13 
14 
15<div id="footerIdAdPlatinum"> 
16  ${footerContent.getData()} 
17</div> 
18 
19<!-- BEGIN CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
20<script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
21<style> 
22    #opt-out-button, 
23    .modal__btn.learn-more { 
24        background: #0C2074; 
25        border: 1px solid #0C2074; 
26        color: white; 
27        text-transform: uppercase; 
28        text-decoration: none; 
29        font-size: 16px; 
30        padding: 0.5rem 2rem; 
31        display: inline-block; 
32        border-radius: 0; 
33
34    #opt-out-button:hover, 
35    .modal__btn.learn-more:hover { 
36        color: white !important; 
37        border-color: #2C76AF !important; 
38        background-color: #2C76AF !important; 
39
40    .modal .modal__btn.learn-more { 
41        background: white; 
42        border: 1px solid #0C2074; 
43        color: #0C2074; 
44        text-decoration: none; 
45
46    #opt-out-button[disabled="true"] { 
47        background-color: rgba(0,0,0,.15); 
48        color: rgba(0,0,0,.45); 
49        border-color: rgba(0,0,0,.25); 
50
51    #opt-out-button:hover[disabled="true"] { 
52        background-color: rgba(0,0,0,.15) !important; 
53        color: rgba(0,0,0,.45) !important; 
54        border-color: rgba(0,0,0,.25) !important; 
55
56    #opt-out-button:focus { 
57        outline-style: solid; 
58        outline-color: white; 
59        outline-offset: -3px; 
60        outline-width: 1px; 
61
62    .opt-out-link svg { 
63        width: 30px; 
64        height: 14px; 
65        width: auto; 
66        vertical-align: middle; 
67
68    .modal__overlay { 
69        position: fixed; 
70        top: 0; 
71        left: 0; 
72        right: 0; 
73        bottom: 0; 
74        background: rgba(0,0,0,0.6); 
75        display: flex; 
76        justify-content: center; 
77        align-items: center; 
78
79 
80    .modal__container { 
81        background-color: #fff; 
82        padding: 30px; 
83        max-width: 500px; 
84        max-height: 100vh; 
85        border-radius: 4px; 
86        overflow-y: auto; 
87        box-sizing: border-box; 
88
89 
90    .modal__header { 
91        display: flex; 
92        justify-content: space-between; 
93        align-items: center; 
94
95 
96    .modal .modal__container .modal__title { 
97        margin-top: 0; 
98        margin-bottom: 0; 
99        font-weight: 600; 
100        font-size: 20px; 
101        line-height: 1.25; 
102        color: #00449e; 
103        box-sizing: border-box; 
104
105 
106    .modal__close { 
107        background: transparent; 
108        border: 1px solid white; 
109        padding: 4px 8px; 
110
111    .modal__close:hover { 
112        border: 1px solid black; 
113
114 
115    .modal__header .modal__close:before { content: "\2715"; } 
116 
117    .modal__content { 
118        margin-top: 2rem; 
119        margin-bottom: 2rem; 
120        line-height: 1.5; 
121
122 
123    @keyframes mmfadeIn { 
124        from { opacity: 0; } 
125        to { opacity: 1; } 
126
127 
128    @keyframes mmfadeOut { 
129        from { opacity: 1; } 
130        to { opacity: 0; } 
131
132 
133    @keyframes mmslideIn { 
134        from { transform: translateY(15%); } 
135        to { transform: translateY(0); } 
136
137 
138    @keyframes mmslideOut { 
139        from { transform: translateY(0); } 
140        to { transform: translateY(-10%); } 
141
142 
143    .micromodal-slide { 
144        display: none; 
145
146 
147    .micromodal-slide.is-open { 
148        display: block; 
149
150 
151    .micromodal-slide[aria-hidden="false"] .modal__overlay { 
152        animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
153
154 
155    .micromodal-slide[aria-hidden="false"] .modal__container { 
156        animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
157
158 
159    .micromodal-slide[aria-hidden="true"] .modal__overlay { 
160        animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
161
162 
163    .micromodal-slide[aria-hidden="true"] .modal__container { 
164        animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
165
166 
167    .micromodal-slide .modal__container, 
168    .micromodal-slide .modal__overlay { 
169        will-change: transform; 
170
171</style> 
172 
173<div class="modal micromodal-slide" id="modal-1" aria-hidden="true"> 
174<div class="modal__overlay" tabindex="-1" data-micromodal-close> 
175    <div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title"> 
176    <header class="modal__header"> 
177        <h2 class="modal__title" id="modal-1-title"> 
178        Your California privacy choices 
179        </h2> 
180        <button class="modal__close" aria-label="Close modal" data-micromodal-close></button> 
181    </header> 
182    <div class="modal__content" id="modal-1-content"> 
183        <div id="message-no-cookie"> 
184            <p> 
185            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> 
186             
187<p>&nbsp;</p> 
188 
189<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> 
190    </div> 
191    <div id="message-with-cookie"> 
192        <p>You have successfully opted-out.</p> 
193    </div> 
194    </div> 
195    <div class="modal__footer"> 
196        <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> 
197        <button id="opt-out-button" class="modal__btn modal__btn-primary" aria-label="Opt Out and Close modal" onclick="window.californiaOptOut()">Opt Out</button> 
198    </div> 
199    </div> 
200</div> 
201</div> 
202<!-- END CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
203<!-- BEGIN CALIFORNIA OPT-OUT MODAL LOGIC --> 
204<script> 
205AUI().ready(function() { 
206        //this aui.ready prevents from it not showing cali opt out modal due to getting the node before page finished loading. 
207        const copyrightNode = document.querySelector('#footerIdAdPlatinum .copyright'); 
208        const fdicNode = document.querySelector('#footerIdAdPlatinum .fdic'); 
209        const agreementNode = document.querySelector('#footerIdAdPlatinum .member-agreement'); 
210        agreementNode.innerHTML= '<a class="text-color-white" href="https://online1.elancard.com/oad/cmas.controller?locationCode=${lc!''}&preparerType=customer&isNewRequest=false" target="_blank">Cardmember Agreements</a>'; 
211        copyrightNode.innerHTML= '<sup>©</sup> Elan Financial Services ' + ${currentYear}; 
212        copyrightNode.classList.add('ecdma-footer-client-name-copyright'); 
213        fdicNode.innerHTML = '<a class="text-color-white" href="https://www.myaccountaccess.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank">Privacy and Security</a>'; 
214        /* BEGIN CALIFORNIA OPT-OUT MODAL TRIGGER */ 
215        fdicNode.insertAdjacentHTML('afterend', '<div style="display: inline-block; margin-left: 100px;"><a href="javascript:void(0);" class="opt-out-link" 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>'); 
216        /* END CALIFORNIA OPT-OUT MODAL TRIGGER */ 
217 
218        window.getCookieDomain = function() { 
219            var hostname = window.location.hostname.split("."); 
220            return hostname && hostname.slice(hostname.length - 2).join("."); 
221
222        window.setToOptOut = function() { 
223            if (window.getCookie('privacy_optout')) { 
224                    document.getElementById('message-no-cookie').style.display = 'none'; 
225                    document.getElementById('message-with-cookie').style.display = 'block'; 
226                    document.getElementById('opt-out-button').setAttribute('disabled', true) 
227                } else { 
228                    document.getElementById('message-no-cookie').style.display = 'block'; 
229                    document.getElementById('message-with-cookie').style.display = 'none'; 
230
231
232        window.getCookie = function(name) { 
233            var value = '; ' + document.cookie; 
234            var parts = value.split('; ' + name + '='); 
235            if (parts.length === 2) return parts.pop().split(';').shift(); 
236
237        window.californiaOptOut = function() { 
238            if (!window.getCookie('privacy_optout')) { 
239                document.cookie = 'privacy_optout=1; path=/; domain=' + window.getCookieDomain() + '; expires=Thu, 31 Dec 2099 00:00:00 GMT;'; 
240                try { 
241                if (window.CustomEvent) { 
242                    window.dispatchEvent(new CustomEvent('privacy_optout')); 
243                } else { 
244                    var privacyOptoutEvent = document.createEvent('Event'); 
245                    privacyOptoutEvent.initEvent('privacy_optout', true, true); 
246                    window.dispatchEvent(privacyOptoutEvent); 
247
248                window.setToOptOut(); 
249                } catch (err) { 
250                console.error(err); 
251
252
253
254        MicroModal.init({ 
255            onShow: window.setToOptOut 
256        }); 
257     
258        // user browser setting for Global Privacy Control to opt out of sharing information with third parties 
259        const isBrowserGpcOptOut = navigator.globalPrivacyControl; 
260        if(isBrowserGpcOptOut === true) { 
261        window.californiaOptOut(); 
262
263    }); 
264</script> 
265<!-- END CALIFORNIA OPT-OUT MODAL LOGIC -->