{"version":3,"file":"scripts.a1bede3cffbf9e8c.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D,iFAAiF,YAAY,aAAa,oBAAoB,WAAW,oBAAoB,mBAAmB,UAAU;AAC1L;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,CAAC,I;CCvlBD;AACA;AACA;AACA;AACA;;AAEA,aAAa,mFAAmF,aAAa,aAAa,kBAAkB,gBAAgB,8EAA8E,gBAAgB,YAAY,WAAW,KAAK,WAAW,+GAA+G,kBAAkB,uCAAuC,wvQAAwvQ,WAAW,KAAK,WAAW,MAAM,yEAAyE,OAAO,wBAAwB,+CAA+C,+CAA+C,aAAa,0BAA0B,yCAAyC,wDAAwD,WAAW,kXAAkX,2HAA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AAK,YAAY,gDAAgD,iBAAiB,+GAA+G,GAAG,E","sources":["src\\scripts\\rxp-hpp.js","node_modules\\intl-tel-input\\build\\js\\intlTelInput.min.js"],"sourcesContent":["/*jslint browser:true */\r\nvar RealexHpp = (function () {\r\n\r\n 'use strict';\r\n\r\n var hppUrl = \"https://pay.realexpayments.com/pay\";\r\n\r\n var randomId = randomId || Math.random().toString(16).substr(2, 8);\r\n\r\n var setHppUrl = function (url) {\r\n hppUrl = url;\r\n };\r\n\r\n var isWindowsMobileOs = /Windows Phone|IEMobile/.test(navigator.userAgent);\r\n var isAndroidOrIOs = /Android|iPad|iPhone|iPod/.test(navigator.userAgent);\r\n var isMobileXS = ((((window.innerWidth > 0) ? window.innerWidth : screen.width) <= 360 ? true : false) || (((window.innerHeight > 0) ? window.innerHeight : screen.Height) <= 360 ? true : false));\r\n\r\n // Display IFrame on WIndows Phone OS mobile devices\r\n var isMobileIFrame = isWindowsMobileOs;\r\n\r\n // For IOs/Android and small screen devices always open in new tab/window\r\n var isMobileNewTab = !isWindowsMobileOs && (isAndroidOrIOs || isMobileXS);\r\n var tabWindow;\r\n\r\n var redirectUrl;\r\n\r\n var internal = {\r\n createFormHiddenInput: function (name, value) {\r\n var el = document.createElement(\"input\");\r\n el.setAttribute(\"type\", \"hidden\");\r\n el.setAttribute(\"name\", name);\r\n el.setAttribute(\"value\", value);\r\n return el;\r\n },\r\n\r\n checkDevicesOrientation: function () {\r\n if (window.orientation === 90 || window.orientation === -90) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n\r\n createOverlay: function () {\r\n var overlay = document.createElement(\"div\");\r\n overlay.setAttribute(\"id\", \"rxp-overlay-\" + randomId);\r\n overlay.style.position = \"fixed\";\r\n overlay.style.width = \"100%\";\r\n overlay.style.height = \"100%\";\r\n overlay.style.top = \"0\";\r\n overlay.style.left = \"0\";\r\n overlay.style.transition = \"all 0.3s ease-in-out\";\r\n overlay.style.zIndex = \"100\";\r\n\r\n if (isMobileIFrame) {\r\n overlay.style.position = \"absolute !important\";\r\n overlay.style.WebkitOverflowScrolling = \"touch\";\r\n overlay.style.overflowX = \"hidden\";\r\n overlay.style.overflowY = \"scroll\";\r\n }\r\n\r\n document.body.appendChild(overlay);\r\n\r\n setTimeout(function () {\r\n overlay.style.background = \"rgba(0, 0, 0, 0.7)\";\r\n }, 1);\r\n\r\n return overlay;\r\n },\r\n\r\n closeModal: function (closeButton, iFrame, spinner, overlayElement) {\r\n if (closeButton && closeButton.parentNode) {\r\n closeButton.parentNode.removeChild(closeButton);\r\n }\r\n\r\n if (iFrame && iFrame.parentNode) {\r\n iFrame.parentNode.removeChild(iFrame);\r\n }\r\n\r\n if (spinner && spinner.parentNode) {\r\n spinner.parentNode.removeChild(spinner);\r\n }\r\n\r\n if (!overlayElement) {\r\n return;\r\n }\r\n\r\n overlayElement.className = \"\";\r\n setTimeout(function () {\r\n if (overlayElement.parentNode) {\r\n overlayElement.parentNode.removeChild(overlayElement);\r\n }\r\n }, 300);\r\n },\r\n\r\n createCloseButton: function (overlayElement) {\r\n if (document.getElementById(\"rxp-frame-close-\" + randomId) !== null) {\r\n return;\r\n }\r\n\r\n var closeButton = document.createElement(\"img\");\r\n closeButton.setAttribute(\"id\", \"rxp-frame-close-\" + randomId);\r\n closeButton.setAttribute(\"src\", \"data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPH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f57ntWGwYdBIVx0TfkBD6I9M35iRJgfIoAVjBLDZbA4CiJ5+9AdQi/EahibqDTkQx6fRSIHcPwA8Uy9A9Gcc47Xv+w2wzhRDYzqdVihLIbsIiCvP1NNOoX/29FQx3vgOgtt4FyRdCgPRarX4+goB9vkyAMh443cOEsIAAcjncuoI4TXWMAmCIGFhCQLAdZ8jym/cRJ+Y5nC5XCYAhINKpZLgSISZgoqh5iiLQrojAFICVwGS7tCfe5DbZzkP56XS4NVxwvTI/vXVVYIDnqmnnX70ZxzjNS8THHooK5hMpxHQIREA+tEfA9djfHR3MHkdx3Hspe9r3B+VzWaj2RESyR2mlCUE4MoGQDdxiwHURq2t94+PO9bMIYyTyDNLwMoM7g8+BfKeYGniyw2MdfSehF3Qmk1IvCc/AgwAaS86Etp38bUAAAAASUVORK5CYII=\");\r\n closeButton.setAttribute(\"style\", \"transition: all 0.5s ease-in-out; opacity: 0; float: left; position: absolute; left: 50%; margin-left: 173px; z-index: 99999999; top: 30px;\");\r\n\r\n setTimeout(function () {\r\n closeButton.style.opacity = \"1\";\r\n }, 500);\r\n\r\n if (isMobileIFrame) {\r\n closeButton.style.position = \"absolute\";\r\n closeButton.style.float = \"right\";\r\n closeButton.style.top = \"20px\";\r\n closeButton.style.left = \"initial\";\r\n closeButton.style.marginLeft = \"0px\";\r\n closeButton.style.right = \"20px\";\r\n }\r\n\r\n return closeButton;\r\n },\r\n\r\n createForm: function (doc, token, ignorePostMessage) {\r\n var form = document.createElement(\"form\");\r\n form.setAttribute(\"method\", \"POST\");\r\n form.setAttribute(\"action\", hppUrl);\r\n\r\n var versionSet = false;\r\n\r\n for (var key in token) {\r\n if (key === \"HPP_VERSION\") {\r\n versionSet = true;\r\n }\r\n form.appendChild(internal.createFormHiddenInput(key, token[key]));\r\n }\r\n\r\n if (versionSet === false) {\r\n form.appendChild(internal.createFormHiddenInput(\"HPP_VERSION\", \"2\"));\r\n }\r\n\r\n if (ignorePostMessage) {\r\n form.appendChild(internal.createFormHiddenInput(\"MERCHANT_RESPONSE_URL\", redirectUrl));\r\n } else {\r\n var parser = internal.getUrlParser(window.location.href);\r\n var hppOriginParam = parser.protocol + '//' + parser.host;\r\n\r\n form.appendChild(internal.createFormHiddenInput(\"HPP_POST_RESPONSE\", hppOriginParam));\r\n form.appendChild(internal.createFormHiddenInput(\"HPP_POST_DIMENSIONS\", hppOriginParam));\r\n }\r\n return form;\r\n },\r\n\r\n createSpinner: function () {\r\n var spinner = document.createElement(\"img\");\r\n spinner.setAttribute(\"src\", \"data:image/gif;base64,R0lGODlhHAAcAPYAAP////OQHv338fzw4frfwPjIkPzx4/nVq/jKlfe7dv337/vo0fvn0Pzy5/WrVv38+vjDhva2bfzq1fe/f/vkyve8d/WoT/nRpP327ve9e/zs2vrWrPWqVPWtWfvmzve5cvazZvrdvPjKlPfAgPnOnPvp0/zx5fawYfe+ff317PnTp/nMmfvgwvfBgv39/PrXsPSeO/vjx/jJkvzz6PnNm/vkyfnUqfjLl/revvnQoPSfPfSgP/348/nPnvratfrYsvWlSvSbNPrZs/vhw/zv4P306vrXrvzq1/359f369vjHjvSjRvOXLfORIfOQHvjDh/rduvSaM/jEifvlzPzu3v37+Pvixfzr2Pzt3Pa1afa3b/nQovnSpfaxYvjFi/rbt/rcufWsWPjGjfSjRPShQfjChPOUJva0aPa2a/awX/e6dPWnTfWkSPScNve4cPWpUfSdOvOSI/OVKPayZPe9efauW/WpUvOYL/SiQ/OZMfScOPOTJfavXfWmSwAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAHAAcAAAH/4AAgoOEhYaHiIUKKYmNh0ofjoklL4RLUQ+DVZmSAAswOYIKTE1UglUCVZ0AGBYwPwBHTU44AFU8PKuCEzpARB5OTjYAPEi5jQYNgzE7QS1ET1JTD7iqgi6chAcOFRsmABUQBoQuSAIALjwpMwqHCBYcJyrHhulF9xiJFx0WMo0Y99o18oBCWSI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EVyxcq8K1NhhpQwxCDEgEE3WrQggsPHFCpQcGCNlYKIRUNXyrTA4aIHAigArOAYUrDRhgk0yF1YQQBAChwhGqB6IEbJNCMIpggaAOYKKgwXjAJggSAiAANHbBW6kgMsAN+6q7jWTfxQIAA7AAAAAAAAAAAA\");\r\n spinner.setAttribute(\"id\", \"rxp-loader-\" + randomId);\r\n spinner.style.left = \"50%\";\r\n spinner.style.position = \"fixed\";\r\n spinner.style.background = \"#FFFFFF\";\r\n spinner.style.borderRadius = \"50%\";\r\n spinner.style.width = \"30px\";\r\n spinner.style.zIndex = \"200\";\r\n spinner.style.marginLeft = \"-15px\";\r\n spinner.style.top = \"120px\";\r\n return spinner;\r\n },\r\n\r\n createIFrame: function (overlayElement, token) {\r\n //Create the spinner\r\n var spinner = internal.createSpinner();\r\n document.body.appendChild(spinner);\r\n\r\n //Create the iframe\r\n var iFrame = document.createElement(\"iframe\");\r\n iFrame.setAttribute(\"name\", \"rxp-frame-\" + randomId);\r\n iFrame.setAttribute(\"id\", \"rxp-frame-\" + randomId);\r\n iFrame.setAttribute(\"height\", \"562px\");\r\n iFrame.setAttribute(\"frameBorder\", \"0\");\r\n iFrame.setAttribute(\"width\", \"360px\");\r\n iFrame.setAttribute(\"seamless\", \"seamless\");\r\n\r\n iFrame.style.zIndex = \"10001\";\r\n iFrame.style.position = \"absolute\";\r\n iFrame.style.transition = \"transform 0.5s ease-in-out\";\r\n iFrame.style.transform = \"scale(0.7)\";\r\n iFrame.style.opacity = \"0\";\r\n\r\n overlayElement.appendChild(iFrame);\r\n\r\n if (isMobileIFrame) {\r\n iFrame.style.top = \"0px\";\r\n iFrame.style.bottom = \"0px\";\r\n iFrame.style.left = \"0px\";\r\n iFrame.style.marginLeft = \"0px;\";\r\n iFrame.style.width = \"100%\";\r\n iFrame.style.height = \"100%\";\r\n iFrame.style.minHeight = \"100%\";\r\n iFrame.style.WebkitTransform = \"translate3d(0,0,0)\";\r\n iFrame.style.transform = \"translate3d(0, 0, 0)\";\r\n\r\n var metaTag = document.createElement('meta');\r\n metaTag.name = \"viewport\";\r\n metaTag.content = \"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\";\r\n document.getElementsByTagName('head')[0].appendChild(metaTag);\r\n } else {\r\n iFrame.style.top = \"40px\";\r\n iFrame.style.left = \"50%\";\r\n iFrame.style.marginLeft = \"-180px\";\r\n }\r\n\r\n var closeButton;\r\n\r\n iFrame.onload = function () {\r\n iFrame.style.opacity = \"1\";\r\n iFrame.style.transform = \"scale(1)\";\r\n iFrame.style.backgroundColor = \"#ffffff\";\r\n\r\n if (spinner.parentNode) {\r\n spinner.parentNode.removeChild(spinner);\r\n }\r\n\r\n closeButton = internal.createCloseButton();\r\n overlayElement.appendChild(closeButton);\r\n closeButton.addEventListener(\"click\", function () {\r\n internal.closeModal(closeButton, iFrame, spinner, overlayElement);\r\n }, true);\r\n };\r\n\r\n var form = internal.createForm(document, token);\r\n if (iFrame.contentWindow.document.body) {\r\n iFrame.contentWindow.document.body.appendChild(form);\r\n } else {\r\n iFrame.contentWindow.document.appendChild(form);\r\n }\r\n\r\n form.submit();\r\n\r\n return {\r\n spinner: spinner,\r\n iFrame: iFrame,\r\n closeButton: closeButton\r\n };\r\n },\r\n\r\n openWindow: function (token) {\r\n //open new window\r\n var tabWindow = window.open();\r\n\r\n // browsers can prevent a new window from being created\r\n // e.g. mobile Safari\r\n if (!tabWindow) {\r\n return null;\r\n }\r\n\r\n var doc = tabWindow.document;\r\n\r\n //add meta tag to new window (needed for iOS 8 bug)\r\n var meta = doc.createElement(\"meta\");\r\n var name = doc.createAttribute(\"name\");\r\n name.value = \"viewport\";\r\n meta.setAttributeNode(name);\r\n var content = doc.createAttribute(\"content\");\r\n content.value = \"width=device-width\";\r\n meta.setAttributeNode(content);\r\n doc.head.appendChild(meta);\r\n\r\n //create form, append to new window and submit\r\n var form = internal.createForm(doc, token);\r\n doc.body.appendChild(form);\r\n form.submit();\r\n\r\n return tabWindow;\r\n },\r\n\r\n getUrlParser: function (url) {\r\n var parser = document.createElement('a');\r\n parser.href = url;\r\n return parser;\r\n },\r\n\r\n getHostnameFromUrl: function (url) {\r\n return internal.getUrlParser(url).hostname;\r\n },\r\n\r\n isMessageFromHpp: function (origin, hppUrl) {\r\n return internal.getHostnameFromUrl(origin) === internal.getHostnameFromUrl(hppUrl);\r\n },\r\n\r\n receiveMessage: function (lightboxInstance, merchantUrl, isEmbedded) {\r\n return function (event) {\r\n //Check the origin of the response comes from HPP\r\n if (!internal.isMessageFromHpp(event.origin, hppUrl)) {\r\n return;\r\n }\r\n\r\n // check for iframe resize values\r\n if (event.data && JSON.parse(event.data).iframe) {\r\n if (!isMobileNewTab) {\r\n var iframeWidth = JSON.parse(event.data).iframe.width;\r\n var iframeHeight = JSON.parse(event.data).iframe.height;\r\n\r\n var iFrame;\r\n var resized = false;\r\n\r\n if (isEmbedded) {\r\n iFrame = lightboxInstance.getIframe();\r\n } else {\r\n iFrame = document.getElementById(\"rxp-frame-\" + randomId);\r\n }\r\n\r\n if (iframeWidth === \"390px\" && iframeHeight === \"440px\") {\r\n iFrame.setAttribute(\"width\", iframeWidth);\r\n iFrame.setAttribute(\"height\", iframeHeight);\r\n resized = true;\r\n }\r\n\r\n iFrame.style.backgroundColor = \"#ffffff\";\r\n\r\n if (isMobileIFrame) {\r\n iFrame.style.marginLeft = \"0px\";\r\n iFrame.style.WebkitOverflowScrolling = \"touch\";\r\n iFrame.style.overflowX = \"scroll\";\r\n iFrame.style.overflowY = \"scroll\";\r\n\r\n if (!isEmbedded) {\r\n var overlay = document.getElementById(\"rxp-overlay-\" + randomId);\r\n overlay.style.overflowX = \"scroll\";\r\n overlay.style.overflowY = \"scroll\";\r\n }\r\n } else if (!isEmbedded && resized) {\r\n iFrame.style.marginLeft = (parseInt(iframeWidth.replace(\"px\", \"\"), 10) / 2 * -1) + \"px\";\r\n }\r\n\r\n if (!isEmbedded && resized) {\r\n // wrap the below in a setTimeout to prevent a timing issue on a\r\n // cache-miss load\r\n setTimeout(function () {\r\n var closeButton = document.getElementById(\"rxp-frame-close-\" + randomId);\r\n closeButton.style.marginLeft = ((parseInt(iframeWidth.replace(\"px\", \"\"), 10) / 2) - 7) + \"px\";\r\n }, 200);\r\n }\r\n }\r\n } else {\r\n if (isMobileNewTab && tabWindow) {\r\n //Close the new window\r\n tabWindow.close();\r\n } else {\r\n //Close the lightbox\r\n lightboxInstance.close();\r\n }\r\n\r\n // This is managed whitin our receiveMessageHpp()!\r\n\r\n // var response = event.data;\r\n\r\n // Create a form and submit the hpp response to the merchant's response url\r\n\r\n // var form = document.createElement(\"form\");\r\n // form.setAttribute(\"method\", \"POST\");\r\n // form.setAttribute(\"action\", merchantUrl);\r\n // form.setAttribute(\"target\", '_blank');\r\n\r\n // form.appendChild(internal.createFormHiddenInput(\"hppResponse\", response));\r\n\r\n // document.body.appendChild(form);\r\n\r\n // form.submit();\r\n }\r\n };\r\n }\r\n };\r\n\r\n // Initialising some variables used throughout this file.\r\n var RxpLightbox = (function () {\r\n var instance;\r\n\r\n function init() {\r\n var overlayElement;\r\n var spinner;\r\n var iFrame;\r\n var closeButton;\r\n var token;\r\n var isLandscape = internal.checkDevicesOrientation();\r\n\r\n if (isMobileIFrame) {\r\n if (window.addEventListener) {\r\n window.addEventListener(\"orientationchange\", function () {\r\n isLandscape = internal.checkDevicesOrientation();\r\n }, false);\r\n }\r\n }\r\n\r\n return {\r\n lightbox: function () {\r\n if (isMobileNewTab) {\r\n tabWindow = internal.openWindow(token);\r\n } else {\r\n overlayElement = internal.createOverlay();\r\n var temp = internal.createIFrame(overlayElement, token);\r\n spinner = temp.spinner;\r\n iFrame = temp.iFrame;\r\n closeButton = temp.closeButton;\r\n }\r\n },\r\n close: function () {\r\n internal.closeModal();\r\n },\r\n setToken: function (hppToken) {\r\n token = hppToken;\r\n }\r\n };\r\n }\r\n\r\n return {\r\n // Get the Singleton instance if one exists\r\n // or create one if it doesn't\r\n getInstance: function (hppToken) {\r\n if (!instance) {\r\n instance = init();\r\n }\r\n\r\n //Set the hpp token\r\n instance.setToken(hppToken);\r\n\r\n return instance;\r\n },\r\n init: function (idOfLightboxButton, merchantUrl, serverSdkJson) {\r\n //Get the lightbox instance (it's a singleton) and set the sdk json\r\n var lightboxInstance = RxpLightbox.getInstance(serverSdkJson);\r\n\r\n // Sets the event listener on the PAY button. The click will invoke the lightbox method\r\n if (document.getElementById(idOfLightboxButton).addEventListener) {\r\n document.getElementById(idOfLightboxButton).addEventListener(\"click\", lightboxInstance.lightbox, true);\r\n } else {\r\n document.getElementById(idOfLightboxButton).attachEvent('onclick', lightboxInstance.lightbox);\r\n }\r\n\r\n if (window.addEventListener) {\r\n window.addEventListener(\"message\", internal.receiveMessage(lightboxInstance, merchantUrl), false);\r\n } else {\r\n window.attachEvent('message', internal.receiveMessage(lightboxInstance, merchantUrl));\r\n }\r\n }\r\n };\r\n })();\r\n\r\n // Initialising some variables used throughout this file.\r\n var RxpEmbedded = (function () {\r\n var instance;\r\n\r\n function init() {\r\n var overlayElement;\r\n var spinner;\r\n var iFrame;\r\n var closeButton;\r\n var token;\r\n\r\n return {\r\n embedded: function () {\r\n var form = internal.createForm(document, token);\r\n if (iFrame) {\r\n if (iFrame.contentWindow.document.body) {\r\n iFrame.contentWindow.document.body.appendChild(form);\r\n } else {\r\n iFrame.contentWindow.document.appendChild(form);\r\n }\r\n form.submit();\r\n iFrame.style.display = \"inherit\";\r\n }\r\n },\r\n close: function () {\r\n iFrame.style.display = \"none\";\r\n },\r\n setToken: function (hppToken) {\r\n token = hppToken;\r\n },\r\n setIframe: function (iframeId) {\r\n iFrame = document.getElementById(iframeId);\r\n },\r\n getIframe: function () {\r\n return iFrame;\r\n }\r\n };\r\n }\r\n\r\n return {\r\n // Get the Singleton instance if one exists\r\n // or create one if it doesn't\r\n getInstance: function (hppToken) {\r\n if (!instance) {\r\n instance = init();\r\n }\r\n\r\n //Set the hpp token\r\n instance.setToken(hppToken);\r\n\r\n return instance;\r\n },\r\n init: function (idOfEmbeddedButton, idOfTargetIframe, merchantUrl, serverSdkJson) {\r\n //Get the embedded instance (it's a singleton) and set the sdk json\r\n var embeddedInstance = RxpEmbedded.getInstance(serverSdkJson);\r\n\r\n embeddedInstance.setIframe(idOfTargetIframe);\r\n\r\n // Sets the event listener on the PAY button. The click will invoke the embedded method\r\n if (document.getElementById(idOfEmbeddedButton).addEventListener) {\r\n document.getElementById(idOfEmbeddedButton).addEventListener(\"click\", embeddedInstance.embedded, true);\r\n } else {\r\n document.getElementById(idOfEmbeddedButton).attachEvent('onclick', embeddedInstance.embedded);\r\n }\r\n\r\n if (window.addEventListener) {\r\n window.addEventListener(\"message\", internal.receiveMessage(embeddedInstance, merchantUrl, true), false);\r\n } else {\r\n window.attachEvent('message', internal.receiveMessage(embeddedInstance, merchantUrl, true));\r\n }\r\n }\r\n };\r\n })();\r\n\r\n var RxpRedirect = (function () {\r\n var instance;\r\n\r\n function init() {\r\n var overlayElement;\r\n var spinner;\r\n var iFrame;\r\n var closeButton;\r\n var token;\r\n var isLandscape = internal.checkDevicesOrientation();\r\n\r\n if (isMobileIFrame) {\r\n if (window.addEventListener) {\r\n window.addEventListener(\"orientationchange\", function () {\r\n isLandscape = internal.checkDevicesOrientation();\r\n }, false);\r\n }\r\n }\r\n\r\n return {\r\n redirect: function () {\r\n var form = internal.createForm(document, token, true);\r\n document.body.append(form);\r\n form.submit();\r\n },\r\n setToken: function (hppToken) {\r\n token = hppToken;\r\n }\r\n };\r\n }\r\n return {\r\n // Get the singleton instance if one exists\r\n // or create one if it doesn't\r\n getInstance: function (hppToken) {\r\n if (!instance) {\r\n instance = init();\r\n }\r\n\r\n // Set the hpp token\r\n instance.setToken(hppToken);\r\n\r\n return instance;\r\n },\r\n init: function (idOfButton, merchantUrl, serverSdkJson) {\r\n // Get the redirect instance (it's a singleton) and set the sdk json\r\n var redirectInstance = RxpRedirect.getInstance(serverSdkJson);\r\n redirectUrl = merchantUrl;\r\n\r\n // Sets the event listener on the PAY button. The click will invoke the redirect method\r\n if (document.getElementById(idOfButton).addEventListener) {\r\n document.getElementById(idOfButton).addEventListener(\"click\", redirectInstance.redirect, true);\r\n } else {\r\n document.getElementById(idOfButton).attachEvent('onclick', redirectInstance.redirect);\r\n }\r\n\r\n if (window.addEventListener) {\r\n window.addEventListener(\"message\", internal.receiveMessage(redirectInstance, merchantUrl), false);\r\n } else {\r\n window.attachEvent('message', internal.receiveMessage(redirectInstance, merchantUrl));\r\n }\r\n }\r\n };\r\n }());\r\n\r\n // RealexHpp\r\n return {\r\n init: RxpLightbox.init,\r\n lightbox: {\r\n init: RxpLightbox.init\r\n },\r\n embedded: {\r\n init: RxpEmbedded.init\r\n },\r\n redirect: {\r\n init: RxpRedirect.init\r\n },\r\n setHppUrl: setHppUrl,\r\n _internal: internal\r\n };\r\n\r\n}());","/*\n * International Telephone Input v17.0.21\n * https://github.com/jackocnr/intl-tel-input.git\n * Licensed under the MIT license\n */\n\n!function(a){\"object\"==typeof module&&module.exports?module.exports=a():window.intlTelInput=a()}(function(a){\"use strict\";return function(){function b(a,b){if(!(a instanceof b))throw new TypeError(\"Cannot call a class as a function\")}function c(a,b){for(var c=0;cthis.countryCodeMaxLen&&(this.countryCodeMaxLen=c.length),this.q.hasOwnProperty(c)||(this.q[c]=[]);for(var e=0;e-1})}else if(this.d.excludeCountries.length){var b=this.d.excludeCountries.map(function(a){return a.toLowerCase()});this.p=e.filter(function(a){return-1===b.indexOf(a.iso2)})}else this.p=e}},{key:\"_d0\",value:function(){for(var a=0;a\"),d+=\"
\"),d+=\"\".concat(f.name,\"\"),d+=\"+\".concat(f.dialCode,\"\"),d+=\"\"}this.m.insertAdjacentHTML(\"beforeend\",d)}},{key:\"_h\",value:function(){var a=this.a.getAttribute(\"value\"),b=this.a.value,c=a&&\"+\"===a.charAt(0)&&(!b||\"+\"!==b.charAt(0)),d=c?a:b,e=this._5(d),f=this._w(d),g=this.d,h=g.initialCountry,i=g.nationalMode,j=g.autoHideDialCode,k=g.separateDialCode;e&&!f?this._v(d):\"auto\"!==h&&(h?this._z(h.toLowerCase()):e&&f?this._z(\"us\"):(this.j=this.preferredCountries.length?this.preferredCountries[0].iso2:this.p[0].iso2,d||this._z(this.j)),d||i||j||k||(this.a.value=\"+\".concat(this.s.dialCode))),d&&this._u(d)}},{key:\"_i\",value:function(){this._j(),this.d.autoHideDialCode&&this._l(),this.d.allowDropdown&&this._i2(),this.hiddenInput&&this._i0()}},{key:\"_i0\",value:function(){var a=this;this._a14=function(){a.hiddenInput.value=a.getNumber()},this.a.form&&this.a.form.addEventListener(\"submit\",this._a14)}},{key:\"_i1\",value:function(){for(var a=this.a;a&&\"LABEL\"!==a.tagName;)a=a.parentNode;return a}},{key:\"_i2\",value:function(){var a=this;this._a9=function(b){a.m.classList.contains(\"iti__hide\")?a.a.focus():b.preventDefault()};var b=this._i1();b&&b.addEventListener(\"click\",this._a9),this._a10=function(){!a.m.classList.contains(\"iti__hide\")||a.a.disabled||a.a.readOnly||a._n()},this.selectedFlag.addEventListener(\"click\",this._a10),this._a11=function(b){a.m.classList.contains(\"iti__hide\")&&-1!==[\"ArrowUp\",\"Up\",\"ArrowDown\",\"Down\",\" \",\"Enter\"].indexOf(b.key)&&(b.preventDefault(),b.stopPropagation(),a._n()),\"Tab\"===b.key&&a._2()},this.k.addEventListener(\"keydown\",this._a11)}},{key:\"_i3\",value:function(){var a=this;this.d.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.d.utilsScript):window.addEventListener(\"load\",function(){window.intlTelInputGlobals.loadUtils(a.d.utilsScript)}):this.i0(),\"auto\"===this.d.initialCountry?this._i4():this.h()}},{key:\"_i4\",value:function(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,\"function\"==typeof this.d.geoIpLookup&&this.d.geoIpLookup(function(a){window.intlTelInputGlobals.autoCountry=a.toLowerCase(),setTimeout(function(){return m(\"handleAutoCountry\")})},function(){return m(\"rejectAutoCountryPromise\")}))}},{key:\"_j\",value:function(){var a=this;this._a12=function(){a._v(a.a.value)&&a._m2CountryChange()},this.a.addEventListener(\"keyup\",this._a12),this._a13=function(){setTimeout(a._a12)},this.a.addEventListener(\"cut\",this._a13),this.a.addEventListener(\"paste\",this._a13)}},{key:\"_j2\",value:function(a){var b=this.a.getAttribute(\"maxlength\");return b&&a.length>b?a.substr(0,b):a}},{key:\"_l\",value:function(){var a=this;this._a8=function(){a._l2()},this.a.form&&this.a.form.addEventListener(\"submit\",this._a8),this.a.addEventListener(\"blur\",this._a8)}},{key:\"_l2\",value:function(){if(\"+\"===this.a.value.charAt(0)){var a=this._m(this.a.value);a&&this.s.dialCode!==a||(this.a.value=\"\")}}},{key:\"_m\",value:function(a){return a.replace(/\\D/g,\"\")}},{key:\"_m2\",value:function(a){var b=document.createEvent(\"Event\");b.initEvent(a,!0,!0),this.a.dispatchEvent(b)}},{key:\"_n\",value:function(){this.m.classList.remove(\"iti__hide\"),this.selectedFlag.setAttribute(\"aria-expanded\",\"true\"),this._o(),this.b&&(this._x(this.b,!1),this._3(this.b,!0)),this._p(),this.u.classList.add(\"iti__arrow--up\"),this._m2(\"open:countrydropdown\")}},{key:\"_n2\",value:function(a,b,c){c&&!a.classList.contains(b)?a.classList.add(b):!c&&a.classList.contains(b)&&a.classList.remove(b)}},{key:\"_o\",value:function(){var a=this;if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.g){var b=this.a.getBoundingClientRect(),c=window.pageYOffset||document.documentElement.scrollTop,d=b.top+c,e=this.m.offsetHeight,f=d+this.a.offsetHeight+ec;if(this._n2(this.m,\"iti__country-list--dropup\",!f&&g),this.d.dropdownContainer){var h=!f&&g?0:this.a.offsetHeight;this.dropdown.style.top=\"\".concat(d+h,\"px\"),this.dropdown.style.left=\"\".concat(b.left+document.body.scrollLeft,\"px\"),this._a4=function(){return a._2()},window.addEventListener(\"scroll\",this._a4)}}}},{key:\"_o2\",value:function(a){for(var b=a;b&&b!==this.m&&!b.classList.contains(\"iti__country\");)b=b.parentNode;return b===this.m?null:b}},{key:\"_p\",value:function(){var a=this;this._a0=function(b){var c=a._o2(b.target);c&&a._x(c,!1)},this.m.addEventListener(\"mouseover\",this._a0),this._a1=function(b){var c=a._o2(b.target);c&&a._1(c)},this.m.addEventListener(\"click\",this._a1);var b=!0;this._a2=function(){b||a._2(),b=!1},document.documentElement.addEventListener(\"click\",this._a2);var c=\"\",d=null;this._a3=function(b){b.preventDefault(),\"ArrowUp\"===b.key||\"Up\"===b.key||\"ArrowDown\"===b.key||\"Down\"===b.key?a._q(b.key):\"Enter\"===b.key?a._r():\"Escape\"===b.key?a._2():/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(b.key)&&(d&&clearTimeout(d),c+=b.key.toLowerCase(),a._s(c),d=setTimeout(function(){c=\"\"},1e3))},document.addEventListener(\"keydown\",this._a3)}},{key:\"_q\",value:function(a){var b=\"ArrowUp\"===a||\"Up\"===a?this.c.previousElementSibling:this.c.nextElementSibling;b&&(b.classList.contains(\"iti__divider\")&&(b=\"ArrowUp\"===a||\"Up\"===a?b.previousElementSibling:b.nextElementSibling),this._x(b,!0))}},{key:\"_r\",value:function(){this.c&&this._1(this.c)}},{key:\"_s\",value:function(a){for(var b=0;bg){b&&(k+=l);var m=e-h;c.scrollTop=k-m}}},{key:\"_4\",value:function(a,b){var c,d=this.a.value,e=\"+\".concat(a);if(\"+\"===d.charAt(0)){var f=this._5(d);c=f?d.replace(f,e):e}else{if(this.d.nationalMode||this.d.separateDialCode)return;if(d)c=e+d;else{if(!b&&this.d.autoHideDialCode)return;c=e}}this.a.value=c}},{key:\"_5\",value:function(a,b){var c=\"\";if(\"+\"===a.charAt(0))for(var d=\"\",e=0;e