/*! For license information please see Venmo.js.LICENSE */ !function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=17)}({0:function(t,e,i){"use strict";i.r(e),i.d(e,"Tools",(function(){return a}));var n=i(1),o=i.n(n),a={getAlert:function(t,e){var i=document.createElement("div"),n=document.createElement("div");return n.innerHTML=t,i.className="alert alert-".concat(e),i.appendChild(n),i},hideConfiguration:function(t){var e='[name="'.concat(t,'"]');$(e).closest(".form-group").hide()},showConfiguration:function(t){var e='[name="'.concat(t,'"]');$(e).closest(".form-group").show()},isVisible:function(t){var e=window.getComputedStyle(t);return"0"!==e.width&&"0"!==e.height&&"0"!==e.opacity&&"none"!==e.display&&"hidden"!==e.visibility},disableTillConsenting:function(t,e){t instanceof Element!=0&&e instanceof Element!=0&&(a.disable(t),e.addEventListener("click",(function(){e.checked?a.enable(t):a.disable(t)})))},disable:function(t){t instanceof Element!=0&&(t.style.pointerEvents="none",t.style.opacity="0.5")},enable:function(t){t instanceof Element!=0&&(t.style.pointerEvents="",t.style.opacity="1")},hideElementTillPaymentOptionChecked:function(t,e){var i=document.querySelector(t),n=document.querySelector(e);if(i instanceof Element!=0&&n instanceof Element!=0)if("paypalToolsHiddenElemenList"in window==0&&(window.paypalToolsHiddenElemenList={}),e in window.paypalToolsHiddenElemenList)window.paypalToolsHiddenElemenList[e].push(i);else{window.paypalToolsHiddenElemenList[e]=[i];var o=i.closest(".payment-options");o instanceof Element!=0&&o.addEventListener("input",(function(t){var i=!1;window.paypalToolsHiddenElemenList[e].forEach((function(t){t.checked&&(i=!0)})),n.style.visibility=i?"hidden":"initial"}))}},initPhoneInput:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0!=t instanceof Element&&(t.addEventListener("input",(function(t){t.target.value=t.target.value.replace("+","")})),o()(t,e))}};window.PaypalTools=a;var s=new Event("paypal-tools-loaded");document.dispatchEvent(s)},1:function(t,e,i){t.exports=i(2)},17:function(t,e,i){"use strict";i.r(e);var n=i(0);function o(t,e){for(var i=0;ithis.countryCodeMaxLen&&(this.countryCodeMaxLen=i.length),this.countryCodes.hasOwnProperty(i)||(this.countryCodes[i]=[]);for(var o=0;o-1}))}else if(this.options.excludeCountries.length){var i=this.options.excludeCountries.map((function(t){return t.toLowerCase()}));this.countries=e.filter((function(t){return-1===i.indexOf(t.iso2)}))}else this.countries=e}},{key:"_translateCountriesByLocale",value:function(){for(var t=0;t"),n+="
"),n+="".concat(a.name,""),n+="+".concat(a.dialCode,""),n+=""}this.countryList.insertAdjacentHTML("beforeend",n)}},{key:"_setInitialState",value:function(){var t=this.telInput.getAttribute("value"),e=this.telInput.value,i=!t||"+"!==t.charAt(0)||e&&"+"===e.charAt(0)?e:t,n=this._getDialCode(i),o=this._isRegionlessNanp(i),a=this.options,s=a.initialCountry,r=a.nationalMode,l=a.autoHideDialCode,u=a.separateDialCode;n&&!o?this._updateFlagFromNumber(i):"auto"!==s&&(s?this._setFlag(s.toLowerCase()):n&&o?this._setFlag("us"):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,i||this._setFlag(this.defaultCountry)),i||r||l||u||(this.telInput.value="+".concat(this.selectedCountryData.dialCode))),i&&this._updateValFromNumber(i)}},{key:"_initListeners",value:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initBlurListeners(),this.options.allowDropdown&&this._initDropdownListeners(),this.hiddenInput&&this._initHiddenInputListener()}},{key:"_initHiddenInputListener",value:function(){var t=this;this._handleHiddenInputSubmit=function(){t.hiddenInput.value=t.getNumber()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleHiddenInputSubmit)}},{key:"_getClosestLabel",value:function(){for(var t=this.telInput;t&&"LABEL"!==t.tagName;)t=t.parentNode;return t}},{key:"_initDropdownListeners",value:function(){var t=this;this._handleLabelClick=function(e){t.countryList.classList.contains("iti__hide")?t.telInput.focus():e.preventDefault()};var e=this._getClosestLabel();e&&e.addEventListener("click",this._handleLabelClick),this._handleClickSelectedFlag=function(){!t.countryList.classList.contains("iti__hide")||t.telInput.disabled||t.telInput.readOnly||t._showDropdown()},this.selectedFlag.addEventListener("click",this._handleClickSelectedFlag),this._handleFlagsContainerKeydown=function(e){t.countryList.classList.contains("iti__hide")&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(e.key)&&(e.preventDefault(),e.stopPropagation(),t._showDropdown()),"Tab"===e.key&&t._closeDropdown()},this.flagsContainer.addEventListener("keydown",this._handleFlagsContainerKeydown)}},{key:"_initRequests",value:function(){var t=this;this.options.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.options.utilsScript):window.addEventListener("load",(function(){window.intlTelInputGlobals.loadUtils(t.options.utilsScript)})):this.resolveUtilsScriptPromise(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.resolveAutoCountryPromise()}},{key:"_loadAutoCountry",value:function(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup((function(t){window.intlTelInputGlobals.autoCountry=t.toLowerCase(),setTimeout((function(){return d("handleAutoCountry")}))}),(function(){return d("rejectAutoCountryPromise")})))}},{key:"_initKeyListeners",value:function(){var t=this;this._handleKeyupEvent=function(){t._updateFlagFromNumber(t.telInput.value)&&t._triggerCountryChange()},this.telInput.addEventListener("keyup",this._handleKeyupEvent),this._handleClipboardEvent=function(){setTimeout(t._handleKeyupEvent)},this.telInput.addEventListener("cut",this._handleClipboardEvent),this.telInput.addEventListener("paste",this._handleClipboardEvent)}},{key:"_cap",value:function(t){var e=this.telInput.getAttribute("maxlength");return e&&t.length>e?t.substr(0,e):t}},{key:"_initBlurListeners",value:function(){var t=this;this._handleSubmitOrBlurEvent=function(){t._removeEmptyDialCode()},this.telInput.form&&this.telInput.form.addEventListener("submit",this._handleSubmitOrBlurEvent),this.telInput.addEventListener("blur",this._handleSubmitOrBlurEvent)}},{key:"_removeEmptyDialCode",value:function(){if("+"===this.telInput.value.charAt(0)){var t=this._getNumeric(this.telInput.value);t&&this.selectedCountryData.dialCode!==t||(this.telInput.value="")}}},{key:"_getNumeric",value:function(t){return t.replace(/\D/g,"")}},{key:"_trigger",value:function(t){var e=document.createEvent("Event");e.initEvent(t,!0,!0),this.telInput.dispatchEvent(e)}},{key:"_showDropdown",value:function(){this.countryList.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._setDropdownPosition(),this.activeItem&&(this._highlightListItem(this.activeItem,!1),this._scrollTo(this.activeItem,!0)),this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}},{key:"_toggleClass",value:function(t,e,i){i&&!t.classList.contains(e)?t.classList.add(e):!i&&t.classList.contains(e)&&t.classList.remove(e)}},{key:"_setDropdownPosition",value:function(){var t=this;if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.isMobile){var e=this.telInput.getBoundingClientRect(),i=window.pageYOffset||document.documentElement.scrollTop,n=e.top+i,o=this.countryList.offsetHeight,a=n+this.telInput.offsetHeight+oi;if(this._toggleClass(this.countryList,"iti__country-list--dropup",!a&&s),this.options.dropdownContainer){var r=!a&&s?0:this.telInput.offsetHeight;this.dropdown.style.top="".concat(n+r,"px"),this.dropdown.style.left="".concat(e.left+document.body.scrollLeft,"px"),this._handleWindowScroll=function(){return t._closeDropdown()},window.addEventListener("scroll",this._handleWindowScroll)}}}},{key:"_getClosestListItem",value:function(t){for(var e=t;e&&e!==this.countryList&&!e.classList.contains("iti__country");)e=e.parentNode;return e===this.countryList?null:e}},{key:"_bindDropdownListeners",value:function(){var t=this;this._handleMouseoverCountryList=function(e){var i=t._getClosestListItem(e.target);i&&t._highlightListItem(i,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=function(e){var i=t._getClosestListItem(e.target);i&&t._selectListItem(i)},this.countryList.addEventListener("click",this._handleClickCountryList);var e=!0;this._handleClickOffToClose=function(){e||t._closeDropdown(),e=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);var i="",n=null;this._handleKeydownOnDropdown=function(e){e.preventDefault(),"ArrowUp"===e.key||"Up"===e.key||"ArrowDown"===e.key||"Down"===e.key?t._handleUpDownKey(e.key):"Enter"===e.key?t._handleEnterKey():"Escape"===e.key?t._closeDropdown():/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(e.key)&&(n&&clearTimeout(n),i+=e.key.toLowerCase(),t._searchForCountry(i),n=setTimeout((function(){i=""}),1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown)}},{key:"_handleUpDownKey",value:function(t){var e="ArrowUp"===t||"Up"===t?this.highlightedItem.previousElementSibling:this.highlightedItem.nextElementSibling;e&&(e.classList.contains("iti__divider")&&(e="ArrowUp"===t||"Up"===t?e.previousElementSibling:e.nextElementSibling),this._highlightListItem(e,!0))}},{key:"_handleEnterKey",value:function(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}},{key:"_searchForCountry",value:function(t){for(var e=0;es){e&&(d+=c);var h=o-r;i.scrollTop=d-h}}},{key:"_updateDialCode",value:function(t,e){var i,n=this.telInput.value,o="+".concat(t);if("+"===n.charAt(0)){var a=this._getDialCode(n);i=a?n.replace(a,o):o}else{if(this.options.nationalMode||this.options.separateDialCode)return;if(n)i=o+n;else{if(!e&&this.options.autoHideDialCode)return;i=o}}this.telInput.value=i}},{key:"_getDialCode",value:function(t,e){var i="";if("+"===t.charAt(0))for(var n="",o=0;o