(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(44)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",function(){return i}),n.d(t,"__assign",function(){return o}),n.d(t,"__rest",function(){return a}),n.d(t,"__decorate",function(){return s}),n.d(t,"__param",function(){return c}),n.d(t,"__metadata",function(){return u}),n.d(t,"__awaiter",function(){return l}),n.d(t,"__generator",function(){return d}),n.d(t,"__exportStar",function(){return p}),n.d(t,"__values",function(){return f}),n.d(t,"__read",function(){return h}),n.d(t,"__spread",function(){return m}),n.d(t,"__spreadArrays",function(){return _}),n.d(t,"__await",function(){return y}),n.d(t,"__asyncGenerator",function(){return g}),n.d(t,"__asyncDelegator",function(){return E}),n.d(t,"__asyncValues",function(){return v}),n.d(t,"__makeTemplateObject",function(){return b}),n.d(t,"__importStar",function(){return T}),n.d(t,"__importDefault",function(){return A});var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})}function d(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function h(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{(n=i[e](t)).value instanceof y?Promise.resolve(n.value.v).then(c,u):l(o[0][2],n)}catch(r){l(o[0][3],r)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function E(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function v(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,i,(t=e[n](t)).done,t.value)})}}}function b(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function A(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return nt});var r=n(16),i=n.n(r),o=n(28),a=n.n(o),s=n(0),c=n.n(s),u=n(29),l=n(17),d=n(18),p=(n(51),n(42)),f=n(41),h=function(e,t){for(var n=[e[0]],r=0,i=t.length;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},b=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},T=function(e){return"object"===("undefined"===typeof e?"undefined":m(e))&&e.constructor===Object},A=Object.freeze([]),I=Object.freeze({});function N(e){return"function"===typeof e}function O(e){return e.displayName||e.name||"Component"}function w(e){return e&&"string"===typeof e.styledComponentId}var S="undefined"!==typeof e&&(Object({NODE_ENV:"production",PUBLIC_URL:"https://pay.actionbutton.co",REACT_APP_ENV:"production"}).REACT_APP_SC_ATTR||Object({NODE_ENV:"production",PUBLIC_URL:"https://pay.actionbutton.co",REACT_APP_ENV:"production"}).SC_ATTR)||"data-styled",C="undefined"!==typeof window&&"HTMLElement"in window,P="boolean"===typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||"undefined"!==typeof e&&(Object({NODE_ENV:"production",PUBLIC_URL:"https://pay.actionbutton.co",REACT_APP_ENV:"production"}).REACT_APP_SC_DISABLE_SPEEDY||Object({NODE_ENV:"production",PUBLIC_URL:"https://pay.actionbutton.co",REACT_APP_ENV:"production"}).SC_DISABLE_SPEEDY)||!1,R={};var D=function(e){function t(n){_(this,t);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o0?" Additional arguments: "+i.join(", "):"")));return b(a)}return E(t,e),t}(Error),k=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,L=function(e){var t=""+(e||""),n=[];return t.replace(k,function(e,t,r){return n.push({componentId:t,matchIndex:r}),e}),n.map(function(e,r){var i=e.componentId,o=e.matchIndex,a=n[r+1];return{componentId:i,cssFromDOM:a?t.slice(o,a.matchIndex):t.slice(o)}})},x=/^\s*\/\/.*$/gm,M=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),U=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),F=[],j=function(e){if(-2===e){var t=F;return F=[],t}},z=a()(function(e){F.push(e)}),H=void 0,V=void 0,Y=void 0,B=function(e,t,n){return t>0&&-1!==n.slice(0,t).indexOf(V)&&n.slice(t-V.length,t)!==V?"."+H:e};U.use([function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(V)>0&&(n[0]=n[0].replace(Y,B))},z,j]),M.use([z,j]);function K(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",i=e.join("").replace(x,""),o=t&&n?n+" "+t+" { "+i+" }":i;return H=r,V=t,Y=new RegExp("\\"+V+"\\b","g"),U(n||!t?"":t,o)}var W=function(){return n.nc},G=function(e,t,n){n&&((e[t]||(e[t]=Object.create(null)))[n]=!0)},Q=function(e,t){e[t]=Object.create(null)},q=function(e){return function(t,n){return void 0!==e[t]&&e[t][n]}},$=function(e){var t="";for(var n in e)t+=Object.keys(e[n]).join(" ")+" ";return t.trim()},Z=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets.length,n=0;n"+e()+""}},ne=function(e,t){return function(){var n,r=((n={})[S]=$(t),n["data-styled-version"]="4.3.2",n),i=W();return i&&(r.nonce=i),c.a.createElement("style",g({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},re=function(e){return function(){return Object.keys(e)}},ie=function(e){return document.createTextNode(J(e))},oe=function e(t,n){var r=void 0===t?Object.create(null):t,i=void 0===n?Object.create(null):n,o=function(e){var t=i[e];return void 0!==t?t:i[e]=[""]},a=function(){var e="";for(var t in i){var n=i[t][0];n&&(e+=J(t)+n)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var n in e)t[n]=g({},e[n]);return t}(r),n=Object.create(null);for(var o in i)n[o]=[i[o][0]];return e(t,n)},css:a,getIds:re(i),hasNameForId:q(r),insertMarker:o,insertRules:function(e,t,n){o(e)[0]+=t.join(" "),G(r,e,n)},removeRules:function(e){var t=i[e];void 0!==t&&(t[0]="",Q(r,e))},sealed:!1,styleTag:null,toElement:ne(a,r),toHTML:te(a,r)}},ae=function(e,t,n,r,i){if(C&&!n){var o=function(e,t,n){var r=document.createElement("style");r.setAttribute(S,""),r.setAttribute("data-styled-version","4.3.2");var i=W();if(i&&r.setAttribute("nonce",i),r.appendChild(document.createTextNode("")),e&&!t)e.appendChild(r);else{if(!t||!e||!t.parentNode)throw new D(6);t.parentNode.insertBefore(r,n?t:t.nextSibling)}return r}(e,t,r);return P?function(e,t){var n=Object.create(null),r=Object.create(null),i=void 0!==t,o=!1,a=function(t){var i=r[t];return void 0!==i?i:(r[t]=ie(t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},s=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new D(5)},css:s,getIds:re(r),hasNameForId:q(n),insertMarker:a,insertRules:function(e,r,s){for(var c=a(e),u=[],l=r.length,d=0;d0&&(o=!0,t().insertRules(e+"-import",u))},removeRules:function(a){var s=r[a];if(void 0!==s){var c=ie(a);e.replaceChild(c,s),r[a]=c,Q(n,a),i&&o&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:ne(s,n),toHTML:te(s,n)}}(o,i):function(e,t){var n=Object.create(null),r=Object.create(null),i=[],o=void 0!==t,a=!1,s=function(e){var t=r[e];return void 0!==t?t:(r[e]=i.length,i.push(0),Q(n,e),r[e])},c=function(){var t=Z(e).cssRules,n="";for(var o in r){n+=J(o);for(var a=r[o],s=ee(i,a),c=s-i[a];c0&&(a=!0,t().insertRules(r+"-import",h)),i[l]+=f,G(n,r,u)},removeRules:function(s){var c=r[s];if(void 0!==c){var u=i[c];!function(e,t,n){for(var r=t-n,i=t;i>r;i-=1)e.deleteRule(i)}(Z(e),ee(i,c)-1,u),i[c]=0,Q(n,s),o&&a&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:ne(c,n),toHTML:te(c,n)}}(o,i)}return oe()},se=/\s+/,ce=void 0;ce=C?P?40:1e3:-1;var ue=0,le=void 0,de=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C?document.head:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];_(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var n=t.tags[0];return t.importRuleTag=ae(t.target,n?n.styleTag:null,t.forceServer,!0)},ue+=1,this.id=ue,this.forceServer=r,this.target=r?null:n,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!C||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+S+'][data-styled-version="4.3.2"]'),i=r.length;if(!i)return this;for(var o=0;o0&&void 0!==arguments[0]&&arguments[0];le=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map(function(e){for(var n=e.getIds(),r=e.clone(),i=0;i1?t-1:0),r=1;r=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:r^=(255&e.charCodeAt(i+2))<<16;case 2:r^=(255&e.charCodeAt(i+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(i)))+((1540483477*(r>>>16)&65535)<<16)}return((r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16))^r>>>15)>>>0}var be=52,Te=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ae(e){var t="",n=void 0;for(n=e;n>be;n=Math.floor(n/be))t=Te(n%be)+t;return Te(n%be)+t}function Ie(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:I,r=!!n&&e.theme===n.theme;return e.theme&&!r?e.theme:t||n.theme},Pe=/[[\].#*$><+~=|^:(),"'`-]+/g,Re=/(^-|-$)/g;function De(e){return e.replace(Pe,"-").replace(Re,"")}function ke(e){return"string"===typeof e&&!0}var Le={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},xe={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Me=((Ne={})[l.ForwardRef]={$$typeof:!0,render:!0},Ne),Ue=Object.defineProperty,Fe=Object.getOwnPropertyNames,je=Object.getOwnPropertySymbols,ze=void 0===je?function(){return[]}:je,He=Object.getOwnPropertyDescriptor,Ve=Object.getPrototypeOf,Ye=Object.prototype,Be=Array.prototype;function Ke(e,t,n){if("string"!==typeof t){var r=Ve(t);r&&r!==Ye&&Ke(e,r,n);for(var i=Be.concat(Fe(t),ze(t)),o=Me[e.$$typeof]||Le,a=Me[t.$$typeof]||Le,s=i.length,c=void 0,u=void 0;s--;)if(u=i[s],!xe[u]&&(!n||!n[u])&&(!a||!a[u])&&(!o||!o[u])&&(c=He(t,u)))try{Ue(e,u,c)}catch(l){}return e}return e}var We=Object(s.createContext)(),Ge=We.Consumer,Qe=(function(e){function t(n){_(this,t);var r=b(this,e.call(this,n));return r.getContext=Object(d.a)(r.getContext.bind(r)),r.renderInner=r.renderInner.bind(r),r}E(t,e),t.prototype.render=function(){return this.props.children?c.a.createElement(We.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return c.a.createElement(We.Provider,{value:t},c.a.Children.only(this.props.children))},t.prototype.getTheme=function(e,t){if(N(e))return e(t);if(null===e||Array.isArray(e)||"object"!==("undefined"===typeof e?"undefined":m(e)))throw new D(8);return g({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)}}(s.Component),function(){function e(){_(this,e),this.masterSheet=de.master,this.instance=this.masterSheet.clone(),this.sealed=!1}e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new D(2);return c.a.createElement($e,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new D(3)}}(),Object(s.createContext)()),qe=Qe.Consumer,$e=function(e){function t(n){_(this,t);var r=b(this,e.call(this,n));return r.getContext=Object(d.a)(r.getContext),r}return E(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new de(t);throw new D(4)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.sheet,r=e.target;return c.a.createElement(Qe.Provider,{value:this.getContext(n,r)},t)},t}(s.Component),Ze={};var Xe=function(e){function t(){_(this,t);var n=b(this,e.call(this));return n.attrs={},n.renderOuter=n.renderOuter.bind(n),n.renderInner=n.renderInner.bind(n),n}return E(t,e),t.prototype.render=function(){return c.a.createElement(qe,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():c.a.createElement(Ge,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,n=t.componentStyle,r=t.defaultProps,i=(t.displayName,t.foldedComponentIds),o=t.styledComponentId,a=t.target,c=void 0;c=n.isStatic?this.generateAndInjectStyles(I,this.props):this.generateAndInjectStyles(Ce(this.props,e,r)||I,this.props);var u=this.props.as||this.attrs.as||a,l=ke(u),d={},f=g({},this.attrs,this.props),h=void 0;for(h in f)"forwardedComponent"!==h&&"as"!==h&&("forwardedRef"===h?d.ref=f[h]:"forwardedAs"===h?d.as=f[h]:l&&!Object(p.a)(h)||(d[h]=f[h]));return this.props.style&&this.attrs.style&&(d.style=g({},this.attrs.style,this.props.style)),d.className=Array.prototype.concat(i,this.props.className,o,this.attrs.className,c).filter(Boolean).join(" "),Object(s.createElement)(u,d)},t.prototype.buildExecutionContext=function(e,t,n){var r=this,i=g({},t,{theme:e});return n.length?(this.attrs={},n.forEach(function(e){var t,n=e,o=!1,a=void 0,s=void 0;for(s in N(n)&&(n=n(i),o=!0),n)a=n[s],o||!N(a)||(t=a)&&t.prototype&&t.prototype.isReactComponent||w(a)||(a=a(i)),r.attrs[s]=a,i[s]=a}),i):i},t.prototype.generateAndInjectStyles=function(e,t){var n=t.forwardedComponent,r=n.attrs,i=n.componentStyle;n.warnTooManyClasses;return i.isStatic&&!r.length?i.generateAndInjectStyles(I,this.styleSheet):i.generateAndInjectStyles(this.buildExecutionContext(e,t,r),this.styleSheet)},t}(s.Component);function Je(e,t,n){var r=w(e),i=!ke(e),o=t.displayName,a=void 0===o?function(e){return ke(e)?"styled."+e:"Styled("+O(e)+")"}(e):o,s=t.componentId,u=void 0===s?function(e,t,n){var r="string"!==typeof t?"sc":De(t),i=(Ze[r]||0)+1;Ze[r]=i;var o=r+"-"+e.generateName(r+i);return n?n+"-"+o:o}(Se,t.displayName,t.parentComponentId):s,l=t.ParentComponent,d=void 0===l?Xe:l,p=t.attrs,h=void 0===p?A:p,m=t.displayName&&t.componentId?De(t.displayName)+"-"+t.componentId:t.componentId||u,_=r&&e.attrs?Array.prototype.concat(e.attrs,h).filter(Boolean):h,y=new Se(r?e.componentStyle.rules.concat(n):n,_,m),E=void 0,b=function(e,t){return c.a.createElement(d,g({},e,{forwardedComponent:E,forwardedRef:t}))};return b.displayName=a,(E=c.a.forwardRef(b)).displayName=a,E.attrs=_,E.componentStyle=y,E.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):A,E.styledComponentId=m,E.target=r?e.target:e,E.withComponent=function(e){var r=t.componentId,i=v(t,["componentId"]),o=r&&r+"-"+(ke(e)?e:De(O(e)));return Je(e,g({},i,{attrs:_,componentId:o,ParentComponent:d}),n)},Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Object(f.a)(e.defaultProps,t):t}}),E.toString=function(){return"."+E.styledComponentId},i&&Ke(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),E}var et=function(e){return function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:I;if(!Object(l.isValidElementType)(n))throw new D(1,String(n));var i=function(){return t(n,r,Ee.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,g({},r,i))},i.attrs=function(i){return e(t,n,g({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(Je,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){et[e]=et(e)});var tt=function(){function e(t,n){_(this,e),this.rules=t,this.componentId=n,this.isStatic=Ie(t,A),de.master.hasId(n)||de.master.deferredInject(n,[])}return e.prototype.createStyles=function(e,t){var n=K(ge(this.rules,e,t),"");t.inject(this.componentId,n)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)},e}();function nt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r ".length;n&&i++<5&&!("html"===(t=c(n))||i>1&&o+r.length*a+t.length>=80);)r.push(t),o+=t.length,n=n.parentNode;return r.reverse().join(" > ")},t.htmlElementAsString=c,t.parseUrl=function(e){if(!e)return{};var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}},t.getEventDescription=function(e){if(e.message)return e.message;if(e.exception&&e.exception.values&&e.exception.values[0]){var t=e.exception.values[0];return t.type&&t.value?t.type+": "+t.value:t.type||t.value||e.event_id||""}return e.event_id||""},t.consoleSandbox=function(e){var t=s();if(!("console"in t))return e();var n=t.console,r={};["debug","info","warn","error","log"].forEach(function(e){e in t.console&&n[e].__sentry__&&(r[e]=n[e].__sentry_wrapped__,n[e]=n[e].__sentry_original__)});var i=e();return Object.keys(r).forEach(function(e){n[e]=r[e]}),i}}).call(this,n(12),n(7))},function(e,t,n){(function(t,n){var r;e.exports=function e(t,n,i){function o(s,c){if(!n[s]){if(!t[s]){var u="function"==typeof r&&r;if(!c&&u)return r(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[s]={exports:{}};t[s][0].call(d.exports,function(e){var n=t[s][1][e];return o(n||e)},d,d.exports,e,t,n,i)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s-1}n.exports=function(e){return e=e||t.navigator.userAgent,!(a(e)||o(e)||function(e){return e=e||t.navigator.userAgent,!!i(e)&&/Version\/[\d\.]+/.test(e)&&!u(e)}(e)||u(e)||function(e){var n;return e=e||t.navigator.userAgent,!!(n=e.match(/CriOS\/(\d+)\./))&&parseInt(n[1],10)=s&&(c.matchStrength=s),n.push(c);break}}},{"./clone":31,"./matches":34}],30:[function(e,t,n){"use strict";t.exports={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[624,626],[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[622019,622999],[62207,62209],[622126,622925],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}}},{}],31:[function(e,t,n){"use strict";t.exports=function(e){return e?JSON.parse(JSON.stringify(e)):null}},{}],32:[function(e,t,n){"use strict";t.exports=function(e){if(function(e){var t=e.filter(function(e){return e.matchStrength}).length;return t>0&&t===e.length}(e))return e.reduce(function(e,t){return e?e.matchStrength=t&&o<=n}(e,t[0],t[1]):function(e,t){return(t=String(t)).substring(0,e.length)===e.substring(0,t.length)}(e,t)}},{}],35:[function(e,n,r){(function(e){"use strict";var t,r,i=[],o={},a="/*framebus*/";function s(e){var n,r,i=l(this);return!d(e)&&!d(i)&&(r=Array.prototype.slice.call(arguments,1),!1!==(n=p(e,r,i))&&(g(t.top||t.self,n,i),!0))}function c(e,t){var n=l(this);return!v(e,t,n)&&(o[n]=o[n]||{},o[n][e]=o[n][e]||[],o[n][e].push(t),!0)}function u(e,t){var n,r,i=l(this);if(v(e,t,i))return!1;if(!(r=o[i]&&o[i][e]))return!1;for(n=0;n=0;r--)!0===(o=i[r]).closed?i=i.slice(r,1):n!==o&&g(o.top,e,t)}(e.data,t.origin,e.source))}function y(e,t,n,r){var i;if(o[e]&&o[e][t])for(i=0;i-1}(e)}}}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"@braintree/browser-detection/is-android":3,"@braintree/browser-detection/is-chrome":5,"@braintree/browser-detection/is-chrome-os":4,"@braintree/browser-detection/is-ie9":9,"@braintree/browser-detection/is-ios":14}],38:[function(e,t,n){"use strict";var r=e("./lib/device");t.exports=function(){return!r.isSamsungBrowser()}},{"./lib/device":37}],39:[function(e,t,n){"use strict";var r=e("../lib/braintree-error"),i=e("./errors"),o=e("../lib/assign").assign,a=e("../lib/promise"),s=e("../lib/methods"),c=e("../lib/convert-methods-to-error"),u=e("@braintree/wrap-promise");function l(e){this._client=e.client}l.prototype.getRewardsBalance=function(e){var t,n=e.nonce;return n?(delete(t=o({_meta:{source:"american-express"},paymentMethodNonce:n},e)).nonce,this._client.request({method:"get",endpoint:"payment_methods/amex_rewards_balance",data:t}).catch(function(e){return a.reject(new r({type:i.AMEX_NETWORK_ERROR.type,code:i.AMEX_NETWORK_ERROR.code,message:"A network error occurred when getting the American Express rewards balance.",details:{originalError:e}}))})):a.reject(new r({type:i.AMEX_NONCE_REQUIRED.type,code:i.AMEX_NONCE_REQUIRED.code,message:"getRewardsBalance must be called with a nonce."}))},l.prototype.getExpressCheckoutProfile=function(e){return e.nonce?this._client.request({method:"get",endpoint:"payment_methods/amex_express_checkout_cards/"+e.nonce,data:{_meta:{source:"american-express"},paymentMethodNonce:e.nonce}}).catch(function(e){return a.reject(new r({type:i.AMEX_NETWORK_ERROR.type,code:i.AMEX_NETWORK_ERROR.code,message:"A network error occurred when getting the American Express Checkout nonce profile.",details:{originalError:e}}))}):a.reject(new r({type:i.AMEX_NONCE_REQUIRED.type,code:i.AMEX_NONCE_REQUIRED.code,message:"getExpressCheckoutProfile must be called with a nonce."}))},l.prototype.teardown=function(){return c(this,s(l.prototype)),a.resolve()},t.exports=u.wrapPrototype(l)},{"../lib/assign":90,"../lib/braintree-error":93,"../lib/convert-methods-to-error":99,"../lib/methods":125,"../lib/promise":127,"./errors":40,"@braintree/wrap-promise":27}],40:[function(e,t,n){"use strict";var r=e("../lib/braintree-error");t.exports={AMEX_NONCE_REQUIRED:{type:r.types.MERCHANT,code:"AMEX_NONCE_REQUIRED"},AMEX_NETWORK_ERROR:{type:r.types.NETWORK,code:"AMEX_NETWORK_ERROR"}}},{"../lib/braintree-error":93}],41:[function(e,t,n){"use strict";var r=e("./american-express"),i=e("../lib/basic-component-verification"),o=e("../lib/create-deferred-client"),a=e("../lib/create-assets-url"),s=e("@braintree/wrap-promise");t.exports={create:s(function(e){var t="American Express";return i.verify({name:t,client:e.client,authorization:e.authorization}).then(function(){return o.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:a.create(e.authorization),name:t})}).then(function(t){return e.client=t,new r(e)})}),VERSION:"3.50.1"}},{"../lib/basic-component-verification":91,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"./american-express":39,"@braintree/wrap-promise":27}],42:[function(e,n,r){(function(t){"use strict";var r=e("../lib/braintree-error"),i=e("../lib/analytics"),o=e("./errors"),a=e("../lib/promise"),s=e("../lib/methods"),c=e("../lib/convert-methods-to-error"),u=e("@braintree/wrap-promise");function l(e){this._client=e.client,Object.defineProperty(this,"merchantIdentifier",{value:this._client.getConfiguration().gatewayConfiguration.applePayWeb.merchantIdentifier,configurable:!1,writable:!1})}l.prototype.createPaymentRequest=function(e){var t=this._client.getConfiguration().gatewayConfiguration.applePayWeb,n={countryCode:t.countryCode,currencyCode:t.currencyCode,merchantCapabilities:t.merchantCapabilities||["supports3DS"],supportedNetworks:t.supportedNetworks.map(function(e){return"mastercard"===e?"masterCard":e})};return Object.assign({},n,e)},l.prototype.performValidation=function(e){var n,s=this;return e&&e.validationURL?(n={validationUrl:e.validationURL,domainName:e.domainName||t.location.hostname,merchantIdentifier:e.merchantIdentifier||this.merchantIdentifier},null!=e.displayName&&(n.displayName=e.displayName),this._client.request({method:"post",endpoint:"apple_pay_web/sessions",data:{_meta:{source:"apple-pay"},applePayWebSession:n}}).then(function(e){return i.sendEvent(s._client,"applepay.performValidation.succeeded"),a.resolve(e)}).catch(function(e){return i.sendEvent(s._client,"applepay.performValidation.failed"),"CLIENT_REQUEST_ERROR"===e.code?a.reject(new r({type:o.APPLE_PAY_MERCHANT_VALIDATION_FAILED.type,code:o.APPLE_PAY_MERCHANT_VALIDATION_FAILED.code,message:o.APPLE_PAY_MERCHANT_VALIDATION_FAILED.message,details:{originalError:e.details.originalError}})):a.reject(new r({type:o.APPLE_PAY_MERCHANT_VALIDATION_NETWORK.type,code:o.APPLE_PAY_MERCHANT_VALIDATION_NETWORK.code,message:o.APPLE_PAY_MERCHANT_VALIDATION_NETWORK.message,details:{originalError:e}}))})):a.reject(new r(o.APPLE_PAY_VALIDATION_URL_REQUIRED))},l.prototype.tokenize=function(e){var t=this;return e.token?this._client.request({method:"post",endpoint:"payment_methods/apple_payment_tokens",data:{_meta:{source:"apple-pay"},applePaymentToken:Object.assign({},e.token,{paymentData:btoa(JSON.stringify(e.token.paymentData))})}}).then(function(e){return i.sendEvent(t._client,"applepay.tokenize.succeeded"),a.resolve(e.applePayCards[0])}).catch(function(e){return i.sendEvent(t._client,"applepay.tokenize.failed"),a.reject(new r({type:o.APPLE_PAY_TOKENIZATION.type,code:o.APPLE_PAY_TOKENIZATION.code,message:o.APPLE_PAY_TOKENIZATION.message,details:{originalError:e}}))}):a.reject(new r(o.APPLE_PAY_PAYMENT_TOKEN_REQUIRED))},l.prototype.teardown=function(){return c(this,s(l.prototype)),a.resolve()},n.exports=u.wrapPrototype(l)}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../lib/analytics":88,"../lib/braintree-error":93,"../lib/convert-methods-to-error":99,"../lib/methods":125,"../lib/promise":127,"./errors":43,"@braintree/wrap-promise":27}],43:[function(e,t,n){"use strict";var r=e("../lib/braintree-error");t.exports={APPLE_PAY_NOT_ENABLED:{type:r.types.MERCHANT,code:"APPLE_PAY_NOT_ENABLED",message:"Apple Pay is not enabled for this merchant."},APPLE_PAY_VALIDATION_URL_REQUIRED:{type:r.types.MERCHANT,code:"APPLE_PAY_VALIDATION_URL_REQUIRED",message:"performValidation must be called with a validationURL."},APPLE_PAY_MERCHANT_VALIDATION_NETWORK:{type:r.types.NETWORK,code:"APPLE_PAY_MERCHANT_VALIDATION_NETWORK",message:"A network error occurred when validating the Apple Pay merchant."},APPLE_PAY_MERCHANT_VALIDATION_FAILED:{type:r.types.MERCHANT,code:"APPLE_PAY_MERCHANT_VALIDATION_FAILED",message:"Make sure you have registered your domain name in the Braintree Control Panel."},APPLE_PAY_PAYMENT_TOKEN_REQUIRED:{type:r.types.MERCHANT,code:"APPLE_PAY_PAYMENT_TOKEN_REQUIRED",message:"tokenize must be called with a payment token."},APPLE_PAY_TOKENIZATION:{type:r.types.NETWORK,code:"APPLE_PAY_TOKENIZATION",message:"A network error occurred when processing the Apple Pay payment."}}},{"../lib/braintree-error":93}],44:[function(e,t,n){"use strict";var r=e("../lib/braintree-error"),i=e("./apple-pay"),o=e("../lib/analytics"),a=e("../lib/basic-component-verification"),s=e("../lib/create-deferred-client"),c=e("../lib/create-assets-url"),u=e("./errors"),l=e("../lib/promise"),d=e("@braintree/wrap-promise");t.exports={create:d(function(e){return a.verify({name:"Apple Pay",client:e.client,authorization:e.authorization}).then(function(){return s.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:c.create(e.authorization),name:"Apple Pay"})}).then(function(t){return e.client=t,e.client.getConfiguration().gatewayConfiguration.applePayWeb?(o.sendEvent(e.client,"applepay.initialized"),new i(e)):l.reject(new r(u.APPLE_PAY_NOT_ENABLED))})}),VERSION:"3.50.1"}},{"../lib/analytics":88,"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/promise":127,"./apple-pay":42,"./errors":43,"@braintree/wrap-promise":27}],45:[function(e,t,n){"use strict";var r=e("@braintree/browser-detection/is-ie"),i=e("@braintree/browser-detection/is-ie9");t.exports={isIe:r,isIe9:i}},{"@braintree/browser-detection/is-ie":7,"@braintree/browser-detection/is-ie9":9}],46:[function(e,t,n){"use strict";var r=e("./constants").BRAINTREE_VERSION,i=e("./request/graphql"),o=e("./request"),a=e("../lib/is-verified-domain"),s=e("../lib/braintree-error"),c=e("../lib/convert-to-braintree-error"),u=e("./get-configuration").getConfiguration,l=e("../lib/add-metadata"),d=e("../lib/promise"),p=e("@braintree/wrap-promise"),f=e("../lib/once"),h=e("../lib/deferred"),m=e("../lib/assign").assign,_=e("../lib/analytics"),y=e("./errors"),g=e("../lib/constants").VERSION,E=e("../lib/constants").GRAPHQL_URLS,v=e("../lib/methods"),b=e("../lib/convert-methods-to-error"),T=e("../lib/assets"),A=e("../lib/constants").FRAUDNET_FNCLS,I=e("../lib/constants").FRAUDNET_SOURCE,N=e("../lib/constants").FRAUDNET_URL,O={};function w(e){var t,n;if(e=e||{},t=JSON.stringify(e),!(n=e.gatewayConfiguration))throw new s(y.CLIENT_MISSING_GATEWAY_CONFIGURATION);["assetsUrl","clientApiUrl","configUrl"].forEach(function(e){if(e in n&&!a(n[e]))throw new s({type:y.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:y.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:e+" property is on an invalid domain."})}),this.getConfiguration=function(){return JSON.parse(t)},this._request=o,this._configuration=this.getConfiguration(),this._clientApiBaseUrl=n.clientApiUrl+"/v1/",n.graphQL&&(this._graphQL=new i({graphQL:n.graphQL}))}w.initialize=function(e){var t,n=O[e.authorization];return n?(_.sendEvent(n,"custom.client.load.cached"),n):(n=u(e).then(function(n){return e.debug&&(n.isDebug=!0),t=new w(n)}),O[e.authorization]=n,_.sendEvent(n,"custom.client.load.initialized"),n.then(function(e){return _.sendEvent(t,"custom.client.load.succeeded"),e}).catch(function(t){return delete O[e.authorization],d.reject(t)}))},w.clearCache=function(){O={}},w.prototype._findOrCreateFraudnetJSON=function(e){var t,n,r,i,o=document.querySelector('script[fncls="'+A+'"]');o||((o=document.body.appendChild(document.createElement("script"))).type="application/json",o.setAttribute("fncls",A)),t=this.getConfiguration(),n={rda_tenant:"bt_card",mid:t.gatewayConfiguration.merchantId},(r=t.authorizationFingerprint)&&r.split("&").forEach(function(e){var t=e.split("=");"customer_id"===t[0]&&t.length>1&&(n.cid=t[1])}),i={f:e.substr(0,32),fp:n,bu:!1,s:I},o.text=JSON.stringify(i)},w.prototype.request=function(e,t){var n=this,i=new d(function(t,i){var o,a,u,d,p,f=Boolean("payment_methods/credit_cards"===e.endpoint&&n.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);if("graphQLApi"!==e.api&&(e.method?e.endpoint||(o="options.endpoint"):o="options.method"),o)throw new s({type:y.CLIENT_OPTION_REQUIRED.type,code:y.CLIENT_OPTION_REQUIRED.code,message:o+" is required when making a request."});if(a="api"in e?e.api:"clientApi",d={method:e.method,graphQL:n._graphQL,timeout:e.timeout,metadata:n._configuration.analyticsMetadata},"clientApi"===a)u=n._clientApiBaseUrl,d.data=l(n._configuration,e.data);else{if("graphQLApi"!==a)throw new s({type:y.CLIENT_OPTION_INVALID.type,code:y.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});u=E[n._configuration.gatewayConfiguration.environment],e.endpoint="",d.method="post",d.data=m({clientSdkMetadata:{source:n._configuration.analyticsMetadata.source,integration:n._configuration.analyticsMetadata.integration,sessionId:n._configuration.analyticsMetadata.sessionId}},e.data),d.headers={Authorization:"Bearer "+((p=n._configuration).authorizationFingerprint||p.authorization),"Braintree-Version":r}}d.url=u+e.endpoint,d.sendAnalyticsEvent=function(e){_.sendEvent(n,e)},n._request(d,function(e,r,o){var u,l;(l=function(e,t){var n;if(-1===e?n=new s(y.CLIENT_REQUEST_TIMEOUT):403===e?n=new s(y.CLIENT_AUTHORIZATION_INSUFFICIENT):429===e?n=new s(y.CLIENT_RATE_LIMITED):e>=500?n=new s(y.CLIENT_GATEWAY_NETWORK):(e<200||e>=400)&&(n=c(t,{type:y.CLIENT_REQUEST_ERROR.type,code:y.CLIENT_REQUEST_ERROR.code,message:y.CLIENT_REQUEST_ERROR.message})),n)return n.details=n.details||{},n.details.httpStatus=e,n}(o,e))?i(l):"graphQLApi"===a&&r.errors?i(c(r.errors,{type:y.CLIENT_GRAPHQL_REQUEST_ERROR.type,code:y.CLIENT_GRAPHQL_REQUEST_ERROR.code,message:y.CLIENT_GRAPHQL_REQUEST_ERROR.message})):(u=m({_httpStatus:o},r),f&&u.creditCards&&u.creditCards.length>0&&(n._findOrCreateFraudnetJSON(u.creditCards[0].nonce),T.loadScript({src:N,forceScriptReload:!0})),t(u))})});return"function"===typeof t?(t=f(h(t)),void i.then(function(e){t(null,e,e._httpStatus)}).catch(function(e){var n=e&&e.details&&e.details.httpStatus;t(e,null,n)})):i},w.prototype.toJSON=function(){return this.getConfiguration()},w.prototype.getVersion=function(){return g},w.prototype.teardown=p(function(){return delete O[this.getConfiguration().authorization],b(this,v(w.prototype)),d.resolve()}),t.exports=w},{"../lib/add-metadata":87,"../lib/analytics":88,"../lib/assets":89,"../lib/assign":90,"../lib/braintree-error":93,"../lib/constants":98,"../lib/convert-methods-to-error":99,"../lib/convert-to-braintree-error":100,"../lib/deferred":104,"../lib/is-verified-domain":123,"../lib/methods":125,"../lib/once":126,"../lib/promise":127,"./constants":47,"./errors":48,"./get-configuration":49,"./request":61,"./request/graphql":59,"@braintree/wrap-promise":27}],47:[function(e,t,n){"use strict";t.exports={BRAINTREE_VERSION:"2018-05-10"}},{}],48:[function(e,t,n){"use strict";var r=e("../lib/braintree-error");t.exports={CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN:{type:r.types.MERCHANT,code:"CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN"},CLIENT_OPTION_REQUIRED:{type:r.types.MERCHANT,code:"CLIENT_OPTION_REQUIRED"},CLIENT_OPTION_INVALID:{type:r.types.MERCHANT,code:"CLIENT_OPTION_INVALID"},CLIENT_MISSING_GATEWAY_CONFIGURATION:{type:r.types.INTERNAL,code:"CLIENT_MISSING_GATEWAY_CONFIGURATION",message:"Missing gatewayConfiguration."},CLIENT_INVALID_AUTHORIZATION:{type:r.types.MERCHANT,code:"CLIENT_INVALID_AUTHORIZATION",message:"Authorization is invalid. Make sure your client token or tokenization key is valid."},CLIENT_GATEWAY_NETWORK:{type:r.types.NETWORK,code:"CLIENT_GATEWAY_NETWORK",message:"Cannot contact the gateway at this time."},CLIENT_REQUEST_TIMEOUT:{type:r.types.NETWORK,code:"CLIENT_REQUEST_TIMEOUT",message:"Request timed out waiting for a reply."},CLIENT_REQUEST_ERROR:{type:r.types.NETWORK,code:"CLIENT_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_GRAPHQL_REQUEST_ERROR:{type:r.types.NETWORK,code:"CLIENT_GRAPHQL_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_RATE_LIMITED:{type:r.types.MERCHANT,code:"CLIENT_RATE_LIMITED",message:"You are being rate-limited; please try again in a few minutes."},CLIENT_AUTHORIZATION_INSUFFICIENT:{type:r.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INSUFFICIENT",message:"The authorization used has insufficient privileges."}}},{"../lib/braintree-error":93}],49:[function(e,n,r){(function(t){"use strict";var r=e("../lib/braintree-error"),i=e("../lib/promise"),o=e("@braintree/wrap-promise"),a=e("./request"),s=e("../lib/vendor/uuid"),c=e("../lib/constants"),u=e("../lib/create-authorization-data"),l=e("./errors"),d=e("./request/graphql"),p=e("../lib/is-date-string-before-or-on"),f=e("./constants").BRAINTREE_VERSION;n.exports={getConfiguration:o(function(e){return new i(function(n,i){var o,h,m,_,y,g=s(),E={merchantAppId:t.location.host,platform:c.PLATFORM,sdkVersion:c.VERSION,source:c.SOURCE,integration:c.INTEGRATION,integrationType:c.INTEGRATION,sessionId:g};try{h=u(e.authorization)}catch(v){return void i(new r(l.CLIENT_INVALID_AUTHORIZATION))}m=h.attrs,_=h.configUrl,m._meta=E,m.braintreeLibraryVersion=c.BRAINTREE_LIBRARY_VERSION,m.configVersion="3",y={url:_,method:"GET",data:m},m.authorizationFingerprint&&h.graphQL&&(p(h.graphQL.date,f)&&(y.graphQL=new d({graphQL:{url:h.graphQL.url,features:["configuration"]}})),y.metadata=E),a(y,function(t,a,s){var c;if(t)return c=403===s?l.CLIENT_AUTHORIZATION_INSUFFICIENT:l.CLIENT_GATEWAY_NETWORK,void i(new r({type:c.type,code:c.code,message:c.message,details:{originalError:t}}));o={authorization:e.authorization,authorizationType:m.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:m.authorizationFingerprint,analyticsMetadata:E,gatewayConfiguration:a},n(o)})})})}}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../lib/braintree-error":93,"../lib/constants":98,"../lib/create-authorization-data":102,"../lib/is-date-string-before-or-on":121,"../lib/promise":127,"../lib/vendor/uuid":131,"./constants":47,"./errors":48,"./request":61,"./request/graphql":59,"@braintree/wrap-promise":27}],50:[function(e,t,n){"use strict";var r=e("../lib/braintree-error"),i=e("./client"),o=e("../lib/promise"),a=e("@braintree/wrap-promise"),s=e("../lib/errors");t.exports={create:a(function(e){return e.authorization?i.initialize(e):o.reject(new r({type:s.INSTANTIATION_OPTION_REQUIRED.type,code:s.INSTANTIATION_OPTION_REQUIRED.code,message:"options.authorization is required when instantiating a client."}))}),VERSION:"3.50.1"}},{"../lib/braintree-error":93,"../lib/errors":107,"../lib/promise":127,"./client":46,"@braintree/wrap-promise":27}],51:[function(e,t,n){"use strict";var r=e("../../lib/querystring"),i=e("../browser-detection"),o=e("../../lib/assign").assign,a=e("./prep-body"),s=e("./parse-body"),c=e("./xhr"),u=c.isAvailable,l=e("./graphql/request"),d=e("./default-request"),p=1,f=408;function h(e,t,n){var m,_,y,g,E,v,b,T=e.url,A=e.graphQL,I=e.timeout,N=c.getRequestObject(),O=n,w=Boolean(A&&A.isGraphQLRequest(T,e.data));e.headers=o({"Content-Type":"application/json"},e.headers),y=w?new l(e):new d(e),T=y.getUrl(),g=y.getBody(),E=y.getMethod(),v=y.getHeaders(),"GET"===E&&(T=r.queryify(T,g),g=null),u?N.onreadystatechange=function(){if(4===N.readyState){if(0===N.status&&w)return delete e.graphQL,void h(e,t,n);if(b=s(N.responseText),_=y.adaptResponseBody(b),(m=y.determineStatus(N.status,b))>=400||m<200){if(w&&function(e){var t=!e.data&&e.errors&&e.errors[0]&&e.errors[0].extensions&&e.errors[0].extensions.errorClass;return"UNKNOWN"===t||"INTERNAL"===t}(b))return delete e.graphQL,void h(e,t,n);if(t1&&(t=n[1].split("?")[0]),t},a.prototype._isGraphQLEnabled=function(){return Boolean(this._config)},t.exports=a},{"../../browser-detection":45}],60:[function(e,t,n){"use strict";var r=e("../../constants").BRAINTREE_VERSION,i=e("../../../lib/assign").assign,o=e("./generators/credit-card-tokenization"),a=e("./adapters/credit-card-tokenization"),s=e("./generators/configuration"),c=e("./adapters/configuration"),u={"payment_methods/credit_cards":o,configuration:s},l={"payment_methods/credit_cards":a,configuration:c};function d(e){var t=e.graphQL.getClientApiPath(e.url);this._graphQL=e.graphQL,this._data=e.data,this._method=e.method,this._headers=e.headers,this._clientSdkMetadata={source:e.metadata.source,integration:e.metadata.integration,sessionId:e.metadata.sessionId},this._sendAnalyticsEvent=e.sendAnalyticsEvent||Function.prototype,this._generator=u[t],this._adapter=l[t],this._sendAnalyticsEvent("graphql.init")}d.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},d.prototype.getBody=function(){var e=function e(t){var n={};return Object.keys(t).forEach(function(r){var i,o=-1===(i=r).indexOf("_")?i:i.toLowerCase().replace(/(\_\w)/g,function(e){return e[1].toUpperCase()});"object"===typeof t[r]?n[o]=e(t[r]):"number"===typeof t[r]?n[o]=String(t[r]):n[o]=t[r]}),n}(this._data),t=this._generator(e),n=i({clientSdkMetadata:this._clientSdkMetadata},t);return JSON.stringify(n)},d.prototype.getMethod=function(){return"POST"},d.prototype.getHeaders=function(){var e,t;return this._data.authorizationFingerprint?(this._sendAnalyticsEvent("graphql.authorization-fingerprint"),e=this._data.authorizationFingerprint):(this._sendAnalyticsEvent("graphql.tokenization-key"),e=this._data.tokenizationKey),t={Authorization:"Bearer "+e,"Braintree-Version":r},i({},this._headers,t)},d.prototype.adaptResponseBody=function(e){return this._adapter(e,this)},d.prototype.determineStatus=function(e,t){var n,r;return 200===e?(r=t.errors&&t.errors[0]&&t.errors[0].extensions&&t.errors[0].extensions.errorClass,n=t.data&&!t.errors?200:"VALIDATION"===r?422:"AUTHORIZATION"===r?403:"AUTHENTICATION"===r?401:function(e,t){return!e&&t.errors[0].message}(r,t)?403:500):n=e||500,this._sendAnalyticsEvent("graphql.status."+e),this._sendAnalyticsEvent("graphql.determinedStatus."+n),n},t.exports=d},{"../../../lib/assign":90,"../../constants":47,"./adapters/configuration":54,"./adapters/credit-card-tokenization":55,"./generators/configuration":57,"./generators/credit-card-tokenization":58}],61:[function(e,t,n){"use strict";var r,i=e("../../lib/once"),o=e("./jsonp-driver"),a=e("./ajax-driver"),s=e("./get-user-agent"),c=e("./is-http");t.exports=function(e,t){t=i(t||Function.prototype),e.method=(e.method||"GET").toUpperCase(),e.timeout=null==e.timeout?6e4:e.timeout,e.data=e.data||{},null==r&&(r=!(c()&&/MSIE\s(8|9)/.test(s()))),r?a.request(e,t):o.request(e,t)}},{"../../lib/once":126,"./ajax-driver":51,"./get-user-agent":53,"./is-http":62,"./jsonp-driver":63}],62:[function(e,n,r){(function(e){"use strict";n.exports=function(){return"http:"===e.location.protocol}}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],63:[function(e,n,r){(function(t){"use strict";var r,i=e("../../lib/vendor/uuid"),o=e("../../lib/querystring"),a={};function s(e){try{delete t[e]}catch(n){t[e]=null}}n.exports={request:function(e,n){var c,u="callback_json_"+i().replace(/-/g,""),l=e.url,d=e.data,p=e.method,f=e.timeout;l=o.queryify(l,d),l=o.queryify(l,{_method:p,callback:u}),function(e,n,r){t[r]=function(t){var i=t.status||500,o=null,c=null;delete t.status,i>=400||i<200?o=t:c=t,s(r),function(e){e&&e.parentNode&&e.parentNode.removeChild(e)}(e),clearTimeout(a[r]),n(o,c,i)}}(c=function(e,n){var r=document.createElement("script"),i=!1;return r.src=e,r.async=!0,r.onerror=function(){t[n]({message:"error",status:500})},r.onload=r.onreadystatechange=function(){i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(i=!0,r.onload=r.onreadystatechange=null)},r}(l,u),n,u),function(e,n){a[n]=setTimeout(function(){a[n]=null,t[n]({error:"timeout",status:-1}),t[n]=function(){s(n)}},e)}(f,u),r||(r=document.getElementsByTagName("head")[0]),r.appendChild(c)}}}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../lib/querystring":128,"../../lib/vendor/uuid":131}],64:[function(e,t,n){"use strict";t.exports=function(e){try{e=JSON.parse(e)}catch(t){}return e}},{}],65:[function(e,t,n){"use strict";t.exports=function(e,t){if("string"!==typeof e)throw new Error("Method must be a string");return"get"!==e.toLowerCase()&&null!=t&&(t="string"===typeof t?t:JSON.stringify(t)),t}},{}],66:[function(e,n,r){(function(e){"use strict";var t=e.XMLHttpRequest&&"withCredentials"in new e.XMLHttpRequest;n.exports={isAvailable:t,getRequestObject:function(){return t?new e.XMLHttpRequest:new e.XDomainRequest}}}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],67:[function(e,t,n){"use strict";var r=e("../lib/braintree-error");t.exports={DATA_COLLECTOR_KOUNT_NOT_ENABLED:{type:r.types.MERCHANT,code:"DATA_COLLECTOR_KOUNT_NOT_ENABLED",message:"Kount is not enabled for this merchant."},DATA_COLLECTOR_KOUNT_ERROR:{type:r.types.MERCHANT,code:"DATA_COLLECTOR_KOUNT_ERROR"},DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS:{type:r.types.MERCHANT,code:"DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS",message:"Data Collector must be created with Kount and/or PayPal."}}},{"../lib/braintree-error":93}],68:[function(e,t,n){"use strict";var r,i=e("../lib/constants").FRAUDNET_FNCLS,o=e("../lib/constants").FRAUDNET_SOURCE,a=e("../lib/constants").FRAUDNET_URL,s=e("../lib/assets").loadScript,c=e("../lib/promise");function u(){}function l(e){e&&e.parentNode&&e.parentNode.removeChild(e)}u.prototype.initialize=function(){var e=this;return this.sessionId=r=function(){var e,t="";for(e=0;e<32;e++)t+=Math.floor(16*Math.random()).toString(16);return t}(),this._beaconId=function(e){var t=(new Date).getTime()/1e3;return"https://b.stats.paypal.com/counter.cgi?i=127.0.0.1&p="+e+"&t="+t+"&a=14"}(this.sessionId),this._parameterBlock=function(e,t){var n=document.body.appendChild(document.createElement("script"));return n.type="application/json",n.setAttribute("fncls",i),n.text=JSON.stringify({f:e,s:o,b:t}),n}(this.sessionId,this._beaconId),s({src:a}).then(function(t){return e._thirdPartyBlock=t,e}).catch(function(){return null})},u.prototype.teardown=function(){l(document.querySelector('iframe[title="ppfniframe"]')),l(document.querySelector('iframe[title="pbf"]')),l(this._parameterBlock),l(this._thirdPartyBlock)},t.exports={setup:function(){var e=new u;return r?(e.sessionId=r,c.resolve(e)):e.initialize()},clearSessionIdCache:function(){r=null}}},{"../lib/assets":89,"../lib/constants":98,"../lib/promise":127}],69:[function(e,t,n){"use strict";var r=e("./kount"),i=e("./fraudnet"),o=e("../lib/braintree-error"),a=e("../lib/basic-component-verification"),s=e("../lib/create-deferred-client"),c=e("../lib/create-assets-url"),u=e("../lib/methods"),l=e("../lib/convert-methods-to-error"),d=e("../lib/promise"),p=e("@braintree/wrap-promise"),f=e("./errors");t.exports={create:p(function(e){var t,n="Data Collector",h={},m=[];return a.verify({name:n,client:e.client,authorization:e.authorization}).then(function(){return s.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:c.create(e.authorization),name:n})}).then(function(n){var i,a=n.getConfiguration();if(!e.kount&&!e.paypal)return d.reject(new o(f.DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS));if(!0===e.kount){if(!a.gatewayConfiguration.kount)return d.reject(new o(f.DATA_COLLECTOR_KOUNT_NOT_ENABLED));try{i=r.setup({environment:a.gatewayConfiguration.environment,merchantId:a.gatewayConfiguration.kount.kountMerchantId})}catch(s){return d.reject(new o({type:f.DATA_COLLECTOR_KOUNT_ERROR.type,code:f.DATA_COLLECTOR_KOUNT_ERROR.code,message:s.message}))}t=i.deviceData,m.push(i)}else t={};return d.resolve()}).then(function(){return!0!==e.paypal?d.resolve():i.setup().then(function(e){e&&(t.correlation_id=e.sessionId,m.push(e))})}).then(function(){return 0===m.length?d.reject(new o(f.DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS)):(h.deviceData=JSON.stringify(t),h.rawDeviceData=t,h.teardown=function(e,t){return p(function(){return new d(function(n){t.forEach(function(e){e&&e.teardown()}),l(e,u(e)),n()})})}(h,m),h)})}),VERSION:"3.50.1"}},{"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/convert-methods-to-error":99,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/methods":125,"../lib/promise":127,"./errors":67,"./fraudnet":68,"./kount":70,"@braintree/wrap-promise":27}],70:[function(e,t,n){"use strict";var r=e("./vendor/sjcl"),i=e("../lib/camel-case-to-snake-case"),o="https://assets.qa.braintreepayments.com/data",a={development:o,qa:o,sandbox:"https://assets.braintreegateway.com/sandbox/data",production:"https://assets.braintreegateway.com/data"},s={};function c(e){var t=c.getCachedDeviceData(e.merchantId);if(t)return this.deviceData=t,void(this._isCached=!0);this._currentEnvironment=this._initializeEnvironment(e),r.random.startCollectors(),this._deviceSessionId=this._generateDeviceSessionId(),this.deviceData=this._getDeviceData(),c.setCachedDeviceData(e.merchantId,this.deviceData),this._iframe=this._setupIFrame()}c.getCachedDeviceData=function(e){return s[e]},c.setCachedDeviceData=function(e,t){s[e]=t},c.prototype.teardown=function(){this._isCached||(r.random.stopCollectors(),this._removeIframe())},c.prototype._removeIframe=function(){this._iframe.parentNode.removeChild(this._iframe)},c.prototype._getDeviceData=function(){return i({deviceSessionId:this._deviceSessionId,fraudMerchantId:this._currentEnvironment.id})},c.prototype._generateDeviceSessionId=function(){var e;return e=r.random.randomWords(4,0),r.codec.hex.fromBits(e)},c.prototype._setupIFrame=function(){var e,t,n=this;return e="?m="+this._currentEnvironment.id+"&s="+this._deviceSessionId,(t=document.createElement("iframe")).width=1,t.id="braintreeDataFrame-"+this._deviceSessionId,t.height=1,t.frameBorder=0,t.scrolling="no",t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),setTimeout(function(){t.src=n._currentEnvironment.url+"/logo.htm"+e,t.innerHTML=''},10),t},c.prototype._initializeEnvironment=function(e){var t=a[e.environment];if(null==t)throw new Error(e.environment+" is not a valid environment for kount.environment");return{url:t,name:e.environment,id:e.merchantId}},t.exports={setup:function(e){return new c(null!=e?e:{})},Kount:c,environmentUrls:a}},{"../lib/camel-case-to-snake-case":97,"./vendor/sjcl":71}],71:[function(e,t,n){"use strict";var r={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(e){this.toString=function(){return"CORRUPT: "+this.message},this.message=e},invalid:function(e){this.toString=function(){return"INVALID: "+this.message},this.message=e},bug:function(e){this.toString=function(){return"BUG: "+this.message},this.message=e},notReady:function(e){this.toString=function(){return"NOT READY: "+this.message},this.message=e}}};function i(e,t,n){if(4!==t.length)throw new r.exception.invalid("invalid aes block size");var i=e.b[n],o=t[0]^i[0],a=t[n?3:1]^i[1],s=t[2]^i[2];t=t[n?1:3]^i[3];var c,u,l,d,p=i.length/4-2,f=4,h=[0,0,0,0];c=e.l[n],e=c[0];var m=c[1],_=c[2],y=c[3],g=c[4];for(d=0;d>>24]^m[a>>16&255]^_[s>>8&255]^y[255&t]^i[f],u=e[a>>>24]^m[s>>16&255]^_[t>>8&255]^y[255&o]^i[f+1],l=e[s>>>24]^m[t>>16&255]^_[o>>8&255]^y[255&a]^i[f+2],t=e[t>>>24]^m[o>>16&255]^_[a>>8&255]^y[255&s]^i[f+3],f+=4,o=c,a=u,s=l;for(d=0;4>d;d++)h[n?3&-d:d]=g[o>>>24]<<24^g[a>>16&255]<<16^g[s>>8&255]<<8^g[255&t]^i[f++],c=o,o=a,a=s,s=t,t=c;return h}function o(e,t){var n,r,i,o=e.u,a=e.b,s=o[0],c=o[1],u=o[2],l=o[3],d=o[4],p=o[5],f=o[6],h=o[7];for(n=0;64>n;n++)16>n?r=t[n]:(r=t[n+1&15],i=t[n+14&15],r=t[15&n]=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+t[15&n]+t[n+9&15]|0),r=r+h+(d>>>6^d>>>11^d>>>25^d<<26^d<<21^d<<7)+(f^d&(p^f))+a[n],h=f,f=p,p=d,d=l+r|0,l=u,u=c,s=r+((c=s)&u^l&(c^u))+(c>>>2^c>>>13^c>>>22^c<<30^c<<19^c<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+c|0,o[2]=o[2]+u|0,o[3]=o[3]+l|0,o[4]=o[4]+d|0,o[5]=o[5]+p|0,o[6]=o[6]+f|0,o[7]=o[7]+h|0}function a(e,t){var n,i=r.random.B[e],o=[];for(n in i)i.hasOwnProperty(n)&&o.push(i[n]);for(n=0;nt&&(e.g[t]=e.g[t]+1|0,!e.g[t]);t++);return e.C.encrypt(e.g)}function l(e,t){return function(){t.apply(e,arguments)}}r.cipher.aes=function(e){this.l[0][0][0]||this.G();var t,n,i,o,a=this.l[0][4],s=this.l[1];t=e.length;var c=1;if(4!==t&&6!==t&&8!==t)throw new r.exception.invalid("invalid aes key size");for(this.b=[i=e.slice(0),o=[]],e=t;e<4*t+28;e++)n=i[e-1],(0===e%t||8===t&&4===e%t)&&(n=a[n>>>24]<<24^a[n>>16&255]<<16^a[n>>8&255]<<8^a[255&n],0===e%t&&(n=n<<8^n>>>24^c<<24,c=c<<1^283*(c>>7))),i[e]=i[e-t]^n;for(t=0;e;t++,e--)n=i[3&t?e:e-4],o[t]=4>=e||4>t?n:s[0][a[n>>>24]]^s[1][a[n>>16&255]]^s[2][a[n>>8&255]]^s[3][a[255&n]]},r.cipher.aes.prototype={encrypt:function(e){return i(this,e,0)},decrypt:function(e){return i(this,e,1)},l:[[[],[],[],[],[]],[[],[],[],[],[]]],G:function(){var e,t,n,r,i,o,a,s=this.l[0],c=this.l[1],u=s[4],l=c[4],d=[],p=[];for(e=0;256>e;e++)p[(d[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!u[t];t^=r||1,n=p[n]||1)for(o=(o=n^n<<1^n<<2^n<<3^n<<4)>>8^255&o^99,u[t]=o,l[o]=t,i=d[e=d[r=d[t]]],a=16843009*i^65537*e^257*r^16843008*t,i=257*d[o]^16843008*o,e=0;4>e;e++)s[e][t]=i=i<<24^i>>>8,c[e][o]=a=a<<24^a>>>8;for(e=0;5>e;e++)s[e]=s[e].slice(0),c[e]=c[e].slice(0)}},r.bitArray={bitSlice:function(e,t,n){return e=r.bitArray.M(e.slice(t/32),32-(31&t)).slice(1),void 0===n?e:r.bitArray.clamp(e,n-t)},extract:function(e,t,n){var r=Math.floor(-t-n&31);return(-32&(t+n-1^t)?e[t/32|0]<<32-r^e[t/32+1|0]>>>r:e[t/32|0]>>>r)&(1<>t-1,1)),e},partial:function(e,t,n){return 32===e?t:(n?0|t:t<<32-e)+1099511627776*e},getPartial:function(e){return Math.round(e/1099511627776)||32},equal:function(e,t){if(r.bitArray.bitLength(e)!==r.bitArray.bitLength(t))return!1;var n,i=0;for(n=0;n>>t),n=e[o]<<32-t;return o=e.length?e[e.length-1]:0,e=r.bitArray.getPartial(o),i.push(r.bitArray.partial(t+e&31,32>>24|n>>>8&65280|(65280&n)<<8|n<<24;return e}},r.codec.utf8String={fromBits:function(e){var t,n,i="",o=r.bitArray.bitLength(e);for(t=0;t>>8>>>8>>>8),n<<=8;return decodeURIComponent(escape(i))},toBits:function(e){e=unescape(encodeURIComponent(e));var t,n=[],i=0;for(t=0;tr;i++){for(n=!0,t=2;t*t<=i;t++)if(0===i%t){n=!1;break}n&&(8>r&&(this.K[r]=e(Math.pow(i,.5))),this.b[r]=e(Math.pow(i,1/3)),r++)}}},r.prng=function(e){this.c=[new r.hash.sha256],this.i=[0],this.H=0,this.v={},this.F=0,this.J={},this.L=this.f=this.j=this.T=0,this.b=[0,0,0,0,0,0,0,0],this.g=[0,0,0,0],this.C=void 0,this.D=e,this.s=!1,this.B={progress:{},seeded:{}},this.m=this.S=0,this.w=1,this.A=2,this.O=65536,this.I=[0,48,64,96,128,192,256,384,512,768,1024],this.P=3e4,this.N=80},r.prng.prototype={randomWords:function(e,t){var n,i,o=[];if((n=this.isReady(t))===this.m)throw new r.exception.notReady("generator isn't seeded");if(n&this.A){n=!(n&this.w),i=[];var a,s=0;for(this.L=i[0]=(new Date).valueOf()+this.P,a=0;16>a;a++)i.push(4294967296*Math.random()|0);for(a=0;a=1<this.j&&(this.j=s),this.H++,this.b=r.hash.sha256.hash(this.b.concat(i)),this.C=new r.cipher.aes(this.b),n=0;4>n&&(this.g[n]=this.g[n]+1|0,!this.g[n]);n++);}for(n=0;n>>=1;this.c[c].update([i,this.F++,2,t,s,e.length].concat(e))}break;case"string":void 0===t&&(t=e.length),this.c[c].update([i,this.F++,3,t,s,e.length]),this.c[c].update(e);break;default:l=1}if(l)throw new r.exception.bug("random: addEntropy only supports number, array of numbers or string");this.i[c]+=t,this.f+=t,u===this.m&&(this.isReady()!==this.m&&a("seeded",Math.max(this.j,this.f)),a("progress",this.getProgress()))},isReady:function(e){return e=this.I[void 0!==e?e:this.D],this.j&&this.j>=e?this.i[0]>this.N&&(new Date).valueOf()>this.L?this.A|this.w:this.w:this.f>=e?this.A|this.m:this.m},getProgress:function(e){return e=this.I[e||this.D],this.j>=e?1:this.f>e?1:this.f/e},startCollectors:function(){if(!this.s){if(this.a={loadTimeCollector:l(this,this.V),mouseCollector:l(this,this.W),keyboardCollector:l(this,this.U),accelerometerCollector:l(this,this.R),touchCollector:l(this,this.X)},window.addEventListener)window.addEventListener("load",this.a.loadTimeCollector,!1),window.addEventListener("mousemove",this.a.mouseCollector,!1),window.addEventListener("keypress",this.a.keyboardCollector,!1),window.addEventListener("devicemotion",this.a.accelerometerCollector,!1),window.addEventListener("touchmove",this.a.touchCollector,!1);else{if(!document.attachEvent)throw new r.exception.bug("can't attach event");document.attachEvent("onload",this.a.loadTimeCollector),document.attachEvent("onmousemove",this.a.mouseCollector),document.attachEvent("keypress",this.a.keyboardCollector)}this.s=!0}},stopCollectors:function(){this.s&&(window.removeEventListener?(window.removeEventListener("load",this.a.loadTimeCollector,!1),window.removeEventListener("mousemove",this.a.mouseCollector,!1),window.removeEventListener("keypress",this.a.keyboardCollector,!1),window.removeEventListener("devicemotion",this.a.accelerometerCollector,!1),window.removeEventListener("touchmove",this.a.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this.a.loadTimeCollector),document.detachEvent("onmousemove",this.a.mouseCollector),document.detachEvent("keypress",this.a.keyboardCollector)),this.s=!1)},addEventListener:function(e,t){this.B[e][this.S++]=t},removeEventListener:function(e,t){var n,r,i=this.B[e],o=[];for(r in i)i.hasOwnProperty(r)&&i[r]===t&&o.push(r);for(n=0;ni&&n.bottom>r&&n.left<(t.innerWidth-i||document.documentElement.clientWidth-i)})(n)||n.scrollIntoView()},5)}),this._destructor.registerFunctionForTeardown(function(){var e,t,n;for(e=0;e0&&(e.details.invalidFields={},e.details.invalidFieldKeys.forEach(function(t){e.details.invalidFields[t]=this._fields[t].containerElement}.bind(this)))},D.prototype.teardown=function(){var e=this;return new C(function(t,n){e._destructor.teardown(function(r){T.sendEvent(e._clientPromise,"custom.hosted-fields.teardown-completed"),r?n(r):t()})})},D.prototype.tokenize=function(e){var t=this;return e||(e={}),new C(function(n,r){t._bus.emit(E.TOKENIZATION_REQUEST,e,function(e){var i=e[0],o=e[1];i?(t._attachInvalidFieldContainersToError(i),r(new l(i))):n(o)})})},D.prototype.addClass=function(e,t){var n;return A.hasOwnProperty(e)?this._fields.hasOwnProperty(e)?this._bus.emit(E.ADD_CLASS,e,t):n=new l({type:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.type,code:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.code,message:'Cannot add class to "'+e+'" field because it is not part of the current Hosted Fields options.'}):n=new l({type:h.HOSTED_FIELDS_FIELD_INVALID.type,code:h.HOSTED_FIELDS_FIELD_INVALID.code,message:'"'+e+'" is not a valid field. You must use a valid field option when adding a class.'}),n?C.reject(n):C.resolve()},D.prototype.removeClass=function(e,t){var n;return A.hasOwnProperty(e)?this._fields.hasOwnProperty(e)?this._bus.emit(E.REMOVE_CLASS,e,t):n=new l({type:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.type,code:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.code,message:'Cannot remove class from "'+e+'" field because it is not part of the current Hosted Fields options.'}):n=new l({type:h.HOSTED_FIELDS_FIELD_INVALID.type,code:h.HOSTED_FIELDS_FIELD_INVALID.code,message:'"'+e+'" is not a valid field. You must use a valid field option when removing a class.'}),n?C.reject(n):C.resolve()},D.prototype.setAttribute=function(e){var t,n;return A.hasOwnProperty(e.field)?this._fields.hasOwnProperty(e.field)?(t=S(e.attribute,e.value))?n=t:this._bus.emit(E.SET_ATTRIBUTE,e.field,e.attribute,e.value):n=new l({type:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.type,code:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.code,message:'Cannot set attribute for "'+e.field+'" field because it is not part of the current Hosted Fields options.'}):n=new l({type:h.HOSTED_FIELDS_FIELD_INVALID.type,code:h.HOSTED_FIELDS_FIELD_INVALID.code,message:'"'+e.field+'" is not a valid field. You must use a valid field option when setting an attribute.'}),n?C.reject(n):C.resolve()},D.prototype.setMonthOptions=function(e){var t,n=this,r=this._merchantConfigurationOptions.fields;return r.expirationMonth?r.expirationMonth.select||(t="Expiration month field must be a select element."):t="Expiration month field must exist to use setMonthOptions.",t?C.reject(new l({type:h.HOSTED_FIELDS_FIELD_PROPERTY_INVALID.type,code:h.HOSTED_FIELDS_FIELD_PROPERTY_INVALID.code,message:t})):new C(function(t){n._bus.emit(E.SET_MONTH_OPTIONS,e,t)})},D.prototype.setMessage=function(e){this._bus.emit(E.SET_MESSAGE,e.field,e.message)},D.prototype.removeAttribute=function(e){var t,n;return A.hasOwnProperty(e.field)?this._fields.hasOwnProperty(e.field)?(t=S(e.attribute))?n=t:this._bus.emit(E.REMOVE_ATTRIBUTE,e.field,e.attribute):n=new l({type:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.type,code:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.code,message:'Cannot remove attribute for "'+e.field+'" field because it is not part of the current Hosted Fields options.'}):n=new l({type:h.HOSTED_FIELDS_FIELD_INVALID.type,code:h.HOSTED_FIELDS_FIELD_INVALID.code,message:'"'+e.field+'" is not a valid field. You must use a valid field option when removing an attribute.'}),n?C.reject(n):C.resolve()},D.prototype.setPlaceholder=function(e,t){return this.setAttribute({field:e,attribute:"placeholder",value:t})},D.prototype.clear=function(e){var t;return A.hasOwnProperty(e)?this._fields.hasOwnProperty(e)?this._bus.emit(E.CLEAR_FIELD,e):t=new l({type:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.type,code:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.code,message:'Cannot clear "'+e+'" field because it is not part of the current Hosted Fields options.'}):t=new l({type:h.HOSTED_FIELDS_FIELD_INVALID.type,code:h.HOSTED_FIELDS_FIELD_INVALID.code,message:'"'+e+'" is not a valid field. You must use a valid field option when clearing a field.'}),t?C.reject(t):C.resolve()},D.prototype.focus=function(e){var t;return A.hasOwnProperty(e)?this._fields.hasOwnProperty(e)?this._bus.emit(E.TRIGGER_INPUT_FOCUS,e):t=new l({type:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.type,code:h.HOSTED_FIELDS_FIELD_NOT_PRESENT.code,message:'Cannot focus "'+e+'" field because it is not part of the current Hosted Fields options.'}):t=new l({type:h.HOSTED_FIELDS_FIELD_INVALID.type,code:h.HOSTED_FIELDS_FIELD_INVALID.code,message:'"'+e+'" is not a valid field. You must use a valid field option when focusing a field.'}),t?C.reject(t):C.resolve()},D.prototype.getState=function(){return this._state},n.exports=P.wrapPrototype(D)}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../lib/analytics":88,"../../lib/assign":90,"../../lib/braintree-error":93,"../../lib/bus":96,"../../lib/constants":98,"../../lib/convert-methods-to-error":99,"../../lib/create-assets-url":101,"../../lib/create-deferred-client":103,"../../lib/destructor":105,"../../lib/errors":107,"../../lib/methods":125,"../../lib/promise":127,"../../lib/vendor/uuid":131,"../shared/browser-detection":81,"../shared/constants":82,"../shared/errors":83,"../shared/find-parent-tags":84,"../shared/get-card-types":85,"./attribute-validation-error":75,"./compose-url":76,"./get-styles-from-class":77,"./inject-frame":79,"@braintree/class-list":18,"@braintree/event-emitter":19,"@braintree/iframer":20,"@braintree/wrap-promise":27}],79:[function(e,t,n){"use strict";t.exports=function(e,t){var n=document.createElement("div"),r=document.createDocumentFragment();return n.style.clear="both",r.appendChild(e),r.appendChild(n),t.appendChild(r),[e,n]}},{}],80:[function(e,t,n){"use strict";var r=e("./external/hosted-fields"),i=e("../lib/basic-component-verification"),o=e("./shared/errors"),a=e("restricted-input/supports-input-formatting"),s=e("@braintree/wrap-promise"),c=e("../lib/braintree-error"),u=e("../lib/promise");t.exports={supportsInputFormatting:a,create:s(function(e){return i.verify({name:"Hosted Fields",authorization:e.authorization,client:e.client}).then(function(){var t=new r(e);return new u(function(e,n){t.on("ready",function(){e(t)}),t.on("timeout",function(){n(new c(o.HOSTED_FIELDS_TIMEOUT))})})})}),VERSION:"3.50.1"}},{"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/promise":127,"./external/hosted-fields":78,"./shared/errors":83,"@braintree/wrap-promise":27,"restricted-input/supports-input-formatting":38}],81:[function(e,t,n){"use strict";t.exports={isIE:e("@braintree/browser-detection/is-ie"),isEdge:e("@braintree/browser-detection/is-edge"),isIe9:e("@braintree/browser-detection/is-ie9"),isIos:e("@braintree/browser-detection/is-ios"),isIosWebview:e("@braintree/browser-detection/is-ios-webview")}},{"@braintree/browser-detection/is-edge":6,"@braintree/browser-detection/is-ie":7,"@braintree/browser-detection/is-ie9":9,"@braintree/browser-detection/is-ios":14,"@braintree/browser-detection/is-ios-webview":12}],82:[function(e,t,n){"use strict";var r=e("../../lib/enumerate"),i=e("./errors"),o={VERSION:"3.50.1",maxExpirationYearAge:19,externalEvents:{FOCUS:"focus",BLUR:"blur",EMPTY:"empty",NOT_EMPTY:"notEmpty",VALIDITY_CHANGE:"validityChange",CARD_TYPE_CHANGE:"cardTypeChange"},defaultMaxLengths:{number:19,postalCode:8,expirationDate:7,expirationMonth:2,expirationYear:4,cvv:3},externalClasses:{FOCUSED:"braintree-hosted-fields-focused",INVALID:"braintree-hosted-fields-invalid",VALID:"braintree-hosted-fields-valid"},defaultIFrameStyle:{border:"none",width:"100%",height:"100%",float:"left"},tokenizationErrorCodes:{81724:i.HOSTED_FIELDS_TOKENIZATION_FAIL_ON_DUPLICATE,81736:i.HOSTED_FIELDS_TOKENIZATION_CVV_VERIFICATION_FAILED},allowedStyles:["-moz-appearance","-moz-osx-font-smoothing","-moz-tap-highlight-color","-moz-transition","-webkit-appearance","-webkit-font-smoothing","-webkit-tap-highlight-color","-webkit-transition","appearance","color","direction","font","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-weight","letter-spacing","line-height","padding","opacity","outline","text-shadow","transition"],allowedFields:{number:{name:"credit-card-number",label:"Credit Card Number"},cvv:{name:"cvv",label:"CVV"},expirationDate:{name:"expiration",label:"Expiration Date"},expirationMonth:{name:"expiration-month",label:"Expiration Month"},expirationYear:{name:"expiration-year",label:"Expiration Year"},postalCode:{name:"postal-code",label:"Postal Code"}},allowedAttributes:{"aria-invalid":"boolean","aria-required":"boolean",disabled:"boolean",placeholder:"string"},autocompleteMappings:{"credit-card-number":"cc-number",expiration:"cc-exp","expiration-month":"cc-exp-month","expiration-year":"cc-exp-year",cvv:"cc-csc","postal-code":"billing postal-code"}};o.events=r(["ADD_CLASS","AUTOFILL_EXPIRATION_DATE","BIN_AVAILABLE","CARD_FORM_ENTRY_HAS_BEGUN","CLEAR_FIELD","CONFIGURATION","FRAME_READY","INPUT_EVENT","READY_FOR_CLIENT","REMOVE_ATTRIBUTE","REMOVE_CLASS","SET_ATTRIBUTE","SET_MESSAGE","SET_MONTH_OPTIONS","TOKENIZATION_REQUEST","TRIGGER_INPUT_FOCUS","VALIDATE_STRICT"],"hosted-fields:"),t.exports=o},{"../../lib/enumerate":106,"./errors":83}],83:[function(e,t,n){"use strict";var r=e("../../lib/braintree-error");t.exports={HOSTED_FIELDS_TIMEOUT:{type:r.types.UNKNOWN,code:"HOSTED_FIELDS_TIMEOUT",message:"Hosted Fields timed out when attempting to set up."},HOSTED_FIELDS_INVALID_FIELD_KEY:{type:r.types.MERCHANT,code:"HOSTED_FIELDS_INVALID_FIELD_KEY"},HOSTED_FIELDS_INVALID_FIELD_SELECTOR:{type:r.types.MERCHANT,code:"HOSTED_FIELDS_INVALID_FIELD_SELECTOR",message:"Selector does not reference a valid DOM node."},HOSTED_FIELDS_FIELD_DUPLICATE_IFRAME:{type:r.types.MERCHANT,code:"HOSTED_FIELDS_FIELD_DUPLICATE_IFRAME",message:"Element already contains a Braintree iframe."},HOSTED_FIELDS_FIELD_INVALID:{type:r.types.MERCHANT,code:"HOSTED_FIELDS_FIELD_INVALID"},HOSTED_FIELDS_FIELD_NOT_PRESENT:{type:r.types.MERCHANT,code:"HOSTED_FIELDS_FIELD_NOT_PRESENT"},HOSTED_FIELDS_TOKENIZATION_NETWORK_ERROR:{type:r.types.NETWORK,code:"HOSTED_FIELDS_TOKENIZATION_NETWORK_ERROR",message:"A tokenization network error occurred."},HOSTED_FIELDS_TOKENIZATION_FAIL_ON_DUPLICATE:{type:r.types.CUSTOMER,code:"HOSTED_FIELDS_TOKENIZATION_FAIL_ON_DUPLICATE",message:"This credit card already exists in the merchant's vault."},HOSTED_FIELDS_TOKENIZATION_CVV_VERIFICATION_FAILED:{type:r.types.CUSTOMER,code:"HOSTED_FIELDS_TOKENIZATION_CVV_VERIFICATION_FAILED",message:"CVV verification failed during tokenization."},HOSTED_FIELDS_FAILED_TOKENIZATION:{type:r.types.CUSTOMER,code:"HOSTED_FIELDS_FAILED_TOKENIZATION",message:"The supplied card data failed tokenization."},HOSTED_FIELDS_FIELDS_EMPTY:{type:r.types.CUSTOMER,code:"HOSTED_FIELDS_FIELDS_EMPTY",message:"All fields are empty. Cannot tokenize empty card fields."},HOSTED_FIELDS_FIELDS_INVALID:{type:r.types.CUSTOMER,code:"HOSTED_FIELDS_FIELDS_INVALID",message:"Some payment input fields are invalid. Cannot tokenize invalid card fields."},HOSTED_FIELDS_ATTRIBUTE_NOT_SUPPORTED:{type:r.types.MERCHANT,code:"HOSTED_FIELDS_ATTRIBUTE_NOT_SUPPORTED"},HOSTED_FIELDS_ATTRIBUTE_VALUE_NOT_ALLOWED:{type:r.types.MERCHANT,code:"HOSTED_FIELDS_ATTRIBUTE_VALUE_NOT_ALLOWED"},HOSTED_FIELDS_FIELD_PROPERTY_INVALID:{type:r.types.MERCHANT,code:"HOSTED_FIELDS_FIELD_PROPERTY_INVALID"}}},{"../../lib/braintree-error":93}],84:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n=e.parentNode,r=[];null!=n;)null!=n.tagName&&n.tagName.toLowerCase()===t&&r.push(n),n=n.parentNode;return r}},{}],85:[function(e,t,n){"use strict";var r=e("credit-card-type");t.exports=function(e){var t=r(e);return t.forEach(function(e){"mastercard"===e.type&&(e.type="master-card")}),t}},{"credit-card-type":28}],86:[function(e,t,n){"use strict";var r=e("./american-express"),i=e("./apple-pay"),o=e("./client"),a=e("./data-collector"),s=e("./hosted-fields"),c=e("./local-payment"),u=e("./masterpass"),l=e("./payment-request"),d=e("./paypal"),p=e("./paypal-checkout"),f=e("./google-payment"),h=e("./three-d-secure"),m=e("./unionpay"),_=e("./us-bank-account"),y=e("./vault-manager"),g=e("./venmo"),E=e("./visa-checkout");t.exports={americanExpress:r,applePay:i,client:o,dataCollector:a,hostedFields:s,localPayment:c,masterpass:u,googlePayment:f,paymentRequest:l,paypal:d,paypalCheckout:p,threeDSecure:h,unionpay:m,usBankAccount:_,vaultManager:y,venmo:g,visaCheckout:E,VERSION:"3.50.1"}},{"./american-express":41,"./apple-pay":44,"./client":50,"./data-collector":69,"./google-payment":74,"./hosted-fields":80,"./local-payment":134,"./masterpass":137,"./payment-request":142,"./paypal":149,"./paypal-checkout":146,"./three-d-secure":153,"./unionpay":157,"./us-bank-account":163,"./vault-manager":166,"./venmo":168,"./visa-checkout":175}],87:[function(e,t,n){"use strict";var r=e("./create-authorization-data"),i=e("./json-clone"),o=e("./constants");t.exports=function(e,t){var n,a=t?i(t):{},s=r(e.authorization).attrs,c=i(e.analyticsMetadata);for(n in a.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION,a._meta)a._meta.hasOwnProperty(n)&&(c[n]=a._meta[n]);return a._meta=c,s.tokenizationKey?a.tokenizationKey=s.tokenizationKey:a.authorizationFingerprint=s.authorizationFingerprint,a}},{"./constants":98,"./create-authorization-data":102,"./json-clone":124}],88:[function(e,t,n){"use strict";var r=e("./promise"),i=e("./constants"),o=e("./add-metadata");t.exports={sendEvent:function(e,t,n){var a=Date.now();return r.resolve(e).then(function(e){var r=Date.now(),s=e.getConfiguration(),c=e._request,u=s.gatewayConfiguration.analytics.url,l={analytics:[{kind:i.ANALYTICS_PREFIX+t,isAsync:Math.floor(r/1e3)!==Math.floor(a/1e3),timestamp:a}]};c({url:u,method:"post",data:o(s,l),timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},n)})}}},{"./add-metadata":87,"./constants":98,"./promise":127}],89:[function(e,t,n){"use strict";var r=e("@braintree/asset-loader/load-script");t.exports={loadScript:r}},{"@braintree/asset-loader/load-script":2}],90:[function(e,t,n){"use strict";var r="function"===typeof Object.assign?Object.assign:i;function i(e){var t,n,r;for(t=1;t>4&3,n=(15&o)<<4|a>>2&15,r=(3&a)<<6|63&s,d+=String.fromCharCode(t)+(n?String.fromCharCode(n):"")+(r?String.fromCharCode(r):"")}while(c-1&&n(new i({code:_.LOCAL_PAYMENT_WINDOW_OPEN_FAILED.code,type:_.LOCAL_PAYMENT_WINDOW_OPEN_FAILED.type,message:_.LOCAL_PAYMENT_WINDOW_OPEN_FAILED.message,details:{originalError:a}})):s&&(t.popupBridge||r._frameService.redirect(r._loadingFrameUrl),r.tokenize(s).then(e).catch(n).then(function(){r._frameService.close()}))}},y.prototype._formatTokenizePayload=function(e){var t,n={};return e.paypalAccounts&&(n=e.paypalAccounts[0]),t={nonce:n.nonce,details:{},type:n.type},n.details&&(n.details.payerInfo&&(t.details=n.details.payerInfo),n.details.correlationId&&(t.correlationId=n.details.correlationId)),t},y.prototype.hasTokenizationParams=function(){var e=f.parse();return Boolean(e.btLpToken&&e.btLpPaymentId&&e.btLpPayerId)},y.prototype._formatTokenizeData=function(e){var t=this._client.getConfiguration(),n=t.gatewayConfiguration,r={merchantAccountId:this._merchantAccountId,paypalAccount:{correlationId:e.btLpToken||e.token,paymentToken:e.btLpPaymentId||e.paymentId,payerId:e.btLpPayerId||e.PayerID,unilateral:n.paypal.unvettedMerchant,intent:"sale"}};return r},y.prototype.teardown=h(function(){return this._frameService.teardown(),l(this,u(y.prototype)),c.sendEvent(this._client,"local-payment.teardown-completed"),p.resolve()}),n.exports=y}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../lib/analytics":88,"../../lib/braintree-error":93,"../../lib/constants":98,"../../lib/convert-methods-to-error":99,"../../lib/convert-to-braintree-error":100,"../../lib/frame-service/external":110,"../../lib/methods":125,"../../lib/promise":127,"../../lib/querystring":128,"../../lib/use-min":129,"../shared/errors":135,"./constants":132,"@braintree/wrap-promise":27}],134:[function(e,t,n){"use strict";var r=e("../lib/analytics"),i=e("../lib/basic-component-verification"),o=e("../lib/create-deferred-client"),a=e("../lib/create-assets-url"),s=e("./external/local-payment"),c=e("../lib/promise"),u=e("@braintree/wrap-promise"),l=e("../lib/braintree-error"),d=e("./shared/errors");t.exports={create:u(function(e){var t="Local Payment";return i.verify({name:t,client:e.client,authorization:e.authorization}).then(function(){return o.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:a.create(e.authorization),name:t})}).then(function(t){var n=t.getConfiguration();return e.client=t,!0!==n.gatewayConfiguration.paypalEnabled?c.reject(new l(d.LOCAL_PAYMENT_NOT_ENABLED)):(r.sendEvent(t,"local-payment.initialized"),new s(e)._initialize())})}),VERSION:"3.50.1"}},{"../lib/analytics":88,"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/promise":127,"./external/local-payment":133,"./shared/errors":135,"@braintree/wrap-promise":27}],135:[function(e,t,n){"use strict";var r=e("../../lib/braintree-error");t.exports={LOCAL_PAYMENT_NOT_ENABLED:{type:r.types.MERCHANT,code:"LOCAL_PAYMENT_NOT_ENABLED",message:"LocalPayment is not enabled for this merchant."},LOCAL_PAYMENT_ALREADY_IN_PROGRESS:{type:r.types.MERCHANT,code:"LOCAL_PAYMENT_ALREADY_IN_PROGRESS",message:"LocalPayment payment is already in progress."},LOCAL_PAYMENT_WINDOW_CLOSED:{type:r.types.CUSTOMER,code:"LOCAL_PAYMENT_WINDOW_CLOSED",message:"Customer closed LocalPayment window before authorizing."},LOCAL_PAYMENT_WINDOW_OPEN_FAILED:{type:r.types.MERCHANT,code:"LOCAL_PAYMENT_WINDOW_OPEN_FAILED",message:"LocalPayment window failed to open; make sure startPayment was called in response to a user action."},LOCAL_PAYMENT_START_PAYMENT_FAILED:{type:r.types.NETWORK,code:"LOCAL_PAYMENT_START_PAYMENT_FAILED",message:"LocalPayment startPayment failed."},LOCAL_PAYMENT_START_PAYMENT_MISSING_REQUIRED_OPTION:{type:r.types.MERCHANT,code:"LOCAL_PAYMENT_START_PAYMENT_MISSING_REQUIRED_OPTION",message:"Missing required option for startPayment."},LOCAL_PAYMENT_TOKENIZATION_FAILED:{type:r.types.NETWORK,code:"LOCAL_PAYMENT_TOKENIZATION_FAILED",message:"Could not tokenize user's local payment method."},LOCAL_PAYMENT_INVALID_PAYMENT_OPTION:{type:r.types.MERCHANT,code:"LOCAL_PAYMENT_INVALID_PAYMENT_OPTION",message:"Local payment options are invalid."}}},{"../../lib/braintree-error":93}],136:[function(e,n,r){(function(t){"use strict";var r=e("../../lib/promise"),i=e("../../lib/frame-service/external"),o=e("../../lib/braintree-error"),a=e("../shared/errors"),s="3.50.1",c=e("../../lib/methods"),u=e("@braintree/wrap-promise"),l=e("../../lib/analytics"),d=e("../../lib/convert-methods-to-error"),p=e("../../lib/convert-to-braintree-error"),f=e("../shared/constants"),h=e("../../lib/constants").INTEGRATION_TIMEOUT_MS;function m(e){var n=e.client.getConfiguration();this._client=e.client,this._assetsUrl=n.gatewayConfiguration.assetsUrl+"/web/"+s,this._isDebug=n.isDebug,this._authInProgress=!1,t.popupBridge&&"function"===typeof t.popupBridge.getReturnUrlPrefix?this._callbackUrl=t.popupBridge.getReturnUrlPrefix()+"return":this._callbackUrl=this._assetsUrl+"/html/masterpass-redirect-frame"+(this._isDebug?"":".min")+".html"}m.prototype._initialize=function(){var e=this;return new r(function(t){var n=setTimeout(function(){l.sendEvent(e._client,"masterpass.load.timed-out")},h);i.create({name:f.LANDING_FRAME_NAME,height:f.POPUP_HEIGHT,width:f.POPUP_WIDTH,dispatchFrameUrl:e._assetsUrl+"/html/dispatch-frame"+(e._isDebug?"":".min")+".html",openFrameUrl:e._assetsUrl+"/html/masterpass-landing-frame"+(e._isDebug?"":".min")+".html"},function(r){e._frameService=r,clearTimeout(n),l.sendEvent(e._client,"masterpass.load.succeeded"),t(e)})})},m.prototype.tokenize=function(e){var t=this;return!e||function(e){var t,n;for(t=0;t-1?(l.sendEvent(r._client,"masterpass.tokenization.failed.to-open"),void n(new o({code:a.MASTERPASS_POPUP_OPEN_FAILED.code,type:a.MASTERPASS_POPUP_OPEN_FAILED.type,message:a.MASTERPASS_POPUP_OPEN_FAILED.message,details:{originalError:t}}))):(l.sendEvent(r._client,"masterpass.tokenization.failed"),r._closeWindow(),void n(p(t,a.MASTERPASS_FLOW_FAILED)));r._tokenizeMasterpass(i).then(e).catch(n)}},m.prototype._tokenizeMasterpass=function(e){var n=this;return"success"!==e.mpstatus?(l.sendEvent(n._client,"masterpass.tokenization.closed.by-user"),n._closeWindow(),r.reject(new o(a.MASTERPASS_POPUP_CLOSED))):function(e){return[e.oauth_verifier,e.oauth_token,e.checkout_resource_url].some(function(e){return null==e||"null"===e})}(e)?(l.sendEvent(n._client,"masterpass.tokenization.closed.missing-payload"),n._closeWindow(),r.reject(new o(a.MASTERPASS_POPUP_MISSING_REQUIRED_PARAMETERS))):n._client.request({endpoint:"payment_methods/masterpass_cards",method:"post",data:{masterpassCard:{checkoutResourceUrl:e.checkout_resource_url,requestToken:e.oauth_token,verifierToken:e.oauth_verifier}}}).then(function(e){return n._closeWindow(),t.popupBridge?l.sendEvent(n._client,"masterpass.tokenization.success-popupbridge"):l.sendEvent(n._client,"masterpass.tokenization.success"),e.masterpassCards[0]}).catch(function(e){return n._closeWindow(),t.popupBridge?l.sendEvent(n._client,"masterpass.tokenization.failed-popupbridge"):l.sendEvent(n._client,"masterpass.tokenization.failed"),r.reject(p(e,a.MASTERPASS_ACCOUNT_TOKENIZATION_FAILED))})},m.prototype._closeWindow=function(){this._authInProgress=!1,this._frameService.close()},m.prototype.teardown=function(){var e=this;return new r(function(t){e._frameService.teardown(),d(e,c(m.prototype)),l.sendEvent(e._client,"masterpass.teardown-completed"),t()})},n.exports=u.wrapPrototype(m)}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../lib/analytics":88,"../../lib/braintree-error":93,"../../lib/constants":98,"../../lib/convert-methods-to-error":99,"../../lib/convert-to-braintree-error":100,"../../lib/frame-service/external":110,"../../lib/methods":125,"../../lib/promise":127,"../shared/constants":139,"../shared/errors":140,"@braintree/wrap-promise":27}],137:[function(e,n,r){(function(t){"use strict";var r=e("../lib/braintree-error"),i=e("../lib/basic-component-verification"),o=e("./shared/browser-detection"),a=e("./external/masterpass"),s=e("../lib/create-deferred-client"),c=e("../lib/create-assets-url"),u=e("./shared/errors"),l=e("../lib/promise"),d=e("@braintree/wrap-promise");function p(){return Boolean(t.popupBridge||o.supportsPopups())}n.exports={create:d(function(e){return i.verify({name:"Masterpass",client:e.client,authorization:e.authorization}).then(function(){return p()?l.resolve():l.reject(new r(u.MASTERPASS_BROWSER_NOT_SUPPORTED))}).then(function(){return s.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:c.create(e.authorization),name:"Masterpass"})}).then(function(t){return e.client=t,e.client.getConfiguration().gatewayConfiguration.masterpass?new a(e)._initialize():l.reject(new r(u.MASTERPASS_NOT_ENABLED))})}),isSupported:p,VERSION:"3.50.1"}}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/promise":127,"./external/masterpass":136,"./shared/browser-detection":138,"./shared/errors":140,"@braintree/wrap-promise":27}],138:[function(e,t,n){"use strict";t.exports={supportsPopups:e("@braintree/browser-detection/supports-popups")}},{"@braintree/browser-detection/supports-popups":17}],139:[function(e,t,n){"use strict";t.exports={LANDING_FRAME_NAME:"braintreemasterpasslanding",POPUP_WIDTH:450,POPUP_HEIGHT:660,MASTERPASS_VERSION:"v6",REQUIRED_OPTIONS_FOR_TOKENIZE:["subtotal","currencyCode"]}},{}],140:[function(e,t,n){"use strict";var r=e("../../lib/braintree-error");t.exports={MASTERPASS_BROWSER_NOT_SUPPORTED:{type:r.types.CUSTOMER,code:"MASTERPASS_BROWSER_NOT_SUPPORTED",message:"Browser is not supported."},MASTERPASS_NOT_ENABLED:{type:r.types.MERCHANT,code:"MASTERPASS_NOT_ENABLED",message:"Masterpass is not enabled for this merchant."},MASTERPASS_TOKENIZE_MISSING_REQUIRED_OPTION:{type:r.types.MERCHANT,code:"MASTERPASS_TOKENIZE_MISSING_REQUIRED_OPTION",message:"Missing required option for tokenize."},MASTERPASS_TOKENIZATION_ALREADY_IN_PROGRESS:{type:r.types.MERCHANT,code:"MASTERPASS_TOKENIZATION_ALREADY_IN_PROGRESS",message:"Masterpass tokenization is already in progress."},MASTERPASS_ACCOUNT_TOKENIZATION_FAILED:{type:r.types.NETWORK,code:"MASTERPASS_ACCOUNT_TOKENIZATION_FAILED",message:"Could not tokenize user's Masterpass account."},MASTERPASS_POPUP_OPEN_FAILED:{type:r.types.MERCHANT,code:"MASTERPASS_POPUP_OPEN_FAILED",message:"Masterpass popup failed to open. Make sure to tokenize in response to a user action, such as a click."},MASTERPASS_POPUP_MISSING_REQUIRED_PARAMETERS:{type:r.types.MERCHANT,code:"MASTERPASS_POPUP_MISSING_REQUIRED_PARAMETERS",message:"Masterpass popup failed to return all required parameters needed to continue tokenization."},MASTERPASS_POPUP_CLOSED:{type:r.types.CUSTOMER,code:"MASTERPASS_POPUP_CLOSED",message:"Customer closed Masterpass popup before authorizing."},MASTERPASS_INVALID_PAYMENT_OPTION:{type:r.types.MERCHANT,code:"MASTERPASS_INVALID_PAYMENT_OPTION",message:"Masterpass payment options are invalid."},MASTERPASS_FLOW_FAILED:{type:r.types.NETWORK,code:"MASTERPASS_FLOW_FAILED",message:"Could not initialize Masterpass flow."}}},{"../../lib/braintree-error":93}],141:[function(e,n,r){(function(t){"use strict";var r=e("../../lib/analytics"),i=e("../../lib/assign").assign,o=e("../../lib/bus"),a=e("../../lib/convert-methods-to-error"),s=e("../../lib/generate-google-pay-configuration"),c=e("@braintree/iframer"),u=e("../../lib/vendor/uuid"),l=e("../../lib/use-min"),d=e("../../lib/methods"),p=e("../../lib/promise"),f=e("@braintree/event-emitter"),h=e("../../lib/braintree-error"),m="3.50.1",_=e("../shared/constants"),y=_.events,g=_.errors,E=e("@braintree/wrap-promise"),v={Visa:"visa",MasterCard:"mastercard","American Express":"amex","Diners Club":"diners",Discover:"discover",JCB:"jcb",UnionPay:"unionpay",Maestro:"maestro"},b="18278000977346790994";function T(e){var t=e.enabledPaymentMethods||{};f.call(this),this._componentId=u(),this._client=e.client,this._enabledPaymentMethods={basicCard:!1!==t.basicCard,googlePay:!1!==t.googlePay},this._googlePayVersion=2===e.googlePayVersion?2:1,this._googleMerchantId=b,this._supportedPaymentMethods=this._constructDefaultSupportedPaymentMethods(),this._defaultSupportedPaymentMethods=Object.keys(this._supportedPaymentMethods).map(function(e){return this._supportedPaymentMethods[e]}.bind(this)),this._bus=new o({channel:this._componentId})}f.createChild(T),T.prototype._constructDefaultSupportedPaymentMethods=function(){var e=this._client.getConfiguration(),t=e.gatewayConfiguration.androidPay,n=e.gatewayConfiguration.creditCards,r={};return this._enabledPaymentMethods.basicCard&&n&&n.supportedCardTypes.length>0&&(r.basicCard={supportedMethods:"basic-card",data:{supportedNetworks:n.supportedCardTypes.reduce(function(e,t){return t in v&&e.push(v[t]),e},[])}}),this._enabledPaymentMethods.googlePay&&t&&t.enabled&&(r.googlePay={supportedMethods:"https://google.com/pay",data:s(e,this._googlePayVersion,this._googleMerchantId)}),r},T.prototype.initialize=function(){var e=this._client.getConfiguration(),t=this;return this._frame=c({allowPaymentRequest:!0,name:"braintree-payment-request-frame",class:"braintree-payment-request-frame",height:0,width:0,style:{position:"absolute",left:"-9999px"},title:"Secure Payment Frame"}),0===this._defaultSupportedPaymentMethods.length?p.reject(new h(g.PAYMENT_REQUEST_NO_VALID_SUPPORTED_PAYMENT_METHODS)):new p(function(n){var i,o,a;t._bus.on(y.FRAME_READY,function(e){e(t._client)}),t._bus.on(y.FRAME_CAN_MAKE_REQUESTS,function(){r.sendEvent(t._client,"payment-request.initialized"),t._bus.on(y.SHIPPING_ADDRESS_CHANGE,function(e){var n={target:{shippingAddress:e},updateWith:function(e){t._bus.emit(y.UPDATE_SHIPPING_ADDRESS,e)}};t._emit("shippingAddressChange",n),t._emit("shippingaddresschange",n)}),t._bus.on(y.SHIPPING_OPTION_CHANGE,function(e){var n={target:{shippingOption:e},updateWith:function(e){t._bus.emit(y.UPDATE_SHIPPING_OPTION,e)}};t._emit("shippingOptionChange",n),t._emit("shippingoptionchange",n)}),n(t)}),t._frame.src=(i=e.gatewayConfiguration.assetsUrl,o=t._componentId,a=e.isDebug,i+"/web/"+m+"/html/payment-request-frame"+l(a)+".html#"+o),document.body.appendChild(t._frame)})},T.prototype.createSupportedPaymentMethodsConfiguration=function(e,t){var n;if(!e)throw new h(g.PAYMENT_REQUEST_CREATE_SUPPORTED_PAYMENT_METHODS_CONFIGURATION_MUST_INCLUDE_TYPE);if(!this._enabledPaymentMethods[e])throw new h(g.PAYMENT_REQUEST_CREATE_SUPPORTED_PAYMENT_METHODS_CONFIGURATION_TYPE_NOT_ENABLED);return(n=i({},this._supportedPaymentMethods[e])).data=i({},n.data,t),n},T.prototype.tokenize=function(e){var t=this;return new p(function(n,i){t._bus.emit(y.PAYMENT_REQUEST_INITIALIZED,{supportedPaymentMethods:e.supportedPaymentMethods||t._defaultSupportedPaymentMethods,details:e.details,options:e.options},function(e){var o=e[0],a=e[1];o?i(t._formatTokenizationError(o)):(r.sendEvent(t._client,"payment-request.tokenize.succeeded"),n({nonce:a.nonce,type:a.type,description:a.description,details:{rawPaymentResponse:a.details.rawPaymentResponse,cardType:a.details.cardType,lastFour:a.details.lastFour,lastTwo:a.details.lastTwo},binData:a.binData}))})})},T.prototype.canMakePayment=function(e){var n,i=this;return t.PaymentRequest?e.supportedPaymentMethods&&(e.supportedPaymentMethods.forEach(function(e){var t=e.supportedMethods;t in _.SUPPORTED_METHODS||(n=t)}),n)?p.reject(new h({type:g.PAYMENT_REQUEST_UNSUPPORTED_PAYMENT_METHOD.type,code:g.PAYMENT_REQUEST_UNSUPPORTED_PAYMENT_METHOD.code,message:n+" is not a supported payment method."})):new p(function(t,n){i._bus.emit(y.CAN_MAKE_PAYMENT,{supportedPaymentMethods:e.supportedPaymentMethods||i._defaultSupportedPaymentMethods,details:e.details,options:e.options},function(e){var o=e[0],a=e[1];o?n(i._formatCanMakePaymentError(o)):(r.sendEvent(i._client,"payment-request.can-make-payment."+a),t(a))})}):(r.sendEvent(i._client,"payment-request.can-make-payment.not-available"),p.resolve(!1))},T.prototype.teardown=function(){return this._bus.teardown(),this._frame.parentNode.removeChild(this._frame),a(this,d(T.prototype)),r.sendEvent(this._client,"payment-request.teardown-completed"),p.resolve()},T.prototype._formatTokenizationError=function(e){var t;switch(e.name){case"AbortError":return t=new h({type:g.PAYMENT_REQUEST_CANCELED.type,code:g.PAYMENT_REQUEST_CANCELED.code,message:g.PAYMENT_REQUEST_CANCELED.message,details:{originalError:e}}),r.sendEvent(this._client,"payment-request.tokenize.canceled"),t;case"PAYMENT_REQUEST_INITIALIZATION_FAILED":t=new h({type:g.PAYMENT_REQUEST_INITIALIZATION_MISCONFIGURED.type,code:g.PAYMENT_REQUEST_INITIALIZATION_MISCONFIGURED.code,message:g.PAYMENT_REQUEST_INITIALIZATION_MISCONFIGURED.message,details:{originalError:e}});break;case"BRAINTREE_GATEWAY_GOOGLE_PAYMENT_TOKENIZATION_ERROR":t=new h({type:g.PAYMENT_REQUEST_GOOGLE_PAYMENT_FAILED_TO_TOKENIZE.type,code:g.PAYMENT_REQUEST_GOOGLE_PAYMENT_FAILED_TO_TOKENIZE.code,message:g.PAYMENT_REQUEST_GOOGLE_PAYMENT_FAILED_TO_TOKENIZE.message,details:{originalError:e}});break;case"BRAINTREE_GATEWAY_GOOGLE_PAYMENT_PARSING_ERROR":t=new h({type:g.PAYMENT_REQUEST_GOOGLE_PAYMENT_PARSING_ERROR.type,code:g.PAYMENT_REQUEST_GOOGLE_PAYMENT_PARSING_ERROR.code,message:g.PAYMENT_REQUEST_GOOGLE_PAYMENT_PARSING_ERROR.message,details:{originalError:e}});break;default:t=new h({code:g.PAYMENT_REQUEST_NOT_COMPLETED.code,type:e.type||h.types.CUSTOMER,message:g.PAYMENT_REQUEST_NOT_COMPLETED.message,details:{originalError:e}})}return r.sendEvent(this._client,"payment-request.tokenize.failed"),t},T.prototype._formatCanMakePaymentError=function(e){var t;switch(e.name){case"PAYMENT_REQUEST_INITIALIZATION_FAILED":t=new h({type:g.PAYMENT_REQUEST_INITIALIZATION_MISCONFIGURED.type,code:g.PAYMENT_REQUEST_INITIALIZATION_MISCONFIGURED.code,message:g.PAYMENT_REQUEST_INITIALIZATION_MISCONFIGURED.message,details:{originalError:e}});break;case"NotAllowedError":t=new h({type:g.PAYMENT_REQUEST_CAN_MAKE_PAYMENT_NOT_ALLOWED.type,code:g.PAYMENT_REQUEST_CAN_MAKE_PAYMENT_NOT_ALLOWED.code,message:g.PAYMENT_REQUEST_CAN_MAKE_PAYMENT_NOT_ALLOWED.message,details:{originalError:e}});break;default:t=new h({code:g.PAYMENT_REQUEST_CAN_MAKE_PAYMENT_FAILED.code,type:g.PAYMENT_REQUEST_CAN_MAKE_PAYMENT_FAILED.type,message:g.PAYMENT_REQUEST_CAN_MAKE_PAYMENT_FAILED.message,details:{originalError:e}})}return r.sendEvent(this._client,"payment-request.can-make-payment.failed"),t},n.exports=E.wrapPrototype(T)}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../lib/analytics":88,"../../lib/assign":90,"../../lib/braintree-error":93,"../../lib/bus":96,"../../lib/convert-methods-to-error":99,"../../lib/generate-google-pay-configuration":120,"../../lib/methods":125,"../../lib/promise":127,"../../lib/use-min":129,"../../lib/vendor/uuid":131,"../shared/constants":143,"@braintree/event-emitter":19,"@braintree/iframer":20,"@braintree/wrap-promise":27}],142:[function(e,t,n){"use strict";var r=e("./external/payment-request"),i=e("../lib/basic-component-verification"),o=e("../lib/create-deferred-client"),a=e("../lib/create-assets-url"),s=e("@braintree/wrap-promise");t.exports={create:s(function(e){var t="Payment Request";return i.verify({name:t,client:e.client,authorization:e.authorization}).then(function(){return o.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:a.create(e.authorization),name:t})}).then(function(t){return e.client=t,new r(e).initialize()})}),VERSION:"3.50.1"}},{"../lib/basic-component-verification":91,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"./external/payment-request":141,"@braintree/wrap-promise":27}],143:[function(e,t,n){"use strict";var r=e("../../lib/enumerate"),i=e("./errors"),o={};o.events=r(["CAN_MAKE_PAYMENT","FRAME_READY","FRAME_CAN_MAKE_REQUESTS","PAYMENT_REQUEST_INITIALIZED","SHIPPING_ADDRESS_CHANGE","UPDATE_SHIPPING_ADDRESS","SHIPPING_OPTION_CHANGE","UPDATE_SHIPPING_OPTION"],"payment-request:"),o.errors=i,o.SUPPORTED_METHODS={"basic-card":!0,"https://google.com/pay":!0},t.exports=o},{"../../lib/enumerate":106,"./errors":144}],144:[function(e,t,n){"use strict";var r=e("../../lib/braintree-error");t.exports={PAYMENT_REQUEST_NO_VALID_SUPPORTED_PAYMENT_METHODS:{type:r.types.MERCHANT,code:"PAYMENT_REQUEST_NO_VALID_SUPPORTED_PAYMENT_METHODS",message:"There are no supported payment methods associated with this account."},PAYMENT_REQUEST_CANCELED:{type:r.types.CUSTOMER,code:"PAYMENT_REQUEST_CANCELED",message:"Payment request was canceled."},PAYMENT_REQUEST_INITIALIZATION_MISCONFIGURED:{type:r.types.MERCHANT,code:"PAYMENT_REQUEST_INITIALIZATION_MISCONFIGURED",message:"Something went wrong when configuring the payment request."},PAYMENT_REQUEST_CAN_MAKE_PAYMENT_FAILED:{type:r.types.UNKNOWN,code:"PAYMENT_REQUEST_CAN_MAKE_PAYMENT_FAILED",message:"Something went wrong when calling `canMakePayment`"},PAYMENT_REQUEST_CAN_MAKE_PAYMENT_NOT_ALLOWED:{type:r.types.MERCHANT,code:"PAYMENT_REQUEST_CAN_MAKE_PAYMENT_NOT_ALLOWED",message:"Something went wrong when calling `canMakePayment`. Most likely, `canMakePayment` was called multiple times with different supportedMethods configurations."},PAYMENT_REQUEST_UNSUPPORTED_PAYMENT_METHOD:{type:r.types.MERCHANT,code:"PAYMENT_REQUEST_UNSUPPORTED_PAYMENT_METHOD"},PAYMENT_REQUEST_GOOGLE_PAYMENT_FAILED_TO_TOKENIZE:{type:r.types.MERCHANT,code:"PAYMENT_REQUEST_GOOGLE_PAYMENT_FAILED_TO_TOKENIZE",message:"Something went wrong when tokenizing the Google Pay card."},PAYMENT_REQUEST_GOOGLE_PAYMENT_PARSING_ERROR:{type:r.types.UNKNOWN,code:"PAYMENT_REQUEST_GOOGLE_PAYMENT_PARSING_ERROR",message:"Something went wrong when tokenizing the Google Pay card."},PAYMENT_REQUEST_NOT_COMPLETED:{code:"PAYMENT_REQUEST_NOT_COMPLETED",message:"Payment request could not be completed."},PAYMENT_REQUEST_CREATE_SUPPORTED_PAYMENT_METHODS_CONFIGURATION_MUST_INCLUDE_TYPE:{type:r.types.MERCHANT,code:"PAYMENT_REQUEST_CREATE_SUPPORTED_PAYMENT_METHODS_CONFIGURATION_MUST_INCLUDE_TYPE",message:"createSupportedPaymentMethodsConfiguration must include a type parameter."},PAYMENT_REQUEST_CREATE_SUPPORTED_PAYMENT_METHODS_CONFIGURATION_TYPE_NOT_ENABLED:{type:r.types.MERCHANT,code:"PAYMENT_REQUEST_CREATE_SUPPORTED_PAYMENT_METHODS_CONFIGURATION_TYPE_NOT_ENABLED",message:"createSupportedPaymentMethodsConfiguration type parameter must be valid or enabled."}}},{"../../lib/braintree-error":93}],145:[function(e,t,n){"use strict";var r=e("../lib/braintree-error");t.exports={PAYPAL_NOT_ENABLED:{type:r.types.MERCHANT,code:"PAYPAL_NOT_ENABLED",message:"PayPal is not enabled for this merchant."},PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED:{type:r.types.MERCHANT,code:"PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED",message:"A linked PayPal Sandbox account is required to use PayPal Checkout in Sandbox. See https://developers.braintreepayments.com/guides/paypal/testing-go-live/#linked-paypal-testing for details on linking your PayPal sandbox with Braintree."},PAYPAL_ACCOUNT_TOKENIZATION_FAILED:{type:r.types.NETWORK,code:"PAYPAL_ACCOUNT_TOKENIZATION_FAILED",message:"Could not tokenize user's PayPal account."},PAYPAL_FLOW_FAILED:{type:r.types.NETWORK,code:"PAYPAL_FLOW_FAILED",message:"Could not initialize PayPal flow."},PAYPAL_FLOW_OPTION_REQUIRED:{type:r.types.MERCHANT,code:"PAYPAL_FLOW_OPTION_REQUIRED",message:"PayPal flow property is invalid or missing."},PAYPAL_INVALID_PAYMENT_OPTION:{type:r.types.MERCHANT,code:"PAYPAL_INVALID_PAYMENT_OPTION",message:"PayPal payment options are invalid."}}},{"../lib/braintree-error":93}],146:[function(e,t,n){"use strict";var r=e("../lib/basic-component-verification"),i=e("@braintree/wrap-promise"),o=e("./paypal-checkout");t.exports={create:i(function(e){return r.verify({name:"PayPal Checkout",client:e.client,authorization:e.authorization}).then(function(){var t=new o(e);return t._initialize(e)})}),isSupported:function(){return!0},VERSION:"3.50.1"}},{"../lib/basic-component-verification":91,"./paypal-checkout":147,"@braintree/wrap-promise":27}],147:[function(e,t,n){"use strict";var r=e("../lib/analytics"),i=e("../lib/create-deferred-client"),o=e("../lib/create-assets-url"),a=e("../lib/promise"),s=e("@braintree/wrap-promise"),c=e("../lib/braintree-error"),u=e("../lib/convert-to-braintree-error"),l=e("./errors"),d=e("../paypal/shared/constants"),p=e("../lib/methods"),f=e("../lib/convert-methods-to-error");function h(e){this._merchantAccountId=e.merchantAccountId}h.prototype._initialize=function(e){return this._clientPromise=i.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:o.create(e.authorization),name:"PayPal Checkout"}).then(function(e){return this._configuration=e.getConfiguration(),this._merchantAccountId||(this._configuration.gatewayConfiguration.paypalEnabled?!0===this._configuration.gatewayConfiguration.paypal.environmentNoNetwork&&(this._setupError=new c(l.PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED)):this._setupError=new c(l.PAYPAL_NOT_ENABLED)),this._setupError?a.reject(this._setupError):(r.sendEvent(e,"paypal-checkout.initialized"),e)}.bind(this)),e.client?this._clientPromise.then(function(){return this}.bind(this)):a.resolve(this)},h.prototype.createPayment=function(e){var t,n=this;return e&&d.FLOW_ENDPOINTS.hasOwnProperty(e.flow)?(t="paypal_hermes/"+d.FLOW_ENDPOINTS[e.flow],r.sendEvent(this._clientPromise,"paypal-checkout.createPayment"),!0===e.offerCredit&&r.sendEvent(this._clientPromise,"paypal-checkout.credit.offered"),this._clientPromise.then(function(r){return r.request({endpoint:t,method:"post",data:n._formatPaymentResourceData(e)})}).then(function(t){return"checkout"===e.flow?t.paymentResource.redirectUrl.match(/EC-\w+/)[0]:t.agreementSetup.tokenId}).catch(function(e){return n._setupError?a.reject(n._setupError):422===(e.details&&e.details.httpStatus)?a.reject(new c({type:l.PAYPAL_INVALID_PAYMENT_OPTION.type,code:l.PAYPAL_INVALID_PAYMENT_OPTION.code,message:l.PAYPAL_INVALID_PAYMENT_OPTION.message,details:{originalError:e}})):a.reject(u(e,{type:l.PAYPAL_FLOW_FAILED.type,code:l.PAYPAL_FLOW_FAILED.code,message:l.PAYPAL_FLOW_FAILED.message}))})):a.reject(new c(l.PAYPAL_FLOW_OPTION_REQUIRED))},h.prototype.tokenizePayment=function(e){var t,n=this,i={flow:e.billingToken?"vault":"checkout",intent:e.intent},o={ecToken:e.paymentToken,billingToken:e.billingToken,payerId:e.payerID,paymentId:e.paymentID};return r.sendEvent(this._clientPromise,"paypal-checkout.tokenization.started"),this._clientPromise.then(function(e){return e.request({endpoint:"payment_methods/paypal_accounts",method:"post",data:n._formatTokenizeData(i,o)})}).then(function(e){return t=n._formatTokenizePayload(e),r.sendEvent(n._clientPromise,"paypal-checkout.tokenization.success"),t.creditFinancingOffered&&r.sendEvent(n._clientPromise,"paypal-checkout.credit.accepted"),t}).catch(function(e){return n._setupError?a.reject(n._setupError):(r.sendEvent(n._clientPromise,"paypal-checkout.tokenization.failed"),a.reject(u(e,{type:l.PAYPAL_ACCOUNT_TOKENIZATION_FAILED.type,code:l.PAYPAL_ACCOUNT_TOKENIZATION_FAILED.code,message:l.PAYPAL_ACCOUNT_TOKENIZATION_FAILED.message})))})},h.prototype._formatPaymentResourceData=function(e){var t,n=this._configuration.gatewayConfiguration,r=e.intent,i={returnUrl:"https://www.paypal.com/checkoutnow/error",cancelUrl:"https://www.paypal.com/checkoutnow/error",offerPaypalCredit:!0===e.offerCredit,merchantAccountId:this._merchantAccountId,experienceProfile:{brandName:e.displayName||n.paypal.displayName,localeCode:e.locale,noShipping:(!e.enableShippingAddress).toString(),addressOverride:!1===e.shippingAddressEditable,landingPageType:e.landingPageType}};if("checkout"===e.flow)for(t in i.amount=e.amount,i.currencyIsoCode=e.currency,r&&("capture"===r&&(r="sale"),i.intent=r),e.hasOwnProperty("lineItems")&&(i.lineItems=e.lineItems),e.shippingAddressOverride)e.shippingAddressOverride.hasOwnProperty(t)&&(i[t]=e.shippingAddressOverride[t]);else i.shippingAddress=e.shippingAddressOverride,e.billingAgreementDescription&&(i.description=e.billingAgreementDescription);return i},h.prototype._formatTokenizeData=function(e,t){var n=this._configuration,r=n.gatewayConfiguration,i="TOKENIZATION_KEY"===n.authorizationType,o={paypalAccount:{correlationId:t.billingToken||t.ecToken,options:{validate:"vault"===e.flow&&!i}}};return t.billingToken?o.paypalAccount.billingAgreementToken=t.billingToken:(o.paypalAccount.paymentToken=t.paymentId,o.paypalAccount.payerId=t.payerId,o.paypalAccount.unilateral=r.paypal.unvettedMerchant,e.intent&&(o.paypalAccount.intent=e.intent)),this._merchantAccountId&&(o.merchantAccountId=this._merchantAccountId),o},h.prototype._formatTokenizePayload=function(e){var t,n={};return e.paypalAccounts&&(n=e.paypalAccounts[0]),t={nonce:n.nonce,details:{},type:n.type},n.details&&n.details.payerInfo&&(t.details=n.details.payerInfo),n.details&&n.details.creditFinancingOffered&&(t.creditFinancingOffered=n.details.creditFinancingOffered),t},h.prototype.teardown=function(){return f(this,p(h.prototype)),a.resolve()},t.exports=s.wrapPrototype(h)},{"../lib/analytics":88,"../lib/braintree-error":93,"../lib/convert-methods-to-error":99,"../lib/convert-to-braintree-error":100,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/methods":125,"../lib/promise":127,"../paypal/shared/constants":150,"./errors":145,"@braintree/wrap-promise":27}],148:[function(e,n,r){(function(t){"use strict";var r=e("../../lib/frame-service/external"),i=e("../../lib/braintree-error"),o=e("../../lib/convert-to-braintree-error"),a=e("../../lib/use-min"),s=e("../../lib/once"),c="3.50.1",u=e("../shared/constants"),l=e("../../lib/constants").INTEGRATION_TIMEOUT_MS,d=e("../../lib/analytics"),p=e("../../lib/methods"),f=e("../../lib/deferred"),h=e("../shared/errors"),m=e("../../lib/convert-methods-to-error"),_=e("../../lib/querystring"),y=e("../../lib/promise"),g=e("@braintree/wrap-promise");function E(e){this._client=e.client,this._assetsUrl=e.client.getConfiguration().gatewayConfiguration.paypal.assetsUrl+"/web/"+c,this._isDebug=e.client.getConfiguration().isDebug,this._loadingFrameUrl=this._assetsUrl+"/html/paypal-landing-frame"+a(this._isDebug)+".html",this._authorizationInProgress=!1}E.prototype._initialize=function(){var e=this,t=this._client,n=setTimeout(function(){d.sendEvent(t,"paypal.load.timed-out")},l);return new y(function(i){r.create({name:u.LANDING_FRAME_NAME,dispatchFrameUrl:e._assetsUrl+"/html/dispatch-frame"+a(e._isDebug)+".html",openFrameUrl:e._loadingFrameUrl},function(r){e._frameService=r,clearTimeout(n),d.sendEvent(t,"paypal.load.succeeded"),i(e)})})},E.prototype.tokenize=function(e,n){var r,o,a=this,c=this._client;return n&&(n=s(f(n))),e&&u.FLOW_ENDPOINTS.hasOwnProperty(e.flow)?(r=new y(function(n,r){a._authorizationInProgress?(d.sendEvent(c,"paypal.tokenization.error.already-opened"),r(new i(h.PAYPAL_TOKENIZATION_REQUEST_ACTIVE))):(a._authorizationInProgress=!0,t.popupBridge||d.sendEvent(c,"paypal.tokenization.opened"),!0===e.offerCredit&&d.sendEvent(c,"paypal.credit.offered"),a._navigateFrameToAuth(e).catch(r),a._frameService.open({},a._createFrameServiceCallback(e,n,r)))}),n?(r.then(function(e){n(null,e)}).catch(n),this._frameService.createHandler({beforeClose:function(){d.sendEvent(c,"paypal.tokenization.closed.by-merchant")}})):r):(o=new i(h.PAYPAL_FLOW_OPTION_REQUIRED),n?(n(o),this._frameService.createNoopHandler()):y.reject(o))},E.prototype._createFrameServiceCallback=function(e,n,r){var o=this,a=this._client;return t.popupBridge?function(t,s){var c=s&&s.path&&"/cancel"===s.path.substring(0,7);o._authorizationInProgress=!1,t||c?(d.sendEvent(a,"paypal.tokenization.closed-popupbridge.by-user"),r(new i(h.PAYPAL_POPUP_CLOSED))):s&&o._tokenizePayPal(e,s.queryItems).then(n).catch(r)}:function(t,s){o._authorizationInProgress=!1,t?"FRAME_SERVICE_FRAME_CLOSED"===t.code?(d.sendEvent(a,"paypal.tokenization.closed.by-user"),r(new i(h.PAYPAL_POPUP_CLOSED))):t.code&&t.code.indexOf("FRAME_SERVICE_FRAME_OPEN_FAILED")>-1&&r(new i({code:h.PAYPAL_POPUP_OPEN_FAILED.code,type:h.PAYPAL_POPUP_OPEN_FAILED.type,message:h.PAYPAL_POPUP_OPEN_FAILED.message,details:{originalError:t}})):s&&o._tokenizePayPal(e,s).then(n).catch(r)}},E.prototype._tokenizePayPal=function(e,n){var r=this,i=this._client;return t.popupBridge||this._frameService.redirect(this._loadingFrameUrl),i.request({endpoint:"payment_methods/paypal_accounts",method:"post",data:this._formatTokenizeData(e,n)}).then(function(e){var n=r._formatTokenizePayload(e);return t.popupBridge?d.sendEvent(i,"paypal.tokenization.success-popupbridge"):d.sendEvent(i,"paypal.tokenization.success"),n.creditFinancingOffered&&d.sendEvent(i,"paypal.credit.accepted"),r._frameService.close(),n}).catch(function(e){return t.popupBridge?d.sendEvent(i,"paypal.tokenization.failed-popupbridge"):d.sendEvent(i,"paypal.tokenization.failed"),r._frameService.close(),y.reject(o(e,{type:h.PAYPAL_ACCOUNT_TOKENIZATION_FAILED.type,code:h.PAYPAL_ACCOUNT_TOKENIZATION_FAILED.code,message:h.PAYPAL_ACCOUNT_TOKENIZATION_FAILED.message}))})},E.prototype._formatTokenizePayload=function(e){var t,n={};return e.paypalAccounts&&(n=e.paypalAccounts[0]),t={nonce:n.nonce,details:{},type:n.type},n.details&&n.details.payerInfo&&(t.details=n.details.payerInfo),n.details&&n.details.creditFinancingOffered&&(t.creditFinancingOffered=n.details.creditFinancingOffered),t},E.prototype._formatTokenizeData=function(e,t){var n=this._client.getConfiguration(),r=n.gatewayConfiguration,i="TOKENIZATION_KEY"===n.authorizationType,o={paypalAccount:{correlationId:t.ba_token||t.token,options:{validate:"vault"===e.flow&&!i}}};return t.ba_token?o.paypalAccount.billingAgreementToken=t.ba_token:(o.paypalAccount.paymentToken=t.paymentId,o.paypalAccount.payerId=t.PayerID,o.paypalAccount.unilateral=r.paypal.unvettedMerchant,e.hasOwnProperty("intent")&&(o.paypalAccount.intent=e.intent)),o},E.prototype._navigateFrameToAuth=function(e){var n=this,r=this._client,a="paypal_hermes/"+u.FLOW_ENDPOINTS[e.flow];return r.request({endpoint:a,method:"post",data:this._formatPaymentResourceData(e)}).then(function(i){var o;o="checkout"===e.flow?i.paymentResource.redirectUrl:i.agreementSetup.approvalUrl,"commit"===e.useraction&&(o=_.queryify(o,{useraction:"commit"})),t.popupBridge&&d.sendEvent(r,"paypal.tokenization.opened-popupbridge"),n._frameService.redirect(o)}).catch(function(e){var t=e.details&&e.details.httpStatus;return n._frameService.close(),n._authorizationInProgress=!1,422===t?y.reject(new i({type:h.PAYPAL_INVALID_PAYMENT_OPTION.type,code:h.PAYPAL_INVALID_PAYMENT_OPTION.code,message:h.PAYPAL_INVALID_PAYMENT_OPTION.message,details:{originalError:e}})):y.reject(o(e,{type:h.PAYPAL_FLOW_FAILED.type,code:h.PAYPAL_FLOW_FAILED.code,message:h.PAYPAL_FLOW_FAILED.message}))})},E.prototype._formatPaymentResourceData=function(e){var n,r=this._client.getConfiguration().gatewayConfiguration,i=this._frameService._serviceId,o={returnUrl:r.paypal.assetsUrl+"/web/"+c+"/html/paypal-redirect-frame"+a(this._isDebug)+".html?channel="+i,cancelUrl:r.paypal.assetsUrl+"/web/"+c+"/html/paypal-cancel-frame"+a(this._isDebug)+".html?channel="+i,offerPaypalCredit:!0===e.offerCredit,experienceProfile:{brandName:e.displayName||r.paypal.displayName,localeCode:e.locale,noShipping:(!e.enableShippingAddress).toString(),addressOverride:!1===e.shippingAddressEditable,landingPageType:e.landingPageType}};if(t.popupBridge&&"function"===typeof t.popupBridge.getReturnUrlPrefix&&(o.returnUrl=t.popupBridge.getReturnUrlPrefix()+"return",o.cancelUrl=t.popupBridge.getReturnUrlPrefix()+"cancel"),"checkout"===e.flow)for(n in o.amount=e.amount,o.currencyIsoCode=e.currency,e.hasOwnProperty("intent")&&(o.intent=e.intent),e.shippingAddressOverride)e.shippingAddressOverride.hasOwnProperty(n)&&(o[n]=e.shippingAddressOverride[n]);else o.shippingAddress=e.shippingAddressOverride,e.billingAgreementDescription&&(o.description=e.billingAgreementDescription);return o},E.prototype.closeWindow=function(){this._authorizationInProgress&&d.sendEvent(this._client,"paypal.tokenize.closed.by-merchant"),this._frameService.close()},E.prototype.focusWindow=function(){this._frameService.focus()},E.prototype.teardown=g(function(){return this._frameService.teardown(),m(this,p(E.prototype)),d.sendEvent(this._client,"paypal.teardown-completed"),y.resolve()}),n.exports=E}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../lib/analytics":88,"../../lib/braintree-error":93,"../../lib/constants":98,"../../lib/convert-methods-to-error":99,"../../lib/convert-to-braintree-error":100,"../../lib/deferred":104,"../../lib/frame-service/external":110,"../../lib/methods":125,"../../lib/once":126,"../../lib/promise":127,"../../lib/querystring":128,"../../lib/use-min":129,"../shared/constants":150,"../shared/errors":151,"@braintree/wrap-promise":27}],149:[function(e,t,n){"use strict";var r=e("../lib/analytics"),i=e("../lib/basic-component-verification"),o=e("../lib/create-deferred-client"),a=e("../lib/create-assets-url"),s=e("../lib/braintree-error"),c=e("./shared/errors"),u=e("./external/paypal"),l=e("@braintree/wrap-promise"),d=e("../lib/promise");t.exports={create:l(function(e){return i.verify({name:"PayPal",client:e.client,authorization:e.authorization}).then(function(){return o.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:a.create(e.authorization),name:"PayPal"})}).then(function(t){var n=t.getConfiguration();return e.client=t,!0!==n.gatewayConfiguration.paypalEnabled?d.reject(new s(c.PAYPAL_NOT_ENABLED)):(r.sendEvent(e.client,"paypal.initialized"),new u(e)._initialize())})}),isSupported:function(){return!0},VERSION:"3.50.1"}},{"../lib/analytics":88,"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/promise":127,"./external/paypal":148,"./shared/errors":151,"@braintree/wrap-promise":27}],150:[function(e,t,n){"use strict";t.exports={LANDING_FRAME_NAME:"braintreepaypallanding",FLOW_ENDPOINTS:{checkout:"create_payment_resource",vault:"setup_billing_agreement"}}},{}],151:[function(e,t,n){"use strict";var r=e("../../lib/braintree-error");t.exports={PAYPAL_NOT_ENABLED:{type:r.types.MERCHANT,code:"PAYPAL_NOT_ENABLED",message:"PayPal is not enabled for this merchant."},PAYPAL_TOKENIZATION_REQUEST_ACTIVE:{type:r.types.MERCHANT,code:"PAYPAL_TOKENIZATION_REQUEST_ACTIVE",message:"Another tokenization request is active."},PAYPAL_ACCOUNT_TOKENIZATION_FAILED:{type:r.types.NETWORK,code:"PAYPAL_ACCOUNT_TOKENIZATION_FAILED",message:"Could not tokenize user's PayPal account."},PAYPAL_FLOW_FAILED:{type:r.types.NETWORK,code:"PAYPAL_FLOW_FAILED",message:"Could not initialize PayPal flow."},PAYPAL_FLOW_OPTION_REQUIRED:{type:r.types.MERCHANT,code:"PAYPAL_FLOW_OPTION_REQUIRED",message:"PayPal flow property is invalid or missing."},PAYPAL_POPUP_OPEN_FAILED:{type:r.types.MERCHANT,code:"PAYPAL_POPUP_OPEN_FAILED",message:"PayPal popup failed to open, make sure to tokenize in response to a user action."},PAYPAL_POPUP_CLOSED:{type:r.types.CUSTOMER,code:"PAYPAL_POPUP_CLOSED",message:"Customer closed PayPal popup before authorizing."},PAYPAL_INVALID_PAYMENT_OPTION:{type:r.types.MERCHANT,code:"PAYPAL_INVALID_PAYMENT_OPTION",message:"PayPal payment options are invalid."}}},{"../../lib/braintree-error":93}],152:[function(e,n,r){(function(t){"use strict";var r=e("../../lib/braintree-error"),i=e("../../lib/convert-to-braintree-error"),o=e("../../lib/analytics"),a=e("../../lib/assign").assign,s=e("../../lib/assets"),c=e("../../lib/methods"),u=e("../../lib/convert-methods-to-error"),l=e("../shared/constants"),d=e("../../lib/use-min"),p=e("../../lib/bus"),f=e("../../lib/vendor/uuid"),h=e("../../lib/deferred"),m=e("../shared/errors"),_=e("../shared/events"),y=e("@braintree/iframer"),g=e("../../lib/promise"),E=e("@braintree/wrap-promise"),v=e("../../lib/constants").INTEGRATION_TIMEOUT_MS,b=e("../../lib/constants").PLATFORM,T="3.50.1";function A(e){this._options=e,this._assetsUrl=e.client.getConfiguration().gatewayConfiguration.assetsUrl+"/web/"+T,this._isDebug=e.client.getConfiguration().isDebug,this._client=e.client,this._clientMetadata={sdkVersion:b+"/"+T,requestedThreeDSecureVersion:this._usesSongbirdFlow()?"2":"1"}}A.prototype.verifyCard=function(e){var t,n,i,s,c,u,l,d=g.resolve(),p=e.additionalInformation||{},f=this;return e=a({},e),(u=this._checkForVerifyCardError(e))?g.reject(u):(n=!1!==e.showLoader,this._verifyCardInProgress=!0,t={amount:e.amount},l=e.nonce,this._usesSongbirdFlow()?(c=h(e.onLookupComplete),p=this._transformBillingAddress(p,e.billingAddress),p=this._transformShippingAddress(p),e.email&&(p.email=e.email),e.mobilePhoneNumber&&(p.mobilePhoneNumber=e.mobilePhoneNumber),t.additionalInfo=p,e.challengeRequested&&(t.challengeRequested=e.challengeRequested),e.exemptionRequested&&(t.exemptionRequested=e.exemptionRequested),d=this._prepareRawLookup(t).then(function(e){t=e})):(i=h(e.addFrame),s=h(e.removeFrame),e.customer&&e.customer.billingAddress&&(e.customer=this._transformV1CustomerBillingAddress(e.customer),t.customer=e.customer)),o.sendEvent(this._options.client,"three-d-secure.verification-flow.started"),d.then(function(){var e="payment_methods/"+l+"/three_d_secure/lookup";return f._client.request({endpoint:e,method:"post",data:t}).catch(function(e){var t,n=e&&e.details&&e.details.httpStatus,i="three-d-secure.verification-flow.lookup-failed";return 404===n?(t=m.THREEDS_LOOKUP_TOKENIZED_CARD_NOT_FOUND_ERROR,i+=".404"):422===n?(t=m.THREEDS_LOOKUP_VALIDATION_ERROR,i+=".422"):t=m.THREEDS_LOOKUP_ERROR,o.sendEvent(f._options.client,i),g.reject(new r({type:t.type,code:t.code,message:t.message,details:{originalError:e}}))})}).then(function(e){return o.sendEvent(f._options.client,"three-d-secure.verification-flow.3ds-version."+e.lookup.threeDSecureVersion),f._initializeChallengeWithLookupResponse(e,{showLoader:n,addFrame:i,removeFrame:s,onLookupComplete:c})}).then(function(e){return o.sendEvent(f._options.client,"three-d-secure.verification-flow.completed"),e}).catch(function(e){return f._verifyCardInProgress=!1,o.sendEvent(f._options.client,"three-d-secure.verification-flow.failed"),g.reject(e)}))},A.prototype._checkForVerifyCardError=function(e){var t;return this._verifyCardBlockingError?this._verifyCardBlockingError:!0===this._verifyCardInProgress?new r(m.THREEDS_AUTHENTICATION_IN_PROGRESS):(e.nonce?e.amount||(t="an amount"):t="a nonce",t||(this._usesSongbirdFlow()?"function"!==typeof e.onLookupComplete&&(t="an onLookupComplete function"):"function"!==typeof e.addFrame?t="an addFrame function":"function"!==typeof e.removeFrame&&(t="a removeFrame function")),t?new r({type:m.THREEDS_MISSING_VERIFY_CARD_OPTION.type,code:m.THREEDS_MISSING_VERIFY_CARD_OPTION.code,message:"verifyCard options must include "+t+"."}):null)},A.prototype.initializeChallengeWithLookupResponse=function(e){return this._initializeChallengeWithLookupResponse(e)},A.prototype._initializeChallengeWithLookupResponse=function(e,t){var n=this;return t=t||{},this._lookupPaymentMethod=e.paymentMethod,new g(function(r,i){n._verifyCardCallback=function(e,t){n._verifyCardInProgress=!1,e?i(e):(o.sendEvent(n._options.client,"three-d-secure.verification-flow.liability-shifted."+String(t.liabilityShifted)),o.sendEvent(n._options.client,"three-d-secure.verification-flow.liability-shift-possible."+String(t.liabilityShiftPossible)),r(t))},n._handleLookupResponse({showLoader:t.showLoader,lookupResponse:e,addFrame:t.addFrame,removeFrame:t.removeFrame,onLookupComplete:t.onLookupComplete})})},A.prototype.prepareLookup=function(e){return this._prepareRawLookup(e).then(function(e){return JSON.stringify(e)})},A.prototype._prepareRawLookup=function(e){var t=a({},e),n=this;return this._getDfReferenceId().then(function(e){t.dfReferenceId=e}).then(function(){return n._triggerCardinalBinProcess(e.bin)}).catch(function(){}).then(function(){return t.clientMetadata=n._clientMetadata,t.authorizationFingerprint=n._client.getConfiguration().authorizationFingerprint,t.braintreeLibraryVersion="braintree/web/"+T,t})},A.prototype._triggerCardinalBinProcess=function(e){var n=this,r=Date.now();return e?t.Cardinal.trigger("bin.process",e).then(function(e){n._clientMetadata.issuerDeviceDataCollectionTimeElapsed=Date.now()-r,n._clientMetadata.issuerDeviceDataCollectionResult=e&&e.Status}):g.resolve()},A.prototype.cancelVerifyCard=function(){var e;return this._usesSongbirdFlow()?g.reject(new r({type:m.THREEDS_METHOD_DEPRECATED.type,code:m.THREEDS_METHOD_DEPRECATED.code,message:"cancelVerifyCard can not be used with 3D Secure v2."})):(this._verifyCardInProgress=!1,this._lookupPaymentMethod?(e=a({},this._lookupPaymentMethod,{liabilityShiftPossible:this._lookupPaymentMethod.threeDSecureInfo.liabilityShiftPossible,liabilityShifted:this._lookupPaymentMethod.threeDSecureInfo.liabilityShifted,verificationDetails:this._lookupPaymentMethod.threeDSecureInfo.verificationDetails}),g.resolve(e)):g.reject(new r(m.THREEDS_NO_VERIFICATION_PAYLOAD)))},A.prototype._handleLookupResponse=function(e){var n,r=this,i=e.lookupResponse;e.onLookupComplete=e.onLookupComplete||function(e,t){t()},e.onLookupComplete(i,function(){var a=Boolean(i.lookup&&i.lookup.acsUrl);o.sendEvent(r._options.client,"three-d-secure.verification-flow.challenge-presented."+String(a)),a?r._usesSongbirdFlow()?t.Cardinal.continue("cca",{AcsUrl:i.lookup.acsUrl,Payload:i.lookup.pareq},{OrderDetails:{TransactionId:i.lookup.transactionId}}):e.addFrame(null,r._createIframe({showLoader:e.showLoader,response:i.lookup,removeFrame:e.removeFrame})):((n=r._formatAuthResponse(i.paymentMethod,i.threeDSecureInfo)).verificationDetails=i.threeDSecureInfo,r._verifyCardCallback(null,n))})},A.prototype._transformV1CustomerBillingAddress=function(e){return e.billingAddress.line1=e.billingAddress.streetAddress,e.billingAddress.line2=e.billingAddress.extendedAddress,e.billingAddress.city=e.billingAddress.locality,e.billingAddress.state=e.billingAddress.region,e.billingAddress.countryCode=e.billingAddress.countryCodeAlpha2,delete e.billingAddress.streetAddress,delete e.billingAddress.extendedAddress,delete e.billingAddress.locality,delete e.billingAddress.region,delete e.billingAddress.countryCodeAlpha2,e},A.prototype._transformBillingAddress=function(e,t){return t&&(e.billingLine1=t.streetAddress,e.billingLine2=t.extendedAddress,e.billingLine3=t.line3,e.billingCity=t.locality,e.billingState=t.region,e.billingPostalCode=t.postalCode,e.billingCountryCode=t.countryCodeAlpha2,e.billingPhoneNumber=t.phoneNumber,e.billingGivenName=t.givenName,e.billingSurname=t.surname),e},A.prototype._transformShippingAddress=function(e){var t=e.shippingAddress;return t&&(e.shippingLine1=t.streetAddress,e.shippingLine2=t.extendedAddress,e.shippingLine3=t.line3,e.shippingCity=t.locality,e.shippingState=t.region,e.shippingPostalCode=t.postalCode,e.shippingCountryCode=t.countryCodeAlpha2,delete e.shippingAddress),e},A.prototype._createIframe=function(e){var t,n,r=window.location.href,i=e.response;return this._bus=new p({channel:f(),merchantUrl:location.href}),n=this._assetsUrl+"/html/three-d-secure-authentication-complete-frame.html?channel="+encodeURIComponent(this._bus.channel)+"&",r.indexOf("#")>-1&&(r=r.split("#")[0]),this._bus.on(p.events.CONFIGURATION_REQUEST,function(e){e({acsUrl:i.acsUrl,pareq:i.pareq,termUrl:i.termUrl+"&three_d_secure_version="+T+"&authentication_complete_base_url="+encodeURIComponent(n),md:i.md,parentUrl:r})}),this._bus.on(_.AUTHENTICATION_COMPLETE,function(t){this._handleAuthResponse(t,e)}.bind(this)),t=this._assetsUrl+"/html/three-d-secure-bank-frame"+d(this._isDebug)+".html?showLoader="+e.showLoader,this._bankIframe=y({src:t,height:400,width:400,name:l.LANDING_FRAME_NAME+"_"+this._bus.channel,title:"3D Secure Authorization Frame"}),this._bankIframe},A.prototype._handleAuthResponse=function(e,t){var n=JSON.parse(e.auth_response);this._bus.teardown(),t.removeFrame(),h(function(){n.success?this._verifyCardCallback(null,this._formatAuthResponse(n.paymentMethod,n.threeDSecureInfo)):n.threeDSecureInfo&&n.threeDSecureInfo.liabilityShiftPossible?this._verifyCardCallback(null,this._formatAuthResponse(this._lookupPaymentMethod,n.threeDSecureInfo)):this._verifyCardCallback(new r({type:r.types.UNKNOWN,code:"UNKNOWN_AUTH_RESPONSE",message:n.error.message}))}.bind(this))()},A.prototype._formatAuthResponse=function(e,t){return{nonce:e.nonce,binData:e.binData,details:e.details,description:e.description&&e.description.replace(/\+/g," "),liabilityShifted:t&&t.liabilityShifted,liabilityShiftPossible:t&&t.liabilityShiftPossible,threeDSecureInfo:e.threeDSecureInfo}},A.prototype.teardown=function(){return u(this,c(A.prototype)),o.sendEvent(this._options.client,"three-d-secure.teardown-completed"),this._bus&&this._bus.teardown(),this._bankIframe&&this._bankIframe.parentNode&&this._bankIframe.parentNode.removeChild(this._bankIframe),t.Cardinal&&(t.Cardinal.off("payments.setupComplete"),t.Cardinal.off("payments.validated")),g.resolve()},A.prototype._usesSongbirdFlow=function(){return 2===this._options.version},A.prototype._createPaymentsSetupCompleteCallback=function(e,n){var r=this;return function(i){r._getDfReferenceIdResolveFunction?r._getDfReferenceIdResolveFunction(i.sessionId):r._getDfReferenceIdPromise=g.resolve(i.sessionId),t.clearTimeout(n),o.sendEvent(r._client,"three-d-secure.cardinal-sdk.init.setup-completed"),e()}},A.prototype._createPaymentsValidatedCallback=function(){var e=this;return function(t,n){var i="";switch(o.sendEvent(e._options.client,"three-d-secure.verification-flow.cardinal-sdk.action-code."+t.ActionCode.toLowerCase()),t.ActionCode){case"SUCCESS":case"NOACTION":case"FAILURE":e._performJWTValidation(n).then(function(t){e._verifyCardCallback(null,t)}).catch(function(t){e._verifyCardCallback(t)});break;case"ERROR":switch(t.ErrorNumber){case 10001:case 10002:i=new r(m.THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT);break;case 10003:case 10007:case 10009:i=new r(m.THREEDS_CARDINAL_SDK_RESPONSE_TIMEDOUT);break;case 10005:case 10006:i=new r(m.THREEDS_CARDINAL_SDK_BAD_CONFIG);break;case 10008:case 10010:i=new r(m.THREEDS_CARDINAL_SDK_BAD_JWT);break;case 10011:o.sendEvent(e._options.client,"three-d-secure.verification-flow.canceled"),i=new r(m.THREEDS_CARDINAL_SDK_CANCELED);break;case 10004:case 10012:default:i=new r(m.THREEDS_CARDINAL_SDK_ERROR)}i.details={originalError:{code:t.ErrorNumber,description:t.ErrorDescription}},e._verifyCardCallback?e._verifyCardCallback(i,null):e._verifyCardBlockingError=i}}},A.prototype._setupSongbird=function(e){var n=this,a=l.CARDINAL_SCRIPT_SOURCE.sandbox,c=this._client.getConfiguration().gatewayConfiguration.threeDSecure.cardinalAuthenticationJWT,u=Date.now();return e=e||{},new g(function(d,p){var f=t.setTimeout(function(){o.sendEvent(n._client,"three-d-secure.cardinal-sdk.init.setup-timeout"),p(new r(m.THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT))},e.timeout||v);e.isProduction&&(a=l.CARDINAL_SCRIPT_SOURCE.production),s.loadScript({src:a}).catch(function(e){return g.reject(i(e,m.THREEDS_CARDINAL_SDK_SCRIPT_LOAD_FAILED))}).then(function(r){n._cardinalScript=r,t.Cardinal.on("payments.setupComplete",n._createPaymentsSetupCompleteCallback(d,f)),e.loggingEnabled&&t.Cardinal.configure({logging:{level:"verbose"}}),t.Cardinal.setup("init",{jwt:c}),n._clientMetadata.cardinalDeviceDataCollectionTimeElapsed=Date.now()-u,t.Cardinal.on("payments.validated",n._createPaymentsValidatedCallback())}).catch(function(e){var r=i(e,{type:m.THREEDS_CARDINAL_SDK_SETUP_FAILED.type,code:m.THREEDS_CARDINAL_SDK_SETUP_FAILED.code,message:m.THREEDS_CARDINAL_SDK_SETUP_FAILED.message});n._getDfReferenceIdPromise?n._getDfReferenceIdRejectFunction(r):n._getDfReferenceIdError=r,t.clearTimeout(f),o.sendEvent(n._client,"three-d-secure.cardinal-sdk.init.setup-failed"),p(r)})})},A.prototype._getDfReferenceId=function(){return this._getDfReferenceIdError?g.reject(this._getDfReferenceIdError):(this._getDfReferenceIdPromise||(this._getDfReferenceIdPromise=new g(function(e,t){this._getDfReferenceIdResolveFunction=e,this._getDfReferenceIdRejectFunction=t}.bind(this))),this._getDfReferenceIdPromise)},A.prototype._performJWTValidation=function(e){var t=this._lookupPaymentMethod.nonce,n="payment_methods/"+t+"/three_d_secure/authenticate_from_jwt",i=this;return o.sendEvent(i._options.client,"three-d-secure.verification-flow.upgrade-payment-method.started"),this._client.request({method:"post",endpoint:n,data:{jwt:e,paymentMethodNonce:t}}).then(function(e){var t=e.paymentMethod||i._lookupPaymentMethod,n=i._formatAuthResponse(t,e.threeDSecureInfo);return o.sendEvent(i._options.client,"three-d-secure.verification-flow.upgrade-payment-method.succeeded"),g.resolve(n)}).catch(function(e){var t=new r({type:m.THREEDS_JWT_AUTHENTICATION_FAILED.type,code:m.THREEDS_JWT_AUTHENTICATION_FAILED.code,message:m.THREEDS_JWT_AUTHENTICATION_FAILED.message,details:{originalError:e}});return o.sendEvent(i._options.client,"three-d-secure.verification-flow.upgrade-payment-method.errored"),g.reject(t)})},n.exports=E.wrapPrototype(A)}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../lib/analytics":88,"../../lib/assets":89,"../../lib/assign":90,"../../lib/braintree-error":93,"../../lib/bus":96,"../../lib/constants":98,"../../lib/convert-methods-to-error":99,"../../lib/convert-to-braintree-error":100,"../../lib/deferred":104,"../../lib/methods":125,"../../lib/promise":127,"../../lib/use-min":129,"../../lib/vendor/uuid":131,"../shared/constants":154,"../shared/errors":155,"../shared/events":156,"@braintree/iframer":20,"@braintree/wrap-promise":27}],153:[function(e,t,n){"use strict";var r=e("./external/three-d-secure"),i=e("../lib/is-https").isHTTPS,o=e("../lib/basic-component-verification"),a=e("../lib/create-deferred-client"),s=e("../lib/create-assets-url"),c=e("../lib/braintree-error"),u=e("../lib/analytics"),l=e("./shared/errors"),d=e("../lib/promise"),p=e("@braintree/wrap-promise");t.exports={create:p(function(e){return o.verify({name:"3D Secure",client:e.client,authorization:e.authorization}).then(function(){return a.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:s.create(e.authorization),name:"3D Secure"})}).then(function(t){var n,o,a,s=t.getConfiguration(),p=s.gatewayConfiguration;return e.client=t,p.threeDSecureEnabled||(n=l.THREEDS_NOT_ENABLED),"TOKENIZATION_KEY"===s.authorizationType&&(n=l.THREEDS_CAN_NOT_USE_TOKENIZATION_KEY),(o="production"===p.environment)&&!i()&&(n=l.THREEDS_HTTPS_REQUIRED),2!==e.version||p.threeDSecure&&p.threeDSecure.cardinalAuthenticationJWT||(u.sendEvent(e.client,"three-d-secure.initialization.failed.missing-cardinalAuthenticationJWT"),n=l.THREEDS_NOT_ENABLED_FOR_V2),n?d.reject(new c(n)):(u.sendEvent(e.client,"three-d-secure.initialized"),a=new r(e),2===e.version&&a._setupSongbird({isProduction:o,loggingEnabled:e.loggingEnabled}),a)})}),VERSION:"3.50.1"}},{"../lib/analytics":88,"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/is-https":122,"../lib/promise":127,"./external/three-d-secure":152,"./shared/errors":155,"@braintree/wrap-promise":27}],154:[function(e,t,n){"use strict";t.exports={LANDING_FRAME_NAME:"braintreethreedsecurelanding",CARDINAL_SCRIPT_SOURCE:{production:"https://songbird.cardinalcommerce.com/cardinalcruise/v1/songbird.js",sandbox:"https://songbirdstag.cardinalcommerce.com/cardinalcruise/v1/songbird.js"}}},{}],155:[function(e,t,n){"use strict";var r=e("../../lib/braintree-error");t.exports={THREEDS_NOT_ENABLED:{type:r.types.MERCHANT,code:"THREEDS_NOT_ENABLED",message:"3D Secure is not enabled for this merchant."},THREEDS_CAN_NOT_USE_TOKENIZATION_KEY:{type:r.types.MERCHANT,code:"THREEDS_CAN_NOT_USE_TOKENIZATION_KEY",message:"3D Secure can not use a tokenization key for authorization."},THREEDS_HTTPS_REQUIRED:{type:r.types.MERCHANT,code:"THREEDS_HTTPS_REQUIRED",message:"3D Secure requires HTTPS."},THREEDS_NOT_ENABLED_FOR_V2:{type:r.types.MERCHANT,code:"THREEDS_NOT_ENABLED_FOR_V2",message:"3D Secure version 2 is not enabled for this merchant. Contact Braintree Support for assistance at https://help.braintreepayments.com/"},THREEDS_CARDINAL_SDK_SETUP_FAILED:{type:r.types.UNKNOWN,code:"THREEDS_CARDINAL_SDK_SETUP_FAILED",message:"Something went wrong setting up Cardinal's Songbird.js library."},THREEDS_CARDINAL_SDK_SCRIPT_LOAD_FAILED:{type:r.types.NETWORK,code:"THREEDS_CARDINAL_SDK_SCRIPT_LOAD_FAILED",message:"Cardinal's Songbird.js library could not be loaded."},THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT:{type:r.types.UNKNOWN,code:"THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT",message:"Cardinal's Songbird.js took too long to setup."},THREEDS_CARDINAL_SDK_RESPONSE_TIMEDOUT:{type:r.types.UNKNOWN,code:"THREEDS_CARDINAL_SDK_RESPONSE_TIMEDOUT",message:"Cardinal's API took too long to respond."},THREEDS_CARDINAL_SDK_BAD_CONFIG:{type:r.types.MERCHANT,code:"THREEDS_CARDINAL_SDK_BAD_CONFIG",message:"JWT or other required field missing. Please check your setup configuration."},THREEDS_CARDINAL_SDK_BAD_JWT:{type:r.types.MERCHANT,code:"THREEDS_CARDINAL_SDK_BAD_JWT",message:"Cardinal JWT missing or malformed. Please check your setup configuration."},THREEDS_CARDINAL_SDK_ERROR:{type:r.types.UNKNOWN,code:"THREEDS_CARDINAL_SDK_ERROR",message:"A general error has occurred with Cardinal. See description for more information."},THREEDS_CARDINAL_SDK_CANCELED:{type:r.types.CUSTOMER,code:"THREEDS_CARDINAL_SDK_CANCELED",message:"Canceled by user."},THREEDS_AUTHENTICATION_IN_PROGRESS:{type:r.types.MERCHANT,code:"THREEDS_AUTHENTICATION_IN_PROGRESS",message:"Cannot call verifyCard while existing authentication is in progress."},THREEDS_MISSING_VERIFY_CARD_OPTION:{type:r.types.MERCHANT,code:"THREEDS_MISSING_VERIFY_CARD_OPTION"},THREEDS_JWT_AUTHENTICATION_FAILED:{type:r.types.UNKNOWN,code:"THREEDS_JWT_AUTHENTICATION_FAILED",message:"Something went wrong authenticating the JWT from Cardinal"},THREEDS_LOOKUP_TOKENIZED_CARD_NOT_FOUND_ERROR:{type:r.types.MERCHANT,code:"THREEDS_LOOKUP_TOKENIZED_CARD_NOT_FOUND_ERROR",message:"Either the payment method nonce passed to `verifyCard` does not exist, or it was already consumed"},THREEDS_LOOKUP_VALIDATION_ERROR:{type:r.types.CUSTOMER,code:"THREEDS_LOOKUP_VALIDATION_ERROR",message:"The data passed in `verifyCard` did not pass validation checks. See details for more info"},THREEDS_LOOKUP_ERROR:{type:r.types.UNKNOWN,code:"THREEDS_LOOKUP_ERROR",message:"Something went wrong during the 3D Secure lookup"},THREEDS_NO_VERIFICATION_PAYLOAD:{type:r.types.MERCHANT,code:"THREEDS_NO_VERIFICATION_PAYLOAD",message:"No verification payload available."},THREEDS_METHOD_DEPRECATED:{type:r.types.MERCHANT,code:"THREEDS_METHOD_DEPRECATED"},THREEDS_TERM_URL_REQUIRES_BRAINTREE_DOMAIN:{type:r.types.INTERNAL,code:"THREEDS_TERM_URL_REQUIRES_BRAINTREE_DOMAIN",message:"Term Url must be on a Braintree domain."}}},{"../../lib/braintree-error":93}],156:[function(e,t,n){"use strict";var r=e("../../lib/enumerate");t.exports=r(["AUTHENTICATION_COMPLETE"],"threedsecure:")},{"../../lib/enumerate":106}],157:[function(e,t,n){"use strict";var r=e("./shared/unionpay"),i=e("../lib/basic-component-verification"),o=e("../lib/braintree-error"),a=e("../lib/create-deferred-client"),s=e("../lib/create-assets-url"),c=e("../lib/analytics"),u=e("./shared/errors"),l=e("../lib/promise"),d=e("@braintree/wrap-promise");t.exports={create:d(function(e){return i.verify({name:"UnionPay",client:e.client,authorization:e.authorization}).then(function(){return a.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:s.create(e.authorization),name:"UnionPay"})}).then(function(t){var n=t.getConfiguration();return e.client=t,n.gatewayConfiguration.unionPay&&!0===n.gatewayConfiguration.unionPay.enabled?(c.sendEvent(e.client,"unionpay.initialized"),new r(e)):l.reject(new o(u.UNIONPAY_NOT_ENABLED))})}),VERSION:"3.50.1"}},{"../lib/analytics":88,"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/promise":127,"./shared/errors":159,"./shared/unionpay":160,"@braintree/wrap-promise":27}],158:[function(e,t,n){"use strict";var r=e("../../lib/enumerate");t.exports={events:r(["HOSTED_FIELDS_FETCH_CAPABILITIES","HOSTED_FIELDS_ENROLL","HOSTED_FIELDS_TOKENIZE"],"union-pay:"),HOSTED_FIELDS_FRAME_NAME:"braintreeunionpayhostedfields"}},{"../../lib/enumerate":106}],159:[function(e,t,n){"use strict";var r=e("../../lib/braintree-error");t.exports={UNIONPAY_NOT_ENABLED:{type:r.types.MERCHANT,code:"UNIONPAY_NOT_ENABLED",message:"UnionPay is not enabled for this merchant."},UNIONPAY_HOSTED_FIELDS_INSTANCE_INVALID:{type:r.types.MERCHANT,code:"UNIONPAY_HOSTED_FIELDS_INSTANCE_INVALID",message:"Found an invalid Hosted Fields instance. Please use a valid Hosted Fields instance."},UNIONPAY_HOSTED_FIELDS_INSTANCE_REQUIRED:{type:r.types.MERCHANT,code:"UNIONPAY_HOSTED_FIELDS_INSTANCE_REQUIRED",message:"Could not find the Hosted Fields instance."},UNIONPAY_CARD_OR_HOSTED_FIELDS_INSTANCE_REQUIRED:{type:r.types.MERCHANT,code:"UNIONPAY_CARD_OR_HOSTED_FIELDS_INSTANCE_REQUIRED",message:"A card or a Hosted Fields instance is required. Please supply a card or a Hosted Fields instance."},UNIONPAY_CARD_AND_HOSTED_FIELDS_INSTANCES:{type:r.types.MERCHANT,code:"UNIONPAY_CARD_AND_HOSTED_FIELDS_INSTANCES",message:"Please supply either a card or a Hosted Fields instance, not both."},UNIONPAY_EXPIRATION_DATE_INCOMPLETE:{type:r.types.MERCHANT,code:"UNIONPAY_EXPIRATION_DATE_INCOMPLETE",message:"You must supply expiration month and year or neither."},UNIONPAY_ENROLLMENT_CUSTOMER_INPUT_INVALID:{type:r.types.CUSTOMER,code:"UNIONPAY_ENROLLMENT_CUSTOMER_INPUT_INVALID",message:"Enrollment failed due to user input error."},UNIONPAY_ENROLLMENT_NETWORK_ERROR:{type:r.types.NETWORK,code:"UNIONPAY_ENROLLMENT_NETWORK_ERROR",message:"Could not enroll UnionPay card."},UNIONPAY_FETCH_CAPABILITIES_NETWORK_ERROR:{type:r.types.NETWORK,code:"UNIONPAY_FETCH_CAPABILITIES_NETWORK_ERROR",message:"Could not fetch card capabilities."},UNIONPAY_TOKENIZATION_NETWORK_ERROR:{type:r.types.NETWORK,code:"UNIONPAY_TOKENIZATION_NETWORK_ERROR",message:"A tokenization network error occurred."},UNIONPAY_MISSING_MOBILE_PHONE_DATA:{type:r.types.MERCHANT,code:"UNIONPAY_MISSING_MOBILE_PHONE_DATA",message:"A `mobile` with `countryCode` and `number` is required."},UNIONPAY_FAILED_TOKENIZATION:{type:r.types.CUSTOMER,code:"UNIONPAY_FAILED_TOKENIZATION",message:"The supplied card data failed tokenization."}}},{"../../lib/braintree-error":93}],160:[function(e,t,n){"use strict";var r=e("../../lib/analytics"),i=e("../../lib/braintree-error"),o=e("../../lib/bus"),a=e("./constants"),s=e("../../lib/use-min"),c=e("../../lib/convert-methods-to-error"),u=e("./errors"),l=a.events,d=e("@braintree/iframer"),p=e("../../lib/methods"),f=e("../../lib/vendor/uuid"),h=e("../../lib/promise"),m=e("@braintree/wrap-promise");function _(e){this._options=e}_.prototype.fetchCapabilities=function(e){var t=this,n=this._options.client,o=e.card?e.card.number:null,a=e.hostedFields;return o&&a?h.reject(new i(u.UNIONPAY_CARD_AND_HOSTED_FIELDS_INSTANCES)):o?n.request({method:"get",endpoint:"payment_methods/credit_cards/capabilities",data:{_meta:{source:"unionpay"},creditCard:{number:o}}}).then(function(e){return r.sendEvent(n,"unionpay.capabilities-received"),e}).catch(function(e){var t=e.details&&e.details.httpStatus;return r.sendEvent(n,"unionpay.capabilities-failed"),403===t?h.reject(e):h.reject(new i({type:u.UNIONPAY_FETCH_CAPABILITIES_NETWORK_ERROR.type,code:u.UNIONPAY_FETCH_CAPABILITIES_NETWORK_ERROR.code,message:u.UNIONPAY_FETCH_CAPABILITIES_NETWORK_ERROR.message,details:{originalError:e}}))}):a?a._bus?t._initializeHostedFields().then(function(){return new h(function(e,n){t._bus.emit(l.HOSTED_FIELDS_FETCH_CAPABILITIES,{hostedFields:a},function(t){t.err?n(new i(t.err)):e(t.payload)})})}):h.reject(new i(u.UNIONPAY_HOSTED_FIELDS_INSTANCE_INVALID)):h.reject(new i(u.UNIONPAY_CARD_OR_HOSTED_FIELDS_INSTANCE_REQUIRED))},_.prototype.enroll=function(e){var t,n=this,o=this._options.client,a=e.card,s=e.mobile,c=e.hostedFields;if(!s)return h.reject(new i(u.UNIONPAY_MISSING_MOBILE_PHONE_DATA));if(c)return c._bus?a?h.reject(new i(u.UNIONPAY_CARD_AND_HOSTED_FIELDS_INSTANCES)):new h(function(e,t){n._initializeHostedFields().then(function(){n._bus.emit(l.HOSTED_FIELDS_ENROLL,{hostedFields:c,mobile:s},function(n){n.err?t(new i(n.err)):e(n.payload)})})}):h.reject(new i(u.UNIONPAY_HOSTED_FIELDS_INSTANCE_INVALID));if(a&&a.number){if(t={_meta:{source:"unionpay"},unionPayEnrollment:{number:a.number,mobileCountryCode:s.countryCode,mobileNumber:s.number}},a.expirationDate)t.unionPayEnrollment.expirationDate=a.expirationDate;else if(a.expirationMonth||a.expirationYear){if(!a.expirationMonth||!a.expirationYear)return h.reject(new i(u.UNIONPAY_EXPIRATION_DATE_INCOMPLETE));t.unionPayEnrollment.expirationYear=a.expirationYear,t.unionPayEnrollment.expirationMonth=a.expirationMonth}return o.request({method:"post",endpoint:"union_pay_enrollments",data:t}).then(function(e){return r.sendEvent(o,"unionpay.enrollment-succeeded"),{enrollmentId:e.unionPayEnrollmentId,smsCodeRequired:e.smsCodeRequired}}).catch(function(e){var t,n=e.details&&e.details.httpStatus;return 403===n?t=e:n<500?(t=new i(u.UNIONPAY_ENROLLMENT_CUSTOMER_INPUT_INVALID)).details={originalError:e}:(t=new i(u.UNIONPAY_ENROLLMENT_NETWORK_ERROR)).details={originalError:e},r.sendEvent(o,"unionpay.enrollment-failed"),h.reject(t)})}return h.reject(new i(u.UNIONPAY_CARD_OR_HOSTED_FIELDS_INSTANCE_REQUIRED))},_.prototype.tokenize=function(e){var t,n=this,o=this._options.client,a=e.card,s=e.hostedFields;return a&&s?h.reject(new i(u.UNIONPAY_CARD_AND_HOSTED_FIELDS_INSTANCES)):a?(t={_meta:{source:"unionpay"},creditCard:{number:e.card.number,options:{unionPayEnrollment:{id:e.enrollmentId}}}},e.smsCode&&(t.creditCard.options.unionPayEnrollment.smsCode=e.smsCode),a.expirationDate?t.creditCard.expirationDate=a.expirationDate:a.expirationMonth&&a.expirationYear&&(t.creditCard.expirationYear=a.expirationYear,t.creditCard.expirationMonth=a.expirationMonth),e.card.cvv&&(t.creditCard.cvv=e.card.cvv),o.request({method:"post",endpoint:"payment_methods/credit_cards",data:t}).then(function(e){var t=e.creditCards[0];return delete t.consumed,delete t.threeDSecureInfo,r.sendEvent(o,"unionpay.nonce-received"),t}).catch(function(e){var t,n=e.details&&e.details.httpStatus;return r.sendEvent(o,"unionpay.nonce-failed"),403===n?t=e:n<500?(t=new i(u.UNIONPAY_FAILED_TOKENIZATION)).details={originalError:e}:(t=new i(u.UNIONPAY_TOKENIZATION_NETWORK_ERROR)).details={originalError:e},h.reject(t)})):s?s._bus?new h(function(t,r){n._initializeHostedFields().then(function(){n._bus.emit(l.HOSTED_FIELDS_TOKENIZE,e,function(e){e.err?r(new i(e.err)):t(e.payload)})})}):h.reject(new i(u.UNIONPAY_HOSTED_FIELDS_INSTANCE_INVALID)):h.reject(new i(u.UNIONPAY_CARD_OR_HOSTED_FIELDS_INSTANCE_REQUIRED))},_.prototype.teardown=function(){return this._bus&&(this._hostedFieldsFrame.parentNode.removeChild(this._hostedFieldsFrame),this._bus.teardown()),c(this,p(_.prototype)),h.resolve()},_.prototype._initializeHostedFields=function(){var e,t,n=f(),r=this;return this._hostedFieldsInitializePromise?this._hostedFieldsInitializePromise:(this._hostedFieldsInitializePromise=new h(function(i){e=r._options.client.getConfiguration().gatewayConfiguration.assetsUrl,t=r._options.client.getConfiguration().isDebug,r._bus=new o({channel:n,merchantUrl:location.href}),r._hostedFieldsFrame=d({name:a.HOSTED_FIELDS_FRAME_NAME+"_"+n,src:e+"/web/3.50.1/html/unionpay-hosted-fields-frame"+s(t)+".html",height:0,width:0}),r._bus.on(o.events.CONFIGURATION_REQUEST,function(e){e(r._options.client),i()}),document.body.appendChild(r._hostedFieldsFrame)}),this._hostedFieldsInitializePromise)},t.exports=m.wrapPrototype(_)},{"../../lib/analytics":88,"../../lib/braintree-error":93,"../../lib/bus":96,"../../lib/convert-methods-to-error":99,"../../lib/methods":125,"../../lib/promise":127,"../../lib/use-min":129,"../../lib/vendor/uuid":131,"./constants":158,"./errors":159,"@braintree/iframer":20,"@braintree/wrap-promise":27}],161:[function(e,t,n){"use strict";t.exports={PLAID_LINK_JS:"https://cdn.plaid.com/link/v2/stable/link-initialize.js"}},{}],162:[function(e,t,n){"use strict";var r=e("../lib/braintree-error");t.exports={US_BANK_ACCOUNT_OPTION_REQUIRED:{type:r.types.MERCHANT,code:"US_BANK_ACCOUNT_OPTION_REQUIRED"},US_BANK_ACCOUNT_MUTUALLY_EXCLUSIVE_OPTIONS:{type:r.types.MERCHANT,code:"US_BANK_ACCOUNT_MUTUALLY_EXCLUSIVE_OPTIONS"},US_BANK_ACCOUNT_LOGIN_LOAD_FAILED:{type:r.types.NETWORK,code:"US_BANK_ACCOUNT_LOGIN_LOAD_FAILED",message:"Bank login flow failed to load."},US_BANK_ACCOUNT_LOGIN_CLOSED:{type:r.types.CUSTOMER,code:"US_BANK_ACCOUNT_LOGIN_CLOSED",message:"Customer closed bank login flow before authorizing."},US_BANK_ACCOUNT_LOGIN_REQUEST_ACTIVE:{type:r.types.MERCHANT,code:"US_BANK_ACCOUNT_LOGIN_REQUEST_ACTIVE",message:"Another bank login tokenization request is active."},US_BANK_ACCOUNT_TOKENIZATION_NETWORK_ERROR:{type:r.types.NETWORK,code:"US_BANK_ACCOUNT_TOKENIZATION_NETWORK_ERROR",message:"A tokenization network error occurred."},US_BANK_ACCOUNT_FAILED_TOKENIZATION:{type:r.types.CUSTOMER,code:"US_BANK_ACCOUNT_FAILED_TOKENIZATION",message:"The supplied data failed tokenization."},US_BANK_ACCOUNT_NOT_ENABLED:{type:r.types.MERCHANT,code:"US_BANK_ACCOUNT_NOT_ENABLED",message:"US bank account is not enabled."},US_BANK_ACCOUNT_BANK_LOGIN_NOT_ENABLED:{type:r.types.MERCHANT,code:"US_BANK_ACCOUNT_BANK_LOGIN_NOT_ENABLED",message:"Bank login is not enabled."}}},{"../lib/braintree-error":93}],163:[function(e,t,n){"use strict";var r=e("../lib/basic-component-verification"),i=e("../lib/braintree-error"),o=e("../lib/create-deferred-client"),a=e("../lib/create-assets-url"),s=e("./errors"),c=e("./us-bank-account"),u=e("../lib/promise"),l=e("@braintree/wrap-promise");t.exports={create:l(function(e){var t="US Bank Account";return r.verify({name:t,client:e.client,authorization:e.authorization}).then(function(){return o.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:a.create(e.authorization),name:t})}).then(function(t){return e.client=t,e.client.getConfiguration().gatewayConfiguration.usBankAccount?new c(e):u.reject(new i(s.US_BANK_ACCOUNT_NOT_ENABLED))})}),VERSION:"3.50.1"}},{"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/promise":127,"./errors":162,"./us-bank-account":164,"@braintree/wrap-promise":27}],164:[function(e,n,r){(function(t){"use strict";var r=e("../lib/braintree-error"),i=e("./constants"),o=e("./errors"),a=e("../lib/errors"),s=e("../lib/analytics"),c=e("../lib/once"),u=e("../lib/convert-methods-to-error"),l=e("../lib/methods"),d=e("../lib/promise"),p=e("@braintree/wrap-promise"),f=b("UsBankAccount"),h=b("UsBankLogin");function m(e){this._client=e.client,this._isTokenizingBankLogin=!1,s.sendEvent(this._client,"usbankaccount.initialized")}function _(e){var t,n=e.details&&e.details.httpStatus;return(t=new r(401===n?a.BRAINTREE_API_ACCESS_RESTRICTED:n<500?o.US_BANK_ACCOUNT_FAILED_TOKENIZATION:o.US_BANK_ACCOUNT_TOKENIZATION_NETWORK_ERROR)).details={originalError:e},t}function y(e,t){var n=e.data[t].paymentMethod,r=n.details.last4,i="US bank account ending in - "+r;return{nonce:n.id,details:{},description:i,type:"us_bank_account"}}function g(e,n){function i(){var r=this.readyState;r&&"loaded"!==r&&"complete"!==r||(e.removeEventListener("error",a),e.removeEventListener("load",i),e.removeEventListener("readystatechange",i),n(null,t.Plaid))}function a(){e.parentNode.removeChild(e),n(new r(o.US_BANK_ACCOUNT_LOGIN_LOAD_FAILED))}e.addEventListener("error",a),e.addEventListener("load",i),e.addEventListener("readystatechange",i)}function E(e){return{streetAddress:e.streetAddress,extendedAddress:e.extendedAddress,city:e.locality,state:e.region,zipCode:e.postalCode}}function v(e,t){"personal"===t.ownershipType?e.individualOwner={firstName:t.firstName,lastName:t.lastName}:"business"===t.ownershipType&&(e.businessOwner={businessName:t.businessName})}function b(e){return"mutation Tokenize"+e+"($input: Tokenize"+e+"Input!) { tokenize"+e+"(input: $input) { paymentMethod { id details { ... on UsBankAccountDetails { last4 } } } }}"}m.prototype.tokenize=function(e){return(e=e||{}).mandateText?e.bankDetails&&e.bankLogin?d.reject(new r({type:o.US_BANK_ACCOUNT_MUTUALLY_EXCLUSIVE_OPTIONS.type,code:o.US_BANK_ACCOUNT_MUTUALLY_EXCLUSIVE_OPTIONS.code,message:"tokenize must be called with bankDetails or bankLogin, not both."})):e.bankDetails?this._tokenizeBankDetails(e):e.bankLogin?this._tokenizeBankLogin(e):d.reject(new r({type:o.US_BANK_ACCOUNT_OPTION_REQUIRED.type,code:o.US_BANK_ACCOUNT_OPTION_REQUIRED.code,message:"tokenize must be called with bankDetails or bankLogin."})):d.reject(new r({type:o.US_BANK_ACCOUNT_OPTION_REQUIRED.type,code:o.US_BANK_ACCOUNT_OPTION_REQUIRED.code,message:"mandateText property is required."}))},m.prototype._tokenizeBankDetails=function(e){var t=this._client,n=e.bankDetails,r={achMandate:e.mandateText,routingNumber:n.routingNumber,accountNumber:n.accountNumber,accountType:n.accountType.toUpperCase(),billingAddress:E(n.billingAddress||{})};return v(r,n),t.request({api:"graphQLApi",data:{query:f,variables:{input:{usBankAccount:r}}}}).then(function(e){return s.sendEvent(t,"usbankaccount.bankdetails.tokenization.succeeded"),d.resolve(y(e,"tokenizeUsBankAccount"))}).catch(function(e){var n=_(e);return s.sendEvent(t,"usbankaccount.bankdetails.tokenization.failed"),d.reject(n)})},m.prototype._tokenizeBankLogin=function(e){var t=this,n=this._client,i=n.getConfiguration().gatewayConfiguration,a="production"===i.environment,c=i.usBankAccount.plaid;return e.bankLogin.displayName?c?this._isTokenizingBankLogin?d.reject(new r(o.US_BANK_ACCOUNT_LOGIN_REQUEST_ACTIVE)):(this._isTokenizingBankLogin=!0,new d(function(i,u){t._loadPlaid(function(l,d){l?u(l):(d.create({clientName:e.bankLogin.displayName,apiVersion:"v2",env:a?"production":"sandbox",key:c.publicKey,product:"auth",selectAccount:!0,onExit:function(){t._isTokenizingBankLogin=!1,s.sendEvent(n,"usbankaccount.banklogin.tokenization.closed.by-user"),u(new r(o.US_BANK_ACCOUNT_LOGIN_CLOSED))},onSuccess:function(r,o){var c=e.bankLogin,l={publicToken:r,accountId:a?o.account_id:"plaid_account_id",accountType:o.account.subtype.toUpperCase(),achMandate:e.mandateText,billingAddress:E(c.billingAddress||{})};v(l,c),n.request({api:"graphQLApi",data:{query:h,variables:{input:{usBankLogin:l}}}}).then(function(e){t._isTokenizingBankLogin=!1,s.sendEvent(n,"usbankaccount.banklogin.tokenization.succeeded"),i(y(e,"tokenizeUsBankLogin"))}).catch(function(e){var r;t._isTokenizingBankLogin=!1,r=_(e),s.sendEvent(n,"usbankaccount.banklogin.tokenization.failed"),u(r)})}}).open(),s.sendEvent(n,"usbankaccount.banklogin.tokenization.started"))})})):d.reject(new r(o.US_BANK_ACCOUNT_BANK_LOGIN_NOT_ENABLED)):d.reject(new r({type:o.US_BANK_ACCOUNT_OPTION_REQUIRED.type,code:o.US_BANK_ACCOUNT_OPTION_REQUIRED.code,message:"displayName property is required when using bankLogin."}))},m.prototype._loadPlaid=function(e){var n,r;e=c(e),t.Plaid?e(null,t.Plaid):(n=document.querySelector('script[src="'+i.PLAID_LINK_JS+'"]'))?g(n,e):((r=document.createElement("script")).src=i.PLAID_LINK_JS,r.async=!0,g(r,e),document.body.appendChild(r),this._plaidScript=r)},m.prototype.teardown=function(){return this._plaidScript&&document.body.removeChild(this._plaidScript),u(this,l(m.prototype)),d.resolve()},n.exports=p.wrapPrototype(m)}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../lib/analytics":88,"../lib/braintree-error":93,"../lib/convert-methods-to-error":99,"../lib/errors":107,"../lib/methods":125,"../lib/once":126,"../lib/promise":127,"./constants":161,"./errors":162,"@braintree/wrap-promise":27}],165:[function(e,t,n){"use strict";var r=e("../lib/braintree-error");t.exports={VAULT_MANAGER_DELETE_PAYMENT_METHOD_NONCE_REQUIRES_CLIENT_TOKEN:{type:r.types.MERCHANT,code:"VAULT_MANAGER_DELETE_PAYMENT_METHOD_NONCE_REQUIRES_CLIENT_TOKEN",message:"A client token with a customer id must be used to delete a payment method nonce."},VAULT_MANAGER_PAYMENT_METHOD_NONCE_NOT_FOUND:{type:r.types.MERCHANT,code:"VAULT_MANAGER_PAYMENT_METHOD_NONCE_NOT_FOUND"},VAULT_MANAGER_DELETE_PAYMENT_METHOD_UNKNOWN_ERROR:{type:r.types.UNKNOWN,code:"VAULT_MANAGER_DELETE_PAYMENT_METHOD_UNKNOWN_ERROR"}}},{"../lib/braintree-error":93}],166:[function(e,t,n){"use strict";var r=e("../lib/basic-component-verification"),i=e("../lib/create-deferred-client"),o=e("../lib/create-assets-url"),a=e("./vault-manager"),s=e("@braintree/wrap-promise");t.exports={create:s(function(e){var t="Vault Manager";return r.verify({name:t,client:e.client,authorization:e.authorization}).then(function(){return i.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:o.create(e.authorization),name:t})}).then(function(t){return e.client=t,new a(e)})}),VERSION:"3.50.1"}},{"../lib/basic-component-verification":91,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"./vault-manager":167,"@braintree/wrap-promise":27}],167:[function(e,t,n){"use strict";var r=e("../lib/analytics"),i=e("../lib/braintree-error"),o=e("./errors"),a=e("../lib/convert-methods-to-error"),s=e("../lib/methods"),c=e("../lib/promise"),u=e("@braintree/wrap-promise");function l(e){this._client=e.client}function d(e){var t={nonce:e.nonce,default:e.default,details:e.details,hasSubscription:e.hasSubscription,type:e.type};return e.description&&(t.description=e.description),e.binData&&(t.binData=e.binData),t}l.prototype.fetchPaymentMethods=function(e){var t;return t=!0===(e=e||{}).defaultFirst?1:0,this._client.request({endpoint:"payment_methods",method:"get",data:{defaultFirst:t}}).then(function(e){return r.sendEvent(this._client,"vault-manager.fetch-payment-methods.succeeded"),e.paymentMethods.map(d)}.bind(this))},l.prototype.deletePaymentMethod=function(e){var t=this._client,n="CLIENT_TOKEN"===this._client.getConfiguration().authorizationType;return n?this._client.request({api:"graphQLApi",data:{query:"mutation DeletePaymentMethodFromSingleUseToken($input: DeletePaymentMethodFromSingleUseTokenInput!) { deletePaymentMethodFromSingleUseToken(input: $input) { clientMutationId }}",variables:{input:{singleUseTokenId:e}},operationName:"DeletePaymentMethodFromSingleUseToken"}}).then(function(){r.sendEvent(t,"vault-manager.delete-payment-method.succeeded")}).catch(function(n){var a,s=n.details.originalError;return r.sendEvent(t,"vault-manager.delete-payment-method.failed"),s[0]&&"NOT_FOUND"===s[0].extensions.errorClass&&(a=new i({type:o.VAULT_MANAGER_PAYMENT_METHOD_NONCE_NOT_FOUND.type,code:o.VAULT_MANAGER_PAYMENT_METHOD_NONCE_NOT_FOUND.code,message:"A payment method for payment method nonce `"+e+"` could not be found.",details:{originalError:s}})),a||(a=new i({type:o.VAULT_MANAGER_DELETE_PAYMENT_METHOD_UNKNOWN_ERROR.type,code:o.VAULT_MANAGER_DELETE_PAYMENT_METHOD_UNKNOWN_ERROR.code,message:"An unknown error occured when attempting to delete the payment method assocaited with the payment method nonce `"+e+"`.",details:{originalError:s}})),c.reject(a)}):c.reject(new i(o.VAULT_MANAGER_DELETE_PAYMENT_METHOD_NONCE_REQUIRES_CLIENT_TOKEN))},l.prototype.teardown=function(){return a(this,s(l.prototype)),c.resolve()},t.exports=u.wrapPrototype(l)},{"../lib/analytics":88,"../lib/braintree-error":93,"../lib/convert-methods-to-error":99,"../lib/methods":125,"../lib/promise":127,"./errors":165,"@braintree/wrap-promise":27}],168:[function(e,t,n){"use strict";var r=e("../lib/analytics"),i=e("../lib/basic-component-verification"),o=e("../lib/create-deferred-client"),a=e("../lib/create-assets-url"),s=e("./shared/errors"),c=e("@braintree/wrap-promise"),u=e("../lib/braintree-error"),l=e("./venmo"),d=e("../lib/promise"),p=e("./shared/supports-venmo");t.exports={create:c(function(e){return i.verify({name:"Venmo",client:e.client,authorization:e.authorization}).then(function(){return o.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:a.create(e.authorization),name:"Venmo"})}).then(function(t){var n,i=t.getConfiguration();return e.client=t,i.gatewayConfiguration.payWithVenmo?e.profileId&&"string"!==typeof e.profileId?d.reject(new u(s.VENMO_INVALID_PROFILE_ID)):e.deepLinkReturnUrl&&"string"!==typeof e.deepLinkReturnUrl?d.reject(new u(s.VENMO_INVALID_DEEP_LINK_RETURN_URL)):(n=new l(e),r.sendEvent(e.client,"venmo.initialized"),n._initialize()):d.reject(new u(s.VENMO_NOT_ENABLED))})}),isBrowserSupported:function(e){return p.isBrowserSupported(e)},VERSION:"3.50.1"}},{"../lib/analytics":88,"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/promise":127,"./shared/errors":171,"./shared/supports-venmo":172,"./venmo":173,"@braintree/wrap-promise":27}],169:[function(e,t,n){"use strict";var r=e("@braintree/browser-detection/is-android"),i=e("@braintree/browser-detection/is-chrome"),o=e("@braintree/browser-detection/is-ios"),a=e("@braintree/browser-detection/is-ios-safari"),s=e("@braintree/browser-detection/is-samsung"),c=e("@braintree/browser-detection/is-mobile-firefox");t.exports={isAndroid:r,isChrome:i,isIos:o,isIosSafari:a,isSamsungBrowser:s,isMobileFirefox:c}},{"@braintree/browser-detection/is-android":3,"@braintree/browser-detection/is-chrome":5,"@braintree/browser-detection/is-ios":14,"@braintree/browser-detection/is-ios-safari":11,"@braintree/browser-detection/is-mobile-firefox":15,"@braintree/browser-detection/is-samsung":16}],170:[function(e,t,n){"use strict";t.exports={DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY:500,PROCESS_RESULTS_DELAY:1e3,VENMO_OPEN_URL:"https://venmo.com/braintree/checkout"}},{}],171:[function(e,t,n){"use strict";var r=e("../../lib/braintree-error");t.exports={VENMO_NOT_ENABLED:{type:r.types.MERCHANT,code:"VENMO_NOT_ENABLED",message:"Venmo is not enabled for this merchant."},VENMO_TOKENIZATION_REQUEST_ACTIVE:{type:r.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_ACTIVE",message:"Another tokenization request is active."},VENMO_APP_FAILED:{type:r.types.UNKNOWN,code:"VENMO_APP_FAILED",message:"Venmo app encountered a problem."},VENMO_APP_CANCELED:{type:r.types.CUSTOMER,code:"VENMO_APP_CANCELED",message:"Venmo app authorization was canceled."},VENMO_CANCELED:{type:r.types.CUSTOMER,code:"VENMO_CANCELED",message:"User canceled Venmo authorization, or Venmo app is not available."},VENMO_INVALID_PROFILE_ID:{type:r.types.MERCHANT,code:"VENMO_INVALID_PROFILE_ID",message:"Venmo profile ID is invalid."},VENMO_INVALID_DEEP_LINK_RETURN_URL:{type:r.types.MERCHANT,code:"VENMO_INVALID_DEEP_LINK_RETURN_URL",message:"Venmo deep link return URL is invalid."}}},{"../../lib/braintree-error":93}],172:[function(e,t,n){"use strict";var r=e("./browser-detection");t.exports={isBrowserSupported:function(e){var t=r.isAndroid()&&r.isChrome(),n=r.isIos()&&r.isChrome(),i=r.isIosSafari()||t,o=n||r.isSamsungBrowser()||r.isMobileFirefox();return e=e||{allowNewBrowserTab:!0},i||e.allowNewBrowserTab&&o}}},{"./browser-detection":169}],173:[function(e,n,r){(function(t){"use strict";var r=e("../lib/analytics"),i=e("./shared/supports-venmo"),o=e("./shared/constants"),a=e("./shared/errors"),s=e("../lib/querystring"),c=e("../lib/methods"),u=e("../lib/convert-methods-to-error"),l=e("@braintree/wrap-promise"),d=e("../lib/braintree-error"),p=e("../lib/promise"),f="3.50.1";function h(e){var t;this._client=e.client,t=this._client.getConfiguration(),this._isDebug=t.isDebug,this._assetsUrl=t.gatewayConfiguration.assetsUrl+"/web/"+f,this._allowNewBrowserTab=!1!==e.allowNewBrowserTab,this._profileId=e.profileId,this._deepLinkReturnUrl=e.deepLinkReturnUrl}function m(){var e=t.location.hash.substring(1).split("&");return e.reduce(function(e,t){var n=t.split("="),r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]);return e[r]=i,e},{})}function _(){var e;return"undefined"!==typeof t.document.hidden?e="visibilitychange":"undefined"!==typeof t.document.msHidden?e="msvisibilitychange":"undefined"!==typeof t.document.webkitHidden&&(e="webkitvisibilitychange"),e}h.prototype._initialize=function(){var e={},n=this._deepLinkReturnUrl||t.location.href.replace(t.location.hash,""),r=this._client.getConfiguration(),i=r.gatewayConfiguration.payWithVenmo,a=this._client.getConfiguration().analyticsMetadata,c={_meta:{version:a.sdkVersion,integration:a.integration,platform:a.platform,sessionId:a.sessionId}};return e["x-success"]=n+"#venmoSuccess=1",e["x-cancel"]=n+"#venmoCancel=1",e["x-error"]=n+"#venmoError=1",e.ua=t.navigator.userAgent,e.braintree_merchant_id=this._profileId||i.merchantId,e.braintree_access_token=i.accessToken,e.braintree_environment=i.environment,e.braintree_sdk_data=btoa(JSON.stringify(c)),this._url=o.VENMO_OPEN_URL+"?"+s.stringify(e),p.resolve(this)},h.prototype.isBrowserSupported=function(){return i.isBrowserSupported({allowNewBrowserTab:this._allowNewBrowserTab})},h.prototype.hasTokenizationResult=function(){var e=m();return"undefined"!==typeof(e.venmoSuccess||e.venmoError||e.venmoCancel)},h.prototype.tokenize=function(){var e=this;return!0===this._tokenizationInProgress?p.reject(new d(a.VENMO_TOKENIZATION_REQUEST_ACTIVE)):this.hasTokenizationResult()?this._processResults():new p(function(n,r){e._tokenizationInProgress=!0,e._previousHash=t.location.hash,e._deepLinkReturnUrl?t.location=e._url:t.open(e._url),e._visibilityChangeListener=function(){t.document.hidden||(e._tokenizationInProgress=!1,setTimeout(function(){e._processResults().then(n).catch(r).then(function(){t.location.hash=e._previousHash,e._removeVisibilityEventListener(),delete e._visibilityChangeListener})},o.PROCESS_RESULTS_DELAY))},setTimeout(function(){t.document.addEventListener(_(),e._visibilityChangeListener)},o.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY)})},h.prototype.teardown=function(){return this._removeVisibilityEventListener(),u(this,c(h.prototype)),p.resolve()},h.prototype._removeVisibilityEventListener=function(){t.document.removeEventListener(_(),this._visibilityChangeListener)},h.prototype._processResults=function(){var e=this,n=m();return new p(function(i,o){var s;n.venmoSuccess?(r.sendEvent(e._client,"venmo.appswitch.handle.success"),i({nonce:(s=n).paymentMethodNonce,type:"VenmoAccount",details:{username:s.username}})):n.venmoError?(r.sendEvent(e._client,"venmo.appswitch.handle.error"),o(new d({type:a.VENMO_APP_FAILED.type,code:a.VENMO_APP_FAILED.code,message:a.VENMO_APP_FAILED.message,details:{originalError:{message:decodeURIComponent(n.errorMessage),code:n.errorCode}}}))):n.venmoCancel?(r.sendEvent(e._client,"venmo.appswitch.handle.cancel"),o(new d(a.VENMO_APP_CANCELED))):(r.sendEvent(e._client,"venmo.appswitch.cancel-or-unavailable"),o(new d(a.VENMO_CANCELED))),"function"===typeof t.history.replaceState&&t.location.hash&&history.pushState({},"",t.location.href.slice(0,t.location.href.indexOf("#")))})},n.exports=l.wrapPrototype(h)}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../lib/analytics":88,"../lib/braintree-error":93,"../lib/convert-methods-to-error":99,"../lib/methods":125,"../lib/promise":127,"../lib/querystring":128,"./shared/constants":170,"./shared/errors":171,"./shared/supports-venmo":172,"@braintree/wrap-promise":27}],174:[function(e,t,n){"use strict";var r=e("../lib/braintree-error");t.exports={VISA_CHECKOUT_NOT_ENABLED:{type:r.types.MERCHANT,code:"VISA_CHECKOUT_NOT_ENABLED",message:"Visa Checkout is not enabled for this merchant."},VISA_CHECKOUT_INIT_OPTIONS_REQUIRED:{type:r.types.MERCHANT,code:"VISA_CHECKOUT_INIT_OPTIONS_REQUIRED",message:"initOptions requires an object."},VISA_CHECKOUT_PAYMENT_REQUIRED:{type:r.types.MERCHANT,code:"VISA_CHECKOUT_PAYMENT_REQUIRED",message:"tokenize requires callid, encKey, and encPaymentData."},VISA_CHECKOUT_TOKENIZATION:{type:r.types.NETWORK,code:"VISA_CHECKOUT_TOKENIZATION",message:"A network error occurred when processing the Visa Checkout payment."}}},{"../lib/braintree-error":93}],175:[function(e,t,n){"use strict";var r=e("../lib/basic-component-verification"),i=e("../lib/braintree-error"),o=e("../lib/create-deferred-client"),a=e("../lib/create-assets-url"),s=e("./visa-checkout"),c=e("../lib/analytics"),u=e("./errors"),l=e("../lib/promise"),d=e("@braintree/wrap-promise");t.exports={create:d(function(e){var t="Visa Checkout";return r.verify({name:t,client:e.client,authorization:e.authorization}).then(function(){return o.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:a.create(e.authorization),name:t})}).then(function(t){return e.client=t,e.client.getConfiguration().gatewayConfiguration.visaCheckout?(c.sendEvent(e.client,"visacheckout.initialized"),new s(e)):l.reject(new i(u.VISA_CHECKOUT_NOT_ENABLED))})}),VERSION:"3.50.1"}},{"../lib/analytics":88,"../lib/basic-component-verification":91,"../lib/braintree-error":93,"../lib/create-assets-url":101,"../lib/create-deferred-client":103,"../lib/promise":127,"./errors":174,"./visa-checkout":176,"@braintree/wrap-promise":27}],176:[function(e,t,n){"use strict";var r=e("../lib/braintree-error"),i=e("../lib/analytics"),o=e("./errors"),a=e("../lib/json-clone"),s=e("../lib/methods"),c=e("../lib/convert-methods-to-error"),u=e("../lib/promise"),l=e("@braintree/wrap-promise"),d={Visa:"VISA",MasterCard:"MASTERCARD",Discover:"DISCOVER","American Express":"AMEX"};function p(e){this._client=e.client}p.prototype.createInitOptions=function(e){var t,n=this._client.getConfiguration().gatewayConfiguration,i=n.visaCheckout;if(!e)throw new r(o.VISA_CHECKOUT_INIT_OPTIONS_REQUIRED);return(t=a(e)).apikey=t.apikey||i.apikey,t.externalClientId=t.externalClientId||i.externalClientId,t.settings=t.settings||{},t.settings.dataLevel="FULL",t.settings.payment=t.settings.payment||{},t.settings.payment.cardBrands||(t.settings.payment.cardBrands=n.visaCheckout.supportedCardTypes.reduce(function(e,t){return d.hasOwnProperty(t)?e.concat(d[t]):e},[])),t},p.prototype.tokenize=function(e){var t=this;return e.callid&&e.encKey&&e.encPaymentData?this._client.request({method:"post",endpoint:"payment_methods/visa_checkout_cards",data:{_meta:{source:"visa-checkout"},visaCheckoutCard:{callId:e.callid,encryptedPaymentData:e.encPaymentData,encryptedKey:e.encKey}}}).then(function(e){return i.sendEvent(t._client,"visacheckout.tokenize.succeeded"),e.visaCheckoutCards[0]}).catch(function(e){return i.sendEvent(t._client,"visacheckout.tokenize.failed"),u.reject(new r({type:o.VISA_CHECKOUT_TOKENIZATION.type,code:o.VISA_CHECKOUT_TOKENIZATION.code,message:o.VISA_CHECKOUT_TOKENIZATION.message,details:{originalError:e}}))}):u.reject(new r(o.VISA_CHECKOUT_PAYMENT_REQUIRED))},p.prototype.teardown=function(){return c(this,s(p.prototype)),u.resolve()},t.exports=l.wrapPrototype(p)},{"../lib/analytics":88,"../lib/braintree-error":93,"../lib/convert-methods-to-error":99,"../lib/json-clone":124,"../lib/methods":125,"../lib/promise":127,"./errors":174,"@braintree/wrap-promise":27}]},{},[86])(86)}).call(this,n(7),n(48).setImmediate)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=n(56),o=n(14);function a(e){return JSON.stringify(e,_({normalize:!1}))}function s(e){return JSON.parse(e)}t.serialize=a,t.deserialize=s,t.clone=function(e){return s(a(e))},t.fill=function(e,t,n){if(t in e&&!e[t].__sentry__){var r=e[t],i=n(r);"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:r},__sentry_wrapped__:{enumerable:!1,value:i}})),e[t]=i}},t.urlEncode=function(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")};var c=3,u=102400,l=40;function d(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}function p(e){var t=Object.prototype.toString.call(e);if("string"===typeof e)return o.truncate(e,40);if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=h(e);return r.isPrimitive(n)?""+n:t}function f(e,t){if(0===t)return p(e);if(r.isPlainObject(e)){var n={},i=e;return Object.keys(i).forEach(function(e){n[e]=f(i[e],t-1)}),n}return r.isArray(e)?e.map(function(e){return f(e,t-1)}):p(e)}function h(t,n){return"domain"===n&&"object"===typeof t&&t._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":"undefined"!==typeof e&&t===e?"[Global]":"undefined"!==typeof window&&t===window?"[Window]":"undefined"!==typeof document&&t===document?"[Document]":"undefined"!==typeof Event&&t instanceof Event?Object.getPrototypeOf(t)?t.constructor.name:"Event":r.isSyntheticEvent(t)?"[SyntheticEvent]":r.isNaN(t)?"[NaN]":r.isUndefined(t)?"[undefined]":"function"===typeof t?"[Function: "+(t.name||"")+"]":t}function m(e,t,n){if(void 0===t&&(t=1/0),void 0===n&&(n=new i.Memo),0===t)return p(e);var o=h(e);if(r.isPrimitive(o))return o;var a=r.isError(e)?function(e){var t={message:e.message,name:e.name,stack:e.stack};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}(e):e,s=r.isArray(e)?[]:{};if(n.memoize(e))return"[Circular ~]";for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=m(a[c],t-1,n));return n.unmemoize(e),s}function _(e){return void 0===e&&(e={normalize:!0}),function(t,n){return e.normalize?h(m(n,e.depth),t):m(n,e.depth)}}t.serializeObject=f,t.limitObjectDepthToSize=function e(t,n,r){void 0===n&&(n=c),void 0===r&&(r=u);var i=f(t,n);return d(a(i))>r?e(t,n-1):i},t.serializeKeysToEventMessage=function(e,t){if(void 0===t&&(t=l),!e.length)return"[object has no keys]";if(e[0].length>=t)return o.truncate(e[0],t);for(var n=e.length;n>0;n--){var r=e.slice(0,n).join(", ");if(!(r.length>t))return n===e.length?r:o.truncate(r,t)}return""},t.assign=function(e){for(var t=[],n=1;n=200&&t<300?e.Success:429===t?e.RateLimit:t>=400&&t<500?e.Invalid:t>=500?e.Failed:e.Unknown}}(t.Status||(t.Status={}))});s(u);var l=u.Severity,d=u.Status,p=c(function(e,t){function n(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isError=function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},t.isErrorEvent=function(e){return"[object ErrorEvent]"===Object.prototype.toString.call(e)},t.isDOMError=function(e){return"[object DOMError]"===Object.prototype.toString.call(e)},t.isDOMException=function(e){return"[object DOMException]"===Object.prototype.toString.call(e)},t.isUndefined=function(e){return void 0===e},t.isFunction=function(e){return"function"===typeof e},t.isString=function(e){return"[object String]"===Object.prototype.toString.call(e)},t.isPrimitive=function(e){return null===e||"object"!==typeof e&&"function"!==typeof e},t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.isPlainObject=n,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isNaN=function(e){return e!==e},t.isSyntheticEvent=function(e){return n(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}});s(p);var f=p.isError,h=p.isErrorEvent,m=p.isDOMError,_=p.isDOMException,y=p.isUndefined,g=p.isFunction,E=p.isString,v=(p.isPrimitive,p.isArray,p.isPlainObject),b=(p.isRegExp,p.isNaN,p.isSyntheticEvent,c(function(e,t){function n(){return"[object process]"===Object.prototype.toString.call("undefined"!==typeof r?r:0)}Object.defineProperty(t,"__esModule",{value:!0}),t.dynamicRequire=function(e,t){return e.require(t)},t.isNodeEnv=n;var i={};function o(){return n()?a:"undefined"!==typeof window?window:"undefined"!==typeof self?self:i}function s(e){var t,n,r,i,o,a=[];if(!e||!e.tagName)return"";if(a.push(e.tagName.toLowerCase()),e.id&&a.push("#"+e.id),(t=e.className)&&p.isString(t))for(n=t.split(/\s+/),o=0;o ".length;n&&i++<5&&!("html"===(t=s(n))||i>1&&o+r.length*a+t.length>=80);)r.push(t),o+=t.length,n=n.parentNode;return r.reverse().join(" > ")},t.htmlElementAsString=s,t.parseUrl=function(e){if(!e)return{};var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}},t.getEventDescription=function(e){if(e.message)return e.message;if(e.exception&&e.exception.values&&e.exception.values[0]){var t=e.exception.values[0];return t.type&&t.value?t.type+": "+t.value:t.type||t.value||e.event_id||""}return e.event_id||""},t.consoleSandbox=function(e){var t=o();if(!("console"in t))return e();var n=t.console,r={};["debug","info","warn","error","log"].forEach(function(e){e in t.console&&n[e].__sentry__&&(r[e]=n[e].__sentry_wrapped__,n[e]=n[e].__sentry_original__)});var i=e();return Object.keys(r).forEach(function(e){n[e]=r[e]}),i}}));s(b);b.dynamicRequire,b.isNodeEnv;var T=b.getGlobalObject,A=(b.uuid4,b.htmlTreeAsString),I=(b.htmlElementAsString,b.parseUrl),N=b.getEventDescription,O=(b.consoleSandbox,c(function(e,t){function n(){if(!("fetch"in b.getGlobalObject()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}Object.defineProperty(t,"__esModule",{value:!0}),t.supportsErrorEvent=function(){try{return new ErrorEvent(""),!0}catch(e){return!1}},t.supportsDOMError=function(){try{return new DOMError(""),!0}catch(e){return!1}},t.supportsDOMException=function(){try{return new DOMException(""),!0}catch(e){return!1}},t.supportsFetch=n,t.supportsNativeFetch=function(){return!!n()&&-1!==b.getGlobalObject().fetch.toString().indexOf("native")},t.supportsReportingObserver=function(){return"ReportingObserver"in b.getGlobalObject()},t.supportsReferrerPolicy=function(){if(!n())return!1;try{return new Request("pickleRick",{referrerPolicy:"origin"}),!0}catch(e){return!1}},t.supportsHistory=function(){var e=b.getGlobalObject(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}}));s(O);O.supportsErrorEvent,O.supportsDOMError,O.supportsDOMException;var w=O.supportsFetch,S=O.supportsNativeFetch,C=O.supportsReportingObserver,P=O.supportsReferrerPolicy,R=O.supportsHistory,D=c(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.hasWeakSet="function"===typeof WeakSet,this.inner=this.hasWeakSet?new WeakSet:[]}return e.prototype.memoize=function(e){if(this.hasWeakSet)return!!this.inner.has(e)||(this.inner.add(e),!1);for(var t=0;tr&&(t=r);var i=Math.max(t-60,0);i<5&&(i=0);var o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n="'{snip} "+n),oe.length)&&-1!==e.indexOf(t)}});s(k);var L=k.truncate,x=(k.snipLine,k.safeJoin),M=k.includes,U=c(function(e,t){function n(e){return JSON.stringify(e,h({normalize:!1}))}function r(e){return JSON.parse(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=n,t.deserialize=r,t.clone=function(e){return r(n(e))},t.fill=function(e,t,n){if(t in e&&!e[t].__sentry__){var r=e[t],i=n(r);"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:r},__sentry_wrapped__:{enumerable:!1,value:i}})),e[t]=i}},t.urlEncode=function(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")};var i=3,o=102400,s=40;function c(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}function u(e){var t=Object.prototype.toString.call(e);if("string"===typeof e)return k.truncate(e,40);if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=d(e);return p.isPrimitive(n)?""+n:t}function l(e,t){if(0===t)return u(e);if(p.isPlainObject(e)){var n={},r=e;return Object.keys(r).forEach(function(e){n[e]=l(r[e],t-1)}),n}return p.isArray(e)?e.map(function(e){return l(e,t-1)}):u(e)}function d(e,t){return"domain"===t&&"object"===typeof e&&e._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!==typeof a&&e===a?"[Global]":"undefined"!==typeof window&&e===window?"[Window]":"undefined"!==typeof document&&e===document?"[Document]":"undefined"!==typeof Event&&e instanceof Event?Object.getPrototypeOf(e)?e.constructor.name:"Event":p.isSyntheticEvent(e)?"[SyntheticEvent]":p.isNaN(e)?"[NaN]":p.isUndefined(e)?"[undefined]":"function"===typeof e?"[Function: "+(e.name||"")+"]":e}function f(e,t,n){if(void 0===t&&(t=1/0),void 0===n&&(n=new D.Memo),0===t)return u(e);var r=d(e);if(p.isPrimitive(r))return r;var i=p.isError(e)?function(e){var t={message:e.message,name:e.name,stack:e.stack};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}(e):e,o=p.isArray(e)?[]:{};if(n.memoize(e))return"[Circular ~]";for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[a]=f(i[a],t-1,n));return n.unmemoize(e),o}function h(e){return void 0===e&&(e={normalize:!0}),function(t,n){return e.normalize?d(f(n,e.depth),t):f(n,e.depth)}}t.serializeObject=l,t.limitObjectDepthToSize=function e(t,r,a){void 0===r&&(r=i),void 0===a&&(a=o);var s=l(t,r);return c(n(s))>a?e(t,r-1):s},t.serializeKeysToEventMessage=function(e,t){if(void 0===t&&(t=s),!e.length)return"[object has no keys]";if(e[0].length>=t)return k.truncate(e[0],t);for(var n=e.length;n>0;n--){var r=e.slice(0,n).join(", ");if(!(r.length>t))return n===e.length?r:k.truncate(r,t)}return""},t.assign=function(e){for(var t=[],n=1;n>16)+(t>>16)+(n>>16)<<16|65535&n}function K(e,t,n,r,i,o){return B((a=B(B(t,e),B(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function W(e,t,n,r,i,o,a){return K(t&n|~t&r,e,t,i,o,a)}function G(e,t,n,r,i,o,a){return K(t&r|n&~r,e,t,i,o,a)}function Q(e,t,n,r,i,o,a){return K(t^n^r,e,t,i,o,a)}function q(e,t,n,r,i,o,a){return K(n^(t|~r),e,t,i,o,a)}function $(e,t){var n,r,i,o,a;e[t>>5]|=128<>>9<<4)]=t;var s=1732584193,c=-271733879,u=-1732584194,l=271733878;for(n=0;n>5]>>>t%32&255);return n}function X(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+"0123456789abcdef".charAt(15&t);return r}function ee(e){return unescape(encodeURIComponent(e))}function te(e){return function(e){return Z($(X(e),8*e.length))}(ee(e))}function ne(e,t){return function(e,t){var n,r,i=X(e),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=$(i,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=$(o.concat(X(t)),512+8*t.length),Z($(a.concat(r),640))}(ee(e),ee(t))}function re(e,t,n){return t?n?ne(t,e):J(ne(t,e)):n?te(e):J(te(e))}var ie=T(),oe={wrap:function(){return function(){}},report:!1,collectWindowErrors:!1,computeStackTrace:!1,remoteFetching:!1,linesOfContext:!1,extendToAsynchronousCallbacks:!1},ae=[].slice,se="?",ce=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function ue(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function le(){return"undefined"===typeof document||null==document.location?"":document.location.href}oe.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(t){throw oe.report(t),t}}},oe.report=function(){var e,t,n,r,o=[],a=null,s=null;function c(e,t,n){var r=null;if(!t||oe.collectWindowErrors){for(var i in o)if(ue(o,i))try{o[i](e,t,n)}catch(a){r=a}if(r)throw r}}function u(t,n,r,o,a){var u=null;if(a=h(a)?a.error:a,t=h(t)?t.message:t,s)oe.computeStackTrace.augmentStackTraceWithInitialElement(s,n,r,t),d();else if(a&&f(a))(u=oe.computeStackTrace(a)).mechanism="onerror",c(u,!0,a);else{var l,p={url:n,line:r,column:o},m=t;if("[object String]"==={}.toString.call(t)){var _=t.match(ce);_&&(l=_[1],m=_[2])}p.func=oe.computeStackTrace.guessFunctionName(p.url,p.line),p.context=oe.computeStackTrace.gatherContext(p.url,p.line),c(u={name:l,message:m,mode:"onerror",mechanism:"onerror",stack:[i.__assign({},p,{url:p.url||le()})]},!0,null)}return!!e&&e.apply(this,arguments)}function l(e){var t=e&&(e.detail?e.detail.reason:e.reason)||e,n=oe.computeStackTrace(t);n.mechanism="onunhandledrejection",c(n,!0,t)}function d(){var e=s,t=a;s=null,a=null,c(e,!1,t)}function p(e){if(s){if(a===e)return;d()}var t=oe.computeStackTrace(e);throw s=t,a=e,setTimeout(function(){a===e&&d()},t.incomplete?2e3:0),e}return p.subscribe=function(e){o.push(e)},p.unsubscribe=function(i){for(var a=o.length-1;a>=0;--a)o[a]===i&&o.splice(a,1);0===o.length&&(t&&(ie.onerror=e,t=!1),r&&(ie.onunhandledrejection=n,r=!1))},p.installGlobalHandler=function(){!0!==t&&(e=ie.onerror,ie.onerror=u,t=!0)},p.installGlobalUnhandledRejectionHandler=function(){!0!==r&&(n=ie.onunhandledrejection,ie.onunhandledrejection=l,r=!0)},p}(),oe.computeStackTrace=function(){var e=!1,t={};function n(e){if("string"!==typeof e)return[];if(!ue(t,e)){var n="",r="";try{r=ie.document.domain}catch(o){}var i=/(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(e);i&&i[2]===r&&(n=function(e){if(!oe.remoteFetching)return"";try{var t=function(){try{return new ie.XMLHttpRequest}catch(o){return new ie.ActiveXObject("Microsoft.XMLHTTP")}}();return t.open("GET",e,!1),t.send(""),t.responseText}catch(o){return""}}(e)),t[e]=n?n.split("\n"):[]}return t[e]}function r(e,t){var r,i=/function ([^(]*)\(([^)]*)\)/,o=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,a="",s=n(e);if(!s.length)return se;for(var c=0;c<10;++c)if(a=s[t-c]+a,!y(a)){if(r=o.exec(a))return r[1];if(r=i.exec(a))return r[1]}return se}function i(e,t){var r=n(e);if(!r.length)return null;var i=[],o=Math.floor(oe.linesOfContext/2),a=o+oe.linesOfContext%2,s=Math.max(0,t-o-1),c=Math.min(r.length,t+a-1);t-=1;for(var u=s;u0?i:null}function o(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function a(e){return o(e).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function s(e,t){for(var r,i,o=0,a=t.length;or&&(i=s.exec(a[r]))?i.index:null}function u(e){if(!y(ie&&ie.document)){for(var t,n,r,i,c=[le()],u=ie.document.getElementsByTagName("script"),l=""+e,d=0;d|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,l=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d=/\((\S*)(?::(\d+))(?::(\d+))\)/,p=e.stack.split("\n"),f=[],h=/^(.*) is undefined$/.exec(e.message),m=0,_=p.length;m<_;++m){if(n=a.exec(p[m])){var g=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(t=d.exec(n[2]))&&(n[2]=t[1]),o={url:g?null:n[2],func:n[1]||se,args:g?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=u.exec(p[m]))o={url:n[2],func:n[1]||se,args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=s.exec(p[m])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(t=l.exec(n[3]))?n[3]=t[1]:0!==m||n[5]||y(e.columnNumber)||(f[0].column=e.columnNumber+1),o={url:n[3],func:n[1]||se,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}if(!o.func&&o.line&&(o.func=r(o.url,o.line)),oe.remoteFetching&&o.url&&"blob:"===o.url.substr(0,5)){var E=new XMLHttpRequest;if(E.open("GET",o.url,!1),E.send(""),200===E.status){var v=E.responseText||"",b=(v=v.slice(-300)).match(/\/\/# sourceMappingURL=(.*)$/);if(b){var T=b[1];"~"===T.charAt(0)&&(T=("undefined"===typeof document||null==document.location?"":document.location.origin?document.location.origin:document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:""))+T.slice(1)),o.url=T.slice(0,-4)}}}o.context=o.line?i(o.url,o.line):null,f.push(o)}return f.length?(f[0]&&f[0].line&&!f[0].column&&h&&(f[0].column=c(h[1],f[0].url,f[0].line)),{mode:"stack",name:e.name,message:e.message,stack:f}):null}function d(e,t,n,o){var a={url:t,line:n};if(a.url&&a.line){e.incomplete=!1,a.func||(a.func=r(a.url,a.line)),a.context||(a.context=i(a.url,a.line));var s=/ '([^']+)' /.exec(o);if(s&&(a.column=c(s[1],a.url,a.line)),e.stack.length>0&&e.stack[0].url===a.url){if(e.stack[0].line===a.line)return!1;if(!e.stack[0].line&&e.stack[0].func===a.func)return e.stack[0].line=a.line,e.stack[0].context=a.context,!1}return e.stack.unshift(a),e.partial=!0,!0}return e.incomplete=!0,!1}function p(e,t){for(var n,i,o,a=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,s=[],l={},h=!1,m=p.caller;m&&!h;m=m.caller)if(m!==f&&m!==oe.report){if(i={url:null,func:se,args:[],line:null,column:null},m.name?i.func=m.name:(n=a.exec(m.toString()))&&(i.func=n[1]),"undefined"===typeof i.func)try{i.func=n.input.substring(0,n.input.indexOf("{"))}catch(g){}if(o=u(m)){i.url=o.url,i.line=o.line,i.func===se&&(i.func=r(i.url,i.line));var _=/ '([^']+)' /.exec(e.message||e.description);_&&(i.column=c(_[1],o.url,o.line))}l[""+m]?h=!0:l[""+m]=!0,s.push(i)}t&&s.splice(0,t);var y={mode:"callers",name:e.name,message:e.message,stack:s};return d(y,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),y}function f(t,o){var c=null;o=null==o?0:+o;try{if(c=function(e){var t=e.stacktrace;if(t){for(var n,o=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,a=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,s=t.split("\n"),c=[],u=0;u=0&&(_.line=y+E.substring(0,v).split("\n").length)}}}else if(o=l.exec(t[m])){var b=le().replace(/#.*$/,""),T=s(new RegExp(a(t[m+1])),[b]);_={url:b,func:"",args:[],line:T?T.line:o[1],column:null}}if(_){_.func||(_.func=r(_.url,_.line));var A=i(_.url,_.line),I=A?A[Math.floor(A.length/2)]:null;A&&I.replace(/^\s*/,"")===t[m+1].replace(/^\s*/,"")?_.context=A:_.context=[t[m+1]],d.push(_)}}return d.length?{mode:"multiline",name:e.name,message:t[0],stack:d}:null}(t))return c}catch(u){if(e)throw u}try{if(c=p(t,o+1))return c}catch(u){if(e)throw u}return{original:t,name:t.name,message:t.message,mode:"failed"}}return f.augmentStackTraceWithInitialElement=d,f.computeStackTraceFromStackProp=l,f.guessFunctionName=r,f.gatherContext=i,f.ofCaller=function(e){e=1+(null==e?0:+e);try{throw new Error}catch(t){return f(t,e+1)}},f.getSource=n,f}(),oe.extendToAsynchronousCallbacks=function(){var e=function(e){var t=ie[e];ie[e]=function(){var e=ae.call(arguments),n=e[0];return"function"===typeof n&&(e[0]=oe.wrap(n)),t.apply?t.apply(this,e):t(e[0],e[1])}};e("setTimeout"),e("setInterval")},oe.remoteFetching=!1,oe.collectWindowErrors=!0,oe.linesOfContext=11;var de=oe.report.subscribe,pe=oe.report.installGlobalHandler,fe=oe.report.installGlobalUnhandledRejectionHandler,he=oe.computeStackTrace,me=50;function _e(e){var t=ge(e.stack),n={type:e.name,value:e.message};return t&&t.length&&(n.stacktrace={frames:t}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function ye(e){return{exception:{values:[_e(e)]}}}function ge(e){if(!e||!e.length)return[];var t=e,n=t[0].func||"",r=t[t.length-1].func||"";return(M(n,"captureMessage")||M(n,"captureException"))&&(t=t.slice(1)),M(r,"sentryWrapped")&&(t=t.slice(0,-1)),t.map(function(e){return{colno:e.column,filename:e.url||t[0].url,function:e.func||"?",in_app:!0,lineno:e.line}}).slice(0,me).reverse()}function Ee(e,t,n){e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].value=e.exception.values[0].value||t||"",e.exception.values[0].type=e.exception.values[0].type||n||"Error"}var ve=function(){function e(e){this.options=e,this.buffer=new o.PromiseBuffer(30),this.url=new o.API(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}return e.prototype.sendEvent=function(e){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(e){throw new o.SentryError("Transport Class has to implement `sendEvent` method")})})},e.prototype.close=function(e){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(t){return[2,this.buffer.drain(e)]})})},e}(),be=T(),Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.sendEvent=function(e){return i.__awaiter(this,void 0,void 0,function(){var t;return i.__generator(this,function(n){return t={body:e,method:"POST",referrerPolicy:P()?"origin":""},[2,this.buffer.add(be.fetch(this.url,t).then(function(e){return{status:d.fromHttpCode(e.status)}}))]})})},t}(ve),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.sendEvent=function(e){return i.__awaiter(this,void 0,void 0,function(){var t=this;return i.__generator(this,function(n){return[2,this.buffer.add(new Promise(function(n,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){4===i.readyState&&(200===i.status&&n({status:d.fromHttpCode(i.status)}),r(i))},i.open("POST",t.url),i.send(e)}))]})})},t}(ve),Ie=Object.freeze({BaseTransport:ve,FetchTransport:Te,XHRTransport:Ae}),Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.install=function(){if(!this.options.dsn)throw new o.SentryError("Invariant exception: install() must not be called when disabled");return Error.stackTraceLimit=50,!0},t.prototype.setupTransport=function(){if(!this.options.dsn)return e.prototype.setupTransport.call(this);var t=this.options.transportOptions?this.options.transportOptions:{dsn:this.options.dsn};return this.options.transport?new this.options.transport(t):w()?new Te(t):new Ae(t)},t.prototype.eventFromException=function(e,t){return i.__awaiter(this,void 0,void 0,function(){var n,r,o,a;return i.__generator(this,function(s){switch(s.label){case 0:return h(e)&&e.error?(e=(a=e).error,n=ye(he(e)),[3,7]):[3,1];case 1:return m(e)||_(e)?(r=(a=e).name||(m(a)?"DOMError":"DOMException"),o=a.message?r+": "+a.message:r,[4,this.eventFromMessage(o,l.Error,t)]):[3,3];case 2:return Ee(n=s.sent(),o),[3,7];case 3:return f(e)?(n=ye(he(e)),[3,7]):[3,4];case 4:return v(e)&&t&&t.syntheticException?(Ee(n=function(e,t){var n=Object.keys(e).sort(),r={extra:{__serialized__:H(e)},fingerprint:[re(n.join(""))],message:"Non-Error exception captured with keys: "+V(n)};if(t){var i=ge(he(t).stack);r.stacktrace={frames:i}}return r}(a=e,t.syntheticException),"Custom Object"),[3,7]):[3,5];case 5:return a=e,[4,this.eventFromMessage(a,void 0,t)];case 6:Ee(n=s.sent(),""+a),s.label=7;case 7:return[2,n=i.__assign({},n,{event_id:t&&t.event_id,exception:i.__assign({},n.exception,{mechanism:{handled:!0,type:"generic"}})})]}})})},t.prototype.eventFromMessage=function(e,t,n){return void 0===t&&(t=l.Info),i.__awaiter(this,void 0,void 0,function(){var r,o,a;return i.__generator(this,function(i){return r={event_id:n&&n.event_id,level:t,message:e},this.options.attachStacktrace&&n&&n.syntheticException&&(o=he(n.syntheticException),a=ge(o.stack),r.stacktrace={frames:a}),[2,r]})})},t}(o.BaseBackend),Oe=c(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=b.getGlobalObject(),r=new(function(){function e(){this.enabled=!1}return e.prototype.disable=function(){this.enabled=!1},e.prototype.enable=function(){this.enabled=!0},e.prototype.log=function(){for(var e=[],t=0;t"}o.getCurrentHub().addBreadcrumb({category:"ui."+e,message:n},{event:t,name:e})}}}function Me(){return function(e){var t;try{t=e.target}catch(r){return}var n=t&&t.tagName;n&&("INPUT"===n||"TEXTAREA"===n||t.isContentEditable)&&(we||xe("input")(e),clearTimeout(we),we=setTimeout(function(){we=void 0},De))}}var Ue=function(){function e(t){this.name=e.id,this.options=i.__assign({onerror:!0,onunhandledrejection:!0},t)}return e.prototype.setupOnce=function(){de(function(t,n,r){if(!(ke>0)){var i=o.getCurrentHub().getIntegration(e);i&&o.getCurrentHub().captureEvent(i.eventFromGlobalHandler(t),{originalException:r,data:{stack:t}})}}),this.options.onerror&&(Ce.log("Global Handler attached: onerror"),pe()),this.options.onunhandledrejection&&(Ce.log("Global Handler attached: onunhandledrejection"),fe())},e.prototype.eventFromGlobalHandler=function(e){var t=ye(e),n={mode:e.mode};e.message&&(n.message=e.message),e.name&&(n.name=e.name);var r=i.__assign({},t,{exception:i.__assign({},t.exception,{mechanism:{data:n,handled:!1,type:e.mechanism}})});return Ee(r,"undefined"!==typeof e.original?""+L(F(Y(e.original)),300):"","onunhandledrejection"===e.mechanism?"UnhandledRejection":"Error"),r},e.id="GlobalHandlers",e}(),Fe=function(){function e(){this.ignoreOnError=0,this.name=e.id}return e.prototype.wrapTimeFunction=function(e){return function(){for(var t=[],n=0;n"}catch(t){return""}}var ze,He=T(),Ve=function(){function e(t){this.name=e.id,this.options=i.__assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return e.prototype.instrumentConsole=function(){"console"in He&&["debug","info","warn","error","log"].forEach(function(t){t in He.console&&z(He.console,t,function(n){return function(){for(var r=[],i=0;i2?t[2]:void 0;return i&&n(ze,String(i)),e.apply(this,t)}}},e.prototype.instrumentXHR=function(){if("XMLHttpRequest"in He){var t=XMLHttpRequest.prototype;z(t,"open",function(e){return function(){for(var t=[],n=0;n"},handled:!0,type:"instrument"}})})}(e,i)}),"onreadystatechange"in i&&g(i.onreadystatechange)?z(i,"onreadystatechange",function(e){return Le(e,{mechanism:{data:{function:"onreadystatechange",handler:e&&e.name||""},handled:!0,type:"instrument"}},o)}):i.onreadystatechange=o,t.apply(this,n)}})}},e.addBreadcrumb=function(t,n){o.getCurrentHub().getIntegration(e)&&o.getCurrentHub().addBreadcrumb(t,n)},e.prototype.setupOnce=function(){this.options.console&&this.instrumentConsole(),this.options.dom&&this.instrumentDOM(),this.options.xhr&&this.instrumentXHR(),this.options.fetch&&this.instrumentFetch(),this.options.history&&this.instrumentHistory()},e.id="Breadcrumbs",e}();function Ye(e){try{var t=j(e);Ve.addBreadcrumb({category:"sentry",event_id:t.event_id,level:t.level||l.fromString("error"),message:N(t)},{event:t})}catch(n){Ce.error("Error while adding sentry type breadcrumb")}}var Be,Ke="cause",We=5,Ge=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this.key=t.key||Ke,this.limit=t.limit||We}return e.prototype.setupOnce=function(){var t=this;o.addGlobalEventProcessor(function(n,r){return i.__awaiter(t,void 0,void 0,function(){var t;return i.__generator(this,function(i){return(t=o.getCurrentHub().getIntegration(e))?[2,t.handler(n,r)]:[2,n]})})})},e.prototype.handler=function(e,t){if(!e.exception||!e.exception.values||!t||!(t.originalException instanceof Error))return e;var n=this.walkErrorTree(t.originalException,this.key);return e.exception.values=i.__spread(n,e.exception.values),e},e.prototype.walkErrorTree=function(e,t,n){if(void 0===n&&(n=[]),!(e[t]instanceof Error)||n.length+1>=this.limit)return n;var r=_e(he(e[t]));return this.walkErrorTree(e[t],t,i.__spread([r],n))},e.id="LinkedErrors",e}(),Qe=T(),qe=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){var t=this;o.addGlobalEventProcessor(function(n){return i.__awaiter(t,void 0,void 0,function(){var t;return i.__generator(this,function(r){return o.getCurrentHub().getIntegration(e)&&Qe.navigator&&Qe.location?((t=n.request||{}).url=t.url||Qe.location.href,t.headers=t.headers||{},t.headers["User-Agent"]=Qe.navigator.userAgent,[2,i.__assign({},n,{request:t})]):[2,n]})})})},e.id="UserAgent",e}(),$e=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this.Ember=t.Ember||T().Ember}return e.prototype.setupOnce=function(){var t=this;if(this.Ember){var n=this.Ember.onerror;this.Ember.onerror=function(r){if(o.getCurrentHub().getIntegration(e)&&o.withScope(function(e){t.addIntegrationToSdkInfo(e),o.captureException(r)}),"function"===typeof n)n.call(t.Ember,r);else if(t.Ember.testing)throw r},this.Ember.RSVP.on("error",function(n){o.getCurrentHub().getIntegration(e)&&o.withScope(function(e){n instanceof Error?(e.setExtra("context","Unhandled Promise error detected"),t.addIntegrationToSdkInfo(e),o.captureException(n)):(e.setExtra("reason",n),t.addIntegrationToSdkInfo(e),o.captureMessage("Unhandled Promise error detected"))})})}else Ce.error("EmberIntegration is missing an Ember instance")},e.prototype.addIntegrationToSdkInfo=function(e){var t=this;e.addEventProcessor(function(e){return i.__awaiter(t,void 0,void 0,function(){var t;return i.__generator(this,function(n){return e.sdk&&(t=e.sdk.integrations||[],e.sdk=i.__assign({},e.sdk,{integrations:i.__spread(t,["ember"])})),[2,e]})})})},e.id="Ember",e}(),Ze=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this.Vue=t.Vue||T().Vue,this.attachProps=t.attachProps||!0}return e.prototype.formatComponentName=function(e){if(e.$root===e)return"root instance";var t=e._isVue?e.$options.name||e.$options._componentTag:e.name;return(t?"component <"+t+">":"anonymous component")+(e._isVue&&e.$options.__file?" at "+e.$options.__file:"")},e.prototype.setupOnce=function(){var t=this;if(this.Vue&&this.Vue.config){var n=this.Vue.config.errorHandler;this.Vue.config.errorHandler=function(r,a,s){var c={};v(a)&&(c.componentName=t.formatComponentName(a),t.attachProps&&(c.propsData=a.$options.propsData)),y(s)||(c.lifecycleHook=s),o.getCurrentHub().getIntegration(e)&&o.withScope(function(e){Object.keys(c).forEach(function(t){e.setExtra(t,c[t])}),e.addEventProcessor(function(e){return i.__awaiter(t,void 0,void 0,function(){var t;return i.__generator(this,function(n){return e.sdk&&(t=e.sdk.integrations||[],e.sdk=i.__assign({},e.sdk,{integrations:i.__spread(t,["vue"])})),[2,e]})})}),o.captureException(r)}),"function"===typeof n&&n.call(t.Vue,r,a,s)}}else Ce.error("VueIntegration is missing a Vue instance")},e.id="Vue",e}();!function(e){e.Crash="crash",e.Deprecation="deprecation",e.Intervention="intervention"}(Be||(Be={}));var Xe=function(){function e(t){void 0===t&&(t={types:[Be.Crash,Be.Deprecation,Be.Intervention]}),this.options=t,this.name=e.id}return e.prototype.setupOnce=function(){C()&&new(T().ReportingObserver)(this.handler.bind(this),{buffered:!0,types:this.options.types}).observe()},e.prototype.handler=function(t){var n,r;if(o.getCurrentHub().getIntegration(e)){var a=function(e){o.withScope(function(t){t.setExtra("url",e.url);var n="ReportingObserver ["+e.type+"]",r="No details available";if(e.body){var i,a={};for(var s in e.body)a[s]=e.body[s];if(t.setExtra("body",a),e.type===Be.Crash)r=[(i=e.body).crashId||"",i.reason||""].join(" ").trim()||r;else r=(i=e.body).message||r}o.captureMessage(n+": "+r)})};try{for(var s=i.__values(t),c=s.next();!c.done;c=s.next()){a(c.value)}}catch(u){n={error:u}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}},e.id="ReportingObserver",e}(),Je=Object.freeze({GlobalHandlers:Ue,TryCatch:Fe,Breadcrumbs:Ve,LinkedErrors:Ge,UserAgent:qe,Ember:$e,Vue:Ze,ReportingObserver:Xe}),et=[new o.Integrations.Dedupe,new o.Integrations.InboundFilters,new o.Integrations.FunctionToString,new o.Integrations.ExtraErrorData,new Fe,new Ve,new Ue,new Ge,new qe];var tt=i.__assign({},o.Integrations,Je);t.addGlobalEventProcessor=o.addGlobalEventProcessor,t.addBreadcrumb=o.addBreadcrumb,t.captureException=o.captureException,t.captureEvent=o.captureEvent,t.captureMessage=o.captureMessage,t.configureScope=o.configureScope,t.withScope=o.withScope,t.getHubFromCarrier=o.getHubFromCarrier,t.getCurrentHub=o.getCurrentHub,t.Hub=o.Hub,t.Scope=o.Scope,t.Integrations=tt,t.Transports=Ie,t.Severity=l,t.Status=d,t.BrowserBackend=Ne,t.BrowserClient=Re,t.defaultIntegrations=et,t.forceLoad=function(){},t.init=function(e){void 0===e&&(e={}),void 0===e.defaultIntegrations&&(e.defaultIntegrations=et),o.initAndBind(Re,e)},t.lastEventId=function(){return o.getCurrentHub().lastEventId()},t.onLoad=function(e){e()},t.showReportDialog=function(e){void 0===e&&(e={}),e.eventId||(e.eventId=o.getCurrentHub().lastEventId()),o.getCurrentHub().getClient().showReportDialog(e)},t.flush=function(e){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(t){return[2,o.getCurrentHub().getClient().flush(e)]})})},t.close=function(e){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(t){return[2,o.getCurrentHub().getClient().close(e)]})})},t.SDK_NAME=Pe,t.SDK_VERSION="4.6.6"}).call(this,n(7),n(12))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,d=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=s(p);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d1)for(var n=1;nr&&(t=r);var i=Math.max(t-60,0);i<5&&(i=0);var o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n="'{snip} "+n),oe.length)&&-1!==e.indexOf(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(6),o=n(10),a=n(13),s=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,c=function(){function e(e){"string"===typeof e?this.fromString(e):this.fromComponents(e),this.validate()}return e.prototype.toString=function(e){void 0===e&&(e=!1);var t=this,n=t.host,r=t.path,i=t.pass,o=t.port,a=t.projectId;return t.protocol+"://"+t.user+(e&&i?":"+i:"")+"@"+n+(o?":"+o:"")+"/"+(r?r+"/":r)+a},e.prototype.fromString=function(e){var t=s.exec(e);if(!t)throw new a.SentryError("Invalid Dsn");var n=r.__read(t.slice(1),6),i=n[0],c=n[1],u=n[2],l=void 0===u?"":u,d=n[3],p=n[4],f=void 0===p?"":p,h="",m=n[5],_=m.split("/");_.length>1&&(h=_.slice(0,-1).join("/"),m=_.pop()),o.assign(this,{host:d,pass:l,path:h,projectId:m,port:f,protocol:i,user:c})},e.prototype.fromComponents=function(e){this.protocol=e.protocol,this.user=e.user,this.pass=e.pass||"",this.host=e.host,this.port=e.port||"",this.path=e.path||"",this.projectId=e.projectId},e.prototype.validate=function(){var e,t;try{for(var n=r.__values(["protocol","user","host","projectId"]),o=n.next();!o.done;o=n.next()){var s=o.value;if(!this[s])throw new a.SentryError("Invalid Dsn: Missing "+s)}}catch(c){e={error:c}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}if("http"!==this.protocol&&"https"!==this.protocol)throw new a.SentryError('Invalid Dsn: Unsupported protocol "'+this.protocol+'"');if(this.port&&i.isNaN(parseInt(this.port,10)))throw new a.SentryError('Invalid Dsn: Invalid port number "'+this.port+'"')},e}();t.Dsn=c},function(e,t,n){e.exports=function e(t){"use strict";var n=/^\0+/g,r=/[\0\r\f]/g,i=/: */g,o=/zoo|gra/,a=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,c=/ +\s*(?![^(]*[)])/g,u=/ *[\0] */g,l=/,\r+?/g,d=/([\t\r\n ])*\f?&/g,p=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,f=/\W+/g,h=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,_=/:(read-only)/g,y=/\s+(?=[{\];=:>])/g,g=/([[}=:>])\s+/g,E=/(\{[^{]+?);(?=\})/g,v=/\s{2,}/g,b=/([^\(])(:+) */g,T=/[svh]\w+-[tblr]{2}/,A=/\(\s*(.*)\s*\)/g,I=/([\s\S]*?);/g,N=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,w=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,C="-webkit-",P="-moz-",R="-ms-",D=59,k=125,L=123,x=40,M=41,U=91,F=93,j=10,z=13,H=9,V=64,Y=32,B=38,K=45,W=95,G=42,Q=44,q=58,$=39,Z=34,X=47,J=62,ee=43,te=126,ne=0,re=12,ie=11,oe=107,ae=109,se=115,ce=112,ue=111,le=105,de=99,pe=100,fe=112,he=1,me=1,_e=0,ye=1,ge=1,Ee=1,ve=0,be=0,Te=0,Ae=[],Ie=[],Ne=0,Oe=null,we=-2,Se=-1,Ce=0,Pe=1,Re=2,De=3,ke=0,Le=1,xe="",Me="",Ue="";function Fe(e,t,i,o,a){for(var s,c,l=0,d=0,p=0,f=0,y=0,g=0,E=0,v=0,T=0,I=0,N=0,O=0,w=0,S=0,W=0,ve=0,Ie=0,Oe=0,we=0,Se=i.length,ze=Se-1,We="",Ge="",Qe="",qe="",$e="",Ze="";W0&&(Ge=Ge.replace(r,"")),Ge.trim().length>0)){switch(E){case Y:case H:case D:case z:case j:break;default:Ge+=i.charAt(W)}E=D}if(1===Ie)switch(E){case L:case k:case D:case Z:case $:case x:case M:case Q:Ie=0;case H:case z:case j:case Y:break;default:for(Ie=0,we=W,y=E,W--,E=D;we0&&(++W,E=y);case L:we=Se}}switch(E){case L:for(y=(Ge=Ge.trim()).charCodeAt(0),N=1,we=++W;W0&&(Ge=Ge.replace(r,"")),g=Ge.charCodeAt(1)){case pe:case ae:case se:case K:s=t;break;default:s=Ae}if(we=(Qe=Fe(t,s,Qe,g,a+1)).length,Te>0&&0===we&&(we=Ge.length),Ne>0&&(s=je(Ae,Ge,Oe),c=Be(De,Qe,s,t,me,he,we,g,a,o),Ge=s.join(""),void 0!==c&&0===(we=(Qe=c.trim()).length)&&(g=0,Qe="")),we>0)switch(g){case se:Ge=Ge.replace(A,Ye);case pe:case ae:case K:Qe=Ge+"{"+Qe+"}";break;case oe:Qe=(Ge=Ge.replace(h,"$1 $2"+(Le>0?xe:"")))+"{"+Qe+"}",Qe=1===ge||2===ge&&Ve("@"+Qe,3)?"@"+C+Qe+"@"+Qe:"@"+Qe;break;default:Qe=Ge+Qe,o===fe&&(qe+=Qe,Qe="")}else Qe="";break;default:Qe=Fe(t,je(t,Ge,Oe),Qe,o,a+1)}$e+=Qe,O=0,Ie=0,S=0,ve=0,Oe=0,w=0,Ge="",Qe="",E=i.charCodeAt(++W);break;case k:case D:if((we=(Ge=(ve>0?Ge.replace(r,""):Ge).trim()).length)>1)switch(0===S&&((y=Ge.charCodeAt(0))===K||y>96&&y<123)&&(we=(Ge=Ge.replace(" ",":")).length),Ne>0&&void 0!==(c=Be(Pe,Ge,t,e,me,he,qe.length,o,a,o))&&0===(we=(Ge=c.trim()).length)&&(Ge="\0\0"),y=Ge.charCodeAt(0),g=Ge.charCodeAt(1),y){case ne:break;case V:if(g===le||g===de){Ze+=Ge+i.charAt(W);break}default:if(Ge.charCodeAt(we-1)===q)break;qe+=He(Ge,y,g,Ge.charCodeAt(2))}O=0,Ie=0,S=0,ve=0,Oe=0,Ge="",E=i.charCodeAt(++W)}}switch(E){case z:case j:if(d+f+p+l+be===0)switch(I){case M:case $:case Z:case V:case te:case J:case G:case ee:case X:case K:case q:case Q:case D:case L:case k:break;default:S>0&&(Ie=1)}d===X?d=0:ye+O===0&&o!==oe&&Ge.length>0&&(ve=1,Ge+="\0"),Ne*ke>0&&Be(Ce,Ge,t,e,me,he,qe.length,o,a,o),he=1,me++;break;case D:case k:if(d+f+p+l===0){he++;break}default:switch(he++,We=i.charAt(W),E){case H:case Y:if(f+l+d===0)switch(v){case Q:case q:case H:case Y:We="";break;default:E!==Y&&(We=" ")}break;case ne:We="\\0";break;case re:We="\\f";break;case ie:We="\\v";break;case B:f+d+l===0&&ye>0&&(Oe=1,ve=1,We="\f"+We);break;case 108:if(f+d+l+_e===0&&S>0)switch(W-S){case 2:v===ce&&i.charCodeAt(W-3)===q&&(_e=v);case 8:T===ue&&(_e=T)}break;case q:f+d+l===0&&(S=W);break;case Q:d+p+f+l===0&&(ve=1,We+="\r");break;case Z:case $:0===d&&(f=f===E?0:0===f?E:f);break;case U:f+d+p===0&&l++;break;case F:f+d+p===0&&l--;break;case M:f+d+l===0&&p--;break;case x:if(f+d+l===0){if(0===O)switch(2*v+3*T){case 533:break;default:N=0,O=1}p++}break;case V:d+p+f+l+S+w===0&&(w=1);break;case G:case X:if(f+l+p>0)break;switch(d){case 0:switch(2*E+3*i.charCodeAt(W+1)){case 235:d=X;break;case 220:we=W,d=G}break;case G:E===X&&v===G&&we+2!==W&&(33===i.charCodeAt(we+2)&&(qe+=i.substring(we,W+1)),We="",d=0)}}if(0===d){if(ye+f+l+w===0&&o!==oe&&E!==D)switch(E){case Q:case te:case J:case ee:case M:case x:if(0===O){switch(v){case H:case Y:case j:case z:We+="\0";break;default:We="\0"+We+(E===Q?"":"\0")}ve=1}else switch(E){case x:S+7===W&&108===v&&(S=0),O=++N;break;case M:0==(O=--N)&&(ve=1,We+="\0")}break;case H:case Y:switch(v){case ne:case L:case k:case D:case Q:case re:case H:case Y:case j:case z:break;default:0===O&&(ve=1,We+="\0")}}Ge+=We,E!==Y&&E!==H&&(I=E)}}T=v,v=E,W++}if(we=qe.length,Te>0&&0===we&&0===$e.length&&0===t[0].length==0&&(o!==ae||1===t.length&&(ye>0?Me:Ue)===t[0])&&(we=t.join(",").length+2),we>0){if(s=0===ye&&o!==oe?function(e){for(var t,n,i=0,o=e.length,a=Array(o);i1)){if(p=c.charCodeAt(c.length-1),f=n.charCodeAt(0),t="",0!==l)switch(p){case G:case te:case J:case ee:case Y:case x:break;default:t=" "}switch(f){case B:n=t+Me;case te:case J:case ee:case Y:case M:case x:break;case U:n=t+n+Me;break;case q:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(Ee>0){n=t+n.substring(8,d-1);break}default:(l<1||s[l-1].length<1)&&(n=t+Me+n)}break;case Q:t="";default:n=d>1&&n.indexOf(":")>0?t+n.replace(b,"$1"+Me+"$2"):t+n+Me}c+=n}a[i]=c.replace(r,"").trim()}return a}(t):t,Ne>0&&void 0!==(c=Be(Re,qe,s,e,me,he,we,o,a,o))&&0===(qe=c).length)return Ze+qe+$e;if(qe=s.join(",")+"{"+qe+"}",ge*_e!=0){switch(2!==ge||Ve(qe,2)||(_e=0),_e){case ue:qe=qe.replace(_,":"+P+"$1")+qe;break;case ce:qe=qe.replace(m,"::"+C+"input-$1")+qe.replace(m,"::"+P+"$1")+qe.replace(m,":"+R+"input-$1")+qe}_e=0}}return Ze+qe+$e}function je(e,t,n){var r=t.trim().split(l),i=r,o=r.length,a=e.length;switch(a){case 0:case 1:for(var s=0,c=0===a?"":e[0]+" ";s0&&ye>0)return i.replace(p,"$1").replace(d,"$1"+Ue);break;default:return e.trim()+i.replace(d,"$1"+e.trim())}default:if(n*ye>0&&i.indexOf("\f")>0)return i.replace(d,(e.charCodeAt(0)===q?"":"$1")+e.trim())}return e+i}function He(e,t,n,r){var u,l=0,d=e+";",p=2*t+3*n+4*r;if(944===p)return function(e){var t=e.length,n=e.indexOf(":",9)+1,r=e.substring(0,n).trim(),i=e.substring(n,t-1).trim();switch(e.charCodeAt(9)*Le){case 0:break;case K:if(110!==e.charCodeAt(10))break;default:for(var o=i.split((i="",s)),a=0,n=0,t=o.length;aV&&d<90||d>96&&d<123||d===W||d===K&&u.charCodeAt(1)!==K))switch(isNaN(parseFloat(u))+(-1!==u.indexOf("("))){case 1:switch(u){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:u+=xe}}l[n++]=u}i+=(0===a?"":",")+l.join(" ")}}return i=r+i+";",1===ge||2===ge&&Ve(i,1)?C+i+i:i}(d);if(0===ge||2===ge&&!Ve(d,1))return d;switch(p){case 1015:return 97===d.charCodeAt(10)?C+d+d:d;case 951:return 116===d.charCodeAt(3)?C+d+d:d;case 963:return 110===d.charCodeAt(5)?C+d+d:d;case 1009:if(100!==d.charCodeAt(4))break;case 969:case 942:return C+d+d;case 978:return C+d+P+d+d;case 1019:case 983:return C+d+P+d+R+d+d;case 883:return d.charCodeAt(8)===K?C+d+d:d.indexOf("image-set(",11)>0?d.replace(S,"$1"+C+"$2")+d:d;case 932:if(d.charCodeAt(4)===K)switch(d.charCodeAt(5)){case 103:return C+"box-"+d.replace("-grow","")+C+d+R+d.replace("grow","positive")+d;case 115:return C+d+R+d.replace("shrink","negative")+d;case 98:return C+d+R+d.replace("basis","preferred-size")+d}return C+d+R+d+d;case 964:return C+d+R+"flex-"+d+d;case 1023:if(99!==d.charCodeAt(8))break;return u=d.substring(d.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),C+"box-pack"+u+C+d+R+"flex-pack"+u+d;case 1005:return o.test(d)?d.replace(i,":"+C)+d.replace(i,":"+P)+d:d;case 1e3:switch(l=(u=d.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(l)){case 226:u=d.replace(T,"tb");break;case 232:u=d.replace(T,"tb-rl");break;case 220:u=d.replace(T,"lr");break;default:return d}return C+d+R+u+d;case 1017:if(-1===d.indexOf("sticky",9))return d;case 975:switch(l=(d=e).length-10,p=(u=(33===d.charCodeAt(l)?d.substring(0,l):d).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(u.charCodeAt(8)<111)break;case 115:d=d.replace(u,C+u)+";"+d;break;case 207:case 102:d=d.replace(u,C+(p>102?"inline-":"")+"box")+";"+d.replace(u,C+u)+";"+d.replace(u,R+u+"box")+";"+d}return d+";";case 938:if(d.charCodeAt(5)===K)switch(d.charCodeAt(6)){case 105:return u=d.replace("-items",""),C+d+C+"box-"+u+R+"flex-"+u+d;case 115:return C+d+R+"flex-item-"+d.replace(N,"")+d;default:return C+d+R+"flex-line-pack"+d.replace("align-content","").replace(N,"")+d}break;case 973:case 989:if(d.charCodeAt(3)!==K||122===d.charCodeAt(4))break;case 931:case 953:if(!0===w.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?He(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):d.replace(u,C+u)+d.replace(u,P+u.replace("fill-",""))+d;break;case 962:if(d=C+d+(102===d.charCodeAt(5)?R+d:"")+d,n+r===211&&105===d.charCodeAt(13)&&d.indexOf("transform",10)>0)return d.substring(0,d.indexOf(";",27)+1).replace(a,"$1"+C+"$2")+d}return d}function Ve(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10),i=e.substring(n+1,e.length-1);return Oe(2!==t?r:r.replace(O,"$1"),i,t)}function Ye(e,t){var n=He(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(I," or ($1)").substring(4):"("+t+")"}function Be(e,t,n,r,i,o,a,s,c,u){for(var l,d=0,p=t;d0&&(xe=i.replace(f,o===U?"":"-")),o=1,1===ye?Ue=i:Me=i;var a,s=[Ue];Ne>0&&void 0!==(a=Be(Se,n,s,s,me,he,0,0,0,0))&&"string"==typeof a&&(n=a);var c=Fe(Ae,s,n,0,0);return Ne>0&&void 0!==(a=Be(we,c,s,s,me,he,c.length,0,0,0))&&"string"!=typeof(c=a)&&(o=0),xe="",Ue="",Me="",_e=0,me=1,he=1,ve*o==0?c:c.replace(r,"").replace(y,"").replace(g,"$1").replace(E,"$1").replace(v," ")}return Ge.use=function e(t){switch(t){case void 0:case null:Ne=Ie.length=0;break;default:if("function"==typeof t)Ie[Ne++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n=0?r.__spread(this.breadcrumbs,[o.safeNormalize(e)]).slice(-t):r.__spread(this.breadcrumbs,[o.safeNormalize(e)]),this.notifyScopeListeners()},e.prototype.applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this.fingerprint?e.fingerprint=e.fingerprint.concat(this.fingerprint):e.message&&(e.fingerprint=e.fingerprint.concat(e.message)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e.prototype.applyToEvent=function(e,t,n){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(i){return this.extra&&Object.keys(this.extra).length&&(e.extra=r.__assign({},this.extra,e.extra)),this.tags&&Object.keys(this.tags).length&&(e.tags=r.__assign({},this.tags,e.tags)),this.user&&Object.keys(this.user).length&&(e.user=r.__assign({},this.user,e.user)),this.level&&(e.level=this.level),this.applyFingerprint(e),(!e.breadcrumbs||0===e.breadcrumbs.length)&&this.breadcrumbs.length>0&&(e.breadcrumbs=void 0!==n&&n>=0?this.breadcrumbs.slice(-n):this.breadcrumbs),[2,this.notifyEventProcessors(e,t)]})})},e}();function s(){var e=i.getGlobalObject();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}t.Scope=a,t.addGlobalEventProcessor=function(e){s().push(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical"}(t.Severity||(t.Severity={})),function(e){e.fromString=function(t){switch(t){case"debug":return e.Debug;case"info":return e.Info;case"warn":case"warning":return e.Warning;case"error":return e.Error;case"fatal":return e.Fatal;case"critical":return e.Critical;case"log":default:return e.Log}}}(t.Severity||(t.Severity={})),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.Invalid="invalid",e.Failed="failed"}(t.Status||(t.Status={})),function(e){e.fromHttpCode=function(t){return t>=200&&t<300?e.Success:429===t?e.RateLimit:t>=400&&t<500?e.Invalid:t>=500?e.Failed:e.Unknown}}(t.Status||(t.Status={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(13),o=function(){function e(e){this.limit=e,this.buffer=[]}return e.prototype.isReady=function(){return void 0===this.limit||this.length()0&&n(!1)},e);Promise.all(t.buffer).then(function(){clearTimeout(r),n(!0)}).catch(function(){n(!0)})})]})})},e}();t.PromiseBuffer=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(21),o=function(){function e(){}return e.prototype.sendEvent=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,Promise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:i.Status.Skipped})]})})},e.prototype.close=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,Promise.resolve(!0)]})})},e}();t.NoopTransport=o},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(45)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){for(var n=0;nk.length&&k.push(e)}function M(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case o:case a:c=!0}}if(c)return r(i,t,""===n?"."+U(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;uthis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=ue,e.release=le}i(ce.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:se,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=se,this._dispatchInstances=this._dispatchListeners=null}}),ce.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ce.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,de(n),n},de(ce);var pe=ce.extend({data:null}),fe=ce.extend({data:null}),he=[9,13,27,32],me=K&&"CompositionEvent"in window,_e=null;K&&"documentMode"in document&&(_e=document.documentMode);var ye=K&&"TextEvent"in window&&!_e,ge=K&&(!me||_e&&8<_e&&11>=_e),Ee=String.fromCharCode(32),ve={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},be=!1;function Te(e,t){switch(e){case"keyup":return-1!==he.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Ae(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Ie=!1;var Ne={eventTypes:ve,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(me)e:{switch(e){case"compositionstart":i=ve.compositionStart;break e;case"compositionend":i=ve.compositionEnd;break e;case"compositionupdate":i=ve.compositionUpdate;break e}i=void 0}else Ie?Te(e,n)&&(i=ve.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=ve.compositionStart);return i?(ge&&"ko"!==n.locale&&(Ie||i!==ve.compositionStart?i===ve.compositionEnd&&Ie&&(o=oe()):(re="value"in(ne=r)?ne.value:ne.textContent,Ie=!0)),i=pe.getPooled(i,t,n,r),o?i.data=o:null!==(o=Ae(n))&&(i.data=o),B(i),o=i):o=null,(e=ye?function(e,t){switch(e){case"compositionend":return Ae(t);case"keypress":return 32!==t.which?null:(be=!0,Ee);case"textInput":return(e=t.data)===Ee&&be?null:e;default:return null}}(e,n):function(e,t){if(Ie)return"compositionend"===e||!me&&Te(e,t)?(e=oe(),ie=re=ne=null,Ie=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1