{"version":3,"sources":["JavaScript/common/FourDConfiguration.js","JavaScript/config.js","JavaScript/CrossDomainLinking.js","JavaScript/main.js","JavaScript/Controls/Location.js","JavaScript/Controls/Cli.js","JavaScript/Pages/Register.js","JavaScript/Pages/RegisterSimplified.js","JavaScript/Pages/PasswordReset.js"],"names":["FourDConfigurationHelper","constructor","this","endpoints","applePayInitialisePayment","applePayValidateSession","applePayRequestPayment","cybersourceCardRequestPaymentFields","cybersourceCardRequestAuthorisationFields","cybersourceCardRequestSubscriptionAuthorisationFields","googlePayInitialisePayment","googlePayRequestPayment","paypalCreatePayment","paypalExecutePayment","initialise","options","callbacks","FourDConfiguration","onError","err","stageText","GETADDRESSESBYPOSTCODE","GETCLIECAPABILITY","INITIALISECLIVERIFICATION","GETCLIVERIFICATION","CANCELCLIVERIFICATION","LOGIN","LOGOUT","REGISTERLOGIN","fourdLogError","readCookie","name","nameEQ","ca","document","cookie","split","i","length","c","charAt","substring","indexOf","isRelativeHyperlink","hrefString","fourdTargetDomainForCrossLinkingDefined","fourdTargetDomainForCrossLinking","applyCrossDomainLinking","fourdClientIdentifier","dynamicNumberId","dynamicNumber","cookieConsentState","$","each","attr","queryStringAdditions","anchorString","ciQueryString","encodeURI","dynamicNumberIdQueryString","cookieConsentQueryString","newHref","location","protocol","updateCrossDomainLinks","newCcValue","regexCc","replace","endRequestHandler_ServerErrorCount","endRequestHandler_RefreshPageAfterServerErrorCountReaches","hideelement","elementId","hide","showelement","element","getElementById","style","visibility","textAreaMaxLength","textArea","maxLength","$textArea","textAreaValue","val","textBoxRemainingCount","textBox","countControl","$textBox","$countControl","countLeft","textBoxValue","initialiseTextAreaMaxLength","selector","undefined","isNaN","maxLengthInt","parseInt","on","initialiseTextBoxCount","parent","addClickToLinkButton","button","click","result","onclick","eval","getAttribute","addClickToDefaultButtons","defaultButtons","getComputedHeight","getComputedHeightAsFloat","obj","window","getComputedStyle","height","getPropertyValue","stringHeight","parseFloat","jquery","totalHeight","elementHeight","endRequestHandler","sender","args","get_error","response","get_response","get_timedOut","set_errorHandled","get_responseAvailable","get_statusCode","href","GetNormalisedAjaxResponse","d","initSingleListMenu","accList","accListUl","checkElement","next","is","removeClass","slideUp","slideDown","addClass","initMultiListMenu","show","prev","layoutWidgets","mainWidgetContainer","repeatingSectionContainers","hideIfNoRoomElements","hideIfNoRoomLastElements","parentAsideControl","closest","associatedSectionControl","parentAsideControlOffset","offset","parentAsideControlLeft","left","associatedSectionControlOffset","outerWidth","heightOfAssociatedSectionControl","heightOfWidgetContainer","heightOfWidgetContainerSiblings","siblings","availableHeightInParentAsideControl","heightOfRepeatingSectionContainer","repeatingSectionContainer","first","repeatingSections","countOfRepeatingSections","firstRepeatingSection","heightOfRepeatingSection","heightOfContainer","totalHeightOfRepeatingSections","gapToFill","numberOfAdditionalRepeatingSections","Math","ceil","clone","appendTo","heightToReduceBy","widgetsInFirstRepeatingSection","numberOfWidgetsPerRepeatingSection","widthOfFirstWidget","width","widthOfRepeatingSection","numberOfWidgetsWide","floor","heightOfOneWidget","adjustedHeightToReduceBy","get","reverse","getSessionStorageItem","key","itemValue","sessionStorage","getItem","getSessionStorageItemAsync","done","error","when","then","setSessionStorageItem","data","itemSet","setItem","removeSessionStorageItem","itemRemoved","removeItem","isSingleColumnView","columnsInCurrentView","columnCountIndicator","divIsVisible","divId","css","IsKeyPressed","event","which","keyCode","resize","target","anchorItem","nodeName","hrefVal","eventTargetLocation","pathname","pageSectionVal","eventName","eventLabel","text","gtag","event_action","event_category","event_label","target_location","page_section","clear","Sys","WebForms","PageRequestManager","getInstance","add_endRequest","passwordControl","toggleClass","e","preventDefault","InitialiseRegisterPage","InitialiseRegisterSimplifiedPage","InitialiseResetPasswordPage","AddressesByPostcode","Get","Postcode","CountryCode","CallBackFunction","toUpperCase","_storedElement","GetStoredElement","status","Status","loaded","empty","waiting","postcode","countryCode","ajax","JSON","stringify","type","contentType","url","dataType","timeout","success","textStatus","jqXHR","fourdHandleAjaxSuccess","responseData","_status","ServiceOperationOutcome","PostCodeDataStorage","push","id","errorThrown","fourdHandleAjaxError","_element","map","Cli","GetCliType","cli","callBackFunction","storedElement","DataStorage","InitialiseCliVerification","memberId","cliVerificationTypeId","GetCliVerification","CancelCliVerification","CliType","fixedLine","mobile","all","CliVerificationType","inboundCallPlayPassword","outboundCallPlayPassword","CliVerification","Requested","AttemptFailedCouldRetry","Queued","InProgress","Cancelled","Expired","MaximumFailedAttempts","InvalidMemberId","RequestCompleted","StatusType","completed","StatusConfiguration","label","icon","ClientConfigurations","DefaultPollingTime","validateTerms","validators","validator","ValidatorValidate","validationGroup","ValidatorUpdateIsValid","FourDTermsValidate","source","checkBox","$get","IsValid","checked","change","phoneNumber","email","ShowSimplifiedSignup","Heading","StoreCurrent","CheckCliType","value","CliVerificationDto","CliVerificationTypeId","pollingOnRunning","CheckCliVerification","ShowCliVerificationStatus","CliVerificationStatusId","CliVerficationStatusId","cliVerficationStatusId","ResetCliVerificationLandLine","children","Page_ClientValidate","login","password","RegisterSimplifiedLoginStarted","isLoggedIn","IsAuthenticated","RedirectUrl","host","hostname","port","currentHostname","off","removeAttr","RegisterSimplifiedLoginSuccessful","RegisterSimplifiedLoginEnded","statusConfiguration","RequestCanBeCancelled","setTimeout","Reset","html","htmlTemplate","Set","h1","p","showVerifyingHeading","ShowLandline","ShowMobile","CliTypeId"],"mappings":"AAAA,MAAAA,yBACA,WAAAC,GACAC,KAAAC,UAAA,CACAC,0BAAA,4CACAC,wBAAA,0CACAC,uBAAA,yCACAC,oCAAA,uCACAC,0CAAA,6CACAC,sDAAA,yDACAC,2BAAA,6CACAC,wBAAA,0CACAC,oBAAA,yBACAC,qBAAA,yBAEA,CAEA,UAAAC,CAAAC,GAGA,IACAA,IAAAA,EAAA,CAAA,GACAA,EAAAC,YAAAD,EAAAC,UAAA,CAAA,GACA,mBAAAD,EAAAC,UAAA,UAAAC,mBAAAC,QAAAH,EAAAC,UAAAE,SACAH,EAAAZ,YAAAY,EAAAZ,UAAA,CAAA,GACA,iBA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,IAAAe,oBAAAC,yBAAA,SAAAnG,GACA,GAAAA,EAAA0I,oBAAA1I,EAAA0I,mBAAAM,wBAAA7D,IAAAkB,gBAAA9C,OAAA+C,WACAtG,EAAA0I,mBAAAC,uBAAAxD,IAAAe,oBAAAC,wBACAyC,GAAA,EACAE,EAAA3D,IAAAe,oBAAAC,wBAAAnG,EAAA0I,mBAAAM,wBACAH,EAAAV,OAEA,CAEA,IAAAc,GAAA,EACAjJ,EAAA0I,qBAAAO,EAAAjJ,EAAA0I,mBAAAM,wBACAF,EAAA3D,IAAAe,oBAAAC,wBAAA8C,EACA,CACA,GACA,IAEAzS,EAAA,qBAAA6C,GAAA,SAAA,WACA8O,EAAA3R,EAAA,oBAAA+B,MAEA4M,IAAAU,sBAAA,KAAAsC,GAAA,SAAAnI,GACAA,EAAA0I,mBACA1I,EAAA0I,mBAAAM,wBAAA7D,IAAAkB,gBAAA9C,OAAAmD,YACAkC,GAAA,EACAiC,MAIAjC,GAAA,EACAiC,IAEA,GACA,GAkKA","file":"JavaScript/min/CrossDomainLinkJs.min.js","sourcesContent":["class FourDConfigurationHelper {\r\n constructor() {\r\n this.endpoints = {\r\n applePayInitialisePayment: \"/CyberSourceSop/InitialiseApplePayPayment\",\r\n applePayValidateSession: \"/CyberSourceSop/ValidateApplePaySession\",\r\n applePayRequestPayment: \"/CyberSourceSop/RequestApplePayPayment\",\r\n cybersourceCardRequestPaymentFields: \"/CyberSourceSop/RequestPaymentFields\",\r\n cybersourceCardRequestAuthorisationFields: \"/CyberSourceSop/RequestAuthorisationFields\",\r\n cybersourceCardRequestSubscriptionAuthorisationFields: \"/CyberSourceSop/RequestSubscriptionAuthorisationFields\",\r\n googlePayInitialisePayment: \"/CyberSourceSop/InitialiseGooglePayPayment\",\r\n googlePayRequestPayment: \"/CyberSourceSop/RequestGooglePayPayment\",\r\n paypalCreatePayment: \"/PayPal/RequestPayment\",\r\n paypalExecutePayment: \"/PayPal/ExecutePayment\"\r\n };\r\n }\r\n\r\n initialise(options) {\r\n var result = false;\r\n\r\n try {\r\n if (!options) options = {};\r\n if (!options.callbacks) options.callbacks = {};\r\n if (typeof (options.callbacks.onError) == 'function') FourDConfiguration.onError = options.callbacks.onError;\r\n if (!options.endpoints) options.endpoints = {};\r\n if (typeof (options.endpoints.applePayInitialisePayment) == 'string') FourDConfiguration.applePayInitialisePayment = options.endpoints.applePayInitialisePayment;\r\n if (typeof (options.endpoints.applePayValidateSession) == 'string') FourDConfiguration.applePayValidateSession = options.endpoints.applePayValidateSession;\r\n if (typeof (options.endpoints.applePayRequestPayment) == 'string') FourDConfiguration.applePayRequestPayment = options.endpoints.applePayRequestPayment;\r\n if (typeof (options.endpoints.cybersourceCardRequestPaymentFields) == 'string') FourDConfiguration.cybersourceCardRequestPaymentFields = options.endpoints.cybersourceCardRequestPaymentFields;\r\n if (typeof (options.endpoints.cybersourceCardRequestAuthorisationFields) == 'string') FourDConfiguration.cybersourceCardRequestAuthorisationFields = options.endpoints.cybersourceCardRequestAuthorisationFields;\r\n if (typeof (options.endpoints.cybersourceCardRequestSubscriptionAuthorisationFields) == 'string') FourDConfiguration.cybersourceCardRequestSubscriptionAuthorisationFields = options.endpoints.cybersourceCardRequestSubscriptionAuthorisationFields;\r\n if (typeof (options.endpoints.googlePayInitialisePayment) == 'string') FourDConfiguration.googlePayInitialisePayment = options.endpoints.googlePayInitialisePayment;\r\n if (typeof (options.endpoints.googlePayRequestPayment) == 'string') FourDConfiguration.googlePayRequestPayment = options.endpoints.googlePayRequestPayment;\r\n if (typeof (options.endpoints.paypalCreatePayment) == 'string') FourDConfiguration.paypalCreatePayment = options.endpoints.paypalCreatePayment;\r\n if (typeof (options.endpoints.paypalExecutePayment) == 'string') FourDConfiguration.paypalExecutePayment = options.endpoints.paypalExecutePayment;\r\n\r\n }\r\n catch (err) {\r\n FourDConfiguration.onError(err, 'FourDConfiguration/initialise');\r\n }\r\n return result;\r\n }\r\n\r\n onError(err, stageText) { }\r\n};\r\n\r\nconst FourDConfiguration = new FourDConfigurationHelper();","// Endpoints\r\nvar GETADDRESSESBYPOSTCODE = \"/Location/GetAddressesByPostcode\";\r\n\r\nvar GETCLIECAPABILITY = \"/Member/GetCliCapability\";\r\nvar INITIALISECLIVERIFICATION = \"/Member/InitialiseCliVerification\";\r\nvar GETCLIVERIFICATION = \"/Member/GetCliVerification\";\r\nvar CANCELCLIVERIFICATION = \"/Member/CancelCliVerification\";\r\n\r\nvar LOGIN = \"/Member/LoginRequest\";\r\nvar LOGOUT = \"/Member/LogOutRequest\";\r\n\r\n//var ANALYTICSLOGCLIENT = \"/GoogleAnalytics/LogClientId\";\r\nvar REGISTERLOGIN = \"/Register/LoginRequest\";\r\n\r\nif (typeof (FourDConfiguration) !== 'undefined') {\r\n // Already exists as expected\r\n let options = {\r\n onError: function (err, stageText) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at stage '${stageText}'`, err);\r\n }\r\n },\r\n };\r\n FourDConfiguration.initialise(options);\r\n}\r\nelse {\r\n // Doesn't exist, create blank\r\n FourDConfiguration = {\r\n endpoints: {},\r\n };\r\n}","\r\n//var targetDomain = 'www.gaynetwork.co.uk';\r\n\r\nfunction readCookie(name) {\r\n var nameEQ = name + '=';\r\n var ca = document.cookie.split(';');\r\n for (var i = 0; i < ca.length; i++) {\r\n var c = ca[i];\r\n while (c.charAt(0) == ' ') c = c.substring(1, c.length);\r\n if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);\r\n }\r\n return null;\r\n}\r\n\r\nfunction isRelativeHyperlink(hrefString) {\r\n return (typeof (hrefString) != 'undefined' && hrefString.length > 0 && hrefString.charAt(0) == '/');\r\n}\r\n\r\nfunction fourdTargetDomainForCrossLinkingDefined() {\r\n return (typeof fourdTargetDomainForCrossLinking === 'string' && fourdTargetDomainForCrossLinking);\r\n}\r\n\r\nfunction applyCrossDomainLinking() {\r\n\r\n if (!fourdTargetDomainForCrossLinkingDefined()) return;\r\n\r\n //var fourdClientIdentifier = readCookie('ci');\r\n if (!fourdClientIdentifier) {\r\n fourdClientIdentifier = readCookie('ci');\r\n }\r\n\r\n var dynamicNumberId = null;\r\n if (typeof (dynamicNumber) != 'undefined') {\r\n // Read from value set elsewhere\r\n dynamicNumberId = dynamicNumber;\r\n }\r\n if (!dynamicNumberId) {\r\n // Not set elsewhere, try cookie\r\n dynamicNumberId = readCookie('DynamicNumberId');\r\n }\r\n\r\n var cookieConsentState = readCookie(\"cc\");\r\n\r\n\r\n $('a').each(function () {\r\n var hrefString = $(this).attr('href');\r\n\r\n //if link is relative then change it\r\n if (isRelativeHyperlink(hrefString)) {\r\n var queryStringAdditions = '';\r\n var anchorString = '';\r\n\r\n if (hrefString.indexOf('#') != -1) {\r\n anchorString = hrefString.substring(hrefString.indexOf('#'));\r\n hrefString = hrefString.substring(0,hrefString.indexOf('#'));\r\n }\r\n\r\n if (fourdClientIdentifier) {\r\n var ciQueryString = 'ci=' + encodeURI(fourdClientIdentifier);\r\n\r\n if (queryStringAdditions.length) queryStringAdditions += '&';\r\n queryStringAdditions += ciQueryString;\r\n }\r\n\r\n if (dynamicNumberId) {\r\n var dynamicNumberIdQueryString = 'DynamicNumberId=' + encodeURI(dynamicNumberId);\r\n\r\n if (queryStringAdditions.length) queryStringAdditions += '&';\r\n queryStringAdditions += dynamicNumberIdQueryString;\r\n }\r\n\r\n if (cookieConsentState) {\r\n var cookieConsentQueryString = 'cc=' + encodeURI(cookieConsentState);\r\n\r\n if (queryStringAdditions.length) queryStringAdditions += '&';\r\n queryStringAdditions += cookieConsentQueryString;\r\n }\r\n\r\n if ((hrefString.length == 0 || hrefString.charAt(0) !== '/') && (hrefString.indexOf('?') === -1)) {\r\n hrefString = '/' + hrefString\r\n }\r\n\r\n if (queryStringAdditions.length) {\r\n if (hrefString.indexOf('?') !== -1) queryStringAdditions = '&' + queryStringAdditions;\r\n else queryStringAdditions = '?' + queryStringAdditions;\r\n }\r\n\r\n var newHref = location.protocol + '//' + fourdTargetDomainForCrossLinking + hrefString + queryStringAdditions + anchorString;\r\n\r\n $(this).attr('href', newHref);\r\n $(this).attr('rel', 'nofollow');\r\n }\r\n\r\n });\r\n}\r\n\r\nfunction updateCrossDomainLinks(newCcValue)\r\n{\r\n if (!fourdTargetDomainForCrossLinkingDefined()) return;\r\n if (typeof (newCcValue) !== 'string') return;\r\n \r\n const regexCc = /&cc=([^&#]*)/;\r\n\r\n $('a').each(function () {\r\n //assumes we already have a querystring set up and cc is not the first entry\r\n\r\n var hrefString = $(this).attr('href');\r\n if (hrefString && hrefString.indexOf(fourdTargetDomainForCrossLinking) !== -1) {\r\n if (hrefString.indexOf('&cc=') !== -1) {\r\n //update\r\n var newHref = hrefString.replace(regexCc, '&cc=' + encodeURI(newCcValue));\r\n $(this).attr('href', newHref);\r\n }\r\n else if (hrefString.indexOf('?') !== -1) {\r\n //append\r\n var anchorString = '';\r\n\r\n if (hrefString.indexOf('#') != -1) {\r\n anchorString = hrefString.substring(hrefString.indexOf('#'));\r\n hrefString = hrefString.substring(0, hrefString.indexOf('#'));\r\n }\r\n\r\n var queryStringAdditions = '&cc=' + encodeURI(newCcValue);\r\n\r\n var newHref = hrefString + queryStringAdditions + anchorString;\r\n $(this).attr('href', newHref);\r\n }\r\n }\r\n });\r\n}\r\n\r\n//$(applyCrossDomainLinking);\r\napplyCrossDomainLinking(); //run immediately\r\n\r\n\r\n","var endRequestHandler_ServerErrorCount = 0;\r\nvar endRequestHandler_RefreshPageAfterServerErrorCountReaches = 50;\r\n\r\nfunction hideelement(elementId) {\r\n\t$('#' + elementId).hide();\r\n\t//var element = document.getElementById(elementId);\r\n\t//element.style.visibility = 'hidden';\r\n}\r\n\r\nfunction showelement(elementId) {\r\n\tvar element = document.getElementById(elementId);\r\n\tif (element != null) {\r\n\t\telement.style.visibility = 'visible';\r\n\t}\r\n}\r\n\r\nfunction textAreaMaxLength(textArea, maxLength) {\r\n var $textArea = $(textArea);\r\n if ($textArea.length > 0) {\r\n var textAreaValue = $textArea.val();\r\n if (textAreaValue != null && textAreaValue.length > maxLength) {\r\n $textArea.val(textAreaValue.substring(0, maxLength));\r\n }\r\n }\r\n}\r\n\r\nfunction textBoxRemainingCount(textBox, countControl, maxLength) {\r\n var $textBox = $(textBox);\r\n var $countControl = $(countControl);\r\n if ($textBox.length > 0 && $countControl.length > 0) {\r\n var countLeft = maxLength;\r\n var textBoxValue = $textBox.val();\r\n if (textBoxValue != null) {\r\n countLeft = maxLength - textBoxValue.length;\r\n }\r\n $countControl.val(countLeft);\r\n }\r\n}\r\n\r\nfunction initialiseTextAreaMaxLength(selector) {\r\n selector.each(function () {\r\n var maxLength = $(this).attr(\"data-maxlength\");\r\n if (maxLength !== undefined && !isNaN(maxLength)) {\r\n var maxLengthInt = parseInt(maxLength);\r\n $(this).on(\"keyup, keydown\", function () {\r\n textAreaMaxLength(this, maxLengthInt);\r\n });\r\n }\r\n });\r\n}\r\n\r\nfunction initialiseTextBoxCount(selector) {\r\n selector.each(function () {\r\n var maxLength = $(this).attr(\"data-maxlength\");\r\n if (maxLength !== undefined && !isNaN(maxLength)) {\r\n var maxLengthInt = parseInt(maxLength);\r\n $(this).on(\"keyup, keydown\", function () {\r\n textBoxRemainingCount($(this), $(\".textBoxCount\", $(this).parent()), maxLengthInt);\r\n });\r\n }\r\n });\r\n}\r\n\r\n// Adds .click() function to an anchor control if it is not supported (e.g. in Firefox).\r\n// This enables the DefaultButton functionality to work for an ASP.NET LinkButton control.\r\nfunction addClickToLinkButton(button) {\r\n\tif (button && typeof (button.click) == 'undefined') {\r\n\t\tbutton.click = function() {\r\n\t\t\tvar result = true;\r\n\t\t\tif (button.onclick) result = button.onclick();\r\n\t\t\tif (typeof (result) == 'undefined' || result) { eval(button.getAttribute('href')); }\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Adds .click() function to any controls with the CSS class \"defaultButton\"\r\nfunction addClickToDefaultButtons() {\r\n\tvar defaultButtons = $('.defaultButton');\r\n\tfor (var i = 0; i < defaultButtons.length; i++) {\r\n\t\tvar defaultButton = defaultButtons[i];\r\n\t\taddClickToLinkButton(defaultButton);\r\n\t}\r\n}\r\n\r\nfunction getComputedHeight(element) {\r\n if (element) {\r\n var getComputedHeightAsFloat = function (obj) {\r\n var style = window.getComputedStyle(obj, null);\r\n if (style && style != null) {\r\n var height = style.getPropertyValue(\"height\");\r\n if (height && height != null) {\r\n var stringHeight = height.replace(\"px\", \"\");\r\n if (!isNaN(stringHeight)) {\r\n return parseFloat(stringHeight);\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n // Element is defined\r\n if (element.jquery) {\r\n // Element is jQuery object\r\n if (window.getComputedStyle && element.length > 0) {\r\n var totalHeight = 0.0;\r\n for (var i = 0; i < element.length; i++) {\r\n totalHeight += getComputedHeightAsFloat(element[i]);\r\n }\r\n return totalHeight;\r\n }\r\n else {\r\n // Use standard jQuery function\r\n var elementHeight = element.height();\r\n return elementHeight === undefined ? null : elementHeight;\r\n }\r\n }\r\n else {\r\n // Element is not jQuery object\r\n if (window.getComputedStyle) {\r\n return getComputedHeightAsFloat(element);\r\n }\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nfunction endRequestHandler(sender, args) {\r\n try {\r\n if (args != null) {\r\n var error = args.get_error()\r\n if (error != null) {\r\n var response = args.get_response();\r\n if (response != null) {\r\n if (response.get_timedOut()) {\r\n args.set_errorHandled(true);\r\n }\r\n else if (response.get_responseAvailable()) {\r\n var statusCode = response.get_statusCode();\r\n switch (statusCode) {\r\n case 12002:\r\n // ERROR_INTERNET_TIMEOUT\r\n args.set_errorHandled(true);\r\n break;\r\n case 12007:\r\n // ERROR_INTERNET_NAME_NOT_RESOLVED\r\n args.set_errorHandled(true);\r\n break;\r\n case 12029:\r\n // ERROR_INTERNET_CANNOT_CONNECT\r\n args.set_errorHandled(true);\r\n break;\r\n case 500:\r\n // Server error\r\n endRequestHandler_ServerErrorCount += 1;\r\n break;\r\n }\r\n if (endRequestHandler_ServerErrorCount >= endRequestHandler_RefreshPageAfterServerErrorCountReaches) {\r\n // Server continuing to raise errors, try refreshing the page\r\n window.location.href = window.location.href;\r\n // Reset server error count\r\n endRequestHandler_ServerErrorCount = 0;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at endRequestHandler`, err);\r\n }\r\n }\r\n}\r\nfunction GetNormalisedAjaxResponse(response) {\r\n var result = response;\r\n if (result && result.d) { result = result.d; }\r\n return result;\r\n}\r\n\r\nfunction initSingleListMenu() {\r\n var accList = $('.singleActiveList .acclist');\r\n var accListUl = $('ul', accList);\r\n\r\n if (accListUl[0]) {\r\n // Hide all\r\n accListUl.hide();\r\n // Add click event\r\n $('li a', accList).click(function () {\r\n var checkElement = $(this).next();\r\n if (checkElement.is('ul')) {\r\n if (checkElement.is(':visible')) {\r\n // Already visible, hide\r\n $(this).removeClass(\"active\");\r\n checkElement.slideUp('normal');\r\n return false;\r\n }\r\n else {\r\n // Hide all in list currently visible\r\n $('ul:visible', accList).slideUp('normal');\r\n // Show selected list\r\n checkElement.slideDown('normal');\r\n // Set current class as active\r\n $(\"li a\", accList).removeClass(\"active\");\r\n $(this).addClass(\"active\");\r\n return false;\r\n }\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction initMultiListMenu() {\r\n var accList = $('.multiActiveList .acclist');\r\n var accListUl = $('ul', accList);\r\n\r\n if (accListUl[0]) {\r\n // Hide all\r\n accListUl.hide();\r\n // Show any marked as active\r\n $('ul.act', accList).show().prev(\"a\").addClass(\"active\");\r\n // Add click event\r\n $('li a', accList).click(\r\n function () {\r\n var checkElement = $(this).next();\r\n if (checkElement.is('ul')) {\r\n if (checkElement.is(':visible')) {\r\n // Currently visible, hide\r\n checkElement.slideUp('normal');\r\n $(this).removeClass(\"active\");\r\n return false;\r\n }\r\n else {\r\n // Not currently visible, show\r\n checkElement.slideDown('normal');\r\n $(this).addClass(\"active\");\r\n return false;\r\n }\r\n }\r\n }\r\n );\r\n }\r\n}\r\n\r\n// Expandable widget container\r\nfunction layoutWidgets() {\r\n // Check if too many or too few widgets to fill page\r\n\r\n /* Assumes a structure as follows:\r\n
\r\n \r\n */\r\n\r\n $(\"#adcont\").each(function () {\r\n // Check for any dynamic elements in this widget container\r\n var mainWidgetContainer = $(this);\r\n var repeatingSectionContainers = $(\".repeatingSectionContainer\", mainWidgetContainer);\r\n var hideIfNoRoomElements = $(\".hideIfNoRoom\", mainWidgetContainer);\r\n var hideIfNoRoomLastElements = $(\".hideIfNoRoomLast\", mainWidgetContainer);\r\n\r\n if (repeatingSectionContainers.length == 1 || hideIfNoRoomElements.length > 0 || hideIfNoRoomLastElements.length > 0) {\r\n\r\n var parentAsideControl = mainWidgetContainer.closest(\"aside\");\r\n\r\n if (!(mainWidgetContainer.is(':visible'))) {\r\n // Not currently visible, so set heights to auto\r\n parentAsideControl.height(\"auto\");\r\n mainWidgetContainer.height(\"auto\");\r\n return false;\r\n }\r\n\r\n var associatedSectionControl = parentAsideControl.prev(\"section\");\r\n\r\n var parentAsideControlOffset = parentAsideControl.offset();\r\n //var parentAsideControlTop = parentAsideControlOffset == null ? null : parentAsideControlOffset.top;\r\n //var parentAsideControlBottom = parentAsideControlTop + parentAsideControl.outerHeight();\r\n var parentAsideControlLeft = parentAsideControlOffset == null ? null : parentAsideControlOffset.left;\r\n //var parentAsideControlRight = parentAsideControlLeft + parentAsideControl.outerWidth();\r\n\r\n var associatedSectionControlOffset = associatedSectionControl.offset();\r\n //var associatedSectionControlTop = associatedSectionControlOffset == null ? null : associatedSectionControlOffset.top;\r\n //var associatedSectionControlBottom = associatedSectionControlTop + associatedSectionControl.outerHeight();\r\n var associatedSectionControlLeft = associatedSectionControlOffset == null ? null : associatedSectionControlOffset.left;\r\n var associatedSectionControlRight = associatedSectionControlLeft + associatedSectionControl.outerWidth();\r\n\r\n if (parentAsideControlLeft < associatedSectionControlRight) {\r\n // Currently visible, but below content, so no resizing needed\r\n parentAsideControl.height(\"auto\");\r\n mainWidgetContainer.height(\"auto\");\r\n hideIfNoRoomElements.hide();\r\n hideIfNoRoomLastElements.show();\r\n }\r\n else {\r\n // May need to adjust widgets\r\n\r\n // Show any hideable elements that may have been previously hidden\r\n hideIfNoRoomElements.show();\r\n hideIfNoRoomLastElements.show();\r\n\r\n // Set height of containing aside control to match the associated section control\r\n var heightOfAssociatedSectionControl = getComputedHeight(associatedSectionControl); // associatedSectionControl.height();\r\n\r\n parentAsideControl.height(heightOfAssociatedSectionControl);\r\n\r\n var heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n var heightOfWidgetContainerSiblings = getComputedHeight(mainWidgetContainer.siblings()); // mainWidgetContainer.siblings().height();\r\n var heightOfParentAsideControl = getComputedHeight(parentAsideControl); // parentAsideControl.height();\r\n var availableHeightInParentAsideControl = heightOfParentAsideControl - heightOfWidgetContainerSiblings;\r\n var heightOfRepeatingSectionContainer = 0;\r\n\r\n // Add any extra repeating sections first\r\n if (repeatingSectionContainers.length == 1) {\r\n var repeatingSectionContainer = repeatingSectionContainers.first();\r\n var repeatingSections = $(\".repeatingSection\", repeatingSectionContainer);\r\n var countOfRepeatingSections = repeatingSections.length;\r\n\r\n if (countOfRepeatingSections > 0) {\r\n // Set heights to 100% to fill container\r\n mainWidgetContainer.height(\"100%\");\r\n repeatingSectionContainer.height(\"100%\");\r\n\r\n // Work out if any more repeating sections need adding\r\n var firstRepeatingSection = repeatingSections.first();\r\n var heightOfRepeatingSection = getComputedHeight(firstRepeatingSection); // firstRepeatingSection.height();\r\n\r\n if (heightOfRepeatingSection > 0) {\r\n var heightOfContainer = getComputedHeight(repeatingSectionContainer); // repeatingSectionContainer.height();\r\n var totalHeightOfRepeatingSections = countOfRepeatingSections * heightOfRepeatingSection;\r\n\r\n if (heightOfContainer > totalHeightOfRepeatingSections) {\r\n // We need to add more repeating sections, but how many?\r\n var gapToFill = heightOfContainer - totalHeightOfRepeatingSections;\r\n var numberOfAdditionalRepeatingSections = Math.ceil(gapToFill / heightOfRepeatingSection);\r\n\r\n // Add extra sections\r\n for (var i = 0; i < numberOfAdditionalRepeatingSections; i++) {\r\n firstRepeatingSection.clone().appendTo(repeatingSectionContainer);\r\n }\r\n }\r\n }\r\n\r\n // Remove 100% heights again\r\n repeatingSectionContainer.height(\"auto\");\r\n mainWidgetContainer.height(\"auto\");\r\n\r\n // Set height of repeating section container if needed\r\n heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n\r\n if (heightOfWidgetContainer > availableHeightInParentAsideControl) {\r\n // Need to reduce height of main widget container\r\n\r\n // First, reduce height of repeating section container\r\n var heightToReduceBy = heightOfWidgetContainer - availableHeightInParentAsideControl;\r\n var widgetsInFirstRepeatingSection = $(\".widget\", firstRepeatingSection);\r\n var numberOfWidgetsPerRepeatingSection = widgetsInFirstRepeatingSection.length;\r\n if (numberOfWidgetsPerRepeatingSection > 0) {\r\n var widthOfFirstWidget = widgetsInFirstRepeatingSection.first().width();\r\n var widthOfRepeatingSection = firstRepeatingSection.width();\r\n if (widthOfFirstWidget > 0) {\r\n var numberOfWidgetsWide = Math.floor(widthOfRepeatingSection / widthOfFirstWidget);\r\n if (numberOfWidgetsWide > 0) {\r\n var heightOfOneWidget = heightOfRepeatingSection / numberOfWidgetsPerRepeatingSection * numberOfWidgetsWide;\r\n var numberOfWidgetsToReduceBy = Math.ceil(heightToReduceBy / heightOfOneWidget);\r\n var adjustedHeightToReduceBy = numberOfWidgetsToReduceBy * heightOfOneWidget;\r\n\r\n heightOfRepeatingSectionContainer = getComputedHeight(repeatingSectionContainer); // repeatingSectionContainer.height()\r\n repeatingSectionContainer.height(Math.floor(heightOfRepeatingSectionContainer - adjustedHeightToReduceBy));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n heightOfRepeatingSectionContainer = getComputedHeight(repeatingSectionContainer); // repeatingSectionContainer.height();\r\n }\r\n\r\n heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n\r\n // Check height of main widget container\r\n if (heightOfWidgetContainer > availableHeightInParentAsideControl && heightOfRepeatingSectionContainer == 0) {\r\n // Repeating section as small as it can go, but still need to lose height\r\n // Iterate backwards through any elements marked as hideable and hide until enough height lost\r\n $($(\".hideIfNoRoom\", mainWidgetContainer).get().reverse()).each(function () {\r\n $(this).hide();\r\n heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n if (heightOfWidgetContainer <= availableHeightInParentAsideControl) {\r\n return false;\r\n }\r\n });\r\n if (heightOfWidgetContainer > availableHeightInParentAsideControl) {\r\n // Still need to lose more height\r\n $($(\".hideIfNoRoomLast\", mainWidgetContainer).get().reverse()).each(function () {\r\n $(this).hide();\r\n heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n if (heightOfWidgetContainer <= availableHeightInParentAsideControl) {\r\n return false;\r\n }\r\n });\r\n }\r\n }\r\n\r\n }\r\n }\r\n });\r\n //$(window).trigger(\"layoutWidgetsComplete\");\r\n};\r\n\r\nfunction getSessionStorageItem(key) {\r\n if (typeof key != \"object\") {\r\n var itemValue = null;\r\n if (sessionStorage) {\r\n try {\r\n itemValue = sessionStorage.getItem(key);\r\n }\r\n catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at getSessionStorageItem`, err);\r\n }\r\n }\r\n }\r\n return itemValue;\r\n } else {\r\n // Return an error \r\n var obj = {};\r\n for (var i = 0; i < key.length; i++) {\r\n obj[key[i]] = getSessionStorageItem(key[i]);\r\n }\r\n \r\n return obj;\r\n }\r\n}\r\n\r\nfunction getSessionStorageItemAsync(key, done, error) {\r\n $.when(getSessionStorageItem(key)).then(done, error);\r\n}\r\n\r\nfunction setSessionStorageItem(key, data) {\r\n var itemSet = false;\r\n if (sessionStorage) {\r\n try {\r\n sessionStorage.setItem(key, data);\r\n itemSet = true;\r\n }\r\n catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at setSessionStorageItem`, err);\r\n }\r\n }\r\n }\r\n return itemSet;\r\n}\r\n\r\nfunction removeSessionStorageItem(key) {\r\n var itemRemoved = false;\r\n if (sessionStorage) {\r\n try {\r\n sessionStorage.removeItem(key);\r\n itemRemoved = true;\r\n }\r\n catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at removeSessionStorageItem`, err);\r\n }\r\n }\r\n }\r\n return itemRemoved;\r\n}\r\n\r\nfunction isSingleColumnView() {\r\n return columnsInCurrentView() == 1;\r\n}\r\n\r\nfunction columnsInCurrentView() {\r\n var columnCountIndicator = $(\"#columnCountIndicator\");\r\n if (columnCountIndicator.length > 0) {\r\n var divIsVisible = function (divId) { return $(\"#\" + divId, columnCountIndicator).css(\"display\") == \"block\"; };\r\n if (divIsVisible(\"oneColumn\")) {\r\n return 1;\r\n } else if (divIsVisible(\"twoColumn\")) {\r\n return 2;\r\n } else if (divIsVisible(\"threeColumn\")) {\r\n return 3;\r\n } else if (divIsVisible(\"fourColumn\")) {\r\n return 4;\r\n } else if (divIsVisible(\"fiveColumn\")) {\r\n return 5;\r\n }\r\n }\r\n return 0;\r\n}\r\n\r\nfunction IsKeyPressed(event, key) {\r\n return (\r\n (event.which ? event.which === key : false) ||\r\n (event.keyCode ? event.keyCode === key : false) ||\r\n (event.key ? event.key === key : false)\r\n );\r\n}\r\n\r\n$(function () {\r\n // executes when HTML-Document is loaded and DOM is ready\r\n\r\n initSingleListMenu();\r\n initMultiListMenu();\r\n\r\n layoutWidgets();\r\n $(window).resize(layoutWidgets);\r\n\r\n // global click handler\r\n $(document).click(function (event) {\r\n try {\r\n if (typeof (event) !== 'undefined'\r\n && event.target\r\n //&& event.target.nodeName === 'A'\r\n && typeof (gtag) !== 'undefined') {\r\n //target can be element inside the \r\n anchorItem = null\r\n if (event.target.nodeName === 'A') {\r\n anchorItem = $(event.target);\r\n }\r\n else {\r\n anchorItem = $(event.target).closest('a');\r\n }\r\n\r\n if (anchorItem.length > 0) {\r\n hrefVal = anchorItem.attr('href');\r\n eventTargetLocation = hrefVal;\r\n\r\n if (!hrefVal) { eventTargetLocation = window.location.pathname; }\r\n else if (hrefVal.charAt(0) === '#') { eventTargetLocation = window.location.pathname + hrefVal; }\r\n\r\n pageSectionVal = anchorItem.closest('[data-page-section]').attr('data-page-section');\r\n\r\n eventName = 'Links';\r\n eventLabel = anchorItem.text();\r\n\r\n gtag('event', eventName, {\r\n 'event_action': 'Click',\r\n 'event_category': eventName,\r\n 'event_label': eventLabel,\r\n 'target_location': eventTargetLocation,\r\n 'page_section': pageSectionVal\r\n });\r\n }\r\n }\r\n }\r\n catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at document click`, err);\r\n }\r\n }\r\n });\r\n\r\n initialiseTextAreaMaxLength($(\"textarea\"));\r\n initialiseTextBoxCount($(\"textarea, input[type=text]\"));\r\n\r\n $(\"#btnLogOut\").on(\"click\", function () {\r\n if (sessionStorage) {\r\n sessionStorage.clear();\r\n }\r\n });\r\n\r\n addClickToDefaultButtons();\r\n\r\n\tif (typeof (Sys) != 'undefined' && typeof (Sys.WebForms) != 'undefined' && typeof (Sys.WebForms.PageRequestManager) != 'undefined' && typeof (endRequestHandler) != 'undefined') {\r\n\t\tSys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);\r\n\t}\r\n \r\n $('.toggle_password').click(function () {\r\n let passwordControl = $(\"#\" + $(this).data(\"password-control\"));\r\n\r\n if (passwordControl.attr(\"type\") === \"password\") {\r\n // Currently password, toggle to text\r\n passwordControl.attr(\"type\", \"text\");\r\n $(this).addClass(\"icon-eye-blocked\");\r\n $(this).removeClass(\"icon-eye\");\r\n }\r\n else {\r\n // Currently text, toggle to password\r\n passwordControl.attr(\"type\", \"password\");\r\n $(this).addClass(\"icon-eye\");\r\n $(this).removeClass(\"icon-eye-blocked\");\r\n }\r\n });\r\n\r\n // toggle the navigation open and closed\r\n $('.navbar-toggle').on('click', function () {\r\n $(this).toggleClass('collapsed');\r\n $('#js-nav-collapse').toggleClass('is-shown');\r\n });\r\n\r\n $('.large-popup').click(function () {\r\n $('.chatpopbx').hide();\r\n $('.chatpopbx', $(this).closest('.chtcolbx')).show();\r\n });\r\n\r\n $('a.close').on('click', function (e) {\r\n e.preventDefault();\r\n $('.chatpopbx').hide();\r\n });\r\n \r\n //Initialise Controls and Pages\r\n if (typeof (InitialiseRegisterPage) == 'function' && $('.registerPage').length > 0)\r\n InitialiseRegisterPage();\r\n if (typeof (InitialiseRegisterSimplifiedPage) == 'function' && $('.registerPage').length > 0)\r\n InitialiseRegisterSimplifiedPage();\r\n if (typeof (InitialiseResetPasswordPage) == 'function' && $('.resetPassword').length > 0)\r\n InitialiseResetPasswordPage();\r\n\r\n});\r\n\r\n","\r\nvar AddressesByPostcode = {\r\n Get: function (Postcode, CountryCode, CallBackFunction) {\r\n if (!CallBackFunction) { CallBackFunction = function (data) { }; }\r\n\r\n Postcode = Postcode.toUpperCase();\r\n CountryCode = CountryCode.toUpperCase();\r\n\r\n var _storedElement = AddressesByPostcode.GetStoredElement(Postcode, CountryCode);\r\n\r\n if (_storedElement.status == AddressesByPostcode.Status.loaded) {\r\n CallBackFunction(_storedElement.data);\r\n }\r\n\r\n else if (_storedElement.status == AddressesByPostcode.Status.empty ||\r\n _storedElement.status == AddressesByPostcode.Status.error\r\n ) {\r\n\r\n _storedElement.status = AddressesByPostcode.Status.waiting;\r\n\r\n var data = { postcode: Postcode, countryCode: CountryCode };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: GETADDRESSESBYPOSTCODE,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n var responseData = GetNormalisedAjaxResponse(response);\r\n var _status = AddressesByPostcode.Status.error;\r\n\r\n if (responseData) {\r\n if (responseData.ServiceOperationOutcome == 10 || responseData.ServiceOperationOutcome == 40) {\r\n _status = AddressesByPostcode.Status.loaded;\r\n }\r\n }\r\n\r\n if (_storedElement) {\r\n if (_storedElement.status != AddressesByPostcode.Status.loaded) {\r\n _storedElement.data = responseData ? responseData : null;\r\n _storedElement.status = _status;\r\n }\r\n }\r\n else {\r\n AddressesByPostcode.PostCodeDataStorage.push({\r\n id: Postcode + CountryCode,\r\n data: responseData ? responseData : null,\r\n status: _status\r\n });\r\n }\r\n CallBackFunction(_storedElement.data);\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (_storedElement.status != AddressesByPostcode.Status.loaded) {\r\n _storedElement.status = AddressesByPostcode.Status.error;\r\n }\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n , GetStoredElement: function (Postcode, CountryCode) {\r\n var _element;\r\n _element = AddressesByPostcode.PostCodeDataStorage[AddressesByPostcode.PostCodeDataStorage.map(function (data) {\r\n return data.id;\r\n }).indexOf(Postcode + CountryCode)];\r\n\r\n if (!_element) {\r\n AddressesByPostcode.PostCodeDataStorage.push({\r\n id: Postcode + CountryCode,\r\n data: null,\r\n status: AddressesByPostcode.Status.empty\r\n });\r\n _element = AddressesByPostcode.PostCodeDataStorage[AddressesByPostcode.PostCodeDataStorage.map(function (data) {\r\n return data.id;\r\n }).indexOf(Postcode + CountryCode)];\r\n }\r\n\r\n return _element;\r\n }\r\n , PostCodeDataStorage: [{ id: \"\", data: undefined, status: null }]\r\n , Status: { empty: 0, waiting: 1, error: 2, loaded: 3 }\r\n}\r\n","var Cli = {\r\n GetCliType: function (cli, callBackFunction) {\r\n if (!callBackFunction) { callBackFunction = function (data) { }; }\r\n\r\n var storedElement = Cli.GetStoredElement(cli);\r\n\r\n if (storedElement.status == Cli.Status.loaded) {\r\n callBackFunction(storedElement.data);\r\n }\r\n\r\n else if (storedElement.status == Cli.Status.empty ||\r\n storedElement.status == Cli.Status.error\r\n ) {\r\n\r\n storedElement.status = Cli.Status.waiting;\r\n\r\n var data = { cli: cli };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: GETCLIECAPABILITY,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n var responseData = GetNormalisedAjaxResponse(response);\r\n\r\n var status = Cli.Status.error;\r\n\r\n if (responseData) {\r\n if (responseData.ServiceOperationOutcome == 10 || responseData.ServiceOperationOutcome == 40) {\r\n status = Cli.Status.loaded;\r\n }\r\n }\r\n\r\n if (storedElement) {\r\n if (storedElement.status != Cli.Status.loaded) {\r\n storedElement.data = responseData ? responseData : null;\r\n storedElement.status = status;\r\n }\r\n }\r\n else {\r\n Cli.DataStorage.push({\r\n id: cli,\r\n data: responseData ? responseData : null,\r\n status: status\r\n });\r\n }\r\n callBackFunction(storedElement.data);\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (storedElement.status != Cli.Status.loaded) {\r\n storedElement.status = Cli.Status.error;\r\n }\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n , InitialiseCliVerification: function (memberId, cli, cliVerificationTypeId, callBackFunction) {\r\n if (!callBackFunction) { callBackFunction = function (data) { }; }\r\n var data = { memberId: memberId, cli: cli, cliVerificationTypeId: cliVerificationTypeId };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: INITIALISECLIVERIFICATION,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n callBackFunction(GetNormalisedAjaxResponse(response));\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n , GetCliVerification: function (memberId, cli, callBackFunction) {\r\n if (!callBackFunction) { callBackFunction = function (data) { }; }\r\n var data = { memberId: memberId, cli: cli };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: GETCLIVERIFICATION,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n callBackFunction(GetNormalisedAjaxResponse(response));\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n , CancelCliVerification: function (memberId, cli, callBackFunction) {\r\n if (!callBackFunction) { callBackFunction = function (data) { }; }\r\n var data = { memberId: memberId, cli: cli };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: CANCELCLIVERIFICATION,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n callBackFunction(GetNormalisedAjaxResponse(response));\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n , GetStoredElement: function (cli) {\r\n var element;\r\n element = Cli.DataStorage[Cli.DataStorage.map(function (data) {\r\n return data.id;\r\n }).indexOf(cli)];\r\n\r\n if (!element) {\r\n Cli.DataStorage.push({\r\n id: cli,\r\n data: null,\r\n status: Cli.Status.empty\r\n });\r\n element = Cli.DataStorage[Cli.DataStorage.map(function (data) {\r\n return data.id;\r\n }).indexOf(cli)];\r\n }\r\n\r\n return element;\r\n }\r\n , DataStorage: [{ id: \"\", data: undefined, status: null }]\r\n , Status: {\r\n empty: 0\r\n , waiting: 1\r\n , error: 2\r\n , loaded: 3\r\n }\r\n , CliType: {\r\n fixedLine: 1\r\n , mobile: 2\r\n , all: 3\r\n }\r\n , CliVerificationType: {\r\n inboundCallPlayPassword: 2\r\n , outboundCallPlayPassword: 3\r\n }\r\n , CliVerification: {\r\n Status: {\r\n Requested: 10\r\n , AttemptFailedCouldRetry: 11\r\n , Queued: 20\r\n , InProgress: 30\r\n , Cancelled: 100\r\n , Expired: 110\r\n , MaximumFailedAttempts: 120\r\n , InvalidMemberId: 130\r\n , RequestCompleted: 200\r\n }\r\n , StatusType: {\r\n waiting: 1\r\n , error: 2\r\n , completed: 3\r\n }\r\n , StatusConfiguration: [\r\n { status: 10, type: 1, label: \"Requested\", icon: \"icon-wait\" }\r\n , { status: 11, type: 1, label: \"Attempt failed\", icon: \"icon-wait\" }\r\n , { status: 20, type: 1, label: \"Queued\", icon: \"icon-wait\" }\r\n , { status: 30, type: 1, label: \"In progress\", icon: \"icon-wait\" }\r\n , { status: 100, type: 3, label: \"Cancelled\", icon: \"icon-exclamation-circle\" }\r\n , { status: 110, type: 2, label: \"Expired\", icon: \"icon-exclamation-circle\" }\r\n , { status: 120, type: 2, label: \"Maximum failed attempts\", icon: \"icon-exclamation-circle\" }\r\n , { status: 130, type: 2, label: \"Error\", icon: \"icon-exclamation-circle\" } //to set a proper label\r\n , { status: 200, type: 3, label: \"Request completed\", icon: \"icon-exclamation-circle\" }\r\n , { status: -1, type: -1, label: \"Error\", icon: \"icon-exclamation-circle\" } //to set a proper label\r\n ]\r\n }\r\n , ClientConfigurations: {\r\n DefaultPollingTime: 3000\r\n }\r\n}\r\n","function validateTerms() {\r\n var validators = $('.registrationTermsValidator');\r\n for (var i = 0; i < validators.length; i++) {\r\n var validator = validators[i];\r\n ValidatorValidate(validator, validator.validationGroup, null);\r\n }\r\n ValidatorUpdateIsValid();\r\n}\r\n\r\nfunction FourDTermsValidate(source, args) {\r\n var checkBox = $get(\"cbTerms\");\r\n if (checkBox) args.IsValid = checkBox.checked;\r\n else args.IsValid = true; //let server check\r\n}\r\n\r\nvar InitialiseRegisterPage = function () {\r\n $('.registrationTerms').change(validateTerms);\r\n}\r\n","/// \r\n\r\nvar InitialiseRegisterSimplifiedPage = function () {\r\n\r\n var phoneNumber = $(\"#lblPhoneNumber\").text();\r\n var email = $(\"#lblEmail\").text();\r\n ShowSimplifiedSignup();\r\n\r\n Heading.StoreCurrent();\r\n\r\n if ($(\"#txtMobile\").val()) {\r\n CheckCliType($(\"#txtMobile\").val());\r\n }\r\n\r\n $(\"#txtMobile\").on(\"keyup\", function () {\r\n CheckCliType(this.value);\r\n }).on(\"change\", function () {\r\n CheckCliType(this.value);\r\n });\r\n\r\n Cli.GetCliVerification(null, phoneNumber, function (data) {\r\n if (data.CliVerificationDto) {\r\n if (data.CliVerificationDto.CliVerificationTypeId) {\r\n pollingOnRunning = true;\r\n CheckCliVerification(phoneNumber);\r\n ShowCliVerificationStatus(data.CliVerificationDto.CliVerificationTypeId, data.CliVerificationDto.CliVerificationStatusId, true);\r\n }\r\n }\r\n });\r\n\r\n $(\"#btnYouCallUs\").on(\"click\", function () {\r\n Cli.InitialiseCliVerification(null, phoneNumber, Cli.CliVerificationType.inboundCallPlayPassword, function (data) {\r\n if (data.CliVerificationDto && data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Requested &&\r\n data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.inboundCallPlayPassword) {\r\n pollingOnRunning = true;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.inboundCallPlayPassword, data.CliVerificationDto.CliVerficationStatusId, true);\r\n CheckCliVerification(phoneNumber);\r\n }\r\n else {\r\n // Error\r\n var cliVerficationStatusId = -1;\r\n if (data.CliVerificationDto) cliVerficationStatusId = data.CliVerificationDto.CliVerficationStatusId;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.inboundCallPlayPassword, cliVerficationStatusId, false);\r\n }\r\n });\r\n });\r\n\r\n $(\"#btnWeCallYou\").on(\"click\", function () {\r\n Cli.InitialiseCliVerification(null, phoneNumber, Cli.CliVerificationType.outboundCallPlayPassword, function (data) {\r\n if (data.CliVerificationDto && data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Requested &&\r\n data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n pollingOnRunning = true;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.outboundCallPlayPassword, data.CliVerificationDto.CliVerficationStatusId, true);\r\n CheckCliVerification(phoneNumber);\r\n }\r\n else {\r\n // Error\r\n var cliVerficationStatusId = -1;\r\n if (data.CliVerificationDto) cliVerficationStatusId = data.CliVerificationDto.CliVerficationStatusId;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.outboundCallPlayPassword, cliVerficationStatusId, false);\r\n }\r\n });\r\n });\r\n\r\n $(\"#btnResetLandline\").on(\"click\", function () {\r\n Cli.CancelCliVerification(null, phoneNumber, function (data) {\r\n if (data.CliVerificationDto) {\r\n if (data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Cancelled) {\r\n ResetCliVerificationLandLine();\r\n }\r\n }\r\n else {\r\n ResetCliVerificationLandLine();\r\n }\r\n });\r\n\r\n });\r\n\r\n $(\".buy_button\").addClass(\"aspNetDisabled\").children(\"a\").attr('disabled', 'disabled');\r\n\r\n $(\".buy_button > a\").click(function (event) {\r\n if ($(this).attr(\"disabled\") == \"disabled\") {\r\n event.preventDefault();\r\n $(\"#needLoginMessage\").removeClass(\"hidden\");\r\n\r\n // alert($(\"#msg-login-needed\").val());\r\n }\r\n });\r\n\r\n $(\"#btnLoginRegisterNew\").click(function () {\r\n if (Page_ClientValidate(\"AllValidators\")) {\r\n var login = phoneNumber;\r\n var password = $(\"#txtPassword\").val();\r\n\r\n var data = { login: login, password: password };\r\n RegisterSimplifiedLoginStarted();\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: REGISTERLOGIN,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n var responseData = GetNormalisedAjaxResponse(response);\r\n var isLoggedIn = false;\r\n if (responseData) {\r\n if (responseData.IsAuthenticated) {\r\n if (responseData.RedirectUrl != null && responseData.RedirectUrl.length > 0) {\r\n // TODO - remove/update temp offer check logic\r\n var currentURL = window.location;\r\n var host = window.location.host;\r\n var hostname = window.location.hostname;\r\n var protocol = window.location.protocol;\r\n var port = window.location.port;\r\n\r\n var currentHostname = (port === 80 || port === 443) ? hostname : host;\r\n\r\n window.location = protocol + '//' + currentHostname + responseData.RedirectUrl;\r\n }\r\n else {\r\n //remove click event for login\r\n $(\"#btnLoginRegisterNew\").off(\"click\");\r\n\r\n //disable login controls\r\n $(\"#btnLoginRegisterNew\").addClass(\"aspNetDisabled\").removeAttr(\"href\");\r\n $(\".register-new.mobile-number\").addClass(\"aspNetDisabled\").attr('disabled', 'disabled');\r\n $(\".register-new.password\").addClass(\"aspNetDisabled\").attr('disabled', 'disabled');\r\n\r\n //Enable buy buttons \r\n $(\".buy_button\").removeClass(\"aspNetDisabled\").children(\"a\").removeAttr(\"disabled\");\r\n isLoggedIn = true;\r\n RegisterSimplifiedLoginSuccessful();\r\n }\r\n }\r\n else {\r\n //set login error message\r\n $(\"#valPasswordAsync\").attr(\"style\", \"\");\r\n }\r\n }\r\n RegisterSimplifiedLoginEnded(isLoggedIn);\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n //callback({}); //looks like a bxslider function\r\n RegisterSimplifiedLoginEnded(false);\r\n }\r\n });\r\n\r\n }\r\n\r\n });\r\n\r\n $(\"#btnLoginRegisterNewV2\").click(function () {\r\n if (Page_ClientValidate(\"AllValidators\")) {\r\n var login = email;\r\n var password = $(\"#txtPassword\").val();\r\n\r\n var data = { login: login, password: password };\r\n RegisterSimplifiedLoginStarted();\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: REGISTERLOGIN,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n var responseData = GetNormalisedAjaxResponse(response);\r\n var isLoggedIn = false;\r\n if (responseData) {\r\n if (responseData.IsAuthenticated) {\r\n if (responseData.RedirectUrl != null && responseData.RedirectUrl.length > 0) {\r\n // TODO - remove/update temp offer check logic\r\n var currentURL = window.location;\r\n var host = window.location.host;\r\n var hostname = window.location.hostname;\r\n var protocol = window.location.protocol;\r\n var port = window.location.port;\r\n\r\n var currentHostname = (port === 80 || port === 443) ? hostname : host;\r\n\r\n window.location = protocol + '//' + currentHostname + responseData.RedirectUrl;\r\n }\r\n else {\r\n //remove click event for login\r\n $(\"#btnLoginRegisterNew\").off(\"click\");\r\n\r\n //disable login controls\r\n $(\"#btnLoginRegisterNew\").addClass(\"aspNetDisabled\").removeAttr(\"href\");\r\n $(\".register-new.mobile-number\").addClass(\"aspNetDisabled\").attr('disabled', 'disabled');\r\n $(\".register-new.password\").addClass(\"aspNetDisabled\").attr('disabled', 'disabled');\r\n\r\n //Enable buy buttons \r\n $(\".buy_button\").removeClass(\"aspNetDisabled\").children(\"a\").removeAttr(\"disabled\");\r\n isLoggedIn = true;\r\n RegisterSimplifiedLoginSuccessful();\r\n }\r\n }\r\n else {\r\n //set login error message\r\n $(\"#valPasswordAsync\").attr(\"style\", \"\");\r\n }\r\n }\r\n RegisterSimplifiedLoginEnded(isLoggedIn);\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n //callback({}); //looks like a bxslider function\r\n RegisterSimplifiedLoginEnded(false);\r\n }\r\n });\r\n\r\n }\r\n\r\n });\r\n\r\n}\r\n\r\nvar pollingOnRunning = false;\r\n\r\nfunction CheckCliType(cli) {\r\n if (cli.length > 9) {\r\n Cli.GetCliType(cli, function (data) { });\r\n }\r\n}\r\n\r\nfunction CheckCliVerification(cli) {\r\n\r\n Cli.GetCliVerification(null, cli, function (data) {\r\n if (pollingOnRunning) {\r\n if (data.CliVerificationDto) {\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(data.CliVerificationDto.CliVerficationStatusId)];\r\n\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n if (statusConfiguration.type == Cli.CliVerification.StatusType.waiting) {\r\n\r\n if (data.CliVerificationDto.RequestCanBeCancelled) {\r\n $(\"#divResetLandline\").removeClass(\"hidden\");\r\n }\r\n else {\r\n $(\"#divResetLandline\").addClass(\"hidden\");\r\n }\r\n setTimeout(function () { CheckCliVerification(cli); }, Cli.ClientConfigurations.DefaultPollingTime);\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divResetLandline\").removeClass(\"hidden\");\r\n }\r\n $(\"#iconStatus\").removeClass().addClass(statusConfiguration.icon);\r\n $(\"#spanStatusText\").text(statusConfiguration.label);\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divResetLandline\").removeClass(\"hidden\");\r\n }\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divResetLandline\").removeClass(\"hidden\");\r\n }\r\n }\r\n });\r\n}\r\n\r\nfunction ResetCliVerificationLandLine() {\r\n pollingOnRunning = false;\r\n $(\"#btnWeCallYou\").attr(\"disabled\", false).show();\r\n $(\"#btnYouCallUs\").attr(\"disabled\", false).show();\r\n $(\"#liPassw0rd\").addClass(\"hidden\");\r\n $(\"#contentWeCallYou\").addClass(\"hidden\");\r\n $(\"#contentCallUs\").addClass(\"hidden\");\r\n $(\"#buttonLoginContent\").addClass(\"hidden\");\r\n $(\"#divStatus\").addClass(\"hidden\");\r\n $(\"#divResetLandline\").addClass(\"hidden\");\r\n $(\"#spanStatusText\").text(\"Requested\");\r\n $(\"#iconStatus\").removeClass().addClass(\"icon-wait\");\r\n Heading.Reset();\r\n}\r\n\r\nfunction ShowSimplifiedSignup() {\r\n $(\".buttons.simplified-signup-register\").show();\r\n $(\".age.signup\").hide();\r\n}\r\n\r\nfunction RegisterSimplifiedLoginSuccessful() {\r\n $(\"#loginForm\").hide();\r\n $(\"#paymentOptions\").removeClass(\"disabled\");\r\n $(\"#needLoginMessage\").addClass(\"hidden\");\r\n $(\"#notLoggedInContent\").addClass(\"hidden\");\r\n $(\"#LoggedInContent\").removeClass(\"hidden\");\r\n}\r\n\r\nfunction RegisterSimplifiedLoginStarted() {\r\n $(\"#btnLoginRegisterNew\").addClass(\"aspNetDisabled\").attr(\"disabled\", \"disabled\");\r\n $(\"#Loginspan\").addClass(\"hidden\");\r\n $(\"#loading\").removeClass(\"hidden\");\r\n}\r\n\r\nfunction RegisterSimplifiedLoginEnded(isLoggedIn) {\r\n if (isLoggedIn == false)\r\n $(\"#btnLoginRegisterNew\").removeClass(\"aspNetDisabled\").removeAttr(\"disabled\");\r\n $(\"#loading\").addClass(\"hidden\");\r\n $(\"#Loginspan\").removeClass(\"hidden\");\r\n}\r\n\r\nvar Heading = {\r\n element: $(\"#notLoggedInContent\")\r\n , html: null\r\n , htmlTemplate: \"


\"\r\n , StoreCurrent: function () {\r\n Heading.html = Heading.element.html();\r\n }\r\n , Set: function (h1, p) {\r\n Heading.element.html(Heading.htmlTemplate);\r\n Heading.element.children(\"h1\").text(h1);\r\n Heading.element.children(\"p\").text(p);\r\n }\r\n , Reset: function () {\r\n Heading.element.html(Heading.html);\r\n }\r\n}\r\n\r\nfunction ShowCliVerificationStatus(cliVerificationTypeId, cliVerficationStatusId, showVerifyingHeading) {\r\n $(\"#btnYouCallUs\").hide();\r\n $(\"#btnWeCallYou\").hide();\r\n $(\"#liPassw0rd\").removeClass(\"hidden\");\r\n $(\"#buttonLoginContent\").removeClass(\"hidden\");\r\n $(\"#divStatus\").removeClass(\"hidden\");\r\n\r\n if (cliVerificationTypeId == Cli.CliVerificationType.inboundCallPlayPassword) {\r\n $(\"#contentWeCallYou\").addClass(\"hidden\");\r\n $(\"#contentCallUs\").removeClass(\"hidden\");\r\n } else if (cliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n $(\"#contentWeCallYou\").removeClass(\"hidden\");\r\n $(\"#contentCallUs\").addClass(\"hidden\");\r\n }\r\n\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(cliVerficationStatusId)];\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n $(\"#iconStatus\").removeClass().addClass(statusConfiguration.icon);\r\n $(\"#spanStatusText\").text(statusConfiguration.label);\r\n }\r\n\r\n if (showVerifyingHeading) {\r\n Heading.Set(\"Verifying your phone number\", \"Please now enter the password issued by our service to continue.\");\r\n }\r\n}","var InitialiseResetPasswordPage = function () {\r\n\r\n var pollingOnRunning = false;\r\n var phoneNumber;\r\n\r\n CheckCliType($(\"#txtMobileNumber\").val());\r\n\r\n $(\"#divBtnWeCallYou\").on(\"click\", function () {\r\n phoneNumber = $(\"#txtMobileNumber\").val();\r\n\r\n Cli.InitialiseCliVerification(null, phoneNumber, Cli.CliVerificationType.outboundCallPlayPassword, function (data) {\r\n if (data.CliVerificationDto && data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Requested &&\r\n data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n pollingOnRunning = true;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.outboundCallPlayPassword, data.CliVerificationDto.CliVerficationStatusId);\r\n CheckCliVerification(phoneNumber);\r\n }\r\n else {\r\n // Error\r\n var cliVerficationStatusId = -1;\r\n if (data.CliVerificationDto) cliVerficationStatusId = data.CliVerificationDto.CliVerficationStatusId;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.outboundCallPlayPassword, cliVerficationStatusId);\r\n }\r\n });\r\n });\r\n\r\n $(\"#divBtnYouCallUs\").on(\"click\", function () {\r\n phoneNumber = $(\"#txtMobileNumber\").val();\r\n\r\n Cli.InitialiseCliVerification(null, phoneNumber, Cli.CliVerificationType.inboundCallPlayPassword, function (data) {\r\n if (data.CliVerificationDto && data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Requested &&\r\n data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.inboundCallPlayPassword) {\r\n pollingOnRunning = true;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.inboundCallPlayPassword, data.CliVerificationDto.CliVerficationStatusId);\r\n CheckCliVerification(phoneNumber);\r\n }\r\n else {\r\n // Error\r\n var cliVerficationStatusId = -1;\r\n if (data.CliVerificationDto) cliVerficationStatusId = data.CliVerificationDto.CliVerficationStatusId;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.inboundCallPlayPassword, cliVerficationStatusId);\r\n }\r\n });\r\n });\r\n\r\n $(\"#btnResetLandline\").on(\"click\", function () {\r\n phoneNumber = $(\"#txtMobileNumber\").val();\r\n\r\n Cli.CancelCliVerification(null, phoneNumber, function (data) {\r\n if (data.CliVerificationDto) {\r\n if (data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Cancelled) {\r\n pollingOnRunning = false;\r\n ShowLandline();\r\n }\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n ShowLandline();\r\n }\r\n });\r\n });\r\n\r\n\r\n function CheckCliType(cli) {\r\n\r\n var action = function (data) {\r\n if (data.CliTypeId == Cli.CliType.fixedLine) {\r\n ShowLandline()\r\n }\r\n else {\r\n ShowMobile()\r\n }\r\n };\r\n\r\n if (cli.length > 9) {\r\n Cli.GetCliType(cli, action);\r\n }\r\n else {\r\n ShowMobile()\r\n }\r\n }\r\n\r\n\r\n\r\n function CheckCliVerification(cli) {\r\n\r\n Cli.GetCliVerification(null, cli, function (data) {\r\n if (pollingOnRunning) {\r\n if (data.CliVerificationDto) {\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(data.CliVerificationDto.CliVerficationStatusId)];\r\n\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n if (statusConfiguration.type == Cli.CliVerification.StatusType.waiting) {\r\n\r\n if (data.CliVerificationDto.RequestCanBeCancelled) {\r\n $(\"#divLinksLandLine\").removeClass(\"hidden\");\r\n }\r\n else {\r\n $(\"#divLinksLandLine\").addClass(\"hidden\");\r\n }\r\n setTimeout(function () { CheckCliVerification(cli); }, Cli.ClientConfigurations.DefaultPollingTime);\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divLinksLandLine\").removeClass(\"hidden\");\r\n }\r\n $(\"#iconStatus\").removeClass().addClass(statusConfiguration.icon);\r\n $(\"#spanStatusText\").text(statusConfiguration.label);\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divLinksLandLine\").removeClass(\"hidden\");\r\n }\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divLinksLandLine\").removeClass(\"hidden\");\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n\r\n function ShowLandline() {\r\n var baseAction = function () {\r\n if ($(\"#txtMobileNumber\").val()) {\r\n\r\n $(\"#divRequestMobile\").hide();\r\n $(\"#divLinksMobile\").hide();\r\n $(\".ValidationHeader\").addClass(\"hidden\");\r\n\r\n $(\"#divTxtWeCallYou\").addClass(\"hidden\");\r\n $(\"#divTxtYouCallUs\").addClass(\"hidden\");\r\n $(\"#divLinksLandLine\").addClass(\"hidden\");\r\n $(\"#divStatus\").addClass(\"hidden\");\r\n\r\n $(\"#landLineResetRequestContent\").removeClass(\"hidden\");\r\n $(\"#divBtnWeCallYou\").removeClass(\"hidden\");\r\n $(\"#divBtnYouCallUs\").removeClass(\"hidden\");\r\n $(\"#txtMobileNumber\").attr(\"disabled\", false);\r\n\r\n $(\"#spanStatusText\").text(\"Requested\");\r\n $(\"#iconStatus\").removeClass().addClass(\"icon-wait\");\r\n }\r\n else {\r\n ShowMobile();\r\n }\r\n }\r\n\r\n $(\"#divRequestMobile\").hide();\r\n $(\"#divLinksMobile\").hide();\r\n $(\".ValidationHeader\").addClass(\"hidden\");\r\n\r\n phoneNumber = $(\"#txtMobileNumber\").val();\r\n\r\n Cli.GetCliVerification(null, phoneNumber, function (data) {\r\n if (data.CliVerificationDto) {\r\n if (data.CliVerificationDto.CliVerificationTypeId) {\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(data.CliVerificationDto.CliVerficationStatusId)];\r\n\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n if (statusConfiguration.type == Cli.CliVerification.StatusType.waiting) {\r\n pollingOnRunning = true;\r\n CheckCliVerification(phoneNumber);\r\n\r\n $(\"#divStatus\").removeClass(\"hidden\");\r\n $(\"#txtMobileNumber\").attr(\"disabled\", true);\r\n\r\n if (data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n $(\"#divTxtWeCallYou\").removeClass(\"hidden\");\r\n }\r\n else {\r\n $(\"#divTxtYouCallUs\").removeClass(\"hidden\");\r\n }\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n baseAction();\r\n });\r\n\r\n }\r\n\r\n function ShowMobile() {\r\n $(\"#landLineResetRequestContent\").addClass(\"hidden\");\r\n $(\"#divBtnWeCallYou\").addClass(\"hidden\");\r\n $(\"#divBtnYouCallUs\").addClass(\"hidden\");\r\n $(\"#divTxtWeCallYou\").addClass(\"hidden\");\r\n $(\"#divTxtYouCallUs\").addClass(\"hidden\");\r\n $(\"#divLinksLandLine\").addClass(\"hidden\");\r\n $(\"#divStatus\").addClass(\"hidden\");\r\n $(\"#divLinksMobile\").show();\r\n $(\"#divRequestMobile\").show();\r\n $(\".ValidationHeader\").removeClass(\"hidden\");\r\n $(\"#txtMobileNumber\").attr(\"disabled\", false);\r\n\r\n $(\"#spanStatusText\").text(\"Requested\");\r\n $(\"#iconStatus\").removeClass().addClass(\"icon-wait\");\r\n }\r\n\r\n function ShowCliVerificationStatus(cliVerificationTypeId, cliVerficationStatusId) { \r\n $(\"#txtMobileNumber\").attr(\"disabled\", true);\r\n $(\"#divBtnWeCallYou\").addClass(\"hidden\");\r\n $(\"#divBtnYouCallUs\").addClass(\"hidden\");\r\n $(\"#divStatus\").removeClass(\"hidden\");\r\n\r\n if (cliVerificationTypeId == Cli.CliVerificationType.inboundCallPlayPassword) {\r\n $(\"#divTxtWeCallYou\").addClass(\"hidden\");\r\n $(\"#divTxtYouCallUs\").removeClass(\"hidden\");\r\n } else if (cliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n $(\"#divTxtYouCallUs\").addClass(\"hidden\");\r\n $(\"#divTxtWeCallYou\").removeClass(\"hidden\");\r\n }\r\n\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(cliVerficationStatusId)];\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n $(\"#iconStatus\").removeClass().addClass(statusConfiguration.icon);\r\n $(\"#spanStatusText\").text(statusConfiguration.label);\r\n }\r\n }\r\n}"]}