@paynext/sdk 0.0.56 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/index.es.js +2780 -2659
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +38 -38
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
(function(re,ne){typeof exports=="object"&&typeof module!="undefined"?ne(exports):typeof define=="function"&&define.amd?define(["exports"],ne):(re=typeof globalThis!="undefined"?globalThis:re||self,ne(re["PayNext TS SDK"]={}))})(this,function(re){"use strict";var Ac=Object.defineProperty,Tc=Object.defineProperties;var Ic=Object.getOwnPropertyDescriptors;var At=Object.getOwnPropertySymbols;var Ui=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable;var Er=(re,ne,ie)=>ne in re?Ac(re,ne,{enumerable:!0,configurable:!0,writable:!0,value:ie}):re[ne]=ie,j=(re,ne)=>{for(var ie in ne||(ne={}))Ui.call(ne,ie)&&Er(re,ie,ne[ie]);if(At)for(var ie of At(ne))Bi.call(ne,ie)&&Er(re,ie,ne[ie]);return re},X=(re,ne)=>Tc(re,Ic(ne));var Ce=(re,ne)=>{var ie={};for(var be in re)Ui.call(re,be)&&ne.indexOf(be)<0&&(ie[be]=re[be]);if(re!=null&&At)for(var be of At(re))ne.indexOf(be)<0&&Bi.call(re,be)&&(ie[be]=re[be]);return ie};var y=(re,ne,ie)=>Er(re,typeof ne!="symbol"?ne+"":ne,ie);var z=(re,ne,ie)=>new Promise((be,We)=>{var Tt=se=>{try{Ge(ie.next(se))}catch(Ye){We(Ye)}},It=se=>{try{Ge(ie.throw(se))}catch(Ye){We(Ye)}},Ge=se=>se.done?be(se.value):Promise.resolve(se.value).then(Tt,It);Ge((ie=ie.apply(re,ne)).next())});var ne=document.createElement("style");ne.textContent=`._spinner_1waxg_1{height:100%;width:100%}@keyframes _spin_1waxg_1{to{transform:rotate(360deg)}}._spinner_1waxg_1{animation:_spin_1waxg_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinner_1waxg_1:is(._dark_1waxg_1 *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}._spinnerContainer_1waxg_5{height:40px;width:40px}._success_1waxg_9{position:absolute;top:50%;left:50%;width:1.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));fill:#16a34a}._successContainer_1waxg_13{position:relative;display:grid;height:2.25rem;width:2.25rem;flex:none;place-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(232 250 240 / var(--tw-bg-opacity, 1))}._successContainer_1waxg_13:is(._dark_1waxg_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._container_1waxg_17{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_1waxg_26{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_1waxg_35{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_1waxg_43{width:100%;height:100%}._srOnly_1waxg_48{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}._loader_nwq3e_1{position:absolute;height:100%;top:0;left:0;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:1000;display:flex;width:100%;align-items:center;justify-content:center;border-radius:10px}._checkout_5sq3n_1{overflow:hidden;z-index:0;position:relative;height:auto;min-height:40px;width:100%;max-width:640px}._hidden_5sq3n_7{display:none!important}._formInitial_5sq3n_11{opacity:0;transform:translateY(100px)}._btnsInitial_5sq3n_16{opacity:0;transform:translateY(-100px)}._buttons_1i8cu_1{display:grid;gap:.5rem}._hidden_1i8cu_5{display:none!important}._applePay_1g5vd_1{display:flex}._applePay_1g5vd_1:hover{filter:contrast(.575) brightness(1.2)}._hidden_1g5vd_24,._hidden_1xmjo_17{display:none!important}._paypal_2zo1j_1{display:flex}._hidden_2zo1j_10{display:none}._button_1br9w_1{transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.5rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1br9w_1{transition-property:none}}._button_1br9w_1 span{margin-left:.25rem}._button_1br9w_1:hover{opacity:.7}._press_1br9w_21{transform:scale(.95)}._venmo_1ihvb_1{display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:12px;height:40px;background-color:#0088f7;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;svg{height:40%}&:hover{background-color:#5683c1}}._hidden_1ihvb_26{display:none}._button_125my_1{cursor:pointer}._button_rx9be_1{transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_rx9be_1{transition-property:none}}._button_rx9be_1 span{margin-left:.25rem}._disabled_rx9be_17,._button_rx9be_1:hover{opacity:.7}._press_rx9be_22{transform:scale(.95)}._hidden_rx9be_26{display:none!important}._spinner_rx9be_30{width:24px;height:24px}._cardForm_isqbi_1{display:grid;gap:.75rem;padding-top:0}._hidden_isqbi_5{display:none!important}._wrapper_4knhb_1{position:relative}._inputContainer_4knhb_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_4knhb_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_4knhb_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_4knhb_10,._inputContainer_4knhb_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_4knhb_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_4knhb_20{display:flex}._errorInput_4knhb_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_4knhb_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_4knhb_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._label_4knhb_28{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_4knhb_32{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_4knhb_36{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_4knhb_40{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_4knhb_47{display:none!important}._wrapper_j8wuo_1{position:relative}._inputContainer_j8wuo_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_j8wuo_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_j8wuo_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_j8wuo_10,._inputContainer_j8wuo_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_j8wuo_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_j8wuo_20{display:flex}._errorInput_j8wuo_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_j8wuo_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_j8wuo_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._error_j8wuo_24{margin-top:.25rem;margin-bottom:0;padding-left:.25rem;font-size:.75rem;line-height:1rem;font-weight:400;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._label_j8wuo_32{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_j8wuo_36{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_j8wuo_40{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_j8wuo_44{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_j8wuo_51{display:none!important}._wrapper_1xdj3_1{position:relative}._inputContainer_1xdj3_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_1xdj3_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_1xdj3_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1xdj3_10,._inputContainer_1xdj3_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_1xdj3_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_1xdj3_20{display:flex;align-items:center;justify-content:center}._errorInput_1xdj3_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_1xdj3_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_1xdj3_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._error_1xdj3_24{margin-top:.25rem;margin-bottom:0;padding-left:.25rem;font-size:.75rem;line-height:1rem;font-weight:400;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._label_1xdj3_32{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_1xdj3_36{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1xdj3_40{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1xdj3_44{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_1xdj3_51{display:none!important}._securityContent_1xdj3_55{display:grid;grid-column-gap:5px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,auto))}._container_94v1h_1{display:flex;width:100%;flex-grow:1;flex-direction:row;align-items:center;justify-content:flex-start;-moz-column-gap:.25rem;column-gap:.25rem;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(254 231 239 / var(--tw-bg-opacity, 1));padding:.75rem 1rem}._container_94v1h_1:is(._dark_94v1h_1 *){background-color:#fee7ef80;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}._container_94v1h_1 svg{width:16px;height:16px}._title_94v1h_10{padding:0;padding-left:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:300;--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}._title_94v1h_10:is(._dark_94v1h_1 *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}._container_hoha1_1{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center}._title_hoha1_5{margin-top:.5rem;font-weight:300}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(ne);let ie=null;function be(){return z(this,null,function*(){return ie||(ie=new Promise((r,t)=>{const e=document.createElement("script");if(e.src="https://js.evervault.com/v2",e.onload=()=>r(),e.onerror=()=>{ie=null,t()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(e)}),ie)})}function We(){return z(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield be(),window.Evervault}catch(r){throw new Error("Failed to load Evervault.js")}})}function Tt(r,t,e){return z(this,null,function*(){const n=yield We();return new n(r,t,e)})}Promise.resolve().then(()=>{We()});let It=class{constructor(t){y(this,"apple",null);y(this,"isAvailable",!1);y(this,"onReady");this.ev=t}init(c,d){return z(this,arguments,function*({transaction:t,locale:e,supportedCardTypes:n,onReady:i,onError:a,onSuccess:s,onCancel:o},l){const u=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(u,X(j({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},l==null?void 0:l.styles),{allowedCardNetworks:n,requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(f,v)=>z(this,[f,v],function*(p,{fail:m}){try{s==null||s(p)}catch(b){console.error(b),m({message:"Cannot pay with payment credentials"})}})}));const h=yield this.apple.availability();this.isAvailable=!0,console.log("Apple Pay availability",h),this.isAvailable||console.error("Apple Pay is not available",h),a&&this.apple.on("error",a),o&&this.apple.on("cancel",o),this.onReady=i})}render(t){return z(this,null,function*(){var e;!this.apple||!this.isAvailable||(t.innerHTML="",yield this.apple.mount(t),(e=this.onReady)==null||e.call(this))})}},Ge=class{constructor(t){y(this,"google",null);this.ev=t}init(l,c){return z(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:i,onSuccess:a,onCancel:s},o){const d=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(d,X(j({locale:e,size:{width:"100%",height:"42px"},borderRadius:12,billingAddress:{phoneNumber:!0}},o==null?void 0:o.styles),{process:(p,m)=>z(this,[p,m],function*(u,{fail:h}){try{a==null||a(u)}catch(f){console.error(f),h({message:"Cannot pay with payment credentials"})}})})),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),i&&this.google.on("error",i)})}render(t){return z(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class se{constructor(){y(this,"listeners",[])}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}addListener(t){return this.listeners.push(t),()=>this.removeListener(t)}emit(t){for(const e of this.listeners)e(t)}clear(){this.listeners=[]}}class Ye{constructor(t){y(this,"threeDs",null);this.ev=t}init(a){return z(this,arguments,function*({threeDsId:t,onReady:e,onSuccess:n,onError:i}){this.threeDs=this.ev.ui.threeDSecure(t),this.threeDs.on("ready",()=>e==null?void 0:e()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>i==null?void 0:i()),this.threeDs.on("error",()=>i==null?void 0:i())})}render(t){return z(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class ji{constructor(){y(this,"isReady",!1);y(this,"ev",null);y(this,"apple",null);y(this,"google",null);y(this,"threeDs",null);y(this,"events",{ready:new se})}isShouldLoad({teamId:t,appId:e}){var n,i;return((n=this.ev)==null?void 0:n.config.appId)!==e||((i=this.ev)==null?void 0:i.config.teamId)!==t}initEv(t){return z(this,null,function*(){this.isShouldLoad(t)&&(this.isReady=!1,this.ev=yield Tt(t.teamId,t.appId),this.apple=new It(this.ev),this.google=new Ge(this.ev),this.events.ready.emit(),this.isReady=!0)})}initThreeDs(t){return z(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new Ye(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return z(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(t,e)})}initGoogle(t,e){return z(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(t,e)})}isAppleAvailable(){var t;return!!((t=this.apple)!=null&&t.isAvailable)}addEventListener(t,e){return this.events[t].addListener(e)}renderApple(t){return z(this,null,function*(){var e;return yield(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return z(this,null,function*(){var e;return yield(e=this.google)==null?void 0:e.render(t)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function xt(r){return typeof r=="object"&&!Array.isArray(r)}function zi(r,t,e){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let i=document;const a=(n=e==null?void 0:e[r])!=null?n:i.querySelectorAll(r);return a?Array.from(a):[]}return Array.from(r)}function Cr(r,t,e,n){return typeof r=="string"&&xt(t)?zi(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function Ki(r,t,e){return r*(t+1)}function wr(r,t,e,n){var i;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,r+parseFloat(t)):t==="<"?e:(i=n.get(t))!=null?i:r}const $e=(r,t,e)=>r+(t-r)*e,qi=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},Ar=r=>Array.isArray(r)&&typeof r[0]!="number";function Tr(r,t){return Ar(r)?r[qi(0,r.length,t)]:r}function Hi(r,t){r.indexOf(t)===-1&&r.push(t)}function Ir(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function Wi(r,t,e){for(let n=0;n<r.length;n++){const i=r[n];i.at>t&&i.at<e&&(Ir(r,i),n--)}}function Gi(r,t,e,n,i,a){Wi(r,i,a);for(let s=0;s<t.length;s++)r.push({value:t[s],at:$e(i,a,n[s]),easing:Tr(e,s)})}function Yi(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function $i(r,t){return r.at===t.at?r.value===null?1:t.value===null?-1:0:r.at-t.at}const ve=r=>!!(r&&r.getVelocity),Ot=(r,t,e)=>{const n=t-r;return n===0?1:(e-r)/n};function xr(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const i=Ot(0,t,n);r.push($e(e,1,i))}}function Or(r){const t=[0];return xr(t,r.length-1),t}function Nt(r){return typeof r=="function"&&"applyToOptions"in r}const pt=2e4;function Lt(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<pt;)t+=e,n=r.next(t);return t>=pt?1/0:t}const Ee=r=>r*1e3,Te=r=>r/1e3;function Nr(r,t=100,e){const n=e(X(j({},r),{keyframes:[0,t]})),i=Math.min(Lt(n),pt);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:Te(i)}}let Qe=()=>{},Ie=()=>{};process.env.NODE_ENV!=="production"&&(Qe=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Ie=(r,t)=>{if(!r)throw new Error(t)});const Qi="easeInOut",Zi=20;function Xi(r,a={},n,i){var s=a,{defaultTransition:t={}}=s,e=Ce(s,["defaultTransition"]);const o=t.duration||.3,l=new Map,c=new Map,d={},u=new Map;let h=0,p=0,m=0;for(let f=0;f<r.length;f++){const v=r[f];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,wr(p,v.at,h,u));continue}let[b,A,T={}]=v;T.at!==void 0&&(p=wr(p,T.at,h,u));let L=0;const C=(I,x,P,U=0,H=0)=>{const W=Ji(I),V=x,{delay:S=0,times:F=Or(W),type:q="keyframes",repeat:ee,repeatType:M,repeatDelay:$=0}=V,K=Ce(V,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:g=t.ease||"easeOut",duration:_}=x;const R=typeof S=="function"?S(U,H):S,B=W.length,E=Nt(q)?q:i==null?void 0:i[q];if(B<=2&&E){let N=100;if(B===2&&ra(W)){const de=W[1]-W[0];N=Math.abs(de)}const G=j({},K);_!==void 0&&(G.duration=Ee(_));const J=Nr(G,N,E);g=J.ease,_=J.duration}_!=null||(_=o);const O=p+R;F.length===1&&F[0]===0&&(F[1]=1);const w=F.length-W.length;if(w>0&&xr(F,w),W.length===1&&W.unshift(null),ee){Ie(ee<Zi,"Repeat count too high, must be less than 20"),_=Ki(_,ee);const N=[...W],G=[...F];g=Array.isArray(g)?[...g]:[g];const J=[...g];for(let de=0;de<ee;de++){W.push(...N);for(let D=0;D<N.length;D++)F.push(G[D]+(de+1)),g.push(D===0?"linear":Tr(J,D-1))}Yi(F,ee)}const k=O+_;Gi(P,W,g,F,O,k),L=Math.max(R+_,L),m=Math.max(k,m)};if(ve(b)){const I=Lr(b,c);C(A,T,kr("default",I))}else{const I=Cr(b,A,n,d),x=I.length;for(let P=0;P<x;P++){A=A,T=T;const U=I[P],H=Lr(U,c);for(const W in A)C(A[W],ea(T,W),kr(W,H),P,x)}}h=p,p+=L}return c.forEach((f,v)=>{for(const b in f){const A=f[b];A.sort($i);const T=[],L=[],C=[];for(let x=0;x<A.length;x++){const{at:P,value:U,easing:H}=A[x];T.push(U),L.push(Ot(0,m,P)),C.push(H||"easeOut")}L[0]!==0&&(L.unshift(0),T.unshift(T[0]),C.unshift(Qi)),L[L.length-1]!==1&&(L.push(1),T.push(null)),l.has(v)||l.set(v,{keyframes:{},transition:{}});const I=l.get(v);I.keyframes[b]=T,I.transition[b]=j(X(j({},t),{duration:m,ease:C,times:L}),e)}}),l}function Lr(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function kr(r,t){return t[r]||(t[r]=[]),t[r]}function Ji(r){return Array.isArray(r)?r:[r]}function ea(r,t){return r&&r[t]?j(j({},r),r[t]):j({},r)}const ta=r=>typeof r=="number",ra=r=>r.every(ta),Ze=new WeakMap,na=r=>Array.isArray(r);function Pr(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Rr(r,t,e,n){if(typeof t=="function"){const[i,a]=Pr(n);t=t(e!==void 0?e:r.custom,i,a)}if(typeof t=="string"&&(t=r.variants&&r.variants[t]),typeof t=="function"){const[i,a]=Pr(n);t=t(e!==void 0?e:r.custom,i,a)}return t}function ia(r,t,e){const n=r.getProps();return Rr(n,t,n.custom,r)}const ht=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function aa(r,t){let e=new Set,n=new Set,i=!1,a=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(d){s.has(d)&&(c.schedule(d),r()),d(o)}const c={schedule:(d,u=!1,h=!1)=>{const m=h&&i?e:n;return u&&s.add(d),m.has(d)||m.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,i){a=!0;return}i=!0,[e,n]=[n,e],e.forEach(l),e.clear(),i=!1,a&&(a=!1,c.process(d))}};return c}const xe={},sa=40;function oa(r,t){let e=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>e=!0,s=ht.reduce((T,L)=>(T[L]=aa(a),T),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=s,f=()=>{const T=xe.useManualTiming?i.timestamp:performance.now();e=!1,xe.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(T-i.timestamp,sa),1)),i.timestamp=T,i.isProcessing=!0,o.process(i),l.process(i),c.process(i),d.process(i),u.process(i),h.process(i),p.process(i),m.process(i),i.isProcessing=!1,e&&t&&(n=!1,r(f))},v=()=>{e=!0,n=!0,i.isProcessing||r(f)};return{schedule:ht.reduce((T,L)=>{const C=s[L];return T[L]=(I,x=!1,P=!1)=>(e||v(),C.schedule(I,x,P)),T},{}),cancel:T=>{for(let L=0;L<ht.length;L++)s[ht[L]].cancel(T)},state:i,steps:s}}const De=r=>r,{schedule:Oe,cancel:kt,state:mt}=oa(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:De,!0);let ft;function la(){ft=void 0}const ye={now:()=>(ft===void 0&&ye.set(mt.isProcessing||xe.useManualTiming?mt.timestamp:performance.now()),ft),set:r=>{ft=r,queueMicrotask(la)}},Mr=new Set;function Sr(r,t,e){r||Mr.has(t)||(console.warn(t),Mr.add(t))}class Dr{constructor(){this.subscriptions=[]}add(t){return Hi(this.subscriptions,t),()=>Ir(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,e,n);else for(let a=0;a<i;a++){const s=this.subscriptions[a];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Vr(r,t){return t?r*(1e3/t):0}const Fr=30,ca=r=>!isNaN(parseFloat(r));class da{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{var s,o;const a=ye.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();i&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ca(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Sr(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Dr);const n=this.events[t].add(e);return t==="change"?()=>{n(),Oe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fr)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Fr);return Vr(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;(t=this.dependents)==null||t.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xe(r,t){return new da(r,t)}function ua(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,Xe(e))}function pa(r){return na(r)?r[r.length-1]||0:r}function ha(r,t){let s=ia(r,t)||{},{transitionEnd:n={},transition:i={}}=s,a=Ce(s,["transitionEnd","transition"]);a=j(j({},a),n);for(const o in a){const l=pa(a[o]);ua(r,o,l)}}function ma(r){return!!(ve(r)&&r.add)}function fa(r,t){const e=r.getValue("willChange");if(ma(e))return e.add(t);if(!e&&xe.WillChange){const n=new xe.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const Pt=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),va="data-"+Pt("framerAppearId");function ga(r){return r.props[va]}const ba=r=>r!==null;function ya(r,{repeat:t,repeatType:e="loop"},n){const i=r.filter(ba),a=t&&e!=="loop"&&t%2===1?0:i.length-1;return i[a]}const Ve=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fe=new Set(Ve),_a={type:"spring",stiffness:500,damping:25,restSpeed:10},Ea=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),Ca={type:"keyframes",duration:.8},wa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Aa=(r,{keyframes:t})=>t.length>2?Ca:Fe.has(r)?r.startsWith("scale")?Ea(t[1]):_a:wa;function Ta(u){var h=u,{when:r,delay:t,delayChildren:e,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:l,elapsed:c}=h,d=Ce(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Ur(r,t){var e,n;return(n=(e=r==null?void 0:r[t])!=null?e:r==null?void 0:r.default)!=null?n:r}const Br=r=>t=>typeof t=="string"&&t.startsWith(r),jr=Br("--"),Ia=Br("var(--"),Rt=r=>Ia(r)?xa.test(r.split("/*")[0].trim()):!1,xa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ke=(r,t,e)=>e>t?t:e<r?r:e,Ue={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},Je=X(j({},Ue),{transform:r=>ke(0,1,r)}),vt=X(j({},Ue),{default:1}),et=r=>Math.round(r*1e5)/1e5,Mt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Oa(r){return r==null}const Na=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,St=(r,t)=>e=>!!(typeof e=="string"&&Na.test(e)&&e.startsWith(r)||t&&!Oa(e)&&Object.prototype.hasOwnProperty.call(e,t)),zr=(r,t,e)=>n=>{if(typeof n!="string")return n;const[i,a,s,o]=n.match(Mt);return{[r]:parseFloat(i),[t]:parseFloat(a),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},La=r=>ke(0,255,r),Dt=X(j({},Ue),{transform:r=>Math.round(La(r))}),Pe={test:St("rgb","red"),parse:zr("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+Dt.transform(r)+", "+Dt.transform(t)+", "+Dt.transform(e)+", "+et(Je.transform(n))+")"};function ka(r){let t="",e="",n="",i="";return r.length>5?(t=r.substring(1,3),e=r.substring(3,5),n=r.substring(5,7),i=r.substring(7,9)):(t=r.substring(1,2),e=r.substring(2,3),n=r.substring(3,4),i=r.substring(4,5),t+=t,e+=e,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const Vt={test:St("#"),parse:ka,transform:Pe.transform},tt=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Ne=tt("deg"),Be=tt("%"),Q=tt("px"),Pa=tt("vh"),Ra=tt("vw"),Kr=X(j({},Be),{parse:r=>Be.parse(r)/100,transform:r=>Be.transform(r*100)}),je={test:St("hsl","hue"),parse:zr("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+Be.transform(et(t))+", "+Be.transform(et(e))+", "+et(Je.transform(n))+")"},me={test:r=>Pe.test(r)||Vt.test(r)||je.test(r),parse:r=>Pe.test(r)?Pe.parse(r):je.test(r)?je.parse(r):Vt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Pe.transform(r):je.transform(r)},Ma=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sa(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(Mt))==null?void 0:t.length)||0)+(((e=r.match(Ma))==null?void 0:e.length)||0)>0}const qr="number",Hr="color",Da="var",Va="var(",Wr="${}",Fa=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function rt(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(Fa,l=>(me.test(l)?(n.color.push(a),i.push(Hr),e.push(me.parse(l))):l.startsWith(Va)?(n.var.push(a),i.push(Da),e.push(l)):(n.number.push(a),i.push(qr),e.push(parseFloat(l))),++a,Wr)).split(Wr);return{values:e,split:o,indexes:n,types:i}}function Gr(r){return rt(r).values}function Yr(r){const{split:t,types:e}=rt(r),n=t.length;return i=>{let a="";for(let s=0;s<n;s++)if(a+=t[s],i[s]!==void 0){const o=e[s];o===qr?a+=et(i[s]):o===Hr?a+=me.transform(i[s]):a+=i[s]}return a}}const Ua=r=>typeof r=="number"?0:r;function Ba(r){const t=Gr(r);return Yr(r)(t.map(Ua))}const ze={test:Sa,parse:Gr,createTransformer:Yr,getAnimatableNone:Ba};function Ft(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function ja({hue:r,saturation:t,lightness:e,alpha:n}){r/=360,t/=100,e/=100;let i=0,a=0,s=0;if(!t)i=a=s=e;else{const o=e<.5?e*(1+t):e+t-e*t,l=2*e-o;i=Ft(l,o,r+1/3),a=Ft(l,o,r),s=Ft(l,o,r-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:n}}function gt(r,t){return e=>e>0?t:r}const Ut=(r,t,e)=>{const n=r*r,i=e*(t*t-n)+n;return i<0?0:Math.sqrt(i)},za=[Vt,Pe,je],Ka=r=>za.find(t=>t.test(r));function $r(r){const t=Ka(r);if(Qe(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===je&&(e=ja(e)),e}const Qr=(r,t)=>{const e=$r(r),n=$r(t);if(!e||!n)return gt(r,t);const i=j({},e);return a=>(i.red=Ut(e.red,n.red,a),i.green=Ut(e.green,n.green,a),i.blue=Ut(e.blue,n.blue,a),i.alpha=$e(e.alpha,n.alpha,a),Pe.transform(i))},Bt=new Set(["none","hidden"]);function qa(r,t){return Bt.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const Ha=(r,t)=>e=>t(r(e)),jt=(...r)=>r.reduce(Ha);function Wa(r,t){return e=>$e(r,t,e)}function zt(r){return typeof r=="number"?Wa:typeof r=="string"?Rt(r)?gt:me.test(r)?Qr:$a:Array.isArray(r)?Zr:typeof r=="object"?me.test(r)?Qr:Ga:gt}function Zr(r,t){const e=[...r],n=e.length,i=r.map((a,s)=>zt(a)(a,t[s]));return a=>{for(let s=0;s<n;s++)e[s]=i[s](a);return e}}function Ga(r,t){const e=j(j({},r),t),n={};for(const i in e)r[i]!==void 0&&t[i]!==void 0&&(n[i]=zt(r[i])(r[i],t[i]));return i=>{for(const a in n)e[a]=n[a](i);return e}}function Ya(r,t){var i;const e=[],n={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const s=t.types[a],o=r.indexes[s][n[s]],l=(i=r.values[o])!=null?i:0;e[a]=l,n[s]++}return e}const $a=(r,t)=>{const e=ze.createTransformer(t),n=rt(r),i=rt(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Bt.has(r)&&!i.values.length||Bt.has(t)&&!n.values.length?qa(r,t):jt(Zr(Ya(n,i),i.values),e):(Qe(!0,`Complex values '${r}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),gt(r,t))};function Xr(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?$e(r,t,e):zt(r)(r,t)}const Qa=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>Oe.update(t,e),stop:()=>kt(t),now:()=>mt.isProcessing?mt.timestamp:ye.now()}},Jr=(r,t,e=10)=>{let n="";const i=Math.max(Math.round(t/e),2);for(let a=0;a<i;a++)n+=r(a/(i-1))+", ";return`linear(${n.substring(0,n.length-2)})`},Za=5;function en(r,t,e){const n=Math.max(t-Za,0);return Vr(e-r(n),t-n)}const le={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},tn=.001;function Xa({duration:r=le.duration,bounce:t=le.bounce,velocity:e=le.velocity,mass:n=le.mass}){let i,a;Qe(r<=Ee(le.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=ke(le.minDamping,le.maxDamping,s),r=ke(le.minDuration,le.maxDuration,Te(r)),s<1?(i=c=>{const d=c*s,u=d*r,h=d-e,p=Kt(c,s),m=Math.exp(-u);return tn-h/p*m},a=c=>{const u=c*s*r,h=u*e+e,p=Math.pow(s,2)*Math.pow(c,2)*r,m=Math.exp(-u),f=Kt(Math.pow(c,2),s);return(-i(c)+tn>0?-1:1)*((h-p)*m)/f}):(i=c=>{const d=Math.exp(-c*r),u=(c-e)*r+1;return-.001+d*u},a=c=>{const d=Math.exp(-c*r),u=(e-c)*(r*r);return d*u});const o=5/r,l=es(i,a,o);if(r=Ee(r),isNaN(l))return{stiffness:le.stiffness,damping:le.damping,duration:r};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:s*2*Math.sqrt(n*c),duration:r}}}const Ja=12;function es(r,t,e){let n=e;for(let i=1;i<Ja;i++)n=n-r(n)/t(n);return n}function Kt(r,t){return r*Math.sqrt(1-t*t)}const ts=["duration","bounce"],rs=["stiffness","damping","mass"];function rn(r,t){return t.some(e=>r[e]!==void 0)}function ns(r){let t=j({velocity:le.velocity,stiffness:le.stiffness,damping:le.damping,mass:le.mass,isResolvedFromDuration:!1},r);if(!rn(r,rs)&&rn(r,ts))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),i=n*n,a=2*ke(.05,1,1-(r.bounce||0))*Math.sqrt(i);t=X(j({},t),{mass:le.mass,stiffness:i,damping:a})}else{const e=Xa(r);t=X(j(j({},t),e),{mass:le.mass}),t.isResolvedFromDuration=!0}return t}function nt(r=le.visualDuration,t=le.bounce){const e=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:t}:r;let{restSpeed:n,restDelta:i}=e;const a=e.keyframes[0],s=e.keyframes[e.keyframes.length-1],o={done:!1,value:a},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=ns(X(j({},e),{velocity:-Te(e.velocity||0)})),m=h||0,f=c/(2*Math.sqrt(l*d)),v=s-a,b=Te(Math.sqrt(l/d)),A=Math.abs(v)<5;n||(n=A?le.restSpeed.granular:le.restSpeed.default),i||(i=A?le.restDelta.granular:le.restDelta.default);let T;if(f<1){const C=Kt(b,f);T=I=>{const x=Math.exp(-f*b*I);return s-x*((m+f*b*v)/C*Math.sin(C*I)+v*Math.cos(C*I))}}else if(f===1)T=C=>s-Math.exp(-b*C)*(v+(m+b*v)*C);else{const C=b*Math.sqrt(f*f-1);T=I=>{const x=Math.exp(-f*b*I),P=Math.min(C*I,300);return s-x*((m+f*b*v)*Math.sinh(P)+C*v*Math.cosh(P))/C}}const L={calculatedDuration:p&&u||null,next:C=>{const I=T(C);if(p)o.done=C>=u;else{let x=C===0?m:0;f<1&&(x=C===0?Ee(m):en(T,C,I));const P=Math.abs(x)<=n,U=Math.abs(s-I)<=i;o.done=P&&U}return o.value=o.done?s:I,o},toString:()=>{const C=Math.min(Lt(L),pt),I=Jr(x=>L.next(C*x).value,C,30);return C+"ms "+I},toTransition:()=>{}};return L}nt.applyToOptions=r=>{const t=Nr(r,100,nt);return r.ease=t.ease,r.duration=Ee(t.duration),r.type="keyframes",r};function qt({keyframes:r,velocity:t=0,power:e=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=P=>o!==void 0&&P<o||l!==void 0&&P>l,m=P=>o===void 0?l:l===void 0||Math.abs(o-P)<Math.abs(l-P)?o:l;let f=e*t;const v=u+f,b=s===void 0?v:s(v);b!==v&&(f=b-u);const A=P=>-f*Math.exp(-P/n),T=P=>b+A(P),L=P=>{const U=A(P),H=T(P);h.done=Math.abs(U)<=c,h.value=h.done?b:H};let C,I;const x=P=>{p(h.value)&&(C=P,I=nt({keyframes:[h.value,m(h.value)],velocity:en(T,P,h.value),damping:i,stiffness:a,restDelta:c,restSpeed:d}))};return x(0),{calculatedDuration:null,next:P=>{let U=!1;return!I&&C===void 0&&(U=!0,L(P),x(P)),C!==void 0&&P>=C?I.next(P-C):(!U&&L(P),h)}}}function is(r,t,e){const n=[],i=e||xe.mix||Xr,a=r.length-1;for(let s=0;s<a;s++){let o=i(r[s],r[s+1]);if(t){const l=Array.isArray(t)?t[s]||De:t;o=jt(l,o)}n.push(o)}return n}function as(r,t,{clamp:e=!0,ease:n,mixer:i}={}){const a=r.length;if(Ie(a===t.length,"Both input and output ranges must be the same length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const s=r[0]===r[1];r[0]>r[a-1]&&(r=[...r].reverse(),t=[...t].reverse());const o=is(t,n,i),l=o.length,c=d=>{if(s&&d<r[0])return t[0];let u=0;if(l>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Ot(r[u],r[u+1],d);return o[u](h)};return e?d=>c(ke(r[0],r[a-1],d)):c}function ss(r,t){return r.map(e=>e*t)}const nn=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,os=1e-7,ls=12;function cs(r,t,e,n,i){let a,s,o=0;do s=t+(e-t)/2,a=nn(s,n,i)-r,a>0?e=s:t=s;while(Math.abs(a)>os&&++o<ls);return s}function it(r,t,e,n){if(r===t&&e===n)return De;const i=a=>cs(a,0,1,r,e);return a=>a===0||a===1?a:nn(i(a),t,n)}const ds=it(.42,0,1,1),us=it(0,0,.58,1),an=it(.42,0,.58,1),sn=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,on=r=>t=>1-r(1-t),ln=it(.33,1.53,.69,.99),Ht=on(ln),cn=sn(Ht),dn=r=>(r*=2)<1?.5*Ht(r):.5*(2-Math.pow(2,-10*(r-1))),Wt=r=>1-Math.sin(Math.acos(r)),ps=on(Wt),un=sn(Wt),pn=r=>Array.isArray(r)&&typeof r[0]=="number",hn={linear:De,easeIn:ds,easeInOut:an,easeOut:us,circIn:Wt,circInOut:un,circOut:ps,backIn:Ht,backInOut:cn,backOut:ln,anticipate:dn},hs=r=>typeof r=="string",mn=r=>{if(pn(r)){Ie(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,i]=r;return it(t,e,n,i)}else if(hs(r))return Ie(hn[r]!==void 0,`Invalid easing type '${r}'`),hn[r];return r};function ms(r,t){return r.map(()=>t||an).splice(0,r.length-1)}function Ke({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const i=Ar(n)?n.map(mn):mn(n),a={done:!1,value:t[0]},s=ss(e&&e.length===t.length?e:Or(t),r),o=as(s,t,{ease:Array.isArray(i)?i:ms(t,i)});return{calculatedDuration:r,next:l=>(a.value=o(l),a.done=l>=r,a)}}const fs=r=>r!==null;function Gt(r,{repeat:t,repeatType:e="loop"},n,i=1){const a=r.filter(fs),o=i<0||t&&e!=="loop"&&t%2===1?0:a.length-1;return!o||n===void 0?a[o]:n}const vs={decay:qt,inertia:qt,tween:Ke,keyframes:Ke,spring:nt};function fn(r){typeof r.type=="string"&&(r.type=vs[r.type])}class Yt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const gs=r=>r/100;class $t extends Yt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,i;const{motionValue:e}=this.options;e&&e.updatedAt!==ye.now()&&this.tick(ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;fn(t);const{type:e=Ke,repeat:n=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=t;let{keyframes:o}=t;const l=e||Ke;process.env.NODE_ENV!=="production"&&l!==Ke&&Ie(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),l!==Ke&&typeof o[0]!="number"&&(this.mixKeyframes=jt(gs,Xr(o[0],o[1])),o=[0,100]);const c=l(X(j({},t),{keyframes:o}));a==="mirror"&&(this.mirroredGenerator=l(X(j({},t),{keyframes:[...o].reverse(),velocity:-s}))),c.calculatedDuration===null&&(c.calculatedDuration=Lt(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=c}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:c=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,L=n;if(u){const P=Math.min(this.currentTime,i)/o;let U=Math.floor(P),H=P%1;!H&&P>=1&&(H=1),H===1&&U--,U=Math.min(U,u+1),!!(U%2)&&(h==="reverse"?(H=1-H,p&&(H-=p/o)):h==="mirror"&&(L=s)),T=ke(0,1,H)*o}const C=A?{done:!1,value:d[0]}:L.next(T);a&&(C.value=a(C.value));let{done:I}=C;!A&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const x=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return x&&m!==qt&&(C.value=Gt(d,this.options,v,this.speed)),f&&f(C.value),x&&this.finish(),C}then(t,e){return this.finished.then(t,e)}get duration(){return Te(this.calculatedDuration)}get time(){return Te(this.currentTime)}set time(t){var e;t=Ee(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(e=this.driver)==null||e.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ye.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Te(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=Qa,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(a=(i=this.options).onPlay)==null||a.call(i);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e!=null?e:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(t=this.options).onComplete)==null||e.call(t)}cancel(){var t,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(t=this.options).onCancel)==null||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),t.observe(this)}}function bs(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const Re=r=>r*180/Math.PI,Qt=r=>{const t=Re(Math.atan2(r[1],r[0]));return Zt(t)},ys={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:Qt,rotateZ:Qt,skewX:r=>Re(Math.atan(r[1])),skewY:r=>Re(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},Zt=r=>(r=r%360,r<0&&(r+=360),r),vn=Qt,gn=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),bn=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),_s={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gn,scaleY:bn,scale:r=>(gn(r)+bn(r))/2,rotateX:r=>Zt(Re(Math.atan2(r[6],r[5]))),rotateY:r=>Zt(Re(Math.atan2(-r[2],r[0]))),rotateZ:vn,rotate:vn,skewX:r=>Re(Math.atan(r[4])),skewY:r=>Re(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function Xt(r){return r.includes("scale")?1:0}function Jt(r,t){if(!r||r==="none")return Xt(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(e)n=_s,i=e;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ys,i=o}if(!i)return Xt(t);const a=n[t],s=i[1].split(",").map(Cs);return typeof a=="function"?a(s):s[a]}const Es=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return Jt(e,t)};function Cs(r){return parseFloat(r.trim())}const yn=r=>r===Ue||r===Q,ws=new Set(["x","y","z"]),As=Ve.filter(r=>!ws.has(r));function Ts(r){const t=[];return As.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const Me={width:({x:r},{paddingLeft:t="0",paddingRight:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),height:({y:r},{paddingTop:t="0",paddingBottom:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),top:(r,{top:t})=>parseFloat(t),left:(r,{left:t})=>parseFloat(t),bottom:({y:r},{top:t})=>parseFloat(t)+(r.max-r.min),right:({x:r},{left:t})=>parseFloat(t)+(r.max-r.min),x:(r,{transform:t})=>Jt(t,"x"),y:(r,{transform:t})=>Jt(t,"y")};Me.translateX=Me.x,Me.translateY=Me.y;const Se=new Set;let er=!1,tr=!1,rr=!1;function _n(){if(tr){const r=Array.from(Se).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const i=Ts(n);i.length&&(e.set(n,i),n.render())}),r.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const i=e.get(n);i&&i.forEach(([a,s])=>{var o;(o=n.getValue(a))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}tr=!1,er=!1,Se.forEach(r=>r.complete(rr)),Se.clear()}function En(){Se.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(tr=!0)})}function Is(){rr=!0,En(),_n(),rr=!1}class nr{constructor(t,e,n,i,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Se.add(this),er||(er=!0,Oe.read(En),Oe.resolveKeyframes(_n))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&e){const o=n.readValue(e,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}bs(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Se.delete(this)}cancel(){this.state==="scheduled"&&(Se.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xs=r=>r.startsWith("--");function Os(r,t,e){xs(t)?r.style.setProperty(t,e):r.style[t]=e}function ir(r){let t;return()=>(t===void 0&&(t=r()),t)}const Ns=ir(()=>window.ScrollTimeline!==void 0),Ls={};function ks(r,t){const e=ir(r);return()=>{var n;return(n=Ls[t])!=null?n:e()}}const Cn=ks(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),at=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,wn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:at([0,.65,.55,1]),circOut:at([.55,0,1,.45]),backIn:at([.31,.01,.66,-.59]),backOut:at([.33,1.53,.69,.99])};function An(r,t){if(r)return typeof r=="function"?Cn()?Jr(r,t):"ease-out":pn(r)?at(r):Array.isArray(r)?r.map(e=>An(e,t)||wn.easeOut):wn[r]}function Ps(r,t,e,{delay:n=0,duration:i=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:l}={},c=void 0){const d={[t]:e};l&&(d.offset=l);const u=An(o,i);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),r.animate(d,h)}function Rs(e){var n=e,{type:r}=n,t=Ce(n,["type"]);var i,a;return Nt(r)&&Cn()?r.applyToOptions(t):((i=t.duration)!=null||(t.duration=300),(a=t.ease)!=null||(t.ease="easeOut"),t)}class Ms extends Yt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:o,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=t,Ie(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=Rs(t);this.animation=Ps(e,n,i,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=Gt(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Os(e,n,d),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,e;(e=(t=this.animation).finish)==null||e.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,e;this.isPseudoElement||(e=(t=this.animation).commitStyles)==null||e.call(t)}get duration(){var e,n;const t=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return Te(Number(t))}get time(){return Te(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ee(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ns()?(this.animation.timeline=t,De):e(this)}}const Tn={anticipate:dn,backInOut:cn,circInOut:un};function Ss(r){return r in Tn}function Ds(r){typeof r.ease=="string"&&Ss(r.ease)&&(r.ease=Tn[r.ease])}const In=10;class Vs extends Ms{constructor(t){Ds(t),fn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const c=this.options,{motionValue:e,onUpdate:n,onComplete:i,element:a}=c,s=Ce(c,["motionValue","onUpdate","onComplete","element"]);if(!e)return;if(t!==void 0){e.set(t);return}const o=new $t(X(j({},s),{autoplay:!1})),l=Ee((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(l-In).value,o.sample(l).value,In),o.stop()}}const xn=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(ze.test(r)||r==="0")&&!r.startsWith("url("));function Fs(r){const t=r[0];if(r.length===1)return!0;for(let e=0;e<r.length;e++)if(r[e]!==t)return!0}function Us(r,t,e,n){const i=r[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=r[r.length-1],s=xn(i,t),o=xn(a,t);return Qe(s===o,`You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!s||!o?!1:Fs(r)||(e==="spring"||Nt(e))&&n}function On(r){return typeof r=="object"&&r!==null}function Bs(r){return On(r)&&"offsetHeight"in r}const js=new Set(["opacity","clipPath","filter","transform"]),zs=ir(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ks(r){var c;const{motionValue:t,name:e,repeatDelay:n,repeatType:i,damping:a,type:s}=r;if(!Bs((c=t==null?void 0:t.owner)==null?void 0:c.current))return!1;const{onUpdate:o,transformTemplate:l}=t.owner.getProps();return zs()&&e&&js.has(e)&&(e!=="transform"||!l)&&!o&&!n&&i!=="mirror"&&a!==0&&s!=="inertia"}const qs=40;class Hs extends Yt{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",keyframes:o,name:l,motionValue:c,element:d}=p,u=Ce(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var b,A;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=ye.now();const m=j({autoplay:t,delay:e,type:n,repeat:i,repeatDelay:a,repeatType:s,name:l,motionValue:c,element:d},u),f=(d==null?void 0:d.KeyframeResolver)||nr;this.keyframeResolver=new f(o,(b,A,T)=>this.onKeyframesResolved(b,A,m,!T),l,c,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:a,type:s,velocity:o,delay:l,isHandoff:c,onUpdate:d}=n;this.resolvedAt=ye.now(),Us(t,a,s,o)||((xe.instantAnimations||!l)&&(d==null||d(Gt(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=i?this.resolvedAt?this.resolvedAt-this.createdAt>qs?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=X(j({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!c&&Ks(h)?new Vs(X(j({},h),{element:h.motionValue.owner.current})):new $t(h);p.finished.then(()=>this.notifyFinished()).catch(De),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Is()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Nn=(r,t,e,n={},i,a)=>s=>{const o=Ur(n,r)||{},l=o.delay||n.delay||0;let{elapsed:c=0}=n;c=c-Ee(l);const d=X(j({keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity()},o),{delay:-c,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:t,element:a?void 0:i});Ta(o)||Object.assign(d,Aa(r,d)),d.duration&&(d.duration=Ee(d.duration)),d.repeatDelay&&(d.repeatDelay=Ee(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),(xe.instantAnimations||xe.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!a&&t.get()!==void 0){const h=ya(d.keyframes,o);if(h!==void 0){Oe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new $t(d):new Hs(d)},Ln=new Set(["width","height","top","left","right","bottom",...Ve]);function Ws({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function Gs(r,t,{delay:e=0,transitionOverride:n,type:i}={}){var u;let d=t,{transition:a=r.getDefaultTransition(),transitionEnd:s}=d,o=Ce(d,["transition","transitionEnd"]);n&&(a=n);const l=[],c=i&&r.animationState&&r.animationState.getState()[i];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),m=o[h];if(m===void 0||c&&Ws(c,h))continue;const f=j({delay:e},Ur(a||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(m)&&m===v&&!f.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const T=ga(r);if(T){const L=window.MotionHandoffAnimation(T,h,Oe);L!==null&&(f.startTime=L,b=!0)}}fa(r,h),p.start(Nn(h,p,m,r.shouldReduceMotion&&Ln.has(h)?{type:!1}:f,r,b));const A=p.animation;A&&l.push(A)}return s&&Promise.all(l).then(()=>{Oe.update(()=>{s&&ha(r,s)})}),l}function Ys({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function $s(r,t){if(!t)return r;const e=t({x:r.left,y:r.top}),n=t({x:r.right,y:r.bottom});return{top:e.y,left:e.x,bottom:n.y,right:n.x}}function Qs(r,t){return Ys($s(r.getBoundingClientRect(),t))}const kn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ar={};for(const r in kn)ar[r]={isEnabled:t=>kn[r].some(e=>!!t[e])};const Pn=()=>({min:0,max:0}),sr=()=>({x:Pn(),y:Pn()}),Zs=typeof window!="undefined",or={current:null},Rn={current:!1};function Xs(){if(Rn.current=!0,!!Zs)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>or.current=r.matches;r.addListener(t),t()}else or.current=!1}function Js(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function eo(r){return typeof r=="string"||Array.isArray(r)}const to=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Mn(r){return Js(r.animate)||to.some(t=>eo(r[t]))}function ro(r){return!!(Mn(r)||r.variants)}function no(r,t,e){for(const n in t){const i=t[n],a=e[n];if(ve(i))r.addValue(n,i);else if(ve(a))r.addValue(n,Xe(i,{owner:r}));else if(a!==i)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=r.getStaticValue(n);r.addValue(n,Xe(s!==void 0?s:i,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Sn=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),Dn=r=>/^0[^.\s]+$/u.test(r),io={test:r=>r==="auto",parse:r=>r},Vn=r=>t=>t.test(r),Fn=[Ue,Q,Be,Ne,Ra,Pa,io],Un=r=>Fn.find(Vn(r)),ao=[...Fn,me,ze],so=r=>ao.find(Vn(r)),oo=new Set(["brightness","contrast","saturate","opacity"]);function lo(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(Mt)||[];if(!n)return r;const i=e.replace(n,"");let a=oo.has(t)?1:0;return n!==e&&(a*=100),t+"("+a+i+")"}const co=/\b([a-z-]*)\(.*?\)/gu,lr=X(j({},ze),{getAnimatableNone:r=>{const t=r.match(co);return t?t.map(lo).join(" "):r}}),Bn=X(j({},Ue),{transform:Math.round}),cr=X(j({borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,radius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,backgroundPositionX:Q,backgroundPositionY:Q},{rotate:Ne,rotateX:Ne,rotateY:Ne,rotateZ:Ne,scale:vt,scaleX:vt,scaleY:vt,scaleZ:vt,skew:Ne,skewX:Ne,skewY:Ne,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:Je,originX:Kr,originY:Kr,originZ:Q}),{zIndex:Bn,fillOpacity:Je,strokeOpacity:Je,numOctaves:Bn}),uo=X(j({},cr),{color:me,backgroundColor:me,outlineColor:me,fill:me,stroke:me,borderColor:me,borderTopColor:me,borderRightColor:me,borderBottomColor:me,borderLeftColor:me,filter:lr,WebkitFilter:lr}),jn=r=>uo[r];function zn(r,t){let e=jn(r);return e!==lr&&(e=ze),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const Kn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class qn{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:a,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ye.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Oe.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget=j({},l),this.initialValues=e.initial?j({},l):{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=!!a,this.isControllingVariants=Mn(e),this.isVariantNode=ro(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const h=this.scrapeMotionValuesFromProps(e,{},this),{willChange:d}=h,u=Ce(h,["willChange"]);for(const p in u){const m=u[p];l[p]!==void 0&&ve(m)&&m.set(l[p],!1)}}mount(t){this.current=t,Ze.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,n)=>this.bindToMotionValue(n,e)),Rn.current||Xs(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:or.current,process.env.NODE_ENV!=="production"&&Sr(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Fe.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Oe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),a(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ar){const e=ar[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):sr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<Kn.length;n++){const i=Kn[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,s=t[a];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=no(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&e!==void 0&&(n=Xe(e===null?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var i;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!=null?i:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Sn(n)||Dn(n))?n=parseFloat(n):!so(n)&&ze.test(e)&&(n=zn(t,e)),this.setBaseTarget(t,ve(n)?n.get():n)),ve(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var a;const{initial:e}=this.props;let n;if(typeof e=="string"||typeof e=="object"){const s=Rr(this.props,e,(a=this.presenceContext)==null?void 0:a.custom);s&&(n=s[t])}if(e&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ve(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Dr),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const po=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ho(r){const t=po.exec(r);if(!t)return[,];const[,e,n,i]=t;return[`--${e!=null?e:n}`,i]}const mo=4;function Hn(r,t,e=1){Ie(e<=mo,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,i]=ho(r);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const s=a.trim();return Sn(s)?parseFloat(s):s}return Rt(i)?Hn(i,t,e+1):i}function fo(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||Dn(r):!0}const vo=new Set(["auto","none","0"]);function go(r,t,e){let n=0,i;for(;n<r.length&&!i;){const a=r[n];typeof a=="string"&&!vo.has(a)&&rt(a).values.length&&(i=r[n]),n++}if(i&&e)for(const a of t)r[a]=zn(e,i)}class bo extends nr{constructor(t,e,n,i,a){super(t,e,n,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Rt(c))){const d=Hn(c,e.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Ln.has(n)||t.length!==2)return;const[i,a]=t,s=Un(i),o=Un(a);if(s!==o)if(yn(s)&&yn(o))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Me[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||fo(t[i]))&&n.push(i);n.length&&go(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Me[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){var o;const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const a=n.length-1,s=n[a];n[a]=Me[e](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class Wn extends qn{constructor(){super(...arguments),this.KeyframeResolver=bo}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ve(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const Gn=(r,t)=>t&&typeof r=="number"?t.transform(r):r,yo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_o=Ve.length;function Eo(r,t,e){let n="",i=!0;for(let a=0;a<_o;a++){const s=Ve[a],o=r[s];if(o===void 0)continue;let l=!0;if(typeof o=="number"?l=o===(s.startsWith("scale")?1:0):l=parseFloat(o)===0,!l||e){const c=Gn(o,cr[s]);if(!l){i=!1;const d=yo[s]||s;n+=`${d}(${c}) `}e&&(t[s]=c)}}return n=n.trim(),e?n=e(t,i?"":n):i&&(n="none"),n}function Yn(r,t,e){const{style:n,vars:i,transformOrigin:a}=r;let s=!1,o=!1;for(const l in t){const c=t[l];if(Fe.has(l)){s=!0;continue}else if(jr(l)){i[l]=c;continue}else{const d=Gn(c,cr[l]);l.startsWith("origin")?(o=!0,a[l]=d):n[l]=d}}if(t.transform||(s||e?n.transform=Eo(t,r.transform,e):n.transform&&(n.transform="none")),o){const{originX:l="50%",originY:c="50%",originZ:d=0}=a;n.transformOrigin=`${l} ${c} ${d}`}}function $n(r,{style:t,vars:e},n,i){Object.assign(r.style,t,i&&i.getProjectionStyles(n));for(const a in e)r.style.setProperty(a,e[a])}const Co={};function wo(r,{layout:t,layoutId:e}){return Fe.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!Co[r]||r==="opacity")}function Qn(r,t,e){var a;const{style:n}=r,i={};for(const s in n)(ve(n[s])||t.style&&ve(t.style[s])||wo(s,r)||((a=e==null?void 0:e.getValue(s))==null?void 0:a.liveStyle)!==void 0)&&(i[s]=n[s]);return i}function Ao(r){return window.getComputedStyle(r)}class To extends Wn{constructor(){super(...arguments),this.type="html",this.renderInstance=$n}readValueFromInstance(t,e){var n;if(Fe.has(e))return(n=this.projection)!=null&&n.isProjecting?Xt(e):Es(t,e);{const i=Ao(t),a=(jr(e)?i.getPropertyValue(e):i[e])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:e}){return Qs(t,e)}build(t,e,n){Yn(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Qn(t,e,n)}}function Io(r,t){return r in t}class xo extends qn{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(Io(e,t)){const n=t[e];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return sr()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Oo={offset:"stroke-dashoffset",array:"stroke-dasharray"},No={offset:"strokeDashoffset",array:"strokeDasharray"};function Lo(r,t,e=1,n=0,i=!0){r.pathLength=1;const a=i?Oo:No;r[a.offset]=Q.transform(-n);const s=Q.transform(t),o=Q.transform(e);r[a.array]=`${s} ${o}`}function ko(r,u,l,c,d){var h=u,{attrX:t,attrY:e,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:s=0}=h,o=Ce(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var f,v;if(Yn(r,o,c),l){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:m}=r;p.transform&&(m.transform=p.transform,delete p.transform),(m.transform||p.transformOrigin)&&(m.transformOrigin=(f=p.transformOrigin)!=null?f:"50% 50%",delete p.transformOrigin),m.transform&&(m.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),e!==void 0&&(p.y=e),n!==void 0&&(p.scale=n),i!==void 0&&Lo(p,i,a,s,!1)}const Zn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Po=r=>typeof r=="string"&&r.toLowerCase()==="svg";function Ro(r,t,e,n){$n(r,t,void 0,n);for(const i in t.attrs)r.setAttribute(Zn.has(i)?i:Pt(i),t.attrs[i])}function Mo(r,t,e){const n=Qn(r,t,e);for(const i in r)if(ve(r[i])||ve(t[i])){const a=Ve.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=r[i]}return n}class So extends Wn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=sr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Fe.has(e)){const n=jn(e);return n&&n.default||0}return e=Zn.has(e)?e:Pt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Mo(t,e,n)}build(t,e,n){ko(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Ro(t,e,n,i)}mount(t){this.isSVGTag=Po(t.tagName),super.mount(t)}}function Xn(r){return On(r)&&"ownerSVGElement"in r}function Do(r){return Xn(r)&&r.tagName==="svg"}function Vo(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=Xn(r)&&!Do(r)?new So(t):new To(t);e.mount(r),Ze.set(r,e)}function Fo(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new xo(t);e.mount(r),Ze.set(r,e)}function Uo(r,t,e){const n=ve(r)?r:Xe(r);return n.start(Nn("",n,t,e)),n.animation}function Bo(r,t){return ve(r)||typeof r=="number"||typeof r=="string"&&!xt(t)}function Jn(r,t,e,n){const i=[];if(Bo(r,t))i.push(Uo(r,xt(t)&&t.default||t,e&&(e.default||e)));else{const a=Cr(r,t,n),s=a.length;Ie(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const l=a[o],c=l instanceof Element?Vo:Fo;Ze.has(l)||c(l);const d=Ze.get(l),u=j({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),i.push(...Gs(d,X(j({},t),{transition:u}),{}))}}return i}function jo(r,t,e){const n=[];return Xi(r,t,e,{spring:nt}).forEach(({keyframes:a,transition:s},o)=>{n.push(...Jn(o,a,s))}),n}class zo{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(n=>n.attachTimeline(t));return()=>{e.forEach((n,i)=>{n&&n(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Ko extends zo{then(t,e){return this.finished.finally(t).then(()=>{})}}function qo(r){return Array.isArray(r)&&r.some(Array.isArray)}function Ho(r){function t(e,n,i){let a=[];return qo(e)?a=jo(e,n,r):a=Jn(e,n,i,r),new Ko(a)}return t}const ue=Ho(),Z={spinner:"_spinner_1waxg_1",spinnerContainer:"_spinnerContainer_1waxg_5",success:"_success_1waxg_9",successContainer:"_successContainer_1waxg_13",container:"_container_1waxg_17",card:"_card_1waxg_26",warning:"_warning_1waxg_35",svg:"_svg_1waxg_43",srOnly:"_srOnly_1waxg_48"};class ei{constructor(){y(this,"template",`
|
|
1
|
+
(function(re,ne){typeof exports=="object"&&typeof module!="undefined"?ne(exports):typeof define=="function"&&define.amd?define(["exports"],ne):(re=typeof globalThis!="undefined"?globalThis:re||self,ne(re["PayNext TS SDK"]={}))})(this,function(re){"use strict";var Ac=Object.defineProperty,Ic=Object.defineProperties;var Tc=Object.getOwnPropertyDescriptors;var It=Object.getOwnPropertySymbols;var Ui=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable;var Er=(re,ne,ie)=>ne in re?Ac(re,ne,{enumerable:!0,configurable:!0,writable:!0,value:ie}):re[ne]=ie,B=(re,ne)=>{for(var ie in ne||(ne={}))Ui.call(ne,ie)&&Er(re,ie,ne[ie]);if(It)for(var ie of It(ne))Bi.call(ne,ie)&&Er(re,ie,ne[ie]);return re},X=(re,ne)=>Ic(re,Tc(ne));var Ce=(re,ne)=>{var ie={};for(var ge in re)Ui.call(re,ge)&&ne.indexOf(ge)<0&&(ie[ge]=re[ge]);if(re!=null&&It)for(var ge of It(re))ne.indexOf(ge)<0&&Bi.call(re,ge)&&(ie[ge]=re[ge]);return ie};var b=(re,ne,ie)=>Er(re,typeof ne!="symbol"?ne+"":ne,ie);var z=(re,ne,ie)=>new Promise((ge,We)=>{var Tt=se=>{try{Ge(ie.next(se))}catch(Ye){We(Ye)}},xt=se=>{try{Ge(ie.throw(se))}catch(Ye){We(Ye)}},Ge=se=>se.done?ge(se.value):Promise.resolve(se.value).then(Tt,xt);Ge((ie=ie.apply(re,ne)).next())});var ne=document.createElement("style");ne.textContent=`._spinner_1waxg_1{height:100%;width:100%}@keyframes _spin_1waxg_1{to{transform:rotate(360deg)}}._spinner_1waxg_1{animation:_spin_1waxg_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinner_1waxg_1:is(._dark_1waxg_1 *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}._spinnerContainer_1waxg_5{height:40px;width:40px}._success_1waxg_9{position:absolute;top:50%;left:50%;width:1.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));fill:#16a34a}._successContainer_1waxg_13{position:relative;display:grid;height:2.25rem;width:2.25rem;flex:none;place-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(232 250 240 / var(--tw-bg-opacity, 1))}._successContainer_1waxg_13:is(._dark_1waxg_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._container_1waxg_17{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_1waxg_26{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_1waxg_35{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_1waxg_43{width:100%;height:100%}._srOnly_1waxg_48{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}._loader_nwq3e_1{position:absolute;height:100%;top:0;left:0;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:1000;display:flex;width:100%;align-items:center;justify-content:center;border-radius:10px}._checkout_5sq3n_1{overflow:hidden;z-index:0;position:relative;height:auto;min-height:40px;width:100%;max-width:640px}._hidden_5sq3n_7{display:none!important}._formInitial_5sq3n_11{opacity:0;transform:translateY(100px)}._btnsInitial_5sq3n_16{opacity:0;transform:translateY(-100px)}._buttons_1i8cu_1{display:grid;gap:.5rem}._hidden_1i8cu_5{display:none!important}._applePay_1ce61_1{display:flex;flex-direction:column;gap:8px}._applePay_1ce61_1:hover{filter:contrast(.575) brightness(1.2)}._hidden_1ce61_26{display:none!important}._container_94v1h_1{display:flex;width:100%;flex-grow:1;flex-direction:row;align-items:center;justify-content:flex-start;-moz-column-gap:.25rem;column-gap:.25rem;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(254 231 239 / var(--tw-bg-opacity, 1));padding:.75rem 1rem}._container_94v1h_1:is(._dark_94v1h_1 *){background-color:#fee7ef80;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}._container_94v1h_1 svg{width:16px;height:16px}._title_94v1h_10{padding:0;padding-left:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:300;--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}._title_94v1h_10:is(._dark_94v1h_1 *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}._googlePay_gmreq_1{display:flex;flex-direction:column;gap:8px}._hidden_gmreq_20{display:none!important}._paypal_90mm5_1{display:flex;flex-direction:column;gap:8px}._hidden_90mm5_12{display:none}._button_13xr0_1{transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.5rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_13xr0_1{transition-property:none}}._button_13xr0_1 span{margin-left:.25rem}._button_13xr0_1:hover{opacity:.7}._button_13xr0_1:active{transform:scale(.95)}._conteiner_1j5pe_2{display:flex;flex-direction:column;gap:.5rem}._venmo_1j5pe_8{display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:12px;height:40px;background-color:#0088f7;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;svg{height:40%}&:hover{background-color:#5683c1}}._hidden_1j5pe_33{display:none}._button_125my_1{cursor:pointer}._button_191iv_1{transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_191iv_1{transition-property:none}}._button_191iv_1 span{margin-left:.25rem}._disabled_191iv_17,._button_191iv_1:hover{opacity:.7}._press_191iv_22:active{transform:scale(.95)}._hidden_191iv_26{display:none!important}._spinner_191iv_30{width:24px;height:24px}._cardForm_isqbi_1{display:grid;gap:.75rem;padding-top:0}._hidden_isqbi_5{display:none!important}._wrapper_4knhb_1{position:relative}._inputContainer_4knhb_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_4knhb_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_4knhb_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_4knhb_10,._inputContainer_4knhb_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_4knhb_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_4knhb_20{display:flex}._errorInput_4knhb_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_4knhb_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_4knhb_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._label_4knhb_28{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_4knhb_32{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_4knhb_36{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_4knhb_40{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_4knhb_47{display:none!important}._wrapper_j8wuo_1{position:relative}._inputContainer_j8wuo_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_j8wuo_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_j8wuo_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_j8wuo_10,._inputContainer_j8wuo_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_j8wuo_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_j8wuo_20{display:flex}._errorInput_j8wuo_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_j8wuo_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_j8wuo_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._error_j8wuo_24{margin-top:.25rem;margin-bottom:0;padding-left:.25rem;font-size:.75rem;line-height:1rem;font-weight:400;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._label_j8wuo_32{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_j8wuo_36{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_j8wuo_40{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_j8wuo_44{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_j8wuo_51{display:none!important}._wrapper_1xdj3_1{position:relative}._inputContainer_1xdj3_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_1xdj3_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_1xdj3_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1xdj3_10,._inputContainer_1xdj3_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_1xdj3_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_1xdj3_20{display:flex;align-items:center;justify-content:center}._errorInput_1xdj3_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_1xdj3_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_1xdj3_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._error_1xdj3_24{margin-top:.25rem;margin-bottom:0;padding-left:.25rem;font-size:.75rem;line-height:1rem;font-weight:400;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._label_1xdj3_32{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_1xdj3_36{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1xdj3_40{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1xdj3_44{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_1xdj3_51{display:none!important}._securityContent_1xdj3_55{display:grid;grid-column-gap:5px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,auto))}._container_hoha1_1{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center}._title_hoha1_5{margin-top:.5rem;font-weight:300}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(ne);let ie=null;function ge(){return z(this,null,function*(){return ie||(ie=new Promise((r,t)=>{const e=document.createElement("script");if(e.src="https://js.evervault.com/v2",e.onload=()=>r(),e.onerror=()=>{ie=null,t()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(e)}),ie)})}function We(){return z(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield ge(),window.Evervault}catch(r){throw new Error("Failed to load Evervault.js")}})}function Tt(r,t,e){return z(this,null,function*(){const n=yield We();return new n(r,t,e)})}Promise.resolve().then(()=>{We()});let xt=class{constructor(t){b(this,"apple",null);b(this,"isAvailable",!1);b(this,"onReady");this.ev=t}init(l,d){return z(this,arguments,function*({transaction:t,locale:e,supportedCardTypes:n,onReady:a,onError:i,onSuccess:s,onCancel:o},c){const u=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(u,X(B({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},c==null?void 0:c.styles),{allowedCardNetworks:n,requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(f,v)=>z(this,[f,v],function*(p,{fail:m}){try{s==null||s(p)}catch(y){console.error(y),m({message:"Cannot pay with payment credentials"})}})}));const h=yield this.apple.availability();this.isAvailable=!0,console.log("Apple Pay availability",h),this.isAvailable||console.error("Apple Pay is not available",h),i&&this.apple.on("error",i),o&&this.apple.on("cancel",o),this.onReady=a})}render(t){return z(this,null,function*(){var e;!this.apple||!this.isAvailable||(t.innerHTML="",yield this.apple.mount(t),(e=this.onReady)==null||e.call(this))})}},Ge=class{constructor(t){b(this,"google",null);this.ev=t}init(c,l){return z(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s},o){const d=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(d,X(B({locale:e,size:{width:"100%",height:"42px"},borderRadius:12,billingAddress:{phoneNumber:!0}},o==null?void 0:o.styles),{process:(p,m)=>z(this,[p,m],function*(u,{fail:h}){try{i==null||i(u)}catch(f){console.error(f),h({message:"Cannot pay with payment credentials"})}})})),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),a&&this.google.on("error",a)})}render(t){return z(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class se{constructor(){b(this,"listeners",[])}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}addListener(t){return this.listeners.push(t),()=>this.removeListener(t)}emit(t){for(const e of this.listeners)e(t)}clear(){this.listeners=[]}}class Ye{constructor(t){b(this,"threeDs",null);this.ev=t}init(i){return z(this,arguments,function*({threeDsId:t,onReady:e,onSuccess:n,onError:a}){this.threeDs=this.ev.ui.threeDSecure(t),this.threeDs.on("ready",()=>e==null?void 0:e()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>a==null?void 0:a()),this.threeDs.on("error",()=>a==null?void 0:a())})}render(t){return z(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class ji{constructor(){b(this,"isReady",!1);b(this,"ev",null);b(this,"apple",null);b(this,"google",null);b(this,"threeDs",null);b(this,"events",{ready:new se})}isShouldLoad({teamId:t,appId:e}){var n,a;return((n=this.ev)==null?void 0:n.config.appId)!==e||((a=this.ev)==null?void 0:a.config.teamId)!==t}initEv(t){return z(this,null,function*(){this.isShouldLoad(t)&&(this.isReady=!1,this.ev=yield Tt(t.teamId,t.appId),this.apple=new xt(this.ev),this.google=new Ge(this.ev),this.events.ready.emit(),this.isReady=!0)})}initThreeDs(t){return z(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new Ye(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return z(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(t,e)})}initGoogle(t,e){return z(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(t,e)})}isAppleAvailable(){var t;return!!((t=this.apple)!=null&&t.isAvailable)}addEventListener(t,e){return this.events[t].addListener(e)}renderApple(t){return z(this,null,function*(){var e;return yield(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return z(this,null,function*(){var e;return yield(e=this.google)==null?void 0:e.render(t)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function Ot(r){return typeof r=="object"&&!Array.isArray(r)}function zi(r,t,e){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let a=document;const i=(n=e==null?void 0:e[r])!=null?n:a.querySelectorAll(r);return i?Array.from(i):[]}return Array.from(r)}function Cr(r,t,e,n){return typeof r=="string"&&Ot(t)?zi(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function Ki(r,t,e){return r*(t+1)}function wr(r,t,e,n){var a;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,r+parseFloat(t)):t==="<"?e:(a=n.get(t))!=null?a:r}const $e=(r,t,e)=>r+(t-r)*e,qi=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},Ar=r=>Array.isArray(r)&&typeof r[0]!="number";function Ir(r,t){return Ar(r)?r[qi(0,r.length,t)]:r}function Hi(r,t){r.indexOf(t)===-1&&r.push(t)}function Tr(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function Wi(r,t,e){for(let n=0;n<r.length;n++){const a=r[n];a.at>t&&a.at<e&&(Tr(r,a),n--)}}function Gi(r,t,e,n,a,i){Wi(r,a,i);for(let s=0;s<t.length;s++)r.push({value:t[s],at:$e(a,i,n[s]),easing:Ir(e,s)})}function Yi(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function $i(r,t){return r.at===t.at?r.value===null?1:t.value===null?-1:0:r.at-t.at}const fe=r=>!!(r&&r.getVelocity),Nt=(r,t,e)=>{const n=t-r;return n===0?1:(e-r)/n};function xr(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const a=Nt(0,t,n);r.push($e(e,1,a))}}function Or(r){const t=[0];return xr(t,r.length-1),t}function Lt(r){return typeof r=="function"&&"applyToOptions"in r}const ht=2e4;function Pt(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<ht;)t+=e,n=r.next(t);return t>=ht?1/0:t}const Ee=r=>r*1e3,Ae=r=>r/1e3;function Nr(r,t=100,e){const n=e(X(B({},r),{keyframes:[0,t]})),a=Math.min(Pt(n),ht);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:Ae(a)}}let Qe=()=>{},Ie=()=>{};process.env.NODE_ENV!=="production"&&(Qe=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Ie=(r,t)=>{if(!r)throw new Error(t)});const Qi="easeInOut",Zi=20;function Xi(r,i={},n,a){var s=i,{defaultTransition:t={}}=s,e=Ce(s,["defaultTransition"]);const o=t.duration||.3,c=new Map,l=new Map,d={},u=new Map;let h=0,p=0,m=0;for(let f=0;f<r.length;f++){const v=r[f];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,wr(p,v.at,h,u));continue}let[y,A,I={}]=v;I.at!==void 0&&(p=wr(p,I.at,h,u));let L=0;const C=(T,x,k,U=0,H=0)=>{const W=Ji(T),V=x,{delay:S=0,times:F=Or(W),type:q="keyframes",repeat:te,repeatType:M,repeatDelay:$=0}=V,K=Ce(V,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:g=t.ease||"easeOut",duration:_}=x;const R=typeof S=="function"?S(U,H):S,j=W.length,E=Lt(q)?q:a==null?void 0:a[q];if(j<=2&&E){let N=100;if(j===2&&ra(W)){const de=W[1]-W[0];N=Math.abs(de)}const G=B({},K);_!==void 0&&(G.duration=Ee(_));const ee=Nr(G,N,E);g=ee.ease,_=ee.duration}_!=null||(_=o);const O=p+R;F.length===1&&F[0]===0&&(F[1]=1);const w=F.length-W.length;if(w>0&&xr(F,w),W.length===1&&W.unshift(null),te){Ie(te<Zi,"Repeat count too high, must be less than 20"),_=Ki(_,te);const N=[...W],G=[...F];g=Array.isArray(g)?[...g]:[g];const ee=[...g];for(let de=0;de<te;de++){W.push(...N);for(let D=0;D<N.length;D++)F.push(G[D]+(de+1)),g.push(D===0?"linear":Ir(ee,D-1))}Yi(F,te)}const P=O+_;Gi(k,W,g,F,O,P),L=Math.max(R+_,L),m=Math.max(P,m)};if(fe(y)){const T=Lr(y,l);C(A,I,Pr("default",T))}else{const T=Cr(y,A,n,d),x=T.length;for(let k=0;k<x;k++){A=A,I=I;const U=T[k],H=Lr(U,l);for(const W in A)C(A[W],ea(I,W),Pr(W,H),k,x)}}h=p,p+=L}return l.forEach((f,v)=>{for(const y in f){const A=f[y];A.sort($i);const I=[],L=[],C=[];for(let x=0;x<A.length;x++){const{at:k,value:U,easing:H}=A[x];I.push(U),L.push(Nt(0,m,k)),C.push(H||"easeOut")}L[0]!==0&&(L.unshift(0),I.unshift(I[0]),C.unshift(Qi)),L[L.length-1]!==1&&(L.push(1),I.push(null)),c.has(v)||c.set(v,{keyframes:{},transition:{}});const T=c.get(v);T.keyframes[y]=I,T.transition[y]=B(X(B({},t),{duration:m,ease:C,times:L}),e)}}),c}function Lr(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function Pr(r,t){return t[r]||(t[r]=[]),t[r]}function Ji(r){return Array.isArray(r)?r:[r]}function ea(r,t){return r&&r[t]?B(B({},r),r[t]):B({},r)}const ta=r=>typeof r=="number",ra=r=>r.every(ta),Ze=new WeakMap,na=r=>Array.isArray(r);function kr(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Rr(r,t,e,n){if(typeof t=="function"){const[a,i]=kr(n);t=t(e!==void 0?e:r.custom,a,i)}if(typeof t=="string"&&(t=r.variants&&r.variants[t]),typeof t=="function"){const[a,i]=kr(n);t=t(e!==void 0?e:r.custom,a,i)}return t}function ia(r,t,e){const n=r.getProps();return Rr(n,t,n.custom,r)}const mt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function aa(r,t){let e=new Set,n=new Set,a=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(l.schedule(d),r()),d(o)}const l={schedule:(d,u=!1,h=!1)=>{const m=h&&a?e:n;return u&&s.add(d),m.has(d)||m.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,a){i=!0;return}a=!0,[e,n]=[n,e],e.forEach(c),e.clear(),a=!1,i&&(i=!1,l.process(d))}};return l}const Te={},sa=40;function oa(r,t){let e=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,s=mt.reduce((I,L)=>(I[L]=aa(i),I),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=s,f=()=>{const I=Te.useManualTiming?a.timestamp:performance.now();e=!1,Te.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(I-a.timestamp,sa),1)),a.timestamp=I,a.isProcessing=!0,o.process(a),c.process(a),l.process(a),d.process(a),u.process(a),h.process(a),p.process(a),m.process(a),a.isProcessing=!1,e&&t&&(n=!1,r(f))},v=()=>{e=!0,n=!0,a.isProcessing||r(f)};return{schedule:mt.reduce((I,L)=>{const C=s[L];return I[L]=(T,x=!1,k=!1)=>(e||v(),C.schedule(T,x,k)),I},{}),cancel:I=>{for(let L=0;L<mt.length;L++)s[mt[L]].cancel(I)},state:a,steps:s}}const De=r=>r,{schedule:xe,cancel:kt,state:ft}=oa(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:De,!0);let vt;function la(){vt=void 0}const be={now:()=>(vt===void 0&&be.set(ft.isProcessing||Te.useManualTiming?ft.timestamp:performance.now()),vt),set:r=>{vt=r,queueMicrotask(la)}},Mr=new Set;function Sr(r,t,e){r||Mr.has(t)||(console.warn(t),Mr.add(t))}class Dr{constructor(){this.subscriptions=[]}add(t){return Hi(this.subscriptions,t),()=>Tr(this.subscriptions,t)}notify(t,e,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,e,n);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Vr(r,t){return t?r*(1e3/t):0}const Fr=30,ca=r=>!isNaN(parseFloat(r));class da{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,a=!0)=>{var s,o;const i=be.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();a&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ca(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Sr(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Dr);const n=this.events[t].add(e);return t==="change"?()=>{n(),xe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fr)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Fr);return Vr(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;(t=this.dependents)==null||t.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xe(r,t){return new da(r,t)}function ua(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,Xe(e))}function pa(r){return na(r)?r[r.length-1]||0:r}function ha(r,t){let s=ia(r,t)||{},{transitionEnd:n={},transition:a={}}=s,i=Ce(s,["transitionEnd","transition"]);i=B(B({},i),n);for(const o in i){const c=pa(i[o]);ua(r,o,c)}}function ma(r){return!!(fe(r)&&r.add)}function fa(r,t){const e=r.getValue("willChange");if(ma(e))return e.add(t);if(!e&&Te.WillChange){const n=new Te.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const Rt=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),va="data-"+Rt("framerAppearId");function ga(r){return r.props[va]}const ya=r=>r!==null;function ba(r,{repeat:t,repeatType:e="loop"},n){const a=r.filter(ya),i=t&&e!=="loop"&&t%2===1?0:a.length-1;return a[i]}const Ve=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fe=new Set(Ve),_a={type:"spring",stiffness:500,damping:25,restSpeed:10},Ea=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),Ca={type:"keyframes",duration:.8},wa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Aa=(r,{keyframes:t})=>t.length>2?Ca:Fe.has(r)?r.startsWith("scale")?Ea(t[1]):_a:wa;function Ia(u){var h=u,{when:r,delay:t,delayChildren:e,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:c,elapsed:l}=h,d=Ce(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Ur(r,t){var e,n;return(n=(e=r==null?void 0:r[t])!=null?e:r==null?void 0:r.default)!=null?n:r}const Br=r=>t=>typeof t=="string"&&t.startsWith(r),jr=Br("--"),Ta=Br("var(--"),Mt=r=>Ta(r)?xa.test(r.split("/*")[0].trim()):!1,xa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Pe=(r,t,e)=>e>t?t:e<r?r:e,Ue={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},Je=X(B({},Ue),{transform:r=>Pe(0,1,r)}),gt=X(B({},Ue),{default:1}),et=r=>Math.round(r*1e5)/1e5,St=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Oa(r){return r==null}const Na=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dt=(r,t)=>e=>!!(typeof e=="string"&&Na.test(e)&&e.startsWith(r)||t&&!Oa(e)&&Object.prototype.hasOwnProperty.call(e,t)),zr=(r,t,e)=>n=>{if(typeof n!="string")return n;const[a,i,s,o]=n.match(St);return{[r]:parseFloat(a),[t]:parseFloat(i),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},La=r=>Pe(0,255,r),Vt=X(B({},Ue),{transform:r=>Math.round(La(r))}),ke={test:Dt("rgb","red"),parse:zr("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+Vt.transform(r)+", "+Vt.transform(t)+", "+Vt.transform(e)+", "+et(Je.transform(n))+")"};function Pa(r){let t="",e="",n="",a="";return r.length>5?(t=r.substring(1,3),e=r.substring(3,5),n=r.substring(5,7),a=r.substring(7,9)):(t=r.substring(1,2),e=r.substring(2,3),n=r.substring(3,4),a=r.substring(4,5),t+=t,e+=e,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const Ft={test:Dt("#"),parse:Pa,transform:ke.transform},tt=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Oe=tt("deg"),Be=tt("%"),Q=tt("px"),ka=tt("vh"),Ra=tt("vw"),Kr=X(B({},Be),{parse:r=>Be.parse(r)/100,transform:r=>Be.transform(r*100)}),je={test:Dt("hsl","hue"),parse:zr("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+Be.transform(et(t))+", "+Be.transform(et(e))+", "+et(Je.transform(n))+")"},he={test:r=>ke.test(r)||Ft.test(r)||je.test(r),parse:r=>ke.test(r)?ke.parse(r):je.test(r)?je.parse(r):Ft.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?ke.transform(r):je.transform(r)},Ma=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sa(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(St))==null?void 0:t.length)||0)+(((e=r.match(Ma))==null?void 0:e.length)||0)>0}const qr="number",Hr="color",Da="var",Va="var(",Wr="${}",Fa=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function rt(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(Fa,c=>(he.test(c)?(n.color.push(i),a.push(Hr),e.push(he.parse(c))):c.startsWith(Va)?(n.var.push(i),a.push(Da),e.push(c)):(n.number.push(i),a.push(qr),e.push(parseFloat(c))),++i,Wr)).split(Wr);return{values:e,split:o,indexes:n,types:a}}function Gr(r){return rt(r).values}function Yr(r){const{split:t,types:e}=rt(r),n=t.length;return a=>{let i="";for(let s=0;s<n;s++)if(i+=t[s],a[s]!==void 0){const o=e[s];o===qr?i+=et(a[s]):o===Hr?i+=he.transform(a[s]):i+=a[s]}return i}}const Ua=r=>typeof r=="number"?0:r;function Ba(r){const t=Gr(r);return Yr(r)(t.map(Ua))}const ze={test:Sa,parse:Gr,createTransformer:Yr,getAnimatableNone:Ba};function Ut(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function ja({hue:r,saturation:t,lightness:e,alpha:n}){r/=360,t/=100,e/=100;let a=0,i=0,s=0;if(!t)a=i=s=e;else{const o=e<.5?e*(1+t):e+t-e*t,c=2*e-o;a=Ut(c,o,r+1/3),i=Ut(c,o,r),s=Ut(c,o,r-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function yt(r,t){return e=>e>0?t:r}const Bt=(r,t,e)=>{const n=r*r,a=e*(t*t-n)+n;return a<0?0:Math.sqrt(a)},za=[Ft,ke,je],Ka=r=>za.find(t=>t.test(r));function $r(r){const t=Ka(r);if(Qe(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===je&&(e=ja(e)),e}const Qr=(r,t)=>{const e=$r(r),n=$r(t);if(!e||!n)return yt(r,t);const a=B({},e);return i=>(a.red=Bt(e.red,n.red,i),a.green=Bt(e.green,n.green,i),a.blue=Bt(e.blue,n.blue,i),a.alpha=$e(e.alpha,n.alpha,i),ke.transform(a))},jt=new Set(["none","hidden"]);function qa(r,t){return jt.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const Ha=(r,t)=>e=>t(r(e)),zt=(...r)=>r.reduce(Ha);function Wa(r,t){return e=>$e(r,t,e)}function Kt(r){return typeof r=="number"?Wa:typeof r=="string"?Mt(r)?yt:he.test(r)?Qr:$a:Array.isArray(r)?Zr:typeof r=="object"?he.test(r)?Qr:Ga:yt}function Zr(r,t){const e=[...r],n=e.length,a=r.map((i,s)=>Kt(i)(i,t[s]));return i=>{for(let s=0;s<n;s++)e[s]=a[s](i);return e}}function Ga(r,t){const e=B(B({},r),t),n={};for(const a in e)r[a]!==void 0&&t[a]!==void 0&&(n[a]=Kt(r[a])(r[a],t[a]));return a=>{for(const i in n)e[i]=n[i](a);return e}}function Ya(r,t){var a;const e=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=r.indexes[s][n[s]],c=(a=r.values[o])!=null?a:0;e[i]=c,n[s]++}return e}const $a=(r,t)=>{const e=ze.createTransformer(t),n=rt(r),a=rt(t);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?jt.has(r)&&!a.values.length||jt.has(t)&&!n.values.length?qa(r,t):zt(Zr(Ya(n,a),a.values),e):(Qe(!0,`Complex values '${r}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),yt(r,t))};function Xr(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?$e(r,t,e):Kt(r)(r,t)}const Qa=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>xe.update(t,e),stop:()=>kt(t),now:()=>ft.isProcessing?ft.timestamp:be.now()}},Jr=(r,t,e=10)=>{let n="";const a=Math.max(Math.round(t/e),2);for(let i=0;i<a;i++)n+=r(i/(a-1))+", ";return`linear(${n.substring(0,n.length-2)})`},Za=5;function en(r,t,e){const n=Math.max(t-Za,0);return Vr(e-r(n),t-n)}const le={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},tn=.001;function Xa({duration:r=le.duration,bounce:t=le.bounce,velocity:e=le.velocity,mass:n=le.mass}){let a,i;Qe(r<=Ee(le.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Pe(le.minDamping,le.maxDamping,s),r=Pe(le.minDuration,le.maxDuration,Ae(r)),s<1?(a=l=>{const d=l*s,u=d*r,h=d-e,p=qt(l,s),m=Math.exp(-u);return tn-h/p*m},i=l=>{const u=l*s*r,h=u*e+e,p=Math.pow(s,2)*Math.pow(l,2)*r,m=Math.exp(-u),f=qt(Math.pow(l,2),s);return(-a(l)+tn>0?-1:1)*((h-p)*m)/f}):(a=l=>{const d=Math.exp(-l*r),u=(l-e)*r+1;return-.001+d*u},i=l=>{const d=Math.exp(-l*r),u=(e-l)*(r*r);return d*u});const o=5/r,c=es(a,i,o);if(r=Ee(r),isNaN(c))return{stiffness:le.stiffness,damping:le.damping,duration:r};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:s*2*Math.sqrt(n*l),duration:r}}}const Ja=12;function es(r,t,e){let n=e;for(let a=1;a<Ja;a++)n=n-r(n)/t(n);return n}function qt(r,t){return r*Math.sqrt(1-t*t)}const ts=["duration","bounce"],rs=["stiffness","damping","mass"];function rn(r,t){return t.some(e=>r[e]!==void 0)}function ns(r){let t=B({velocity:le.velocity,stiffness:le.stiffness,damping:le.damping,mass:le.mass,isResolvedFromDuration:!1},r);if(!rn(r,rs)&&rn(r,ts))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),a=n*n,i=2*Pe(.05,1,1-(r.bounce||0))*Math.sqrt(a);t=X(B({},t),{mass:le.mass,stiffness:a,damping:i})}else{const e=Xa(r);t=X(B(B({},t),e),{mass:le.mass}),t.isResolvedFromDuration=!0}return t}function nt(r=le.visualDuration,t=le.bounce){const e=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:t}:r;let{restSpeed:n,restDelta:a}=e;const i=e.keyframes[0],s=e.keyframes[e.keyframes.length-1],o={done:!1,value:i},{stiffness:c,damping:l,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=ns(X(B({},e),{velocity:-Ae(e.velocity||0)})),m=h||0,f=l/(2*Math.sqrt(c*d)),v=s-i,y=Ae(Math.sqrt(c/d)),A=Math.abs(v)<5;n||(n=A?le.restSpeed.granular:le.restSpeed.default),a||(a=A?le.restDelta.granular:le.restDelta.default);let I;if(f<1){const C=qt(y,f);I=T=>{const x=Math.exp(-f*y*T);return s-x*((m+f*y*v)/C*Math.sin(C*T)+v*Math.cos(C*T))}}else if(f===1)I=C=>s-Math.exp(-y*C)*(v+(m+y*v)*C);else{const C=y*Math.sqrt(f*f-1);I=T=>{const x=Math.exp(-f*y*T),k=Math.min(C*T,300);return s-x*((m+f*y*v)*Math.sinh(k)+C*v*Math.cosh(k))/C}}const L={calculatedDuration:p&&u||null,next:C=>{const T=I(C);if(p)o.done=C>=u;else{let x=C===0?m:0;f<1&&(x=C===0?Ee(m):en(I,C,T));const k=Math.abs(x)<=n,U=Math.abs(s-T)<=a;o.done=k&&U}return o.value=o.done?s:T,o},toString:()=>{const C=Math.min(Pt(L),ht),T=Jr(x=>L.next(C*x).value,C,30);return C+"ms "+T},toTransition:()=>{}};return L}nt.applyToOptions=r=>{const t=Nr(r,100,nt);return r.ease=t.ease,r.duration=Ee(t.duration),r.type="keyframes",r};function Ht({keyframes:r,velocity:t=0,power:e=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=k=>o!==void 0&&k<o||c!==void 0&&k>c,m=k=>o===void 0?c:c===void 0||Math.abs(o-k)<Math.abs(c-k)?o:c;let f=e*t;const v=u+f,y=s===void 0?v:s(v);y!==v&&(f=y-u);const A=k=>-f*Math.exp(-k/n),I=k=>y+A(k),L=k=>{const U=A(k),H=I(k);h.done=Math.abs(U)<=l,h.value=h.done?y:H};let C,T;const x=k=>{p(h.value)&&(C=k,T=nt({keyframes:[h.value,m(h.value)],velocity:en(I,k,h.value),damping:a,stiffness:i,restDelta:l,restSpeed:d}))};return x(0),{calculatedDuration:null,next:k=>{let U=!1;return!T&&C===void 0&&(U=!0,L(k),x(k)),C!==void 0&&k>=C?T.next(k-C):(!U&&L(k),h)}}}function is(r,t,e){const n=[],a=e||Te.mix||Xr,i=r.length-1;for(let s=0;s<i;s++){let o=a(r[s],r[s+1]);if(t){const c=Array.isArray(t)?t[s]||De:t;o=zt(c,o)}n.push(o)}return n}function as(r,t,{clamp:e=!0,ease:n,mixer:a}={}){const i=r.length;if(Ie(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=r[0]===r[1];r[0]>r[i-1]&&(r=[...r].reverse(),t=[...t].reverse());const o=is(t,n,a),c=o.length,l=d=>{if(s&&d<r[0])return t[0];let u=0;if(c>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Nt(r[u],r[u+1],d);return o[u](h)};return e?d=>l(Pe(r[0],r[i-1],d)):l}function ss(r,t){return r.map(e=>e*t)}const nn=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,os=1e-7,ls=12;function cs(r,t,e,n,a){let i,s,o=0;do s=t+(e-t)/2,i=nn(s,n,a)-r,i>0?e=s:t=s;while(Math.abs(i)>os&&++o<ls);return s}function it(r,t,e,n){if(r===t&&e===n)return De;const a=i=>cs(i,0,1,r,e);return i=>i===0||i===1?i:nn(a(i),t,n)}const ds=it(.42,0,1,1),us=it(0,0,.58,1),an=it(.42,0,.58,1),sn=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,on=r=>t=>1-r(1-t),ln=it(.33,1.53,.69,.99),Wt=on(ln),cn=sn(Wt),dn=r=>(r*=2)<1?.5*Wt(r):.5*(2-Math.pow(2,-10*(r-1))),Gt=r=>1-Math.sin(Math.acos(r)),ps=on(Gt),un=sn(Gt),pn=r=>Array.isArray(r)&&typeof r[0]=="number",hn={linear:De,easeIn:ds,easeInOut:an,easeOut:us,circIn:Gt,circInOut:un,circOut:ps,backIn:Wt,backInOut:cn,backOut:ln,anticipate:dn},hs=r=>typeof r=="string",mn=r=>{if(pn(r)){Ie(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,a]=r;return it(t,e,n,a)}else if(hs(r))return Ie(hn[r]!==void 0,`Invalid easing type '${r}'`),hn[r];return r};function ms(r,t){return r.map(()=>t||an).splice(0,r.length-1)}function Ke({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const a=Ar(n)?n.map(mn):mn(n),i={done:!1,value:t[0]},s=ss(e&&e.length===t.length?e:Or(t),r),o=as(s,t,{ease:Array.isArray(a)?a:ms(t,a)});return{calculatedDuration:r,next:c=>(i.value=o(c),i.done=c>=r,i)}}const fs=r=>r!==null;function Yt(r,{repeat:t,repeatType:e="loop"},n,a=1){const i=r.filter(fs),o=a<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const vs={decay:Ht,inertia:Ht,tween:Ke,keyframes:Ke,spring:nt};function fn(r){typeof r.type=="string"&&(r.type=vs[r.type])}class $t{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const gs=r=>r/100;class Qt extends $t{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,a;const{motionValue:e}=this.options;e&&e.updatedAt!==be.now()&&this.tick(be.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(n=this.options).onStop)==null||a.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;fn(t);const{type:e=Ke,repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=t;let{keyframes:o}=t;const c=e||Ke;process.env.NODE_ENV!=="production"&&c!==Ke&&Ie(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),c!==Ke&&typeof o[0]!="number"&&(this.mixKeyframes=zt(gs,Xr(o[0],o[1])),o=[0,100]);const l=c(X(B({},t),{keyframes:o}));i==="mirror"&&(this.mirroredGenerator=c(X(B({},t),{keyframes:[...o].reverse(),velocity:-s}))),l.calculatedDuration===null&&(l.calculatedDuration=Pt(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:a,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?y<0:y>a;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let I=this.currentTime,L=n;if(u){const k=Math.min(this.currentTime,a)/o;let U=Math.floor(k),H=k%1;!H&&k>=1&&(H=1),H===1&&U--,U=Math.min(U,u+1),!!(U%2)&&(h==="reverse"?(H=1-H,p&&(H-=p/o)):h==="mirror"&&(L=s)),I=Pe(0,1,H)*o}const C=A?{done:!1,value:d[0]}:L.next(I);i&&(C.value=i(C.value));let{done:T}=C;!A&&c!==null&&(T=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const x=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return x&&m!==Ht&&(C.value=Yt(d,this.options,v,this.speed)),f&&f(C.value),x&&this.finish(),C}then(t,e){return this.finished.then(t,e)}get duration(){return Ae(this.calculatedDuration)}get time(){return Ae(this.currentTime)}set time(t){var e;t=Ee(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(e=this.driver)==null||e.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(be.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Ae(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=Qa,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(i=(a=this.options).onPlay)==null||i.call(a);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e!=null?e:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(be.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(t=this.options).onComplete)==null||e.call(t)}cancel(){var t,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(t=this.options).onCancel)==null||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),t.observe(this)}}function ys(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const Re=r=>r*180/Math.PI,Zt=r=>{const t=Re(Math.atan2(r[1],r[0]));return Xt(t)},bs={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:Zt,rotateZ:Zt,skewX:r=>Re(Math.atan(r[1])),skewY:r=>Re(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},Xt=r=>(r=r%360,r<0&&(r+=360),r),vn=Zt,gn=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),yn=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),_s={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gn,scaleY:yn,scale:r=>(gn(r)+yn(r))/2,rotateX:r=>Xt(Re(Math.atan2(r[6],r[5]))),rotateY:r=>Xt(Re(Math.atan2(-r[2],r[0]))),rotateZ:vn,rotate:vn,skewX:r=>Re(Math.atan(r[4])),skewY:r=>Re(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function Jt(r){return r.includes("scale")?1:0}function er(r,t){if(!r||r==="none")return Jt(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(e)n=_s,a=e;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=bs,a=o}if(!a)return Jt(t);const i=n[t],s=a[1].split(",").map(Cs);return typeof i=="function"?i(s):s[i]}const Es=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return er(e,t)};function Cs(r){return parseFloat(r.trim())}const bn=r=>r===Ue||r===Q,ws=new Set(["x","y","z"]),As=Ve.filter(r=>!ws.has(r));function Is(r){const t=[];return As.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const Me={width:({x:r},{paddingLeft:t="0",paddingRight:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),height:({y:r},{paddingTop:t="0",paddingBottom:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),top:(r,{top:t})=>parseFloat(t),left:(r,{left:t})=>parseFloat(t),bottom:({y:r},{top:t})=>parseFloat(t)+(r.max-r.min),right:({x:r},{left:t})=>parseFloat(t)+(r.max-r.min),x:(r,{transform:t})=>er(t,"x"),y:(r,{transform:t})=>er(t,"y")};Me.translateX=Me.x,Me.translateY=Me.y;const Se=new Set;let tr=!1,rr=!1,nr=!1;function _n(){if(rr){const r=Array.from(Se).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const a=Is(n);a.length&&(e.set(n,a),n.render())}),r.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const a=e.get(n);a&&a.forEach(([i,s])=>{var o;(o=n.getValue(i))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}rr=!1,tr=!1,Se.forEach(r=>r.complete(nr)),Se.clear()}function En(){Se.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(rr=!0)})}function Ts(){nr=!0,En(),_n(),nr=!1}class ir{constructor(t,e,n,a,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Se.add(this),tr||(tr=!0,xe.read(En),xe.resolveKeyframes(_n))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&e){const o=n.readValue(e,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),a&&i===void 0&&a.set(t[0])}ys(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Se.delete(this)}cancel(){this.state==="scheduled"&&(Se.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xs=r=>r.startsWith("--");function Os(r,t,e){xs(t)?r.style.setProperty(t,e):r.style[t]=e}function ar(r){let t;return()=>(t===void 0&&(t=r()),t)}const Ns=ar(()=>window.ScrollTimeline!==void 0),Ls={};function Ps(r,t){const e=ar(r);return()=>{var n;return(n=Ls[t])!=null?n:e()}}const Cn=Ps(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),at=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,wn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:at([0,.65,.55,1]),circOut:at([.55,0,1,.45]),backIn:at([.31,.01,.66,-.59]),backOut:at([.33,1.53,.69,.99])};function An(r,t){if(r)return typeof r=="function"?Cn()?Jr(r,t):"ease-out":pn(r)?at(r):Array.isArray(r)?r.map(e=>An(e,t)||wn.easeOut):wn[r]}function ks(r,t,e,{delay:n=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[t]:e};c&&(d.offset=c);const u=An(o,a);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),r.animate(d,h)}function Rs(e){var n=e,{type:r}=n,t=Ce(n,["type"]);var a,i;return Lt(r)&&Cn()?r.applyToOptions(t):((a=t.duration)!=null||(t.duration=300),(i=t.ease)!=null||(t.ease="easeOut"),t)}class Ms extends $t{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:a,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,Ie(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Rs(t);this.animation=ks(e,n,a,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=Yt(a,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Os(e,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,e;(e=(t=this.animation).finish)==null||e.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,e;this.isPseudoElement||(e=(t=this.animation).commitStyles)==null||e.call(t)}get duration(){var e,n;const t=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return Ae(Number(t))}get time(){return Ae(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ee(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ns()?(this.animation.timeline=t,De):e(this)}}const In={anticipate:dn,backInOut:cn,circInOut:un};function Ss(r){return r in In}function Ds(r){typeof r.ease=="string"&&Ss(r.ease)&&(r.ease=In[r.ease])}const Tn=10;class Vs extends Ms{constructor(t){Ds(t),fn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const l=this.options,{motionValue:e,onUpdate:n,onComplete:a,element:i}=l,s=Ce(l,["motionValue","onUpdate","onComplete","element"]);if(!e)return;if(t!==void 0){e.set(t);return}const o=new Qt(X(B({},s),{autoplay:!1})),c=Ee((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(c-Tn).value,o.sample(c).value,Tn),o.stop()}}const xn=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(ze.test(r)||r==="0")&&!r.startsWith("url("));function Fs(r){const t=r[0];if(r.length===1)return!0;for(let e=0;e<r.length;e++)if(r[e]!==t)return!0}function Us(r,t,e,n){const a=r[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=r[r.length-1],s=xn(a,t),o=xn(i,t);return Qe(s===o,`You are trying to animate ${t} from "${a}" to "${i}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${i} via the \`style\` property.`),!s||!o?!1:Fs(r)||(e==="spring"||Lt(e))&&n}function On(r){return typeof r=="object"&&r!==null}function Bs(r){return On(r)&&"offsetHeight"in r}const js=new Set(["opacity","clipPath","filter","transform"]),zs=ar(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ks(r){var l;const{motionValue:t,name:e,repeatDelay:n,repeatType:a,damping:i,type:s}=r;if(!Bs((l=t==null?void 0:t.owner)==null?void 0:l.current))return!1;const{onUpdate:o,transformTemplate:c}=t.owner.getProps();return zs()&&e&&js.has(e)&&(e!=="transform"||!c)&&!o&&!n&&a!=="mirror"&&i!==0&&s!=="inertia"}const qs=40;class Hs extends $t{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",keyframes:o,name:c,motionValue:l,element:d}=p,u=Ce(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var y,A;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=be.now();const m=B({autoplay:t,delay:e,type:n,repeat:a,repeatDelay:i,repeatType:s,name:c,motionValue:l,element:d},u),f=(d==null?void 0:d.KeyframeResolver)||ir;this.keyframeResolver=new f(o,(y,A,I)=>this.onKeyframesResolved(y,A,m,!I),c,l,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,n,a){this.keyframeResolver=void 0;const{name:i,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=be.now(),Us(t,i,s,o)||((Te.instantAnimations||!c)&&(d==null||d(Yt(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=a?this.resolvedAt?this.resolvedAt-this.createdAt>qs?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=X(B({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!l&&Ks(h)?new Vs(X(B({},h),{element:h.motionValue.owner.current})):new Qt(h);p.finished.then(()=>this.notifyFinished()).catch(De),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ts()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Nn=(r,t,e,n={},a,i)=>s=>{const o=Ur(n,r)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Ee(c);const d=X(B({keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity()},o),{delay:-l,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:t,element:i?void 0:a});Ia(o)||Object.assign(d,Aa(r,d)),d.duration&&(d.duration=Ee(d.duration)),d.repeatDelay&&(d.repeatDelay=Ee(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),(Te.instantAnimations||Te.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!i&&t.get()!==void 0){const h=ba(d.keyframes,o);if(h!==void 0){xe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new Qt(d):new Hs(d)},Ln=new Set(["width","height","top","left","right","bottom",...Ve]);function Ws({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function Gs(r,t,{delay:e=0,transitionOverride:n,type:a}={}){var u;let d=t,{transition:i=r.getDefaultTransition(),transitionEnd:s}=d,o=Ce(d,["transition","transitionEnd"]);n&&(i=n);const c=[],l=a&&r.animationState&&r.animationState.getState()[a];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),m=o[h];if(m===void 0||l&&Ws(l,h))continue;const f=B({delay:e},Ur(i||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(m)&&m===v&&!f.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const I=ga(r);if(I){const L=window.MotionHandoffAnimation(I,h,xe);L!==null&&(f.startTime=L,y=!0)}}fa(r,h),p.start(Nn(h,p,m,r.shouldReduceMotion&&Ln.has(h)?{type:!1}:f,r,y));const A=p.animation;A&&c.push(A)}return s&&Promise.all(c).then(()=>{xe.update(()=>{s&&ha(r,s)})}),c}function Ys({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function $s(r,t){if(!t)return r;const e=t({x:r.left,y:r.top}),n=t({x:r.right,y:r.bottom});return{top:e.y,left:e.x,bottom:n.y,right:n.x}}function Qs(r,t){return Ys($s(r.getBoundingClientRect(),t))}const Pn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},sr={};for(const r in Pn)sr[r]={isEnabled:t=>Pn[r].some(e=>!!t[e])};const kn=()=>({min:0,max:0}),or=()=>({x:kn(),y:kn()}),Zs=typeof window!="undefined",lr={current:null},Rn={current:!1};function Xs(){if(Rn.current=!0,!!Zs)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>lr.current=r.matches;r.addListener(t),t()}else lr.current=!1}function Js(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function eo(r){return typeof r=="string"||Array.isArray(r)}const to=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Mn(r){return Js(r.animate)||to.some(t=>eo(r[t]))}function ro(r){return!!(Mn(r)||r.variants)}function no(r,t,e){for(const n in t){const a=t[n],i=e[n];if(fe(a))r.addValue(n,a);else if(fe(i))r.addValue(n,Xe(a,{owner:r}));else if(i!==a)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=r.getStaticValue(n);r.addValue(n,Xe(s!==void 0?s:a,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Sn=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),Dn=r=>/^0[^.\s]+$/u.test(r),io={test:r=>r==="auto",parse:r=>r},Vn=r=>t=>t.test(r),Fn=[Ue,Q,Be,Oe,Ra,ka,io],Un=r=>Fn.find(Vn(r)),ao=[...Fn,he,ze],so=r=>ao.find(Vn(r)),oo=new Set(["brightness","contrast","saturate","opacity"]);function lo(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(St)||[];if(!n)return r;const a=e.replace(n,"");let i=oo.has(t)?1:0;return n!==e&&(i*=100),t+"("+i+a+")"}const co=/\b([a-z-]*)\(.*?\)/gu,cr=X(B({},ze),{getAnimatableNone:r=>{const t=r.match(co);return t?t.map(lo).join(" "):r}}),Bn=X(B({},Ue),{transform:Math.round}),dr=X(B({borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,radius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,backgroundPositionX:Q,backgroundPositionY:Q},{rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scale:gt,scaleX:gt,scaleY:gt,scaleZ:gt,skew:Oe,skewX:Oe,skewY:Oe,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:Je,originX:Kr,originY:Kr,originZ:Q}),{zIndex:Bn,fillOpacity:Je,strokeOpacity:Je,numOctaves:Bn}),uo=X(B({},dr),{color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:cr,WebkitFilter:cr}),jn=r=>uo[r];function zn(r,t){let e=jn(r);return e!==cr&&(e=ze),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const Kn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class qn{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ir,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=be.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,xe.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=s;this.latestValues=c,this.baseTarget=B({},c),this.initialValues=e.initial?B({},c):{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Mn(e),this.isVariantNode=ro(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const h=this.scrapeMotionValuesFromProps(e,{},this),{willChange:d}=h,u=Ce(h,["willChange"]);for(const p in u){const m=u[p];c[p]!==void 0&&fe(m)&&m.set(c[p],!1)}}mount(t){this.current=t,Ze.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,n)=>this.bindToMotionValue(n,e)),Rn.current||Xs(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lr.current,process.env.NODE_ENV!=="production"&&Sr(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Fe.has(t);n&&this.onBindTransform&&this.onBindTransform();const a=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&xe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in sr){const e=sr[t];if(!e)continue;const{isEnabled:n,Feature:a}=e;if(!this.features[t]&&a&&n(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):or()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<Kn.length;n++){const a=Kn[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=no(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&e!==void 0&&(n=Xe(e===null?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var a;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!=null?a:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Sn(n)||Dn(n))?n=parseFloat(n):!so(n)&&ze.test(e)&&(n=zn(t,e)),this.setBaseTarget(t,fe(n)?n.get():n)),fe(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var i;const{initial:e}=this.props;let n;if(typeof e=="string"||typeof e=="object"){const s=Rr(this.props,e,(i=this.presenceContext)==null?void 0:i.custom);s&&(n=s[t])}if(e&&n!==void 0)return n;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!fe(a)?a:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Dr),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const po=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ho(r){const t=po.exec(r);if(!t)return[,];const[,e,n,a]=t;return[`--${e!=null?e:n}`,a]}const mo=4;function Hn(r,t,e=1){Ie(e<=mo,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,a]=ho(r);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const s=i.trim();return Sn(s)?parseFloat(s):s}return Mt(a)?Hn(a,t,e+1):a}function fo(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||Dn(r):!0}const vo=new Set(["auto","none","0"]);function go(r,t,e){let n=0,a;for(;n<r.length&&!a;){const i=r[n];typeof i=="string"&&!vo.has(i)&&rt(i).values.length&&(a=r[n]),n++}if(a&&e)for(const i of t)r[i]=zn(e,a)}class yo extends ir{constructor(t,e,n,a,i){super(t,e,n,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Mt(l))){const d=Hn(l,e.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Ln.has(n)||t.length!==2)return;const[a,i]=t,s=Un(a),o=Un(i);if(s!==o)if(bn(s)&&bn(o))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Me[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let a=0;a<t.length;a++)(t[a]===null||fo(t[a]))&&n.push(a);n.length&&go(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Me[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const a=e[e.length-1];a!==void 0&&t.getValue(n,a).jump(a,!1)}measureEndState(){var o;const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const a=t.getValue(e);a&&a.jump(this.measuredOrigin,!1);const i=n.length-1,s=n[i];n[i]=Me[e](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}class Wn extends qn{constructor(){super(...arguments),this.KeyframeResolver=yo}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fe(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const Gn=(r,t)=>t&&typeof r=="number"?t.transform(r):r,bo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_o=Ve.length;function Eo(r,t,e){let n="",a=!0;for(let i=0;i<_o;i++){const s=Ve[i],o=r[s];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(s.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||e){const l=Gn(o,dr[s]);if(!c){a=!1;const d=bo[s]||s;n+=`${d}(${l}) `}e&&(t[s]=l)}}return n=n.trim(),e?n=e(t,a?"":n):a&&(n="none"),n}function Yn(r,t,e){const{style:n,vars:a,transformOrigin:i}=r;let s=!1,o=!1;for(const c in t){const l=t[c];if(Fe.has(c)){s=!0;continue}else if(jr(c)){a[c]=l;continue}else{const d=Gn(l,dr[c]);c.startsWith("origin")?(o=!0,i[c]=d):n[c]=d}}if(t.transform||(s||e?n.transform=Eo(t,r.transform,e):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=i;n.transformOrigin=`${c} ${l} ${d}`}}function $n(r,{style:t,vars:e},n,a){Object.assign(r.style,t,a&&a.getProjectionStyles(n));for(const i in e)r.style.setProperty(i,e[i])}const Co={};function wo(r,{layout:t,layoutId:e}){return Fe.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!Co[r]||r==="opacity")}function Qn(r,t,e){var i;const{style:n}=r,a={};for(const s in n)(fe(n[s])||t.style&&fe(t.style[s])||wo(s,r)||((i=e==null?void 0:e.getValue(s))==null?void 0:i.liveStyle)!==void 0)&&(a[s]=n[s]);return a}function Ao(r){return window.getComputedStyle(r)}class Io extends Wn{constructor(){super(...arguments),this.type="html",this.renderInstance=$n}readValueFromInstance(t,e){var n;if(Fe.has(e))return(n=this.projection)!=null&&n.isProjecting?Jt(e):Es(t,e);{const a=Ao(t),i=(jr(e)?a.getPropertyValue(e):a[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return Qs(t,e)}build(t,e,n){Yn(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Qn(t,e,n)}}function To(r,t){return r in t}class xo extends qn{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(To(e,t)){const n=t[e];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return or()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Oo={offset:"stroke-dashoffset",array:"stroke-dasharray"},No={offset:"strokeDashoffset",array:"strokeDasharray"};function Lo(r,t,e=1,n=0,a=!0){r.pathLength=1;const i=a?Oo:No;r[i.offset]=Q.transform(-n);const s=Q.transform(t),o=Q.transform(e);r[i.array]=`${s} ${o}`}function Po(r,u,c,l,d){var h=u,{attrX:t,attrY:e,attrScale:n,pathLength:a,pathSpacing:i=1,pathOffset:s=0}=h,o=Ce(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var f,v;if(Yn(r,o,l),c){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:m}=r;p.transform&&(m.transform=p.transform,delete p.transform),(m.transform||p.transformOrigin)&&(m.transformOrigin=(f=p.transformOrigin)!=null?f:"50% 50%",delete p.transformOrigin),m.transform&&(m.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),e!==void 0&&(p.y=e),n!==void 0&&(p.scale=n),a!==void 0&&Lo(p,a,i,s,!1)}const Zn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ko=r=>typeof r=="string"&&r.toLowerCase()==="svg";function Ro(r,t,e,n){$n(r,t,void 0,n);for(const a in t.attrs)r.setAttribute(Zn.has(a)?a:Rt(a),t.attrs[a])}function Mo(r,t,e){const n=Qn(r,t,e);for(const a in r)if(fe(r[a])||fe(t[a])){const i=Ve.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=r[a]}return n}class So extends Wn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=or}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Fe.has(e)){const n=jn(e);return n&&n.default||0}return e=Zn.has(e)?e:Rt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Mo(t,e,n)}build(t,e,n){Po(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,a){Ro(t,e,n,a)}mount(t){this.isSVGTag=ko(t.tagName),super.mount(t)}}function Xn(r){return On(r)&&"ownerSVGElement"in r}function Do(r){return Xn(r)&&r.tagName==="svg"}function Vo(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=Xn(r)&&!Do(r)?new So(t):new Io(t);e.mount(r),Ze.set(r,e)}function Fo(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new xo(t);e.mount(r),Ze.set(r,e)}function Uo(r,t,e){const n=fe(r)?r:Xe(r);return n.start(Nn("",n,t,e)),n.animation}function Bo(r,t){return fe(r)||typeof r=="number"||typeof r=="string"&&!Ot(t)}function Jn(r,t,e,n){const a=[];if(Bo(r,t))a.push(Uo(r,Ot(t)&&t.default||t,e&&(e.default||e)));else{const i=Cr(r,t,n),s=i.length;Ie(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const c=i[o],l=c instanceof Element?Vo:Fo;Ze.has(c)||l(c);const d=Ze.get(c),u=B({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),a.push(...Gs(d,X(B({},t),{transition:u}),{}))}}return a}function jo(r,t,e){const n=[];return Xi(r,t,e,{spring:nt}).forEach(({keyframes:i,transition:s},o)=>{n.push(...Jn(o,i,s))}),n}class zo{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(n=>n.attachTimeline(t));return()=>{e.forEach((n,a)=>{n&&n(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Ko extends zo{then(t,e){return this.finished.finally(t).then(()=>{})}}function qo(r){return Array.isArray(r)&&r.some(Array.isArray)}function Ho(r){function t(e,n,a){let i=[];return qo(e)?i=jo(e,n,r):i=Jn(e,n,a,r),new Ko(i)}return t}const ue=Ho(),Z={spinner:"_spinner_1waxg_1",spinnerContainer:"_spinnerContainer_1waxg_5",success:"_success_1waxg_9",successContainer:"_successContainer_1waxg_13",container:"_container_1waxg_17",card:"_card_1waxg_26",warning:"_warning_1waxg_35",svg:"_svg_1waxg_43",srOnly:"_srOnly_1waxg_48"};class ei{constructor(){b(this,"template",`
|
|
3
3
|
<svg aria-hidden="true" class="${Z.spinner}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
4
|
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
|
|
5
5
|
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
|
|
6
6
|
</svg>
|
|
7
7
|
<span class="${Z.srOnly}">Loading...</span>
|
|
8
|
-
`);y(this,"spinner",document.createElement("div"));this.spinner.setAttribute("role","status"),this.spinner.classList.add(Z.spinnerContainer),this.spinner.innerHTML=this.template}addClass(t){this.spinner.classList.add(t)}removeClass(t){this.spinner.classList.remove(t)}render(){return this.spinner}}const ti={loader:"_loader_nwq3e_1"};class Wo{constructor(){y(this,"loader");this.loader=document.createElement("div"),this.loader.classList.add(ti.loader),this.loader.appendChild(new ei().render())}setClassName(t){t?this.loader.classList.add(t):this.loader.className=ti.loader}render(){return this.loader}}const he={checkout:"_checkout_5sq3n_1",hidden:"_hidden_5sq3n_7",formInitial:"_formInitial_5sq3n_11",btnsInitial:"_btnsInitial_5sq3n_16"},dr={buttons:"_buttons_1i8cu_1",hidden:"_hidden_1i8cu_5"},ur={applePay:"_applePay_1g5vd_1",hidden:"_hidden_1g5vd_24"};function ri(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var pr,ni;function Go(){if(ni)return pr;ni=1;var r={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,[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[62207,62209],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,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,63737423,63743358,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}}};return pr=r,pr}var st={},ot={},ii;function ai(){if(ii)return ot;ii=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.clone=void 0;function r(t){return t?JSON.parse(JSON.stringify(t)):null}return ot.clone=r,ot}var lt={},si;function Yo(){if(si)return lt;si=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.matches=void 0;function r(n,i,a){var s=String(i).length,o=n.substr(0,s),l=parseInt(o,10);return i=parseInt(String(i).substr(0,o.length),10),a=parseInt(String(a).substr(0,o.length),10),l>=i&&l<=a}function t(n,i){return i=String(i),i.substring(0,n.length)===n.substring(0,i.length)}function e(n,i){return Array.isArray(i)?r(n,i[0],i[1]):t(n,i)}return lt.matches=e,lt}var oi;function $o(){if(oi)return st;oi=1,Object.defineProperty(st,"__esModule",{value:!0}),st.addMatchingCardsToResults=void 0;var r=ai(),t=Yo();function e(n,i,a){var s,o;for(s=0;s<i.patterns.length;s++){var l=i.patterns[s];if((0,t.matches)(n,l)){var c=(0,r.clone)(i);Array.isArray(l)?o=String(l[0]).length:o=String(l).length,n.length>=o&&(c.matchStrength=o),a.push(c);break}}}return st.addMatchingCardsToResults=e,st}var ct={},li;function Qo(){if(li)return ct;li=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.isValidInputType=void 0;function r(t){return typeof t=="string"||t instanceof String}return ct.isValidInputType=r,ct}var dt={},ci;function Zo(){if(ci)return dt;ci=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.findBestMatch=void 0;function r(e){var n=e.filter(function(i){return i.matchStrength}).length;return n>0&&n===e.length}function t(e){return r(e)?e.reduce(function(n,i){return!n||Number(n.matchStrength)<Number(i.matchStrength)?i:n}):null}return dt.findBestMatch=t,dt}var ut,di;function Xo(){if(di)return ut;di=1;var r=ut&&ut.__assign||function(){return r=Object.assign||function(m){for(var f,v=1,b=arguments.length;v<b;v++){f=arguments[v];for(var A in f)Object.prototype.hasOwnProperty.call(f,A)&&(m[A]=f[A])}return m},r.apply(this,arguments)},t=Go(),e=$o(),n=Qo(),i=Zo(),a=ai(),s={},o={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},l=[o.VISA,o.MASTERCARD,o.AMERICAN_EXPRESS,o.DINERS_CLUB,o.DISCOVER,o.JCB,o.UNIONPAY,o.MAESTRO,o.ELO,o.MIR,o.HIPER,o.HIPERCARD],c=(0,a.clone)(l);function d(m){return s[m]||t[m]}function u(){return c.map(function(m){return(0,a.clone)(d(m))})}function h(m,f){f===void 0&&(f=!1);var v=c.indexOf(m);if(!f&&v===-1)throw new Error('"'+m+'" is not a supported card type.');return v}function p(m){var f=[];if(!(0,n.isValidInputType)(m))return f;if(m.length===0)return u();c.forEach(function(b){var A=d(b);(0,e.addMatchingCardsToResults)(m,A,f)});var v=(0,i.findBestMatch)(f);return v?[v]:f}return p.getTypeInfo=function(m){return(0,a.clone)(d(m))},p.removeCard=function(m){var f=h(m);c.splice(f,1)},p.addCard=function(m){var f=h(m.type,!0);s[m.type]=m,f===-1&&c.push(m.type)},p.updateCard=function(m,f){var v=s[m]||t[m];if(!v)throw new Error('"'.concat(m,"\" is not a recognized type. Use `addCard` instead.'"));if(f.type&&v.type!==f.type)throw new Error("Cannot overwrite type parameter.");var b=(0,a.clone)(v);b=r(r({},b),f),s[b.type]=b},p.changeOrder=function(m,f){var v=h(m);c.splice(v,1),c.splice(f,0,m)},p.resetModifications=function(){c=(0,a.clone)(l),s={}},p.types=o,ut=p,ut}var qe=Xo();qe.updateCard("visa",{lengths:[16]}),qe.updateCard("unionpay",{gaps:[4,8,12,16]});const Jo=(r,t)=>{const e=qe.getTypeInfo(t),n=r.replace(/\D/g,""),i=(e==null?void 0:e.gaps)||[4,8,12],a=e?Math.max(...e.lengths)+i.length:19,s=[0].concat(i,n.length),o=[];for(let l=0;s[l]<n.length;l++){const c=s[l],d=Math.min(s[l+1],n.length);o.push(n.slice(c,d))}return o.join(" ").slice(0,a)},el=(r,t)=>{const e=qe.getTypeInfo(t),n=(e==null?void 0:e.code.size)||4;return r.replace(/\D/g,"").slice(0,n)},tl=(r,t)=>{const e=r.replace(/\D/g,"");let n=e.slice(0,2);if(!n)return"";const i=Number(n);if(n!=="01"){if(Number.isNaN(i))return"0";if(i===0||i===1)return`${i}`;if(i>12)return"1";n=i>9?`${i}`:`0${i}`}if(r.length<t.length){const s=Number(r[r.length-1]);if(Number.isNaN(s))return n}const a=e.slice(2,4);return`${n} / ${a}`};var pe=(r=>(r.Invalid="invalid",r.Empty="empty",r.Incomplete="incomplete",r.Unsupported="unsupported",r.Expired="expired",r))(pe||{}),ge=(r=>(r.Visa="visa",r.Mastercard="mastercard",r.AmericanExpress="american-express",r.Discover="discover",r.JCB="jcb",r.DinersClub="diners-club",r.UnionPay="unionpay",r.Maestro="maestro",r))(ge||{});const bt=[{name:"Visa",type:"visa",pattern:/^4/,minLength:16,maxLength:16},{name:"MasterCard",type:"mastercard",pattern:/^5[1-5]/,minLength:16,maxLength:16},{name:"American Express",type:"american-express",pattern:/^3[47]/,minLength:15,maxLength:15},{name:"Discover",type:"discover",pattern:/^6(?:011|5[0-9]{2})/,minLength:16,maxLength:16},{name:"JCB",type:"jcb",pattern:/^(?:2131|1800|35\d{3})/,minLength:15,maxLength:16},{name:"Diners Club",type:"diners-club",pattern:/^3(?:0[0-5]|[68][0-9])/,minLength:14,maxLength:16},{name:"Union Pay",type:"unionpay",pattern:/^62[^7]+/,minLength:16,maxLength:19},{name:"Maestro",type:"maestro",pattern:/^(50[^69]|5[68]|5018|5020|5038|627|6304|6759|6761|6763|6[3][^6]+)/,minLength:12,maxLength:19}],ui=r=>bt.find(t=>t.pattern.test(r))||null,pi=r=>bt.filter(t=>t.pattern.test(r)),rl=r=>{let t=0,e=!1;for(let n=r.length-1;n>=0;n--){let i=parseInt(r[n]);e&&(i*=2,i>9&&(i-=9)),t+=i,e=!e}return t%10===0},hi=(r,t)=>{const e=r.replace(/\D/g,"");if(!e)return{isValid:!1,cardType:null,error:pe.Empty};if(!/^\d+$/.test(e))return{isValid:!1,cardType:null,error:pe.Invalid};const n=ui(e);if(n){if(e.length<n.minLength||e.length>n.maxLength)return{isValid:!1,cardType:n.name,error:pe.Incomplete}}else if(e.length<16)return{isValid:!1,cardType:null,error:pe.Incomplete};return n&&t&&!t.includes(n.type)?{isValid:!1,cardType:n.name,error:"unsupported"}:rl(e)?{isValid:!0,cardType:(n==null?void 0:n.name)||null,error:null}:{isValid:!1,cardType:(n==null?void 0:n.name)||null,error:pe.Invalid}},nl=r=>{var t;return!r||typeof r.amount!="number"||!r.currency||!r.country||!r.merchant_id||r.checkout_config&&!((t=r.checkout_config)==null?void 0:t.find(({is_active:n,type:i})=>n&&i==="google-pay"))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:[]}},il=r=>{var t,e;return!r||typeof r.amount!="number"||!r.currency||!r.country||!r.merchant_id||r.checkout_config&&!((t=r.checkout_config)==null?void 0:t.find(({is_active:i,type:a})=>i&&a==="apple-pay"))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:((e=r.apple_pay_info)==null?void 0:e.line_items)||[]}},al=(r=[])=>r.reduce((t,e)=>{switch(e){case ge.Visa:return t.push("visa"),t;case ge.Mastercard:return t.push("masterCard"),t;case ge.AmericanExpress:return t.push("amex"),t;case ge.Discover:return t.push("discover"),t;case ge.JCB:return t.push("jcb"),t;case ge.UnionPay:return t.push("chinaUnionPay"),t;default:return t}},[]),sl=r=>({ar:"ar-AB",en:"en-GB",cs:"cs-CZ",da:"da-DK",de:"de-DE",el:"el-GR",es:"es-ES",fi:"fi-FI",fr:"fr-FR",hr:"hr-HR",hu:"hu-HU",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",ms:"ms-MY",ru:"ru-RU",nb:"nb-NO",no:"nb-NO",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ua:"uk-UA",sk:"sk-SK",sv:"sv-SE",th:"th-TH",tr:"tr-TR",vi:"vi-VN",zh:"zh-CN"})[r]||"en-US",ol=r=>({en:"en",ar:"ar",cs:"cs",da:"da",de:"de",el:"el",es:"es",fi:"fi",fr:"fr",hr:"hr",id:"id",it:"it",ja:"ja",ko:"ko",ms:"ms",ru:"ru",nl:"nl",pl:"pl",pt:"pt",sv:"sv",th:"th",tr:"tr",zh:"zh"})[r]||"en";class ll{constructor(t){y(this,"element");y(this,"events",{ready:new se});y(this,"ev");y(this,"customButtonStyles");this.config=t;const e=this.config.state.styles.getState().ApplePayButton;this.ev=this.config.service.ev,this.customButtonStyles=e,this.element=document.createElement("div"),this.element.classList.add(ur.applePay,ur.hidden)}init(t){return z(this,null,function*(){if(!this.config)return;const e=this.config.state.transaction.getState();if(!e||Object.keys(e).length===0)return;const{locale:n,supportedCardTypes:i}=this.config.state.checkout.getState(),a=il(e);a&&(yield this.ev.initApple(X(j({},t),{transaction:a,supportedCardTypes:al(i),locale:sl(n||"en")}),this.customButtonStyles),this.ev.isAppleAvailable()&&(yield this.ev.renderApple(this.element),this.element.classList.remove(ur.hidden),this.events.ready.emit()))})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}var te=(r=>(r.PAYPAL="paypal",r.APPLE_PAY="apple-pay",r.GOOGLE_PAY="google-pay",r.CARD="card",r.VENMO="venmo",r))(te||{});const hr=(r="sandbox")=>({develop:"https://api-dev.paynext.com",sandbox:"https://api-sandbox.paynext.com",staging:"https://api-staging.paynext.com",production:"https://api.paynext.com"})[r],cl=[{type:te.PAYPAL,order:1,is_active:!0},{type:te.APPLE_PAY,order:2,is_active:!0},{type:te.GOOGLE_PAY,order:3,is_active:!0},{type:te.CARD,order:4,is_active:!0}],dl={[te.GOOGLE_PAY]:"GPAY",[te.APPLE_PAY]:"APPLEPAY",[te.PAYPAL]:"PAYPAL",[te.CARD]:"CARD",[te.VENMO]:"VENMO"},ul=r=>r.googlePay?te.GOOGLE_PAY:r.applePay?te.APPLE_PAY:r.paypal?te.PAYPAL:r.braintree?te.VENMO:te.CARD,pl=r=>dl[r],hl=r=>{const t=r.card;if(t)return{bin:t.firstSixDigits,bin_data:{brand:t.cardBrand,country:t.country,currency_code:t.currency,funding:t.funding,issuer:t.issuer,type:t.type},cvc:t.cvc,exp_month:Number(t.expMonth),exp_year:Number(t.expYear),last4:t.lastFourDigits,number:t.number}},ml=r=>{var e;const t=r.paypal;if((e=t==null?void 0:t.billing_agreement_token)!=null&&e.paypalId)return{billing_agreement_token:t.billing_agreement_token.paypalId}},fl=r=>{var e,n;const t=r.googlePay;if(t!=null&&t.token)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(e=t.card)!=null&&e.expiry.month||t.token.expiry.month?Number(t.card.expiry.month||t.token.expiry.month):void 0,exp_year:(n=t.card)!=null&&n.expiry.year||t.token.expiry.year?Number(t.card.expiry.year||t.token.expiry.year):void 0,token:t.token.number,token_service_provider:t.token.tokenServiceProvider}},vl=r=>{var e,n,i,a,s,o;const t=r.applePay;if(t)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(n=(e=t.networkToken)==null?void 0:e.expiry)!=null&&n.month?Number(t.networkToken.expiry.month):void 0,exp_year:(a=(i=t.networkToken)==null?void 0:i.expiry)!=null&&a.year?Number(t.networkToken.expiry.year):void 0,token:(s=t.networkToken)==null?void 0:s.number,token_service_provider:(o=t.networkToken)==null?void 0:o.tokenServiceProvider}},gl=r=>{const t=r.braintree;if(t)return{payment_method_nonce:t.nonce}},mi=r=>{var n,i,a,s,o,l,c,d,u,h,p,m,f,v;const{applePay:t,googlePay:e}=r;if(!(!t&&!e))return{city:((n=t==null?void 0:t.billingContact)==null?void 0:n.locality)||((i=e==null?void 0:e.billingAddress)==null?void 0:i.locality)||void 0,country:((a=t==null?void 0:t.billingContact)==null?void 0:a.countryCode)||((s=e==null?void 0:e.billingAddress)==null?void 0:s.countryCode)||void 0,line1:((l=(o=t==null?void 0:t.billingContact)==null?void 0:o.addressLines)==null?void 0:l.at(0))||((c=e==null?void 0:e.billingAddress)==null?void 0:c.address1)||void 0,line2:((u=(d=t==null?void 0:t.billingContact)==null?void 0:d.addressLines)==null?void 0:u.at(1))||((h=e==null?void 0:e.billingAddress)==null?void 0:h.address2)||void 0,postal_code:((p=t==null?void 0:t.billingContact)==null?void 0:p.postalCode)||((m=e==null?void 0:e.billingAddress)==null?void 0:m.postalCode)||void 0,state:((f=t==null?void 0:t.billingContact)==null?void 0:f.administrativeArea)||((v=e==null?void 0:e.billingAddress)==null?void 0:v.administrativeArea)||void 0}},fi=r=>{var i,a,s,o,l,c,d,u,h,p,m,f,v,b,A,T,L,C,I;const{card:t,googlePay:e,applePay:n}=r;if(!(!t&&!(e!=null&&e.card)&&!(n!=null&&n.card)))return{bin:t==null?void 0:t.firstSixDigits,bin_data:{brand:(t==null?void 0:t.cardBrand)||((i=e==null?void 0:e.card)==null?void 0:i.brand)||((a=n==null?void 0:n.card)==null?void 0:a.brand),country:(t==null?void 0:t.country)||((s=e==null?void 0:e.card)==null?void 0:s.country)||((o=n==null?void 0:n.card)==null?void 0:o.country),currency_code:(t==null?void 0:t.currency)||((l=e==null?void 0:e.card)==null?void 0:l.currency)||((c=n==null?void 0:n.card)==null?void 0:c.currency),funding:(t==null?void 0:t.funding)||((d=e==null?void 0:e.card)==null?void 0:d.funding)||((u=n==null?void 0:n.card)==null?void 0:u.funding),issuer:(t==null?void 0:t.issuer)||((h=e==null?void 0:e.card)==null?void 0:h.issuer)||((p=n==null?void 0:n.card)==null?void 0:p.issuer),type:(t==null?void 0:t.type)||((m=e==null?void 0:e.card)==null?void 0:m.segment)||((f=n==null?void 0:n.card)==null?void 0:f.segment)},cvc:t==null?void 0:t.cvc,exp_month:t!=null&&t.expMonth||(v=e==null?void 0:e.card)!=null&&v.expiry.month?Number((t==null?void 0:t.expMonth)||((b=e==null?void 0:e.card)==null?void 0:b.expiry.month)):void 0,exp_year:t!=null&&t.expYear||(A=e==null?void 0:e.card)!=null&&A.expiry.year?Number((t==null?void 0:t.expYear)||((T=e==null?void 0:e.card)==null?void 0:T.expiry.year)):void 0,last4:(t==null?void 0:t.lastFourDigits)||((L=e==null?void 0:e.card)==null?void 0:L.lastFour)||((C=n==null?void 0:n.card)==null?void 0:C.lastFour),number:(t==null?void 0:t.number)||((I=e==null?void 0:e.card)==null?void 0:I.number)}},vi=r=>{var n,i;const{applePay:t,card:e}=r;return(n=t==null?void 0:t.billingContact)!=null&&n.givenName?`${t.billingContact.givenName} ${t.billingContact.familyName||""}`.trim():(i=e==null?void 0:e.metadata)==null?void 0:i.name},bl=r=>{var i,a;const t=ul(r),e=pl(t),n={client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:e};switch(t){case te.CARD:return X(j({},n),{name:vi(r),card:hl(r)});case te.PAYPAL:return X(j({},n),{paypal:ml(r)});case te.GOOGLE_PAY:return X(j({},n),{card:fi(r),google_pay:fl(r),billing_address:mi(r)});case te.APPLE_PAY:return X(j({},n),{name:vi(r),card:fi(r),apple_pay:vl(r),phone:(a=(i=r.applePay)==null?void 0:i.shippingContact)==null?void 0:a.phoneNumber,billing_address:mi(r)});case te.VENMO:return X(j({},n),{venmo:gl(r)});default:throw new Error(`Unsupported payment method: ${t}`)}},yl=(r,t,e,n)=>z(this,null,function*(){const i=`${hr(t)}/internal/payments/create`,a=new Headers;a.append("Content-Type","application/json"),a.append("X-API-Version",e);const s=bl(r);return yield(yield fetch(i,{method:"POST",headers:a,body:JSON.stringify(X(j({},s),{use_workflows:n||void 0}))})).json()}),_l=(r,t,e)=>z(this,null,function*(){const n=`${hr(t)}/internal/payments/create/billing/agreement`,i=new Headers;return i.append("Content-Type","application/json"),i.append("X-API-Version",e),(yield(yield fetch(n,{method:"POST",headers:i,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),El=(r,t,e)=>z(this,null,function*(){const n=`${hr(t)}/internal/payments/config?client_session_id=${r}`,i=new Headers;i.append("X-API-Version",e);const s=yield(yield fetch(n,{headers:i})).json();return s.checkout_config||(s.checkout_config=cl),s}),Cl=[{type:te.PAYPAL,is_active:!0,order:1},{type:te.APPLE_PAY,is_active:!0,order:2},{type:te.GOOGLE_PAY,is_active:!0,order:3},{type:te.VENMO,is_active:!0,order:4},{type:te.CARD,is_active:!0,order:5}],He={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},yt={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},fe={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},_e={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.5,type:"spring",bounce:0}},mr={googlePay:"_googlePay_1xmjo_1",hidden:"_hidden_1xmjo_17"};class wl{constructor(t){y(this,"element");y(this,"events",{ready:new se});y(this,"ev");y(this,"customButtonStyles");this.config=t,this.ev=this.config.service.ev,this.customButtonStyles=this.config.state.styles.getState().GooglePayButton,this.element=document.createElement("div"),this.element.classList.add(mr.googlePay,mr.hidden)}isIOS(){if(typeof navigator=="undefined")return!1;const t=navigator.userAgent||"";return/iPad|iPhone|iPod/.test(t)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}isMacOS(){return typeof navigator=="undefined"?!1:navigator.platform.toLowerCase().includes("mac")}isSafari(){if(typeof navigator=="undefined")return!1;const t=navigator.userAgent||"";return t.includes("Safari")&&!t.includes("Chrome")&&!t.includes("CriOS")&&!t.includes("FxiOS")&&!t.includes("Edg")&&!t.includes("OPR")}init(t){return z(this,null,function*(){if(!this.config||this.isIOS()||this.isSafari()||this.isMacOS())return;const e=this.config.state.transaction.getState();if(!e||Object.keys(e).length===0)return;const{locale:n}=this.config.state.checkout.getState(),i=nl(e);i&&(yield this.ev.initGoogle(X(j({},t),{transaction:i,locale:ol(n||"en")}),this.customButtonStyles),yield this.ev.renderGoogle(this.element),this.element.classList.remove(mr.hidden),this.events.ready.emit())})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const fr={paypal:"_paypal_2zo1j_1",hidden:"_hidden_2zo1j_10"};class Al{constructor(t){y(this,"element");y(this,"events",{ready:new se});y(this,"paypal");y(this,"customButtonStyles");this.config=t,this.paypal=this.config.service.paypal,this.customButtonStyles=this.config.state.styles.getState().PayPalButton,this.element=document.createElement("div"),this.element.classList.add(fr.paypal,fr.hidden)}init(t){return z(this,null,function*(){var a,s,o;if(!this.config)return;const e=this.config.state.transaction.getState(),n=this.config.state.checkout.getState(),i=()=>z(this,null,function*(){return yield _l(n.clientToken,n.environment,n.apiVersion)});!e||Object.keys(e).length===0||(yield this.paypal.init({clientId:((a=e==null?void 0:e.paypal_info)==null?void 0:a.client_id)||"",environment:((s=e==null?void 0:e.paypal_info)==null?void 0:s.environment)||"sandbox",vault:!0}),yield this.paypal.render(this.element,X(j({},t),{createBillingAgreement:i,onApprove:c=>z(this,[c],function*({billingToken:l}){var d;(d=t==null?void 0:t.onSuccess)==null||d.call(t,l||"")}),style:(o=this.customButtonStyles)==null?void 0:o.styles,onCancel:t==null?void 0:t.onCancel,onError:t==null?void 0:t.onError})),this.element.classList.remove(fr.hidden),this.events.ready.emit())})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}class Tl{constructor(){y(this,"template",`
|
|
8
|
+
`);b(this,"spinner",document.createElement("div"));this.spinner.setAttribute("role","status"),this.spinner.classList.add(Z.spinnerContainer),this.spinner.innerHTML=this.template}addClass(t){this.spinner.classList.add(t)}removeClass(t){this.spinner.classList.remove(t)}render(){return this.spinner}}const ti={loader:"_loader_nwq3e_1"};class Wo{constructor(){b(this,"loader");this.loader=document.createElement("div"),this.loader.classList.add(ti.loader),this.loader.appendChild(new ei().render())}setClassName(t){t?this.loader.classList.add(t):this.loader.className=ti.loader}render(){return this.loader}}const ye={checkout:"_checkout_5sq3n_1",hidden:"_hidden_5sq3n_7",formInitial:"_formInitial_5sq3n_11",btnsInitial:"_btnsInitial_5sq3n_16"},ur={buttons:"_buttons_1i8cu_1",hidden:"_hidden_1i8cu_5"},pr={applePay:"_applePay_1ce61_1",hidden:"_hidden_1ce61_26"};function ri(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var hr,ni;function Go(){if(ni)return hr;ni=1;var r={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,[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[62207,62209],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,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,63737423,63743358,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}}};return hr=r,hr}var st={},ot={},ii;function ai(){if(ii)return ot;ii=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.clone=void 0;function r(t){return t?JSON.parse(JSON.stringify(t)):null}return ot.clone=r,ot}var lt={},si;function Yo(){if(si)return lt;si=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.matches=void 0;function r(n,a,i){var s=String(a).length,o=n.substr(0,s),c=parseInt(o,10);return a=parseInt(String(a).substr(0,o.length),10),i=parseInt(String(i).substr(0,o.length),10),c>=a&&c<=i}function t(n,a){return a=String(a),a.substring(0,n.length)===n.substring(0,a.length)}function e(n,a){return Array.isArray(a)?r(n,a[0],a[1]):t(n,a)}return lt.matches=e,lt}var oi;function $o(){if(oi)return st;oi=1,Object.defineProperty(st,"__esModule",{value:!0}),st.addMatchingCardsToResults=void 0;var r=ai(),t=Yo();function e(n,a,i){var s,o;for(s=0;s<a.patterns.length;s++){var c=a.patterns[s];if((0,t.matches)(n,c)){var l=(0,r.clone)(a);Array.isArray(c)?o=String(c[0]).length:o=String(c).length,n.length>=o&&(l.matchStrength=o),i.push(l);break}}}return st.addMatchingCardsToResults=e,st}var ct={},li;function Qo(){if(li)return ct;li=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.isValidInputType=void 0;function r(t){return typeof t=="string"||t instanceof String}return ct.isValidInputType=r,ct}var dt={},ci;function Zo(){if(ci)return dt;ci=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.findBestMatch=void 0;function r(e){var n=e.filter(function(a){return a.matchStrength}).length;return n>0&&n===e.length}function t(e){return r(e)?e.reduce(function(n,a){return!n||Number(n.matchStrength)<Number(a.matchStrength)?a:n}):null}return dt.findBestMatch=t,dt}var ut,di;function Xo(){if(di)return ut;di=1;var r=ut&&ut.__assign||function(){return r=Object.assign||function(m){for(var f,v=1,y=arguments.length;v<y;v++){f=arguments[v];for(var A in f)Object.prototype.hasOwnProperty.call(f,A)&&(m[A]=f[A])}return m},r.apply(this,arguments)},t=Go(),e=$o(),n=Qo(),a=Zo(),i=ai(),s={},o={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},c=[o.VISA,o.MASTERCARD,o.AMERICAN_EXPRESS,o.DINERS_CLUB,o.DISCOVER,o.JCB,o.UNIONPAY,o.MAESTRO,o.ELO,o.MIR,o.HIPER,o.HIPERCARD],l=(0,i.clone)(c);function d(m){return s[m]||t[m]}function u(){return l.map(function(m){return(0,i.clone)(d(m))})}function h(m,f){f===void 0&&(f=!1);var v=l.indexOf(m);if(!f&&v===-1)throw new Error('"'+m+'" is not a supported card type.');return v}function p(m){var f=[];if(!(0,n.isValidInputType)(m))return f;if(m.length===0)return u();l.forEach(function(y){var A=d(y);(0,e.addMatchingCardsToResults)(m,A,f)});var v=(0,a.findBestMatch)(f);return v?[v]:f}return p.getTypeInfo=function(m){return(0,i.clone)(d(m))},p.removeCard=function(m){var f=h(m);l.splice(f,1)},p.addCard=function(m){var f=h(m.type,!0);s[m.type]=m,f===-1&&l.push(m.type)},p.updateCard=function(m,f){var v=s[m]||t[m];if(!v)throw new Error('"'.concat(m,"\" is not a recognized type. Use `addCard` instead.'"));if(f.type&&v.type!==f.type)throw new Error("Cannot overwrite type parameter.");var y=(0,i.clone)(v);y=r(r({},y),f),s[y.type]=y},p.changeOrder=function(m,f){var v=h(m);l.splice(v,1),l.splice(f,0,m)},p.resetModifications=function(){l=(0,i.clone)(c),s={}},p.types=o,ut=p,ut}var qe=Xo();qe.updateCard("visa",{lengths:[16]}),qe.updateCard("unionpay",{gaps:[4,8,12,16]});const Jo=(r,t)=>{const e=qe.getTypeInfo(t),n=r.replace(/\D/g,""),a=(e==null?void 0:e.gaps)||[4,8,12],i=e?Math.max(...e.lengths)+a.length:19,s=[0].concat(a,n.length),o=[];for(let c=0;s[c]<n.length;c++){const l=s[c],d=Math.min(s[c+1],n.length);o.push(n.slice(l,d))}return o.join(" ").slice(0,i)},el=(r,t)=>{const e=qe.getTypeInfo(t),n=(e==null?void 0:e.code.size)||4;return r.replace(/\D/g,"").slice(0,n)},tl=(r,t)=>{const e=r.replace(/\D/g,"");let n=e.slice(0,2);if(!n)return"";const a=Number(n);if(n!=="01"){if(Number.isNaN(a))return"0";if(a===0||a===1)return`${a}`;if(a>12)return"1";n=a>9?`${a}`:`0${a}`}if(r.length<t.length){const s=Number(r[r.length-1]);if(Number.isNaN(s))return n}const i=e.slice(2,4);return`${n} / ${i}`};var pe=(r=>(r.Invalid="invalid",r.Empty="empty",r.Incomplete="incomplete",r.Unsupported="unsupported",r.Expired="expired",r))(pe||{}),ve=(r=>(r.Visa="visa",r.Mastercard="mastercard",r.AmericanExpress="american-express",r.Discover="discover",r.JCB="jcb",r.DinersClub="diners-club",r.UnionPay="unionpay",r.Maestro="maestro",r))(ve||{});const bt=[{name:"Visa",type:"visa",pattern:/^4/,minLength:16,maxLength:16},{name:"MasterCard",type:"mastercard",pattern:/^5[1-5]/,minLength:16,maxLength:16},{name:"American Express",type:"american-express",pattern:/^3[47]/,minLength:15,maxLength:15},{name:"Discover",type:"discover",pattern:/^6(?:011|5[0-9]{2})/,minLength:16,maxLength:16},{name:"JCB",type:"jcb",pattern:/^(?:2131|1800|35\d{3})/,minLength:15,maxLength:16},{name:"Diners Club",type:"diners-club",pattern:/^3(?:0[0-5]|[68][0-9])/,minLength:14,maxLength:16},{name:"Union Pay",type:"unionpay",pattern:/^62[^7]+/,minLength:16,maxLength:19},{name:"Maestro",type:"maestro",pattern:/^(50[^69]|5[68]|5018|5020|5038|627|6304|6759|6761|6763|6[3][^6]+)/,minLength:12,maxLength:19}],ui=r=>bt.find(t=>t.pattern.test(r))||null,pi=r=>bt.filter(t=>t.pattern.test(r)),rl=r=>{let t=0,e=!1;for(let n=r.length-1;n>=0;n--){let a=parseInt(r[n]);e&&(a*=2,a>9&&(a-=9)),t+=a,e=!e}return t%10===0},hi=(r,t)=>{const e=r.replace(/\D/g,"");if(!e)return{isValid:!1,cardType:null,error:pe.Empty};if(!/^\d+$/.test(e))return{isValid:!1,cardType:null,error:pe.Invalid};const n=ui(e);if(n){if(e.length<n.minLength||e.length>n.maxLength)return{isValid:!1,cardType:n.name,error:pe.Incomplete}}else if(e.length<16)return{isValid:!1,cardType:null,error:pe.Incomplete};return n&&t&&!t.includes(n.type)?{isValid:!1,cardType:n.name,error:"unsupported"}:rl(e)?{isValid:!0,cardType:(n==null?void 0:n.name)||null,error:null}:{isValid:!1,cardType:(n==null?void 0:n.name)||null,error:pe.Invalid}},nl=r=>{var t;return r?typeof r.amount!="number"?(console.error("Transaction amount is missing or invalid for Google Pay"),null):r.currency?r.country?r.merchant_id?r.checkout_config&&!((t=r.checkout_config)==null?void 0:t.find(({is_active:n,type:a})=>n&&a==="google-pay"))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:[]}:(console.error("Transaction merchant_id is missing for Google Pay"),null):(console.error("Transaction country is missing for Google Pay"),null):(console.error("Transaction currency is missing for Google Pay"),null):(console.error("TransactionConfig is missing for Google Pay"),null)},il=r=>{var t,e;return r?typeof r.amount!="number"?(console.error("Transaction amount is missing or invalid for Apple Pay"),null):r.currency?r.country?r.merchant_id?r.checkout_config&&!((t=r.checkout_config)==null?void 0:t.find(({is_active:a,type:i})=>a&&i==="apple-pay"))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:((e=r.apple_pay_info)==null?void 0:e.line_items)||[]}:(console.error("Transaction merchant_id is missing for Apple Pay"),null):(console.error("Transaction country is missing for Apple Pay"),null):(console.error("Transaction currency is missing for Apple Pay"),null):(console.error("TransactionConfig is missing for Apple Pay"),null)},al=(r=[])=>r.reduce((t,e)=>{switch(e){case ve.Visa:return t.push("visa"),t;case ve.Mastercard:return t.push("masterCard"),t;case ve.AmericanExpress:return t.push("amex"),t;case ve.Discover:return t.push("discover"),t;case ve.JCB:return t.push("jcb"),t;case ve.UnionPay:return t.push("chinaUnionPay"),t;default:return t}},[]),sl=r=>({ar:"ar-AB",en:"en-GB",cs:"cs-CZ",da:"da-DK",de:"de-DE",el:"el-GR",es:"es-ES",fi:"fi-FI",fr:"fr-FR",hr:"hr-HR",hu:"hu-HU",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",ms:"ms-MY",ru:"ru-RU",nb:"nb-NO",no:"nb-NO",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ua:"uk-UA",sk:"sk-SK",sv:"sv-SE",th:"th-TH",tr:"tr-TR",vi:"vi-VN",zh:"zh-CN"})[r]||"en-US",ol=r=>({en:"en",ar:"ar",cs:"cs",da:"da",de:"de",el:"el",es:"es",fi:"fi",fr:"fr",hr:"hr",id:"id",it:"it",ja:"ja",ko:"ko",ms:"ms",ru:"ru",nl:"nl",pl:"pl",pt:"pt",sv:"sv",th:"th",tr:"tr",zh:"zh"})[r]||"en";class _t{constructor(){b(this,"template",`
|
|
9
|
+
<svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
|
|
10
|
+
<g fill='none' fill-rule='evenodd' transform='matrix(1 0 0 -1 0 12)'>
|
|
11
|
+
<circle cx='6' cy='3.2' fill='currentColor' r='1'></circle>
|
|
12
|
+
<g stroke='currentColor'>
|
|
13
|
+
<circle cx='6' cy='6' r='5.5'></circle>
|
|
14
|
+
<path d='m6 9.2v-3.2' stroke-linecap='round' stroke-linejoin='round'></path>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
18
|
+
<span class="${Z.srOnly}">Warning</span>
|
|
19
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.warning),this.element.innerHTML=this.template}render(){return this.element}}const mi={container:"_container_94v1h_1",title:"_title_94v1h_10"};class pt{constructor(t){b(this,"element");b(this,"message",document.createElement("p"));b(this,"icon",new _t);b(this,"hasCustomMessage",!1);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(mi.container),this.message.classList.add(mi.title),this.message.textContent=t.messages().status.error,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:e})=>{this.hasCustomMessage||(this.message.textContent=e.status.error)})}setMessage(t){this.message.textContent=t,this.hasCustomMessage=!!t}addClassName(t){this.element.classList.add(t)}removeClassName(t){this.element.classList.remove(t)}render(){return this.element}}class ll{constructor(t){b(this,"element");b(this,"events",{ready:new se});b(this,"ev");b(this,"customButtonStyles");b(this,"error");b(this,"isInitialized",!1);this.config=t;const e=this.config.state.styles.getState().ApplePayButton;this.ev=this.config.service.ev,this.customButtonStyles=e,this.error=new pt(this.config.state.translate),this.element=document.createElement("div"),this.element.classList.add(pr.applePay,pr.hidden),this.error.setMessage(""),this.error.render().style.display="none"}init(t){return z(this,null,function*(){if(!this.config)return;const e=this.config.state.transaction.getState(),{locale:n,supportedCardTypes:a}=this.config.state.checkout.getState(),i=il(e);if(!i)return;const s=t?X(B({},t),{onError:o=>{var l;if(!this.isInitialized){console.error("Apple Pay error:",o);return}const c=o instanceof Error?o.message:typeof o=="string"?o:o&&typeof o=="object"&&"message"in o?String(o.message):JSON.stringify(o||{});this.error.setMessage(`Apple Pay error: ${c}`),this.error.render().style.display="",(l=t.onError)==null||l.call(t,o)},onCancel:t.onCancel,onSuccess:o=>{var c;this.error.render().style.display="none",(c=t.onSuccess)==null||c.call(t,o)}}):void 0;yield this.ev.initApple(X(B({},s),{transaction:i,supportedCardTypes:al(a),locale:sl(n||"en")}),this.customButtonStyles),this.ev.isAppleAvailable()&&(yield this.ev.renderApple(this.element),this.element.append(this.error.render()),this.isInitialized=!0,this.element.classList.remove(pr.hidden),this.events.ready.emit())})}addEventListener(t,e){return this.events[t].addListener(e)}showExternalError(t){if(!this.isInitialized){console.error("Apple Pay error:",t);return}this.error.setMessage(`Apple Pay error: ${t}`),this.error.render().style.display=""}render(){return this.element}}var J=(r=>(r.PAYPAL="paypal",r.APPLE_PAY="apple-pay",r.GOOGLE_PAY="google-pay",r.CARD="card",r.VENMO="venmo",r))(J||{});const mr=(r="sandbox")=>({develop:"https://api-dev.paynext.com",sandbox:"https://api-sandbox.paynext.com",staging:"https://api-staging.paynext.com",production:"https://api.paynext.com"})[r],cl=[{type:J.PAYPAL,order:1,is_active:!0},{type:J.APPLE_PAY,order:2,is_active:!0},{type:J.GOOGLE_PAY,order:3,is_active:!0},{type:J.CARD,order:4,is_active:!0}],dl={[J.GOOGLE_PAY]:"GPAY",[J.APPLE_PAY]:"APPLEPAY",[J.PAYPAL]:"PAYPAL",[J.CARD]:"CARD",[J.VENMO]:"VENMO"},ul=r=>r.googlePay?J.GOOGLE_PAY:r.applePay?J.APPLE_PAY:r.paypal?J.PAYPAL:r.braintree?J.VENMO:J.CARD,pl=r=>dl[r],hl=r=>{const t=r.card;if(t)return{bin:t.firstSixDigits,bin_data:{brand:t.cardBrand,country:t.country,currency_code:t.currency,funding:t.funding,issuer:t.issuer,type:t.type},cvc:t.cvc,exp_month:Number(t.expMonth),exp_year:Number(t.expYear),last4:t.lastFourDigits,number:t.number}},ml=r=>{var e;const t=r.paypal;if((e=t==null?void 0:t.billing_agreement_token)!=null&&e.paypalId)return{billing_agreement_token:t.billing_agreement_token.paypalId}},fl=r=>{var e,n;const t=r.googlePay;if(t!=null&&t.token)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(e=t.card)!=null&&e.expiry.month||t.token.expiry.month?Number(t.card.expiry.month||t.token.expiry.month):void 0,exp_year:(n=t.card)!=null&&n.expiry.year||t.token.expiry.year?Number(t.card.expiry.year||t.token.expiry.year):void 0,token:t.token.number,token_service_provider:t.token.tokenServiceProvider}},vl=r=>{var e,n,a,i,s,o;const t=r.applePay;if(t)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(n=(e=t.networkToken)==null?void 0:e.expiry)!=null&&n.month?Number(t.networkToken.expiry.month):void 0,exp_year:(i=(a=t.networkToken)==null?void 0:a.expiry)!=null&&i.year?Number(t.networkToken.expiry.year):void 0,token:(s=t.networkToken)==null?void 0:s.number,token_service_provider:(o=t.networkToken)==null?void 0:o.tokenServiceProvider}},gl=r=>{const t=r.braintree;if(t)return{payment_method_nonce:t.nonce}},fi=r=>{var n,a,i,s,o,c,l,d,u,h,p,m,f,v;const{applePay:t,googlePay:e}=r;if(!(!t&&!e))return{city:((n=t==null?void 0:t.billingContact)==null?void 0:n.locality)||((a=e==null?void 0:e.billingAddress)==null?void 0:a.locality)||void 0,country:((i=t==null?void 0:t.billingContact)==null?void 0:i.countryCode)||((s=e==null?void 0:e.billingAddress)==null?void 0:s.countryCode)||void 0,line1:((c=(o=t==null?void 0:t.billingContact)==null?void 0:o.addressLines)==null?void 0:c.at(0))||((l=e==null?void 0:e.billingAddress)==null?void 0:l.address1)||void 0,line2:((u=(d=t==null?void 0:t.billingContact)==null?void 0:d.addressLines)==null?void 0:u.at(1))||((h=e==null?void 0:e.billingAddress)==null?void 0:h.address2)||void 0,postal_code:((p=t==null?void 0:t.billingContact)==null?void 0:p.postalCode)||((m=e==null?void 0:e.billingAddress)==null?void 0:m.postalCode)||void 0,state:((f=t==null?void 0:t.billingContact)==null?void 0:f.administrativeArea)||((v=e==null?void 0:e.billingAddress)==null?void 0:v.administrativeArea)||void 0}},vi=r=>{var a,i,s,o,c,l,d,u,h,p,m,f,v,y,A,I,L,C,T;const{card:t,googlePay:e,applePay:n}=r;if(!(!t&&!(e!=null&&e.card)&&!(n!=null&&n.card)))return{bin:t==null?void 0:t.firstSixDigits,bin_data:{brand:(t==null?void 0:t.cardBrand)||((a=e==null?void 0:e.card)==null?void 0:a.brand)||((i=n==null?void 0:n.card)==null?void 0:i.brand),country:(t==null?void 0:t.country)||((s=e==null?void 0:e.card)==null?void 0:s.country)||((o=n==null?void 0:n.card)==null?void 0:o.country),currency_code:(t==null?void 0:t.currency)||((c=e==null?void 0:e.card)==null?void 0:c.currency)||((l=n==null?void 0:n.card)==null?void 0:l.currency),funding:(t==null?void 0:t.funding)||((d=e==null?void 0:e.card)==null?void 0:d.funding)||((u=n==null?void 0:n.card)==null?void 0:u.funding),issuer:(t==null?void 0:t.issuer)||((h=e==null?void 0:e.card)==null?void 0:h.issuer)||((p=n==null?void 0:n.card)==null?void 0:p.issuer),type:(t==null?void 0:t.type)||((m=e==null?void 0:e.card)==null?void 0:m.segment)||((f=n==null?void 0:n.card)==null?void 0:f.segment)},cvc:t==null?void 0:t.cvc,exp_month:t!=null&&t.expMonth||(v=e==null?void 0:e.card)!=null&&v.expiry.month?Number((t==null?void 0:t.expMonth)||((y=e==null?void 0:e.card)==null?void 0:y.expiry.month)):void 0,exp_year:t!=null&&t.expYear||(A=e==null?void 0:e.card)!=null&&A.expiry.year?Number((t==null?void 0:t.expYear)||((I=e==null?void 0:e.card)==null?void 0:I.expiry.year)):void 0,last4:(t==null?void 0:t.lastFourDigits)||((L=e==null?void 0:e.card)==null?void 0:L.lastFour)||((C=n==null?void 0:n.card)==null?void 0:C.lastFour),number:(t==null?void 0:t.number)||((T=e==null?void 0:e.card)==null?void 0:T.number)}},gi=r=>{var n,a;const{applePay:t,card:e}=r;return(n=t==null?void 0:t.billingContact)!=null&&n.givenName?`${t.billingContact.givenName} ${t.billingContact.familyName||""}`.trim():(a=e==null?void 0:e.metadata)==null?void 0:a.name},yl=r=>{var a,i;const t=ul(r),e=pl(t),n={client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:e};switch(t){case J.CARD:return X(B({},n),{name:gi(r),card:hl(r)});case J.PAYPAL:return X(B({},n),{paypal:ml(r)});case J.GOOGLE_PAY:return X(B({},n),{card:vi(r),google_pay:fl(r),billing_address:fi(r)});case J.APPLE_PAY:return X(B({},n),{name:gi(r),card:vi(r),apple_pay:vl(r),phone:(i=(a=r.applePay)==null?void 0:a.shippingContact)==null?void 0:i.phoneNumber,billing_address:fi(r)});case J.VENMO:return X(B({},n),{venmo:gl(r)});default:throw new Error(`Unsupported payment method: ${t}`)}},bl=(r,t,e,n)=>z(this,null,function*(){const a=`${mr(t)}/internal/payments/create`,i=new Headers;i.append("Content-Type","application/json"),i.append("X-API-Version",e);const s=yl(r);return yield(yield fetch(a,{method:"POST",headers:i,body:JSON.stringify(X(B({},s),{use_workflows:n||void 0}))})).json()}),_l=(r,t,e)=>z(this,null,function*(){const n=`${mr(t)}/internal/payments/create/billing/agreement`,a=new Headers;return a.append("Content-Type","application/json"),a.append("X-API-Version",e),(yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),El=(r,t,e)=>z(this,null,function*(){const n=`${mr(t)}/internal/payments/config?client_session_id=${r}`,a=new Headers;a.append("X-API-Version",e);const s=yield(yield fetch(n,{headers:a})).json();return s.checkout_config||(s.checkout_config=cl),s}),Cl=[{type:J.PAYPAL,is_active:!0,order:1},{type:J.APPLE_PAY,is_active:!0,order:2},{type:J.GOOGLE_PAY,is_active:!0,order:3},{type:J.VENMO,is_active:!0,order:4},{type:J.CARD,is_active:!0,order:5}],He={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},Et={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},me={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},_e={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.5,type:"spring",bounce:0}},fr={googlePay:"_googlePay_gmreq_1",hidden:"_hidden_gmreq_20"};class wl{constructor(t){b(this,"element");b(this,"events",{ready:new se});b(this,"ev");b(this,"customButtonStyles");b(this,"error");b(this,"isInitialized",!1);this.config=t,this.ev=this.config.service.ev,this.customButtonStyles=this.config.state.styles.getState().GooglePayButton,this.element=document.createElement("div"),this.element.classList.add(fr.googlePay,fr.hidden),this.error=new pt(this.config.state.translate),this.error.setMessage(""),this.error.render().style.display="none"}init(t){return z(this,null,function*(){if(!this.config)return;const e=this.config.state.transaction.getState(),{locale:n}=this.config.state.checkout.getState(),a=nl(e);if(!a)return;const i=t?X(B({},t),{onError:s=>{var c;if(!this.isInitialized){console.error("Google Pay error:",s);return}const o=s instanceof Error?s.message:typeof s=="string"?s:s&&typeof s=="object"&&"message"in s?String(s.message):JSON.stringify(s||{});this.error.setMessage(`Google Pay error: ${o}`),this.error.render().style.display="",(c=t.onError)==null||c.call(t,s)},onCancel:t.onCancel,onSuccess:s=>{var o;this.error.render().style.display="none",(o=t.onSuccess)==null||o.call(t,s)}}):void 0;yield this.ev.initGoogle(X(B({},i),{transaction:a,locale:ol(n||"en")}),this.customButtonStyles),yield this.ev.renderGoogle(this.element),this.element.append(this.error.render()),this.element.classList.remove(fr.hidden),this.isInitialized=!0,this.events.ready.emit()})}addEventListener(t,e){return this.events[t].addListener(e)}showExternalError(t){if(!this.isInitialized){console.error("Google Pay error:",t);return}this.error.setMessage(`Google Pay error: ${t}`),this.error.render().style.display=""}render(){return this.element}}const vr={paypal:"_paypal_90mm5_1",hidden:"_hidden_90mm5_12"};class Al{constructor(t){b(this,"element");b(this,"events",{ready:new se});b(this,"paypal");b(this,"customButtonStyles");b(this,"error");b(this,"isInitialized",!1);this.config=t,this.paypal=this.config.service.paypal,this.customButtonStyles=this.config.state.styles.getState().PayPalButton,this.element=document.createElement("div"),this.element.classList.add(vr.paypal,vr.hidden),this.error=new pt(this.config.state.translate),this.error.setMessage(""),this.error.render().style.display="none"}init(t){return z(this,null,function*(){var s,o,c;if(!this.config)return;const e=this.config.state.transaction.getState(),n=this.config.state.checkout.getState(),a=()=>z(this,null,function*(){return yield _l(n.clientToken,n.environment,n.apiVersion)});if(!e||Object.keys(e).length===0){console.error("PayPal transaction data is empty or invalid");return}yield this.paypal.init({clientId:((s=e==null?void 0:e.paypal_info)==null?void 0:s.client_id)||"",environment:((o=e==null?void 0:e.paypal_info)==null?void 0:o.environment)||"sandbox",vault:!0});const i=t?X(B({},t),{onError:l=>{var u;if(!this.isInitialized){console.error("PayPal error:",l);return}const d=l instanceof Error?l.message:typeof l=="string"?l:l&&typeof l=="object"&&"message"in l?String(l.message):JSON.stringify(l||{});this.error.setMessage(`PayPal error: ${d}`),this.error.render().style.display="",(u=t.onError)==null||u.call(t,l)},onCancel:t.onCancel,onSuccess:l=>{var d;this.error.render().style.display="none",(d=t.onSuccess)==null||d.call(t,l)}}):void 0;yield this.paypal.render(this.element,X(B({},i),{createBillingAgreement:a,onApprove:d=>z(this,[d],function*({billingToken:l}){var u;(u=i==null?void 0:i.onSuccess)==null||u.call(i,l||"")}),style:(c=this.customButtonStyles)==null?void 0:c.styles,onCancel:i==null?void 0:i.onCancel,onError:i==null?void 0:i.onError})),this.element.append(this.error.render()),this.element.classList.remove(vr.hidden),this.isInitialized=!0,this.events.ready.emit()})}addEventListener(t,e){return this.events[t].addListener(e)}showExternalError(t){if(!this.isInitialized){console.error("PayPal error:",t);return}this.error.setMessage(`PayPal error: ${t}`),this.error.render().style.display=""}render(){return this.element}}class Il{constructor(){b(this,"template",`
|
|
9
20
|
<svg
|
|
10
21
|
xmlns='http://www.w3.org/2000/svg'
|
|
11
22
|
fill='none'
|
|
@@ -20,10 +31,10 @@
|
|
|
20
31
|
<line x1='1' y1='8' x2='27' y2='8'></line>
|
|
21
32
|
</svg>
|
|
22
33
|
<span class="${Z.srOnly}">Pay with</span>
|
|
23
|
-
`);
|
|
34
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.card),this.element.innerHTML=this.template}render(){return this.element}}const yi={button:"_button_13xr0_1"};class Tl{constructor(t){b(this,"element");b(this,"icon",new Il);this.config=t;const e=this.config.state.styles.getState().WalletButton,n=this.config.state.translate;this.element=document.createElement("button"),this.element.classList.add(yi.button,yi.press),e!=null&&e.className&&this.element.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles);const a=document.createElement("span");a.textContent=n.getState().messages.card.compact.button,this.element.append(this.icon.render(),a),n.subscribe(({messages:i})=>{a.textContent=i.card.compact.button})}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const xl=(r,t,e)=>t.concat(r.filter(n=>t.every(a=>!e(n,a)))),Ct={conteiner:"_conteiner_1j5pe_2",venmo:"_venmo_1j5pe_8",hidden:"_hidden_1j5pe_33"},Ol={display:"flex",height:40,borderRadius:12},Nl=`<svg viewBox="2.3 484.3 611.9 117.80000000000001" xmlns="http://www.w3.org/2000/svg">
|
|
24
35
|
<path d="M103.1 485.8c4.2 7 5.7 14 5.7 22.4 0 28-23.8 65.9-43.4 91.1H20.5L2.3 491.5l40.6-2.8 9.8 77.1c8.4-14 19.7-37.9 19.7-53.2 0-8.4-1.4-14-4.2-19.7zm51.8 47.7c7 0 25.2-2.8 25.2-14 0-5.7-2.8-7-7-7-8.3 0-18.2 8.4-18.2 21zm-1.3 21c0 12.7 7 18.2 16.8 18.2s19.7-2.8 32.2-8.4l-5.7 30.8c-8.4 4.2-22.4 7-36.4 7-33.5 0-46.2-21-46.2-46.2 0-33.5 19.7-68.6 60.2-68.6 22.4 0 35 12.7 35 30.8 1.5 26.6-35 36.4-55.9 36.4zM324.4 511c0 4.2 0 9.8-1.4 14l-11.2 74.2H274l11.2-68.6c0-1.4 1.4-5.7 1.4-7 0-5.7-2.8-5.7-7-5.7-5.7 0-9.8 2.8-12.7 4.2l-14 77.1H215l16.8-112.1h33.5v8.4c8.4-5.7 18.2-11.2 32.2-11.2 19.9 3 26.9 12.7 26.9 26.7zm113.4-12.5c11.2-8.4 21-12.7 35-12.7 19.7 0 26.7 9.8 26.7 25.2 0 4.2 0 9.8-1.4 14L487 599.3h-37.9l11.2-70v-5.7c0-5.7-2.8-7-7-7s-9.8 1.4-12.7 4.2L428 599.2h-37.9l11.2-70v-5.7c0-5.7-2.8-7-7-7-5.7 0-9.8 2.8-12.7 4.2L369 599h-37.9L348 487h32.2l1.4 9.8c7-5.7 18.2-11.2 32.2-11.2 11.4 1.7 19.7 5.9 24 12.9zM575 532.1c0-9.8-2.8-15.4-9.8-15.4-15.4 0-18.2 26.7-18.2 40.6 0 9.8 2.8 16.8 9.8 16.8 15.5-1.4 18.2-29.4 18.2-42zm-65.8 22.4c0-35 18.2-68.6 61.6-68.6 32.2 0 43.4 19.7 43.4 44.9 0 35-18.2 70-61.6 70-32.2 1.3-43.4-19.7-43.4-46.3z"
|
|
25
36
|
fill="currentColor"/>
|
|
26
|
-
</svg>`;class Ll{constructor(t){
|
|
37
|
+
</svg>`;class Ll{constructor(t){b(this,"isProcessing",!1);b(this,"container");b(this,"venmoButton");b(this,"events",{ready:new se});b(this,"braintree");b(this,"error");b(this,"isInitialized",!1);this.config=t,this.braintree=this.config.service.braintree;const e=this.config.state.styles.getState().BraintreeButton;this.container=document.createElement("div"),this.container.classList.add(Ct.conteiner),this.venmoButton=document.createElement("button"),this.venmoButton.classList.add(Ct.venmo,Ct.hidden),e!=null&&e.className&&this.venmoButton.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.venmoButton.style,e.styles),this.venmoButton.setAttribute("aria-label","Venmo"),this.venmoButton.innerHTML=Nl,this.error=new pt(this.config.state.translate),this.error.setMessage(""),this.error.render().style.display="none",this.container.append(this.venmoButton)}init(t){return z(this,null,function*(){var n;if(!this.config)return;console.log("Initializing Braintree Venmo with config:",t);const e=this.config.state.transaction.getState();if(console.log("----- init braintree venmo: ",e),!e||Object.keys(e).length===0){console.error("Braintree Venmo transaction data is empty or invalid");return}try{if(yield this.braintree.init({authorization:((n=e==null?void 0:e.brain_tree_info)==null?void 0:n.client_token)||""}),yield this.braintree.createVenmo({}),!this.braintree.isBrowserSupported()){console.log("Browser does not support Venmo"),this.handleVenmoError(new Error("Browser does not support Venmo"));return}if(this.displayVenmoButton(t),this.braintree.hasTokenizationResult()){yield this.handleExistingTokenization(t);return}this.venmoButton.classList.remove(Ct.hidden),this.container.append(this.error.render()),this.isInitialized=!0,this.events.ready.emit()}catch(a){console.error("Error initializing Venmo:",a),this.handleVenmoError(a)}})}displayVenmoButton(t){Object.assign(this.venmoButton.style,Ol),this.venmoButton.addEventListener("click",()=>z(this,null,function*(){if(!this.isProcessing){this.isProcessing=!0,this.venmoButton.disabled=!0;try{const e=yield this.braintree.tokenize();this.handleVenmoSuccess(e,t)}catch(e){this.handleVenmoError(e,t)}finally{this.isProcessing=!1,this.venmoButton.disabled=!1}}}))}handleExistingTokenization(t){return z(this,null,function*(){try{const e=yield this.braintree.tokenize();this.handleVenmoSuccess(e,t)}catch(e){this.handleVenmoError(e,t)}})}handleVenmoSuccess(t,e){var n;console.log("Venmo payment successful:",t),this.error.render().style.display="none",(n=e.onSuccess)==null||n.call(e,t)}handleVenmoError(t,e){var a;if(console.error("Venmo error:",t),!this.isInitialized)return;const n=t instanceof Error?t.message:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t?String(t.message):JSON.stringify(t||{});this.error.setMessage(`Venmo error: ${n}`),this.error.render().style.display="",(a=e==null?void 0:e.onError)==null||a.call(e,t)}addEventListener(t,e){return this.events[t].addListener(e)}showExternalError(t){if(!this.isInitialized){console.error("Venmo error:",t);return}this.error.setMessage(`Venmo error: ${t}`),this.error.render().style.display=""}render(){return this.container}}class Pl{constructor(t){b(this,"isAppleReady",!0);b(this,"isGoogleReady",!0);b(this,"isPayPalReady",!0);b(this,"isBraintreeReady",!0);b(this,"buttons");b(this,"applePay");b(this,"googlePay");b(this,"paypal");b(this,"card");b(this,"braintree");b(this,"lastInteracted",null);b(this,"events",{ready:new se,open:new se,error:new se,cancel:new se,success:new se});this.config=t,this.buttons=document.createElement("div"),this.buttons.classList.add(ur.buttons,ur.hidden)}init(){return z(this,null,function*(){this.config.state.transaction.subscribe(()=>{this.config.service.ev.isReady&&this.initPaymentMethods().catch(console.error)}),this.config.state.checkout.subscribe(()=>{this.config.service.ev.isReady&&this.initPaymentMethods().catch(console.error)}),this.config.service.ev.addEventListener("ready",()=>{this.initPaymentMethods().catch(console.error)})})}initApple(){return z(this,null,function*(){if(this.applePay){this.isAppleReady=!1,this.buttons.appendChild(this.applePay.render());try{yield this.applePay.init({onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:t=>{this.lastInteracted="apple",this.events.success.emit(X(B({},t),{type:"apple"}))}})}catch(t){console.error(t)}finally{this.isAppleReady=!0}}})}initGoogle(){return z(this,null,function*(){if(this.googlePay){this.isGoogleReady=!1,this.buttons.appendChild(this.googlePay.render());try{yield this.googlePay.init({onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:t=>{this.lastInteracted="google",this.events.success.emit(X(B({},t),{type:"google"}))}})}catch(t){console.error(t)}finally{this.isGoogleReady=!0}}})}initPayPal(){return z(this,null,function*(){if(this.paypal){this.isPayPalReady=!1,this.buttons.appendChild(this.paypal.render());try{yield this.paypal.init({onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:t=>{this.lastInteracted="paypal",this.events.success.emit({paypalId:t,type:"paypal"})}})}catch(t){console.error(t)}finally{this.isPayPalReady=!0}}})}initBraintreeVenmo(){return z(this,null,function*(){if(this.braintree){this.isBraintreeReady=!1,this.buttons.appendChild(this.braintree.render());try{yield this.braintree.init({onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:t=>{this.lastInteracted="venmo",this.events.success.emit({nonce:t==null?void 0:t.nonce,type:"venmo"})}})}catch(t){console.error(t)}finally{this.isBraintreeReady=!0}}})}initCard(){return z(this,null,function*(){this.card&&this.buttons.appendChild(this.card.render())})}initPaymentMethods(){return z(this,null,function*(){const t=this.config.state.transaction.getState(),n=xl(Cl,(t==null?void 0:t.checkout_config)||[],(i,s)=>i.type===s.type).filter(({is_active:i})=>i);this.initializeButtonInstances(n);const a=n.sort((i,s)=>i.order-s.order).map(({type:i})=>{switch(i){case J.APPLE_PAY:return this.initApple();case J.GOOGLE_PAY:return this.initGoogle();case J.PAYPAL:return this.initPayPal();case J.VENMO:return this.initBraintreeVenmo();case J.CARD:return this.initCard();default:throw new Error("Unknown button type")}});yield Promise.all(a),this.handleReady()})}initializeButtonInstances(t){const e=t.map(({type:n})=>n);e.includes(J.APPLE_PAY)&&!this.applePay&&(this.applePay=new ll(this.config)),e.includes(J.GOOGLE_PAY)&&!this.googlePay&&(this.googlePay=new wl(this.config)),e.includes(J.PAYPAL)&&!this.paypal&&(this.paypal=new Al(this.config)),e.includes(J.VENMO)&&!this.braintree&&(this.braintree=new Ll(this.config)),e.includes(J.CARD)&&!this.card&&(this.card=new Tl(this.config),this.card.addEventListener(()=>{this.lastInteracted="card",this.events.open.emit()}))}handleReady(){this.isAppleReady&&this.isGoogleReady&&this.isPayPalReady&&this.isBraintreeReady&&this.events.ready.emit()}addEventListener(t,e){return this.events[t].addListener(e)}showButton(){this.buttons.classList.remove(ur.hidden)}render(){return this.buttons}showExternalError(t){var e,n,a,i;switch(this.lastInteracted){case"apple":(e=this.applePay)==null||e.showExternalError(t);break;case"google":(n=this.googlePay)==null||n.showExternalError(t);break;case"paypal":(a=this.paypal)==null||a.showExternalError(t);break;case"venmo":(i=this.braintree)==null||i.showExternalError(t);break}}}class kl{constructor(){b(this,"template",`
|
|
27
38
|
<svg
|
|
28
39
|
xmlns='http://www.w3.org/2000/svg'
|
|
29
40
|
width='24'
|
|
@@ -39,18 +50,7 @@
|
|
|
39
50
|
<polyline points='15 18 9 12 15 6'></polyline>
|
|
40
51
|
</svg>
|
|
41
52
|
<span class="${Z.srOnly}">Back</span>
|
|
42
|
-
`);
|
|
43
|
-
<svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
|
|
44
|
-
<g fill='none' fill-rule='evenodd' transform='matrix(1 0 0 -1 0 12)'>
|
|
45
|
-
<circle cx='6' cy='3.2' fill='currentColor' r='1'></circle>
|
|
46
|
-
<g stroke='currentColor'>
|
|
47
|
-
<circle cx='6' cy='6' r='5.5'></circle>
|
|
48
|
-
<path d='m6 9.2v-3.2' stroke-linecap='round' stroke-linejoin='round'></path>
|
|
49
|
-
</g>
|
|
50
|
-
</g>
|
|
51
|
-
</svg>
|
|
52
|
-
<span class="${Z.srOnly}">Warning</span>
|
|
53
|
-
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.warning),this.element.innerHTML=this.template}render(){return this.element}}class Dl{constructor(t,e){y(this,"id","paynext-card-input-name");y(this,"element");y(this,"inputContainer",document.createElement("div"));y(this,"input",document.createElement("input"));y(this,"label",document.createElement("label"));y(this,"labelText",document.createElement("span"));y(this,"labelError",document.createElement("span"));y(this,"endContent",document.createElement("div"));y(this,"warning",new Ct);y(this,"placeholderStyle",document.createElement("style"));y(this,"isTouchSubmit",!1);y(this,"isRequired",!1);y(this,"isDisabled",!1);y(this,"isChanged",!1);y(this,"events",{change:new se});var i,a,s,o,l,c,d,u,h;const n=t.messages();if(this.element=document.createElement("div"),this.element.classList.add(ce.wrapper),this.inputContainer.classList.add(ce.inputContainer),(i=e==null?void 0:e.container)!=null&&i.className&&this.inputContainer.classList.add(e.container.className),(a=e==null?void 0:e.container)!=null&&a.styles&&Object.assign(this.inputContainer.style,e.container.styles),this.input.setAttribute("id",this.id),this.input.setAttribute("auto-complete","cc-name"),this.input.setAttribute("placeholder",n.card.name.placeholder),this.input.classList.add(ce.input),(s=e==null?void 0:e.field)!=null&&s.className&&this.input.classList.add(e.field.className),(o=e==null?void 0:e.field)!=null&&o.styles&&Object.assign(this.input.style,e.field.styles),(l=e==null?void 0:e.placeholder)!=null&&l.styles&&Object.keys(e.placeholder.styles).length){const p=f=>f.replace(/[A-Z]/g,v=>"-"+v.toLowerCase()),m=Object.entries(e.placeholder.styles).map(([f,v])=>`${p(f)}:${v};`).join("");this.placeholderStyle.textContent=`#${this.id}::placeholder{${m}}`,this.element.appendChild(this.placeholderStyle)}this.endContent.classList.add(ce.hidden),this.endContent.appendChild(this.warning.render()),this.inputContainer.append(this.input,this.endContent),this.label.setAttribute("for",this.id),this.label.classList.add(ce.label),(c=e==null?void 0:e.label)!=null&&c.className&&this.label.classList.add(e.label.className),(d=e==null?void 0:e.label)!=null&&d.styles&&Object.assign(this.label.style,e.label.styles),this.labelText.textContent=n.card.name.label,this.labelError.textContent=n.card.name.error.required,this.labelError.classList.add(ce.labelError,ce.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&this.labelError.classList.add(e.error.className),(h=e==null?void 0:e.error)!=null&&h.styles&&Object.assign(this.labelError.style,e.error.styles),this.label.append(this.labelText,this.labelError),this.element.append(this.label,this.inputContainer),this.input.addEventListener("input",()=>this.handleChange(this.input.value)),this.input.addEventListener("paste",()=>this.handleChange(this.input.value)),this.input.addEventListener("blur",()=>this.validate(this.input.value)),t.subscribe(({messages:p})=>{this.input.setAttribute("placeholder",p.card.name.placeholder),this.labelText.textContent=p.card.name.label,this.labelError.textContent=p.card.name.error.required})}validator(t){return t?null:pe.Empty}handleChange(t){this.isDisabled||(this.isRequired=!1,this.isChanged||(this.isChanged=!0),this.events.change.emit({value:t,isValid:this.validator(t)===null}),this.render())}toggleLabelError(t){return z(this,null,function*(){if(t){this.inputContainer.classList.add(ce.errorInput),this.endContent.classList.remove(ce.hidden),this.labelError.classList.remove(ce.hidden),yield ue(this.labelError,fe.open,fe.transition);return}this.inputContainer.classList.remove(ce.errorInput),this.endContent.classList.add(ce.hidden),yield ue(this.labelError,fe.close,fe.transition),this.labelError.classList.add(ce.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.input.setAttribute("disabled","true"),this.input.classList.add(ce.disabledInput),this.inputContainer.classList.add(ce.disabled)):(this.input.removeAttribute("disabled"),this.input.classList.remove(ce.disabledInput),this.inputContainer.classList.remove(ce.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return this.input.value}validate(t){const e=this.validator(t);return this.isRequired=!!e,this.render(),!e}render(){const n=(this.isTouchSubmit||this.isChanged)&&this.isRequired&&!this.isDisabled;return this.toggleLabelError(n),this.isDisabled?(this.inputContainer.classList.add(ce.disabled),this.input.classList.add(ce.disabledInput)):(this.inputContainer.classList.remove(ce.disabled),this.input.classList.remove(ce.disabledInput)),this.element}}const oe={wrapper:"_wrapper_j8wuo_1",inputContainer:"_inputContainer_j8wuo_5",input:"_input_j8wuo_5",endContent:"_endContent_j8wuo_20",errorInput:"_errorInput_j8wuo_24",error:"_error_j8wuo_24",label:"_label_j8wuo_32",labelError:"_labelError_j8wuo_36",disabled:"_disabled_j8wuo_40",disabledInput:"_disabledInput_j8wuo_44",hidden:"_hidden_j8wuo_51"};class Vl{constructor(){y(this,"template",`
|
|
53
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}const Rl={button:"_button_125my_1"};class Ml{constructor(){b(this,"element");b(this,"icon",new kl);this.element=document.createElement("div"),this.element.classList.add(Rl.button),this.element.appendChild(this.icon.render())}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const Ne={button:"_button_191iv_1",disabled:"_disabled_191iv_17",press:"_press_191iv_22",hidden:"_hidden_191iv_26",spinner:"_spinner_191iv_30"};class Sl{constructor(t,e){b(this,"element");b(this,"spinner",new ei);b(this,"message",document.createElement("span"));this.element=document.createElement("button"),this.element.classList.add(Ne.button,Ne.press),e!=null&&e.className&&this.element.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles),this.spinner.addClass(Ne.spinner),this.spinner.addClass(Ne.hidden),this.message.textContent=t.messages().card.pay.button,this.element.append(this.spinner.render(),this.message),t.subscribe(n=>{this.message.textContent=n.messages.card.pay.button})}addEventListener(t){return this.element.addEventListener("click",t)}disable(t){t?(this.element.setAttribute("disabled","true"),this.element.classList.add(Ne.disabled),this.spinner.removeClass(Ne.hidden)):(this.element.removeAttribute("disabled"),this.element.classList.remove(Ne.disabled),this.spinner.addClass(Ne.hidden))}render(){return this.element}}const wt={cardForm:"_cardForm_isqbi_1",hidden:"_hidden_isqbi_5"},ce={wrapper:"_wrapper_4knhb_1",inputContainer:"_inputContainer_4knhb_5",input:"_input_4knhb_5",errorInput:"_errorInput_4knhb_24",label:"_label_4knhb_28",labelError:"_labelError_4knhb_32",disabled:"_disabled_4knhb_36",disabledInput:"_disabledInput_4knhb_40",hidden:"_hidden_4knhb_47"};class Dl{constructor(t,e){b(this,"id","paynext-card-input-name");b(this,"element");b(this,"inputContainer",document.createElement("div"));b(this,"input",document.createElement("input"));b(this,"label",document.createElement("label"));b(this,"labelText",document.createElement("span"));b(this,"labelError",document.createElement("span"));b(this,"endContent",document.createElement("div"));b(this,"warning",new _t);b(this,"placeholderStyle",document.createElement("style"));b(this,"isTouchSubmit",!1);b(this,"isRequired",!1);b(this,"isDisabled",!1);b(this,"isChanged",!1);b(this,"events",{change:new se});var a,i,s,o,c,l,d,u,h;const n=t.messages();if(this.element=document.createElement("div"),this.element.classList.add(ce.wrapper),this.inputContainer.classList.add(ce.inputContainer),(a=e==null?void 0:e.container)!=null&&a.className&&this.inputContainer.classList.add(e.container.className),(i=e==null?void 0:e.container)!=null&&i.styles&&Object.assign(this.inputContainer.style,e.container.styles),this.input.setAttribute("id",this.id),this.input.setAttribute("auto-complete","cc-name"),this.input.setAttribute("placeholder",n.card.name.placeholder),this.input.classList.add(ce.input),(s=e==null?void 0:e.field)!=null&&s.className&&this.input.classList.add(e.field.className),(o=e==null?void 0:e.field)!=null&&o.styles&&Object.assign(this.input.style,e.field.styles),(c=e==null?void 0:e.placeholder)!=null&&c.styles&&Object.keys(e.placeholder.styles).length){const p=f=>f.replace(/[A-Z]/g,v=>"-"+v.toLowerCase()),m=Object.entries(e.placeholder.styles).map(([f,v])=>`${p(f)}:${v};`).join("");this.placeholderStyle.textContent=`#${this.id}::placeholder{${m}}`,this.element.appendChild(this.placeholderStyle)}this.endContent.classList.add(ce.hidden),this.endContent.appendChild(this.warning.render()),this.inputContainer.append(this.input,this.endContent),this.label.setAttribute("for",this.id),this.label.classList.add(ce.label),(l=e==null?void 0:e.label)!=null&&l.className&&this.label.classList.add(e.label.className),(d=e==null?void 0:e.label)!=null&&d.styles&&Object.assign(this.label.style,e.label.styles),this.labelText.textContent=n.card.name.label,this.labelError.textContent=n.card.name.error.required,this.labelError.classList.add(ce.labelError,ce.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&this.labelError.classList.add(e.error.className),(h=e==null?void 0:e.error)!=null&&h.styles&&Object.assign(this.labelError.style,e.error.styles),this.label.append(this.labelText,this.labelError),this.element.append(this.label,this.inputContainer),this.input.addEventListener("input",()=>this.handleChange(this.input.value)),this.input.addEventListener("paste",()=>this.handleChange(this.input.value)),this.input.addEventListener("blur",()=>this.validate(this.input.value)),t.subscribe(({messages:p})=>{this.input.setAttribute("placeholder",p.card.name.placeholder),this.labelText.textContent=p.card.name.label,this.labelError.textContent=p.card.name.error.required})}validator(t){return t?null:pe.Empty}handleChange(t){this.isDisabled||(this.isRequired=!1,this.isChanged||(this.isChanged=!0),this.events.change.emit({value:t,isValid:this.validator(t)===null}),this.render())}toggleLabelError(t){return z(this,null,function*(){if(t){this.inputContainer.classList.add(ce.errorInput),this.endContent.classList.remove(ce.hidden),this.labelError.classList.remove(ce.hidden),yield ue(this.labelError,me.open,me.transition);return}this.inputContainer.classList.remove(ce.errorInput),this.endContent.classList.add(ce.hidden),yield ue(this.labelError,me.close,me.transition),this.labelError.classList.add(ce.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.input.setAttribute("disabled","true"),this.input.classList.add(ce.disabledInput),this.inputContainer.classList.add(ce.disabled)):(this.input.removeAttribute("disabled"),this.input.classList.remove(ce.disabledInput),this.inputContainer.classList.remove(ce.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return this.input.value}validate(t){const e=this.validator(t);return this.isRequired=!!e,this.render(),!e}render(){const n=(this.isTouchSubmit||this.isChanged)&&this.isRequired&&!this.isDisabled;return this.toggleLabelError(n),this.isDisabled?(this.inputContainer.classList.add(ce.disabled),this.input.classList.add(ce.disabledInput)):(this.inputContainer.classList.remove(ce.disabled),this.input.classList.remove(ce.disabledInput)),this.element}}const oe={wrapper:"_wrapper_j8wuo_1",inputContainer:"_inputContainer_j8wuo_5",input:"_input_j8wuo_5",endContent:"_endContent_j8wuo_20",errorInput:"_errorInput_j8wuo_24",error:"_error_j8wuo_24",label:"_label_j8wuo_32",labelError:"_labelError_j8wuo_36",disabled:"_disabled_j8wuo_40",disabledInput:"_disabledInput_j8wuo_44",hidden:"_hidden_j8wuo_51"};class Vl{constructor(){b(this,"template",`
|
|
54
54
|
<svg
|
|
55
55
|
width='28'
|
|
56
56
|
height='19'
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
</defs>
|
|
79
79
|
</svg>
|
|
80
80
|
<span class="${Z.srOnly}">Unknown card</span>
|
|
81
|
-
`);
|
|
81
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Fl{constructor(){b(this,"template",`
|
|
82
82
|
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${Z.svg}'>
|
|
83
83
|
<g fill='none' fill-rule='evenodd'>
|
|
84
84
|
<rect fill='#016fd0' height='16' rx='2' width='24' />
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
</g>
|
|
106
106
|
</svg>
|
|
107
107
|
<span class="${Z.srOnly}">Amex</span>
|
|
108
|
-
`);
|
|
108
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Ul{constructor(){b(this,"template",`
|
|
109
109
|
<svg
|
|
110
110
|
xmlns='http://www.w3.org/2000/svg'
|
|
111
111
|
xmlns-xlink='http://www.w3.org/1999/xlink'
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
</g>
|
|
146
146
|
</svg>
|
|
147
147
|
<span class="${Z.srOnly}">Diners Club</span>
|
|
148
|
-
`);
|
|
148
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Bl{constructor(){b(this,"template",`
|
|
149
149
|
<svg
|
|
150
150
|
xmlns='http://www.w3.org/2000/svg'
|
|
151
151
|
xmlns-xlink='http://www.w3.org/1999/xlink'
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
</g>
|
|
191
191
|
</svg>
|
|
192
192
|
<span class="${Z.srOnly}">Discover</span>
|
|
193
|
-
`);
|
|
193
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class jl{constructor(){b(this,"template",`
|
|
194
194
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${Z.svg}'>
|
|
195
195
|
<g fill='none'>
|
|
196
196
|
<path
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
</g>
|
|
221
221
|
</svg>
|
|
222
222
|
<span class="${Z.srOnly}">JCB</span>
|
|
223
|
-
`);
|
|
223
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class zl{constructor(){b(this,"template",`
|
|
224
224
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
225
225
|
<g fill='none' fill-rule='evenodd'>
|
|
226
226
|
<rect fill='#252525' height='16' rx='2' width='24' />
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
</g>
|
|
234
234
|
</svg>
|
|
235
235
|
<span class="${Z.srOnly}">MasterCard</span>
|
|
236
|
-
`);
|
|
236
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Kl{constructor(){b(this,"template",`
|
|
237
237
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
238
238
|
<g fill='none'>
|
|
239
239
|
<path
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
</g>
|
|
256
256
|
</svg>
|
|
257
257
|
<span class="${Z.srOnly}">Union Pay</span>
|
|
258
|
-
`);
|
|
258
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class ql{constructor(){b(this,"template",`
|
|
259
259
|
<svg
|
|
260
260
|
xmlns='http://www.w3.org/2000/svg'
|
|
261
261
|
xmlns-xlink='http://www.w3.org/1999/xlink'
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
</g>
|
|
295
295
|
</svg>
|
|
296
296
|
<span class="${Z.srOnly}">Visa</span>
|
|
297
|
-
`);
|
|
297
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Hl{constructor(t,e){b(this,"id","paynext-card-input-number");b(this,"initialCardTypes",bt.map(t=>t.type));b(this,"element");b(this,"inputContainer",document.createElement("div"));b(this,"input",document.createElement("input"));b(this,"label",document.createElement("label"));b(this,"labelText",document.createElement("span"));b(this,"labelError",document.createElement("span"));b(this,"endContent",document.createElement("div"));b(this,"error",document.createElement("p"));b(this,"unknownCard",new Vl);b(this,"amex",new Fl);b(this,"dinerClub",new Ul);b(this,"discover",new Bl);b(this,"jcb",new jl);b(this,"masterCard",new zl);b(this,"unionPay",new Kl);b(this,"visa",new ql);b(this,"placeholderStyle",document.createElement("style"));b(this,"supportedCardTypes",this.initialCardTypes);b(this,"isTouchSubmit",!1);b(this,"errorMessage","");b(this,"isRequired",!1);b(this,"isDisabled",!1);b(this,"isChanged",!1);b(this,"events",{change:new se});var a,i,s,o,c,l,d,u,h;this.translate=t;const n=t.messages();if(this.element=document.createElement("div"),this.element.classList.add(oe.wrapper),this.inputContainer.classList.add(oe.inputContainer),(a=e==null?void 0:e.container)!=null&&a.className&&this.inputContainer.classList.add(e.container.className),(i=e==null?void 0:e.container)!=null&&i.styles&&Object.assign(this.inputContainer.style,e.container.styles),this.input.setAttribute("id",this.id),this.input.setAttribute("auto-complete","cc-number"),this.input.setAttribute("placeholder","1234 1234 1234 1234"),this.input.classList.add(oe.input),(s=e==null?void 0:e.field)!=null&&s.className&&this.input.classList.add(e.field.className),(o=e==null?void 0:e.field)!=null&&o.styles&&Object.assign(this.input.style,e.field.styles),(c=e==null?void 0:e.placeholder)!=null&&c.styles&&Object.keys(e.placeholder.styles).length){const p=f=>f.replace(/[A-Z]/g,v=>"-"+v.toLowerCase()),m=Object.entries(e.placeholder.styles).map(([f,v])=>`${p(f)}:${v};`).join("");this.placeholderStyle.textContent=`#${this.id}::placeholder{${m}}`,this.element.appendChild(this.placeholderStyle)}this.endContent.classList.add(oe.endContent),this.endContent.append(...this.getCardIcons()),this.inputContainer.append(this.input,this.endContent),this.label.setAttribute("for",this.id),this.label.classList.add(oe.label),(l=e==null?void 0:e.label)!=null&&l.className&&this.label.classList.add(e.label.className),(d=e==null?void 0:e.label)!=null&&d.styles&&Object.assign(this.label.style,e.label.styles),this.labelText.textContent=n.card.number.label,this.labelError.textContent=n.card.number.error.required,this.labelError.classList.add(oe.labelError,oe.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&this.labelError.classList.add(e.error.className),(h=e==null?void 0:e.error)!=null&&h.styles&&Object.assign(this.labelError.style,e.error.styles),this.label.append(this.labelText,this.labelError),this.error.classList.add(oe.error,oe.hidden),this.element.append(this.label,this.inputContainer,this.error),this.input.addEventListener("input",p=>{p.stopPropagation(),this.handleChange(this.input.value)}),this.input.addEventListener("paste",p=>{var m;p.preventDefault(),this.handleChange(((m=p.clipboardData)==null?void 0:m.getData("text"))||"")}),this.input.addEventListener("blur",()=>this.validate(this.input.value)),this.translate.subscribe(({messages:p})=>{this.labelText.textContent=p.card.number.label,this.labelError.textContent=p.card.number.error.required,this.render()})}handleChange(t){if(this.isDisabled)return;this.isRequired=!1,this.errorMessage="",this.isChanged||(this.isChanged=!0);const e=pi(t).map(i=>i.type),n=ui(t),a=Jo(t,(n==null?void 0:n.type)||"");a.replace(/\D/g,"").length===((n==null?void 0:n.maxLength)||16)&&this.validate(a),this.supportedCardTypes=e.length?e:this.initialCardTypes,this.input.value=a,this.events.change.emit({card:a,cardType:n==null?void 0:n.type,cardTypes:e,isValid:hi(t,this.supportedCardTypes).isValid}),this.render()}toggleLabelError(t){return z(this,null,function*(){if(t){this.inputContainer.classList.add(oe.errorInput),this.labelError.classList.remove(oe.hidden),yield ue(this.labelError,me.open,me.transition);return}yield ue(this.labelError,me.close,me.transition),this.labelError.classList.add(oe.hidden)})}toggleErrorMessage(t){return z(this,null,function*(){if(t){this.inputContainer.classList.add(oe.errorInput),this.error.textContent=this.errorMessage,this.error.classList.remove(oe.hidden),yield ue(this.error,_e.open,_e.transition);return}yield ue(this.error,_e.close,_e.transition),this.error.classList.add(oe.hidden)})}getCardIcons(){return bt.filter(({type:t})=>this.supportedCardTypes.includes(t)).slice(0,3).map(({type:t})=>{switch(t){case ve.Visa:return this.visa.render();case ve.Maestro:case ve.Mastercard:return this.masterCard.render();case ve.DinersClub:return this.dinerClub.render();case ve.JCB:return this.jcb.render();case ve.AmericanExpress:return this.amex.render();case ve.Discover:return this.discover.render();case ve.UnionPay:return this.unionPay.render()}})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.input.setAttribute("disabled","true"),this.input.classList.add(oe.disabledInput),this.inputContainer.classList.add(oe.disabled)):(this.input.removeAttribute("disabled"),this.input.classList.remove(oe.disabledInput),this.inputContainer.classList.remove(oe.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){var t;return{value:this.input.value,cardType:((t=pi(this.input.value)[0])==null?void 0:t.type)||""}}validate(t){const e=this.translate.messages(),{isValid:n,error:a}=hi(t,this.supportedCardTypes);return n?(this.isRequired=!1,this.errorMessage="",this.render(),n):(a===pe.Empty?(this.errorMessage="",this.isRequired=!0):a===pe.Unsupported?(this.errorMessage=e.card.number.error.unsupported,this.isRequired=!1):(this.errorMessage=a===pe.Incomplete?e.card.number.error.incomplete:e.card.number.error.invalid,this.isRequired=!1),this.render(),n)}render(){const t=this.isTouchSubmit||this.isChanged,e=t&&!this.isDisabled&&this.isRequired,n=t&&!this.isDisabled&&!!this.errorMessage;return this.toggleLabelError(e),this.toggleErrorMessage(n),!e&&!n?(this.inputContainer.classList.remove(oe.errorInput),this.endContent.innerHTML="",this.endContent.append(...this.getCardIcons())):(this.endContent.innerHTML="",this.endContent.appendChild(this.unknownCard.render())),this.isDisabled?(this.inputContainer.classList.add(oe.disabled),this.input.classList.add(oe.disabledInput)):(this.inputContainer.classList.remove(oe.disabled),this.input.classList.remove(oe.disabledInput)),this.element}}const Y={inputContainer:"_inputContainer_1xdj3_5",input:"_input_1xdj3_5",endContent:"_endContent_1xdj3_20",errorInput:"_errorInput_1xdj3_24",error:"_error_1xdj3_24",label:"_label_1xdj3_32",labelError:"_labelError_1xdj3_36",disabled:"_disabled_1xdj3_40",disabledInput:"_disabledInput_1xdj3_44",hidden:"_hidden_1xdj3_51",securityContent:"_securityContent_1xdj3_55"};class Wl{constructor(){b(this,"template",`
|
|
298
298
|
<svg class='${Z.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
|
|
299
299
|
<title>CVC</title>
|
|
300
300
|
<g fill='none' fill-rule='evenodd'>
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
</g>
|
|
314
314
|
</svg>
|
|
315
315
|
<span class="${Z.srOnly}">Card CVC</span>
|
|
316
|
-
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Gl{constructor(t,e){y(this,"cvcId","paynext-card-input-cvc");y(this,"expiryId","paynext-card-input-expiry");y(this,"element");y(this,"expiryWarning",new Ct);y(this,"cvcWarning",new Ct);y(this,"cardCvc",new Wl);y(this,"expiryInputContainer",document.createElement("div"));y(this,"expiryInput",document.createElement("input"));y(this,"expiryLabel",document.createElement("label"));y(this,"expiryLabelText",document.createElement("span"));y(this,"expiryLabelError",document.createElement("span"));y(this,"expiryEndContent",document.createElement("div"));y(this,"expiryError",document.createElement("p"));y(this,"cvcInputContainer",document.createElement("div"));y(this,"cvcInput",document.createElement("input"));y(this,"cvcLabel",document.createElement("label"));y(this,"cvcLabelText",document.createElement("span"));y(this,"cvcLabelError",document.createElement("span"));y(this,"cvcEndContent",document.createElement("div"));y(this,"cvcError",document.createElement("p"));y(this,"placeholderStyle",document.createElement("style"));y(this,"cardType",null);y(this,"isTouchSubmit",!1);y(this,"isDisabled",!1);y(this,"expiryPrevValue","");y(this,"expiryErrorMessage","");y(this,"isExpiryRequired",!1);y(this,"isExpiryChanged",!1);y(this,"cvcErrorMessage","");y(this,"isCvcRequired",!1);y(this,"isCvcChanged",!1);y(this,"events",{expiryChange:new se,cvcChange:new se});var s,o,l,c,d,u,h,p,m,f,v,b,A,T,L,C,I;this.translate=t;const n=t.messages();this.element=document.createElement("div"),this.element.classList.add(Y.securityContent),this.expiryInputContainer.classList.add(Y.inputContainer),(s=e==null?void 0:e.container)!=null&&s.className&&this.expiryInputContainer.classList.add(e.container.className),(o=e==null?void 0:e.container)!=null&&o.styles&&Object.assign(this.expiryInputContainer.style,e.container.styles),this.expiryInput.setAttribute("id",this.expiryId),this.expiryInput.setAttribute("auto-complete","cc-expiry"),this.expiryInput.setAttribute("placeholder",n.card.expiry.placeholder),this.expiryInput.classList.add(Y.input),(l=e==null?void 0:e.field)!=null&&l.className&&this.expiryInput.classList.add(e.field.className),(c=e==null?void 0:e.field)!=null&&c.styles&&Object.assign(this.expiryInput.style,e.field.styles),this.expiryEndContent.classList.add(Y.endContent),this.expiryEndContent.appendChild(this.expiryWarning.render()),this.expiryInputContainer.append(this.expiryInput,this.expiryEndContent),this.expiryLabel.setAttribute("for",this.expiryId),this.expiryLabel.classList.add(Y.label),(d=e==null?void 0:e.label)!=null&&d.className&&this.expiryLabel.classList.add(e.label.className),(u=e==null?void 0:e.label)!=null&&u.styles&&Object.assign(this.expiryLabel.style,e.label.styles),this.expiryLabelText.textContent=n.card.expiry.label,this.expiryLabelError.textContent=n.card.expiry.error.required,this.expiryLabelError.classList.add(Y.labelError,Y.hidden),this.expiryLabel.append(this.expiryLabelText,this.expiryLabelError),this.expiryError.classList.add(Y.error,Y.hidden),(h=e==null?void 0:e.error)!=null&&h.className&&this.expiryError.classList.add(e.error.className),(p=e==null?void 0:e.error)!=null&&p.styles&&Object.assign(this.expiryError.style,e.error.styles);const i=document.createElement("div");if(i.appendChild(this.expiryError),this.cvcInputContainer.classList.add(Y.inputContainer),(m=e==null?void 0:e.container)!=null&&m.className&&this.cvcInputContainer.classList.add(e.container.className),(f=e==null?void 0:e.container)!=null&&f.styles&&Object.assign(this.cvcInputContainer.style,e.container.styles),this.cvcInput.setAttribute("id",this.cvcId),this.cvcInput.setAttribute("auto-complete","cc-cvc"),this.cvcInput.setAttribute("placeholder",n.card.cvc.placeholder),this.cvcInput.classList.add(Y.input),(v=e==null?void 0:e.field)!=null&&v.className&&this.cvcInput.classList.add(e.field.className),(b=e==null?void 0:e.field)!=null&&b.styles&&Object.assign(this.cvcInput.style,e.field.styles),(A=e==null?void 0:e.placeholder)!=null&&A.styles&&Object.keys(e.placeholder.styles).length){const x=U=>U.replace(/[A-Z]/g,H=>"-"+H.toLowerCase()),P=Object.entries(e.placeholder.styles).map(([U,H])=>`${x(U)}:${H};`).join("");this.placeholderStyle.textContent=`#${this.expiryId}::placeholder{${P}}#${this.cvcId}::placeholder{${P}}`,this.element.appendChild(this.placeholderStyle)}this.cvcEndContent.classList.add(Y.endContent),this.cvcEndContent.appendChild(this.cardCvc.render()),this.cvcInputContainer.append(this.cvcInput,this.cvcEndContent),this.cvcLabel.setAttribute("for",this.cvcId),this.cvcLabel.classList.add(Y.label),(T=e==null?void 0:e.label)!=null&&T.className&&this.cvcLabel.classList.add(e.label.className),(L=e==null?void 0:e.label)!=null&&L.styles&&Object.assign(this.cvcLabel.style,e.label.styles),this.cvcLabelText.textContent=n.card.cvc.label,this.cvcLabelError.textContent=n.card.cvc.error.required,this.cvcLabelError.classList.add(Y.labelError,Y.hidden),(C=e==null?void 0:e.error)!=null&&C.className&&this.cvcLabel.classList.add(e.error.className),(I=e==null?void 0:e.error)!=null&&I.styles&&Object.assign(this.cvcLabelError.style,e.error.styles),this.cvcLabel.append(this.cvcLabelText,this.cvcLabelError),this.cvcError.classList.add(Y.error,Y.hidden);const a=document.createElement("div");a.appendChild(this.cvcError),this.element.append(this.expiryLabel,this.cvcLabel,this.expiryInputContainer,this.cvcInputContainer,i,a),this.expiryInput.addEventListener("input",x=>{x.preventDefault(),this.handleExpiryChange(this.expiryInput.value)}),this.expiryInput.addEventListener("paste",x=>{var P;x.preventDefault(),this.handleExpiryChange(((P=x.clipboardData)==null?void 0:P.getData("text"))||"")}),this.expiryInput.addEventListener("blur",()=>this.validateExpiry(this.expiryInput.value)),this.cvcInput.addEventListener("input",x=>{x.preventDefault(),this.handleCvcChange(this.cvcInput.value)}),this.cvcInput.addEventListener("paste",x=>{var P;x.preventDefault(),this.handleCvcChange(((P=x.clipboardData)==null?void 0:P.getData("text"))||"")}),this.cvcInput.addEventListener("blur",()=>this.validateCvc(this.cvcInput.value)),this.translate.subscribe(({messages:x})=>{this.cvcInput.setAttribute("placeholder",x.card.cvc.placeholder),this.expiryInput.setAttribute("placeholder",x.card.expiry.placeholder),this.expiryLabelText.textContent=x.card.expiry.label,this.cvcLabelText.textContent=x.card.cvc.label,this.expiryLabelError.textContent=x.card.expiry.error.required,this.cvcLabelError.textContent=x.card.cvc.error.required,this.render()})}cvcValidator(t){const e=qe.getTypeInfo(this.cardType||""),n=!t,i=t.length<((e==null?void 0:e.code.size)||3);return!n&&!i?null:n?pe.Empty:pe.Incomplete}validateCvc(t){const e=this.translate.messages(),n=this.cvcValidator(t);if(n){if(n===pe.Empty)this.cvcErrorMessage="",this.isCvcRequired=!0;else{const i=n===pe.Incomplete?e.card.cvc.error.incomplete:e.card.cvc.error.invalid;this.cvcErrorMessage=i,this.isCvcRequired=!1}return this.render(),!n}return this.isCvcRequired=!1,this.cvcErrorMessage="",this.render(),!n}handleCvcChange(t){if(this.isDisabled)return;this.isCvcRequired=!1,this.cvcErrorMessage="",this.isCvcChanged||(this.isCvcChanged=!0);const e=el(t,this.cardType||""),n=qe.getTypeInfo(this.cardType||"");e.length===(n==null?void 0:n.code.size)&&this.validateCvc(e),this.events.cvcChange.emit({value:e,isValid:this.cvcValidator(e)===null}),this.cvcInput.value=e,this.render()}toggleCvcLabelError(t){return z(this,null,function*(){if(t){this.cvcInputContainer.classList.add(Y.errorInput),this.cvcLabelError.classList.remove(Y.hidden),yield ue(this.cvcLabelError,fe.open,fe.transition);return}yield ue(this.cvcLabelError,fe.close,fe.transition)})}toggleCvcErrorMessage(t){return z(this,null,function*(){if(t){this.cvcInputContainer.classList.add(Y.errorInput),this.cvcError.textContent=this.cvcErrorMessage,this.cvcError.classList.remove(Y.hidden),yield ue(this.cvcError,_e.open,_e.transition);return}yield ue(this.cvcError,_e.close,_e.transition)})}expiryValidator(t){const e=!t,n=t.length<7,i=new Date,[a,s]=t.split(" / ");i.setFullYear(2e3+parseInt(s),parseInt(a)-1,31);const o=i.getTime()<Date.now();return!e&&!n&&!o?null:e?pe.Empty:n?pe.Incomplete:i.getFullYear()===new Date().getFullYear()?"dateExpired":"expired"}validateExpiry(t){const e=this.translate.messages(),n=this.expiryValidator(t);if(n){if(n===pe.Empty)this.expiryErrorMessage="",this.isExpiryRequired=!0;else{let i=e.card.expiry.error.invalid;n==="expired"?i=e.card.expiry.error.expired.replace("{date}","year"):n==="dateExpired"?i=e.card.expiry.error.expired.replace("{date}","date"):n===pe.Incomplete&&(i=e.card.expiry.error.incomplete),this.isExpiryRequired=!1,this.expiryErrorMessage=i}return this.render(),!n}return this.isExpiryRequired=!1,this.expiryErrorMessage="",this.render(),!n}handleExpiryChange(t){if(this.isDisabled)return;this.isExpiryRequired=!1,this.expiryErrorMessage="",this.isExpiryChanged||(this.isExpiryChanged=!0);const e=tl(t,this.expiryPrevValue);e.length===7&&this.validateExpiry(e),this.events.expiryChange.emit({value:e,isValid:this.expiryValidator(e)===null}),this.expiryPrevValue=e,this.expiryInput.value=e,this.render()}toggleExpiryLabelError(t){return z(this,null,function*(){if(t){this.expiryInputContainer.classList.add(Y.errorInput),this.expiryLabelError.classList.remove(Y.hidden),yield ue(this.expiryLabelError,fe.open,fe.transition);return}yield ue(this.expiryLabelError,fe.close,fe.transition),this.expiryLabelError.classList.add(Y.hidden)})}toggleExpiryErrorMessage(t){return z(this,null,function*(){if(t){this.expiryInputContainer.classList.add(Y.errorInput),this.expiryError.textContent=this.expiryErrorMessage,this.expiryError.classList.remove(Y.hidden),yield ue(this.expiryError,_e.open,_e.transition);return}yield ue(this.expiryError,_e.close,_e.transition),this.expiryError.classList.add(Y.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.expiryInput.setAttribute("disabled","true"),this.expiryInput.classList.add(Y.disabledInput),this.expiryInputContainer.classList.add(Y.disabled),this.cvcInput.setAttribute("disabled","true"),this.cvcInput.classList.add(Y.disabledInput),this.cvcInputContainer.classList.add(Y.disabled)):(this.expiryInput.removeAttribute("disabled"),this.expiryInput.classList.remove(Y.disabledInput),this.expiryInputContainer.classList.remove(Y.disabled),this.cvcInput.removeAttribute("disabled"),this.cvcInput.classList.remove(Y.disabledInput),this.cvcInputContainer.classList.remove(Y.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return{expiry:this.expiryInput.value,cvc:this.cvcInput.value}}validate({expiry:t,cvc:e}){const n=this.validateExpiry(t),i=this.validateCvc(e);return n&&i}updateCardType(t){this.cardType=t,this.handleCvcChange(this.cvcInput.value)}render(){const t=this.isTouchSubmit||this.isExpiryChanged,e=t&&!this.isDisabled&&this.isExpiryRequired,n=t&&!this.isDisabled&&!!this.expiryErrorMessage;this.toggleExpiryLabelError(e),this.toggleExpiryErrorMessage(n),!e&&!n?(this.expiryInputContainer.classList.remove(Y.errorInput),this.expiryEndContent.classList.add(Y.hidden)):this.expiryEndContent.classList.remove(Y.hidden);const i=this.isTouchSubmit||this.isCvcChanged,a=i&&!this.isDisabled&&this.isCvcRequired,s=i&&!this.isDisabled&&!!this.cvcErrorMessage;return this.toggleCvcLabelError(a),this.toggleCvcErrorMessage(s),!a&&!s?(this.cvcInputContainer.classList.remove(Y.errorInput),this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cardCvc.render())):(this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cvcWarning.render())),this.isDisabled?(this.expiryInputContainer.classList.add(Y.disabled),this.expiryInput.classList.add(Y.disabledInput),this.cvcInputContainer.classList.add(Y.disabled),this.cvcInput.classList.add(Y.disabledInput)):(this.expiryInputContainer.classList.remove(Y.disabled),this.expiryInput.classList.remove(Y.disabledInput),this.cvcInputContainer.classList.remove(Y.disabled),this.cvcInput.classList.remove(Y.disabledInput)),this.element}}const gi={container:"_container_94v1h_1",title:"_title_94v1h_10"};class bi{constructor(t){y(this,"element");y(this,"message",document.createElement("p"));y(this,"icon",new Ct);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(gi.container),this.message.classList.add(gi.title),this.message.textContent=t.messages().status.error,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:e})=>{this.message.textContent=e.status.success})}addClassName(t){this.element.classList.add(t)}removeClassName(t){this.element.classList.remove(t)}render(){return this.element}}class Yl{constructor({translate:t,className:e,stylesState:n}){y(this,"element");y(this,"error");y(this,"submit");y(this,"back");y(this,"number");y(this,"name");y(this,"cardSecurity");y(this,"events",{submit:new se,close:new se});const i=n.getState();this.element=document.createElement("form"),this.error=new bi(t),this.submit=new Sl(t,i.SubmitButton),this.back=new Ml,this.number=new Hl(t,i.Input),this.name=new Dl(t,i.Input),this.cardSecurity=new Gl(t,i.Input),this.error.addClassName(Et.hidden),this.element.classList.add(Et.cardForm,e||""),this.element.append(this.back.render(),this.number.render(),this.cardSecurity.render(),this.name.render(),this.error.render(),this.submit.render()),this.back.addEventListener(()=>this.events.close.emit()),this.number.addEventListener("change",({cardType:a})=>this.cardSecurity.updateCardType(a||null)),this.submit.addEventListener(a=>{a.preventDefault();const{cvc:s,expiry:o}=this.cardSecurity.value(),{value:l,cardType:c}=this.number.value();this.events.submit.emit({number:l,expiry:o,cvc:s,name:this.name.value(),cardBrand:c})})}addEventListener(t,e){return this.events[t].addListener(e)}setLoading(t){this.cardSecurity.disable(t),this.name.disable(t),this.number.disable(t),this.submit.disable(t)}touchSubmit(){this.cardSecurity.touchSubmit(),this.name.touchSubmit(),this.number.touchSubmit()}validate(){const t=this.number.validate(this.number.value().value),e=this.name.validate(this.name.value()),n=this.cardSecurity.validate(this.cardSecurity.value());return t&&e&&n}showError(){this.error.removeClassName(Et.hidden)}hideError(){this.error.addClassName(Et.hidden)}render(){return this.element}}class $l{constructor(){y(this,"template",`
|
|
316
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Gl{constructor(t,e){b(this,"cvcId","paynext-card-input-cvc");b(this,"expiryId","paynext-card-input-expiry");b(this,"element");b(this,"expiryWarning",new _t);b(this,"cvcWarning",new _t);b(this,"cardCvc",new Wl);b(this,"expiryInputContainer",document.createElement("div"));b(this,"expiryInput",document.createElement("input"));b(this,"expiryLabel",document.createElement("label"));b(this,"expiryLabelText",document.createElement("span"));b(this,"expiryLabelError",document.createElement("span"));b(this,"expiryEndContent",document.createElement("div"));b(this,"expiryError",document.createElement("p"));b(this,"cvcInputContainer",document.createElement("div"));b(this,"cvcInput",document.createElement("input"));b(this,"cvcLabel",document.createElement("label"));b(this,"cvcLabelText",document.createElement("span"));b(this,"cvcLabelError",document.createElement("span"));b(this,"cvcEndContent",document.createElement("div"));b(this,"cvcError",document.createElement("p"));b(this,"placeholderStyle",document.createElement("style"));b(this,"cardType",null);b(this,"isTouchSubmit",!1);b(this,"isDisabled",!1);b(this,"expiryPrevValue","");b(this,"expiryErrorMessage","");b(this,"isExpiryRequired",!1);b(this,"isExpiryChanged",!1);b(this,"cvcErrorMessage","");b(this,"isCvcRequired",!1);b(this,"isCvcChanged",!1);b(this,"events",{expiryChange:new se,cvcChange:new se});var s,o,c,l,d,u,h,p,m,f,v,y,A,I,L,C,T;this.translate=t;const n=t.messages();this.element=document.createElement("div"),this.element.classList.add(Y.securityContent),this.expiryInputContainer.classList.add(Y.inputContainer),(s=e==null?void 0:e.container)!=null&&s.className&&this.expiryInputContainer.classList.add(e.container.className),(o=e==null?void 0:e.container)!=null&&o.styles&&Object.assign(this.expiryInputContainer.style,e.container.styles),this.expiryInput.setAttribute("id",this.expiryId),this.expiryInput.setAttribute("auto-complete","cc-expiry"),this.expiryInput.setAttribute("placeholder",n.card.expiry.placeholder),this.expiryInput.classList.add(Y.input),(c=e==null?void 0:e.field)!=null&&c.className&&this.expiryInput.classList.add(e.field.className),(l=e==null?void 0:e.field)!=null&&l.styles&&Object.assign(this.expiryInput.style,e.field.styles),this.expiryEndContent.classList.add(Y.endContent),this.expiryEndContent.appendChild(this.expiryWarning.render()),this.expiryInputContainer.append(this.expiryInput,this.expiryEndContent),this.expiryLabel.setAttribute("for",this.expiryId),this.expiryLabel.classList.add(Y.label),(d=e==null?void 0:e.label)!=null&&d.className&&this.expiryLabel.classList.add(e.label.className),(u=e==null?void 0:e.label)!=null&&u.styles&&Object.assign(this.expiryLabel.style,e.label.styles),this.expiryLabelText.textContent=n.card.expiry.label,this.expiryLabelError.textContent=n.card.expiry.error.required,this.expiryLabelError.classList.add(Y.labelError,Y.hidden),this.expiryLabel.append(this.expiryLabelText,this.expiryLabelError),this.expiryError.classList.add(Y.error,Y.hidden),(h=e==null?void 0:e.error)!=null&&h.className&&this.expiryError.classList.add(e.error.className),(p=e==null?void 0:e.error)!=null&&p.styles&&Object.assign(this.expiryError.style,e.error.styles);const a=document.createElement("div");if(a.appendChild(this.expiryError),this.cvcInputContainer.classList.add(Y.inputContainer),(m=e==null?void 0:e.container)!=null&&m.className&&this.cvcInputContainer.classList.add(e.container.className),(f=e==null?void 0:e.container)!=null&&f.styles&&Object.assign(this.cvcInputContainer.style,e.container.styles),this.cvcInput.setAttribute("id",this.cvcId),this.cvcInput.setAttribute("auto-complete","cc-cvc"),this.cvcInput.setAttribute("placeholder",n.card.cvc.placeholder),this.cvcInput.classList.add(Y.input),(v=e==null?void 0:e.field)!=null&&v.className&&this.cvcInput.classList.add(e.field.className),(y=e==null?void 0:e.field)!=null&&y.styles&&Object.assign(this.cvcInput.style,e.field.styles),(A=e==null?void 0:e.placeholder)!=null&&A.styles&&Object.keys(e.placeholder.styles).length){const x=U=>U.replace(/[A-Z]/g,H=>"-"+H.toLowerCase()),k=Object.entries(e.placeholder.styles).map(([U,H])=>`${x(U)}:${H};`).join("");this.placeholderStyle.textContent=`#${this.expiryId}::placeholder{${k}}#${this.cvcId}::placeholder{${k}}`,this.element.appendChild(this.placeholderStyle)}this.cvcEndContent.classList.add(Y.endContent),this.cvcEndContent.appendChild(this.cardCvc.render()),this.cvcInputContainer.append(this.cvcInput,this.cvcEndContent),this.cvcLabel.setAttribute("for",this.cvcId),this.cvcLabel.classList.add(Y.label),(I=e==null?void 0:e.label)!=null&&I.className&&this.cvcLabel.classList.add(e.label.className),(L=e==null?void 0:e.label)!=null&&L.styles&&Object.assign(this.cvcLabel.style,e.label.styles),this.cvcLabelText.textContent=n.card.cvc.label,this.cvcLabelError.textContent=n.card.cvc.error.required,this.cvcLabelError.classList.add(Y.labelError,Y.hidden),(C=e==null?void 0:e.error)!=null&&C.className&&this.cvcLabel.classList.add(e.error.className),(T=e==null?void 0:e.error)!=null&&T.styles&&Object.assign(this.cvcLabelError.style,e.error.styles),this.cvcLabel.append(this.cvcLabelText,this.cvcLabelError),this.cvcError.classList.add(Y.error,Y.hidden);const i=document.createElement("div");i.appendChild(this.cvcError),this.element.append(this.expiryLabel,this.cvcLabel,this.expiryInputContainer,this.cvcInputContainer,a,i),this.expiryInput.addEventListener("input",x=>{x.preventDefault(),this.handleExpiryChange(this.expiryInput.value)}),this.expiryInput.addEventListener("paste",x=>{var k;x.preventDefault(),this.handleExpiryChange(((k=x.clipboardData)==null?void 0:k.getData("text"))||"")}),this.expiryInput.addEventListener("blur",()=>this.validateExpiry(this.expiryInput.value)),this.cvcInput.addEventListener("input",x=>{x.preventDefault(),this.handleCvcChange(this.cvcInput.value)}),this.cvcInput.addEventListener("paste",x=>{var k;x.preventDefault(),this.handleCvcChange(((k=x.clipboardData)==null?void 0:k.getData("text"))||"")}),this.cvcInput.addEventListener("blur",()=>this.validateCvc(this.cvcInput.value)),this.translate.subscribe(({messages:x})=>{this.cvcInput.setAttribute("placeholder",x.card.cvc.placeholder),this.expiryInput.setAttribute("placeholder",x.card.expiry.placeholder),this.expiryLabelText.textContent=x.card.expiry.label,this.cvcLabelText.textContent=x.card.cvc.label,this.expiryLabelError.textContent=x.card.expiry.error.required,this.cvcLabelError.textContent=x.card.cvc.error.required,this.render()})}cvcValidator(t){const e=qe.getTypeInfo(this.cardType||""),n=!t,a=t.length<((e==null?void 0:e.code.size)||3);return!n&&!a?null:n?pe.Empty:pe.Incomplete}validateCvc(t){const e=this.translate.messages(),n=this.cvcValidator(t);if(n){if(n===pe.Empty)this.cvcErrorMessage="",this.isCvcRequired=!0;else{const a=n===pe.Incomplete?e.card.cvc.error.incomplete:e.card.cvc.error.invalid;this.cvcErrorMessage=a,this.isCvcRequired=!1}return this.render(),!n}return this.isCvcRequired=!1,this.cvcErrorMessage="",this.render(),!n}handleCvcChange(t){if(this.isDisabled)return;this.isCvcRequired=!1,this.cvcErrorMessage="",this.isCvcChanged||(this.isCvcChanged=!0);const e=el(t,this.cardType||""),n=qe.getTypeInfo(this.cardType||"");e.length===(n==null?void 0:n.code.size)&&this.validateCvc(e),this.events.cvcChange.emit({value:e,isValid:this.cvcValidator(e)===null}),this.cvcInput.value=e,this.render()}toggleCvcLabelError(t){return z(this,null,function*(){if(t){this.cvcInputContainer.classList.add(Y.errorInput),this.cvcLabelError.classList.remove(Y.hidden),yield ue(this.cvcLabelError,me.open,me.transition);return}yield ue(this.cvcLabelError,me.close,me.transition)})}toggleCvcErrorMessage(t){return z(this,null,function*(){if(t){this.cvcInputContainer.classList.add(Y.errorInput),this.cvcError.textContent=this.cvcErrorMessage,this.cvcError.classList.remove(Y.hidden),yield ue(this.cvcError,_e.open,_e.transition);return}yield ue(this.cvcError,_e.close,_e.transition)})}expiryValidator(t){const e=!t,n=t.length<7,a=new Date,[i,s]=t.split(" / ");a.setFullYear(2e3+parseInt(s),parseInt(i)-1,31);const o=a.getTime()<Date.now();return!e&&!n&&!o?null:e?pe.Empty:n?pe.Incomplete:a.getFullYear()===new Date().getFullYear()?"dateExpired":"expired"}validateExpiry(t){const e=this.translate.messages(),n=this.expiryValidator(t);if(n){if(n===pe.Empty)this.expiryErrorMessage="",this.isExpiryRequired=!0;else{let a=e.card.expiry.error.invalid;n==="expired"?a=e.card.expiry.error.expired.replace("{date}","year"):n==="dateExpired"?a=e.card.expiry.error.expired.replace("{date}","date"):n===pe.Incomplete&&(a=e.card.expiry.error.incomplete),this.isExpiryRequired=!1,this.expiryErrorMessage=a}return this.render(),!n}return this.isExpiryRequired=!1,this.expiryErrorMessage="",this.render(),!n}handleExpiryChange(t){if(this.isDisabled)return;this.isExpiryRequired=!1,this.expiryErrorMessage="",this.isExpiryChanged||(this.isExpiryChanged=!0);const e=tl(t,this.expiryPrevValue);e.length===7&&this.validateExpiry(e),this.events.expiryChange.emit({value:e,isValid:this.expiryValidator(e)===null}),this.expiryPrevValue=e,this.expiryInput.value=e,this.render()}toggleExpiryLabelError(t){return z(this,null,function*(){if(t){this.expiryInputContainer.classList.add(Y.errorInput),this.expiryLabelError.classList.remove(Y.hidden),yield ue(this.expiryLabelError,me.open,me.transition);return}yield ue(this.expiryLabelError,me.close,me.transition),this.expiryLabelError.classList.add(Y.hidden)})}toggleExpiryErrorMessage(t){return z(this,null,function*(){if(t){this.expiryInputContainer.classList.add(Y.errorInput),this.expiryError.textContent=this.expiryErrorMessage,this.expiryError.classList.remove(Y.hidden),yield ue(this.expiryError,_e.open,_e.transition);return}yield ue(this.expiryError,_e.close,_e.transition),this.expiryError.classList.add(Y.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.expiryInput.setAttribute("disabled","true"),this.expiryInput.classList.add(Y.disabledInput),this.expiryInputContainer.classList.add(Y.disabled),this.cvcInput.setAttribute("disabled","true"),this.cvcInput.classList.add(Y.disabledInput),this.cvcInputContainer.classList.add(Y.disabled)):(this.expiryInput.removeAttribute("disabled"),this.expiryInput.classList.remove(Y.disabledInput),this.expiryInputContainer.classList.remove(Y.disabled),this.cvcInput.removeAttribute("disabled"),this.cvcInput.classList.remove(Y.disabledInput),this.cvcInputContainer.classList.remove(Y.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return{expiry:this.expiryInput.value,cvc:this.cvcInput.value}}validate({expiry:t,cvc:e}){const n=this.validateExpiry(t),a=this.validateCvc(e);return n&&a}updateCardType(t){this.cardType=t,this.handleCvcChange(this.cvcInput.value)}render(){const t=this.isTouchSubmit||this.isExpiryChanged,e=t&&!this.isDisabled&&this.isExpiryRequired,n=t&&!this.isDisabled&&!!this.expiryErrorMessage;this.toggleExpiryLabelError(e),this.toggleExpiryErrorMessage(n),!e&&!n?(this.expiryInputContainer.classList.remove(Y.errorInput),this.expiryEndContent.classList.add(Y.hidden)):this.expiryEndContent.classList.remove(Y.hidden);const a=this.isTouchSubmit||this.isCvcChanged,i=a&&!this.isDisabled&&this.isCvcRequired,s=a&&!this.isDisabled&&!!this.cvcErrorMessage;return this.toggleCvcLabelError(i),this.toggleCvcErrorMessage(s),!i&&!s?(this.cvcInputContainer.classList.remove(Y.errorInput),this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cardCvc.render())):(this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cvcWarning.render())),this.isDisabled?(this.expiryInputContainer.classList.add(Y.disabled),this.expiryInput.classList.add(Y.disabledInput),this.cvcInputContainer.classList.add(Y.disabled),this.cvcInput.classList.add(Y.disabledInput)):(this.expiryInputContainer.classList.remove(Y.disabled),this.expiryInput.classList.remove(Y.disabledInput),this.cvcInputContainer.classList.remove(Y.disabled),this.cvcInput.classList.remove(Y.disabledInput)),this.element}}class Yl{constructor({translate:t,className:e,stylesState:n}){b(this,"element");b(this,"error");b(this,"submit");b(this,"back");b(this,"number");b(this,"name");b(this,"cardSecurity");b(this,"events",{submit:new se,close:new se});const a=n.getState();this.element=document.createElement("form"),this.error=new pt(t),this.submit=new Sl(t,a.SubmitButton),this.back=new Ml,this.number=new Hl(t,a.Input),this.name=new Dl(t,a.Input),this.cardSecurity=new Gl(t,a.Input),this.error.addClassName(wt.hidden),this.element.classList.add(wt.cardForm,e||""),this.element.append(this.back.render(),this.number.render(),this.cardSecurity.render(),this.name.render(),this.error.render(),this.submit.render()),this.back.addEventListener(()=>this.events.close.emit()),this.number.addEventListener("change",({cardType:i})=>this.cardSecurity.updateCardType(i||null)),this.submit.addEventListener(i=>{i.preventDefault();const{cvc:s,expiry:o}=this.cardSecurity.value(),{value:c,cardType:l}=this.number.value();this.events.submit.emit({number:c,expiry:o,cvc:s,name:this.name.value(),cardBrand:l})})}addEventListener(t,e){return this.events[t].addListener(e)}setLoading(t){this.cardSecurity.disable(t),this.name.disable(t),this.number.disable(t),this.submit.disable(t)}touchSubmit(){this.cardSecurity.touchSubmit(),this.name.touchSubmit(),this.number.touchSubmit()}validate(){const t=this.number.validate(this.number.value().value),e=this.name.validate(this.name.value()),n=this.cardSecurity.validate(this.cardSecurity.value());return t&&e&&n}showError(){this.error.removeClassName(wt.hidden)}hideError(){this.error.addClassName(wt.hidden)}render(){return this.element}}class $l{constructor(){b(this,"template",`
|
|
317
317
|
<svg
|
|
318
318
|
fill='none'
|
|
319
319
|
height='24'
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
'></path>
|
|
331
331
|
</svg>
|
|
332
332
|
<span class="${Z.srOnly}">Success</span>
|
|
333
|
-
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.successContainer),this.element.innerHTML=this.template}render(){return this.element}}const yi={container:"_container_hoha1_1",title:"_title_hoha1_5"};class Ql{constructor(t){y(this,"element");y(this,"message",document.createElement("p"));y(this,"icon",new $l);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(yi.container),this.message.classList.add(yi.title),this.message.textContent=t.messages().status.success,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:e})=>{this.message.textContent=e.status.success})}addClassName(t){this.element.classList.add(t)}removeClassName(t){this.element.classList.remove(t)}render(){return this.element}}class Zl{constructor(t){y(this,"isLoading",!1);y(this,"isFormOpen",!1);y(this,"checkout");y(this,"container",document.createElement("div"));y(this,"loader",new Wo);y(this,"error");y(this,"success");y(this,"buttons");y(this,"form");this.config=t,this.buttons=new kl(t),this.form=new Yl({translate:t.state.translate,className:he.hidden,stylesState:t.state.styles}),this.error=new bi(t.state.translate),this.success=new Ql(t.state.translate),this.error.addClassName(he.hidden),this.success.addClassName(he.hidden),this.container.append(this.loader.render(),this.buttons.render(),this.form.render()),this.checkout=document.createElement("div"),this.checkout.classList.add(he.checkout),this.checkout.append(this.container,this.error.render(),this.success.render())}init(){return z(this,null,function*(){this.buttons.addEventListener("ready",()=>{this.loader.setClassName(he.hidden),this.buttons.showButton()}),this.buttons.addEventListener("open",()=>z(this,null,function*(){this.isLoading||(this.hideError(),yield ue(this.buttons.buttons,yt.close,yt.transition),this.buttons.buttons.classList.add(he.hidden),this.form.element.classList.add(he.formInitial),this.form.element.classList.remove(he.hidden),yield ue(this.form.element,He.open,He.transition),this.isFormOpen=!0)})),this.buttons.addEventListener("error",()=>{const{onCheckoutFail:t}=this.config.state.checkout.getState(),e=this.config.state.translate.messages();t==null||t(new Error(e.status.error))}),this.buttons.addEventListener("success",t=>{const{clientToken:e}=this.config.state.checkout.getState();switch(t.type){case"apple":return this.handleSuccess({clientSession:e,applePay:t});case"google":return this.handleSuccess({clientSession:e,googlePay:t});case"paypal":return this.handleSuccess({clientSession:e,paypal:{billing_agreement_token:t}});case"venmo":return console.log("----- venmo success data",t),this.handleSuccess({clientSession:e,braintree:{nonce:t}})}}),this.form.addEventListener("close",()=>z(this,null,function*(){this.isLoading||(this.hideError(),yield ue(this.form.element,He.close,He.transition),this.form.element.classList.add(he.hidden),this.buttons.buttons.classList.add(he.btnsInitial),this.buttons.buttons.classList.remove(he.hidden),yield ue(this.buttons.buttons,yt.open,yt.transition),this.isFormOpen=!1)})),this.form.addEventListener("submit",t=>z(this,null,function*(){if(this.isLoading||(this.form.touchSubmit(),!this.form.validate()))return;const n=t.number.replace(/\D/g,""),i=this.config.state.checkout.getState(),a=this.config.service.ev.getEv(),[s,o]=yield Promise.all([a.encrypt(n),a.encrypt(t.cvc)]),[l,c]=t.expiry.split("/");yield this.handleSuccess({clientSession:i.clientToken,card:{firstSixDigits:n.slice(0,6),lastFourDigits:n.slice(-4),expMonth:Number(l),expYear:Number(c),cardBrand:t.cardBrand||"",number:s,cvc:o,type:te.CARD,metadata:{name:t.name,userAgent:navigator==null?void 0:navigator.userAgent}}})})),yield this.buttons.init()})}handleError(t){var i;const e=this.config.state.checkout.getState(),n=this.config.state.translate.messages();console.error(t),this.showError(),(i=e.onCheckoutFail)==null||i.call(e,new Error(n.status.error)),this.setLoading(!1)}handleSuccess(t){return z(this,null,function*(){var i;if(this.isLoading)return;this.hideError(),this.setLoading(!0);const e=this.config.state.checkout.getState(),n=this.config.state.translate.messages();try{const a=yield yl(t,e.environment,e.apiVersion,e.useWorkflows);if(a.error)throw new Error(n.status.error);if(a.three_ds_session_id){yield this.config.service.ev.initThreeDs({threeDsId:a.three_ds_session_id,onSuccess:()=>{this.setLoading(!1),this.handleSuccess(X(j({},t),{threeDsSessionId:a.three_ds_session_id}))},onError:()=>{this.handleError("Three DS Error")}});return}this.showSuccess(),(i=e.onCheckoutComplete)==null||i.call(e,a),this.setLoading(!1)}catch(a){this.handleError(a)}})}showSuccess(){return z(this,null,function*(){this.container.classList.add(he.hidden),this.error.addClassName(he.hidden),this.success.removeClassName(he.hidden),yield ue(this.success.element,He.open,He.transition)})}hideError(){this.error.addClassName(he.hidden),this.form.hideError()}showError(){this.isFormOpen||this.error.removeClassName(he.hidden),this.form.showError()}setLoading(t){this.isLoading=t,this.form.setLoading(t),this.loader.setClassName(!t||this.isFormOpen?he.hidden:"")}render(){return this.checkout}}class Xl{constructor(t){y(this,"component");this.config=t,this.component=new Zl(t)}init(){return z(this,null,function*(){const{checkout:t,transaction:e,translate:n,styles:i}=this.config.state,{apiVersion:a}=t.getState();t.subscribe(({clientToken:s,environment:o,locale:l,translate:c,styles:d})=>{l&&n.locale()!==l&&n.setLocale(l),c&&n.overrides()!==c&&n.setMessages(c),d&&i.setState(d),e.updateTransaction(s,o,a).then(u=>{var h,p;if(u)return this.config.service.ev.initEv({teamId:(h=u.evervault)==null?void 0:h.team_id,appId:(p=u.evervault)==null?void 0:p.app_id})}).catch(console.error)})})}mount(){return z(this,null,function*(){return yield this.init(),yield this.component.init(),this.component.render()})}}class wt{constructor(t){y(this,"initialState");y(this,"state");y(this,"observer",new se);this.initialState=t,this.state=t}getState(){return this.state}setState(t){this.state=t,this.observer.emit(t)}clearState(){this.state=this.initialState,this.observer.clear()}subscribe(t){return this.observer.addListener(t)}}const Jl={clientToken:"",environment:"sandbox",apiVersion:"1.0.0",useWorkflows:!1};class ec extends wt{constructor(t){super(j(j({},Jl),t))}}const tc={};class rc extends wt{constructor(t){super(j(j({},tc),t))}}class nc extends wt{constructor(e){super(e||null);y(this,"clientToken","")}updateTransaction(e,n,i){return z(this,null,function*(){if(this.clientToken===e)return this.getState();this.clientToken=e;const a=yield El(e,n,i);return this.setState(a),a})}}const gr={ar:{card:{title:"طريقة الدفع",number:{label:"رقم البطاقة",error:{required:"يتطلب",invalid:"رقم البطاقة غير صالح",incomplete:"رقم البطاقة غير كامل",unsupported:"نوع البطاقة غير المدعوم"}},expiry:{label:"تاريخ الانتهاء",placeholder:"سنة / شهر",error:{required:"يتطلب",invalid:"تاريخ انتهاء صلاحية البطاقة غير صالح",incomplete:"تاريخ انتهاء الصلاحية الخاص ببطاقتك غير كامل",expired:"تاريخ انتهاء صلاحية بطاقتك في الماضي"}},cvc:{label:"رمز الأمان",placeholder:"CVC",error:{required:"يتطلب",incomplete:"رمز الأمان الخاص ببطاقتك غير كامل",invalid:"رمز التحقق من البطاقة (CVC) الخاص ببطاقتك غير صالح"}},name:{label:"اسم حامل البطاقة",placeholder:"الاسم الكامل على البطاقة",error:{required:"يتطلب",invalid:"يرجى إدخال اسمك الكامل"}},pay:{button:"الراتب"},compact:{button:"البطاقة"}},status:{success:"تمت عملية الدفع الخاصة بك بنجاح!",error:"لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."}},en:{card:{title:"Payment method",number:{label:"Card number",error:{required:"REQUIRED",invalid:"Your card number is invalid",incomplete:"Your card number is incomplete",unsupported:"Unsupported card type"}},expiry:{label:"Expiry date",placeholder:"MM / YY",error:{required:"REQUIRED",invalid:"Your card’s expiry date is invalid",incomplete:"Your card’s expiry date is incomplete",expired:"Your card’s expiry {date} is in the past"}},cvc:{label:"Security code",placeholder:"CVC",error:{required:"REQUIRED",incomplete:"Your card’s security code is incomplete",invalid:"Your card’s CVC is invalid"}},name:{label:"Cardholder name",placeholder:"Full name on card",error:{required:"REQUIRED",invalid:"Please provide your full name"}},pay:{button:"Pay"},compact:{button:"Card"}},status:{success:"Your payment was successful!",error:"We are unable to authenticate your payment method. Please choose a different payment method and try again."}},bg:{card:{title:"Метод на плащане",number:{label:"Информация за картата",error:{required:"ЗАДЪЛЖИТЕЛНО",invalid:"Номерът на Вашата карта е неправилен",incomplete:"Номерът на Вашата карта е непълен",unsupported:"Неподдържан тип карта"}},expiry:{label:"Дата на валидност",placeholder:"ММ / ГГ",error:{required:"ЗАДЪЛЖИТЕЛНО",incomplete:"Датата на валидност на вашата карта е непълна",invalid:"Датата на валидност на вашата карта е невалидна",expired:"Датата на валидност на вашата карта е в миналото"}},cvc:{label:"Код за сигурност",placeholder:"CVC",error:{required:"ЗАДЪЛЖИТЕЛНО",incomplete:"Кодът за сигурност на вашата карта е непълен",invalid:"Кодът за сигурност на вашата карта е невалиден"}},name:{label:"Име на картодържателя",placeholder:"Пълно име върху картата",error:{required:"ЗАДЪЛЖИТЕЛНО",invalid:"Моля, въведете трите си имена"}},pay:{button:"Платете"},compact:{button:"Карта"}},status:{success:"Успех",error:"Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."}},cs:{card:{title:"Způsob platby",number:{label:"Číslo karty",error:{required:"POVINNÝ ÚDAJ",invalid:"Číslo Vaší karty je neplatné",incomplete:"Číslo vaší karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Datum konce platnosti",placeholder:"MM / RR",error:{required:"POVINNÝ ÚDAJ",incomplete:"Datum konce platnosti vaší karty je neúplné",invalid:"Datum konce platnosti karty je neplatné",expired:"Platnost vaší karty vypršela"}},cvc:{label:"Bezpečnostní kód",placeholder:"CVC",error:{required:"POVINNÝ ÚDAJ",incomplete:"Bezpečnostní kód vaší karty je neúplný",invalid:"CVC vaší karty je neplatné"}},name:{label:"Jméno držitele karty",placeholder:"Celé jméno",error:{required:"POVINNÝ ÚDAJ",invalid:"Uvďte prosím celé své jméno"}},pay:{button:"Platit"},compact:{button:"Karta"}},status:{success:"Úspěch",error:"Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."}},da:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKRÆVET",invalid:"Kortnummeret er ugyldigt",incomplete:"Kortnummeret er ufuldstændigt",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Udløbsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKRÆVET",incomplete:"Kortets udløbsdato er ikke komplet",invalid:"Dit korts udløbsdato er ugyldig",expired:"Dit kort er udløbet"}},cvc:{label:"Sikkerhedskode",placeholder:"CVC",error:{required:"PÅKRÆVET",incomplete:"Dit korts sikkerhedskode er ikke komplet",invalid:"Dit korts CVC er ugyldigt"}},name:{label:"Kortholderens navn",placeholder:"Fulde navn",error:{required:"PÅKRÆVET",invalid:"Angiv dit fulde navn"}},pay:{button:"Betal"},compact:{button:"Kredit- eller betalingskort"}},status:{success:"Succes",error:"Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."}},de:{card:{title:"Zahlungsmethode",number:{label:"Kartennummer",error:{required:"Pflichtfeld",invalid:"Ihre Kartennummer ist ungültig",incomplete:"Ihre Kartennummer ist unvollständig",unsupported:"Nicht unterstützter Kartentyp"}},expiry:{label:"Ablaufdatum",placeholder:"MM / JJ",error:{required:"Pflichtfeld",incomplete:"Das Ablaufdatum Ihrer Karte ist unvollständig",invalid:"Das Ablaufdatum Ihrer Karte ist ungültig",expired:"Ihre Karte ist ungültig"}},cvc:{label:"Sicherheitscode",placeholder:"CVC",error:{required:"Pflichtfeld",incomplete:"Der Sicherheitscode Ihrer Karte ist unvollständig",invalid:"Die Prüfziffer/CVC Ihrer Karte ist ungültig"}},name:{label:"Name des/der Karteninhaber/in",placeholder:"Vollständiger Name",error:{required:"Pflichtfeld",invalid:"Bitte geben Sie Ihren vollständigen Namen ein"}},pay:{button:"Bezahlen"},compact:{button:"Kredit- oder Debitkarte"}},status:{success:"Erfolg",error:"Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."}},el:{card:{title:"Μέθοδος πληρωμής",number:{label:"Αριθμός κάρτας",error:{required:"Απαιτούμενο",invalid:"Ο αριθμός της κάρτας σας δεν είναι έγκυρος",incomplete:"Ο αριθμός της κάρτας σας είναι ελλιπής",unsupported:"Δεν υποστηρίζεται ο τύπος της κάρτας"}},expiry:{label:"Ημερομηνία λήξης",placeholder:"ΜΜ / ΕΕ",error:{required:"Απαιτούμενο",incomplete:"Η ημερομηνία λήξης της κάρτας σας είναι ελλιπής",invalid:"Η ημερομηνία λήξης της κάρτας σας δεν είναι έγκυρη",expired:"Η κάρτα σας έχει λήξει"}},cvc:{label:"Κωδικός ασφαλείας",placeholder:"CVC",error:{required:"Απαιτούμενο",incomplete:"Ο κωδικός ασφαλείας της κάρτας σας είναι ελλιπής",invalid:"Το CVC της κάρτας σας δεν είναι έγκυρο"}},name:{label:"Όνομα κατόχου κάρτας",placeholder:"Πλήρες όνομα στην κάρτα",error:{required:"Απαιτούμενο",invalid:"Συμπληρώστε το ονοματεπώνυμό σας"}},pay:{button:"Πληρωμή"},compact:{button:"Kάρτα"}},status:{success:"Επιτυχία",error:"Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."}},es:{card:{title:"Método de pago",number:{label:"Número de tarjeta",error:{required:"OBLIGATORIO",invalid:"El número de tu tarjeta no es válido",incomplete:"El número de tu tarjeta está incompleto",unsupported:"Tipo de tarjeta no soportado"}},expiry:{label:"Fecha de caducidad",placeholder:"MM / AA",error:{required:"OBLIGATORIO",incomplete:"La fecha de caducidad de la tarjeta está incompleta",invalid:"La fecha de caducidad de la tarjeta no es válida",expired:"La tarjeta ha caducado"}},cvc:{label:"Código de seguridad",placeholder:"CVC",error:{required:"OBLIGATORIO",incomplete:"El código de seguridad de la tarjeta está incompleto",invalid:"El CVC de tu tarjeta no es válido"}},name:{label:"Nombre del titular de la tarjeta",placeholder:"Nombre completo",error:{required:"OBLIGATORIO",invalid:"Proporciona tu nombre completo"}},pay:{button:"Pagar"},compact:{button:"Tarjeta"}},status:{success:"Éxito",error:"No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."}},et:{card:{title:"Makseviis",number:{label:"Kaardi number",error:{required:"NÕUTAV",invalid:"Teie kaardinumber ei sobi",incomplete:"Teie kaardinumber on puudulik",unsupported:"Toetamata kaardi tüüp"}},expiry:{label:"Aegumiskuupäev",placeholder:"KK / AA",error:{required:"NÕUTAV",incomplete:"Teie kaardi aegumiskuupäev on puudulik",invalid:"Teie kaardi aegumiskuupäev on kehtetu",expired:"Teie kaart on aegunud"}},cvc:{label:"Turvakood",placeholder:"CVC",error:{required:"NÕUTAV",incomplete:"Teie kaardi turvakood on puudulik",invalid:"Teie kaardi CVC on kehtetu"}},name:{label:"Kaardiomaniku nimi",placeholder:"Täisnimi",error:{required:"NÕUTAV",invalid:"Esitage oma täisnimi"}},pay:{button:"Maksa"},compact:{button:"Krediit- või deebetkaart"}},status:{success:"Edu",error:"Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."}},fi:{card:{title:"Maksutapa",number:{label:"Kortin numero",error:{required:"PAKOLLINEN",invalid:"Kortin numero ei kelpaa",incomplete:"Kortin numero on puutteellinen",unsupported:"Ei tuettu korttityyppi"}},expiry:{label:"Erääntymispäivä",placeholder:"KK / VV",error:{required:"PAKOLLINEN",incomplete:"Kortin voimassaoloaika on puutteellinen",invalid:"Kortin voimassaoloaika on virheellinen",expired:"Korttisi on vanhentunut"}},cvc:{label:"Turvakoodi",placeholder:"CVC-koodi",error:{required:"PAKOLLINEN",incomplete:"Kortin turvakoodi on puutteellinen",invalid:"Kortin CVC ei kelpaa"}},name:{label:"Kortinhaltijan nimi",placeholder:"Koko nimi",error:{required:"PAKOLLINEN",invalid:"Anna koko nimesi"}},pay:{button:"Maksa"},compact:{button:"Luotto- tai pankkikortti"}},status:{success:"Menestys",error:"Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."}},fil:{card:{title:"Paraan ng pagbabayad",number:{label:"Numero ng card",error:{required:"KAILANGAN",invalid:"Hindi valid ang numero ng kard mo",incomplete:"Ang numero ng iyong kard ay kulang",unsupported:"Hindi sinusuportahang uri ng card"}},expiry:{label:"Petsa ng pagkapaso",placeholder:"BB / TT",error:{required:"KAILANGAN",incomplete:"Ang petsa ng pagkapaso ng iyong kard ay kulang",invalid:"Hindi valid ang petsa ng pagkapaso ng iyong kard",expired:"Napaso na ang iyong kard"}},cvc:{label:"Security code",placeholder:"CVC",error:{required:"KAILANGAN",incomplete:"Ang security code ng iyong kard ay kulang",invalid:"Hindi valid ang CVC ng iyong kard"}},name:{label:"Pangalan ng may-ari ng kard",placeholder:"Buong pangalan",error:{required:"KAILANGAN",invalid:"Pakibigay ang iyong buong pangalan"}},pay:{button:"Magbayad"},compact:{button:"Luotto- tai pankkikortti"}},status:{success:"Tagumpay",error:"Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."}},fr:{card:{title:"Moyen de paiement",number:{label:"Numéro de la carte",error:{required:"OBLIGATOIRE",invalid:"Votre numéro de carte n'est pas valide",incomplete:"Votre numéro de carte est incomplet",unsupported:"Type de carte non supporté"}},expiry:{label:"Date d'expiration",placeholder:"MM / AA",error:{required:"OBLIGATOIRE",incomplete:"La date d'expiration de votre carte est incomplète",invalid:"La date d'expiration de votre carte n'est pas valide",expired:"Votre carte a expiré"}},cvc:{label:"Code de sécurité",placeholder:"CVC",error:{required:"OBLIGATOIRE",incomplete:"Le code de sécurité de votre carte est incomplet",invalid:"Le code CVC de votre carte n'est pas valide"}},name:{label:"Nom du titulaire de la carte",placeholder:"Nom complet",error:{required:"OBLIGATOIRE",invalid:"Veuillez indiquer votre nom complet"}},pay:{button:"Payer"},compact:{button:"Carte"}},status:{success:"Succès",error:"Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."}},hr:{card:{title:"Način plaćanja",number:{label:"Broj kartice",error:{required:"POTREBNO",invalid:"Broj vaše kartice nije valjan",incomplete:"Broj vaše kartice nije potpun",unsupported:"Nepodržana vrsta kartice"}},expiry:{label:"Datum isteka",placeholder:"MM / GG",error:{required:"POTREBNO",incomplete:"Datum isteka vaše kartice je nepotpun",invalid:"Datum isteka vaše kartice nije valjan",expired:"Kartica je istekla"}},cvc:{label:"Sigurnosni kod",placeholder:"CVC",error:{required:"POTREBNO",incomplete:"Sigurnosni kôd vaše kartice je nepotpun",invalid:"Kontrolni broj (CVC) vaše kartice nije valjan"}},name:{label:"Ime vlasnika kartice",placeholder:"Puno ime",error:{required:"POTREBNO",invalid:"Unesite svoje puno ime"}},pay:{button:"Plati"},compact:{button:"Kartica"}},status:{success:"Uspjeh",error:"Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."}},hu:{card:{title:"Fizetési mód",number:{label:"Kártya száma",error:{required:"KÖTELEZŐ",invalid:"A kártyaszáma érvénytelen",incomplete:"A kártyaszáma hiányos",unsupported:"Nem támogatott kártya típusa"}},expiry:{label:"Lejárat dátuma",placeholder:"HH / ÉÉ",error:{required:"KÖTELEZŐ",incomplete:"A kártyája lejárati dátuma hiányos",invalid:"A kártyája lejárati dátuma érvénytelen",expired:"A kártyája lejárt"}},cvc:{label:"Biztonsági kód",placeholder:"CVC",error:{required:"KÖTELEZŐ",incomplete:"A kártyája biztonsági kódja hiányos",invalid:"A kártya CVC-kódja érvénytelen"}},name:{label:"Kártyabirtokos neve",placeholder:"Teljes név",error:{required:"KÖTELEZŐ",invalid:"Adja meg a teljes nevét"}},pay:{button:"Fizetés"},compact:{button:"Hitel- vagy bankkártya"}},status:{success:"Siker",error:"Nem tudjuk hitelesíteni a fizetési módját. Kérjük, válasszon másik fizetési módot, és próbálja meg újra."}},id:{card:{title:"Metode pembayaran",number:{label:"Nomor kartu",error:{required:"WAJIB DIISI",invalid:"Nomor kartu Anda tidak valid",incomplete:"Nomor kartu Anda tidak lengkap",unsupported:"Tipe kartu tidak didukung"}},expiry:{label:"Tanggal kedaluwarsa",placeholder:"BB / TT",error:{required:"WAJIB DIISI",incomplete:"Tanggal kedaluwarsa kartu Anda tidak lengkap",invalid:"Tanggal kedaluwarsa kartu Anda tidak valid",expired:"Kartu Anda telah kedaluwarsa"}},cvc:{label:"Kode keamanan",placeholder:"CVC",error:{required:"WAJIB DIISI",incomplete:"Kode keamanan kartu Anda tidak lengkap",invalid:"CVC kartu Anda tidak valid"}},name:{label:"Nama pemegang kartu",placeholder:"Nama lengkap",error:{required:"WAJIB DIISI",invalid:"Berikan nama lengkap Anda"}},pay:{button:"Bayar"},compact:{button:"Kartu"}},status:{success:"Sukses",error:"Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."}},it:{card:{title:"Modalità di pagamento",number:{label:"Numero di carta",error:{required:"OBBLIGATORIO",invalid:"Il numero della carta non è valido",incomplete:"Il numero della carta è incompleto",unsupported:"Tipo di carta non supportato"}},expiry:{label:"Data di scadenza",placeholder:"MM / AA",error:{required:"OBBLIGATORIO",incomplete:"La data di scadenza della carta non è completa",invalid:"La data di scadenza della carta non è valida",expired:"La tua carta è scaduta"}},cvc:{label:"Codice di sicurezza",placeholder:"CVC",error:{required:"OBBLIGATORIO",incomplete:"Il codice di sicurezza della carta non è completo",invalid:"Il CVC della carta non è valido"}},name:{label:"Nome del titolare della carta",placeholder:"Nome e cognome",error:{required:"OBBLIGATORIO",invalid:"Inserisci il tuo nome completo"}},pay:{button:"Paga"},compact:{button:"Carta"}},status:{success:"Il successo",error:"Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."}},ja:{card:{title:"支払い方法",number:{label:"カード番号",error:{required:"必須",invalid:"カード番号が無効です",incomplete:"カード番号に不備があります",unsupported:"サポートされていないカードタイプ"}},expiry:{label:"有効期限",placeholder:"MM (月) / YY (年)",error:{required:"必須",incomplete:"カードの有効期限に不備があります",invalid:"カードの有効期間の満了月が無効です",expired:"カードの有効期限が切れています"}},cvc:{label:"セキュリティコード",placeholder:"セキュリティコード",error:{required:"必須",incomplete:"カードのセキュリティコードに不備があります",invalid:"カードのセキュリティコードが無効です"}},name:{label:"カード保有者の名前",placeholder:"氏名",error:{required:"必須",invalid:"氏名を入力してください"}},pay:{button:"支払う"},compact:{button:"カード"}},status:{success:"成功",error:"お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"}},ko:{card:{title:"결제 방식",number:{label:"카드 번호",error:{required:"필수",invalid:"카드 번호가 잘못되었습니다",incomplete:"카드 번호가 불완전합니다",unsupported:"지원되지 않는 카드 유형"}},expiry:{label:"만료 날짜",placeholder:"MM / YY",error:{required:"필수",incomplete:"카드의 유효기간 만료일이 불완전합니다",invalid:"카드의 유효기간 만료일이 잘못되었습니다",expired:"카드가 만료되었습니다"}},cvc:{label:"보안 코드",placeholder:"보안 코드(CVC)",error:{required:"필수",incomplete:"카드의 보안 코드가 불완전합니다",invalid:"카드의 보안 코드(CVC)가 잘못되었습니다"}},name:{label:"카드 소유자 이름",placeholder:"성명",error:{required:"필수",invalid:"성명을 입력하십시오"}},pay:{button:"결제"},compact:{button:"카드 번호"}},status:{success:"성공",error:"결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."}},lt:{card:{title:"Mokėjimo būdas",number:{label:"Kortelės numeris",error:{required:"PRIVALOMA",invalid:"Negaliojantis kortelės numeris",incomplete:"Neišsamus kortelės numeris",unsupported:"Nepalaikomas kortelės tipas"}},expiry:{label:"Galiojimo pabaigos data",placeholder:"mm / MM",error:{required:"PRIVALOMA",incomplete:"Neišsami jūsų kortelės galiojimo pabaigos data",invalid:"Netinkama jūsų kortelės galiojimo pabaigos data",expired:"Kortelė baigė galioti"}},cvc:{label:"Saugos kodas",placeholder:"CVC",error:{required:"PRIVALOMA",incomplete:"Neišsamus jūsų kortelės saugos kodas",invalid:"Jūsų kortelės CVC negalioja"}},name:{label:"Kortelės turėtojo vardas ir pavardė",placeholder:"Vardas ir pavardė",error:{required:"PRIVALOMA",invalid:"Įveskite ir vardą ir pavardę"}},pay:{button:"Mokėti"},compact:{button:"Kortelė"}},status:{success:"Sėkmė",error:"Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."}},lv:{card:{title:"Maksājumu veids",number:{label:"Kartes numurs",error:{required:"OBLIGĀTI",invalid:"Kartes numurs nav derīgs",incomplete:"Kartes numurs nav pilnīgs",unsupported:"Nepareizs kartes tips"}},expiry:{label:"Derīguma termiņš",placeholder:"MM / YY",error:{required:"OBLIGĀTI",incomplete:"Kartes derīguma termiņa datums nav pilnīgs",invalid:"Kartes derīguma termiņa beigu datums nav derīgs",expired:"Kartes derīgums ir beidzies"}},cvc:{label:"Drošības kods",placeholder:"CVC",error:{required:"OBLIGĀTI",incomplete:"Kartes drošības kods nav pilnīgs",invalid:"Kartes CVC nav derīgs"}},name:{label:"Kartes īpašnieka vārds",placeholder:"Vārds, uzvārds",error:{required:"OBLIGĀTI",invalid:"Norādiet savu vārdu un uzvārdu"}},pay:{button:"Maksāt"},compact:{button:"Karte"}},status:{success:"Panākumi",error:"Mēs nevaram pārbaudīt jūsu maksājuma metodes autentiskumu. Lūdzu, izvēlieties citu maksājumu metodi un mēģiniet vēlreiz."}},ms:{card:{title:"Kaedah pembayaran",number:{label:"Nombor kad",error:{required:"DIPERLUKAN",invalid:"Nombor kad anda tidak sah",incomplete:"Nombor kad anda tidak lengkap",unsupported:"Tipe kad tidak sah"}},expiry:{label:"Tarikh tamat tempoh",placeholder:"BB / TT",error:{required:"DIPERLUKAN",incomplete:"Tarikh tamat tempoh kad anda tidak lengkap",invalid:"Tarikh tamat tempoh kad anda tidak sah",expired:"Kad anda telah tamat tempoh"}},cvc:{label:"Kod keselamatan",placeholder:"CVC",error:{required:"DIPERLUKAN",incomplete:"Kod keselamatan kad anda tidak lengkap",invalid:"CVC kad anda tidak sah"}},name:{label:"Nama pemegang kad",placeholder:"Nama penuh",error:{required:"DIPERLUKAN",invalid:"Sila berikan nama penuh anda"}},pay:{button:"Bayar"},compact:{button:"Kad"}},status:{success:"Kejayaan",error:"Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."}},ru:{card:{title:"Метод оплаты",number:{label:"Номер карты",error:{required:"ОБЯЗАТЕЛЬНО",invalid:"Недопустимый номер карты",incomplete:"Номер карты неполон",unsupported:"Неподдерживаемый тип карты"}},expiry:{label:"Срок действия",placeholder:"ММ / ГГ",error:{required:"ОБЯЗАТЕЛЬНО",incomplete:"Срок действия карты указан не полностью",invalid:"Указанный срок действия карты недействителен",expired:"Срок действия карты истек"}},cvc:{label:"Код безопасности",placeholder:"CVC",error:{required:"ОБЯЗАТЕЛЬНО",incomplete:"Код безопасности карты введен не полностью",invalid:"Код CVC карты недействителен"}},name:{label:"Имя владельца карты",placeholder:"Имя, фамилия",error:{required:"ОБЯЗАТЕЛЬНО",invalid:"Введите свое имя и фамилию"}},pay:{button:"Оплатить"},compact:{button:"Кредитная карта"}},status:{success:"Успех",error:"Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."}},mt:{card:{title:"Metodu tal-ħlas",number:{label:"Numru tal-karta",error:{required:"MEĦTIEĠ/A",invalid:"In-numru tal-karta tiegħek mhuwiex tajjeb",incomplete:"In-numru tal-karta tiegħek mhuwiex komplut",unsupported:"Tip ta' karta mhux appoġġjat"}},expiry:{label:"Data tal-iskadenza",placeholder:"XX / SS",error:{required:"MEĦTIEĠ/A",incomplete:"Id-data tal-iskadenza tal-karta tiegħek mhix sħiħa",invalid:"Id-data tal-iskadenza tal-karta tiegħek mhix tajba",expired:"Il-karta tiegħek skadiet"}},cvc:{label:"Kodiċi tas-sigurtà",placeholder:"CVC",error:{required:"MEĦTIEĠ/A",incomplete:"Il-kodiċi tas-sigurtà tal-karta tiegħek mhux sħiħ",invalid:"Is-CVC tal-karta tiegħek mhux tajjeb"}},name:{label:"Isem id-detentur tal-karta",placeholder:"Isem u kunjom",error:{required:"MEĦTIEĠ/A",invalid:"Jekk jogħġbok ipprovdi isemek kollu"}},pay:{button:"Ħallas"},compact:{button:"Karta"}},status:{success:"Suċċess",error:"Aħna ma nistgħux jawtentikaw il-metodu tal-ħlas tiegħek. Jekk jogħġbok agħżel metodu ta' ħlas differenti u erġa' pprova."}},no:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKREVD",invalid:"Kortnummeret er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke støttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKREVD",invalid:"Utløpsdatoen er ugyldig",incomplete:"Kortets utløpsdato er ufullstendig",expired:"Kortet har utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{required:"PÅKREVD",incomplete:"Sikkerhetskoden er ufullstendig",invalid:"CVC-koden er ugyldig"}},name:{label:"Kortholders navn",placeholder:"Fullt navn",error:{required:"PÅKREVD",invalid:"Oppgi fullt navn"}},pay:{button:"Betal"},compact:{button:"Kort"}},status:{success:"Betalingen var vellykket!",error:"Vi kan ikke autentisere betalingsmetoden din. Velg en annen betalingsmetode og prøv igjen."}},nb:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKREVET",invalid:"Kortnummer er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKREVET",incomplete:"Kortets utløpsdato er ufullstendig",invalid:"Kortets utløpsdato er ugyldig",expired:"Kortet er utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{required:"PÅKREVET",incomplete:"Kortets sikkerhetskode er ufullstendig",invalid:"Kortets CVC-nummer er ugyldig"}},name:{label:"Kortinnehavers navn",placeholder:"Fullt navn",error:{required:"PÅKREVET",invalid:"Oppgi fullt navn"}},pay:{button:"Betal"},compact:{button:"Kort"}},status:{success:"Suksess",error:"Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."}},nl:{card:{title:"Betaalmethode",number:{label:"Kaartnummer",error:{required:"VEREIST",invalid:"Je kaartnummer is ongeldig",incomplete:"Je kaartnummer is onvolledig",unsupported:"Niet ondersteund"}},expiry:{label:"Vervaldatum",placeholder:"MM / JJ",error:{required:"VEREIST",incomplete:"De vervaldatum van je kaart is onvolledig",invalid:"De vervaldatum van je betaalkaart is ongeldig",expired:"Je kaart is vervallen"}},cvc:{label:"Beveiligingscode",placeholder:"CVC",error:{required:"VEREIST",incomplete:"De beveiligingscode van je betaalkaart is onvolledig",invalid:"De CVC-code van je betaalkaart is ongeldig"}},name:{label:"Naam kaarthouder",placeholder:"Volledige naam",error:{required:"VEREIST",invalid:"Geef je volledige naam op"}},pay:{button:"Betalen"},compact:{button:"Kaart"}},status:{success:"Succes",error:"We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."}},pl:{card:{title:"Metoda płatności",number:{label:"Numer karty",error:{required:"WYMAGANE",invalid:"Numer karty jest nieprawidłowy",incomplete:"Numer karty jest niepełny",unsupported:"Nieobsługiwany typ karty"}},expiry:{label:"Data ważności",placeholder:"MM / RR",error:{required:"WYMAGANE",incomplete:"Data ważności karty jest niepełna",invalid:"Termin ważności karty jest nieprawidłowy",expired:"Karta straciła ważność"}},cvc:{label:"Kod bezpieczeństwa",placeholder:"Kod CVC",error:{required:"WYMAGANE",incomplete:"Kod zabezpieczający karty jest niekompletny",invalid:"CVC karty jest nieprawidłowy"}},name:{label:"Imię i nazwisko posiadacza karty",placeholder:"Imię i nazwisko",error:{required:"WYMAGANE",invalid:"Podaj pełne imię i nazwisko"}},pay:{button:"Zapłać"},compact:{button:"Karta"}},status:{success:"Sukces",error:"Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."}},pt:{card:{title:"Forma de pagamento",number:{label:"Número do cartão",error:{required:"OBRIGATÓRIO",invalid:"O número do seu cartão é inválido",incomplete:"O número do seu cartão está incompleto",unsupported:"Tipo de cartão não suportado"}},expiry:{label:"Data de validade",placeholder:"MM / AA",error:{required:"OBRIGATÓRIO",incomplete:"A data de validade do cartão está incompleta",invalid:"A data de validade do seu cartão é inválida",expired:"O seu cartão expirou"}},cvc:{label:"Código de segurança",placeholder:"CVC",error:{required:"OBRIGATÓRIO",incomplete:"O código de segurança de seu cartão está incompleto",invalid:"O CVC do seu cartão é inválido"}},name:{label:"Nome do titular do cartão",placeholder:"Nome completo",error:{required:"OBRIGATÓRIO",invalid:"Forneça o seu nome completo"}},pay:{button:"Pagar"},compact:{button:"Cartão"}},status:{success:"Sucesso",error:"Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."}},ro:{card:{title:"Metoda de plată",number:{label:"Numărul cardului",error:{required:"NECESAR",invalid:"Numărul cardului dvs. nu este valid",incomplete:"Numărul cardului dvs. nu este complet",unsupported:"Tipul cardului nu este acceptat"}},expiry:{label:"Data de expirare",placeholder:"LL / AA",error:{required:"NECESAR",incomplete:"Data de expirare a cardului dvs. este incompletă",invalid:"Data de expirare a cardului dvs. nu este validă",expired:"Cardul dvs. a expirat"}},cvc:{label:"Codul de securitate",placeholder:"CVC",error:{required:"NECESAR",incomplete:"Codul de securitate al cardului dvs. este incomplet",invalid:"Numărul CVC al cardului dvs. nu este valid"}},name:{label:"Nume titular card",placeholder:"Nume complet",error:{required:"NECESAR",invalid:"Vă rugăm să furnizați numele dvs. complet"}},pay:{button:"Plătiți"},compact:{button:"Card"}},status:{success:"Succes",error:"Nu putem să vă autentificăm metoda de plată. Vă rugăm să alegeți o altă metodă de plată și să încercați din nou."}},ua:{card:{title:"Спосіб оплати",number:{label:"Номер картки",error:{required:"ОБОВʼЯЗКОВО",invalid:"Невірний номер картки",incomplete:"Номер картки неповний",unsupported:"Непідтримуваний тип картки"}},expiry:{label:"Термін дії",placeholder:"ММ / РР",error:{required:"ОБОВʼЯЗКОВО",invalid:"Невірний термін дії картки",incomplete:"Термін дії картки вказано не повністю",expired:"Термін дії картки минув"}},cvc:{label:"Код безпеки",placeholder:"CVC",error:{required:"ОБОВʼЯЗКОВО",incomplete:"Код безпеки картки введено не повністю",invalid:"Невірний CVC-код картки"}},name:{label:"Імʼя власника картки",placeholder:"Повне імʼя",error:{required:"ОБОВʼЯЗКОВО",invalid:"Вкажіть своє повне імʼя"}},pay:{button:"Сплатити"},compact:{button:"Картка"}},status:{success:"Платіж успішний!",error:"Не вдалося підтвердити ваш спосіб оплати. Будь ласка, оберіть інший спосіб оплати та спробуйте ще раз."}},sk:{card:{title:"Spôsob platby",number:{label:"Číslo karty",error:{required:"POŽADOVANÉ",invalid:"Číslo vašej karty je neplatné",incomplete:"Číslo vašej karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Dátum ukončenia platnosti",placeholder:"MM / RR",error:{required:"POŽADOVANÉ",incomplete:"Dátum vypršania platnosti vašej karty je neúplný",invalid:"Dátum vypršania platnosti vašej karty je neplatný",expired:"Platnosť vašej karty vypršala"}},cvc:{label:"Bezpečnostný kód",placeholder:"CVC",error:{required:"POŽADOVANÉ",incomplete:"Bezpečnostný kód vašej karty je neúplný",invalid:"Číslo CVC vašej karty je neplatné"}},name:{label:"Držiteľ karty",placeholder:"Celé meno",error:{required:"POŽADOVANÉ",invalid:"Zadajte vaše celé meno"}},pay:{button:"Zaplatiť"},compact:{button:"Karta"}},status:{success:"Úspech",error:"Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."}},sl:{card:{title:"Način plačila",number:{label:"Številka kartice",error:{required:"OBVEZNO",invalid:"Številka vaše kartice ni veljavna",incomplete:"Številka vaše kartice ni popolna",unsupported:"Nepodprta vrsta kartice"}},expiry:{label:"Datum poteka",placeholder:"MM / LL",error:{required:"OBVEZNO",incomplete:"Datum poteka vaše kartice ni popoln",invalid:"Datum poteka vaše kartice ni veljaven",expired:"Vaša kartica je potekla"}},cvc:{label:"Varnostna koda",placeholder:"CVC",error:{required:"OBVEZNO",incomplete:"Varnostna koda vaše kartice ni popolna",invalid:"Koda CVC vaše kartice ni veljavna"}},name:{label:"Ime imetnika kartice",placeholder:"Polno ime",error:{required:"OBVEZNO",invalid:"Vnesite svoje polno ime"}},pay:{button:"Plačaj"},compact:{button:"Kartica"}},status:{success:"Uspeh",error:"Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."}},sv:{card:{title:"Betalningsmetod",number:{label:"Kortnummer",error:{required:"OBLIGATORISKT",invalid:"Ditt kortnummer är ogiltigt",incomplete:"Kortnumret är ofullständigt",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Sista giltighetsdag",placeholder:"MM / ÅÅ",error:{required:"OBLIGATORISKT",incomplete:"Kortets utgångsdatum är ofullständigt",invalid:"Kortets utgångsdatum är ogiltigt",expired:"Ditt kort har gått ut"}},cvc:{label:"Säkerhetskod",placeholder:"CVC",error:{required:"OBLIGATORISKT",incomplete:"Kortets säkerhetskod är ofullständig",invalid:"Kortets CVC-kod är ogiltig"}},name:{label:"Kortinnehavarens namn",placeholder:"Fullständigt namn",error:{required:"OBLIGATORISKT",invalid:"Ange ditt fullständiga namn"}},pay:{button:"Betala"},compact:{button:"Kort"}},status:{success:"Framgång",error:"Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."}},th:{card:{title:"วิธีการชำระเงิน",number:{label:"หมายเลขบัตร",error:{required:"ต้องป้อนข้อมูล",invalid:"หมายเลขบัตรของคุณไม่ถูกต้อง",incomplete:"หมายเลขบัตรของคุณไม่ครบถ้วน",unsupported:"ประเภทบัตรของคุณไม่ถูกต้อง"}},expiry:{label:"วันหมดอายุ",placeholder:"ดด / ปป",error:{required:"ต้องป้อนข้อมูล",incomplete:"วันที่หมดอายุของบัตรไม่ครบถ้วน",invalid:"วันที่หมดอายุของบัตรไม่ถูกต้อง",expired:"บัตรของคุณหมดอายุแล้ว"}},cvc:{label:"รหัสความปลอดภัย",placeholder:"CVC",error:{required:"ต้องป้อนข้อมูล",incomplete:"รหัสความปลอดภัยของบัตรไม่ครบถ้วน",invalid:"CVC ของบัตรไม่ถูกต้อง"}},name:{label:"ชื่อเจ้าของบัตร",placeholder:"ชื่อ-นามสกุล",error:{required:"ต้องป้อนข้อมูล",invalid:"โปรดป้อนชื่อ-นามสกุล"}},pay:{button:"ชำระเงิน"},compact:{button:"การ์ด"}},status:{success:"ความสำเร็จ",error:"เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"}},tr:{card:{title:"Ödeme yöntemi",number:{label:"Kart numarası",error:{required:"GEREKLI",invalid:"Kart numaranız geçersiz",incomplete:"Kart numaranız eksik",unsupported:"Desteklenmeyen kart türü"}},expiry:{label:"Son Kullanma Tarihi",placeholder:"AA / YY",error:{required:"GEREKLI",incomplete:"Kartınızın son kullanma tarihi eksik",invalid:"Kartınızın son kullanım tarihi geçersiz",expired:"Kartınızın süresi dolmuş"}},cvc:{label:"Güvenlik kodu",placeholder:"CVC",error:{required:"GEREKLI",incomplete:"Kartınızın güvenlik kodu eksik",invalid:"Kartınızın CVC'si geçersiz"}},name:{label:"Kart sahibinin adı",placeholder:"Ad ve soyadı",error:{required:"GEREKLI",invalid:"Lütfen tam adınızı girin"}},pay:{button:"Öde"},compact:{button:"Kart"}},status:{success:"Başarı",error:"Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."}},vi:{card:{title:"Phương thức thanh toán",number:{label:"Số thẻ",error:{required:"BẮT BUỘC",invalid:"Số thẻ của quý vị không hợp lệ",incomplete:"Số thẻ của quý vị không đầy đủ",unsupported:"Không hỗ trợ loại thẻ"}},expiry:{label:"Ngày hết hạn",placeholder:"MM / YY",error:{required:"BẮT BUỘC",incomplete:"Ngày hết hạn trên thẻ không hợp lệ",invalid:"Ngày hết hạn của thẻ không hợp lệ",expired:"Thẻ của quý vị đã hết hạn"}},cvc:{label:"Mã bảo mật",placeholder:"CVC",error:{required:"BẮT BUỘC",incomplete:"Mã bảo mật của thẻ không đầy đủ",invalid:"CVC thẻ của bạn không hợp lệ"}},name:{label:"Tên chủ thẻ",placeholder:"Họ và tên",error:{required:"BẮT BUỘC",invalid:"Vui lòng cung cấp tên đầy đủ của bạn"}},pay:{button:"Thanh toán"},compact:{button:"Thẻ"}},status:{success:"Thành công",error:"Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại."}},zh:{card:{title:"支付方式",number:{label:"卡号",error:{required:"必填",invalid:"您的卡号无效",incomplete:"您的银行卡卡号不完整",unsupported:"不支持的卡类型"}},expiry:{label:"有效期",placeholder:"月份 / 年份",error:{required:"必填",incomplete:"您银行卡的有效期不完整",invalid:"您银行卡的有效期无效",expired:"您的银行卡已过期"}},cvc:{label:"安全代码",placeholder:"CVC",error:{required:"必填",incomplete:"您银行卡的安全码不完整",invalid:"您银行卡的 CVC 无效"}},name:{label:"持卡人姓名",placeholder:"全名",error:{required:"必填",invalid:"请提供您的全名"}},pay:{button:"支付"},compact:{button:"卡片"}},status:{success:"成功",error:"我们无法验证您的付款方式。请选择其他付款方式并重试。"}}},br=()=>{const r=navigator==null?void 0:navigator.language.split("-")[0];return gr[r]||gr.en},_i=(r,t={})=>{var n,i,a,s,o,l,c,d,u,h,p,m,f,v,b,A,T,L,C,I,x,P,U,H,W,S,F,q,ee,M,$,K,g,_,R,B,E,O,w,k,V,N,G,J,de,D,ae,Ae,xi,Oi,Ni,Li,ki,Pi,Ri,Mi,Si,Di,Vi,Fi;if(!r)return br();const e=gr[r]||br();return{card:{title:((n=t==null?void 0:t.card)==null?void 0:n.title)||e.card.title,number:{label:((a=(i=t==null?void 0:t.card)==null?void 0:i.number)==null?void 0:a.label)||e.card.number.label,error:{required:((l=(o=(s=t==null?void 0:t.card)==null?void 0:s.number)==null?void 0:o.error)==null?void 0:l.required)||e.card.number.error.required,invalid:((u=(d=(c=t==null?void 0:t.card)==null?void 0:c.number)==null?void 0:d.error)==null?void 0:u.invalid)||e.card.number.error.invalid,incomplete:((m=(p=(h=t==null?void 0:t.card)==null?void 0:h.number)==null?void 0:p.error)==null?void 0:m.incomplete)||e.card.number.error.incomplete,unsupported:((b=(v=(f=t==null?void 0:t.card)==null?void 0:f.number)==null?void 0:v.error)==null?void 0:b.unsupported)||e.card.number.error.unsupported}},expiry:{label:((T=(A=t==null?void 0:t.card)==null?void 0:A.expiry)==null?void 0:T.label)||e.card.expiry.label,placeholder:((C=(L=t==null?void 0:t.card)==null?void 0:L.expiry)==null?void 0:C.placeholder)||e.card.expiry.placeholder,error:{required:((P=(x=(I=t==null?void 0:t.card)==null?void 0:I.expiry)==null?void 0:x.error)==null?void 0:P.required)||e.card.expiry.error.required,invalid:((W=(H=(U=t==null?void 0:t.card)==null?void 0:U.expiry)==null?void 0:H.error)==null?void 0:W.invalid)||e.card.expiry.error.invalid,incomplete:((q=(F=(S=t==null?void 0:t.card)==null?void 0:S.expiry)==null?void 0:F.error)==null?void 0:q.incomplete)||e.card.expiry.error.incomplete,expired:(($=(M=(ee=t==null?void 0:t.card)==null?void 0:ee.expiry)==null?void 0:M.error)==null?void 0:$.expired)||e.card.expiry.error.expired}},cvc:{label:((g=(K=t==null?void 0:t.card)==null?void 0:K.cvc)==null?void 0:g.label)||e.card.cvc.label,placeholder:((R=(_=t==null?void 0:t.card)==null?void 0:_.cvc)==null?void 0:R.placeholder)||e.card.cvc.placeholder,error:{required:((O=(E=(B=t==null?void 0:t.card)==null?void 0:B.cvc)==null?void 0:E.error)==null?void 0:O.required)||e.card.cvc.error.required,incomplete:((V=(k=(w=t==null?void 0:t.card)==null?void 0:w.cvc)==null?void 0:k.error)==null?void 0:V.incomplete)||e.card.cvc.error.incomplete,invalid:((J=(G=(N=t==null?void 0:t.card)==null?void 0:N.cvc)==null?void 0:G.error)==null?void 0:J.invalid)||e.card.cvc.error.invalid}},name:{label:((D=(de=t==null?void 0:t.card)==null?void 0:de.name)==null?void 0:D.label)||e.card.name.label,placeholder:((Ae=(ae=t==null?void 0:t.card)==null?void 0:ae.name)==null?void 0:Ae.placeholder)||e.card.name.placeholder,error:{required:((Ni=(Oi=(xi=t==null?void 0:t.card)==null?void 0:xi.name)==null?void 0:Oi.error)==null?void 0:Ni.required)||e.card.name.error.required,invalid:((Pi=(ki=(Li=t==null?void 0:t.card)==null?void 0:Li.name)==null?void 0:ki.error)==null?void 0:Pi.invalid)||e.card.name.error.invalid}},pay:{button:((Mi=(Ri=t==null?void 0:t.card)==null?void 0:Ri.pay)==null?void 0:Mi.button)||e.card.pay.button},compact:{button:((Di=(Si=t==null?void 0:t.card)==null?void 0:Si.compact)==null?void 0:Di.button)||e.card.compact.button}},status:{success:((Vi=t==null?void 0:t.status)==null?void 0:Vi.success)||e.status.success,error:((Fi=t==null?void 0:t.status)==null?void 0:Fi.error)||e.status.error}}};class ic extends wt{constructor(){super({messages:br(),locale:(navigator==null?void 0:navigator.language.split("-")[0])||"en"})}setMessages(t){const e=this.locale(),n=_i(e,t);this.setState({locale:e,messages:n,overrides:t})}setLocale(t){const e=this.overrides(),n=_i(t,e);this.setState({locale:t,messages:n,overrides:e})}overrides(){const{overrides:t}=this.getState();return t}messages(){const{messages:t}=this.getState();return t}locale(){const{locale:t}=this.getState();return t}dir(){return this.locale()==="ar"?"rtl":"ltr"}}/*!
|
|
333
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.successContainer),this.element.innerHTML=this.template}render(){return this.element}}const bi={container:"_container_hoha1_1",title:"_title_hoha1_5"};class Ql{constructor(t){b(this,"element");b(this,"message",document.createElement("p"));b(this,"icon",new $l);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(bi.container),this.message.classList.add(bi.title),this.message.textContent=t.messages().status.success,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:e})=>{this.message.textContent=e.status.success})}addClassName(t){this.element.classList.add(t)}removeClassName(t){this.element.classList.remove(t)}render(){return this.element}}class Zl{constructor(t){b(this,"isLoading",!1);b(this,"isFormOpen",!1);b(this,"checkout");b(this,"container",document.createElement("div"));b(this,"loader",new Wo);b(this,"success");b(this,"buttons");b(this,"form");this.config=t,this.buttons=new Pl(t),this.form=new Yl({translate:t.state.translate,className:ye.hidden,stylesState:t.state.styles}),this.success=new Ql(t.state.translate),this.success.addClassName(ye.hidden),this.container.append(this.loader.render(),this.buttons.render(),this.form.render()),this.checkout=document.createElement("div"),this.checkout.classList.add(ye.checkout),this.checkout.append(this.container,this.success.render())}init(){return z(this,null,function*(){this.buttons.addEventListener("ready",()=>{this.loader.setClassName(ye.hidden),this.buttons.showButton()}),this.buttons.addEventListener("open",()=>z(this,null,function*(){this.isLoading||(this.hideError(),yield ue(this.buttons.buttons,Et.close,Et.transition),this.buttons.buttons.classList.add(ye.hidden),this.form.element.classList.add(ye.formInitial),this.form.element.classList.remove(ye.hidden),yield ue(this.form.element,He.open,He.transition),this.isFormOpen=!0)})),this.buttons.addEventListener("error",()=>{const{onCheckoutFail:t}=this.config.state.checkout.getState(),e=this.config.state.translate.messages();t==null||t(new Error(e.status.error))}),this.buttons.addEventListener("success",t=>{const{clientToken:e}=this.config.state.checkout.getState();switch(t.type){case"apple":return this.handleSuccess({clientSession:e,applePay:t});case"google":return this.handleSuccess({clientSession:e,googlePay:t});case"paypal":return this.handleSuccess({clientSession:e,paypal:{billing_agreement_token:t}});case"venmo":return this.handleSuccess({clientSession:e,braintree:{nonce:t}})}}),this.form.addEventListener("close",()=>z(this,null,function*(){this.isLoading||(this.hideError(),yield ue(this.form.element,He.close,He.transition),this.form.element.classList.add(ye.hidden),this.buttons.buttons.classList.add(ye.btnsInitial),this.buttons.buttons.classList.remove(ye.hidden),yield ue(this.buttons.buttons,Et.open,Et.transition),this.isFormOpen=!1)})),this.form.addEventListener("submit",t=>z(this,null,function*(){if(this.isLoading||(this.form.touchSubmit(),!this.form.validate()))return;const n=t.number.replace(/\D/g,""),a=this.config.state.checkout.getState(),i=this.config.service.ev.getEv(),[s,o]=yield Promise.all([i.encrypt(n),i.encrypt(t.cvc)]),[c,l]=t.expiry.split("/");yield this.handleSuccess({clientSession:a.clientToken,card:{firstSixDigits:n.slice(0,6),lastFourDigits:n.slice(-4),expMonth:Number(c),expYear:Number(l),cardBrand:t.cardBrand||"",number:s,cvc:o,type:J.CARD,metadata:{name:t.name,userAgent:navigator==null?void 0:navigator.userAgent}}})})),yield this.buttons.init()})}handleError(t){var i;const e=this.config.state.checkout.getState(),n=this.config.state.translate.messages();console.error(t);const a=t instanceof Error?t.message:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t?String(t.message):this.config.state.translate.messages().status.error;this.buttons.showExternalError(a),this.showError(),(i=e.onCheckoutFail)==null||i.call(e,new Error(n.status.error)),this.setLoading(!1)}handleSuccess(t){return z(this,null,function*(){var a;if(this.isLoading)return;this.hideError(),this.setLoading(!0);const e=this.config.state.checkout.getState(),n=this.config.state.translate.messages();try{const i=yield bl(t,e.environment,e.apiVersion,e.useWorkflows);if(i.error)throw new Error(n.status.error);if(i.three_ds_session_id){yield this.config.service.ev.initThreeDs({threeDsId:i.three_ds_session_id,onSuccess:()=>{this.setLoading(!1),this.handleSuccess(X(B({},t),{threeDsSessionId:i.three_ds_session_id}))},onError:()=>{this.handleError("Three DS Error")}});return}this.showSuccess(),(a=e.onCheckoutComplete)==null||a.call(e,i),this.setLoading(!1)}catch(i){this.handleError(i)}})}showSuccess(){return z(this,null,function*(){this.container.classList.add(ye.hidden),this.success.removeClassName(ye.hidden),yield ue(this.success.element,He.open,He.transition)})}hideError(){this.form.hideError()}showError(){this.isFormOpen&&this.form.showError()}setLoading(t){this.isLoading=t,this.form.setLoading(t),this.loader.setClassName(!t||this.isFormOpen?ye.hidden:"")}render(){return this.checkout}}class Xl{constructor(t){b(this,"component");this.config=t,this.component=new Zl(t)}init(){return z(this,null,function*(){const{checkout:t,transaction:e,translate:n,styles:a}=this.config.state,{apiVersion:i}=t.getState();t.subscribe(({clientToken:s,environment:o,locale:c,translate:l,styles:d})=>{c&&n.locale()!==c&&n.setLocale(c),l&&n.overrides()!==l&&n.setMessages(l),d&&a.setState(d),e.updateTransaction(s,o,i).then(u=>{var h,p;if(u)return this.config.service.ev.initEv({teamId:(h=u.evervault)==null?void 0:h.team_id,appId:(p=u.evervault)==null?void 0:p.app_id})}).catch(console.error)})})}mount(){return z(this,null,function*(){return yield this.init(),yield this.component.init(),this.component.render()})}}class At{constructor(t){b(this,"initialState");b(this,"state");b(this,"observer",new se);this.initialState=t,this.state=t}getState(){return this.state}setState(t){this.state=t,this.observer.emit(t)}clearState(){this.state=this.initialState,this.observer.clear()}subscribe(t){return this.observer.addListener(t)}}const Jl={clientToken:"",environment:"sandbox",apiVersion:"1.0.0",useWorkflows:!1};class ec extends At{constructor(t){super(B(B({},Jl),t))}}const tc={};class rc extends At{constructor(t){super(B(B({},tc),t))}}class nc extends At{constructor(e){super(e||null);b(this,"clientToken","")}updateTransaction(e,n,a){return z(this,null,function*(){if(this.clientToken===e)return this.getState();this.clientToken=e;const i=yield El(e,n,a);return this.setState(i),i})}}const gr={ar:{card:{title:"طريقة الدفع",number:{label:"رقم البطاقة",error:{required:"يتطلب",invalid:"رقم البطاقة غير صالح",incomplete:"رقم البطاقة غير كامل",unsupported:"نوع البطاقة غير المدعوم"}},expiry:{label:"تاريخ الانتهاء",placeholder:"سنة / شهر",error:{required:"يتطلب",invalid:"تاريخ انتهاء صلاحية البطاقة غير صالح",incomplete:"تاريخ انتهاء الصلاحية الخاص ببطاقتك غير كامل",expired:"تاريخ انتهاء صلاحية بطاقتك في الماضي"}},cvc:{label:"رمز الأمان",placeholder:"CVC",error:{required:"يتطلب",incomplete:"رمز الأمان الخاص ببطاقتك غير كامل",invalid:"رمز التحقق من البطاقة (CVC) الخاص ببطاقتك غير صالح"}},name:{label:"اسم حامل البطاقة",placeholder:"الاسم الكامل على البطاقة",error:{required:"يتطلب",invalid:"يرجى إدخال اسمك الكامل"}},pay:{button:"الراتب"},compact:{button:"البطاقة"}},status:{success:"تمت عملية الدفع الخاصة بك بنجاح!",error:"لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."}},en:{card:{title:"Payment method",number:{label:"Card number",error:{required:"REQUIRED",invalid:"Your card number is invalid",incomplete:"Your card number is incomplete",unsupported:"Unsupported card type"}},expiry:{label:"Expiry date",placeholder:"MM / YY",error:{required:"REQUIRED",invalid:"Your card’s expiry date is invalid",incomplete:"Your card’s expiry date is incomplete",expired:"Your card’s expiry {date} is in the past"}},cvc:{label:"Security code",placeholder:"CVC",error:{required:"REQUIRED",incomplete:"Your card’s security code is incomplete",invalid:"Your card’s CVC is invalid"}},name:{label:"Cardholder name",placeholder:"Full name on card",error:{required:"REQUIRED",invalid:"Please provide your full name"}},pay:{button:"Pay"},compact:{button:"Card"}},status:{success:"Your payment was successful!",error:"We are unable to authenticate your payment method. Please choose a different payment method and try again."}},bg:{card:{title:"Метод на плащане",number:{label:"Информация за картата",error:{required:"ЗАДЪЛЖИТЕЛНО",invalid:"Номерът на Вашата карта е неправилен",incomplete:"Номерът на Вашата карта е непълен",unsupported:"Неподдържан тип карта"}},expiry:{label:"Дата на валидност",placeholder:"ММ / ГГ",error:{required:"ЗАДЪЛЖИТЕЛНО",incomplete:"Датата на валидност на вашата карта е непълна",invalid:"Датата на валидност на вашата карта е невалидна",expired:"Датата на валидност на вашата карта е в миналото"}},cvc:{label:"Код за сигурност",placeholder:"CVC",error:{required:"ЗАДЪЛЖИТЕЛНО",incomplete:"Кодът за сигурност на вашата карта е непълен",invalid:"Кодът за сигурност на вашата карта е невалиден"}},name:{label:"Име на картодържателя",placeholder:"Пълно име върху картата",error:{required:"ЗАДЪЛЖИТЕЛНО",invalid:"Моля, въведете трите си имена"}},pay:{button:"Платете"},compact:{button:"Карта"}},status:{success:"Успех",error:"Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."}},cs:{card:{title:"Způsob platby",number:{label:"Číslo karty",error:{required:"POVINNÝ ÚDAJ",invalid:"Číslo Vaší karty je neplatné",incomplete:"Číslo vaší karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Datum konce platnosti",placeholder:"MM / RR",error:{required:"POVINNÝ ÚDAJ",incomplete:"Datum konce platnosti vaší karty je neúplné",invalid:"Datum konce platnosti karty je neplatné",expired:"Platnost vaší karty vypršela"}},cvc:{label:"Bezpečnostní kód",placeholder:"CVC",error:{required:"POVINNÝ ÚDAJ",incomplete:"Bezpečnostní kód vaší karty je neúplný",invalid:"CVC vaší karty je neplatné"}},name:{label:"Jméno držitele karty",placeholder:"Celé jméno",error:{required:"POVINNÝ ÚDAJ",invalid:"Uvďte prosím celé své jméno"}},pay:{button:"Platit"},compact:{button:"Karta"}},status:{success:"Úspěch",error:"Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."}},da:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKRÆVET",invalid:"Kortnummeret er ugyldigt",incomplete:"Kortnummeret er ufuldstændigt",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Udløbsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKRÆVET",incomplete:"Kortets udløbsdato er ikke komplet",invalid:"Dit korts udløbsdato er ugyldig",expired:"Dit kort er udløbet"}},cvc:{label:"Sikkerhedskode",placeholder:"CVC",error:{required:"PÅKRÆVET",incomplete:"Dit korts sikkerhedskode er ikke komplet",invalid:"Dit korts CVC er ugyldigt"}},name:{label:"Kortholderens navn",placeholder:"Fulde navn",error:{required:"PÅKRÆVET",invalid:"Angiv dit fulde navn"}},pay:{button:"Betal"},compact:{button:"Kredit- eller betalingskort"}},status:{success:"Succes",error:"Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."}},de:{card:{title:"Zahlungsmethode",number:{label:"Kartennummer",error:{required:"Pflichtfeld",invalid:"Ihre Kartennummer ist ungültig",incomplete:"Ihre Kartennummer ist unvollständig",unsupported:"Nicht unterstützter Kartentyp"}},expiry:{label:"Ablaufdatum",placeholder:"MM / JJ",error:{required:"Pflichtfeld",incomplete:"Das Ablaufdatum Ihrer Karte ist unvollständig",invalid:"Das Ablaufdatum Ihrer Karte ist ungültig",expired:"Ihre Karte ist ungültig"}},cvc:{label:"Sicherheitscode",placeholder:"CVC",error:{required:"Pflichtfeld",incomplete:"Der Sicherheitscode Ihrer Karte ist unvollständig",invalid:"Die Prüfziffer/CVC Ihrer Karte ist ungültig"}},name:{label:"Name des/der Karteninhaber/in",placeholder:"Vollständiger Name",error:{required:"Pflichtfeld",invalid:"Bitte geben Sie Ihren vollständigen Namen ein"}},pay:{button:"Bezahlen"},compact:{button:"Kredit- oder Debitkarte"}},status:{success:"Erfolg",error:"Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."}},el:{card:{title:"Μέθοδος πληρωμής",number:{label:"Αριθμός κάρτας",error:{required:"Απαιτούμενο",invalid:"Ο αριθμός της κάρτας σας δεν είναι έγκυρος",incomplete:"Ο αριθμός της κάρτας σας είναι ελλιπής",unsupported:"Δεν υποστηρίζεται ο τύπος της κάρτας"}},expiry:{label:"Ημερομηνία λήξης",placeholder:"ΜΜ / ΕΕ",error:{required:"Απαιτούμενο",incomplete:"Η ημερομηνία λήξης της κάρτας σας είναι ελλιπής",invalid:"Η ημερομηνία λήξης της κάρτας σας δεν είναι έγκυρη",expired:"Η κάρτα σας έχει λήξει"}},cvc:{label:"Κωδικός ασφαλείας",placeholder:"CVC",error:{required:"Απαιτούμενο",incomplete:"Ο κωδικός ασφαλείας της κάρτας σας είναι ελλιπής",invalid:"Το CVC της κάρτας σας δεν είναι έγκυρο"}},name:{label:"Όνομα κατόχου κάρτας",placeholder:"Πλήρες όνομα στην κάρτα",error:{required:"Απαιτούμενο",invalid:"Συμπληρώστε το ονοματεπώνυμό σας"}},pay:{button:"Πληρωμή"},compact:{button:"Kάρτα"}},status:{success:"Επιτυχία",error:"Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."}},es:{card:{title:"Método de pago",number:{label:"Número de tarjeta",error:{required:"OBLIGATORIO",invalid:"El número de tu tarjeta no es válido",incomplete:"El número de tu tarjeta está incompleto",unsupported:"Tipo de tarjeta no soportado"}},expiry:{label:"Fecha de caducidad",placeholder:"MM / AA",error:{required:"OBLIGATORIO",incomplete:"La fecha de caducidad de la tarjeta está incompleta",invalid:"La fecha de caducidad de la tarjeta no es válida",expired:"La tarjeta ha caducado"}},cvc:{label:"Código de seguridad",placeholder:"CVC",error:{required:"OBLIGATORIO",incomplete:"El código de seguridad de la tarjeta está incompleto",invalid:"El CVC de tu tarjeta no es válido"}},name:{label:"Nombre del titular de la tarjeta",placeholder:"Nombre completo",error:{required:"OBLIGATORIO",invalid:"Proporciona tu nombre completo"}},pay:{button:"Pagar"},compact:{button:"Tarjeta"}},status:{success:"Éxito",error:"No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."}},et:{card:{title:"Makseviis",number:{label:"Kaardi number",error:{required:"NÕUTAV",invalid:"Teie kaardinumber ei sobi",incomplete:"Teie kaardinumber on puudulik",unsupported:"Toetamata kaardi tüüp"}},expiry:{label:"Aegumiskuupäev",placeholder:"KK / AA",error:{required:"NÕUTAV",incomplete:"Teie kaardi aegumiskuupäev on puudulik",invalid:"Teie kaardi aegumiskuupäev on kehtetu",expired:"Teie kaart on aegunud"}},cvc:{label:"Turvakood",placeholder:"CVC",error:{required:"NÕUTAV",incomplete:"Teie kaardi turvakood on puudulik",invalid:"Teie kaardi CVC on kehtetu"}},name:{label:"Kaardiomaniku nimi",placeholder:"Täisnimi",error:{required:"NÕUTAV",invalid:"Esitage oma täisnimi"}},pay:{button:"Maksa"},compact:{button:"Krediit- või deebetkaart"}},status:{success:"Edu",error:"Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."}},fi:{card:{title:"Maksutapa",number:{label:"Kortin numero",error:{required:"PAKOLLINEN",invalid:"Kortin numero ei kelpaa",incomplete:"Kortin numero on puutteellinen",unsupported:"Ei tuettu korttityyppi"}},expiry:{label:"Erääntymispäivä",placeholder:"KK / VV",error:{required:"PAKOLLINEN",incomplete:"Kortin voimassaoloaika on puutteellinen",invalid:"Kortin voimassaoloaika on virheellinen",expired:"Korttisi on vanhentunut"}},cvc:{label:"Turvakoodi",placeholder:"CVC-koodi",error:{required:"PAKOLLINEN",incomplete:"Kortin turvakoodi on puutteellinen",invalid:"Kortin CVC ei kelpaa"}},name:{label:"Kortinhaltijan nimi",placeholder:"Koko nimi",error:{required:"PAKOLLINEN",invalid:"Anna koko nimesi"}},pay:{button:"Maksa"},compact:{button:"Luotto- tai pankkikortti"}},status:{success:"Menestys",error:"Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."}},fil:{card:{title:"Paraan ng pagbabayad",number:{label:"Numero ng card",error:{required:"KAILANGAN",invalid:"Hindi valid ang numero ng kard mo",incomplete:"Ang numero ng iyong kard ay kulang",unsupported:"Hindi sinusuportahang uri ng card"}},expiry:{label:"Petsa ng pagkapaso",placeholder:"BB / TT",error:{required:"KAILANGAN",incomplete:"Ang petsa ng pagkapaso ng iyong kard ay kulang",invalid:"Hindi valid ang petsa ng pagkapaso ng iyong kard",expired:"Napaso na ang iyong kard"}},cvc:{label:"Security code",placeholder:"CVC",error:{required:"KAILANGAN",incomplete:"Ang security code ng iyong kard ay kulang",invalid:"Hindi valid ang CVC ng iyong kard"}},name:{label:"Pangalan ng may-ari ng kard",placeholder:"Buong pangalan",error:{required:"KAILANGAN",invalid:"Pakibigay ang iyong buong pangalan"}},pay:{button:"Magbayad"},compact:{button:"Luotto- tai pankkikortti"}},status:{success:"Tagumpay",error:"Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."}},fr:{card:{title:"Moyen de paiement",number:{label:"Numéro de la carte",error:{required:"OBLIGATOIRE",invalid:"Votre numéro de carte n'est pas valide",incomplete:"Votre numéro de carte est incomplet",unsupported:"Type de carte non supporté"}},expiry:{label:"Date d'expiration",placeholder:"MM / AA",error:{required:"OBLIGATOIRE",incomplete:"La date d'expiration de votre carte est incomplète",invalid:"La date d'expiration de votre carte n'est pas valide",expired:"Votre carte a expiré"}},cvc:{label:"Code de sécurité",placeholder:"CVC",error:{required:"OBLIGATOIRE",incomplete:"Le code de sécurité de votre carte est incomplet",invalid:"Le code CVC de votre carte n'est pas valide"}},name:{label:"Nom du titulaire de la carte",placeholder:"Nom complet",error:{required:"OBLIGATOIRE",invalid:"Veuillez indiquer votre nom complet"}},pay:{button:"Payer"},compact:{button:"Carte"}},status:{success:"Succès",error:"Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."}},hr:{card:{title:"Način plaćanja",number:{label:"Broj kartice",error:{required:"POTREBNO",invalid:"Broj vaše kartice nije valjan",incomplete:"Broj vaše kartice nije potpun",unsupported:"Nepodržana vrsta kartice"}},expiry:{label:"Datum isteka",placeholder:"MM / GG",error:{required:"POTREBNO",incomplete:"Datum isteka vaše kartice je nepotpun",invalid:"Datum isteka vaše kartice nije valjan",expired:"Kartica je istekla"}},cvc:{label:"Sigurnosni kod",placeholder:"CVC",error:{required:"POTREBNO",incomplete:"Sigurnosni kôd vaše kartice je nepotpun",invalid:"Kontrolni broj (CVC) vaše kartice nije valjan"}},name:{label:"Ime vlasnika kartice",placeholder:"Puno ime",error:{required:"POTREBNO",invalid:"Unesite svoje puno ime"}},pay:{button:"Plati"},compact:{button:"Kartica"}},status:{success:"Uspjeh",error:"Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."}},hu:{card:{title:"Fizetési mód",number:{label:"Kártya száma",error:{required:"KÖTELEZŐ",invalid:"A kártyaszáma érvénytelen",incomplete:"A kártyaszáma hiányos",unsupported:"Nem támogatott kártya típusa"}},expiry:{label:"Lejárat dátuma",placeholder:"HH / ÉÉ",error:{required:"KÖTELEZŐ",incomplete:"A kártyája lejárati dátuma hiányos",invalid:"A kártyája lejárati dátuma érvénytelen",expired:"A kártyája lejárt"}},cvc:{label:"Biztonsági kód",placeholder:"CVC",error:{required:"KÖTELEZŐ",incomplete:"A kártyája biztonsági kódja hiányos",invalid:"A kártya CVC-kódja érvénytelen"}},name:{label:"Kártyabirtokos neve",placeholder:"Teljes név",error:{required:"KÖTELEZŐ",invalid:"Adja meg a teljes nevét"}},pay:{button:"Fizetés"},compact:{button:"Hitel- vagy bankkártya"}},status:{success:"Siker",error:"Nem tudjuk hitelesíteni a fizetési módját. Kérjük, válasszon másik fizetési módot, és próbálja meg újra."}},id:{card:{title:"Metode pembayaran",number:{label:"Nomor kartu",error:{required:"WAJIB DIISI",invalid:"Nomor kartu Anda tidak valid",incomplete:"Nomor kartu Anda tidak lengkap",unsupported:"Tipe kartu tidak didukung"}},expiry:{label:"Tanggal kedaluwarsa",placeholder:"BB / TT",error:{required:"WAJIB DIISI",incomplete:"Tanggal kedaluwarsa kartu Anda tidak lengkap",invalid:"Tanggal kedaluwarsa kartu Anda tidak valid",expired:"Kartu Anda telah kedaluwarsa"}},cvc:{label:"Kode keamanan",placeholder:"CVC",error:{required:"WAJIB DIISI",incomplete:"Kode keamanan kartu Anda tidak lengkap",invalid:"CVC kartu Anda tidak valid"}},name:{label:"Nama pemegang kartu",placeholder:"Nama lengkap",error:{required:"WAJIB DIISI",invalid:"Berikan nama lengkap Anda"}},pay:{button:"Bayar"},compact:{button:"Kartu"}},status:{success:"Sukses",error:"Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."}},it:{card:{title:"Modalità di pagamento",number:{label:"Numero di carta",error:{required:"OBBLIGATORIO",invalid:"Il numero della carta non è valido",incomplete:"Il numero della carta è incompleto",unsupported:"Tipo di carta non supportato"}},expiry:{label:"Data di scadenza",placeholder:"MM / AA",error:{required:"OBBLIGATORIO",incomplete:"La data di scadenza della carta non è completa",invalid:"La data di scadenza della carta non è valida",expired:"La tua carta è scaduta"}},cvc:{label:"Codice di sicurezza",placeholder:"CVC",error:{required:"OBBLIGATORIO",incomplete:"Il codice di sicurezza della carta non è completo",invalid:"Il CVC della carta non è valido"}},name:{label:"Nome del titolare della carta",placeholder:"Nome e cognome",error:{required:"OBBLIGATORIO",invalid:"Inserisci il tuo nome completo"}},pay:{button:"Paga"},compact:{button:"Carta"}},status:{success:"Il successo",error:"Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."}},ja:{card:{title:"支払い方法",number:{label:"カード番号",error:{required:"必須",invalid:"カード番号が無効です",incomplete:"カード番号に不備があります",unsupported:"サポートされていないカードタイプ"}},expiry:{label:"有効期限",placeholder:"MM (月) / YY (年)",error:{required:"必須",incomplete:"カードの有効期限に不備があります",invalid:"カードの有効期間の満了月が無効です",expired:"カードの有効期限が切れています"}},cvc:{label:"セキュリティコード",placeholder:"セキュリティコード",error:{required:"必須",incomplete:"カードのセキュリティコードに不備があります",invalid:"カードのセキュリティコードが無効です"}},name:{label:"カード保有者の名前",placeholder:"氏名",error:{required:"必須",invalid:"氏名を入力してください"}},pay:{button:"支払う"},compact:{button:"カード"}},status:{success:"成功",error:"お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"}},ko:{card:{title:"결제 방식",number:{label:"카드 번호",error:{required:"필수",invalid:"카드 번호가 잘못되었습니다",incomplete:"카드 번호가 불완전합니다",unsupported:"지원되지 않는 카드 유형"}},expiry:{label:"만료 날짜",placeholder:"MM / YY",error:{required:"필수",incomplete:"카드의 유효기간 만료일이 불완전합니다",invalid:"카드의 유효기간 만료일이 잘못되었습니다",expired:"카드가 만료되었습니다"}},cvc:{label:"보안 코드",placeholder:"보안 코드(CVC)",error:{required:"필수",incomplete:"카드의 보안 코드가 불완전합니다",invalid:"카드의 보안 코드(CVC)가 잘못되었습니다"}},name:{label:"카드 소유자 이름",placeholder:"성명",error:{required:"필수",invalid:"성명을 입력하십시오"}},pay:{button:"결제"},compact:{button:"카드 번호"}},status:{success:"성공",error:"결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."}},lt:{card:{title:"Mokėjimo būdas",number:{label:"Kortelės numeris",error:{required:"PRIVALOMA",invalid:"Negaliojantis kortelės numeris",incomplete:"Neišsamus kortelės numeris",unsupported:"Nepalaikomas kortelės tipas"}},expiry:{label:"Galiojimo pabaigos data",placeholder:"mm / MM",error:{required:"PRIVALOMA",incomplete:"Neišsami jūsų kortelės galiojimo pabaigos data",invalid:"Netinkama jūsų kortelės galiojimo pabaigos data",expired:"Kortelė baigė galioti"}},cvc:{label:"Saugos kodas",placeholder:"CVC",error:{required:"PRIVALOMA",incomplete:"Neišsamus jūsų kortelės saugos kodas",invalid:"Jūsų kortelės CVC negalioja"}},name:{label:"Kortelės turėtojo vardas ir pavardė",placeholder:"Vardas ir pavardė",error:{required:"PRIVALOMA",invalid:"Įveskite ir vardą ir pavardę"}},pay:{button:"Mokėti"},compact:{button:"Kortelė"}},status:{success:"Sėkmė",error:"Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."}},lv:{card:{title:"Maksājumu veids",number:{label:"Kartes numurs",error:{required:"OBLIGĀTI",invalid:"Kartes numurs nav derīgs",incomplete:"Kartes numurs nav pilnīgs",unsupported:"Nepareizs kartes tips"}},expiry:{label:"Derīguma termiņš",placeholder:"MM / YY",error:{required:"OBLIGĀTI",incomplete:"Kartes derīguma termiņa datums nav pilnīgs",invalid:"Kartes derīguma termiņa beigu datums nav derīgs",expired:"Kartes derīgums ir beidzies"}},cvc:{label:"Drošības kods",placeholder:"CVC",error:{required:"OBLIGĀTI",incomplete:"Kartes drošības kods nav pilnīgs",invalid:"Kartes CVC nav derīgs"}},name:{label:"Kartes īpašnieka vārds",placeholder:"Vārds, uzvārds",error:{required:"OBLIGĀTI",invalid:"Norādiet savu vārdu un uzvārdu"}},pay:{button:"Maksāt"},compact:{button:"Karte"}},status:{success:"Panākumi",error:"Mēs nevaram pārbaudīt jūsu maksājuma metodes autentiskumu. Lūdzu, izvēlieties citu maksājumu metodi un mēģiniet vēlreiz."}},ms:{card:{title:"Kaedah pembayaran",number:{label:"Nombor kad",error:{required:"DIPERLUKAN",invalid:"Nombor kad anda tidak sah",incomplete:"Nombor kad anda tidak lengkap",unsupported:"Tipe kad tidak sah"}},expiry:{label:"Tarikh tamat tempoh",placeholder:"BB / TT",error:{required:"DIPERLUKAN",incomplete:"Tarikh tamat tempoh kad anda tidak lengkap",invalid:"Tarikh tamat tempoh kad anda tidak sah",expired:"Kad anda telah tamat tempoh"}},cvc:{label:"Kod keselamatan",placeholder:"CVC",error:{required:"DIPERLUKAN",incomplete:"Kod keselamatan kad anda tidak lengkap",invalid:"CVC kad anda tidak sah"}},name:{label:"Nama pemegang kad",placeholder:"Nama penuh",error:{required:"DIPERLUKAN",invalid:"Sila berikan nama penuh anda"}},pay:{button:"Bayar"},compact:{button:"Kad"}},status:{success:"Kejayaan",error:"Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."}},ru:{card:{title:"Метод оплаты",number:{label:"Номер карты",error:{required:"ОБЯЗАТЕЛЬНО",invalid:"Недопустимый номер карты",incomplete:"Номер карты неполон",unsupported:"Неподдерживаемый тип карты"}},expiry:{label:"Срок действия",placeholder:"ММ / ГГ",error:{required:"ОБЯЗАТЕЛЬНО",incomplete:"Срок действия карты указан не полностью",invalid:"Указанный срок действия карты недействителен",expired:"Срок действия карты истек"}},cvc:{label:"Код безопасности",placeholder:"CVC",error:{required:"ОБЯЗАТЕЛЬНО",incomplete:"Код безопасности карты введен не полностью",invalid:"Код CVC карты недействителен"}},name:{label:"Имя владельца карты",placeholder:"Имя, фамилия",error:{required:"ОБЯЗАТЕЛЬНО",invalid:"Введите свое имя и фамилию"}},pay:{button:"Оплатить"},compact:{button:"Кредитная карта"}},status:{success:"Успех",error:"Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."}},mt:{card:{title:"Metodu tal-ħlas",number:{label:"Numru tal-karta",error:{required:"MEĦTIEĠ/A",invalid:"In-numru tal-karta tiegħek mhuwiex tajjeb",incomplete:"In-numru tal-karta tiegħek mhuwiex komplut",unsupported:"Tip ta' karta mhux appoġġjat"}},expiry:{label:"Data tal-iskadenza",placeholder:"XX / SS",error:{required:"MEĦTIEĠ/A",incomplete:"Id-data tal-iskadenza tal-karta tiegħek mhix sħiħa",invalid:"Id-data tal-iskadenza tal-karta tiegħek mhix tajba",expired:"Il-karta tiegħek skadiet"}},cvc:{label:"Kodiċi tas-sigurtà",placeholder:"CVC",error:{required:"MEĦTIEĠ/A",incomplete:"Il-kodiċi tas-sigurtà tal-karta tiegħek mhux sħiħ",invalid:"Is-CVC tal-karta tiegħek mhux tajjeb"}},name:{label:"Isem id-detentur tal-karta",placeholder:"Isem u kunjom",error:{required:"MEĦTIEĠ/A",invalid:"Jekk jogħġbok ipprovdi isemek kollu"}},pay:{button:"Ħallas"},compact:{button:"Karta"}},status:{success:"Suċċess",error:"Aħna ma nistgħux jawtentikaw il-metodu tal-ħlas tiegħek. Jekk jogħġbok agħżel metodu ta' ħlas differenti u erġa' pprova."}},no:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKREVD",invalid:"Kortnummeret er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke støttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKREVD",invalid:"Utløpsdatoen er ugyldig",incomplete:"Kortets utløpsdato er ufullstendig",expired:"Kortet har utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{required:"PÅKREVD",incomplete:"Sikkerhetskoden er ufullstendig",invalid:"CVC-koden er ugyldig"}},name:{label:"Kortholders navn",placeholder:"Fullt navn",error:{required:"PÅKREVD",invalid:"Oppgi fullt navn"}},pay:{button:"Betal"},compact:{button:"Kort"}},status:{success:"Betalingen var vellykket!",error:"Vi kan ikke autentisere betalingsmetoden din. Velg en annen betalingsmetode og prøv igjen."}},nb:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKREVET",invalid:"Kortnummer er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKREVET",incomplete:"Kortets utløpsdato er ufullstendig",invalid:"Kortets utløpsdato er ugyldig",expired:"Kortet er utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{required:"PÅKREVET",incomplete:"Kortets sikkerhetskode er ufullstendig",invalid:"Kortets CVC-nummer er ugyldig"}},name:{label:"Kortinnehavers navn",placeholder:"Fullt navn",error:{required:"PÅKREVET",invalid:"Oppgi fullt navn"}},pay:{button:"Betal"},compact:{button:"Kort"}},status:{success:"Suksess",error:"Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."}},nl:{card:{title:"Betaalmethode",number:{label:"Kaartnummer",error:{required:"VEREIST",invalid:"Je kaartnummer is ongeldig",incomplete:"Je kaartnummer is onvolledig",unsupported:"Niet ondersteund"}},expiry:{label:"Vervaldatum",placeholder:"MM / JJ",error:{required:"VEREIST",incomplete:"De vervaldatum van je kaart is onvolledig",invalid:"De vervaldatum van je betaalkaart is ongeldig",expired:"Je kaart is vervallen"}},cvc:{label:"Beveiligingscode",placeholder:"CVC",error:{required:"VEREIST",incomplete:"De beveiligingscode van je betaalkaart is onvolledig",invalid:"De CVC-code van je betaalkaart is ongeldig"}},name:{label:"Naam kaarthouder",placeholder:"Volledige naam",error:{required:"VEREIST",invalid:"Geef je volledige naam op"}},pay:{button:"Betalen"},compact:{button:"Kaart"}},status:{success:"Succes",error:"We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."}},pl:{card:{title:"Metoda płatności",number:{label:"Numer karty",error:{required:"WYMAGANE",invalid:"Numer karty jest nieprawidłowy",incomplete:"Numer karty jest niepełny",unsupported:"Nieobsługiwany typ karty"}},expiry:{label:"Data ważności",placeholder:"MM / RR",error:{required:"WYMAGANE",incomplete:"Data ważności karty jest niepełna",invalid:"Termin ważności karty jest nieprawidłowy",expired:"Karta straciła ważność"}},cvc:{label:"Kod bezpieczeństwa",placeholder:"Kod CVC",error:{required:"WYMAGANE",incomplete:"Kod zabezpieczający karty jest niekompletny",invalid:"CVC karty jest nieprawidłowy"}},name:{label:"Imię i nazwisko posiadacza karty",placeholder:"Imię i nazwisko",error:{required:"WYMAGANE",invalid:"Podaj pełne imię i nazwisko"}},pay:{button:"Zapłać"},compact:{button:"Karta"}},status:{success:"Sukces",error:"Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."}},pt:{card:{title:"Forma de pagamento",number:{label:"Número do cartão",error:{required:"OBRIGATÓRIO",invalid:"O número do seu cartão é inválido",incomplete:"O número do seu cartão está incompleto",unsupported:"Tipo de cartão não suportado"}},expiry:{label:"Data de validade",placeholder:"MM / AA",error:{required:"OBRIGATÓRIO",incomplete:"A data de validade do cartão está incompleta",invalid:"A data de validade do seu cartão é inválida",expired:"O seu cartão expirou"}},cvc:{label:"Código de segurança",placeholder:"CVC",error:{required:"OBRIGATÓRIO",incomplete:"O código de segurança de seu cartão está incompleto",invalid:"O CVC do seu cartão é inválido"}},name:{label:"Nome do titular do cartão",placeholder:"Nome completo",error:{required:"OBRIGATÓRIO",invalid:"Forneça o seu nome completo"}},pay:{button:"Pagar"},compact:{button:"Cartão"}},status:{success:"Sucesso",error:"Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."}},ro:{card:{title:"Metoda de plată",number:{label:"Numărul cardului",error:{required:"NECESAR",invalid:"Numărul cardului dvs. nu este valid",incomplete:"Numărul cardului dvs. nu este complet",unsupported:"Tipul cardului nu este acceptat"}},expiry:{label:"Data de expirare",placeholder:"LL / AA",error:{required:"NECESAR",incomplete:"Data de expirare a cardului dvs. este incompletă",invalid:"Data de expirare a cardului dvs. nu este validă",expired:"Cardul dvs. a expirat"}},cvc:{label:"Codul de securitate",placeholder:"CVC",error:{required:"NECESAR",incomplete:"Codul de securitate al cardului dvs. este incomplet",invalid:"Numărul CVC al cardului dvs. nu este valid"}},name:{label:"Nume titular card",placeholder:"Nume complet",error:{required:"NECESAR",invalid:"Vă rugăm să furnizați numele dvs. complet"}},pay:{button:"Plătiți"},compact:{button:"Card"}},status:{success:"Succes",error:"Nu putem să vă autentificăm metoda de plată. Vă rugăm să alegeți o altă metodă de plată și să încercați din nou."}},ua:{card:{title:"Спосіб оплати",number:{label:"Номер картки",error:{required:"ОБОВʼЯЗКОВО",invalid:"Невірний номер картки",incomplete:"Номер картки неповний",unsupported:"Непідтримуваний тип картки"}},expiry:{label:"Термін дії",placeholder:"ММ / РР",error:{required:"ОБОВʼЯЗКОВО",invalid:"Невірний термін дії картки",incomplete:"Термін дії картки вказано не повністю",expired:"Термін дії картки минув"}},cvc:{label:"Код безпеки",placeholder:"CVC",error:{required:"ОБОВʼЯЗКОВО",incomplete:"Код безпеки картки введено не повністю",invalid:"Невірний CVC-код картки"}},name:{label:"Імʼя власника картки",placeholder:"Повне імʼя",error:{required:"ОБОВʼЯЗКОВО",invalid:"Вкажіть своє повне імʼя"}},pay:{button:"Сплатити"},compact:{button:"Картка"}},status:{success:"Платіж успішний!",error:"Не вдалося підтвердити ваш спосіб оплати. Будь ласка, оберіть інший спосіб оплати та спробуйте ще раз."}},sk:{card:{title:"Spôsob platby",number:{label:"Číslo karty",error:{required:"POŽADOVANÉ",invalid:"Číslo vašej karty je neplatné",incomplete:"Číslo vašej karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Dátum ukončenia platnosti",placeholder:"MM / RR",error:{required:"POŽADOVANÉ",incomplete:"Dátum vypršania platnosti vašej karty je neúplný",invalid:"Dátum vypršania platnosti vašej karty je neplatný",expired:"Platnosť vašej karty vypršala"}},cvc:{label:"Bezpečnostný kód",placeholder:"CVC",error:{required:"POŽADOVANÉ",incomplete:"Bezpečnostný kód vašej karty je neúplný",invalid:"Číslo CVC vašej karty je neplatné"}},name:{label:"Držiteľ karty",placeholder:"Celé meno",error:{required:"POŽADOVANÉ",invalid:"Zadajte vaše celé meno"}},pay:{button:"Zaplatiť"},compact:{button:"Karta"}},status:{success:"Úspech",error:"Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."}},sl:{card:{title:"Način plačila",number:{label:"Številka kartice",error:{required:"OBVEZNO",invalid:"Številka vaše kartice ni veljavna",incomplete:"Številka vaše kartice ni popolna",unsupported:"Nepodprta vrsta kartice"}},expiry:{label:"Datum poteka",placeholder:"MM / LL",error:{required:"OBVEZNO",incomplete:"Datum poteka vaše kartice ni popoln",invalid:"Datum poteka vaše kartice ni veljaven",expired:"Vaša kartica je potekla"}},cvc:{label:"Varnostna koda",placeholder:"CVC",error:{required:"OBVEZNO",incomplete:"Varnostna koda vaše kartice ni popolna",invalid:"Koda CVC vaše kartice ni veljavna"}},name:{label:"Ime imetnika kartice",placeholder:"Polno ime",error:{required:"OBVEZNO",invalid:"Vnesite svoje polno ime"}},pay:{button:"Plačaj"},compact:{button:"Kartica"}},status:{success:"Uspeh",error:"Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."}},sv:{card:{title:"Betalningsmetod",number:{label:"Kortnummer",error:{required:"OBLIGATORISKT",invalid:"Ditt kortnummer är ogiltigt",incomplete:"Kortnumret är ofullständigt",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Sista giltighetsdag",placeholder:"MM / ÅÅ",error:{required:"OBLIGATORISKT",incomplete:"Kortets utgångsdatum är ofullständigt",invalid:"Kortets utgångsdatum är ogiltigt",expired:"Ditt kort har gått ut"}},cvc:{label:"Säkerhetskod",placeholder:"CVC",error:{required:"OBLIGATORISKT",incomplete:"Kortets säkerhetskod är ofullständig",invalid:"Kortets CVC-kod är ogiltig"}},name:{label:"Kortinnehavarens namn",placeholder:"Fullständigt namn",error:{required:"OBLIGATORISKT",invalid:"Ange ditt fullständiga namn"}},pay:{button:"Betala"},compact:{button:"Kort"}},status:{success:"Framgång",error:"Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."}},th:{card:{title:"วิธีการชำระเงิน",number:{label:"หมายเลขบัตร",error:{required:"ต้องป้อนข้อมูล",invalid:"หมายเลขบัตรของคุณไม่ถูกต้อง",incomplete:"หมายเลขบัตรของคุณไม่ครบถ้วน",unsupported:"ประเภทบัตรของคุณไม่ถูกต้อง"}},expiry:{label:"วันหมดอายุ",placeholder:"ดด / ปป",error:{required:"ต้องป้อนข้อมูล",incomplete:"วันที่หมดอายุของบัตรไม่ครบถ้วน",invalid:"วันที่หมดอายุของบัตรไม่ถูกต้อง",expired:"บัตรของคุณหมดอายุแล้ว"}},cvc:{label:"รหัสความปลอดภัย",placeholder:"CVC",error:{required:"ต้องป้อนข้อมูล",incomplete:"รหัสความปลอดภัยของบัตรไม่ครบถ้วน",invalid:"CVC ของบัตรไม่ถูกต้อง"}},name:{label:"ชื่อเจ้าของบัตร",placeholder:"ชื่อ-นามสกุล",error:{required:"ต้องป้อนข้อมูล",invalid:"โปรดป้อนชื่อ-นามสกุล"}},pay:{button:"ชำระเงิน"},compact:{button:"การ์ด"}},status:{success:"ความสำเร็จ",error:"เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"}},tr:{card:{title:"Ödeme yöntemi",number:{label:"Kart numarası",error:{required:"GEREKLI",invalid:"Kart numaranız geçersiz",incomplete:"Kart numaranız eksik",unsupported:"Desteklenmeyen kart türü"}},expiry:{label:"Son Kullanma Tarihi",placeholder:"AA / YY",error:{required:"GEREKLI",incomplete:"Kartınızın son kullanma tarihi eksik",invalid:"Kartınızın son kullanım tarihi geçersiz",expired:"Kartınızın süresi dolmuş"}},cvc:{label:"Güvenlik kodu",placeholder:"CVC",error:{required:"GEREKLI",incomplete:"Kartınızın güvenlik kodu eksik",invalid:"Kartınızın CVC'si geçersiz"}},name:{label:"Kart sahibinin adı",placeholder:"Ad ve soyadı",error:{required:"GEREKLI",invalid:"Lütfen tam adınızı girin"}},pay:{button:"Öde"},compact:{button:"Kart"}},status:{success:"Başarı",error:"Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."}},vi:{card:{title:"Phương thức thanh toán",number:{label:"Số thẻ",error:{required:"BẮT BUỘC",invalid:"Số thẻ của quý vị không hợp lệ",incomplete:"Số thẻ của quý vị không đầy đủ",unsupported:"Không hỗ trợ loại thẻ"}},expiry:{label:"Ngày hết hạn",placeholder:"MM / YY",error:{required:"BẮT BUỘC",incomplete:"Ngày hết hạn trên thẻ không hợp lệ",invalid:"Ngày hết hạn của thẻ không hợp lệ",expired:"Thẻ của quý vị đã hết hạn"}},cvc:{label:"Mã bảo mật",placeholder:"CVC",error:{required:"BẮT BUỘC",incomplete:"Mã bảo mật của thẻ không đầy đủ",invalid:"CVC thẻ của bạn không hợp lệ"}},name:{label:"Tên chủ thẻ",placeholder:"Họ và tên",error:{required:"BẮT BUỘC",invalid:"Vui lòng cung cấp tên đầy đủ của bạn"}},pay:{button:"Thanh toán"},compact:{button:"Thẻ"}},status:{success:"Thành công",error:"Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại."}},zh:{card:{title:"支付方式",number:{label:"卡号",error:{required:"必填",invalid:"您的卡号无效",incomplete:"您的银行卡卡号不完整",unsupported:"不支持的卡类型"}},expiry:{label:"有效期",placeholder:"月份 / 年份",error:{required:"必填",incomplete:"您银行卡的有效期不完整",invalid:"您银行卡的有效期无效",expired:"您的银行卡已过期"}},cvc:{label:"安全代码",placeholder:"CVC",error:{required:"必填",incomplete:"您银行卡的安全码不完整",invalid:"您银行卡的 CVC 无效"}},name:{label:"持卡人姓名",placeholder:"全名",error:{required:"必填",invalid:"请提供您的全名"}},pay:{button:"支付"},compact:{button:"卡片"}},status:{success:"成功",error:"我们无法验证您的付款方式。请选择其他付款方式并重试。"}}},yr=()=>{const r=navigator==null?void 0:navigator.language.split("-")[0];return gr[r]||gr.en},_i=(r,t={})=>{var n,a,i,s,o,c,l,d,u,h,p,m,f,v,y,A,I,L,C,T,x,k,U,H,W,S,F,q,te,M,$,K,g,_,R,j,E,O,w,P,V,N,G,ee,de,D,ae,we,xi,Oi,Ni,Li,Pi,ki,Ri,Mi,Si,Di,Vi,Fi;if(!r)return yr();const e=gr[r]||yr();return{card:{title:((n=t==null?void 0:t.card)==null?void 0:n.title)||e.card.title,number:{label:((i=(a=t==null?void 0:t.card)==null?void 0:a.number)==null?void 0:i.label)||e.card.number.label,error:{required:((c=(o=(s=t==null?void 0:t.card)==null?void 0:s.number)==null?void 0:o.error)==null?void 0:c.required)||e.card.number.error.required,invalid:((u=(d=(l=t==null?void 0:t.card)==null?void 0:l.number)==null?void 0:d.error)==null?void 0:u.invalid)||e.card.number.error.invalid,incomplete:((m=(p=(h=t==null?void 0:t.card)==null?void 0:h.number)==null?void 0:p.error)==null?void 0:m.incomplete)||e.card.number.error.incomplete,unsupported:((y=(v=(f=t==null?void 0:t.card)==null?void 0:f.number)==null?void 0:v.error)==null?void 0:y.unsupported)||e.card.number.error.unsupported}},expiry:{label:((I=(A=t==null?void 0:t.card)==null?void 0:A.expiry)==null?void 0:I.label)||e.card.expiry.label,placeholder:((C=(L=t==null?void 0:t.card)==null?void 0:L.expiry)==null?void 0:C.placeholder)||e.card.expiry.placeholder,error:{required:((k=(x=(T=t==null?void 0:t.card)==null?void 0:T.expiry)==null?void 0:x.error)==null?void 0:k.required)||e.card.expiry.error.required,invalid:((W=(H=(U=t==null?void 0:t.card)==null?void 0:U.expiry)==null?void 0:H.error)==null?void 0:W.invalid)||e.card.expiry.error.invalid,incomplete:((q=(F=(S=t==null?void 0:t.card)==null?void 0:S.expiry)==null?void 0:F.error)==null?void 0:q.incomplete)||e.card.expiry.error.incomplete,expired:(($=(M=(te=t==null?void 0:t.card)==null?void 0:te.expiry)==null?void 0:M.error)==null?void 0:$.expired)||e.card.expiry.error.expired}},cvc:{label:((g=(K=t==null?void 0:t.card)==null?void 0:K.cvc)==null?void 0:g.label)||e.card.cvc.label,placeholder:((R=(_=t==null?void 0:t.card)==null?void 0:_.cvc)==null?void 0:R.placeholder)||e.card.cvc.placeholder,error:{required:((O=(E=(j=t==null?void 0:t.card)==null?void 0:j.cvc)==null?void 0:E.error)==null?void 0:O.required)||e.card.cvc.error.required,incomplete:((V=(P=(w=t==null?void 0:t.card)==null?void 0:w.cvc)==null?void 0:P.error)==null?void 0:V.incomplete)||e.card.cvc.error.incomplete,invalid:((ee=(G=(N=t==null?void 0:t.card)==null?void 0:N.cvc)==null?void 0:G.error)==null?void 0:ee.invalid)||e.card.cvc.error.invalid}},name:{label:((D=(de=t==null?void 0:t.card)==null?void 0:de.name)==null?void 0:D.label)||e.card.name.label,placeholder:((we=(ae=t==null?void 0:t.card)==null?void 0:ae.name)==null?void 0:we.placeholder)||e.card.name.placeholder,error:{required:((Ni=(Oi=(xi=t==null?void 0:t.card)==null?void 0:xi.name)==null?void 0:Oi.error)==null?void 0:Ni.required)||e.card.name.error.required,invalid:((ki=(Pi=(Li=t==null?void 0:t.card)==null?void 0:Li.name)==null?void 0:Pi.error)==null?void 0:ki.invalid)||e.card.name.error.invalid}},pay:{button:((Mi=(Ri=t==null?void 0:t.card)==null?void 0:Ri.pay)==null?void 0:Mi.button)||e.card.pay.button},compact:{button:((Di=(Si=t==null?void 0:t.card)==null?void 0:Si.compact)==null?void 0:Di.button)||e.card.compact.button}},status:{success:((Vi=t==null?void 0:t.status)==null?void 0:Vi.success)||e.status.success,error:((Fi=t==null?void 0:t.status)==null?void 0:Fi.error)||e.status.error}}};class ic extends At{constructor(){super({messages:yr(),locale:(navigator==null?void 0:navigator.language.split("-")[0])||"en"})}setMessages(t){const e=this.locale(),n=_i(e,t);this.setState({locale:e,messages:n,overrides:t})}setLocale(t){const e=this.overrides(),n=_i(t,e);this.setState({locale:t,messages:n,overrides:e})}overrides(){const{overrides:t}=this.getState();return t}messages(){const{messages:t}=this.getState();return t}locale(){const{locale:t}=this.getState();return t}dir(){return this.locale()==="ar"?"rtl":"ltr"}}/*!
|
|
334
334
|
* paypal-js v8.2.0 (2025-01-23T17:26:53.747Z)
|
|
335
335
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
336
336
|
*
|
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
346
346
|
* See the License for the specific language governing permissions and
|
|
347
347
|
* limitations under the License.
|
|
348
|
-
*/function ac(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var
|
|
348
|
+
*/function ac(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(r);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(e[n[a]]=r[n[a]]);return e}typeof SuppressedError=="function"&&SuppressedError;function sc(r,t){var e=document.querySelector('script[src="'.concat(r,'"]'));if(e===null)return null;var n=Ei(r,t),a=e.cloneNode();if(delete a.dataset.uidAuto,Object.keys(a.dataset).length!==Object.keys(n.dataset).length)return null;var i=!0;return Object.keys(a.dataset).forEach(function(s){a.dataset[s]!==n.dataset[s]&&(i=!1)}),i?e:null}function oc(r){var t=r.url,e=r.attributes,n=r.onSuccess,a=r.onError,i=Ei(t,e);i.onerror=a,i.onload=n,document.head.insertBefore(i,document.head.firstElementChild)}function lc(r){var t=r.sdkBaseUrl,e=r.environment,n=ac(r,["sdkBaseUrl","environment"]),a=t||uc(e),i=n,s=Object.keys(i).filter(function(l){return typeof i[l]!="undefined"&&i[l]!==null&&i[l]!==""}).reduce(function(l,d){var u=i[d].toString();return d=cc(d),d.substring(0,4)==="data"||d==="crossorigin"?l.attributes[d]=u:l.queryParams[d]=u,l},{queryParams:{},attributes:{}}),o=s.queryParams,c=s.attributes;return o["merchant-id"]&&o["merchant-id"].indexOf(",")!==-1&&(c["data-merchant-id"]=o["merchant-id"],o["merchant-id"]="*"),{url:"".concat(a,"?").concat(dc(o)),attributes:c}}function cc(r){var t=function(e,n){return(n?"-":"")+e.toLowerCase()};return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g,t)}function dc(r){var t="";return Object.keys(r).forEach(function(e){t.length!==0&&(t+="&"),t+=e+"="+r[e]}),t}function uc(r){return r==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}function Ei(r,t){t===void 0&&(t={});var e=document.createElement("script");return e.src=r,Object.keys(t).forEach(function(n){e.setAttribute(n,t[n]),n==="data-csp-nonce"&&e.setAttribute("nonce",t["data-csp-nonce"])}),e}function pc(r,t){if(t===void 0&&(t=Promise),wi(r,t),typeof document=="undefined")return t.resolve(null);var e=lc(r),n=e.url,a=e.attributes,i=a["data-namespace"]||"paypal",s=Ci(i);return a["data-js-sdk-library"]||(a["data-js-sdk-library"]="paypal-js"),sc(n,a)&&s?t.resolve(s):hc({url:n,attributes:a},t).then(function(){var o=Ci(i);if(o)return o;throw new Error("The window.".concat(i," global variable is not available."))})}function hc(r,t){t===void 0&&(t=Promise),wi(r,t);var e=r.url,n=r.attributes;if(typeof e!="string"||e.length===0)throw new Error("Invalid url.");if(typeof n!="undefined"&&typeof n!="object")throw new Error("Expected attributes to be an object.");return new t(function(a,i){if(typeof document=="undefined")return a();oc({url:e,attributes:n,onSuccess:function(){return a()},onError:function(){var s=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return i(s)}})})}function Ci(r){return window[r]}function wi(r,t){if(typeof r!="object"||r===null)throw new Error("Expected an options object.");var e=r.environment;if(e&&e!=="production"&&e!=="sandbox")throw new Error('The `environment` option must be either "production" or "sandbox".');if(typeof t!="undefined"&&typeof t!="function")throw new Error("Expected PromisePonyfill to be a function.")}const mc={layout:"vertical",tagline:!1,height:40,borderRadius:12};class fc{constructor(){b(this,"paypal",null)}init(t){return z(this,null,function*(){try{this.paypal=yield pc(t)}catch(e){console.error("failed to load the PayPal JS SDK script",e)}})}render(t,e){return z(this,null,function*(){var n,a;if(this.paypal){const i=B(B({},mc),(e==null?void 0:e.style)||{});yield(a=(n=this.paypal).Buttons)==null?void 0:a.call(n,X(B({fundingSource:"paypal"},e),{style:i})).render(t)}})}}function Le(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var br={exports:{}},Ai;function vc(){return Ai||(Ai=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,a,i){function s(l,d){if(!a[l]){if(!n[l]){var u=typeof Le=="function"&&Le;if(!d&&u)return u(l,!0);if(o)return o(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[l]={exports:{}};n[l][0].call(p.exports,function(m){var f=n[l][1][m];return s(f||m)},p,p.exports,e,n,a,i)}return a[l].exports}for(var o=typeof Le=="function"&&Le,c=0;c<i.length;c++)s(i[c]);return s}return e}()({1:[function(e,n,a){var i={};function s(o){var c,l=JSON.stringify(o);if(!o.forceScriptReload&&(c=i[l],c))return c;var d=document.createElement("script"),u=o.dataAttributes||{},h=o.container||document.head;return d.src=o.src,d.id=o.id||"",d.async=!0,o.type&&d.setAttribute("type","".concat(o.type)),o.crossorigin&&d.setAttribute("crossorigin","".concat(o.crossorigin)),o.integrity&&d.setAttribute("integrity","".concat(o.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),c=new Promise(function(p,m){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){m(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){m(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),i[l]=c,c}s.clearCache=function(){i={}},n.exports=s},{}],2:[function(e,n,a){n.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,n,a){function i(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var o=Math.random()*16|0,c=s==="x"?o:o&3|8;return c.toString(16)})}n.exports=i},{}],4:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){return function(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];setTimeout(function(){try{s.apply(void 0,o)}catch(l){console.log("Error in callback function"),console.log(l)}},1)}}a.deferred=i},{}],5:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){var o=!1;return function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];o||(o=!0,s.apply(void 0,c))}}a.once=i},{}],6:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s,o){if(!o)return s;s.then(function(c){return o(null,c)}).catch(function(c){return o(c)})}a.promiseOrCallback=i},{}],7:[function(e,n,a){var i=e("./lib/deferred"),s=e("./lib/once"),o=e("./lib/promise-or-callback");function c(l){return function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];var h,p=d[d.length-1];return typeof p=="function"&&(h=d.pop(),h=s.once(i.deferred(h))),o.promiseOrCallback(l.apply(this,d),h)}}c.wrapPrototype=function(l,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(l.prototype).filter(function(m){var f,v=m!=="constructor"&&typeof l.prototype[m]=="function",y=u.indexOf(m)===-1;return h?f=!0:f=m.charAt(0)!=="_",v&&f&&y});return p.forEach(function(m){var f=l.prototype[m];l.prototype[m]=c(f)}),l},n.exports=c},{"./lib/deferred":4,"./lib/once":5,"./lib/promise-or-callback":6}],8:[function(e,n,a){(function(i,s){typeof a=="object"&&typeof n!="undefined"?s(a):(i=typeof globalThis!="undefined"?globalThis:i||self,s(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
|
|
349
349
|
Copyright (c) Microsoft Corporation.
|
|
350
350
|
|
|
351
351
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
359
359
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
360
360
|
PERFORMANCE OF THIS SOFTWARE.
|
|
361
|
-
***************************************************************************** */function s(E,O,w,k){function V(N){return N instanceof w?N:new w(function(G){G(N)})}return new(w||(w=Promise))(function(N,G){function J(ae){try{D(k.next(ae))}catch(Ae){G(Ae)}}function de(ae){try{D(k.throw(ae))}catch(Ae){G(Ae)}}function D(ae){ae.done?N(ae.value):V(ae.value).then(J,de)}D((k=k.apply(E,[])).next())})}function o(E,O){var w={label:0,sent:function(){if(N[0]&1)throw N[1];return N[1]},trys:[],ops:[]},k,V,N,G;return G={next:J(0),throw:J(1),return:J(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function J(D){return function(ae){return de([D,ae])}}function de(D){if(k)throw new TypeError("Generator is already executing.");for(;w;)try{if(k=1,V&&(N=D[0]&2?V.return:D[0]?V.throw||((N=V.return)&&N.call(V),0):V.next)&&!(N=N.call(V,D[1])).done)return N;switch(V=0,N&&(D=[D[0]&2,N.value]),D[0]){case 0:case 1:N=D;break;case 4:return w.label++,{value:D[1],done:!1};case 5:w.label++,V=D[1],D=[0];continue;case 7:D=w.ops.pop(),w.trys.pop();continue;default:if(N=w.trys,!(N=N.length>0&&N[N.length-1])&&(D[0]===6||D[0]===2)){w=0;continue}if(D[0]===3&&(!N||D[1]>N[0]&&D[1]<N[3])){w.label=D[1];break}if(D[0]===6&&w.label<N[1]){w.label=N[1],N=D;break}if(N&&w.label<N[2]){w.label=N[2],w.ops.push(D);break}N[2]&&w.ops.pop(),w.trys.pop();continue}D=O.call(E,w)}catch(ae){D=[6,ae],V=0}finally{k=N=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}}var l={},c={};function d(E){var O,w=JSON.stringify(E);if(!E.forceScriptReload&&(O=c[w],O))return O;var k=document.createElement("script"),V=E.dataAttributes||{},N=E.container||document.head;return k.src=E.src,k.id=E.id||"",k.async=!0,E.type&&k.setAttribute("type","".concat(E.type)),E.crossorigin&&k.setAttribute("crossorigin","".concat(E.crossorigin)),Object.keys(V).forEach(function(G){k.setAttribute("data-".concat(G),"".concat(V[G]))}),O=new Promise(function(G,J){k.addEventListener("load",function(){G(k)}),k.addEventListener("error",function(){J(new Error("".concat(E.src," failed to load.")))}),k.addEventListener("abort",function(){J(new Error("".concat(E.src," has aborted.")))}),N.appendChild(k)}),c[w]=O,O}d.clearCache=function(){c={}};var u=d,h=function(O){var w=document.querySelector('link[href="'.concat(O.href,'"]'));if(w)return Promise.resolve(w);w=document.createElement("link");var k=O.container||document.head;return w.setAttribute("rel","stylesheet"),w.setAttribute("type","text/css"),w.setAttribute("href",O.href),w.setAttribute("id",O.id),k.firstChild?k.insertBefore(w,k.firstChild):k.appendChild(w),Promise.resolve(w)};Object.defineProperty(l,"__esModule",{value:!0}),l.loadStylesheet=m=l.loadScript=void 0;var p=u,m=l.loadScript=p,f=h;l.loadStylesheet=f;var v="https://www.paypalobjects.com",b={minified:"axo.min",unminified:"axo"},A="fastlane",T="connect-boba",L="".concat(T,"/locales/"),C={AXO_ASSET_NAME:b,AXO_ASSET_PATH:T,LOCALE_PATH:L,CDNX_PROD:v},I={BT:"BT",PPCP:"PPCP"};function x(){return typeof window.define=="function"&&!!window.define.amd}function P(){return x()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function U(E,O,w){var k,V;return w===void 0&&(w=!0),s(this,void 0,void 0,function(){var N,G;return o(this,function(J){if(N=W(),N&&N[E.module]){if(O&&((k=N[E.module])===null||k===void 0?void 0:k.VERSION)!==O)throw G=(V=N[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(G," cannot load version ").concat(O));return[2,!0]}if(!O)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,H(E,O,w)]})})}function H(E,O,w){if(w===void 0&&(w=!0),x()){var k=w?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(N,G){window.require([k],N,G)})}var V=w?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(O),src:"https://js.braintreegateway.com/web/".concat(O,"/js/").concat(V)})}function W(){return window==null?void 0:window.braintree}var S,F,q={Client:"client",HostedCardFields:"hostedFields"},ee="braintree",M=(S={},S[q.Client]="client",S[q.HostedCardFields]="hosted-fields",S),$=(F={},F[q.Client]={id:"client",module:q.Client,amdModule:{unminified:"".concat(ee,"/").concat(M[q.Client]),minified:"".concat(ee,"/").concat(M[q.Client],".min")},script:{unminified:"".concat(M[q.Client],".js"),minified:"".concat(M[q.Client],".min.js")}},F[q.HostedCardFields]={id:"hcf",module:q.HostedCardFields,amdModule:{unminified:"".concat(ee,"/").concat(M[q.HostedCardFields]),minified:"".concat(ee,"/").concat(M[q.HostedCardFields],".min")},script:{unminified:"".concat(M[q.HostedCardFields],".js"),minified:"".concat(M[q.HostedCardFields],".min.js")}},F);function K(E){return s(this,void 0,void 0,function(){var O,w,k,V;return o(this,function(N){switch(N.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),O=E.btSdkVersion,w=E.minified,k=R(E),V=B(E),E.platform!==I.BT?[3,2]:[4,Promise.all([U($.hostedFields,O,w),g(k,w)])];case 1:return N.sent(),[3,5];case 2:return E.platform!==I.PPCP?[3,4]:[4,Promise.all([U($.client,O,w),U($.hostedFields,O,w),g(k,w)])];case 3:return N.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,O){var w;if(O===void 0&&(O=!0),x()){P()&&requirejs.config({paths:(w={},w[A]=E,w)});var k="".concat(A,"/").concat(O?C.AXO_ASSET_NAME.minified:C.AXO_ASSET_NAME.unminified);return new Promise(function(V,N){window.require([k],V,N)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var O=E.assetUrl,w=E.bundleId;return w?"https://cdn-".concat(w,".static.engineering.dev.paypalinc.com/").concat(O):"".concat(C.CDNX_PROD,"/").concat(O)}function R(E){var O,w=(E==null?void 0:E.minified)!==!1?C.AXO_ASSET_NAME.minified:C.AXO_ASSET_NAME.unminified,k=x()?C.AXO_ASSET_PATH:"".concat(C.AXO_ASSET_PATH,"/").concat(w,".js");return _({assetUrl:k,bundleId:(O=E==null?void 0:E.metadata)===null||O===void 0?void 0:O.bundleIdOverride})}function B(E){var O;return _({assetUrl:C.LOCALE_PATH,bundleId:(O=E==null?void 0:E.metadata)===null||O===void 0?void 0:O.bundleIdOverride})}a.constants=C,a.loadAxo=K})},{}],9:[function(e,n,i){var a=e("./constants").BRAINTREE_VERSION,s=e("./request/graphql"),o=e("./request"),l=e("../lib/is-verified-domain"),c=e("../lib/braintree-error"),d=e("../lib/convert-to-braintree-error"),u=e("./get-configuration").getConfiguration,h=e("../lib/create-authorization-data"),p=e("../lib/add-metadata"),m=e("@braintree/wrap-promise"),f=e("../lib/once"),v=e("../lib/deferred"),b=e("../lib/assign").assign,A=e("../lib/analytics"),T=e("./errors"),L=e("../lib/constants").VERSION,C=e("../lib/constants").GRAPHQL_URLS,I=e("../lib/methods"),x=e("../lib/convert-methods-to-error"),P=e("../lib/assets"),U=e("../lib/constants").FRAUDNET_FNCLS,H=e("../lib/constants").FRAUDNET_SOURCE,W=e("../lib/constants").FRAUDNET_URL,S={};function F(M){var $,K;if(M=M||{},$=JSON.stringify(M),K=M.gatewayConfiguration,!K)throw new c(T.CLIENT_MISSING_GATEWAY_CONFIGURATION);if(["assetsUrl","clientApiUrl","configUrl"].forEach(function(g){if(g in K&&!l(K[g]))throw new c({type:T.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:T.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:g+" property is on an invalid domain."})}),this.getConfiguration=function(){return JSON.parse($)},this._request=o,this._configuration=this.getConfiguration(),this._clientApiBaseUrl=K.clientApiUrl+"/v1/",K.graphQL){if(!l(K.graphQL.url))throw new c({type:T.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:T.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:"graphQL.url property is on an invalid domain."});this._graphQL=new s({graphQL:K.graphQL})}}F.initialize=function(M){var $,K,g=S[M.authorization];if(g)return A.sendEvent(g,"custom.client.load.cached"),g;try{K=h(M.authorization)}catch(_){return Promise.reject(new c(T.CLIENT_INVALID_AUTHORIZATION))}return g=u(K,M.sessionId).then(function(_){return M.debug&&(_.isDebug=!0),_.authorization=M.authorization,$=new F(_),$}),S[M.authorization]=g,A.sendEvent(g,"custom.client.load.initialized"),g.then(function(_){return A.sendEvent($,"custom.client.load.succeeded"),_}).catch(function(_){return delete S[M.authorization],Promise.reject(_)})},F.clearCache=function(){S={}},F.prototype._findOrCreateFraudnetJSON=function(M){var $=document.querySelector('script[fncls="'+U+'"]'),K,g,_,R;$||($=document.body.appendChild(document.createElement("script")),$.type="application/json",$.setAttribute("fncls",U)),K=this.getConfiguration(),g={rda_tenant:"bt_card",mid:K.gatewayConfiguration.merchantId},_=K.authorizationFingerprint,_&&_.split("&").forEach(function(B){var E=B.split("=");E[0]==="customer_id"&&E.length>1&&(g.cid=E[1])}),R={f:M.substr(0,32),fp:g,bu:!1,s:H},$.text=JSON.stringify(R)},F.prototype.request=function(M,$){var K=this,g=new Promise(function(_,R){var B,E,O,w,k=!!(M.endpoint==="payment_methods/credit_cards"&&K.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);if(M.api!=="graphQLApi"&&(M.method?M.endpoint||(B="options.endpoint"):B="options.method"),B)throw new c({type:T.CLIENT_OPTION_REQUIRED.type,code:T.CLIENT_OPTION_REQUIRED.code,message:B+" is required when making a request."});if("api"in M?E=M.api:E="clientApi",w={method:M.method,graphQL:K._graphQL,timeout:M.timeout,metadata:K._configuration.analyticsMetadata},E==="clientApi")O=K._clientApiBaseUrl,w.data=p.addMetadata(K._configuration,M.data);else if(E==="graphQLApi")O=C[K._configuration.gatewayConfiguration.environment],M.endpoint="",w.method="post",w.data=b({clientSdkMetadata:{platform:K._configuration.analyticsMetadata.platform,source:K._configuration.analyticsMetadata.source,integration:K._configuration.analyticsMetadata.integration,sessionId:K._configuration.analyticsMetadata.sessionId,version:L}},M.data),w.headers=ee(K._configuration);else throw new c({type:T.CLIENT_OPTION_INVALID.type,code:T.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});w.url=O+M.endpoint,w.sendAnalyticsEvent=function(V){A.sendEvent(K,V)},K._request(w,function(V,N,G){var J,de;if(de=q(G,V),de){R(de);return}if(E==="graphQLApi"&&N.errors){R(d(N.errors,{type:T.CLIENT_GRAPHQL_REQUEST_ERROR.type,code:T.CLIENT_GRAPHQL_REQUEST_ERROR.code,message:T.CLIENT_GRAPHQL_REQUEST_ERROR.message}));return}J=b({_httpStatus:G},N),k&&J.creditCards&&J.creditCards.length>0&&(K._findOrCreateFraudnetJSON(J.creditCards[0].nonce),P.loadScript({src:W,forceScriptReload:!0})),_(J)})});if(typeof $=="function"){$=f(v($)),g.then(function(_){$(null,_,_._httpStatus)}).catch(function(_){var R=_&&_.details&&_.details.httpStatus;$(_,null,R)});return}return g};function q(M,$){var K;if(M===-1?K=new c(T.CLIENT_REQUEST_TIMEOUT):M===401?K=new c(T.CLIENT_AUTHORIZATION_INVALID):M===403?K=new c(T.CLIENT_AUTHORIZATION_INSUFFICIENT):M===429?K=new c(T.CLIENT_RATE_LIMITED):M>=500?K=new c(T.CLIENT_GATEWAY_NETWORK):(M<200||M>=400)&&(K=d($,{type:T.CLIENT_REQUEST_ERROR.type,code:T.CLIENT_REQUEST_ERROR.code,message:T.CLIENT_REQUEST_ERROR.message})),K)return K.details=K.details||{},K.details.httpStatus=M,K}F.prototype.toJSON=function(){return this.getConfiguration()},F.prototype.getVersion=function(){return L},F.prototype.teardown=m(function(){var M=this;return delete S[M.getConfiguration().authorization],x(M,I(F.prototype)),Promise.resolve()});function ee(M){var $=M.authorizationFingerprint||M.authorization;return{Authorization:"Bearer "+$,"Braintree-Version":a}}n.exports=F},{"../lib/add-metadata":29,"../lib/analytics":30,"../lib/assets":31,"../lib/assign":32,"../lib/braintree-error":33,"../lib/constants":34,"../lib/convert-methods-to-error":35,"../lib/convert-to-braintree-error":36,"../lib/create-authorization-data":37,"../lib/deferred":38,"../lib/is-verified-domain":43,"../lib/methods":45,"../lib/once":46,"./constants":10,"./errors":11,"./get-configuration":12,"./request":25,"./request/graphql":23,"@braintree/wrap-promise":7}],10:[function(e,n,i){n.exports={BRAINTREE_VERSION:"2018-05-10"}},{}],11:[function(e,n,i){var a=e("../lib/braintree-error");n.exports={CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN:{type:a.types.MERCHANT,code:"CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN"},CLIENT_OPTION_REQUIRED:{type:a.types.MERCHANT,code:"CLIENT_OPTION_REQUIRED"},CLIENT_OPTION_INVALID:{type:a.types.MERCHANT,code:"CLIENT_OPTION_INVALID"},CLIENT_MISSING_GATEWAY_CONFIGURATION:{type:a.types.INTERNAL,code:"CLIENT_MISSING_GATEWAY_CONFIGURATION",message:"Missing gatewayConfiguration."},CLIENT_INVALID_AUTHORIZATION:{type:a.types.MERCHANT,code:"CLIENT_INVALID_AUTHORIZATION",message:"Authorization is invalid. Make sure your client token or tokenization key is valid."},CLIENT_GATEWAY_NETWORK:{type:a.types.NETWORK,code:"CLIENT_GATEWAY_NETWORK",message:"Cannot contact the gateway at this time."},CLIENT_REQUEST_TIMEOUT:{type:a.types.NETWORK,code:"CLIENT_REQUEST_TIMEOUT",message:"Request timed out waiting for a reply."},CLIENT_REQUEST_ERROR:{type:a.types.NETWORK,code:"CLIENT_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_GRAPHQL_REQUEST_ERROR:{type:a.types.NETWORK,code:"CLIENT_GRAPHQL_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_RATE_LIMITED:{type:a.types.MERCHANT,code:"CLIENT_RATE_LIMITED",message:"You are being rate-limited; please try again in a few minutes."},CLIENT_AUTHORIZATION_INSUFFICIENT:{type:a.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INSUFFICIENT",message:"The authorization used has insufficient privileges."},CLIENT_AUTHORIZATION_INVALID:{type:a.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INVALID",message:"Either the client token has expired and a new one should be generated or the tokenization key has been deactivated or deleted."}}},{"../lib/braintree-error":33}],12:[function(e,n,i){var a=e("../lib/braintree-error"),s=e("@braintree/wrap-promise"),o=e("./request"),l=e("@braintree/uuid"),c=e("../lib/constants"),d=e("./errors"),u=e("./request/graphql"),h=e("../lib/constants").GRAPHQL_URLS,p=e("../lib/is-date-string-before-or-on"),m=e("./constants").BRAINTREE_VERSION;function f(v,b){return new Promise(function(A,T){var L,C,I,x,P=b||l(),U={merchantAppId:window.location.host,platform:c.PLATFORM,sdkVersion:c.VERSION,source:c.SOURCE,integration:c.INTEGRATION,integrationType:c.INTEGRATION,sessionId:P};C=v.attrs,I=v.configUrl,C._meta=U,C.braintreeLibraryVersion=c.BRAINTREE_LIBRARY_VERSION,C.configVersion="3",x={url:I,method:"GET",data:C},C.authorizationFingerprint&&v.graphQL?(p(v.graphQL.date,m)&&(x.graphQL=new u({graphQL:{url:v.graphQL.url,features:["configuration"]}})),x.metadata=U):C.tokenizationKey&&(x.graphQL=new u({graphQL:{url:h[v.environment],features:["configuration"]}}),x.metadata=U),o(x,function(H,W,S){var F;if(H){S===403?F=d.CLIENT_AUTHORIZATION_INSUFFICIENT:S===401?F=d.CLIENT_AUTHORIZATION_INVALID:F=d.CLIENT_GATEWAY_NETWORK,T(new a({type:F.type,code:F.code,message:F.message,details:{originalError:H}}));return}L={authorizationType:C.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:C.authorizationFingerprint,analyticsMetadata:U,gatewayConfiguration:W},A(L)})})}n.exports={getConfiguration:s(f)}},{"../lib/braintree-error":33,"../lib/constants":34,"../lib/is-date-string-before-or-on":41,"./constants":10,"./errors":11,"./request":25,"./request/graphql":23,"@braintree/uuid":3,"@braintree/wrap-promise":7}],13:[function(e,n,i){var a=e("../lib/braintree-error"),s=e("./client"),o="3.126.0",l=e("@braintree/wrap-promise"),c=e("../lib/errors");function d(u){return u.authorization?s.initialize(u):Promise.reject(new a({type:c.INSTANTIATION_OPTION_REQUIRED.type,code:c.INSTANTIATION_OPTION_REQUIRED.code,message:"options.authorization is required when instantiating a client."}))}n.exports={create:l(d),VERSION:o}},{"../lib/braintree-error":33,"../lib/errors":40,"./client":9,"@braintree/wrap-promise":7}],14:[function(e,n,i){var a=e("../../lib/querystring"),s=e("../../lib/assign").assign,o=e("./prep-body"),l=e("./parse-body"),c=e("./xhr"),d=c.isAvailable,u=e("./graphql/request"),h=e("./default-request"),p=1,m=408;function f(T){return!T||T===m}function v(T){var L=!T.data&&T.errors&&T.errors[0]&&T.errors[0].extensions&&T.errors[0].extensions.errorClass;return L==="UNKNOWN"||L==="INTERNAL"}function b(T,L,C){var I,x,P,U,H,W,S,F=T.url,q=T.graphQL,ee=T.timeout,M=c.getRequestObject(),$=C,K=!!(q&&q.isGraphQLRequest(F,T.data));T.headers=s({"Content-Type":"application/json"},T.headers),K?P=new u(T):P=new h(T),F=P.getUrl(),U=P.getBody(),H=P.getMethod(),W=P.getHeaders(),H==="GET"&&(F=a.queryify(F,U),U=null),d?M.onreadystatechange=function(){if(M.readyState===4){if(M.status===0&&K){delete T.graphQL,b(T,L,C);return}if(S=l(M.responseText),x=P.adaptResponseBody(S),I=P.determineStatus(M.status,S),I>=400||I<200){if(K&&v(S)){delete T.graphQL,b(T,L,C);return}if(L<p&&f(I)){L++,b(T,L,C);return}$(x||"error",null,I||500)}else $(null,x,I)}}:(T.headers&&(F=a.queryify(F,W)),M.onload=function(){$(null,l(M.responseText),M.status)},M.onerror=function(){$("error",null,500)},M.onprogress=function(){},M.ontimeout=function(){$("timeout",null,-1)});try{M.open(H,F,!0)}catch(g){if(!K)throw g;delete T.graphQL,b(T,L,C);return}M.timeout=ee,d&&Object.keys(W).forEach(function(g){M.setRequestHeader(g,W[g])});try{M.send(o(H,U))}catch(g){}}function A(T,L){b(T,0,L)}n.exports={request:A}},{"../../lib/assign":32,"../../lib/querystring":47,"./default-request":15,"./graphql/request":24,"./parse-body":26,"./prep-body":27,"./xhr":28}],15:[function(e,n,i){function a(s){this._url=s.url,this._data=s.data,this._method=s.method,this._headers=s.headers}a.prototype.getUrl=function(){return this._url},a.prototype.getBody=function(){return this._data},a.prototype.getMethod=function(){return this._method},a.prototype.getHeaders=function(){return this._headers},a.prototype.adaptResponseBody=function(s){return s},a.prototype.determineStatus=function(s){return s},n.exports=a},{}],16:[function(e,n,i){var a=e("./error"),s=e("../../../../lib/assign").assign,o={creditCard:{AMERICAN_EXPRESS:"American Express",DISCOVER:"Discover",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",SOLO:"Solo",UK_MAESTRO:"UK Maestro",UNION_PAY:"UnionPay",VISA:"Visa",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard"},applePayWeb:{VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",INTERNATIONAL_MAESTRO:"maestro",ELO:"elo"},visaCheckout:{VISA:"Visa",MASTERCARD:"MasterCard",DISCOVER:"Discover",AMERICAN_EXPRESS:"American Express"},googlePay:{VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",INTERNATIONAL_MAESTRO:"maestro",ELO:"elo"},masterpass:{VISA:"visa",MASTERCARD:"master",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",DINERS:"diners",INTERNATIONAL_MAESTRO:"maestro",JCB:"jcb"}};function l(u,h){var p;return u.data&&!u.errors?p=c(u,h):p=a(u),p}function c(u,h){var p=u.data.clientConfiguration,m;return m={environment:p.environment.toLowerCase(),clientApiUrl:p.clientApiUrl,assetsUrl:p.assetsUrl,analytics:{url:p.analyticsUrl},merchantId:p.merchantId,venmo:"off"},p.supportedFeatures&&(m.graphQL={url:h._graphQL._config.url,features:p.supportedFeatures.map(function(f){return f.toLowerCase()})}),p.braintreeApi&&(m.braintreeApi=p.braintreeApi),p.applePayWeb&&(m.applePayWeb=p.applePayWeb,m.applePayWeb.supportedNetworks=d(p.applePayWeb.supportedCardBrands,o.applePayWeb),delete m.applePayWeb.supportedCardBrands),p.fastlane&&(m.fastlane=p.fastlane),p.ideal&&(m.ideal=p.ideal),p.creditCard?(m.challenges=p.creditCard.challenges.map(function(f){return f.toLowerCase()}),m.creditCards={supportedCardTypes:d(p.creditCard.supportedCardBrands,o.creditCard)},m.threeDSecureEnabled=p.creditCard.threeDSecureEnabled,m.threeDSecure=p.creditCard.threeDSecure):(m.challenges=[],m.creditCards={supportedCardTypes:[]},m.threeDSecureEnabled=!1),p.googlePay&&(m.androidPay={displayName:p.googlePay.displayName,enabled:!0,environment:p.googlePay.environment.toLowerCase(),googleAuthorizationFingerprint:p.googlePay.googleAuthorization,paypalClientId:p.googlePay.paypalClientId,supportedNetworks:d(p.googlePay.supportedCardBrands,o.googlePay)}),p.venmo&&(m.payWithVenmo={merchantId:p.venmo.merchantId,accessToken:p.venmo.accessToken,environment:p.venmo.environment.toLowerCase(),enrichedCustomerDataEnabled:p.venmo.enrichedCustomerDataEnabled}),p.paypal?(m.paypalEnabled=!0,m.paypal=s({},p.paypal),m.paypal.currencyIsoCode=m.paypal.currencyCode,m.paypal.environment=m.paypal.environment.toLowerCase(),delete m.paypal.currencyCode):m.paypalEnabled=!1,p.unionPay&&(m.unionPay={enabled:!0,merchantAccountId:p.unionPay.merchantAccountId}),p.visaCheckout&&(m.visaCheckout={apikey:p.visaCheckout.apiKey,encryptionKey:p.visaCheckout.encryptionKey,externalClientId:p.visaCheckout.externalClientId,supportedCardTypes:d(p.visaCheckout.supportedCardBrands,o.visaCheckout)}),p.masterpass&&(m.masterpass={merchantCheckoutId:p.masterpass.merchantCheckoutId,supportedNetworks:d(p.masterpass.supportedCardBrands,o.masterpass)}),p.usBankAccount&&(m.usBankAccount={routeId:p.usBankAccount.routeId,plaid:{publicKey:p.usBankAccount.plaidPublicKey}}),m}function d(u,h){return u.reduce(function(p,m){return h.hasOwnProperty(m)?p.concat(h[m]):p},[])}n.exports=l},{"../../../../lib/assign":32,"./error":19}],17:[function(e,n,i){var a=e("./error"),s={AMERICAN_EXPRESS:"American Express",DINERS:"Discover",DISCOVER:"Discover",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",UK_MAESTRO:"Maestro",UNION_PAY:"UnionPay",VISA:"Visa"},o={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},l={PSDTWO:"psd2"};function c(u){var h;return u.data&&!u.errors?h=d(u):h=a(u),h}function d(u){var h=u.data.tokenizeCreditCardForPayPalConnect,p=h.paymentMethod.details,m=p.last4?p.last4.substr(2,4):"",f=p.binData,v,b;return f&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){f[A]?f[A]=o[f[A]]:f[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){f[A]||(f[A]="Unknown")})),v={creditCards:[{binData:f,consumed:!1,description:m?"ending in "+m:"",nonce:h.paymentMethod.id,details:{cardholderName:p.cardholderName,expirationMonth:p.expirationMonth,expirationYear:p.expirationYear,bin:p.bin||"",cardType:s[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:m},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(b=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:l[b]||b.toLowerCase()}),v}n.exports=c},{"./error":19}],18:[function(e,n,i){var a=e("./error"),s={AMERICAN_EXPRESS:"American Express",DINERS:"Discover",DISCOVER:"Discover",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",UK_MAESTRO:"Maestro",UNION_PAY:"UnionPay",VISA:"Visa"},o={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},l={PSDTWO:"psd2"};function c(u){var h;return u.data&&!u.errors?h=d(u):h=a(u),h}function d(u){var h=u.data.tokenizeCreditCard,p=h.creditCard,m=p.last4?p.last4.substr(2,4):"",f=p.binData,v,b;return f&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){f[A]?f[A]=o[f[A]]:f[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){f[A]||(f[A]="Unknown")})),v={creditCards:[{binData:f,consumed:!1,description:m?"ending in "+m:"",nonce:h.token,details:{cardholderName:p.cardholderName,expirationMonth:p.expirationMonth,expirationYear:p.expirationYear,bin:p.bin||"",cardType:s[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:m},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(b=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:l[b]||b.toLowerCase()}),v}n.exports=c},{"./error":19}],19:[function(e,n,i){function a(u){var h,p=u.errors&&u.errors[0]&&u.errors[0].extensions&&u.errors[0].extensions.errorClass;return p==="VALIDATION"?h=o(u):p?h=s(u):h={error:{message:"There was a problem serving your request"},fieldErrors:[]},h}function s(u){return{error:{message:u.errors[0].message},fieldErrors:[]}}function o(u){var h=l(u.errors);return h.length===0?{error:{message:u.errors[0].message}}:{error:{message:d(h)},fieldErrors:h}}function l(u){var h=[];return u.forEach(function(p){p.extensions&&p.extensions.inputPath&&c(p.extensions.inputPath.slice(1),p,h)}),h}function c(u,h,p){var m,f=h.extensions.legacyCode,v=u[0];if(u.length===1){p.push({code:f,field:v,message:h.message});return}p.forEach(function(b){b.field===v&&(m=b)}),m||(m={field:v,fieldErrors:[]},p.push(m)),c(u.slice(1),h,m.fieldErrors)}function d(u){var h={creditCard:"Credit card is invalid"},p=u[0].field;return h[p]}n.exports=a},{}],20:[function(e,n,i){var a="query ClientConfiguration { clientConfiguration { analyticsUrl environment merchantId assetsUrl clientApiUrl creditCard { supportedCardBrands challenges threeDSecureEnabled threeDSecure { cardinalAuthenticationJWT cardinalSongbirdUrl cardinalSongbirdIdentityHash } } applePayWeb { countryCode currencyCode merchantIdentifier supportedCardBrands } fastlane { enabled tokensOnDemand { enabled tokenExchange { enabled } } } googlePay { displayName supportedCardBrands environment googleAuthorization paypalClientId } ideal { routeId assetsUrl } masterpass { merchantCheckoutId supportedCardBrands } paypal { displayName clientId assetsUrl environment environmentNoNetwork unvettedMerchant braintreeClientId billingAgreementsEnabled merchantAccountId currencyCode payeeEmail } unionPay { merchantAccountId } usBankAccount { routeId plaidPublicKey } venmo { merchantId accessToken environment enrichedCustomerDataEnabled } visaCheckout { apiKey externalClientId supportedCardBrands } braintreeApi { accessToken url } supportedFeatures } }";function s(){return{query:a,operationName:"ClientConfiguration"}}n.exports=s},{}],21:[function(e,n,i){var a=e("../../../../lib/assign").assign;function s(u){var h=u.hasAuthenticationInsight,p="mutation TokenizeCreditCardForPayPalConnect($input: TokenizeCreditCardForPayPalConnectInput!";return h&&(p+=", $authenticationInsightInput: AuthenticationInsightInput!"),p+=") { tokenizeCreditCardForPayPalConnect(input: $input) { clientMutationId paymentMethod { id details { ... on CreditCardDetails { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId business consumer purchase corporate } } } }",h&&(p+=" authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }"),p+=" } }",p}function o(u,h){var p=u.creditCard,m=p.fastlane||{},f="fastlane"in p&&"termsAndConditionsVersion"in p.fastlane&&p.fastlane.termsAndConditionsVersion,v="fastlane"in p&&"termsAndConditionsCountry"in p.fastlane&&p.fastlane.termsAndConditionsCountry,b=p.email,A="hasBuyerConsent"in m&&m.hasBuyerConsent,T=p.shippingAddress,L=l(u,h),C=a({},L.input,{email:b,optIn:A,phone:p.phone});return f&&(C.termsAndConditionsVersion=f),v&&(C.termsAndConditionsCountry=v),"authAssertion"in m&&(C.authAssertion=m.authAssertion),T&&(C.shippingAddress=T),{input:C}}function l(u,h){var p=u.creditCard,m=p&&p.billingAddress,f=p&&p.expirationDate,v=p&&(p.expirationMonth||f&&f.split("/")[0].trim()),b=p&&(p.expirationYear||f&&f.split("/")[1].trim()),A={input:{creditCard:{number:p&&p.number,expirationMonth:v,expirationYear:b,cvv:p&&p.cvv,cardholderName:p&&p.cardholderName},options:{}}};return h.hasAuthenticationInsight&&(A.authenticationInsightInput={merchantAccountId:u.merchantAccountId}),m&&(A.input.creditCard.billingAddress=m),A.input=c(u,A.input),A}function c(u,h){var p;return u.creditCard&&u.creditCard.options&&typeof u.creditCard.options.validate=="boolean"?p=u.creditCard.options.validate:u.authorizationFingerprint&&u.tokenizationKey||u.authorizationFingerprint?p=!0:u.tokenizationKey&&(p=!1),typeof p=="boolean"&&(h.options=a({validate:p},h.options)),h}function d(u){var h={hasAuthenticationInsight:!!(u.authenticationInsight&&u.merchantAccountId)};return{query:s(h),variables:o(u,h),operationName:"TokenizeCreditCardForPayPalConnect"}}n.exports=d},{"../../../../lib/assign":32}],22:[function(e,n,i){var a=e("../../../../lib/assign").assign;function s(d){var u=d.hasAuthenticationInsight,h="mutation TokenizeCreditCard($input: TokenizeCreditCardInput!";return u&&(h+=", $authenticationInsightInput: AuthenticationInsightInput!"),h+=") { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId business consumer purchase corporate } } ",u&&(h+=" authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }"),h+=" } }",h}function o(d,u){var h=d.creditCard,p=h&&h.billingAddress,m=h&&h.expirationDate,f=h&&(h.expirationMonth||m&&m.split("/")[0].trim()),v=h&&(h.expirationYear||m&&m.split("/")[1].trim()),b={input:{creditCard:{number:h&&h.number,expirationMonth:f,expirationYear:v,cvv:h&&h.cvv,cardholderName:h&&h.cardholderName},options:{}}};return u.hasAuthenticationInsight&&(b.authenticationInsightInput={merchantAccountId:d.merchantAccountId}),p&&(b.input.creditCard.billingAddress=p),b.input=l(d,b.input),b}function l(d,u){var h;return d.creditCard&&d.creditCard.options&&typeof d.creditCard.options.validate=="boolean"?h=d.creditCard.options.validate:d.authorizationFingerprint&&d.tokenizationKey||d.authorizationFingerprint?h=!0:d.tokenizationKey&&(h=!1),typeof h=="boolean"&&(u.options=a({validate:h},u.options)),u}function c(d){var u={hasAuthenticationInsight:!!(d.authenticationInsight&&d.merchantAccountId)};return{query:s(u),variables:o(d,u),operationName:"TokenizeCreditCard"}}n.exports=c},{"../../../../lib/assign":32}],23:[function(e,n,i){var a={tokenize_credit_cards:"payment_methods/credit_cards",configuration:"configuration"},s=["creditCard.options.unionPayEnrollment"];function o(c){this._config=c.graphQL}o.prototype.getGraphQLEndpoint=function(){return this._config.url},o.prototype.isGraphQLRequest=function(c,d){var u,h=this.getClientApiPath(c);return!this._isGraphQLEnabled()||!h||(u=this._config.features.some(function(p){return a[p]===h}),l(d))?!1:u},o.prototype.getClientApiPath=function(c){var d,u="/client_api/v1/",h=c.split(u);return h.length>1&&(d=h[1].split("?")[0]),d},o.prototype._isGraphQLEnabled=function(){return!!this._config};function l(c){return s.some(function(d){var u=d.split(".").reduce(function(h,p){return h&&h[p]},c);return u!==void 0})}n.exports=o},{}],24:[function(e,n,i){var a=e("../../constants").BRAINTREE_VERSION,s=e("../../../lib/assign").assign,o=e("../../../lib/snake-case-to-camel-case"),l=e("../../../lib/is-fastlane-checkout"),c=e("./generators/credit-card-tokenization"),d=e("./adapters/credit-card-tokenization"),u=e("./adapters/credit-card-tokenization-fastlane"),h=e("./generators/credit-card-for-fastlane-tokenization"),p=e("./generators/configuration"),m=e("./adapters/configuration"),f={"payment_methods/credit_cards":function(L,C){return C?h(L):c(L)},configuration:p},v={"payment_methods/credit_cards":function(L,C,I){return I?u(L,C):d(L,C)},configuration:m};function b(L){var C=L.graphQL.getClientApiPath(L.url);this._graphQL=L.graphQL,this._data=L.data,this._method=L.method,this._headers=L.headers,this._clientSdkMetadata={source:L.metadata.source,integration:L.metadata.integration,sessionId:L.metadata.sessionId},this._sendAnalyticsEvent=L.sendAnalyticsEvent||Function.prototype,this._generator=f[C],this._adapter=v[C],this._sendAnalyticsEvent("graphql.init")}b.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},b.prototype.getBody=function(){var L=T(this._data),C=this._generator(L,l(this._data.creditCard)),I=s({clientSdkMetadata:this._clientSdkMetadata},C);return JSON.stringify(I)},b.prototype.getMethod=function(){return"POST"},b.prototype.getHeaders=function(){var L,C;return this._data.authorizationFingerprint?(this._sendAnalyticsEvent("graphql.authorization-fingerprint"),L=this._data.authorizationFingerprint):(this._sendAnalyticsEvent("graphql.tokenization-key"),L=this._data.tokenizationKey),C={Authorization:"Bearer "+L,"Braintree-Version":a},s({},this._headers,C)},b.prototype.adaptResponseBody=function(L){return this._adapter(L,this,"creditCard"in this._data&&l(this._data.creditCard))},b.prototype.determineStatus=function(L,C){var I,x;return L===200?(x=C.errors&&C.errors[0]&&C.errors[0].extensions&&C.errors[0].extensions.errorClass,C.data&&!C.errors?I=200:x==="VALIDATION"?I=422:x==="AUTHORIZATION"?I=403:x==="AUTHENTICATION"?I=401:A(x,C)?I=403:I=500):L?I=L:I=500,this._sendAnalyticsEvent("graphql.status."+L),this._sendAnalyticsEvent("graphql.determinedStatus."+I),I};function A(L,C){return!L&&C.errors[0].message}function T(L){var C={};return Object.keys(L).forEach(function(I){var x=o(I);typeof L[I]=="object"?C[x]=T(L[I]):typeof L[I]=="number"?C[x]=String(L[I]):C[x]=L[I]}),C}n.exports=b},{"../../../lib/assign":32,"../../../lib/is-fastlane-checkout":42,"../../../lib/snake-case-to-camel-case":48,"../../constants":10,"./adapters/configuration":16,"./adapters/credit-card-tokenization":18,"./adapters/credit-card-tokenization-fastlane":17,"./generators/configuration":20,"./generators/credit-card-for-fastlane-tokenization":21,"./generators/credit-card-tokenization":22}],25:[function(e,n,i){var a=e("../../lib/once"),s=e("./ajax-driver");n.exports=function(o,l){l=a(l||Function.prototype),o.method=(o.method||"GET").toUpperCase(),o.timeout=o.timeout==null?6e4:o.timeout,o.data=o.data||{},s.request(o,l)}},{"../../lib/once":46,"./ajax-driver":14}],26:[function(e,n,i){n.exports=function(a){try{a=JSON.parse(a)}catch(s){}return a}},{}],27:[function(e,n,i){n.exports=function(a,s){if(typeof a!="string")throw new Error("Method must be a string");return a.toLowerCase()!=="get"&&s!=null&&(s=typeof s=="string"?s:JSON.stringify(s)),s}},{}],28:[function(e,n,i){var a=typeof window!="undefined"&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest;function s(){return a?new window.XMLHttpRequest:new window.XDomainRequest}n.exports={isAvailable:a,getRequestObject:s}},{}],29:[function(e,n,i){var a=e("./create-authorization-data"),s=e("./json-clone"),o=e("./constants");function l(d,u){var h,p=u?s(u):{},m=a(d.authorization).attrs,f=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(f[h]=p._meta[h]);return p._meta=f,m.tokenizationKey?p.tokenizationKey=m.tokenizationKey:p.authorizationFingerprint=m.authorizationFingerprint,p}function c(d){var u=d.getConfiguration(),h=a(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",m={api_integration_type:u.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:o.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:o.PLATFORM,platform_version:window.navigator.userAgent,session_id:u.analyticsMetadata.sessionId,client_session_id:u.analyticsMetadata.sessionId,tenant_name:"braintree",product_name:"BT_DCC",space_key:"SKDUYK"};return h.tokenizationKey?m.tokenization_key=h.tokenizationKey:m.auth_fingerprint=h.authorizationFingerprint,m}n.exports={addMetadata:l,addEventMetadata:c}},{"./constants":34,"./create-authorization-data":37,"./json-clone":44}],30:[function(e,n,i){var a=e("./constants"),s=e("./add-metadata"),o=e("./assign").assign;function l(u,h,p){return c(u,h,{},p)}function c(u,h,p,m){var f=Date.now();return p.flow==="vault"?p.context_type="BA_Token":p.flow==="checkout"&&(p.context_type="EC_Token"),Promise.resolve(u).then(function(v){var b=v._request,A=a.ANALYTICS_URL,T=a.ANALYTICS_PREFIX+h,L=v.getConfiguration(),C=L.gatewayConfiguration.environment==="production",I={events:[],tracking:[]},x=s.addEventMetadata(v,I);return x.event_name=T,x.t=f,I.events=[{level:"info",event:T,payload:o({env:C?"production":"sandbox",timestamp:f},p)}],I.tracking=[x],p&&typeof p=="object"&&(I.tracking=[d(x,p)]),b({url:A,method:"post",data:I,timeout:a.ANALYTICS_REQUEST_TIMEOUT_MS},m)}).catch(function(v){m&&m(v)})}function d(u,h){var p={},m=o({},h);return Object.keys(m).forEach(function(f){a.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(f)===-1&&delete m[f]}),p=o(u,m),p}n.exports={sendEvent:l,sendEventPlus:c}},{"./add-metadata":29,"./assign":32,"./constants":34}],31:[function(e,n,i){var a=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:a,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":8}],32:[function(e,n,i){var a=typeof Object.assign=="function"?Object.assign:s;function s(o){var l,c,d;for(l=1;l<arguments.length;l++){c=arguments[l];for(d in c)c.hasOwnProperty(d)&&(o[d]=c[d])}return o}n.exports={assign:a,_assign:s}},{}],33:[function(e,n,i){var a=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=a(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":39}],34:[function(e,n,i){var a="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},l={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},c={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:l,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:c,INTEGRATION_TIMEOUT_MS:6e4,VERSION:a,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+a,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],35:[function(e,n,i){var a=e("./braintree-error"),s=e("./errors");n.exports=function(o,l){l.forEach(function(c){o[c]=function(){throw new a({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:c+" cannot be called after teardown."})}})}},{"./braintree-error":33,"./errors":40}],36:[function(e,n,i){var a=e("./braintree-error");function s(o,l){return o instanceof a?o:new a({type:l.type,code:l.code,message:l.message,details:{originalError:o}})}n.exports=s},{"./braintree-error":33}],37:[function(e,n,i){var a=e("../lib/vendor/polyfill").atob,s=e("../lib/constants").CLIENT_API_URLS;function o(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function l(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function c(d){var u,h,p={attrs:{},configUrl:""};return o(d)?(h=l(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(a(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=c},{"../lib/constants":34,"../lib/vendor/polyfill":49}],38:[function(e,n,i){n.exports=function(a){return function(){var s=arguments;setTimeout(function(){a.apply(null,s)},1)}}},{}],39:[function(e,n,i){function a(s,o){return o=o==null?"":o,s.reduce(function(l,c){return l[c]=o+c,l},{})}n.exports=a},{}],40:[function(e,n,i){var a=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:a.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:a.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:a.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:a.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:a.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":33}],41:[function(e,n,i){function a(o){var l=o.split("-");return new Date(l[0],l[1],l[2])}function s(o,l){return a(o)<=a(l)}n.exports=s},{}],42:[function(e,n,i){n.exports=function(a){return a&&a.hasOwnProperty("fastlane")&&a.fastlane}},{}],43:[function(e,n,i){var a,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(c){return c.split(".").slice(-2).join(".")}function l(c){var d;return c=c.toLowerCase(),/^https:/.test(c)?(a=a||document.createElement("a"),a.href=c,d=o(a.hostname),s.hasOwnProperty(d)):!1}n.exports=l},{}],44:[function(e,n,i){n.exports=function(a){return JSON.parse(JSON.stringify(a))}},{}],45:[function(e,n,i){n.exports=function(a){return Object.keys(a).filter(function(s){return typeof a[s]=="function"})}},{}],46:[function(e,n,i){function a(s){var o=!1;return function(){o||(o=!0,s.apply(null,arguments))}}n.exports=a},{}],47:[function(e,n,i){function a(u){var h;for(h in u)if(u.hasOwnProperty(h))return!0;return!1}function s(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function o(u){return u=u||window.location.href,/\?/.test(u)}function l(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(m,f){var v=f.split("="),b=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return m[b]=A,m},{}),p):{}}function c(u,h){var p,m,f,v=[];for(f in u)u.hasOwnProperty(f)&&(m=u[f],h?s(u)?p=h+"[]":p=h+"["+f+"]":p=f,typeof m=="object"?v.push(c(m,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(m)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&a(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=c(h)),u}n.exports={parse:l,stringify:c,queryify:d,hasQueryParams:o}},{}],48:[function(e,n,i){n.exports=function(a){return a.indexOf("_")===-1?a:a.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],49:[function(e,n,i){var a=typeof atob=="function"?atob:s;function s(o){var l,c,d,u,h,p,m,f,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");f=0;do u=b.indexOf(o.charAt(f++)),h=b.indexOf(o.charAt(f++)),p=b.indexOf(o.charAt(f++)),m=b.indexOf(o.charAt(f++)),l=(u&63)<<2|h>>4&3,c=(h&15)<<4|p>>2&15,d=(p&3)<<6|m&63,A+=String.fromCharCode(l)+(c?String.fromCharCode(c):"")+(d?String.fromCharCode(d):"");while(f<o.length);return A}n.exports={atob:function(o){return a.call(window,o)},_atob:s}},{}]},{},[13])(13)})}(yr)),yr.exports}var gc=vc();const bc=ri(gc);var _r={exports:{}},Ti;function yc(){return Ti||(Ti=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,i,a){function s(c,d){if(!i[c]){if(!n[c]){var u=typeof Le=="function"&&Le;if(!d&&u)return u(c,!0);if(o)return o(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var p=i[c]={exports:{}};n[c][0].call(p.exports,function(m){var f=n[c][1][m];return s(f||m)},p,p.exports,e,n,i,a)}return i[c].exports}for(var o=typeof Le=="function"&&Le,l=0;l<a.length;l++)s(a[l]);return s}return e}()({1:[function(e,n,i){var a={};function s(o){var l,c=JSON.stringify(o);if(!o.forceScriptReload&&(l=a[c],l))return l;var d=document.createElement("script"),u=o.dataAttributes||{},h=o.container||document.head;return d.src=o.src,d.id=o.id||"",d.async=!0,o.type&&d.setAttribute("type","".concat(o.type)),o.crossorigin&&d.setAttribute("crossorigin","".concat(o.crossorigin)),o.integrity&&d.setAttribute("integrity","".concat(o.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),l=new Promise(function(p,m){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){m(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){m(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),a[c]=l,l}s.clearCache=function(){a={}},n.exports=s},{}],2:[function(e,n,i){n.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,/Android/i.test(s)}},{}],4:[function(e,n,i){var a=e("./is-edge"),s=e("./is-samsung"),o=e("./is-duckduckgo"),l=e("./is-opera"),c=e("./is-silk");n.exports=function(u){return u=u||window.navigator.userAgent,(u.indexOf("Chrome")!==-1||u.indexOf("CriOS")!==-1)&&!a(u)&&!s(u)&&!o(u)&&!l(u)&&!c(u)}},{"./is-duckduckgo":5,"./is-edge":6,"./is-opera":14,"./is-samsung":15,"./is-silk":16}],5:[function(e,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("DuckDuckGo/")!==-1}},{}],6:[function(e,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Edge/")!==-1||s.indexOf("Edg/")!==-1}},{}],7:[function(e,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,/FxiOS/i.test(s)}},{}],8:[function(e,n,i){var a=e("./is-ios");function s(o){return/\bGSA\b/.test(o)}n.exports=function(l){return l=l||window.navigator.userAgent,a(l)&&s(l)}},{"./is-ios":12}],9:[function(e,n,i){var a=e("./is-ios"),s=e("./is-ios-firefox"),o=/webkit/i;function l(u){return o.test(u)}function c(u){return u.indexOf("CriOS")>-1}function d(u){return u.indexOf("FBAN")>-1}n.exports=function(h){return h=h||window.navigator.userAgent,a(h)&&l(h)&&!c(h)&&!s(h)&&!d(h)}},{"./is-ios":12,"./is-ios-firefox":7}],10:[function(e,n,i){var a=e("./is-ios"),s=e("./is-ios-google-search-app");n.exports=function(l){return l=l||window.navigator.userAgent,a(l)?s(l)?!0:/.+AppleWebKit(?!.*Safari)/i.test(l):!1}},{"./is-ios":12,"./is-ios-google-search-app":8}],11:[function(e,n,i){var a=e("./is-ios-webview");n.exports=function(o,l){return l=typeof l!="undefined"?l:window.statusbar.visible,a(o)&&l}},{"./is-ios-webview":10}],12:[function(e,n,i){var a=e("./is-ipados");n.exports=function(o,l,c){l===void 0&&(l=!0),o=o||window.navigator.userAgent;var d=/iPhone|iPod|iPad/i.test(o);return l?d||a(o,c):d}},{"./is-ipados":13}],13:[function(e,n,i){n.exports=function(s,o){return s=s||window.navigator.userAgent,o=o||window.document,/Mac|iPad/i.test(s)&&"ontouchend"in o}},{}],14:[function(e,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("OPR/")!==-1||s.indexOf("Opera/")!==-1||s.indexOf("OPT/")!==-1}},{}],15:[function(e,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,/SamsungBrowser/i.test(s)}},{}],16:[function(e,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Silk/")!==-1}},{}],17:[function(e,n,i){var a=48,s=e("./is-android"),o=e("./is-ios-firefox"),l=e("./is-ios-webview"),c=e("./is-chrome"),d=e("./is-samsung"),u=e("./is-duckduckgo");function h(v){v=v||window.navigator.userAgent;var b=v.match(/CriOS\/(\d+)\./);if(!b)return!1;var A=parseInt(b[1],10);return A<a}function p(v){return v=v||window.navigator.userAgent,v.indexOf("Opera Mini")>-1}function m(v){var b=/Version\/[\d.]+/i;return v=v||window.navigator.userAgent,s(v)?b.test(v)&&!p(v)&&!u(v):!1}function f(v){return!c(v)&&!d(v)&&/samsung/i.test(v)}n.exports=function(b){return b=b||window.navigator.userAgent,!(l(b)||o(b)||m(b)||p(b)||h(b)||f(b))}},{"./is-android":3,"./is-chrome":4,"./is-duckduckgo":5,"./is-ios-firefox":7,"./is-ios-webview":10,"./is-samsung":15}],18:[function(e,n,i){n.exports=e("./dist/is-android")},{"./dist/is-android":3}],19:[function(e,n,i){n.exports=e("./dist/is-chrome")},{"./dist/is-chrome":4}],20:[function(e,n,i){n.exports=e("./dist/is-ios-safari")},{"./dist/is-ios-safari":9}],21:[function(e,n,i){n.exports=e("./dist/is-ios-webview")},{"./dist/is-ios-webview":10}],22:[function(e,n,i){n.exports=e("./dist/is-ios-wkwebview")},{"./dist/is-ios-wkwebview":11}],23:[function(e,n,i){n.exports=e("./dist/is-ios")},{"./dist/is-ios":12}],24:[function(e,n,i){n.exports=e("./dist/is-samsung")},{"./dist/is-samsung":15}],25:[function(e,n,i){n.exports=e("./dist/supports-popups")},{"./dist/supports-popups":17}],26:[function(e,n,i){var a=typeof Promise!="undefined"?Promise:null,s=function(){function o(l){var c=this;if(typeof l=="function"){this._promise=new o.Promise(l);return}this._promise=new o.Promise(function(d,u){c._resolveFunction=d,c._rejectFunction=u}),l=l||{},this._onResolve=l.onResolve||o.defaultOnResolve,this._onReject=l.onReject||o.defaultOnReject,o.shouldCatchExceptions(l)&&this._promise.catch(function(){}),this._resetState()}return o.defaultOnResolve=function(l){return o.Promise.resolve(l)},o.defaultOnReject=function(l){return o.Promise.reject(l)},o.setPromise=function(l){o.Promise=l},o.shouldCatchExceptions=function(l){return l.hasOwnProperty("suppressUnhandledPromiseMessage")?!!l.suppressUnhandledPromiseMessage:!!o.suppressUnhandledPromiseMessage},o.all=function(l){return o.Promise.all(l)},o.allSettled=function(l){return o.Promise.allSettled(l)},o.race=function(l){return o.Promise.race(l)},o.reject=function(l){return o.Promise.reject(l)},o.resolve=function(l){return o.Promise.resolve(l)},o.prototype.then=function(){for(var l,c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return(l=this._promise).then.apply(l,c)},o.prototype.catch=function(){for(var l,c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return(l=this._promise).catch.apply(l,c)},o.prototype.resolve=function(l){var c=this;return this.isFulfilled?this:(this._setResolved(),o.Promise.resolve().then(function(){return c._onResolve(l)}).then(function(d){c._resolveFunction(d)}).catch(function(d){c._resetState(),c.reject(d)}),this)},o.prototype.reject=function(l){var c=this;return this.isFulfilled?this:(this._setRejected(),o.Promise.resolve().then(function(){return c._onReject(l)}).then(function(d){c._setResolved(),c._resolveFunction(d)}).catch(function(d){return c._rejectFunction(d)}),this)},o.prototype._resetState=function(){this.isFulfilled=!1,this.isResolved=!1,this.isRejected=!1},o.prototype._setResolved=function(){this.isFulfilled=!0,this.isResolved=!0,this.isRejected=!1},o.prototype._setRejected=function(){this.isFulfilled=!0,this.isResolved=!1,this.isRejected=!0},o.Promise=a,o}();n.exports=s},{}],27:[function(e,n,i){var a=e("./lib/set-attributes"),s=e("./lib/default-attributes"),o=e("./lib/assign");n.exports=function(c){c===void 0&&(c={});var d=document.createElement("iframe"),u=(0,o.assign)({},s.defaultAttributes,c);return u.style&&typeof u.style!="string"&&((0,o.assign)(d.style,u.style),delete u.style),(0,a.setAttributes)(d,u),d.getAttribute("id")||(d.id=d.name),d}},{"./lib/assign":28,"./lib/default-attributes":29,"./lib/set-attributes":30}],28:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.assign=void 0;function a(s){for(var o=[],l=1;l<arguments.length;l++)o[l-1]=arguments[l];return o.forEach(function(c){typeof c=="object"&&Object.keys(c).forEach(function(d){s[d]=c[d]})}),s}i.assign=a},{}],29:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.defaultAttributes=void 0,i.defaultAttributes={src:"about:blank",frameBorder:0,allowtransparency:!0,scrolling:"no"}},{}],30:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.setAttributes=void 0;function a(s,o){for(var l in o)if(o.hasOwnProperty(l)){var c=o[l];c==null?s.removeAttribute(l):s.setAttribute(l,c)}}i.setAttributes=a},{}],31:[function(e,n,i){function a(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var o=Math.random()*16|0,l=s==="x"?o:o&3|8;return l.toString(16)})}n.exports=a},{}],32:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(s){return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];setTimeout(function(){try{s.apply(void 0,o)}catch(c){console.log("Error in callback function"),console.log(c)}},1)}}i.deferred=a},{}],33:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(s){var o=!1;return function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];o||(o=!0,s.apply(void 0,l))}}i.once=a},{}],34:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(s,o){if(!o)return s;s.then(function(l){return o(null,l)}).catch(function(l){return o(l)})}i.promiseOrCallback=a},{}],35:[function(e,n,i){var a=e("./lib/deferred"),s=e("./lib/once"),o=e("./lib/promise-or-callback");function l(c){return function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];var h,p=d[d.length-1];return typeof p=="function"&&(h=d.pop(),h=s.once(a.deferred(h))),o.promiseOrCallback(c.apply(this,d),h)}}l.wrapPrototype=function(c,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(c.prototype).filter(function(m){var f,v=m!=="constructor"&&typeof c.prototype[m]=="function",b=u.indexOf(m)===-1;return h?f=!0:f=m.charAt(0)!=="_",v&&f&&b});return p.forEach(function(m){var f=c.prototype[m];c.prototype[m]=l(f)}),c},n.exports=l},{"./lib/deferred":32,"./lib/once":33,"./lib/promise-or-callback":34}],36:[function(e,n,i){(function(a,s){typeof i=="object"&&typeof n!="undefined"?s(i):(a=typeof globalThis!="undefined"?globalThis:a||self,s(a.loadAxo={}))})(this,function(a){/*! *****************************************************************************
|
|
361
|
+
***************************************************************************** */function s(E,O,w,P){function V(N){return N instanceof w?N:new w(function(G){G(N)})}return new(w||(w=Promise))(function(N,G){function ee(ae){try{D(P.next(ae))}catch(we){G(we)}}function de(ae){try{D(P.throw(ae))}catch(we){G(we)}}function D(ae){ae.done?N(ae.value):V(ae.value).then(ee,de)}D((P=P.apply(E,[])).next())})}function o(E,O){var w={label:0,sent:function(){if(N[0]&1)throw N[1];return N[1]},trys:[],ops:[]},P,V,N,G;return G={next:ee(0),throw:ee(1),return:ee(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function ee(D){return function(ae){return de([D,ae])}}function de(D){if(P)throw new TypeError("Generator is already executing.");for(;w;)try{if(P=1,V&&(N=D[0]&2?V.return:D[0]?V.throw||((N=V.return)&&N.call(V),0):V.next)&&!(N=N.call(V,D[1])).done)return N;switch(V=0,N&&(D=[D[0]&2,N.value]),D[0]){case 0:case 1:N=D;break;case 4:return w.label++,{value:D[1],done:!1};case 5:w.label++,V=D[1],D=[0];continue;case 7:D=w.ops.pop(),w.trys.pop();continue;default:if(N=w.trys,!(N=N.length>0&&N[N.length-1])&&(D[0]===6||D[0]===2)){w=0;continue}if(D[0]===3&&(!N||D[1]>N[0]&&D[1]<N[3])){w.label=D[1];break}if(D[0]===6&&w.label<N[1]){w.label=N[1],N=D;break}if(N&&w.label<N[2]){w.label=N[2],w.ops.push(D);break}N[2]&&w.ops.pop(),w.trys.pop();continue}D=O.call(E,w)}catch(ae){D=[6,ae],V=0}finally{P=N=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}}var c={},l={};function d(E){var O,w=JSON.stringify(E);if(!E.forceScriptReload&&(O=l[w],O))return O;var P=document.createElement("script"),V=E.dataAttributes||{},N=E.container||document.head;return P.src=E.src,P.id=E.id||"",P.async=!0,E.type&&P.setAttribute("type","".concat(E.type)),E.crossorigin&&P.setAttribute("crossorigin","".concat(E.crossorigin)),Object.keys(V).forEach(function(G){P.setAttribute("data-".concat(G),"".concat(V[G]))}),O=new Promise(function(G,ee){P.addEventListener("load",function(){G(P)}),P.addEventListener("error",function(){ee(new Error("".concat(E.src," failed to load.")))}),P.addEventListener("abort",function(){ee(new Error("".concat(E.src," has aborted.")))}),N.appendChild(P)}),l[w]=O,O}d.clearCache=function(){l={}};var u=d,h=function(O){var w=document.querySelector('link[href="'.concat(O.href,'"]'));if(w)return Promise.resolve(w);w=document.createElement("link");var P=O.container||document.head;return w.setAttribute("rel","stylesheet"),w.setAttribute("type","text/css"),w.setAttribute("href",O.href),w.setAttribute("id",O.id),P.firstChild?P.insertBefore(w,P.firstChild):P.appendChild(w),Promise.resolve(w)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=m=c.loadScript=void 0;var p=u,m=c.loadScript=p,f=h;c.loadStylesheet=f;var v="https://www.paypalobjects.com",y={minified:"axo.min",unminified:"axo"},A="fastlane",I="connect-boba",L="".concat(I,"/locales/"),C={AXO_ASSET_NAME:y,AXO_ASSET_PATH:I,LOCALE_PATH:L,CDNX_PROD:v},T={BT:"BT",PPCP:"PPCP"};function x(){return typeof window.define=="function"&&!!window.define.amd}function k(){return x()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function U(E,O,w){var P,V;return w===void 0&&(w=!0),s(this,void 0,void 0,function(){var N,G;return o(this,function(ee){if(N=W(),N&&N[E.module]){if(O&&((P=N[E.module])===null||P===void 0?void 0:P.VERSION)!==O)throw G=(V=N[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(G," cannot load version ").concat(O));return[2,!0]}if(!O)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,H(E,O,w)]})})}function H(E,O,w){if(w===void 0&&(w=!0),x()){var P=w?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(N,G){window.require([P],N,G)})}var V=w?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(O),src:"https://js.braintreegateway.com/web/".concat(O,"/js/").concat(V)})}function W(){return window==null?void 0:window.braintree}var S,F,q={Client:"client",HostedCardFields:"hostedFields"},te="braintree",M=(S={},S[q.Client]="client",S[q.HostedCardFields]="hosted-fields",S),$=(F={},F[q.Client]={id:"client",module:q.Client,amdModule:{unminified:"".concat(te,"/").concat(M[q.Client]),minified:"".concat(te,"/").concat(M[q.Client],".min")},script:{unminified:"".concat(M[q.Client],".js"),minified:"".concat(M[q.Client],".min.js")}},F[q.HostedCardFields]={id:"hcf",module:q.HostedCardFields,amdModule:{unminified:"".concat(te,"/").concat(M[q.HostedCardFields]),minified:"".concat(te,"/").concat(M[q.HostedCardFields],".min")},script:{unminified:"".concat(M[q.HostedCardFields],".js"),minified:"".concat(M[q.HostedCardFields],".min.js")}},F);function K(E){return s(this,void 0,void 0,function(){var O,w,P,V;return o(this,function(N){switch(N.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),O=E.btSdkVersion,w=E.minified,P=R(E),V=j(E),E.platform!==T.BT?[3,2]:[4,Promise.all([U($.hostedFields,O,w),g(P,w)])];case 1:return N.sent(),[3,5];case 2:return E.platform!==T.PPCP?[3,4]:[4,Promise.all([U($.client,O,w),U($.hostedFields,O,w),g(P,w)])];case 3:return N.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,O){var w;if(O===void 0&&(O=!0),x()){k()&&requirejs.config({paths:(w={},w[A]=E,w)});var P="".concat(A,"/").concat(O?C.AXO_ASSET_NAME.minified:C.AXO_ASSET_NAME.unminified);return new Promise(function(V,N){window.require([P],V,N)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var O=E.assetUrl,w=E.bundleId;return w?"https://cdn-".concat(w,".static.engineering.dev.paypalinc.com/").concat(O):"".concat(C.CDNX_PROD,"/").concat(O)}function R(E){var O,w=(E==null?void 0:E.minified)!==!1?C.AXO_ASSET_NAME.minified:C.AXO_ASSET_NAME.unminified,P=x()?C.AXO_ASSET_PATH:"".concat(C.AXO_ASSET_PATH,"/").concat(w,".js");return _({assetUrl:P,bundleId:(O=E==null?void 0:E.metadata)===null||O===void 0?void 0:O.bundleIdOverride})}function j(E){var O;return _({assetUrl:C.LOCALE_PATH,bundleId:(O=E==null?void 0:E.metadata)===null||O===void 0?void 0:O.bundleIdOverride})}i.constants=C,i.loadAxo=K})},{}],9:[function(e,n,a){var i=e("./constants").BRAINTREE_VERSION,s=e("./request/graphql"),o=e("./request"),c=e("../lib/is-verified-domain"),l=e("../lib/braintree-error"),d=e("../lib/convert-to-braintree-error"),u=e("./get-configuration").getConfiguration,h=e("../lib/create-authorization-data"),p=e("../lib/add-metadata"),m=e("@braintree/wrap-promise"),f=e("../lib/once"),v=e("../lib/deferred"),y=e("../lib/assign").assign,A=e("../lib/analytics"),I=e("./errors"),L=e("../lib/constants").VERSION,C=e("../lib/constants").GRAPHQL_URLS,T=e("../lib/methods"),x=e("../lib/convert-methods-to-error"),k=e("../lib/assets"),U=e("../lib/constants").FRAUDNET_FNCLS,H=e("../lib/constants").FRAUDNET_SOURCE,W=e("../lib/constants").FRAUDNET_URL,S={};function F(M){var $,K;if(M=M||{},$=JSON.stringify(M),K=M.gatewayConfiguration,!K)throw new l(I.CLIENT_MISSING_GATEWAY_CONFIGURATION);if(["assetsUrl","clientApiUrl","configUrl"].forEach(function(g){if(g in K&&!c(K[g]))throw new l({type:I.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:I.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:g+" property is on an invalid domain."})}),this.getConfiguration=function(){return JSON.parse($)},this._request=o,this._configuration=this.getConfiguration(),this._clientApiBaseUrl=K.clientApiUrl+"/v1/",K.graphQL){if(!c(K.graphQL.url))throw new l({type:I.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:I.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:"graphQL.url property is on an invalid domain."});this._graphQL=new s({graphQL:K.graphQL})}}F.initialize=function(M){var $,K,g=S[M.authorization];if(g)return A.sendEvent(g,"custom.client.load.cached"),g;try{K=h(M.authorization)}catch(_){return Promise.reject(new l(I.CLIENT_INVALID_AUTHORIZATION))}return g=u(K,M.sessionId).then(function(_){return M.debug&&(_.isDebug=!0),_.authorization=M.authorization,$=new F(_),$}),S[M.authorization]=g,A.sendEvent(g,"custom.client.load.initialized"),g.then(function(_){return A.sendEvent($,"custom.client.load.succeeded"),_}).catch(function(_){return delete S[M.authorization],Promise.reject(_)})},F.clearCache=function(){S={}},F.prototype._findOrCreateFraudnetJSON=function(M){var $=document.querySelector('script[fncls="'+U+'"]'),K,g,_,R;$||($=document.body.appendChild(document.createElement("script")),$.type="application/json",$.setAttribute("fncls",U)),K=this.getConfiguration(),g={rda_tenant:"bt_card",mid:K.gatewayConfiguration.merchantId},_=K.authorizationFingerprint,_&&_.split("&").forEach(function(j){var E=j.split("=");E[0]==="customer_id"&&E.length>1&&(g.cid=E[1])}),R={f:M.substr(0,32),fp:g,bu:!1,s:H},$.text=JSON.stringify(R)},F.prototype.request=function(M,$){var K=this,g=new Promise(function(_,R){var j,E,O,w,P=!!(M.endpoint==="payment_methods/credit_cards"&&K.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);if(M.api!=="graphQLApi"&&(M.method?M.endpoint||(j="options.endpoint"):j="options.method"),j)throw new l({type:I.CLIENT_OPTION_REQUIRED.type,code:I.CLIENT_OPTION_REQUIRED.code,message:j+" is required when making a request."});if("api"in M?E=M.api:E="clientApi",w={method:M.method,graphQL:K._graphQL,timeout:M.timeout,metadata:K._configuration.analyticsMetadata},E==="clientApi")O=K._clientApiBaseUrl,w.data=p.addMetadata(K._configuration,M.data);else if(E==="graphQLApi")O=C[K._configuration.gatewayConfiguration.environment],M.endpoint="",w.method="post",w.data=y({clientSdkMetadata:{platform:K._configuration.analyticsMetadata.platform,source:K._configuration.analyticsMetadata.source,integration:K._configuration.analyticsMetadata.integration,sessionId:K._configuration.analyticsMetadata.sessionId,version:L}},M.data),w.headers=te(K._configuration);else throw new l({type:I.CLIENT_OPTION_INVALID.type,code:I.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});w.url=O+M.endpoint,w.sendAnalyticsEvent=function(V){A.sendEvent(K,V)},K._request(w,function(V,N,G){var ee,de;if(de=q(G,V),de){R(de);return}if(E==="graphQLApi"&&N.errors){R(d(N.errors,{type:I.CLIENT_GRAPHQL_REQUEST_ERROR.type,code:I.CLIENT_GRAPHQL_REQUEST_ERROR.code,message:I.CLIENT_GRAPHQL_REQUEST_ERROR.message}));return}ee=y({_httpStatus:G},N),P&&ee.creditCards&&ee.creditCards.length>0&&(K._findOrCreateFraudnetJSON(ee.creditCards[0].nonce),k.loadScript({src:W,forceScriptReload:!0})),_(ee)})});if(typeof $=="function"){$=f(v($)),g.then(function(_){$(null,_,_._httpStatus)}).catch(function(_){var R=_&&_.details&&_.details.httpStatus;$(_,null,R)});return}return g};function q(M,$){var K;if(M===-1?K=new l(I.CLIENT_REQUEST_TIMEOUT):M===401?K=new l(I.CLIENT_AUTHORIZATION_INVALID):M===403?K=new l(I.CLIENT_AUTHORIZATION_INSUFFICIENT):M===429?K=new l(I.CLIENT_RATE_LIMITED):M>=500?K=new l(I.CLIENT_GATEWAY_NETWORK):(M<200||M>=400)&&(K=d($,{type:I.CLIENT_REQUEST_ERROR.type,code:I.CLIENT_REQUEST_ERROR.code,message:I.CLIENT_REQUEST_ERROR.message})),K)return K.details=K.details||{},K.details.httpStatus=M,K}F.prototype.toJSON=function(){return this.getConfiguration()},F.prototype.getVersion=function(){return L},F.prototype.teardown=m(function(){var M=this;return delete S[M.getConfiguration().authorization],x(M,T(F.prototype)),Promise.resolve()});function te(M){var $=M.authorizationFingerprint||M.authorization;return{Authorization:"Bearer "+$,"Braintree-Version":i}}n.exports=F},{"../lib/add-metadata":29,"../lib/analytics":30,"../lib/assets":31,"../lib/assign":32,"../lib/braintree-error":33,"../lib/constants":34,"../lib/convert-methods-to-error":35,"../lib/convert-to-braintree-error":36,"../lib/create-authorization-data":37,"../lib/deferred":38,"../lib/is-verified-domain":43,"../lib/methods":45,"../lib/once":46,"./constants":10,"./errors":11,"./get-configuration":12,"./request":25,"./request/graphql":23,"@braintree/wrap-promise":7}],10:[function(e,n,a){n.exports={BRAINTREE_VERSION:"2018-05-10"}},{}],11:[function(e,n,a){var i=e("../lib/braintree-error");n.exports={CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN:{type:i.types.MERCHANT,code:"CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN"},CLIENT_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"CLIENT_OPTION_REQUIRED"},CLIENT_OPTION_INVALID:{type:i.types.MERCHANT,code:"CLIENT_OPTION_INVALID"},CLIENT_MISSING_GATEWAY_CONFIGURATION:{type:i.types.INTERNAL,code:"CLIENT_MISSING_GATEWAY_CONFIGURATION",message:"Missing gatewayConfiguration."},CLIENT_INVALID_AUTHORIZATION:{type:i.types.MERCHANT,code:"CLIENT_INVALID_AUTHORIZATION",message:"Authorization is invalid. Make sure your client token or tokenization key is valid."},CLIENT_GATEWAY_NETWORK:{type:i.types.NETWORK,code:"CLIENT_GATEWAY_NETWORK",message:"Cannot contact the gateway at this time."},CLIENT_REQUEST_TIMEOUT:{type:i.types.NETWORK,code:"CLIENT_REQUEST_TIMEOUT",message:"Request timed out waiting for a reply."},CLIENT_REQUEST_ERROR:{type:i.types.NETWORK,code:"CLIENT_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_GRAPHQL_REQUEST_ERROR:{type:i.types.NETWORK,code:"CLIENT_GRAPHQL_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_RATE_LIMITED:{type:i.types.MERCHANT,code:"CLIENT_RATE_LIMITED",message:"You are being rate-limited; please try again in a few minutes."},CLIENT_AUTHORIZATION_INSUFFICIENT:{type:i.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INSUFFICIENT",message:"The authorization used has insufficient privileges."},CLIENT_AUTHORIZATION_INVALID:{type:i.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INVALID",message:"Either the client token has expired and a new one should be generated or the tokenization key has been deactivated or deleted."}}},{"../lib/braintree-error":33}],12:[function(e,n,a){var i=e("../lib/braintree-error"),s=e("@braintree/wrap-promise"),o=e("./request"),c=e("@braintree/uuid"),l=e("../lib/constants"),d=e("./errors"),u=e("./request/graphql"),h=e("../lib/constants").GRAPHQL_URLS,p=e("../lib/is-date-string-before-or-on"),m=e("./constants").BRAINTREE_VERSION;function f(v,y){return new Promise(function(A,I){var L,C,T,x,k=y||c(),U={merchantAppId:window.location.host,platform:l.PLATFORM,sdkVersion:l.VERSION,source:l.SOURCE,integration:l.INTEGRATION,integrationType:l.INTEGRATION,sessionId:k};C=v.attrs,T=v.configUrl,C._meta=U,C.braintreeLibraryVersion=l.BRAINTREE_LIBRARY_VERSION,C.configVersion="3",x={url:T,method:"GET",data:C},C.authorizationFingerprint&&v.graphQL?(p(v.graphQL.date,m)&&(x.graphQL=new u({graphQL:{url:v.graphQL.url,features:["configuration"]}})),x.metadata=U):C.tokenizationKey&&(x.graphQL=new u({graphQL:{url:h[v.environment],features:["configuration"]}}),x.metadata=U),o(x,function(H,W,S){var F;if(H){S===403?F=d.CLIENT_AUTHORIZATION_INSUFFICIENT:S===401?F=d.CLIENT_AUTHORIZATION_INVALID:F=d.CLIENT_GATEWAY_NETWORK,I(new i({type:F.type,code:F.code,message:F.message,details:{originalError:H}}));return}L={authorizationType:C.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:C.authorizationFingerprint,analyticsMetadata:U,gatewayConfiguration:W},A(L)})})}n.exports={getConfiguration:s(f)}},{"../lib/braintree-error":33,"../lib/constants":34,"../lib/is-date-string-before-or-on":41,"./constants":10,"./errors":11,"./request":25,"./request/graphql":23,"@braintree/uuid":3,"@braintree/wrap-promise":7}],13:[function(e,n,a){var i=e("../lib/braintree-error"),s=e("./client"),o="3.126.0",c=e("@braintree/wrap-promise"),l=e("../lib/errors");function d(u){return u.authorization?s.initialize(u):Promise.reject(new i({type:l.INSTANTIATION_OPTION_REQUIRED.type,code:l.INSTANTIATION_OPTION_REQUIRED.code,message:"options.authorization is required when instantiating a client."}))}n.exports={create:c(d),VERSION:o}},{"../lib/braintree-error":33,"../lib/errors":40,"./client":9,"@braintree/wrap-promise":7}],14:[function(e,n,a){var i=e("../../lib/querystring"),s=e("../../lib/assign").assign,o=e("./prep-body"),c=e("./parse-body"),l=e("./xhr"),d=l.isAvailable,u=e("./graphql/request"),h=e("./default-request"),p=1,m=408;function f(I){return!I||I===m}function v(I){var L=!I.data&&I.errors&&I.errors[0]&&I.errors[0].extensions&&I.errors[0].extensions.errorClass;return L==="UNKNOWN"||L==="INTERNAL"}function y(I,L,C){var T,x,k,U,H,W,S,F=I.url,q=I.graphQL,te=I.timeout,M=l.getRequestObject(),$=C,K=!!(q&&q.isGraphQLRequest(F,I.data));I.headers=s({"Content-Type":"application/json"},I.headers),K?k=new u(I):k=new h(I),F=k.getUrl(),U=k.getBody(),H=k.getMethod(),W=k.getHeaders(),H==="GET"&&(F=i.queryify(F,U),U=null),d?M.onreadystatechange=function(){if(M.readyState===4){if(M.status===0&&K){delete I.graphQL,y(I,L,C);return}if(S=c(M.responseText),x=k.adaptResponseBody(S),T=k.determineStatus(M.status,S),T>=400||T<200){if(K&&v(S)){delete I.graphQL,y(I,L,C);return}if(L<p&&f(T)){L++,y(I,L,C);return}$(x||"error",null,T||500)}else $(null,x,T)}}:(I.headers&&(F=i.queryify(F,W)),M.onload=function(){$(null,c(M.responseText),M.status)},M.onerror=function(){$("error",null,500)},M.onprogress=function(){},M.ontimeout=function(){$("timeout",null,-1)});try{M.open(H,F,!0)}catch(g){if(!K)throw g;delete I.graphQL,y(I,L,C);return}M.timeout=te,d&&Object.keys(W).forEach(function(g){M.setRequestHeader(g,W[g])});try{M.send(o(H,U))}catch(g){}}function A(I,L){y(I,0,L)}n.exports={request:A}},{"../../lib/assign":32,"../../lib/querystring":47,"./default-request":15,"./graphql/request":24,"./parse-body":26,"./prep-body":27,"./xhr":28}],15:[function(e,n,a){function i(s){this._url=s.url,this._data=s.data,this._method=s.method,this._headers=s.headers}i.prototype.getUrl=function(){return this._url},i.prototype.getBody=function(){return this._data},i.prototype.getMethod=function(){return this._method},i.prototype.getHeaders=function(){return this._headers},i.prototype.adaptResponseBody=function(s){return s},i.prototype.determineStatus=function(s){return s},n.exports=i},{}],16:[function(e,n,a){var i=e("./error"),s=e("../../../../lib/assign").assign,o={creditCard:{AMERICAN_EXPRESS:"American Express",DISCOVER:"Discover",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",SOLO:"Solo",UK_MAESTRO:"UK Maestro",UNION_PAY:"UnionPay",VISA:"Visa",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard"},applePayWeb:{VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",INTERNATIONAL_MAESTRO:"maestro",ELO:"elo"},visaCheckout:{VISA:"Visa",MASTERCARD:"MasterCard",DISCOVER:"Discover",AMERICAN_EXPRESS:"American Express"},googlePay:{VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",INTERNATIONAL_MAESTRO:"maestro",ELO:"elo"},masterpass:{VISA:"visa",MASTERCARD:"master",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",DINERS:"diners",INTERNATIONAL_MAESTRO:"maestro",JCB:"jcb"}};function c(u,h){var p;return u.data&&!u.errors?p=l(u,h):p=i(u),p}function l(u,h){var p=u.data.clientConfiguration,m;return m={environment:p.environment.toLowerCase(),clientApiUrl:p.clientApiUrl,assetsUrl:p.assetsUrl,analytics:{url:p.analyticsUrl},merchantId:p.merchantId,venmo:"off"},p.supportedFeatures&&(m.graphQL={url:h._graphQL._config.url,features:p.supportedFeatures.map(function(f){return f.toLowerCase()})}),p.braintreeApi&&(m.braintreeApi=p.braintreeApi),p.applePayWeb&&(m.applePayWeb=p.applePayWeb,m.applePayWeb.supportedNetworks=d(p.applePayWeb.supportedCardBrands,o.applePayWeb),delete m.applePayWeb.supportedCardBrands),p.fastlane&&(m.fastlane=p.fastlane),p.ideal&&(m.ideal=p.ideal),p.creditCard?(m.challenges=p.creditCard.challenges.map(function(f){return f.toLowerCase()}),m.creditCards={supportedCardTypes:d(p.creditCard.supportedCardBrands,o.creditCard)},m.threeDSecureEnabled=p.creditCard.threeDSecureEnabled,m.threeDSecure=p.creditCard.threeDSecure):(m.challenges=[],m.creditCards={supportedCardTypes:[]},m.threeDSecureEnabled=!1),p.googlePay&&(m.androidPay={displayName:p.googlePay.displayName,enabled:!0,environment:p.googlePay.environment.toLowerCase(),googleAuthorizationFingerprint:p.googlePay.googleAuthorization,paypalClientId:p.googlePay.paypalClientId,supportedNetworks:d(p.googlePay.supportedCardBrands,o.googlePay)}),p.venmo&&(m.payWithVenmo={merchantId:p.venmo.merchantId,accessToken:p.venmo.accessToken,environment:p.venmo.environment.toLowerCase(),enrichedCustomerDataEnabled:p.venmo.enrichedCustomerDataEnabled}),p.paypal?(m.paypalEnabled=!0,m.paypal=s({},p.paypal),m.paypal.currencyIsoCode=m.paypal.currencyCode,m.paypal.environment=m.paypal.environment.toLowerCase(),delete m.paypal.currencyCode):m.paypalEnabled=!1,p.unionPay&&(m.unionPay={enabled:!0,merchantAccountId:p.unionPay.merchantAccountId}),p.visaCheckout&&(m.visaCheckout={apikey:p.visaCheckout.apiKey,encryptionKey:p.visaCheckout.encryptionKey,externalClientId:p.visaCheckout.externalClientId,supportedCardTypes:d(p.visaCheckout.supportedCardBrands,o.visaCheckout)}),p.masterpass&&(m.masterpass={merchantCheckoutId:p.masterpass.merchantCheckoutId,supportedNetworks:d(p.masterpass.supportedCardBrands,o.masterpass)}),p.usBankAccount&&(m.usBankAccount={routeId:p.usBankAccount.routeId,plaid:{publicKey:p.usBankAccount.plaidPublicKey}}),m}function d(u,h){return u.reduce(function(p,m){return h.hasOwnProperty(m)?p.concat(h[m]):p},[])}n.exports=c},{"../../../../lib/assign":32,"./error":19}],17:[function(e,n,a){var i=e("./error"),s={AMERICAN_EXPRESS:"American Express",DINERS:"Discover",DISCOVER:"Discover",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",UK_MAESTRO:"Maestro",UNION_PAY:"UnionPay",VISA:"Visa"},o={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},c={PSDTWO:"psd2"};function l(u){var h;return u.data&&!u.errors?h=d(u):h=i(u),h}function d(u){var h=u.data.tokenizeCreditCardForPayPalConnect,p=h.paymentMethod.details,m=p.last4?p.last4.substr(2,4):"",f=p.binData,v,y;return f&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){f[A]?f[A]=o[f[A]]:f[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){f[A]||(f[A]="Unknown")})),v={creditCards:[{binData:f,consumed:!1,description:m?"ending in "+m:"",nonce:h.paymentMethod.id,details:{cardholderName:p.cardholderName,expirationMonth:p.expirationMonth,expirationYear:p.expirationYear,bin:p.bin||"",cardType:s[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:m},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(y=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[y]||y.toLowerCase()}),v}n.exports=l},{"./error":19}],18:[function(e,n,a){var i=e("./error"),s={AMERICAN_EXPRESS:"American Express",DINERS:"Discover",DISCOVER:"Discover",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",UK_MAESTRO:"Maestro",UNION_PAY:"UnionPay",VISA:"Visa"},o={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},c={PSDTWO:"psd2"};function l(u){var h;return u.data&&!u.errors?h=d(u):h=i(u),h}function d(u){var h=u.data.tokenizeCreditCard,p=h.creditCard,m=p.last4?p.last4.substr(2,4):"",f=p.binData,v,y;return f&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){f[A]?f[A]=o[f[A]]:f[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){f[A]||(f[A]="Unknown")})),v={creditCards:[{binData:f,consumed:!1,description:m?"ending in "+m:"",nonce:h.token,details:{cardholderName:p.cardholderName,expirationMonth:p.expirationMonth,expirationYear:p.expirationYear,bin:p.bin||"",cardType:s[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:m},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(y=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[y]||y.toLowerCase()}),v}n.exports=l},{"./error":19}],19:[function(e,n,a){function i(u){var h,p=u.errors&&u.errors[0]&&u.errors[0].extensions&&u.errors[0].extensions.errorClass;return p==="VALIDATION"?h=o(u):p?h=s(u):h={error:{message:"There was a problem serving your request"},fieldErrors:[]},h}function s(u){return{error:{message:u.errors[0].message},fieldErrors:[]}}function o(u){var h=c(u.errors);return h.length===0?{error:{message:u.errors[0].message}}:{error:{message:d(h)},fieldErrors:h}}function c(u){var h=[];return u.forEach(function(p){p.extensions&&p.extensions.inputPath&&l(p.extensions.inputPath.slice(1),p,h)}),h}function l(u,h,p){var m,f=h.extensions.legacyCode,v=u[0];if(u.length===1){p.push({code:f,field:v,message:h.message});return}p.forEach(function(y){y.field===v&&(m=y)}),m||(m={field:v,fieldErrors:[]},p.push(m)),l(u.slice(1),h,m.fieldErrors)}function d(u){var h={creditCard:"Credit card is invalid"},p=u[0].field;return h[p]}n.exports=i},{}],20:[function(e,n,a){var i="query ClientConfiguration { clientConfiguration { analyticsUrl environment merchantId assetsUrl clientApiUrl creditCard { supportedCardBrands challenges threeDSecureEnabled threeDSecure { cardinalAuthenticationJWT cardinalSongbirdUrl cardinalSongbirdIdentityHash } } applePayWeb { countryCode currencyCode merchantIdentifier supportedCardBrands } fastlane { enabled tokensOnDemand { enabled tokenExchange { enabled } } } googlePay { displayName supportedCardBrands environment googleAuthorization paypalClientId } ideal { routeId assetsUrl } masterpass { merchantCheckoutId supportedCardBrands } paypal { displayName clientId assetsUrl environment environmentNoNetwork unvettedMerchant braintreeClientId billingAgreementsEnabled merchantAccountId currencyCode payeeEmail } unionPay { merchantAccountId } usBankAccount { routeId plaidPublicKey } venmo { merchantId accessToken environment enrichedCustomerDataEnabled } visaCheckout { apiKey externalClientId supportedCardBrands } braintreeApi { accessToken url } supportedFeatures } }";function s(){return{query:i,operationName:"ClientConfiguration"}}n.exports=s},{}],21:[function(e,n,a){var i=e("../../../../lib/assign").assign;function s(u){var h=u.hasAuthenticationInsight,p="mutation TokenizeCreditCardForPayPalConnect($input: TokenizeCreditCardForPayPalConnectInput!";return h&&(p+=", $authenticationInsightInput: AuthenticationInsightInput!"),p+=") { tokenizeCreditCardForPayPalConnect(input: $input) { clientMutationId paymentMethod { id details { ... on CreditCardDetails { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId business consumer purchase corporate } } } }",h&&(p+=" authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }"),p+=" } }",p}function o(u,h){var p=u.creditCard,m=p.fastlane||{},f="fastlane"in p&&"termsAndConditionsVersion"in p.fastlane&&p.fastlane.termsAndConditionsVersion,v="fastlane"in p&&"termsAndConditionsCountry"in p.fastlane&&p.fastlane.termsAndConditionsCountry,y=p.email,A="hasBuyerConsent"in m&&m.hasBuyerConsent,I=p.shippingAddress,L=c(u,h),C=i({},L.input,{email:y,optIn:A,phone:p.phone});return f&&(C.termsAndConditionsVersion=f),v&&(C.termsAndConditionsCountry=v),"authAssertion"in m&&(C.authAssertion=m.authAssertion),I&&(C.shippingAddress=I),{input:C}}function c(u,h){var p=u.creditCard,m=p&&p.billingAddress,f=p&&p.expirationDate,v=p&&(p.expirationMonth||f&&f.split("/")[0].trim()),y=p&&(p.expirationYear||f&&f.split("/")[1].trim()),A={input:{creditCard:{number:p&&p.number,expirationMonth:v,expirationYear:y,cvv:p&&p.cvv,cardholderName:p&&p.cardholderName},options:{}}};return h.hasAuthenticationInsight&&(A.authenticationInsightInput={merchantAccountId:u.merchantAccountId}),m&&(A.input.creditCard.billingAddress=m),A.input=l(u,A.input),A}function l(u,h){var p;return u.creditCard&&u.creditCard.options&&typeof u.creditCard.options.validate=="boolean"?p=u.creditCard.options.validate:u.authorizationFingerprint&&u.tokenizationKey||u.authorizationFingerprint?p=!0:u.tokenizationKey&&(p=!1),typeof p=="boolean"&&(h.options=i({validate:p},h.options)),h}function d(u){var h={hasAuthenticationInsight:!!(u.authenticationInsight&&u.merchantAccountId)};return{query:s(h),variables:o(u,h),operationName:"TokenizeCreditCardForPayPalConnect"}}n.exports=d},{"../../../../lib/assign":32}],22:[function(e,n,a){var i=e("../../../../lib/assign").assign;function s(d){var u=d.hasAuthenticationInsight,h="mutation TokenizeCreditCard($input: TokenizeCreditCardInput!";return u&&(h+=", $authenticationInsightInput: AuthenticationInsightInput!"),h+=") { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId business consumer purchase corporate } } ",u&&(h+=" authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }"),h+=" } }",h}function o(d,u){var h=d.creditCard,p=h&&h.billingAddress,m=h&&h.expirationDate,f=h&&(h.expirationMonth||m&&m.split("/")[0].trim()),v=h&&(h.expirationYear||m&&m.split("/")[1].trim()),y={input:{creditCard:{number:h&&h.number,expirationMonth:f,expirationYear:v,cvv:h&&h.cvv,cardholderName:h&&h.cardholderName},options:{}}};return u.hasAuthenticationInsight&&(y.authenticationInsightInput={merchantAccountId:d.merchantAccountId}),p&&(y.input.creditCard.billingAddress=p),y.input=c(d,y.input),y}function c(d,u){var h;return d.creditCard&&d.creditCard.options&&typeof d.creditCard.options.validate=="boolean"?h=d.creditCard.options.validate:d.authorizationFingerprint&&d.tokenizationKey||d.authorizationFingerprint?h=!0:d.tokenizationKey&&(h=!1),typeof h=="boolean"&&(u.options=i({validate:h},u.options)),u}function l(d){var u={hasAuthenticationInsight:!!(d.authenticationInsight&&d.merchantAccountId)};return{query:s(u),variables:o(d,u),operationName:"TokenizeCreditCard"}}n.exports=l},{"../../../../lib/assign":32}],23:[function(e,n,a){var i={tokenize_credit_cards:"payment_methods/credit_cards",configuration:"configuration"},s=["creditCard.options.unionPayEnrollment"];function o(l){this._config=l.graphQL}o.prototype.getGraphQLEndpoint=function(){return this._config.url},o.prototype.isGraphQLRequest=function(l,d){var u,h=this.getClientApiPath(l);return!this._isGraphQLEnabled()||!h||(u=this._config.features.some(function(p){return i[p]===h}),c(d))?!1:u},o.prototype.getClientApiPath=function(l){var d,u="/client_api/v1/",h=l.split(u);return h.length>1&&(d=h[1].split("?")[0]),d},o.prototype._isGraphQLEnabled=function(){return!!this._config};function c(l){return s.some(function(d){var u=d.split(".").reduce(function(h,p){return h&&h[p]},l);return u!==void 0})}n.exports=o},{}],24:[function(e,n,a){var i=e("../../constants").BRAINTREE_VERSION,s=e("../../../lib/assign").assign,o=e("../../../lib/snake-case-to-camel-case"),c=e("../../../lib/is-fastlane-checkout"),l=e("./generators/credit-card-tokenization"),d=e("./adapters/credit-card-tokenization"),u=e("./adapters/credit-card-tokenization-fastlane"),h=e("./generators/credit-card-for-fastlane-tokenization"),p=e("./generators/configuration"),m=e("./adapters/configuration"),f={"payment_methods/credit_cards":function(L,C){return C?h(L):l(L)},configuration:p},v={"payment_methods/credit_cards":function(L,C,T){return T?u(L,C):d(L,C)},configuration:m};function y(L){var C=L.graphQL.getClientApiPath(L.url);this._graphQL=L.graphQL,this._data=L.data,this._method=L.method,this._headers=L.headers,this._clientSdkMetadata={source:L.metadata.source,integration:L.metadata.integration,sessionId:L.metadata.sessionId},this._sendAnalyticsEvent=L.sendAnalyticsEvent||Function.prototype,this._generator=f[C],this._adapter=v[C],this._sendAnalyticsEvent("graphql.init")}y.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},y.prototype.getBody=function(){var L=I(this._data),C=this._generator(L,c(this._data.creditCard)),T=s({clientSdkMetadata:this._clientSdkMetadata},C);return JSON.stringify(T)},y.prototype.getMethod=function(){return"POST"},y.prototype.getHeaders=function(){var L,C;return this._data.authorizationFingerprint?(this._sendAnalyticsEvent("graphql.authorization-fingerprint"),L=this._data.authorizationFingerprint):(this._sendAnalyticsEvent("graphql.tokenization-key"),L=this._data.tokenizationKey),C={Authorization:"Bearer "+L,"Braintree-Version":i},s({},this._headers,C)},y.prototype.adaptResponseBody=function(L){return this._adapter(L,this,"creditCard"in this._data&&c(this._data.creditCard))},y.prototype.determineStatus=function(L,C){var T,x;return L===200?(x=C.errors&&C.errors[0]&&C.errors[0].extensions&&C.errors[0].extensions.errorClass,C.data&&!C.errors?T=200:x==="VALIDATION"?T=422:x==="AUTHORIZATION"?T=403:x==="AUTHENTICATION"?T=401:A(x,C)?T=403:T=500):L?T=L:T=500,this._sendAnalyticsEvent("graphql.status."+L),this._sendAnalyticsEvent("graphql.determinedStatus."+T),T};function A(L,C){return!L&&C.errors[0].message}function I(L){var C={};return Object.keys(L).forEach(function(T){var x=o(T);typeof L[T]=="object"?C[x]=I(L[T]):typeof L[T]=="number"?C[x]=String(L[T]):C[x]=L[T]}),C}n.exports=y},{"../../../lib/assign":32,"../../../lib/is-fastlane-checkout":42,"../../../lib/snake-case-to-camel-case":48,"../../constants":10,"./adapters/configuration":16,"./adapters/credit-card-tokenization":18,"./adapters/credit-card-tokenization-fastlane":17,"./generators/configuration":20,"./generators/credit-card-for-fastlane-tokenization":21,"./generators/credit-card-tokenization":22}],25:[function(e,n,a){var i=e("../../lib/once"),s=e("./ajax-driver");n.exports=function(o,c){c=i(c||Function.prototype),o.method=(o.method||"GET").toUpperCase(),o.timeout=o.timeout==null?6e4:o.timeout,o.data=o.data||{},s.request(o,c)}},{"../../lib/once":46,"./ajax-driver":14}],26:[function(e,n,a){n.exports=function(i){try{i=JSON.parse(i)}catch(s){}return i}},{}],27:[function(e,n,a){n.exports=function(i,s){if(typeof i!="string")throw new Error("Method must be a string");return i.toLowerCase()!=="get"&&s!=null&&(s=typeof s=="string"?s:JSON.stringify(s)),s}},{}],28:[function(e,n,a){var i=typeof window!="undefined"&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest;function s(){return i?new window.XMLHttpRequest:new window.XDomainRequest}n.exports={isAvailable:i,getRequestObject:s}},{}],29:[function(e,n,a){var i=e("./create-authorization-data"),s=e("./json-clone"),o=e("./constants");function c(d,u){var h,p=u?s(u):{},m=i(d.authorization).attrs,f=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(f[h]=p._meta[h]);return p._meta=f,m.tokenizationKey?p.tokenizationKey=m.tokenizationKey:p.authorizationFingerprint=m.authorizationFingerprint,p}function l(d){var u=d.getConfiguration(),h=i(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",m={api_integration_type:u.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:o.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:o.PLATFORM,platform_version:window.navigator.userAgent,session_id:u.analyticsMetadata.sessionId,client_session_id:u.analyticsMetadata.sessionId,tenant_name:"braintree",product_name:"BT_DCC",space_key:"SKDUYK"};return h.tokenizationKey?m.tokenization_key=h.tokenizationKey:m.auth_fingerprint=h.authorizationFingerprint,m}n.exports={addMetadata:c,addEventMetadata:l}},{"./constants":34,"./create-authorization-data":37,"./json-clone":44}],30:[function(e,n,a){var i=e("./constants"),s=e("./add-metadata"),o=e("./assign").assign;function c(u,h,p){return l(u,h,{},p)}function l(u,h,p,m){var f=Date.now();return p.flow==="vault"?p.context_type="BA_Token":p.flow==="checkout"&&(p.context_type="EC_Token"),Promise.resolve(u).then(function(v){var y=v._request,A=i.ANALYTICS_URL,I=i.ANALYTICS_PREFIX+h,L=v.getConfiguration(),C=L.gatewayConfiguration.environment==="production",T={events:[],tracking:[]},x=s.addEventMetadata(v,T);return x.event_name=I,x.t=f,T.events=[{level:"info",event:I,payload:o({env:C?"production":"sandbox",timestamp:f},p)}],T.tracking=[x],p&&typeof p=="object"&&(T.tracking=[d(x,p)]),y({url:A,method:"post",data:T,timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},m)}).catch(function(v){m&&m(v)})}function d(u,h){var p={},m=o({},h);return Object.keys(m).forEach(function(f){i.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(f)===-1&&delete m[f]}),p=o(u,m),p}n.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":29,"./assign":32,"./constants":34}],31:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":8}],32:[function(e,n,a){var i=typeof Object.assign=="function"?Object.assign:s;function s(o){var c,l,d;for(c=1;c<arguments.length;c++){l=arguments[c];for(d in l)l.hasOwnProperty(d)&&(o[d]=l[d])}return o}n.exports={assign:i,_assign:s}},{}],33:[function(e,n,a){var i=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":39}],34:[function(e,n,a){var i="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],35:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new i({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:l+" cannot be called after teardown."})}})}},{"./braintree-error":33,"./errors":40}],36:[function(e,n,a){var i=e("./braintree-error");function s(o,c){return o instanceof i?o:new i({type:c.type,code:c.code,message:c.message,details:{originalError:o}})}n.exports=s},{"./braintree-error":33}],37:[function(e,n,a){var i=e("../lib/vendor/polyfill").atob,s=e("../lib/constants").CLIENT_API_URLS;function o(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function c(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function l(d){var u,h,p={attrs:{},configUrl:""};return o(d)?(h=c(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(i(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=l},{"../lib/constants":34,"../lib/vendor/polyfill":49}],38:[function(e,n,a){n.exports=function(i){return function(){var s=arguments;setTimeout(function(){i.apply(null,s)},1)}}},{}],39:[function(e,n,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=i},{}],40:[function(e,n,a){var i=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:i.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:i.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:i.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:i.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":33}],41:[function(e,n,a){function i(o){var c=o.split("-");return new Date(c[0],c[1],c[2])}function s(o,c){return i(o)<=i(c)}n.exports=s},{}],42:[function(e,n,a){n.exports=function(i){return i&&i.hasOwnProperty("fastlane")&&i.fastlane}},{}],43:[function(e,n,a){var i,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(l){return l.split(".").slice(-2).join(".")}function c(l){var d;return l=l.toLowerCase(),/^https:/.test(l)?(i=i||document.createElement("a"),i.href=l,d=o(i.hostname),s.hasOwnProperty(d)):!1}n.exports=c},{}],44:[function(e,n,a){n.exports=function(i){return JSON.parse(JSON.stringify(i))}},{}],45:[function(e,n,a){n.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}],46:[function(e,n,a){function i(s){var o=!1;return function(){o||(o=!0,s.apply(null,arguments))}}n.exports=i},{}],47:[function(e,n,a){function i(u){var h;for(h in u)if(u.hasOwnProperty(h))return!0;return!1}function s(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function o(u){return u=u||window.location.href,/\?/.test(u)}function c(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(m,f){var v=f.split("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return m[y]=A,m},{}),p):{}}function l(u,h){var p,m,f,v=[];for(f in u)u.hasOwnProperty(f)&&(m=u[f],h?s(u)?p=h+"[]":p=h+"["+f+"]":p=f,typeof m=="object"?v.push(l(m,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(m)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&i(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=l(h)),u}n.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],48:[function(e,n,a){n.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],49:[function(e,n,a){var i=typeof atob=="function"?atob:s;function s(o){var c,l,d,u,h,p,m,f,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");f=0;do u=y.indexOf(o.charAt(f++)),h=y.indexOf(o.charAt(f++)),p=y.indexOf(o.charAt(f++)),m=y.indexOf(o.charAt(f++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|m&63,A+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(f<o.length);return A}n.exports={atob:function(o){return i.call(window,o)},_atob:s}},{}]},{},[13])(13)})}(br)),br.exports}var gc=vc();const yc=ri(gc);var _r={exports:{}},Ii;function bc(){return Ii||(Ii=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,a,i){function s(l,d){if(!a[l]){if(!n[l]){var u=typeof Le=="function"&&Le;if(!d&&u)return u(l,!0);if(o)return o(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[l]={exports:{}};n[l][0].call(p.exports,function(m){var f=n[l][1][m];return s(f||m)},p,p.exports,e,n,a,i)}return a[l].exports}for(var o=typeof Le=="function"&&Le,c=0;c<i.length;c++)s(i[c]);return s}return e}()({1:[function(e,n,a){var i={};function s(o){var c,l=JSON.stringify(o);if(!o.forceScriptReload&&(c=i[l],c))return c;var d=document.createElement("script"),u=o.dataAttributes||{},h=o.container||document.head;return d.src=o.src,d.id=o.id||"",d.async=!0,o.type&&d.setAttribute("type","".concat(o.type)),o.crossorigin&&d.setAttribute("crossorigin","".concat(o.crossorigin)),o.integrity&&d.setAttribute("integrity","".concat(o.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),c=new Promise(function(p,m){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){m(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){m(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),i[l]=c,c}s.clearCache=function(){i={}},n.exports=s},{}],2:[function(e,n,a){n.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,/Android/i.test(s)}},{}],4:[function(e,n,a){var i=e("./is-edge"),s=e("./is-samsung"),o=e("./is-duckduckgo"),c=e("./is-opera"),l=e("./is-silk");n.exports=function(u){return u=u||window.navigator.userAgent,(u.indexOf("Chrome")!==-1||u.indexOf("CriOS")!==-1)&&!i(u)&&!s(u)&&!o(u)&&!c(u)&&!l(u)}},{"./is-duckduckgo":5,"./is-edge":6,"./is-opera":14,"./is-samsung":15,"./is-silk":16}],5:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("DuckDuckGo/")!==-1}},{}],6:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Edge/")!==-1||s.indexOf("Edg/")!==-1}},{}],7:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,/FxiOS/i.test(s)}},{}],8:[function(e,n,a){var i=e("./is-ios");function s(o){return/\bGSA\b/.test(o)}n.exports=function(c){return c=c||window.navigator.userAgent,i(c)&&s(c)}},{"./is-ios":12}],9:[function(e,n,a){var i=e("./is-ios"),s=e("./is-ios-firefox"),o=/webkit/i;function c(u){return o.test(u)}function l(u){return u.indexOf("CriOS")>-1}function d(u){return u.indexOf("FBAN")>-1}n.exports=function(h){return h=h||window.navigator.userAgent,i(h)&&c(h)&&!l(h)&&!s(h)&&!d(h)}},{"./is-ios":12,"./is-ios-firefox":7}],10:[function(e,n,a){var i=e("./is-ios"),s=e("./is-ios-google-search-app");n.exports=function(c){return c=c||window.navigator.userAgent,i(c)?s(c)?!0:/.+AppleWebKit(?!.*Safari)/i.test(c):!1}},{"./is-ios":12,"./is-ios-google-search-app":8}],11:[function(e,n,a){var i=e("./is-ios-webview");n.exports=function(o,c){return c=typeof c!="undefined"?c:window.statusbar.visible,i(o)&&c}},{"./is-ios-webview":10}],12:[function(e,n,a){var i=e("./is-ipados");n.exports=function(o,c,l){c===void 0&&(c=!0),o=o||window.navigator.userAgent;var d=/iPhone|iPod|iPad/i.test(o);return c?d||i(o,l):d}},{"./is-ipados":13}],13:[function(e,n,a){n.exports=function(s,o){return s=s||window.navigator.userAgent,o=o||window.document,/Mac|iPad/i.test(s)&&"ontouchend"in o}},{}],14:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("OPR/")!==-1||s.indexOf("Opera/")!==-1||s.indexOf("OPT/")!==-1}},{}],15:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,/SamsungBrowser/i.test(s)}},{}],16:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Silk/")!==-1}},{}],17:[function(e,n,a){var i=48,s=e("./is-android"),o=e("./is-ios-firefox"),c=e("./is-ios-webview"),l=e("./is-chrome"),d=e("./is-samsung"),u=e("./is-duckduckgo");function h(v){v=v||window.navigator.userAgent;var y=v.match(/CriOS\/(\d+)\./);if(!y)return!1;var A=parseInt(y[1],10);return A<i}function p(v){return v=v||window.navigator.userAgent,v.indexOf("Opera Mini")>-1}function m(v){var y=/Version\/[\d.]+/i;return v=v||window.navigator.userAgent,s(v)?y.test(v)&&!p(v)&&!u(v):!1}function f(v){return!l(v)&&!d(v)&&/samsung/i.test(v)}n.exports=function(y){return y=y||window.navigator.userAgent,!(c(y)||o(y)||m(y)||p(y)||h(y)||f(y))}},{"./is-android":3,"./is-chrome":4,"./is-duckduckgo":5,"./is-ios-firefox":7,"./is-ios-webview":10,"./is-samsung":15}],18:[function(e,n,a){n.exports=e("./dist/is-android")},{"./dist/is-android":3}],19:[function(e,n,a){n.exports=e("./dist/is-chrome")},{"./dist/is-chrome":4}],20:[function(e,n,a){n.exports=e("./dist/is-ios-safari")},{"./dist/is-ios-safari":9}],21:[function(e,n,a){n.exports=e("./dist/is-ios-webview")},{"./dist/is-ios-webview":10}],22:[function(e,n,a){n.exports=e("./dist/is-ios-wkwebview")},{"./dist/is-ios-wkwebview":11}],23:[function(e,n,a){n.exports=e("./dist/is-ios")},{"./dist/is-ios":12}],24:[function(e,n,a){n.exports=e("./dist/is-samsung")},{"./dist/is-samsung":15}],25:[function(e,n,a){n.exports=e("./dist/supports-popups")},{"./dist/supports-popups":17}],26:[function(e,n,a){var i=typeof Promise!="undefined"?Promise:null,s=function(){function o(c){var l=this;if(typeof c=="function"){this._promise=new o.Promise(c);return}this._promise=new o.Promise(function(d,u){l._resolveFunction=d,l._rejectFunction=u}),c=c||{},this._onResolve=c.onResolve||o.defaultOnResolve,this._onReject=c.onReject||o.defaultOnReject,o.shouldCatchExceptions(c)&&this._promise.catch(function(){}),this._resetState()}return o.defaultOnResolve=function(c){return o.Promise.resolve(c)},o.defaultOnReject=function(c){return o.Promise.reject(c)},o.setPromise=function(c){o.Promise=c},o.shouldCatchExceptions=function(c){return c.hasOwnProperty("suppressUnhandledPromiseMessage")?!!c.suppressUnhandledPromiseMessage:!!o.suppressUnhandledPromiseMessage},o.all=function(c){return o.Promise.all(c)},o.allSettled=function(c){return o.Promise.allSettled(c)},o.race=function(c){return o.Promise.race(c)},o.reject=function(c){return o.Promise.reject(c)},o.resolve=function(c){return o.Promise.resolve(c)},o.prototype.then=function(){for(var c,l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];return(c=this._promise).then.apply(c,l)},o.prototype.catch=function(){for(var c,l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];return(c=this._promise).catch.apply(c,l)},o.prototype.resolve=function(c){var l=this;return this.isFulfilled?this:(this._setResolved(),o.Promise.resolve().then(function(){return l._onResolve(c)}).then(function(d){l._resolveFunction(d)}).catch(function(d){l._resetState(),l.reject(d)}),this)},o.prototype.reject=function(c){var l=this;return this.isFulfilled?this:(this._setRejected(),o.Promise.resolve().then(function(){return l._onReject(c)}).then(function(d){l._setResolved(),l._resolveFunction(d)}).catch(function(d){return l._rejectFunction(d)}),this)},o.prototype._resetState=function(){this.isFulfilled=!1,this.isResolved=!1,this.isRejected=!1},o.prototype._setResolved=function(){this.isFulfilled=!0,this.isResolved=!0,this.isRejected=!1},o.prototype._setRejected=function(){this.isFulfilled=!0,this.isResolved=!1,this.isRejected=!0},o.Promise=i,o}();n.exports=s},{}],27:[function(e,n,a){var i=e("./lib/set-attributes"),s=e("./lib/default-attributes"),o=e("./lib/assign");n.exports=function(l){l===void 0&&(l={});var d=document.createElement("iframe"),u=(0,o.assign)({},s.defaultAttributes,l);return u.style&&typeof u.style!="string"&&((0,o.assign)(d.style,u.style),delete u.style),(0,i.setAttributes)(d,u),d.getAttribute("id")||(d.id=d.name),d}},{"./lib/assign":28,"./lib/default-attributes":29,"./lib/set-attributes":30}],28:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.assign=void 0;function i(s){for(var o=[],c=1;c<arguments.length;c++)o[c-1]=arguments[c];return o.forEach(function(l){typeof l=="object"&&Object.keys(l).forEach(function(d){s[d]=l[d]})}),s}a.assign=i},{}],29:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.defaultAttributes=void 0,a.defaultAttributes={src:"about:blank",frameBorder:0,allowtransparency:!0,scrolling:"no"}},{}],30:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.setAttributes=void 0;function i(s,o){for(var c in o)if(o.hasOwnProperty(c)){var l=o[c];l==null?s.removeAttribute(c):s.setAttribute(c,l)}}a.setAttributes=i},{}],31:[function(e,n,a){function i(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var o=Math.random()*16|0,c=s==="x"?o:o&3|8;return c.toString(16)})}n.exports=i},{}],32:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){return function(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];setTimeout(function(){try{s.apply(void 0,o)}catch(l){console.log("Error in callback function"),console.log(l)}},1)}}a.deferred=i},{}],33:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){var o=!1;return function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];o||(o=!0,s.apply(void 0,c))}}a.once=i},{}],34:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s,o){if(!o)return s;s.then(function(c){return o(null,c)}).catch(function(c){return o(c)})}a.promiseOrCallback=i},{}],35:[function(e,n,a){var i=e("./lib/deferred"),s=e("./lib/once"),o=e("./lib/promise-or-callback");function c(l){return function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];var h,p=d[d.length-1];return typeof p=="function"&&(h=d.pop(),h=s.once(i.deferred(h))),o.promiseOrCallback(l.apply(this,d),h)}}c.wrapPrototype=function(l,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(l.prototype).filter(function(m){var f,v=m!=="constructor"&&typeof l.prototype[m]=="function",y=u.indexOf(m)===-1;return h?f=!0:f=m.charAt(0)!=="_",v&&f&&y});return p.forEach(function(m){var f=l.prototype[m];l.prototype[m]=c(f)}),l},n.exports=c},{"./lib/deferred":32,"./lib/once":33,"./lib/promise-or-callback":34}],36:[function(e,n,a){(function(i,s){typeof a=="object"&&typeof n!="undefined"?s(a):(i=typeof globalThis!="undefined"?globalThis:i||self,s(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
|
|
362
362
|
Copyright (c) Microsoft Corporation.
|
|
363
363
|
|
|
364
364
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
372
372
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
373
373
|
PERFORMANCE OF THIS SOFTWARE.
|
|
374
|
-
***************************************************************************** */function s(E,O,w,k){function V(N){return N instanceof w?N:new w(function(G){G(N)})}return new(w||(w=Promise))(function(N,G){function J(ae){try{D(k.next(ae))}catch(Ae){G(Ae)}}function de(ae){try{D(k.throw(ae))}catch(Ae){G(Ae)}}function D(ae){ae.done?N(ae.value):V(ae.value).then(J,de)}D((k=k.apply(E,[])).next())})}function o(E,O){var w={label:0,sent:function(){if(N[0]&1)throw N[1];return N[1]},trys:[],ops:[]},k,V,N,G;return G={next:J(0),throw:J(1),return:J(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function J(D){return function(ae){return de([D,ae])}}function de(D){if(k)throw new TypeError("Generator is already executing.");for(;w;)try{if(k=1,V&&(N=D[0]&2?V.return:D[0]?V.throw||((N=V.return)&&N.call(V),0):V.next)&&!(N=N.call(V,D[1])).done)return N;switch(V=0,N&&(D=[D[0]&2,N.value]),D[0]){case 0:case 1:N=D;break;case 4:return w.label++,{value:D[1],done:!1};case 5:w.label++,V=D[1],D=[0];continue;case 7:D=w.ops.pop(),w.trys.pop();continue;default:if(N=w.trys,!(N=N.length>0&&N[N.length-1])&&(D[0]===6||D[0]===2)){w=0;continue}if(D[0]===3&&(!N||D[1]>N[0]&&D[1]<N[3])){w.label=D[1];break}if(D[0]===6&&w.label<N[1]){w.label=N[1],N=D;break}if(N&&w.label<N[2]){w.label=N[2],w.ops.push(D);break}N[2]&&w.ops.pop(),w.trys.pop();continue}D=O.call(E,w)}catch(ae){D=[6,ae],V=0}finally{k=N=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}}var l={},c={};function d(E){var O,w=JSON.stringify(E);if(!E.forceScriptReload&&(O=c[w],O))return O;var k=document.createElement("script"),V=E.dataAttributes||{},N=E.container||document.head;return k.src=E.src,k.id=E.id||"",k.async=!0,E.type&&k.setAttribute("type","".concat(E.type)),E.crossorigin&&k.setAttribute("crossorigin","".concat(E.crossorigin)),Object.keys(V).forEach(function(G){k.setAttribute("data-".concat(G),"".concat(V[G]))}),O=new Promise(function(G,J){k.addEventListener("load",function(){G(k)}),k.addEventListener("error",function(){J(new Error("".concat(E.src," failed to load.")))}),k.addEventListener("abort",function(){J(new Error("".concat(E.src," has aborted.")))}),N.appendChild(k)}),c[w]=O,O}d.clearCache=function(){c={}};var u=d,h=function(O){var w=document.querySelector('link[href="'.concat(O.href,'"]'));if(w)return Promise.resolve(w);w=document.createElement("link");var k=O.container||document.head;return w.setAttribute("rel","stylesheet"),w.setAttribute("type","text/css"),w.setAttribute("href",O.href),w.setAttribute("id",O.id),k.firstChild?k.insertBefore(w,k.firstChild):k.appendChild(w),Promise.resolve(w)};Object.defineProperty(l,"__esModule",{value:!0}),l.loadStylesheet=m=l.loadScript=void 0;var p=u,m=l.loadScript=p,f=h;l.loadStylesheet=f;var v="https://www.paypalobjects.com",b={minified:"axo.min",unminified:"axo"},A="fastlane",T="connect-boba",L="".concat(T,"/locales/"),C={AXO_ASSET_NAME:b,AXO_ASSET_PATH:T,LOCALE_PATH:L,CDNX_PROD:v},I={BT:"BT",PPCP:"PPCP"};function x(){return typeof window.define=="function"&&!!window.define.amd}function P(){return x()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function U(E,O,w){var k,V;return w===void 0&&(w=!0),s(this,void 0,void 0,function(){var N,G;return o(this,function(J){if(N=W(),N&&N[E.module]){if(O&&((k=N[E.module])===null||k===void 0?void 0:k.VERSION)!==O)throw G=(V=N[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(G," cannot load version ").concat(O));return[2,!0]}if(!O)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,H(E,O,w)]})})}function H(E,O,w){if(w===void 0&&(w=!0),x()){var k=w?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(N,G){window.require([k],N,G)})}var V=w?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(O),src:"https://js.braintreegateway.com/web/".concat(O,"/js/").concat(V)})}function W(){return window==null?void 0:window.braintree}var S,F,q={Client:"client",HostedCardFields:"hostedFields"},ee="braintree",M=(S={},S[q.Client]="client",S[q.HostedCardFields]="hosted-fields",S),$=(F={},F[q.Client]={id:"client",module:q.Client,amdModule:{unminified:"".concat(ee,"/").concat(M[q.Client]),minified:"".concat(ee,"/").concat(M[q.Client],".min")},script:{unminified:"".concat(M[q.Client],".js"),minified:"".concat(M[q.Client],".min.js")}},F[q.HostedCardFields]={id:"hcf",module:q.HostedCardFields,amdModule:{unminified:"".concat(ee,"/").concat(M[q.HostedCardFields]),minified:"".concat(ee,"/").concat(M[q.HostedCardFields],".min")},script:{unminified:"".concat(M[q.HostedCardFields],".js"),minified:"".concat(M[q.HostedCardFields],".min.js")}},F);function K(E){return s(this,void 0,void 0,function(){var O,w,k,V;return o(this,function(N){switch(N.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),O=E.btSdkVersion,w=E.minified,k=R(E),V=B(E),E.platform!==I.BT?[3,2]:[4,Promise.all([U($.hostedFields,O,w),g(k,w)])];case 1:return N.sent(),[3,5];case 2:return E.platform!==I.PPCP?[3,4]:[4,Promise.all([U($.client,O,w),U($.hostedFields,O,w),g(k,w)])];case 3:return N.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,O){var w;if(O===void 0&&(O=!0),x()){P()&&requirejs.config({paths:(w={},w[A]=E,w)});var k="".concat(A,"/").concat(O?C.AXO_ASSET_NAME.minified:C.AXO_ASSET_NAME.unminified);return new Promise(function(V,N){window.require([k],V,N)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var O=E.assetUrl,w=E.bundleId;return w?"https://cdn-".concat(w,".static.engineering.dev.paypalinc.com/").concat(O):"".concat(C.CDNX_PROD,"/").concat(O)}function R(E){var O,w=(E==null?void 0:E.minified)!==!1?C.AXO_ASSET_NAME.minified:C.AXO_ASSET_NAME.unminified,k=x()?C.AXO_ASSET_PATH:"".concat(C.AXO_ASSET_PATH,"/").concat(w,".js");return _({assetUrl:k,bundleId:(O=E==null?void 0:E.metadata)===null||O===void 0?void 0:O.bundleIdOverride})}function B(E){var O;return _({assetUrl:C.LOCALE_PATH,bundleId:(O=E==null?void 0:E.metadata)===null||O===void 0?void 0:O.bundleIdOverride})}a.constants=C,a.loadAxo=K})},{}],37:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Framebus=void 0;var a=e("./lib"),s=typeof window!="undefined"&&window.Promise,o=function(){function l(c){c===void 0&&(c={}),this.origin=c.origin||"*",this.channel=c.channel||"",this.verifyDomain=c.verifyDomain,this.targetFrames=c.targetFrames||[],this.limitBroadcastToFramesArray=!!c.targetFrames,this.isDestroyed=!1,this.listeners=[],this.hasAdditionalChecksForOnListeners=!!(this.verifyDomain||this.limitBroadcastToFramesArray)}return l.setPromise=function(c){l.Promise=c},l.target=function(c){return new l(c)},l.prototype.addTargetFrame=function(c){this.limitBroadcastToFramesArray&&this.targetFrames.push(c)},l.prototype.include=function(c){return c==null||c.Window==null||c.constructor!==c.Window?!1:(a.childWindows.push(c),!0)},l.prototype.target=function(c){return l.target(c)},l.prototype.emit=function(c,d,u){if(this.isDestroyed)return!1;var h=this.origin;if(c=this.namespaceEvent(c),(0,a.isntString)(c)||(0,a.isntString)(h))return!1;typeof d=="function"&&(u=d,d=void 0);var p=(0,a.packagePayload)(c,h,d,u);return p?(this.limitBroadcastToFramesArray?this.targetFramesAsWindows().forEach(function(m){(0,a.sendMessage)(m,p,h)}):(0,a.broadcast)(p,{origin:h,frame:window.top||window.self}),!0):!1},l.prototype.emitAsPromise=function(c,d){var u=this;return new l.Promise(function(h,p){var m=u.emit(c,d,function(f){h(f)});m||p(new Error('Listener not added for "'.concat(c,'"')))})},l.prototype.on=function(c,d){if(this.isDestroyed)return!1;var u=this,h=this.origin,p=d;return c=this.namespaceEvent(c),(0,a.subscriptionArgsInvalid)(c,p,h)?!1:(this.hasAdditionalChecksForOnListeners&&(p=function(){for(var m=[],f=0;f<arguments.length;f++)m[f]=arguments[f];u.passesVerifyDomainCheck(this&&this.origin)&&u.hasMatchingTargetFrame(this&&this.source)&&d.apply(void 0,m)}),this.listeners.push({eventName:c,handler:p,originalHandler:d}),a.subscribers[h]=a.subscribers[h]||{},a.subscribers[h][c]=a.subscribers[h][c]||[],a.subscribers[h][c].push(p),!0)},l.prototype.off=function(c,d){var u=d;if(this.isDestroyed)return!1;if(this.hasAdditionalChecksForOnListeners)for(var h=0;h<this.listeners.length;h++){var p=this.listeners[h];p.originalHandler===d&&(u=p.handler)}c=this.namespaceEvent(c);var m=this.origin;if((0,a.subscriptionArgsInvalid)(c,u,m))return!1;var f=a.subscribers[m]&&a.subscribers[m][c];if(!f)return!1;for(var h=0;h<f.length;h++)if(f[h]===u)return f.splice(h,1),!0;return!1},l.prototype.teardown=function(){if(!this.isDestroyed){this.isDestroyed=!0;for(var c=0;c<this.listeners.length;c++){var d=this.listeners[c];this.off(d.eventName,d.handler)}this.listeners.length=0}},l.prototype.passesVerifyDomainCheck=function(c){return this.verifyDomain?this.checkOrigin(c):!0},l.prototype.targetFramesAsWindows=function(){return this.limitBroadcastToFramesArray?this.targetFrames.map(function(c){return c instanceof HTMLIFrameElement?c.contentWindow:c}).filter(function(c){return c}):[]},l.prototype.hasMatchingTargetFrame=function(c){if(!this.limitBroadcastToFramesArray)return!0;var d=this.targetFramesAsWindows().find(function(u){return u===c});return!!d},l.prototype.checkOrigin=function(c){var d,u=document.createElement("a");u.href=location.href,u.protocol==="https:"?d=u.host.replace(/:443$/,""):u.protocol==="http:"?d=u.host.replace(/:80$/,""):d=u.host;var h=u.protocol+"//"+d;return h===c?!0:this.verifyDomain?this.verifyDomain(c):!0},l.prototype.namespaceEvent=function(c){return this.channel?"".concat(this.channel,":").concat(c):c},l.Promise=s,l}();i.Framebus=o},{"./lib":45}],38:[function(e,n,i){var a=e("./lib"),s=e("./framebus");(0,a.attach)(),n.exports=s.Framebus},{"./framebus":37,"./lib":45}],39:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.detach=i.attach=void 0;var a=e("./"),s=!1;function o(){s||typeof window=="undefined"||(s=!0,window.addEventListener("message",a.onMessage,!1))}i.attach=o;function l(){s=!1,window.removeEventListener("message",a.onMessage,!1)}i.detach=l},{"./":45}],40:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.broadcastToChildWindows=void 0;var a=e("./");function s(o,l,c){for(var d=a.childWindows.length-1;d>=0;d--){var u=a.childWindows[d];u.closed?a.childWindows.splice(d,1):c!==u&&(0,a.broadcast)(o,{origin:l,frame:u.top})}}i.broadcastToChildWindows=s},{"./":45}],41:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.broadcast=void 0;var a=e("./");function s(o,l){var c=0,d,u=l.origin,h=l.frame;try{for(h.postMessage(o,u),(0,a.hasOpener)(h)&&h.opener.top!==window.top&&s(o,{origin:u,frame:h.opener.top});d=h.frames[c];)s(o,{origin:u,frame:d}),c++}catch(p){}}i.broadcast=s},{"./":45}],42:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.subscribers=i.childWindows=i.prefix=void 0,i.prefix="/*framebus*/",i.childWindows=[],i.subscribers={}},{}],43:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.dispatch=void 0;var a=e("./");function s(o,l,c,d,u){if(a.subscribers[o]&&a.subscribers[o][l]){var h=[];c&&h.push(c),d&&h.push(d);for(var p=0;p<a.subscribers[o][l].length;p++)a.subscribers[o][l][p].apply(u,h)}}i.dispatch=s},{"./":45}],44:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.hasOpener=void 0;function a(s){return!(s.top!==s||s.opener==null||s.opener===s||s.opener.closed===!0)}i.hasOpener=a},{}],45:[function(e,n,i){var a=this&&this.__createBinding||(Object.create?function(o,l,c,d){d===void 0&&(d=c);var u=Object.getOwnPropertyDescriptor(l,c);(!u||("get"in u?!l.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return l[c]}}),Object.defineProperty(o,d,u)}:function(o,l,c,d){d===void 0&&(d=c),o[d]=l[c]}),s=this&&this.__exportStar||function(o,l){for(var c in o)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&a(l,o,c)};Object.defineProperty(i,"__esModule",{value:!0}),s(e("./attach"),i),s(e("./broadcast-to-child-windows"),i),s(e("./broadcast"),i),s(e("./constants"),i),s(e("./dispatch"),i),s(e("./has-opener"),i),s(e("./is-not-string"),i),s(e("./message"),i),s(e("./package-payload"),i),s(e("./send-message"),i),s(e("./subscribe-replier"),i),s(e("./subscription-args-invalid"),i),s(e("./types"),i),s(e("./unpack-payload"),i)},{"./attach":39,"./broadcast":41,"./broadcast-to-child-windows":40,"./constants":42,"./dispatch":43,"./has-opener":44,"./is-not-string":46,"./message":47,"./package-payload":48,"./send-message":49,"./subscribe-replier":50,"./subscription-args-invalid":51,"./types":52,"./unpack-payload":53}],46:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isntString=void 0;function a(s){return typeof s!="string"}i.isntString=a},{}],47:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.onMessage=void 0;var a=e("./");function s(o){if(!(0,a.isntString)(o.data)){var l=(0,a.unpackPayload)(o);if(l){var c=l.eventData,d=l.reply;(0,a.dispatch)("*",l.event,c,d,o),(0,a.dispatch)(o.origin,l.event,c,d,o),(0,a.broadcastToChildWindows)(o.data,l.origin,o.source)}}}i.onMessage=s},{"./":45}],48:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.packagePayload=void 0;var a=e("./");function s(o,l,c,d){var u,h={event:o,origin:l};typeof d=="function"&&(h.reply=(0,a.subscribeReplier)(d,l)),h.eventData=c;try{u=a.prefix+JSON.stringify(h)}catch(p){throw new Error("Could not stringify event: ".concat(p.message))}return u}i.packagePayload=s},{"./":45}],49:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.sendMessage=void 0;function a(s,o,l){try{s.postMessage(o,l)}catch(c){}}i.sendMessage=a},{}],50:[function(e,n,i){var a=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(i,"__esModule",{value:!0}),i.subscribeReplier=void 0;var s=e("../framebus"),o=a(e("@braintree/uuid"));function l(c,d){var u=(0,o.default)();function h(p,m){c(p,m),s.Framebus.target({origin:d}).off(u,h)}return s.Framebus.target({origin:d}).on(u,h),u}i.subscribeReplier=l},{"../framebus":37,"@braintree/uuid":31}],51:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.subscriptionArgsInvalid=void 0;var a=e("./");function s(o,l,c){return(0,a.isntString)(o)||typeof l!="function"?!0:(0,a.isntString)(c)}i.subscriptionArgsInvalid=s},{"./":45}],52:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0})},{}],53:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.unpackPayload=void 0;var a=e("./");function s(o){var l;if(o.data.slice(0,a.prefix.length)!==a.prefix)return!1;try{l=JSON.parse(o.data.slice(a.prefix.length))}catch(h){return!1}if(l.reply){var c=o.origin,d=o.source,u=l.reply;l.reply=function(p){if(d){var m=(0,a.packagePayload)(u,c,p);m&&d.postMessage(m,c)}}}return l}i.unpackPayload=s},{"./":45}],54:[function(e,n,i){var a=e("./create-authorization-data"),s=e("./json-clone"),o=e("./constants");function l(d,u){var h,p=u?s(u):{},m=a(d.authorization).attrs,f=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(f[h]=p._meta[h]);return p._meta=f,m.tokenizationKey?p.tokenizationKey=m.tokenizationKey:p.authorizationFingerprint=m.authorizationFingerprint,p}function c(d){var u=d.getConfiguration(),h=a(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",m={api_integration_type:u.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:o.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:o.PLATFORM,platform_version:window.navigator.userAgent,session_id:u.analyticsMetadata.sessionId,client_session_id:u.analyticsMetadata.sessionId,tenant_name:"braintree",product_name:"BT_DCC",space_key:"SKDUYK"};return h.tokenizationKey?m.tokenization_key=h.tokenizationKey:m.auth_fingerprint=h.authorizationFingerprint,m}n.exports={addMetadata:l,addEventMetadata:c}},{"./constants":60,"./create-authorization-data":63,"./json-clone":80}],55:[function(e,n,i){var a=e("./constants"),s=e("./add-metadata"),o=e("./assign").assign;function l(u,h,p){return c(u,h,{},p)}function c(u,h,p,m){var f=Date.now();return p.flow==="vault"?p.context_type="BA_Token":p.flow==="checkout"&&(p.context_type="EC_Token"),Promise.resolve(u).then(function(v){var b=v._request,A=a.ANALYTICS_URL,T=a.ANALYTICS_PREFIX+h,L=v.getConfiguration(),C=L.gatewayConfiguration.environment==="production",I={events:[],tracking:[]},x=s.addEventMetadata(v,I);return x.event_name=T,x.t=f,I.events=[{level:"info",event:T,payload:o({env:C?"production":"sandbox",timestamp:f},p)}],I.tracking=[x],p&&typeof p=="object"&&(I.tracking=[d(x,p)]),b({url:A,method:"post",data:I,timeout:a.ANALYTICS_REQUEST_TIMEOUT_MS},m)}).catch(function(v){m&&m(v)})}function d(u,h){var p={},m=o({},h);return Object.keys(m).forEach(function(f){a.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(f)===-1&&delete m[f]}),p=o(u,m),p}n.exports={sendEvent:l,sendEventPlus:c}},{"./add-metadata":54,"./assign":57,"./constants":60}],56:[function(e,n,i){var a=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:a,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":36}],57:[function(e,n,i){var a=typeof Object.assign=="function"?Object.assign:s;function s(o){var l,c,d;for(l=1;l<arguments.length;l++){c=arguments[l];for(d in c)c.hasOwnProperty(d)&&(o[d]=c[d])}return o}n.exports={assign:a,_assign:s}},{}],58:[function(e,n,i){var a=e("./braintree-error"),s=e("./errors"),o="3.126.0";function l(c){var d,u,h;return c?(h=c.name,d=c.client,u=c.authorization,!d&&!u?Promise.reject(new a({type:s.INSTANTIATION_OPTION_REQUIRED.type,code:s.INSTANTIATION_OPTION_REQUIRED.code,message:"options.client is required when instantiating "+h+"."})):!u&&d.getVersion()!==o?Promise.reject(new a({type:s.INCOMPATIBLE_VERSIONS.type,code:s.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+d.getVersion()+") and "+h+" (version "+o+") components must be from the same SDK version."})):Promise.resolve()):Promise.reject(new a({type:s.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:s.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:l}},{"./braintree-error":59,"./errors":66}],59:[function(e,n,i){var a=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=a(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":65}],60:[function(e,n,i){var a="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},l={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},c={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:l,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:c,INTEGRATION_TIMEOUT_MS:6e4,VERSION:a,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+a,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],61:[function(e,n,i){var a=e("./braintree-error"),s=e("./errors");n.exports=function(o,l){l.forEach(function(c){o[c]=function(){throw new a({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:c+" cannot be called after teardown."})}})}},{"./braintree-error":59,"./errors":66}],62:[function(e,n,i){var a=e("./constants").ASSETS_URLS;function s(o){return a.production}n.exports={create:s}},{"./constants":60}],63:[function(e,n,i){var a=e("../lib/vendor/polyfill").atob,s=e("../lib/constants").CLIENT_API_URLS;function o(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function l(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function c(d){var u,h,p={attrs:{},configUrl:""};return o(d)?(h=l(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(a(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=c},{"../lib/constants":60,"../lib/vendor/polyfill":86}],64:[function(e,n,i){var a=e("./braintree-error"),s=e("./assets"),o=e("./errors"),l="3.126.0";function c(d){var u=Promise.resolve();return d.client?Promise.resolve(d.client):(window.braintree&&window.braintree.client||(u=s.loadScript({src:d.assetsUrl+"/web/"+l+"/js/client.min.js"}).catch(function(h){return Promise.reject(new a({type:o.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:o.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:o.CLIENT_SCRIPT_FAILED_TO_LOAD.message,details:{originalError:h}}))})),u.then(function(){return window.braintree.client.VERSION!==l?Promise.reject(new a({type:o.INCOMPATIBLE_VERSIONS.type,code:o.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+d.name+" (version "+l+") components must be from the same SDK version."})):window.braintree.client.create({authorization:d.authorization,debug:d.debug})}))}n.exports={create:c}},{"./assets":56,"./braintree-error":59,"./errors":66}],65:[function(e,n,i){function a(s,o){return o=o==null?"":o,s.reduce(function(l,c){return l[c]=o+c,l},{})}n.exports=a},{}],66:[function(e,n,i){var a=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:a.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:a.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:a.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:a.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:a.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":59}],67:[function(e,n,i){var a=e("./strategies/popup"),s=e("./strategies/popup-bridge"),o=e("./strategies/modal"),l=e("framebus"),c=e("../shared/events"),d=e("../shared/errors"),u=e("../shared/constants"),h=e("@braintree/uuid"),p=e("@braintree/iframer"),m=e("../../braintree-error"),f=e("../shared/browser-detection"),v=e("./../../assign").assign,b=e("../../constants").BUS_CONFIGURATION_REQUEST_EVENT,A=["name","dispatchFrameUrl","openFrameUrl"];function T(){}function L(I){if(!I)throw new Error("Valid configuration is required");if(A.forEach(function(x){if(!I.hasOwnProperty(x))throw new Error("A valid frame "+x+" must be provided")}),!/^[\w_]+$/.test(I.name))throw new Error("A valid frame name must be provided")}function C(I){L(I),this._serviceId=h().replace(/-/g,""),this._options={name:I.name+"_"+this._serviceId,dispatchFrameUrl:I.dispatchFrameUrl,openFrameUrl:I.openFrameUrl,height:I.height,width:I.width,top:I.top,left:I.left},this.state=I.state||{},this._bus=new l({channel:this._serviceId}),this._setBusEvents()}C.prototype.initialize=function(I){var x=function(){I(),this._bus.off(c.DISPATCH_FRAME_READY,x)}.bind(this);this._bus.on(c.DISPATCH_FRAME_READY,x),this._writeDispatchFrame()},C.prototype._writeDispatchFrame=function(){var I=u.DISPATCH_FRAME_NAME+"_"+this._serviceId,x=this._options.dispatchFrameUrl;this._dispatchFrame=p({"aria-hidden":!0,name:I,title:I,src:x,class:u.DISPATCH_FRAME_CLASS,height:0,width:0,style:{position:"absolute",left:"-9999px"}}),document.body.appendChild(this._dispatchFrame)},C.prototype._setBusEvents=function(){this._bus.on(c.DISPATCH_FRAME_REPORT,function(I,x){this._onCompleteCallback&&this._onCompleteCallback.call(null,I.err,I.payload),this._frame.close(),this._onCompleteCallback=null,x&&x()}.bind(this)),this._bus.on(b,function(I){I(this.state)}.bind(this))},C.prototype.open=function(I,x){if(I=I||{},this._frame=this._getFrameForEnvironment(I),this._frame.initialize(x),!(this._frame instanceof s)){if(v(this.state,I.state),this._onCompleteCallback=x,this._frame.open(),this.isFrameClosed()){this._cleanupFrame(),x&&x(new m(d.FRAME_SERVICE_FRAME_OPEN_FAILED));return}this._pollForPopupClose()}},C.prototype.redirect=function(I){this._frame&&!this.isFrameClosed()&&this._frame.redirect(I)},C.prototype.close=function(){this.isFrameClosed()||this._frame.close()},C.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},C.prototype.createHandler=function(I){return I=I||{},{close:function(){I.beforeClose&&I.beforeClose(),this.close()}.bind(this),focus:function(){I.beforeFocus&&I.beforeFocus(),this.focus()}.bind(this)}},C.prototype.createNoopHandler=function(){return{close:T,focus:T}},C.prototype.teardown=function(){this.close(),this._dispatchFrame.parentNode.removeChild(this._dispatchFrame),this._dispatchFrame=null,this._cleanupFrame()},C.prototype.isFrameClosed=function(){return this._frame==null||this._frame.isClosed()},C.prototype._cleanupFrame=function(){this._frame=null,clearInterval(this._popupInterval),this._popupInterval=null},C.prototype._pollForPopupClose=function(){return this._popupInterval=setInterval(function(){this.isFrameClosed()&&(this._cleanupFrame(),this._onCompleteCallback&&this._onCompleteCallback(new m(d.FRAME_SERVICE_FRAME_CLOSED)))}.bind(this),u.POPUP_POLL_INTERVAL),this._popupInterval},C.prototype._getFrameForEnvironment=function(I){var x=f.supportsPopups(),P=!!window.popupBridge,U=v({},this._options,I);return P?new s(U):x?new a(U):new o(U)},n.exports=C},{"../../braintree-error":59,"../../constants":60,"../shared/browser-detection":74,"../shared/constants":75,"../shared/errors":76,"../shared/events":77,"./../../assign":57,"./strategies/modal":69,"./strategies/popup":72,"./strategies/popup-bridge":70,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],68:[function(e,n,i){var a=e("./frame-service");n.exports={create:function(o,l){var c=new a(o);c.initialize(function(){l(c)})}}},{"./frame-service":67}],69:[function(e,n,i){var a=e("@braintree/iframer"),s=e("../../../assign").assign,o=e("../../shared/browser-detection"),l={position:"fixed",top:0,left:0,bottom:0,padding:0,margin:0,border:0,outline:"none",zIndex:20001,background:"#FFFFFF"};function c(){}function d(u){this._closed=null,this._frame=null,this._options=u||{},this._container=this._options.container||document.body}d.prototype.initialize=c,d.prototype.open=function(){var u={src:this._options.openFrameUrl,name:this._options.name,scrolling:"yes",height:"100%",width:"100%",style:s({},l),title:"Lightbox Frame"};o.isIos()?(o.isIosWKWebview()&&(this._lockScrolling(),u.style={}),this._el=document.createElement("div"),s(this._el.style,l,{height:"100%",width:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"}),this._frame=a(u),this._el.appendChild(this._frame)):this._el=this._frame=a(u),this._closed=!1,this._container.appendChild(this._el)},d.prototype.focus=c,d.prototype.close=function(){this._container.removeChild(this._el),this._frame=null,this._closed=!0,o.isIosWKWebview()&&this._unlockScrolling()},d.prototype.isClosed=function(){return!!this._closed},d.prototype.redirect=function(u){this._frame.src=u},d.prototype._unlockScrolling=function(){document.body.style.overflow=this._savedBodyProperties.overflowStyle,document.body.style.position=this._savedBodyProperties.positionStyle,window.scrollTo(this._savedBodyProperties.left,this._savedBodyProperties.top),delete this._savedBodyProperties},d.prototype._lockScrolling=function(){var u=document.documentElement;this._savedBodyProperties={left:(window.pageXOffset||u.scrollLeft)-(u.clientLeft||0),top:(window.pageYOffset||u.scrollTop)-(u.clientTop||0),overflowStyle:document.body.style.overflow,positionStyle:document.body.style.position},document.body.style.overflow="hidden",document.body.style.position="fixed",window.scrollTo(0,0)},n.exports=d},{"../../../assign":57,"../../shared/browser-detection":74,"@braintree/iframer":27}],70:[function(e,n,i){var a=e("../../../braintree-error"),s=e("../../shared/errors");function o(){}function l(c){this._closed=null,this._options=c}l.prototype.initialize=function(c){var d=this;window.popupBridge.onComplete=function(u,h){var p=!h&&!u;if(d._closed=!0,u||p){c(new a(s.FRAME_SERVICE_FRAME_CLOSED));return}c(null,h)}},l.prototype.open=function(c){var d;c=c||{},d=c.openFrameUrl||this._options.openFrameUrl,this._closed=!1,window.popupBridge.open(d)},l.prototype.focus=o,l.prototype.close=o,l.prototype.isClosed=function(){return!!this._closed},l.prototype.redirect=function(c){this.open({openFrameUrl:c})},n.exports=l},{"../../../braintree-error":59,"../../shared/errors":76}],71:[function(e,n,i){var a=e("../../../shared/constants"),s=e("./position");function o(l,c,d){return typeof c!="undefined"?c:s[l](d)}n.exports=function(c){var d=c.height||a.DEFAULT_POPUP_HEIGHT,u=c.width||a.DEFAULT_POPUP_WIDTH,h=o("top",c.top,d),p=o("left",c.left,u);return[a.POPUP_BASE_OPTIONS,"height="+d,"width="+u,"top="+h,"left="+p].join(",")}},{"../../../shared/constants":75,"./position":73}],72:[function(e,n,i){var a=e("./compose-options");function s(){}function o(l){this._frame=null,this._options=l||{}}o.prototype.initialize=s,o.prototype.open=function(){this._frame=window.open(this._options.openFrameUrl,this._options.name,a(this._options))},o.prototype.focus=function(){this._frame.focus()},o.prototype.close=function(){this._frame.closed||this._frame.close()},o.prototype.isClosed=function(){return!this._frame||!!this._frame.closed},o.prototype.redirect=function(l){this._frame.location.href=l},n.exports=o},{"./compose-options":71}],73:[function(e,n,i){function a(l){var c=window.outerHeight||document.documentElement.clientHeight,d=window.screenY==null?window.screenTop:window.screenY;return o(c,l,d)}function s(l){var c=window.outerWidth||document.documentElement.clientWidth,d=window.screenX==null?window.screenLeft:window.screenX;return o(c,l,d)}function o(l,c,d){return(l-c)/2+d}n.exports={top:a,left:s,center:o}},{}],74:[function(e,n,i){n.exports={isIos:e("@braintree/browser-detection/is-ios"),isIosWKWebview:e("@braintree/browser-detection/is-ios-wkwebview"),supportsPopups:e("@braintree/browser-detection/supports-popups")}},{"@braintree/browser-detection/is-ios":23,"@braintree/browser-detection/is-ios-wkwebview":22,"@braintree/browser-detection/supports-popups":25}],75:[function(e,n,i){n.exports={DISPATCH_FRAME_NAME:"dispatch",DISPATCH_FRAME_CLASS:"braintree-dispatch-frame",POPUP_BASE_OPTIONS:"resizable,scrollbars",DEFAULT_POPUP_WIDTH:450,DEFAULT_POPUP_HEIGHT:535,POPUP_POLL_INTERVAL:100,POPUP_CLOSE_TIMEOUT:100}},{}],76:[function(e,n,i){var a=e("../../braintree-error");n.exports={FRAME_SERVICE_FRAME_CLOSED:{type:a.types.INTERNAL,code:"FRAME_SERVICE_FRAME_CLOSED",message:"Frame closed before tokenization could occur."},FRAME_SERVICE_FRAME_OPEN_FAILED:{type:a.types.INTERNAL,code:"FRAME_SERVICE_FRAME_OPEN_FAILED",message:"Frame failed to open."}}},{"../../braintree-error":59}],77:[function(e,n,i){var a=e("../../enumerate");n.exports=a(["DISPATCH_FRAME_READY","DISPATCH_FRAME_REPORT"],"frameService:")},{"../../enumerate":65}],78:[function(e,n,i){n.exports=function(s){s=s||window;try{return s.self!==s.top}catch(o){return!0}}},{}],79:[function(e,n,i){var a,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(c){return c.split(".").slice(-2).join(".")}function l(c){var d;return c=c.toLowerCase(),/^https:/.test(c)?(a=a||document.createElement("a"),a.href=c,d=o(a.hostname),s.hasOwnProperty(d)):!1}n.exports=l},{}],80:[function(e,n,i){n.exports=function(a){return JSON.parse(JSON.stringify(a))}},{}],81:[function(e,n,i){n.exports=function(a){return Object.keys(a).filter(function(s){return typeof a[s]=="function"})}},{}],82:[function(e,n,i){function a(u){var h;for(h in u)if(u.hasOwnProperty(h))return!0;return!1}function s(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function o(u){return u=u||window.location.href,/\?/.test(u)}function l(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(m,f){var v=f.split("="),b=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return m[b]=A,m},{}),p):{}}function c(u,h){var p,m,f,v=[];for(f in u)u.hasOwnProperty(f)&&(m=u[f],h?s(u)?p=h+"[]":p=h+"["+f+"]":p=f,typeof m=="object"?v.push(c(m,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(m)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&a(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=c(h)),u}n.exports={parse:l,stringify:c,queryify:d,hasQueryParams:o}},{}],83:[function(e,n,i){n.exports=function(a){return a.indexOf("_")===-1?a:a.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],84:[function(e,n,i){var a=e("./querystring");function s(){return a.parse(window.location.href)}n.exports={getUrlParams:s}},{"./querystring":82}],85:[function(e,n,i){function a(s){return s?"":".min"}n.exports=a},{}],86:[function(e,n,i){var a=typeof atob=="function"?atob:s;function s(o){var l,c,d,u,h,p,m,f,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");f=0;do u=b.indexOf(o.charAt(f++)),h=b.indexOf(o.charAt(f++)),p=b.indexOf(o.charAt(f++)),m=b.indexOf(o.charAt(f++)),l=(u&63)<<2|h>>4&3,c=(h&15)<<4|p>>2&15,d=(p&3)<<6|m&63,A+=String.fromCharCode(l)+(c?String.fromCharCode(c):"")+(d?String.fromCharCode(d):"");while(f<o.length);return A}n.exports={atob:function(o){return a.call(window,o)},_atob:s}},{}],87:[function(e,n,i){var a=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},s=a(e("./venmo-desktop"));n.exports=function(l){var c=new s.default(l);return c.initialize()}},{"./venmo-desktop":89}],88:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.VENMO_PAYMENT_CONTEXT_STATUS_QUERY=i.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY=i.UPDATE_PAYMENT_CONTEXT_QUERY=i.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY=i.CREATE_PAYMENT_CONTEXT_QUERY=i.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=void 0,i.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=`mutation CreateVenmoQRCodePaymentContext($input: CreateVenmoQRCodePaymentContextInput!) {
|
|
374
|
+
***************************************************************************** */function s(E,O,w,P){function V(N){return N instanceof w?N:new w(function(G){G(N)})}return new(w||(w=Promise))(function(N,G){function ee(ae){try{D(P.next(ae))}catch(we){G(we)}}function de(ae){try{D(P.throw(ae))}catch(we){G(we)}}function D(ae){ae.done?N(ae.value):V(ae.value).then(ee,de)}D((P=P.apply(E,[])).next())})}function o(E,O){var w={label:0,sent:function(){if(N[0]&1)throw N[1];return N[1]},trys:[],ops:[]},P,V,N,G;return G={next:ee(0),throw:ee(1),return:ee(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function ee(D){return function(ae){return de([D,ae])}}function de(D){if(P)throw new TypeError("Generator is already executing.");for(;w;)try{if(P=1,V&&(N=D[0]&2?V.return:D[0]?V.throw||((N=V.return)&&N.call(V),0):V.next)&&!(N=N.call(V,D[1])).done)return N;switch(V=0,N&&(D=[D[0]&2,N.value]),D[0]){case 0:case 1:N=D;break;case 4:return w.label++,{value:D[1],done:!1};case 5:w.label++,V=D[1],D=[0];continue;case 7:D=w.ops.pop(),w.trys.pop();continue;default:if(N=w.trys,!(N=N.length>0&&N[N.length-1])&&(D[0]===6||D[0]===2)){w=0;continue}if(D[0]===3&&(!N||D[1]>N[0]&&D[1]<N[3])){w.label=D[1];break}if(D[0]===6&&w.label<N[1]){w.label=N[1],N=D;break}if(N&&w.label<N[2]){w.label=N[2],w.ops.push(D);break}N[2]&&w.ops.pop(),w.trys.pop();continue}D=O.call(E,w)}catch(ae){D=[6,ae],V=0}finally{P=N=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}}var c={},l={};function d(E){var O,w=JSON.stringify(E);if(!E.forceScriptReload&&(O=l[w],O))return O;var P=document.createElement("script"),V=E.dataAttributes||{},N=E.container||document.head;return P.src=E.src,P.id=E.id||"",P.async=!0,E.type&&P.setAttribute("type","".concat(E.type)),E.crossorigin&&P.setAttribute("crossorigin","".concat(E.crossorigin)),Object.keys(V).forEach(function(G){P.setAttribute("data-".concat(G),"".concat(V[G]))}),O=new Promise(function(G,ee){P.addEventListener("load",function(){G(P)}),P.addEventListener("error",function(){ee(new Error("".concat(E.src," failed to load.")))}),P.addEventListener("abort",function(){ee(new Error("".concat(E.src," has aborted.")))}),N.appendChild(P)}),l[w]=O,O}d.clearCache=function(){l={}};var u=d,h=function(O){var w=document.querySelector('link[href="'.concat(O.href,'"]'));if(w)return Promise.resolve(w);w=document.createElement("link");var P=O.container||document.head;return w.setAttribute("rel","stylesheet"),w.setAttribute("type","text/css"),w.setAttribute("href",O.href),w.setAttribute("id",O.id),P.firstChild?P.insertBefore(w,P.firstChild):P.appendChild(w),Promise.resolve(w)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=m=c.loadScript=void 0;var p=u,m=c.loadScript=p,f=h;c.loadStylesheet=f;var v="https://www.paypalobjects.com",y={minified:"axo.min",unminified:"axo"},A="fastlane",I="connect-boba",L="".concat(I,"/locales/"),C={AXO_ASSET_NAME:y,AXO_ASSET_PATH:I,LOCALE_PATH:L,CDNX_PROD:v},T={BT:"BT",PPCP:"PPCP"};function x(){return typeof window.define=="function"&&!!window.define.amd}function k(){return x()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function U(E,O,w){var P,V;return w===void 0&&(w=!0),s(this,void 0,void 0,function(){var N,G;return o(this,function(ee){if(N=W(),N&&N[E.module]){if(O&&((P=N[E.module])===null||P===void 0?void 0:P.VERSION)!==O)throw G=(V=N[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(G," cannot load version ").concat(O));return[2,!0]}if(!O)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,H(E,O,w)]})})}function H(E,O,w){if(w===void 0&&(w=!0),x()){var P=w?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(N,G){window.require([P],N,G)})}var V=w?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(O),src:"https://js.braintreegateway.com/web/".concat(O,"/js/").concat(V)})}function W(){return window==null?void 0:window.braintree}var S,F,q={Client:"client",HostedCardFields:"hostedFields"},te="braintree",M=(S={},S[q.Client]="client",S[q.HostedCardFields]="hosted-fields",S),$=(F={},F[q.Client]={id:"client",module:q.Client,amdModule:{unminified:"".concat(te,"/").concat(M[q.Client]),minified:"".concat(te,"/").concat(M[q.Client],".min")},script:{unminified:"".concat(M[q.Client],".js"),minified:"".concat(M[q.Client],".min.js")}},F[q.HostedCardFields]={id:"hcf",module:q.HostedCardFields,amdModule:{unminified:"".concat(te,"/").concat(M[q.HostedCardFields]),minified:"".concat(te,"/").concat(M[q.HostedCardFields],".min")},script:{unminified:"".concat(M[q.HostedCardFields],".js"),minified:"".concat(M[q.HostedCardFields],".min.js")}},F);function K(E){return s(this,void 0,void 0,function(){var O,w,P,V;return o(this,function(N){switch(N.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),O=E.btSdkVersion,w=E.minified,P=R(E),V=j(E),E.platform!==T.BT?[3,2]:[4,Promise.all([U($.hostedFields,O,w),g(P,w)])];case 1:return N.sent(),[3,5];case 2:return E.platform!==T.PPCP?[3,4]:[4,Promise.all([U($.client,O,w),U($.hostedFields,O,w),g(P,w)])];case 3:return N.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,O){var w;if(O===void 0&&(O=!0),x()){k()&&requirejs.config({paths:(w={},w[A]=E,w)});var P="".concat(A,"/").concat(O?C.AXO_ASSET_NAME.minified:C.AXO_ASSET_NAME.unminified);return new Promise(function(V,N){window.require([P],V,N)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var O=E.assetUrl,w=E.bundleId;return w?"https://cdn-".concat(w,".static.engineering.dev.paypalinc.com/").concat(O):"".concat(C.CDNX_PROD,"/").concat(O)}function R(E){var O,w=(E==null?void 0:E.minified)!==!1?C.AXO_ASSET_NAME.minified:C.AXO_ASSET_NAME.unminified,P=x()?C.AXO_ASSET_PATH:"".concat(C.AXO_ASSET_PATH,"/").concat(w,".js");return _({assetUrl:P,bundleId:(O=E==null?void 0:E.metadata)===null||O===void 0?void 0:O.bundleIdOverride})}function j(E){var O;return _({assetUrl:C.LOCALE_PATH,bundleId:(O=E==null?void 0:E.metadata)===null||O===void 0?void 0:O.bundleIdOverride})}i.constants=C,i.loadAxo=K})},{}],37:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Framebus=void 0;var i=e("./lib"),s=typeof window!="undefined"&&window.Promise,o=function(){function c(l){l===void 0&&(l={}),this.origin=l.origin||"*",this.channel=l.channel||"",this.verifyDomain=l.verifyDomain,this.targetFrames=l.targetFrames||[],this.limitBroadcastToFramesArray=!!l.targetFrames,this.isDestroyed=!1,this.listeners=[],this.hasAdditionalChecksForOnListeners=!!(this.verifyDomain||this.limitBroadcastToFramesArray)}return c.setPromise=function(l){c.Promise=l},c.target=function(l){return new c(l)},c.prototype.addTargetFrame=function(l){this.limitBroadcastToFramesArray&&this.targetFrames.push(l)},c.prototype.include=function(l){return l==null||l.Window==null||l.constructor!==l.Window?!1:(i.childWindows.push(l),!0)},c.prototype.target=function(l){return c.target(l)},c.prototype.emit=function(l,d,u){if(this.isDestroyed)return!1;var h=this.origin;if(l=this.namespaceEvent(l),(0,i.isntString)(l)||(0,i.isntString)(h))return!1;typeof d=="function"&&(u=d,d=void 0);var p=(0,i.packagePayload)(l,h,d,u);return p?(this.limitBroadcastToFramesArray?this.targetFramesAsWindows().forEach(function(m){(0,i.sendMessage)(m,p,h)}):(0,i.broadcast)(p,{origin:h,frame:window.top||window.self}),!0):!1},c.prototype.emitAsPromise=function(l,d){var u=this;return new c.Promise(function(h,p){var m=u.emit(l,d,function(f){h(f)});m||p(new Error('Listener not added for "'.concat(l,'"')))})},c.prototype.on=function(l,d){if(this.isDestroyed)return!1;var u=this,h=this.origin,p=d;return l=this.namespaceEvent(l),(0,i.subscriptionArgsInvalid)(l,p,h)?!1:(this.hasAdditionalChecksForOnListeners&&(p=function(){for(var m=[],f=0;f<arguments.length;f++)m[f]=arguments[f];u.passesVerifyDomainCheck(this&&this.origin)&&u.hasMatchingTargetFrame(this&&this.source)&&d.apply(void 0,m)}),this.listeners.push({eventName:l,handler:p,originalHandler:d}),i.subscribers[h]=i.subscribers[h]||{},i.subscribers[h][l]=i.subscribers[h][l]||[],i.subscribers[h][l].push(p),!0)},c.prototype.off=function(l,d){var u=d;if(this.isDestroyed)return!1;if(this.hasAdditionalChecksForOnListeners)for(var h=0;h<this.listeners.length;h++){var p=this.listeners[h];p.originalHandler===d&&(u=p.handler)}l=this.namespaceEvent(l);var m=this.origin;if((0,i.subscriptionArgsInvalid)(l,u,m))return!1;var f=i.subscribers[m]&&i.subscribers[m][l];if(!f)return!1;for(var h=0;h<f.length;h++)if(f[h]===u)return f.splice(h,1),!0;return!1},c.prototype.teardown=function(){if(!this.isDestroyed){this.isDestroyed=!0;for(var l=0;l<this.listeners.length;l++){var d=this.listeners[l];this.off(d.eventName,d.handler)}this.listeners.length=0}},c.prototype.passesVerifyDomainCheck=function(l){return this.verifyDomain?this.checkOrigin(l):!0},c.prototype.targetFramesAsWindows=function(){return this.limitBroadcastToFramesArray?this.targetFrames.map(function(l){return l instanceof HTMLIFrameElement?l.contentWindow:l}).filter(function(l){return l}):[]},c.prototype.hasMatchingTargetFrame=function(l){if(!this.limitBroadcastToFramesArray)return!0;var d=this.targetFramesAsWindows().find(function(u){return u===l});return!!d},c.prototype.checkOrigin=function(l){var d,u=document.createElement("a");u.href=location.href,u.protocol==="https:"?d=u.host.replace(/:443$/,""):u.protocol==="http:"?d=u.host.replace(/:80$/,""):d=u.host;var h=u.protocol+"//"+d;return h===l?!0:this.verifyDomain?this.verifyDomain(l):!0},c.prototype.namespaceEvent=function(l){return this.channel?"".concat(this.channel,":").concat(l):l},c.Promise=s,c}();a.Framebus=o},{"./lib":45}],38:[function(e,n,a){var i=e("./lib"),s=e("./framebus");(0,i.attach)(),n.exports=s.Framebus},{"./framebus":37,"./lib":45}],39:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.detach=a.attach=void 0;var i=e("./"),s=!1;function o(){s||typeof window=="undefined"||(s=!0,window.addEventListener("message",i.onMessage,!1))}a.attach=o;function c(){s=!1,window.removeEventListener("message",i.onMessage,!1)}a.detach=c},{"./":45}],40:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.broadcastToChildWindows=void 0;var i=e("./");function s(o,c,l){for(var d=i.childWindows.length-1;d>=0;d--){var u=i.childWindows[d];u.closed?i.childWindows.splice(d,1):l!==u&&(0,i.broadcast)(o,{origin:c,frame:u.top})}}a.broadcastToChildWindows=s},{"./":45}],41:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.broadcast=void 0;var i=e("./");function s(o,c){var l=0,d,u=c.origin,h=c.frame;try{for(h.postMessage(o,u),(0,i.hasOpener)(h)&&h.opener.top!==window.top&&s(o,{origin:u,frame:h.opener.top});d=h.frames[l];)s(o,{origin:u,frame:d}),l++}catch(p){}}a.broadcast=s},{"./":45}],42:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.subscribers=a.childWindows=a.prefix=void 0,a.prefix="/*framebus*/",a.childWindows=[],a.subscribers={}},{}],43:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.dispatch=void 0;var i=e("./");function s(o,c,l,d,u){if(i.subscribers[o]&&i.subscribers[o][c]){var h=[];l&&h.push(l),d&&h.push(d);for(var p=0;p<i.subscribers[o][c].length;p++)i.subscribers[o][c][p].apply(u,h)}}a.dispatch=s},{"./":45}],44:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.hasOpener=void 0;function i(s){return!(s.top!==s||s.opener==null||s.opener===s||s.opener.closed===!0)}a.hasOpener=i},{}],45:[function(e,n,a){var i=this&&this.__createBinding||(Object.create?function(o,c,l,d){d===void 0&&(d=l);var u=Object.getOwnPropertyDescriptor(c,l);(!u||("get"in u?!c.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return c[l]}}),Object.defineProperty(o,d,u)}:function(o,c,l,d){d===void 0&&(d=l),o[d]=c[l]}),s=this&&this.__exportStar||function(o,c){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(c,l)&&i(c,o,l)};Object.defineProperty(a,"__esModule",{value:!0}),s(e("./attach"),a),s(e("./broadcast-to-child-windows"),a),s(e("./broadcast"),a),s(e("./constants"),a),s(e("./dispatch"),a),s(e("./has-opener"),a),s(e("./is-not-string"),a),s(e("./message"),a),s(e("./package-payload"),a),s(e("./send-message"),a),s(e("./subscribe-replier"),a),s(e("./subscription-args-invalid"),a),s(e("./types"),a),s(e("./unpack-payload"),a)},{"./attach":39,"./broadcast":41,"./broadcast-to-child-windows":40,"./constants":42,"./dispatch":43,"./has-opener":44,"./is-not-string":46,"./message":47,"./package-payload":48,"./send-message":49,"./subscribe-replier":50,"./subscription-args-invalid":51,"./types":52,"./unpack-payload":53}],46:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.isntString=void 0;function i(s){return typeof s!="string"}a.isntString=i},{}],47:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.onMessage=void 0;var i=e("./");function s(o){if(!(0,i.isntString)(o.data)){var c=(0,i.unpackPayload)(o);if(c){var l=c.eventData,d=c.reply;(0,i.dispatch)("*",c.event,l,d,o),(0,i.dispatch)(o.origin,c.event,l,d,o),(0,i.broadcastToChildWindows)(o.data,c.origin,o.source)}}}a.onMessage=s},{"./":45}],48:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.packagePayload=void 0;var i=e("./");function s(o,c,l,d){var u,h={event:o,origin:c};typeof d=="function"&&(h.reply=(0,i.subscribeReplier)(d,c)),h.eventData=l;try{u=i.prefix+JSON.stringify(h)}catch(p){throw new Error("Could not stringify event: ".concat(p.message))}return u}a.packagePayload=s},{"./":45}],49:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.sendMessage=void 0;function i(s,o,c){try{s.postMessage(o,c)}catch(l){}}a.sendMessage=i},{}],50:[function(e,n,a){var i=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(a,"__esModule",{value:!0}),a.subscribeReplier=void 0;var s=e("../framebus"),o=i(e("@braintree/uuid"));function c(l,d){var u=(0,o.default)();function h(p,m){l(p,m),s.Framebus.target({origin:d}).off(u,h)}return s.Framebus.target({origin:d}).on(u,h),u}a.subscribeReplier=c},{"../framebus":37,"@braintree/uuid":31}],51:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.subscriptionArgsInvalid=void 0;var i=e("./");function s(o,c,l){return(0,i.isntString)(o)||typeof c!="function"?!0:(0,i.isntString)(l)}a.subscriptionArgsInvalid=s},{"./":45}],52:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0})},{}],53:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.unpackPayload=void 0;var i=e("./");function s(o){var c;if(o.data.slice(0,i.prefix.length)!==i.prefix)return!1;try{c=JSON.parse(o.data.slice(i.prefix.length))}catch(h){return!1}if(c.reply){var l=o.origin,d=o.source,u=c.reply;c.reply=function(p){if(d){var m=(0,i.packagePayload)(u,l,p);m&&d.postMessage(m,l)}}}return c}a.unpackPayload=s},{"./":45}],54:[function(e,n,a){var i=e("./create-authorization-data"),s=e("./json-clone"),o=e("./constants");function c(d,u){var h,p=u?s(u):{},m=i(d.authorization).attrs,f=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(f[h]=p._meta[h]);return p._meta=f,m.tokenizationKey?p.tokenizationKey=m.tokenizationKey:p.authorizationFingerprint=m.authorizationFingerprint,p}function l(d){var u=d.getConfiguration(),h=i(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",m={api_integration_type:u.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:o.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:o.PLATFORM,platform_version:window.navigator.userAgent,session_id:u.analyticsMetadata.sessionId,client_session_id:u.analyticsMetadata.sessionId,tenant_name:"braintree",product_name:"BT_DCC",space_key:"SKDUYK"};return h.tokenizationKey?m.tokenization_key=h.tokenizationKey:m.auth_fingerprint=h.authorizationFingerprint,m}n.exports={addMetadata:c,addEventMetadata:l}},{"./constants":60,"./create-authorization-data":63,"./json-clone":80}],55:[function(e,n,a){var i=e("./constants"),s=e("./add-metadata"),o=e("./assign").assign;function c(u,h,p){return l(u,h,{},p)}function l(u,h,p,m){var f=Date.now();return p.flow==="vault"?p.context_type="BA_Token":p.flow==="checkout"&&(p.context_type="EC_Token"),Promise.resolve(u).then(function(v){var y=v._request,A=i.ANALYTICS_URL,I=i.ANALYTICS_PREFIX+h,L=v.getConfiguration(),C=L.gatewayConfiguration.environment==="production",T={events:[],tracking:[]},x=s.addEventMetadata(v,T);return x.event_name=I,x.t=f,T.events=[{level:"info",event:I,payload:o({env:C?"production":"sandbox",timestamp:f},p)}],T.tracking=[x],p&&typeof p=="object"&&(T.tracking=[d(x,p)]),y({url:A,method:"post",data:T,timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},m)}).catch(function(v){m&&m(v)})}function d(u,h){var p={},m=o({},h);return Object.keys(m).forEach(function(f){i.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(f)===-1&&delete m[f]}),p=o(u,m),p}n.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":54,"./assign":57,"./constants":60}],56:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":36}],57:[function(e,n,a){var i=typeof Object.assign=="function"?Object.assign:s;function s(o){var c,l,d;for(c=1;c<arguments.length;c++){l=arguments[c];for(d in l)l.hasOwnProperty(d)&&(o[d]=l[d])}return o}n.exports={assign:i,_assign:s}},{}],58:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors"),o="3.126.0";function c(l){var d,u,h;return l?(h=l.name,d=l.client,u=l.authorization,!d&&!u?Promise.reject(new i({type:s.INSTANTIATION_OPTION_REQUIRED.type,code:s.INSTANTIATION_OPTION_REQUIRED.code,message:"options.client is required when instantiating "+h+"."})):!u&&d.getVersion()!==o?Promise.reject(new i({type:s.INCOMPATIBLE_VERSIONS.type,code:s.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+d.getVersion()+") and "+h+" (version "+o+") components must be from the same SDK version."})):Promise.resolve()):Promise.reject(new i({type:s.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:s.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:c}},{"./braintree-error":59,"./errors":66}],59:[function(e,n,a){var i=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":65}],60:[function(e,n,a){var i="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],61:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new i({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:l+" cannot be called after teardown."})}})}},{"./braintree-error":59,"./errors":66}],62:[function(e,n,a){var i=e("./constants").ASSETS_URLS;function s(o){return i.production}n.exports={create:s}},{"./constants":60}],63:[function(e,n,a){var i=e("../lib/vendor/polyfill").atob,s=e("../lib/constants").CLIENT_API_URLS;function o(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function c(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function l(d){var u,h,p={attrs:{},configUrl:""};return o(d)?(h=c(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(i(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=l},{"../lib/constants":60,"../lib/vendor/polyfill":86}],64:[function(e,n,a){var i=e("./braintree-error"),s=e("./assets"),o=e("./errors"),c="3.126.0";function l(d){var u=Promise.resolve();return d.client?Promise.resolve(d.client):(window.braintree&&window.braintree.client||(u=s.loadScript({src:d.assetsUrl+"/web/"+c+"/js/client.min.js"}).catch(function(h){return Promise.reject(new i({type:o.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:o.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:o.CLIENT_SCRIPT_FAILED_TO_LOAD.message,details:{originalError:h}}))})),u.then(function(){return window.braintree.client.VERSION!==c?Promise.reject(new i({type:o.INCOMPATIBLE_VERSIONS.type,code:o.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+d.name+" (version "+c+") components must be from the same SDK version."})):window.braintree.client.create({authorization:d.authorization,debug:d.debug})}))}n.exports={create:l}},{"./assets":56,"./braintree-error":59,"./errors":66}],65:[function(e,n,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=i},{}],66:[function(e,n,a){var i=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:i.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:i.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:i.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:i.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":59}],67:[function(e,n,a){var i=e("./strategies/popup"),s=e("./strategies/popup-bridge"),o=e("./strategies/modal"),c=e("framebus"),l=e("../shared/events"),d=e("../shared/errors"),u=e("../shared/constants"),h=e("@braintree/uuid"),p=e("@braintree/iframer"),m=e("../../braintree-error"),f=e("../shared/browser-detection"),v=e("./../../assign").assign,y=e("../../constants").BUS_CONFIGURATION_REQUEST_EVENT,A=["name","dispatchFrameUrl","openFrameUrl"];function I(){}function L(T){if(!T)throw new Error("Valid configuration is required");if(A.forEach(function(x){if(!T.hasOwnProperty(x))throw new Error("A valid frame "+x+" must be provided")}),!/^[\w_]+$/.test(T.name))throw new Error("A valid frame name must be provided")}function C(T){L(T),this._serviceId=h().replace(/-/g,""),this._options={name:T.name+"_"+this._serviceId,dispatchFrameUrl:T.dispatchFrameUrl,openFrameUrl:T.openFrameUrl,height:T.height,width:T.width,top:T.top,left:T.left},this.state=T.state||{},this._bus=new c({channel:this._serviceId}),this._setBusEvents()}C.prototype.initialize=function(T){var x=function(){T(),this._bus.off(l.DISPATCH_FRAME_READY,x)}.bind(this);this._bus.on(l.DISPATCH_FRAME_READY,x),this._writeDispatchFrame()},C.prototype._writeDispatchFrame=function(){var T=u.DISPATCH_FRAME_NAME+"_"+this._serviceId,x=this._options.dispatchFrameUrl;this._dispatchFrame=p({"aria-hidden":!0,name:T,title:T,src:x,class:u.DISPATCH_FRAME_CLASS,height:0,width:0,style:{position:"absolute",left:"-9999px"}}),document.body.appendChild(this._dispatchFrame)},C.prototype._setBusEvents=function(){this._bus.on(l.DISPATCH_FRAME_REPORT,function(T,x){this._onCompleteCallback&&this._onCompleteCallback.call(null,T.err,T.payload),this._frame.close(),this._onCompleteCallback=null,x&&x()}.bind(this)),this._bus.on(y,function(T){T(this.state)}.bind(this))},C.prototype.open=function(T,x){if(T=T||{},this._frame=this._getFrameForEnvironment(T),this._frame.initialize(x),!(this._frame instanceof s)){if(v(this.state,T.state),this._onCompleteCallback=x,this._frame.open(),this.isFrameClosed()){this._cleanupFrame(),x&&x(new m(d.FRAME_SERVICE_FRAME_OPEN_FAILED));return}this._pollForPopupClose()}},C.prototype.redirect=function(T){this._frame&&!this.isFrameClosed()&&this._frame.redirect(T)},C.prototype.close=function(){this.isFrameClosed()||this._frame.close()},C.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},C.prototype.createHandler=function(T){return T=T||{},{close:function(){T.beforeClose&&T.beforeClose(),this.close()}.bind(this),focus:function(){T.beforeFocus&&T.beforeFocus(),this.focus()}.bind(this)}},C.prototype.createNoopHandler=function(){return{close:I,focus:I}},C.prototype.teardown=function(){this.close(),this._dispatchFrame.parentNode.removeChild(this._dispatchFrame),this._dispatchFrame=null,this._cleanupFrame()},C.prototype.isFrameClosed=function(){return this._frame==null||this._frame.isClosed()},C.prototype._cleanupFrame=function(){this._frame=null,clearInterval(this._popupInterval),this._popupInterval=null},C.prototype._pollForPopupClose=function(){return this._popupInterval=setInterval(function(){this.isFrameClosed()&&(this._cleanupFrame(),this._onCompleteCallback&&this._onCompleteCallback(new m(d.FRAME_SERVICE_FRAME_CLOSED)))}.bind(this),u.POPUP_POLL_INTERVAL),this._popupInterval},C.prototype._getFrameForEnvironment=function(T){var x=f.supportsPopups(),k=!!window.popupBridge,U=v({},this._options,T);return k?new s(U):x?new i(U):new o(U)},n.exports=C},{"../../braintree-error":59,"../../constants":60,"../shared/browser-detection":74,"../shared/constants":75,"../shared/errors":76,"../shared/events":77,"./../../assign":57,"./strategies/modal":69,"./strategies/popup":72,"./strategies/popup-bridge":70,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],68:[function(e,n,a){var i=e("./frame-service");n.exports={create:function(o,c){var l=new i(o);l.initialize(function(){c(l)})}}},{"./frame-service":67}],69:[function(e,n,a){var i=e("@braintree/iframer"),s=e("../../../assign").assign,o=e("../../shared/browser-detection"),c={position:"fixed",top:0,left:0,bottom:0,padding:0,margin:0,border:0,outline:"none",zIndex:20001,background:"#FFFFFF"};function l(){}function d(u){this._closed=null,this._frame=null,this._options=u||{},this._container=this._options.container||document.body}d.prototype.initialize=l,d.prototype.open=function(){var u={src:this._options.openFrameUrl,name:this._options.name,scrolling:"yes",height:"100%",width:"100%",style:s({},c),title:"Lightbox Frame"};o.isIos()?(o.isIosWKWebview()&&(this._lockScrolling(),u.style={}),this._el=document.createElement("div"),s(this._el.style,c,{height:"100%",width:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"}),this._frame=i(u),this._el.appendChild(this._frame)):this._el=this._frame=i(u),this._closed=!1,this._container.appendChild(this._el)},d.prototype.focus=l,d.prototype.close=function(){this._container.removeChild(this._el),this._frame=null,this._closed=!0,o.isIosWKWebview()&&this._unlockScrolling()},d.prototype.isClosed=function(){return!!this._closed},d.prototype.redirect=function(u){this._frame.src=u},d.prototype._unlockScrolling=function(){document.body.style.overflow=this._savedBodyProperties.overflowStyle,document.body.style.position=this._savedBodyProperties.positionStyle,window.scrollTo(this._savedBodyProperties.left,this._savedBodyProperties.top),delete this._savedBodyProperties},d.prototype._lockScrolling=function(){var u=document.documentElement;this._savedBodyProperties={left:(window.pageXOffset||u.scrollLeft)-(u.clientLeft||0),top:(window.pageYOffset||u.scrollTop)-(u.clientTop||0),overflowStyle:document.body.style.overflow,positionStyle:document.body.style.position},document.body.style.overflow="hidden",document.body.style.position="fixed",window.scrollTo(0,0)},n.exports=d},{"../../../assign":57,"../../shared/browser-detection":74,"@braintree/iframer":27}],70:[function(e,n,a){var i=e("../../../braintree-error"),s=e("../../shared/errors");function o(){}function c(l){this._closed=null,this._options=l}c.prototype.initialize=function(l){var d=this;window.popupBridge.onComplete=function(u,h){var p=!h&&!u;if(d._closed=!0,u||p){l(new i(s.FRAME_SERVICE_FRAME_CLOSED));return}l(null,h)}},c.prototype.open=function(l){var d;l=l||{},d=l.openFrameUrl||this._options.openFrameUrl,this._closed=!1,window.popupBridge.open(d)},c.prototype.focus=o,c.prototype.close=o,c.prototype.isClosed=function(){return!!this._closed},c.prototype.redirect=function(l){this.open({openFrameUrl:l})},n.exports=c},{"../../../braintree-error":59,"../../shared/errors":76}],71:[function(e,n,a){var i=e("../../../shared/constants"),s=e("./position");function o(c,l,d){return typeof l!="undefined"?l:s[c](d)}n.exports=function(l){var d=l.height||i.DEFAULT_POPUP_HEIGHT,u=l.width||i.DEFAULT_POPUP_WIDTH,h=o("top",l.top,d),p=o("left",l.left,u);return[i.POPUP_BASE_OPTIONS,"height="+d,"width="+u,"top="+h,"left="+p].join(",")}},{"../../../shared/constants":75,"./position":73}],72:[function(e,n,a){var i=e("./compose-options");function s(){}function o(c){this._frame=null,this._options=c||{}}o.prototype.initialize=s,o.prototype.open=function(){this._frame=window.open(this._options.openFrameUrl,this._options.name,i(this._options))},o.prototype.focus=function(){this._frame.focus()},o.prototype.close=function(){this._frame.closed||this._frame.close()},o.prototype.isClosed=function(){return!this._frame||!!this._frame.closed},o.prototype.redirect=function(c){this._frame.location.href=c},n.exports=o},{"./compose-options":71}],73:[function(e,n,a){function i(c){var l=window.outerHeight||document.documentElement.clientHeight,d=window.screenY==null?window.screenTop:window.screenY;return o(l,c,d)}function s(c){var l=window.outerWidth||document.documentElement.clientWidth,d=window.screenX==null?window.screenLeft:window.screenX;return o(l,c,d)}function o(c,l,d){return(c-l)/2+d}n.exports={top:i,left:s,center:o}},{}],74:[function(e,n,a){n.exports={isIos:e("@braintree/browser-detection/is-ios"),isIosWKWebview:e("@braintree/browser-detection/is-ios-wkwebview"),supportsPopups:e("@braintree/browser-detection/supports-popups")}},{"@braintree/browser-detection/is-ios":23,"@braintree/browser-detection/is-ios-wkwebview":22,"@braintree/browser-detection/supports-popups":25}],75:[function(e,n,a){n.exports={DISPATCH_FRAME_NAME:"dispatch",DISPATCH_FRAME_CLASS:"braintree-dispatch-frame",POPUP_BASE_OPTIONS:"resizable,scrollbars",DEFAULT_POPUP_WIDTH:450,DEFAULT_POPUP_HEIGHT:535,POPUP_POLL_INTERVAL:100,POPUP_CLOSE_TIMEOUT:100}},{}],76:[function(e,n,a){var i=e("../../braintree-error");n.exports={FRAME_SERVICE_FRAME_CLOSED:{type:i.types.INTERNAL,code:"FRAME_SERVICE_FRAME_CLOSED",message:"Frame closed before tokenization could occur."},FRAME_SERVICE_FRAME_OPEN_FAILED:{type:i.types.INTERNAL,code:"FRAME_SERVICE_FRAME_OPEN_FAILED",message:"Frame failed to open."}}},{"../../braintree-error":59}],77:[function(e,n,a){var i=e("../../enumerate");n.exports=i(["DISPATCH_FRAME_READY","DISPATCH_FRAME_REPORT"],"frameService:")},{"../../enumerate":65}],78:[function(e,n,a){n.exports=function(s){s=s||window;try{return s.self!==s.top}catch(o){return!0}}},{}],79:[function(e,n,a){var i,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(l){return l.split(".").slice(-2).join(".")}function c(l){var d;return l=l.toLowerCase(),/^https:/.test(l)?(i=i||document.createElement("a"),i.href=l,d=o(i.hostname),s.hasOwnProperty(d)):!1}n.exports=c},{}],80:[function(e,n,a){n.exports=function(i){return JSON.parse(JSON.stringify(i))}},{}],81:[function(e,n,a){n.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}],82:[function(e,n,a){function i(u){var h;for(h in u)if(u.hasOwnProperty(h))return!0;return!1}function s(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function o(u){return u=u||window.location.href,/\?/.test(u)}function c(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(m,f){var v=f.split("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return m[y]=A,m},{}),p):{}}function l(u,h){var p,m,f,v=[];for(f in u)u.hasOwnProperty(f)&&(m=u[f],h?s(u)?p=h+"[]":p=h+"["+f+"]":p=f,typeof m=="object"?v.push(l(m,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(m)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&i(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=l(h)),u}n.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],83:[function(e,n,a){n.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],84:[function(e,n,a){var i=e("./querystring");function s(){return i.parse(window.location.href)}n.exports={getUrlParams:s}},{"./querystring":82}],85:[function(e,n,a){function i(s){return s?"":".min"}n.exports=i},{}],86:[function(e,n,a){var i=typeof atob=="function"?atob:s;function s(o){var c,l,d,u,h,p,m,f,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");f=0;do u=y.indexOf(o.charAt(f++)),h=y.indexOf(o.charAt(f++)),p=y.indexOf(o.charAt(f++)),m=y.indexOf(o.charAt(f++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|m&63,A+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(f<o.length);return A}n.exports={atob:function(o){return i.call(window,o)},_atob:s}},{}],87:[function(e,n,a){var i=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},s=i(e("./venmo-desktop"));n.exports=function(c){var l=new s.default(c);return l.initialize()}},{"./venmo-desktop":89}],88:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.VENMO_PAYMENT_CONTEXT_STATUS_QUERY=a.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY=a.UPDATE_PAYMENT_CONTEXT_QUERY=a.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY=a.CREATE_PAYMENT_CONTEXT_QUERY=a.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=void 0,a.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=`mutation CreateVenmoQRCodePaymentContext($input: CreateVenmoQRCodePaymentContextInput!) {
|
|
375
375
|
createVenmoQRCodePaymentContext(input: $input) {
|
|
376
376
|
clientMutationId
|
|
377
377
|
venmoQRCodePaymentContext {
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
expiresAt
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
}`,
|
|
384
|
+
}`,a.CREATE_PAYMENT_CONTEXT_QUERY=`mutation CreateVenmoPaymentContext($input: CreateVenmoPaymentContextInput!) {
|
|
385
385
|
createVenmoPaymentContext(input: $input) {
|
|
386
386
|
clientMutationId
|
|
387
387
|
venmoPaymentContext {
|
|
@@ -391,15 +391,15 @@
|
|
|
391
391
|
expiresAt
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
}`,
|
|
394
|
+
}`,a.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY=`mutation UpdateVenmoQRCodePaymentContext($input: UpdateVenmoQRCodePaymentContextInput!) {
|
|
395
395
|
updateVenmoQRCodePaymentContext(input: $input) {
|
|
396
396
|
clientMutationId
|
|
397
397
|
}
|
|
398
|
-
}`,
|
|
398
|
+
}`,a.UPDATE_PAYMENT_CONTEXT_QUERY=`mutation UpdateVenmoPaymentContextStatus($input: UpdateVenmoPaymentContextStatusInput!) {
|
|
399
399
|
updateVenmoPaymentContextStatus(input: $input) {
|
|
400
400
|
clientMutationId
|
|
401
401
|
}
|
|
402
|
-
}`,
|
|
402
|
+
}`,a.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY=`query PaymentContext($id: ID!) {
|
|
403
403
|
node(id: $id) {
|
|
404
404
|
... on VenmoQRCodePaymentContext {
|
|
405
405
|
status
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
userName
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
}`,
|
|
410
|
+
}`,a.VENMO_PAYMENT_CONTEXT_STATUS_QUERY=`query PaymentContext($id: ID!) {
|
|
411
411
|
node(id: $id) {
|
|
412
412
|
... on VenmoPaymentContext {
|
|
413
413
|
status
|
|
@@ -441,12 +441,12 @@
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
}`},{}],89:[function(e,n,i){var a=this&&this.__assign||function(){return a=Object.assign||function(f){for(var v,b=1,A=arguments.length;b<A;b++){v=arguments[b];for(var T in v)Object.prototype.hasOwnProperty.call(v,T)&&(f[T]=v[T])}return f},a.apply(this,arguments)},s=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(i,"__esModule",{value:!0});var o=s(e("framebus")),l=s(e("@braintree/iframer")),c=s(e("@braintree/uuid")),d=e("../shared/events"),u=e("./queries"),h=1e3,p=2e3,m=function(){function f(v){this.isHidden=!0,this.env=v.environment,this.id=c.default(),this.profileId=v.profileId,this.displayName=v.displayName,this.paymentMethodUsage=v.paymentMethodUsage,this.shouldUseLegacyQRCodeMutation=!this.paymentMethodUsage;var b=v.url+"#"+this.env+"_"+this.id;this.bus=new o.default({channel:this.id,verifyDomain:v.verifyDomain,targetFrames:[]}),this.apiRequest=v.apiRequest,this.sendEvent=v.sendEvent,this.Promise=v.Promise,this.alertBox=document.createElement("div"),this.alertBox.setAttribute("data-venmo-desktop-id",this.id),this.alertBox.setAttribute("role","alert"),this.alertBox.style.position="fixed",this.alertBox.style.display="none",this.alertBox.style.height="1px",this.alertBox.style.width="1px",this.alertBox.style.overflow="hidden",this.alertBox.style.zIndex="0",this.iframe=l.default({src:b,name:"venmo-desktop-iframe",style:{display:"none",position:"fixed",top:"0",bottom:"0",right:"0",left:"0",height:"100%",width:"100%",zIndex:"9999999"},title:"Venmo Desktop"}),this.bus.addTargetFrame(this.iframe)}return f.prototype.initialize=function(){var v=this;return new this.Promise(function(b){v.bus.on(d.VENMO_DESKTOP_IFRAME_READY,function(){b(v)}),v.bus.on(d.VENMO_DESKTOP_REQUEST_NEW_QR_CODE,function(){v.sendEvent("venmo.tokenize.desktop.restarted-from-error-view"),v.startPolling()}),document.body.appendChild(v.iframe),document.body.appendChild(v.alertBox)})},f.prototype.launchDesktopFlow=function(){var v=this;this.isHidden=!1;var b=new this.Promise(function(A,T){v.launchDesktopPromiseRejectFunction=T;var L=function(){v.bus.off(d.VENMO_DESKTOP_CUSTOMER_CANCELED,I),v.bus.off(d.VENMO_DESKTOP_UNKNOWN_ERROR,C)},C=function(x){L(),v.sendEvent("venmo.tokenize.desktop.unknown-error"),T({allowUIToHandleError:!1,reason:"UNKNOWN_ERROR",err:x})},I=function(){L(),v.updateVenmoDesktopPaymentContext("CANCELED"),v.sendEvent("venmo.tokenize.desktop.status-change.canceled-from-modal"),T({allowUIToHandleError:!1,reason:"CUSTOMER_CANCELED"})};v.completedHandler=function(x){L(),A(x)},v.bus.on(d.VENMO_DESKTOP_CUSTOMER_CANCELED,I),v.bus.on(d.VENMO_DESKTOP_UNKNOWN_ERROR,C)});return this.iframe.style.display="block",this.setAlert("Generating a QR code, get your Venmo app ready"),this.iframe.focus(),this.startPolling(),b.then(function(A){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,A}).catch(function(A){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,v.Promise.reject(A)})},f.prototype.triggerCompleted=function(v){var b=this;this.isHidden||setTimeout(function(){b.completedHandler&&b.completedHandler(v),delete b.completedHandler},p)},f.prototype.triggerRejected=function(v){this.launchDesktopPromiseRejectFunction&&this.launchDesktopPromiseRejectFunction(v)},f.prototype.hideDesktopFlow=function(){this.setAlert(""),this.iframe.style.display="none",this.bus.emit(d.VENMO_DESKTOP_CLOSED_FROM_PARENT),this.isHidden=!0},f.prototype.displayError=function(v){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_ERROR,{message:v}),this.setAlert(v))},f.prototype.displayQRCode=function(v,b){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_QR_CODE,{id:v,merchantId:b}),this.setAlert("To scan the QR code, open your Venmo app"))},f.prototype.authorize=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZE),this.setAlert("Venmo account authorized"))},f.prototype.authorizing=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZING),this.setAlert("Authorize on your Venmo app"))},f.prototype.startPolling=function(){var v=this;return this.createVenmoDesktopPaymentContext().then(function(b){var A=new Date(b.expiresAt).getTime()-new Date(b.createdAt).getTime(),T=Date.now()+A;return v.displayQRCode(b.id,b.merchantId),v.pollForStatusChange(b.status,T)}).then(function(b){if(b){var A=b.userName||"";A="@"+A.replace("@",""),v.triggerCompleted({paymentMethodNonce:b.paymentMethodId,username:A,payerInfo:b.payerInfo,id:v.venmoContextId||""})}}).catch(function(b){b.allowUIToHandleError||(v.sendEvent("venmo.tokenize.desktop.unhandled-error"),v.triggerRejected(b))})},f.prototype.pollForStatusChange=function(v,b){var A=this;return this.venmoContextId?Date.now()>b?this.updateVenmoDesktopPaymentContext("EXPIRED").then(function(){return A.displayError("Something went wrong"),A.sendEvent("venmo.tokenize.desktop.status-change.sdk-timeout"),A.Promise.reject({allowUIToHandleError:!0,reason:"TIMEOUT"})}):this.lookupVenmoDesktopPaymentContext().then(function(T){if(!A.venmoContextId||!T)return A.Promise.resolve();var L=T.status;if(L!==v)switch(v=L,A.sendEvent("venmo.tokenize.desktop.status-change."+v.toLowerCase()),v){case"CREATED":break;case"EXPIRED":case"FAILED":case"CANCELED":var C=v==="CANCELED"?"The authorization was canceled":"Something went wrong";return A.displayError(C),A.Promise.reject({allowUIToHandleError:!0,reason:v});case"SCANNED":A.authorizing();break;case"APPROVED":return A.authorize(),A.Promise.resolve(T)}return new A.Promise(function(I,x){setTimeout(function(){A.pollForStatusChange(v,b).then(I).catch(x)},h)})}):this.Promise.resolve()},f.prototype.teardown=function(){this.bus.teardown(),this.iframe.parentNode&&this.iframe.parentNode.removeChild(this.iframe),this.alertBox.parentNode&&this.alertBox.parentNode.removeChild(this.alertBox)},f.prototype.setAlert=function(v){this.alertBox.style.display=v?"block":"none",this.alertBox.textContent=v},f.prototype.createPaymentContextFromGraphqlLegacyQRCodeMutation=function(v){return this.apiRequest(u.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,{input:{environment:this.env,intent:v}}).then(function(b){return b.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext})},f.prototype.createPaymentContextFromGraphQL=function(v){var b={intent:v,paymentMethodUsage:this.paymentMethodUsage,customerClient:"DESKTOP"};return this.profileId&&(b.merchantProfileId=this.profileId),this.displayName&&(b.displayName=this.displayName),this.apiRequest(u.CREATE_PAYMENT_CONTEXT_QUERY,{input:b}).then(function(A){return A.createVenmoPaymentContext.venmoPaymentContext})},f.prototype.createVenmoDesktopPaymentContext=function(){var v=this,b=this.shouldUseLegacyQRCodeMutation?this.createPaymentContextFromGraphqlLegacyQRCodeMutation("PAY_FROM_APP"):this.createPaymentContextFromGraphQL("PAY_FROM_APP");return b.then(function(A){v.venmoContextId=A.id;var T=v.profileId||A.merchantId;return{id:A.id,status:A.status,merchantId:T,createdAt:A.createdAt,expiresAt:A.expiresAt}})},f.prototype.updateVenmoDesktopPaymentContext=function(v,b){if(b===void 0&&(b={}),!this.venmoContextId)return this.Promise.resolve();var A={input:a({id:this.venmoContextId,status:v},b)},T=this.shouldUseLegacyQRCodeMutation?u.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:u.UPDATE_PAYMENT_CONTEXT_QUERY;return this.apiRequest(T,A).then(function(){})},f.prototype.lookupVenmoDesktopPaymentContext=function(){if(!this.venmoContextId)return this.Promise.resolve();var v=this.shouldUseLegacyQRCodeMutation?u.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:u.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return this.apiRequest(v,{id:this.venmoContextId}).then(function(b){return b.node})},f}();i.default=m},{"../shared/events":94,"./queries":88,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],90:[function(e,n,i){var a=e("../lib/analytics"),s=e("../lib/basic-component-verification"),o=e("../lib/create-deferred-client"),l=e("../lib/create-assets-url"),c=e("./shared/errors"),d=e("@braintree/wrap-promise"),u=e("../lib/braintree-error"),h=e("./venmo"),p=e("./shared/supports-venmo"),m="3.126.0";function f(b){var A="Venmo";return s.verify({name:A,client:b.client,authorization:b.authorization}).then(function(){var T,L;return b.profileId&&typeof b.profileId!="string"?Promise.reject(new u(c.VENMO_INVALID_PROFILE_ID)):b.deepLinkReturnUrl&&typeof b.deepLinkReturnUrl!="string"?Promise.reject(new u(c.VENMO_INVALID_DEEP_LINK_RETURN_URL)):(T=o.create({authorization:b.authorization,client:b.client,debug:b.debug,assetsUrl:l.create(b.authorization),name:A}).then(function(C){var I=C.getConfiguration();return b.client=C,I.gatewayConfiguration.payWithVenmo?C:Promise.reject(new u(c.VENMO_NOT_ENABLED))}),b.createPromise=T,L=new h(b),a.sendEvent(T,"venmo.initialized"),T.then(function(){return L}))})}function v(b){return p.isBrowserSupported(b)}n.exports={create:d(f),isBrowserSupported:v,VERSION:m}},{"../lib/analytics":55,"../lib/basic-component-verification":58,"../lib/braintree-error":59,"../lib/create-assets-url":62,"../lib/create-deferred-client":64,"./shared/errors":93,"./shared/supports-venmo":96,"./venmo":98,"@braintree/wrap-promise":35}],91:[function(e,n,i){var a=e("@braintree/browser-detection/is-android"),s=e("@braintree/browser-detection/is-chrome"),o=e("@braintree/browser-detection/is-ios"),l=e("@braintree/browser-detection/is-ios-safari"),c=e("@braintree/browser-detection/is-ios-webview"),d=e("@braintree/browser-detection/is-samsung");function u(){return a()&&window.navigator.userAgent.toLowerCase().indexOf("wv")>-1}function h(){return o()?c()||!l():!1}function p(){var f=window.navigator.userAgent.toLowerCase();return f.indexOf("huawei")>-1&&f.indexOf("fban")>-1?!0:a()?f.indexOf("fb_iab")>-1||f.indexOf("instagram")>-1:!1}function m(){return o()&&s()}n.exports={isAndroid:a,isAndroidWebview:u,isChrome:s,isIos:o,isIosChrome:m,isSamsung:d,isIosSafari:l,isIosWebview:c,isFacebookOwnedBrowserOnAndroid:p,doesNotSupportWindowOpenInIos:h}},{"@braintree/browser-detection/is-android":18,"@braintree/browser-detection/is-chrome":19,"@braintree/browser-detection/is-ios":23,"@braintree/browser-detection/is-ios-safari":20,"@braintree/browser-detection/is-ios-webview":21,"@braintree/browser-detection/is-samsung":24}],92:[function(e,n,i){n.exports={DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY:500,DEFAULT_PROCESS_RESULTS_DELAY:1e3,VENMO_APP_OR_MOBILE_AUTH_URL:"https://venmo.com/go/checkout",VENMO_MOBILE_APP_AUTH_ONLY_URL:"https://venmo.com/braintree/checkout",VENMO_WEB_LOGIN_URL:"https://account.venmo.com/go/web"}},{}],93:[function(e,n,i){var a=e("../../lib/braintree-error");n.exports={VENMO_NOT_ENABLED:{type:a.types.MERCHANT,code:"VENMO_NOT_ENABLED",message:"Venmo is not enabled for this merchant."},VENMO_TOKENIZATION_REQUEST_ACTIVE:{type:a.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_ACTIVE",message:"Another tokenization request is active."},VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE:{type:a.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE",message:"No tokenization in progress."},VENMO_APP_FAILED:{type:a.types.UNKNOWN,code:"VENMO_APP_FAILED",message:"Venmo app encountered a problem."},VENMO_APP_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_APP_CANCELED",message:"Venmo app authorization was canceled."},VENMO_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_CANCELED",message:"User canceled Venmo authorization, or Venmo app is not available."},VENMO_CUSTOMER_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_CUSTOMER_CANCELED",message:"User canceled Venmo authorization."},VENMO_NETWORK_ERROR:{type:a.types.NETWORK,code:"VENMO_NETWORK_ERROR",message:"Something went wrong making the request"},VENMO_DESKTOP_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_DESKTOP_CANCELED",message:"User canceled Venmo authorization by closing the Venmo Desktop modal."},VENMO_TOKENIZATION_CANCELED_BY_MERCHANT:{type:a.types.MERCHANT,code:"VENMO_TOKENIZATION_CANCELED_BY_MERCHANT",message:"The Venmo tokenization was canceled by the merchant."},VENMO_DESKTOP_UNKNOWN_ERROR:{type:a.types.UNKNOWN,code:"VENMO_DESKTOP_UNKNOWN_ERROR",message:"Something went wrong with the Venmo Desktop flow."},VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED:{type:a.types.NETWORK,code:"VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED",message:"Something went wrong creating the Venmo Payment Context."},VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR:{type:a.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR",message:"Something went wrong during mobile polling."},VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED:{type:a.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED",message:"The Venmo authorization request is expired."},VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED",message:"The Venmo authorization was canceled"},VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT:{type:a.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT",message:"Customer took too long to authorize Venmo payment."},VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID:{type:a.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID",message:"No Venmo payment context ID available."},VENMO_MOBILE_POLLING_TOKENIZATION_FAILED:{type:a.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_FAILED",message:"The Venmo authorization failed."},VENMO_INVALID_PROFILE_ID:{type:a.types.MERCHANT,code:"VENMO_INVALID_PROFILE_ID",message:"Venmo profile ID is invalid."},VENMO_INVALID_DEEP_LINK_RETURN_URL:{type:a.types.MERCHANT,code:"VENMO_INVALID_DEEP_LINK_RETURN_URL",message:"Venmo deep link return URL is invalid."},VENMO_TOKENIZATION_FAILED:{type:a.types.UNKNOWN,code:"VENMO_TOKENIZATION_FAILED",message:"Venmo encountered a problem"},VENMO_ECD_DISABLED:{type:a.types.MERCHANT,code:"ECD_DISABLED",message:"Cannot collect customer data when ECD is disabled. Enable this feature in the Control Panel to collect this data."}}},{"../../lib/braintree-error":59}],94:[function(e,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.VENMO_DESKTOP_UNKNOWN_ERROR=i.VENMO_DESKTOP_REQUEST_NEW_QR_CODE=i.VENMO_DESKTOP_CLOSED_FROM_PARENT=i.VENMO_DESKTOP_IFRAME_READY=i.VENMO_DESKTOP_DISPLAY_QR_CODE=i.VENMO_DESKTOP_DISPLAY_ERROR=i.VENMO_DESKTOP_CUSTOMER_CANCELED=i.VENMO_DESKTOP_AUTHORIZING=i.VENMO_DESKTOP_AUTHORIZE=i.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT=void 0,i.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT="VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT",i.VENMO_DESKTOP_AUTHORIZE="VENMO_DESKTOP_AUTHORIZE",i.VENMO_DESKTOP_AUTHORIZING="VENMO_DESKTOP_AUTHORIZING",i.VENMO_DESKTOP_CUSTOMER_CANCELED="VENMO_DESKTOP_CUSTOMER_CANCELED",i.VENMO_DESKTOP_DISPLAY_ERROR="VENMO_DESKTOP_DISPLAY_ERROR",i.VENMO_DESKTOP_DISPLAY_QR_CODE="VENMO_DESKTOP_DISPLAY_QR_CODE",i.VENMO_DESKTOP_IFRAME_READY="VENMO_DESKTOP_IFRAME_READY",i.VENMO_DESKTOP_CLOSED_FROM_PARENT="VENMO_DESKTOP_CLOSED_FROM_PARENT",i.VENMO_DESKTOP_REQUEST_NEW_QR_CODE="VENMO_DESKTOP_REQUEST_NEW_QR_CODE",i.VENMO_DESKTOP_UNKNOWN_ERROR="VENMO_DESKTOP_UNKNOWN_ERROR"},{}],95:[function(e,n,i){var a=e("./constants");function s(o){return o.useAllowDesktopWebLogin?a.VENMO_WEB_LOGIN_URL:o.mobileWebFallBack?a.VENMO_APP_OR_MOBILE_AUTH_URL:a.VENMO_MOBILE_APP_AUTH_ONLY_URL}n.exports=s},{"./constants":92}],96:[function(e,n,i){var a=e("./browser-detection"),s=e("../../lib/in-iframe");function o(l){var c,d,u,h,p,m=a.isAndroid(),f=m||a.isIos(),v=m&&a.isChrome(),b=a.isIosSafari()||v;return l=l||{},d=(l.allowDesktopWebLogin||l.allowDesktop)===!0,h=l.hasOwnProperty("allowNewBrowserTab")?l.allowNewBrowserTab:!0,p=l.hasOwnProperty("allowWebviews")?l.allowWebviews:!0,u=h&&!s(),c=!u&&a.isIosChrome()||a.isFacebookOwnedBrowserOnAndroid()||a.isSamsung(),c||!p&&(a.isAndroidWebview()||a.isIosWebview())?!1:f?h?f:b:d}n.exports={isBrowserSupported:o}},{"../../lib/in-iframe":78,"./browser-detection":91}],97:[function(e,n,i){var a=e("../../lib/frame-service/external"),s=e("../../lib/use-min"),o=e("@braintree/extended-promise"),l=e("../shared/errors"),c=e("../../lib/braintree-error"),d="3.126.0",u=`<svg width="198" height="58" viewBox="0 0 198 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
444
|
+
}`},{}],89:[function(e,n,a){var i=this&&this.__assign||function(){return i=Object.assign||function(f){for(var v,y=1,A=arguments.length;y<A;y++){v=arguments[y];for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&(f[I]=v[I])}return f},i.apply(this,arguments)},s=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(a,"__esModule",{value:!0});var o=s(e("framebus")),c=s(e("@braintree/iframer")),l=s(e("@braintree/uuid")),d=e("../shared/events"),u=e("./queries"),h=1e3,p=2e3,m=function(){function f(v){this.isHidden=!0,this.env=v.environment,this.id=l.default(),this.profileId=v.profileId,this.displayName=v.displayName,this.paymentMethodUsage=v.paymentMethodUsage,this.shouldUseLegacyQRCodeMutation=!this.paymentMethodUsage;var y=v.url+"#"+this.env+"_"+this.id;this.bus=new o.default({channel:this.id,verifyDomain:v.verifyDomain,targetFrames:[]}),this.apiRequest=v.apiRequest,this.sendEvent=v.sendEvent,this.Promise=v.Promise,this.alertBox=document.createElement("div"),this.alertBox.setAttribute("data-venmo-desktop-id",this.id),this.alertBox.setAttribute("role","alert"),this.alertBox.style.position="fixed",this.alertBox.style.display="none",this.alertBox.style.height="1px",this.alertBox.style.width="1px",this.alertBox.style.overflow="hidden",this.alertBox.style.zIndex="0",this.iframe=c.default({src:y,name:"venmo-desktop-iframe",style:{display:"none",position:"fixed",top:"0",bottom:"0",right:"0",left:"0",height:"100%",width:"100%",zIndex:"9999999"},title:"Venmo Desktop"}),this.bus.addTargetFrame(this.iframe)}return f.prototype.initialize=function(){var v=this;return new this.Promise(function(y){v.bus.on(d.VENMO_DESKTOP_IFRAME_READY,function(){y(v)}),v.bus.on(d.VENMO_DESKTOP_REQUEST_NEW_QR_CODE,function(){v.sendEvent("venmo.tokenize.desktop.restarted-from-error-view"),v.startPolling()}),document.body.appendChild(v.iframe),document.body.appendChild(v.alertBox)})},f.prototype.launchDesktopFlow=function(){var v=this;this.isHidden=!1;var y=new this.Promise(function(A,I){v.launchDesktopPromiseRejectFunction=I;var L=function(){v.bus.off(d.VENMO_DESKTOP_CUSTOMER_CANCELED,T),v.bus.off(d.VENMO_DESKTOP_UNKNOWN_ERROR,C)},C=function(x){L(),v.sendEvent("venmo.tokenize.desktop.unknown-error"),I({allowUIToHandleError:!1,reason:"UNKNOWN_ERROR",err:x})},T=function(){L(),v.updateVenmoDesktopPaymentContext("CANCELED"),v.sendEvent("venmo.tokenize.desktop.status-change.canceled-from-modal"),I({allowUIToHandleError:!1,reason:"CUSTOMER_CANCELED"})};v.completedHandler=function(x){L(),A(x)},v.bus.on(d.VENMO_DESKTOP_CUSTOMER_CANCELED,T),v.bus.on(d.VENMO_DESKTOP_UNKNOWN_ERROR,C)});return this.iframe.style.display="block",this.setAlert("Generating a QR code, get your Venmo app ready"),this.iframe.focus(),this.startPolling(),y.then(function(A){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,A}).catch(function(A){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,v.Promise.reject(A)})},f.prototype.triggerCompleted=function(v){var y=this;this.isHidden||setTimeout(function(){y.completedHandler&&y.completedHandler(v),delete y.completedHandler},p)},f.prototype.triggerRejected=function(v){this.launchDesktopPromiseRejectFunction&&this.launchDesktopPromiseRejectFunction(v)},f.prototype.hideDesktopFlow=function(){this.setAlert(""),this.iframe.style.display="none",this.bus.emit(d.VENMO_DESKTOP_CLOSED_FROM_PARENT),this.isHidden=!0},f.prototype.displayError=function(v){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_ERROR,{message:v}),this.setAlert(v))},f.prototype.displayQRCode=function(v,y){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_QR_CODE,{id:v,merchantId:y}),this.setAlert("To scan the QR code, open your Venmo app"))},f.prototype.authorize=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZE),this.setAlert("Venmo account authorized"))},f.prototype.authorizing=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZING),this.setAlert("Authorize on your Venmo app"))},f.prototype.startPolling=function(){var v=this;return this.createVenmoDesktopPaymentContext().then(function(y){var A=new Date(y.expiresAt).getTime()-new Date(y.createdAt).getTime(),I=Date.now()+A;return v.displayQRCode(y.id,y.merchantId),v.pollForStatusChange(y.status,I)}).then(function(y){if(y){var A=y.userName||"";A="@"+A.replace("@",""),v.triggerCompleted({paymentMethodNonce:y.paymentMethodId,username:A,payerInfo:y.payerInfo,id:v.venmoContextId||""})}}).catch(function(y){y.allowUIToHandleError||(v.sendEvent("venmo.tokenize.desktop.unhandled-error"),v.triggerRejected(y))})},f.prototype.pollForStatusChange=function(v,y){var A=this;return this.venmoContextId?Date.now()>y?this.updateVenmoDesktopPaymentContext("EXPIRED").then(function(){return A.displayError("Something went wrong"),A.sendEvent("venmo.tokenize.desktop.status-change.sdk-timeout"),A.Promise.reject({allowUIToHandleError:!0,reason:"TIMEOUT"})}):this.lookupVenmoDesktopPaymentContext().then(function(I){if(!A.venmoContextId||!I)return A.Promise.resolve();var L=I.status;if(L!==v)switch(v=L,A.sendEvent("venmo.tokenize.desktop.status-change."+v.toLowerCase()),v){case"CREATED":break;case"EXPIRED":case"FAILED":case"CANCELED":var C=v==="CANCELED"?"The authorization was canceled":"Something went wrong";return A.displayError(C),A.Promise.reject({allowUIToHandleError:!0,reason:v});case"SCANNED":A.authorizing();break;case"APPROVED":return A.authorize(),A.Promise.resolve(I)}return new A.Promise(function(T,x){setTimeout(function(){A.pollForStatusChange(v,y).then(T).catch(x)},h)})}):this.Promise.resolve()},f.prototype.teardown=function(){this.bus.teardown(),this.iframe.parentNode&&this.iframe.parentNode.removeChild(this.iframe),this.alertBox.parentNode&&this.alertBox.parentNode.removeChild(this.alertBox)},f.prototype.setAlert=function(v){this.alertBox.style.display=v?"block":"none",this.alertBox.textContent=v},f.prototype.createPaymentContextFromGraphqlLegacyQRCodeMutation=function(v){return this.apiRequest(u.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,{input:{environment:this.env,intent:v}}).then(function(y){return y.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext})},f.prototype.createPaymentContextFromGraphQL=function(v){var y={intent:v,paymentMethodUsage:this.paymentMethodUsage,customerClient:"DESKTOP"};return this.profileId&&(y.merchantProfileId=this.profileId),this.displayName&&(y.displayName=this.displayName),this.apiRequest(u.CREATE_PAYMENT_CONTEXT_QUERY,{input:y}).then(function(A){return A.createVenmoPaymentContext.venmoPaymentContext})},f.prototype.createVenmoDesktopPaymentContext=function(){var v=this,y=this.shouldUseLegacyQRCodeMutation?this.createPaymentContextFromGraphqlLegacyQRCodeMutation("PAY_FROM_APP"):this.createPaymentContextFromGraphQL("PAY_FROM_APP");return y.then(function(A){v.venmoContextId=A.id;var I=v.profileId||A.merchantId;return{id:A.id,status:A.status,merchantId:I,createdAt:A.createdAt,expiresAt:A.expiresAt}})},f.prototype.updateVenmoDesktopPaymentContext=function(v,y){if(y===void 0&&(y={}),!this.venmoContextId)return this.Promise.resolve();var A={input:i({id:this.venmoContextId,status:v},y)},I=this.shouldUseLegacyQRCodeMutation?u.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:u.UPDATE_PAYMENT_CONTEXT_QUERY;return this.apiRequest(I,A).then(function(){})},f.prototype.lookupVenmoDesktopPaymentContext=function(){if(!this.venmoContextId)return this.Promise.resolve();var v=this.shouldUseLegacyQRCodeMutation?u.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:u.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return this.apiRequest(v,{id:this.venmoContextId}).then(function(y){return y.node})},f}();a.default=m},{"../shared/events":94,"./queries":88,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],90:[function(e,n,a){var i=e("../lib/analytics"),s=e("../lib/basic-component-verification"),o=e("../lib/create-deferred-client"),c=e("../lib/create-assets-url"),l=e("./shared/errors"),d=e("@braintree/wrap-promise"),u=e("../lib/braintree-error"),h=e("./venmo"),p=e("./shared/supports-venmo"),m="3.126.0";function f(y){var A="Venmo";return s.verify({name:A,client:y.client,authorization:y.authorization}).then(function(){var I,L;return y.profileId&&typeof y.profileId!="string"?Promise.reject(new u(l.VENMO_INVALID_PROFILE_ID)):y.deepLinkReturnUrl&&typeof y.deepLinkReturnUrl!="string"?Promise.reject(new u(l.VENMO_INVALID_DEEP_LINK_RETURN_URL)):(I=o.create({authorization:y.authorization,client:y.client,debug:y.debug,assetsUrl:c.create(y.authorization),name:A}).then(function(C){var T=C.getConfiguration();return y.client=C,T.gatewayConfiguration.payWithVenmo?C:Promise.reject(new u(l.VENMO_NOT_ENABLED))}),y.createPromise=I,L=new h(y),i.sendEvent(I,"venmo.initialized"),I.then(function(){return L}))})}function v(y){return p.isBrowserSupported(y)}n.exports={create:d(f),isBrowserSupported:v,VERSION:m}},{"../lib/analytics":55,"../lib/basic-component-verification":58,"../lib/braintree-error":59,"../lib/create-assets-url":62,"../lib/create-deferred-client":64,"./shared/errors":93,"./shared/supports-venmo":96,"./venmo":98,"@braintree/wrap-promise":35}],91:[function(e,n,a){var i=e("@braintree/browser-detection/is-android"),s=e("@braintree/browser-detection/is-chrome"),o=e("@braintree/browser-detection/is-ios"),c=e("@braintree/browser-detection/is-ios-safari"),l=e("@braintree/browser-detection/is-ios-webview"),d=e("@braintree/browser-detection/is-samsung");function u(){return i()&&window.navigator.userAgent.toLowerCase().indexOf("wv")>-1}function h(){return o()?l()||!c():!1}function p(){var f=window.navigator.userAgent.toLowerCase();return f.indexOf("huawei")>-1&&f.indexOf("fban")>-1?!0:i()?f.indexOf("fb_iab")>-1||f.indexOf("instagram")>-1:!1}function m(){return o()&&s()}n.exports={isAndroid:i,isAndroidWebview:u,isChrome:s,isIos:o,isIosChrome:m,isSamsung:d,isIosSafari:c,isIosWebview:l,isFacebookOwnedBrowserOnAndroid:p,doesNotSupportWindowOpenInIos:h}},{"@braintree/browser-detection/is-android":18,"@braintree/browser-detection/is-chrome":19,"@braintree/browser-detection/is-ios":23,"@braintree/browser-detection/is-ios-safari":20,"@braintree/browser-detection/is-ios-webview":21,"@braintree/browser-detection/is-samsung":24}],92:[function(e,n,a){n.exports={DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY:500,DEFAULT_PROCESS_RESULTS_DELAY:1e3,VENMO_APP_OR_MOBILE_AUTH_URL:"https://venmo.com/go/checkout",VENMO_MOBILE_APP_AUTH_ONLY_URL:"https://venmo.com/braintree/checkout",VENMO_WEB_LOGIN_URL:"https://account.venmo.com/go/web"}},{}],93:[function(e,n,a){var i=e("../../lib/braintree-error");n.exports={VENMO_NOT_ENABLED:{type:i.types.MERCHANT,code:"VENMO_NOT_ENABLED",message:"Venmo is not enabled for this merchant."},VENMO_TOKENIZATION_REQUEST_ACTIVE:{type:i.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_ACTIVE",message:"Another tokenization request is active."},VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE:{type:i.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE",message:"No tokenization in progress."},VENMO_APP_FAILED:{type:i.types.UNKNOWN,code:"VENMO_APP_FAILED",message:"Venmo app encountered a problem."},VENMO_APP_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_APP_CANCELED",message:"Venmo app authorization was canceled."},VENMO_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_CANCELED",message:"User canceled Venmo authorization, or Venmo app is not available."},VENMO_CUSTOMER_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_CUSTOMER_CANCELED",message:"User canceled Venmo authorization."},VENMO_NETWORK_ERROR:{type:i.types.NETWORK,code:"VENMO_NETWORK_ERROR",message:"Something went wrong making the request"},VENMO_DESKTOP_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_DESKTOP_CANCELED",message:"User canceled Venmo authorization by closing the Venmo Desktop modal."},VENMO_TOKENIZATION_CANCELED_BY_MERCHANT:{type:i.types.MERCHANT,code:"VENMO_TOKENIZATION_CANCELED_BY_MERCHANT",message:"The Venmo tokenization was canceled by the merchant."},VENMO_DESKTOP_UNKNOWN_ERROR:{type:i.types.UNKNOWN,code:"VENMO_DESKTOP_UNKNOWN_ERROR",message:"Something went wrong with the Venmo Desktop flow."},VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED:{type:i.types.NETWORK,code:"VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED",message:"Something went wrong creating the Venmo Payment Context."},VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR:{type:i.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR",message:"Something went wrong during mobile polling."},VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED:{type:i.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED",message:"The Venmo authorization request is expired."},VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED",message:"The Venmo authorization was canceled"},VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT:{type:i.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT",message:"Customer took too long to authorize Venmo payment."},VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID:{type:i.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID",message:"No Venmo payment context ID available."},VENMO_MOBILE_POLLING_TOKENIZATION_FAILED:{type:i.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_FAILED",message:"The Venmo authorization failed."},VENMO_INVALID_PROFILE_ID:{type:i.types.MERCHANT,code:"VENMO_INVALID_PROFILE_ID",message:"Venmo profile ID is invalid."},VENMO_INVALID_DEEP_LINK_RETURN_URL:{type:i.types.MERCHANT,code:"VENMO_INVALID_DEEP_LINK_RETURN_URL",message:"Venmo deep link return URL is invalid."},VENMO_TOKENIZATION_FAILED:{type:i.types.UNKNOWN,code:"VENMO_TOKENIZATION_FAILED",message:"Venmo encountered a problem"},VENMO_ECD_DISABLED:{type:i.types.MERCHANT,code:"ECD_DISABLED",message:"Cannot collect customer data when ECD is disabled. Enable this feature in the Control Panel to collect this data."}}},{"../../lib/braintree-error":59}],94:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.VENMO_DESKTOP_UNKNOWN_ERROR=a.VENMO_DESKTOP_REQUEST_NEW_QR_CODE=a.VENMO_DESKTOP_CLOSED_FROM_PARENT=a.VENMO_DESKTOP_IFRAME_READY=a.VENMO_DESKTOP_DISPLAY_QR_CODE=a.VENMO_DESKTOP_DISPLAY_ERROR=a.VENMO_DESKTOP_CUSTOMER_CANCELED=a.VENMO_DESKTOP_AUTHORIZING=a.VENMO_DESKTOP_AUTHORIZE=a.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT=void 0,a.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT="VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT",a.VENMO_DESKTOP_AUTHORIZE="VENMO_DESKTOP_AUTHORIZE",a.VENMO_DESKTOP_AUTHORIZING="VENMO_DESKTOP_AUTHORIZING",a.VENMO_DESKTOP_CUSTOMER_CANCELED="VENMO_DESKTOP_CUSTOMER_CANCELED",a.VENMO_DESKTOP_DISPLAY_ERROR="VENMO_DESKTOP_DISPLAY_ERROR",a.VENMO_DESKTOP_DISPLAY_QR_CODE="VENMO_DESKTOP_DISPLAY_QR_CODE",a.VENMO_DESKTOP_IFRAME_READY="VENMO_DESKTOP_IFRAME_READY",a.VENMO_DESKTOP_CLOSED_FROM_PARENT="VENMO_DESKTOP_CLOSED_FROM_PARENT",a.VENMO_DESKTOP_REQUEST_NEW_QR_CODE="VENMO_DESKTOP_REQUEST_NEW_QR_CODE",a.VENMO_DESKTOP_UNKNOWN_ERROR="VENMO_DESKTOP_UNKNOWN_ERROR"},{}],95:[function(e,n,a){var i=e("./constants");function s(o){return o.useAllowDesktopWebLogin?i.VENMO_WEB_LOGIN_URL:o.mobileWebFallBack?i.VENMO_APP_OR_MOBILE_AUTH_URL:i.VENMO_MOBILE_APP_AUTH_ONLY_URL}n.exports=s},{"./constants":92}],96:[function(e,n,a){var i=e("./browser-detection"),s=e("../../lib/in-iframe");function o(c){var l,d,u,h,p,m=i.isAndroid(),f=m||i.isIos(),v=m&&i.isChrome(),y=i.isIosSafari()||v;return c=c||{},d=(c.allowDesktopWebLogin||c.allowDesktop)===!0,h=c.hasOwnProperty("allowNewBrowserTab")?c.allowNewBrowserTab:!0,p=c.hasOwnProperty("allowWebviews")?c.allowWebviews:!0,u=h&&!s(),l=!u&&i.isIosChrome()||i.isFacebookOwnedBrowserOnAndroid()||i.isSamsung(),l||!p&&(i.isAndroidWebview()||i.isIosWebview())?!1:f?h?f:y:d}n.exports={isBrowserSupported:o}},{"../../lib/in-iframe":78,"./browser-detection":91}],97:[function(e,n,a){var i=e("../../lib/frame-service/external"),s=e("../../lib/use-min"),o=e("@braintree/extended-promise"),c=e("../shared/errors"),l=e("../../lib/braintree-error"),d="3.126.0",u=`<svg width="198" height="58" viewBox="0 0 198 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
445
445
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M43.0702 13.6572C44.1935 15.4585 44.6999 17.3139 44.6999 19.6576C44.6999 27.1328 38.1277 36.8436 32.7935 43.6625H20.6099L15.7236 15.2939L26.3917 14.3105L28.9751 34.4966C31.389 30.6783 34.3678 24.6779 34.3678 20.587C34.3678 18.3477 33.9727 16.8225 33.3553 15.5666L43.0702 13.6572Z" fill="white"/>
|
|
446
446
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M56.8965 26.1491C58.8596 26.1491 63.8018 25.2772 63.8018 22.5499C63.8018 21.2402 62.8481 20.587 61.7242 20.587C59.7579 20.587 57.1776 22.8763 56.8965 26.1491ZM56.6715 31.5506C56.6715 34.8807 58.5787 36.1873 61.107 36.1873C63.8603 36.1873 66.4966 35.534 69.923 33.8433L68.6324 42.3523C66.2183 43.4976 62.4559 44.2617 58.8039 44.2617C49.5403 44.2617 46.2249 38.8071 46.2249 31.9879C46.2249 23.1496 51.6179 13.765 62.7365 13.765C68.858 13.765 72.2809 17.0949 72.2809 21.7317C72.2815 29.2066 62.4005 31.4965 56.6715 31.5506Z" fill="white"/>
|
|
447
447
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M103.067 20.3142C103.067 21.4052 102.897 22.9875 102.727 24.0216L99.5262 43.6622H89.1385L92.0585 25.658C92.1139 25.1696 92.284 24.1865 92.284 23.6411C92.284 22.3314 91.4414 22.0047 90.4282 22.0047C89.0826 22.0047 87.7337 22.6042 86.8354 23.0418L83.5234 43.6625H73.0772L77.8495 14.257H86.8908L87.0052 16.6041C89.1382 15.2404 91.9469 13.7656 95.932 13.7656C101.212 13.765 103.067 16.3845 103.067 20.3142Z" fill="white"/>
|
|
448
448
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M133.906 16.9841C136.881 14.9131 139.69 13.765 143.563 13.765C148.897 13.765 150.753 16.3845 150.753 20.3142C150.753 21.4052 150.583 22.9875 150.413 24.0216L147.216 43.6622H136.825L139.801 25.2774C139.855 24.786 139.971 24.1865 139.971 23.8063C139.971 22.3317 139.128 22.0047 138.115 22.0047C136.824 22.0047 135.535 22.5501 134.577 23.0418L131.266 43.6625H120.878L123.854 25.2777C123.908 24.7863 124.02 24.1868 124.02 23.8065C124.02 22.332 123.177 22.0049 122.167 22.0049C120.819 22.0049 119.473 22.6045 118.574 23.0421L115.26 43.6628H104.817L109.589 14.2573H118.52L118.8 16.7122C120.878 15.241 123.684 13.7662 127.446 13.7662C130.704 13.765 132.837 15.129 133.906 16.9841Z" fill="white"/>
|
|
449
449
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M171.426 25.5502C171.426 23.1496 170.808 21.513 168.956 21.513C164.857 21.513 164.015 28.55 164.015 32.1498C164.015 34.8807 164.802 36.5709 166.653 36.5709C170.528 36.5709 171.426 29.1497 171.426 25.5502ZM153.458 31.7152C153.458 22.442 158.511 13.765 170.136 13.765C178.896 13.765 182.098 18.7854 182.098 25.7148C182.098 34.8805 177.099 44.3723 165.194 44.3723C156.378 44.3723 153.458 38.7525 153.458 31.7152Z" fill="white"/>
|
|
450
|
-
</svg>`,h="Tap cancel payment to cancel and return to the business. Continue payment will relaunch the payment window.",p=400,m=570,f={backdrop:"venmo-desktop-web-backdrop",backdropHidden:"venmo-desktop-web-backdrop.hidden",backdropContainer:"venmo-backdrop-container",cancelButton:"venmo-popup-cancel-button",continueButton:"venmo-popup-continue-button",message:"venmo-message",instructions:"venmo-instructions",venmoLogo:"venmo-full-logo"};o.suppressUnhandledPromiseMessage=!0;function v(x){var
|
|
451
|
-
`)}function L(x){var P=document.getElementById(f.backdrop),U,H,W,S,F,q,ee,M;if(P){P.classList.remove("hidden");return}U=document.createElement("style"),H=document.createElement("div"),W=document.createElement("div"),S=document.createElement("div"),F=document.createElement("div"),q=document.createElement("div"),ee=document.createElement("button"),M=document.createElement("button"),x&&(U.nonce=x),U.id="venmo-desktop-web__injected-styles",U.innerHTML=T(),H.id=f.backdrop,W.id=f.backdropContainer,S.id=f.venmoLogo,S.innerHTML=u,F.id=f.message,F.innerText="What would you like to do?",q.id=f.instructions,q.innerText=h,ee.id=f.continueButton,ee.innerText="Continue payment",M.id=f.cancelButton,M.innerText="Cancel payment",document.head.appendChild(U),W.appendChild(S),W.appendChild(F),W.appendChild(q),W.appendChild(ee),W.appendChild(M),H.appendChild(W),document.body.appendChild(H),H.addEventListener("click",function($){$.stopPropagation()})}function C(x){return L(x.styleCspNonce),v(x)}function I(x){var P=new o,U="venmoDesktopWebLogin",H=x.assetsUrl,W=x.debug||!1,S=b(),F=H+"/web/"+d+"/html";return a.create({name:U,dispatchFrameUrl:F+"/dispatch-frame"+s(W)+".html",openFrameUrl:F+"/venmo-landing-frame"+s(W)+".html",top:S.top,left:S.left,height:m,width:p},function(q){P.resolve(q)}),P}n.exports={runWebLogin:C,openPopup:v,setupDesktopWebLogin:I,POPUP_WIDTH:p,POPUP_HEIGHT:m}},{"../../lib/braintree-error":59,"../../lib/frame-service/external":68,"../../lib/use-min":85,"../shared/errors":93,"@braintree/extended-promise":26}],98:[function(e,n,i){var a=e("../lib/analytics"),s=e("../lib/assign").assign,o=e("./shared/supports-venmo"),l=e("./shared/browser-detection"),c=e("./shared/constants"),d=e("./shared/errors"),u=e("../lib/querystring"),h=e("../lib/is-verified-domain"),p=e("../lib/methods"),m=e("../lib/convert-methods-to-error"),f=e("@braintree/wrap-promise"),v=e("../lib/braintree-error"),b=e("../lib/in-iframe"),A=e("@braintree/extended-promise"),T=e("./shared/get-venmo-url"),L=e("./shared/web-login-backdrop"),C=e("../lib/snake-case-to-camel-case"),I=e("../lib/url-params"),x=e("./external/"),P=e("./external/queries"),U="3.126.0",H=250,W=3e5;A.suppressUnhandledPromiseMessage=!0;function S(g){var _=this;this._allowDesktopWebLogin=g.allowDesktopWebLogin||!1,this._mobileWebFallBack=g.mobileWebFallBack||!1,this._createPromise=g.createPromise,this._allowNewBrowserTab=g.allowNewBrowserTab!==!1,this._allowWebviews=g.allowWebviews!==!1,this._allowDesktop=g.allowDesktop===!0,this._useRedirectForIOS=g.useRedirectForIOS===!0,this._profileId=g.profileId,this._displayName=g.displayName,this._deepLinkReturnUrl=g.deepLinkReturnUrl,this._ignoreHistoryChanges=g.ignoreHistoryChanges,this._paymentMethodUsage=(g.paymentMethodUsage||"").toUpperCase(),this._shouldUseLegacyFlow=!this._paymentMethodUsage,this._requireManualReturn=g.requireManualReturn===!0,this._useDesktopQRFlow=this._allowDesktop&&this._isDesktop()&&!this._allowDesktopWebLogin,this._useAllowDesktopWebLogin=this._allowDesktopWebLogin&&this._isDesktop(),this._cannotHaveReturnUrls=b()||this._requireManualReturn,this._allowAndroidRecreation=g.allowAndroidRecreation!==!1,this._maxRetryCount=3,this._collectCustomerBillingAddress=g.collectCustomerBillingAddress||!1,this._collectCustomerShippingAddress=g.collectCustomerShippingAddress||!1,this._isFinalAmount=g.isFinalAmount||!1,this._lineItems=g.lineItems,this._subTotalAmount=g.subTotalAmount,this._discountAmount=g.discountAmount,this._taxAmount=g.taxAmount,this._shippingAmount=g.shippingAmount,this._totalAmount=g.totalAmount,this._cspNonce=(this._mobileWebFallBack||this._allowDesktopWebLogin)&&(g.styleCspNonce||!1),this._shouldCreateVenmoPaymentContext=this._cannotHaveReturnUrls||!this._shouldUseLegacyFlow,a.sendEvent(this._createPromise,"venmo.desktop-flow.configured."+String(!!this._allowDesktop)),this.hasTokenizationResult()?a.sendEvent(this._createPromise,"venmo.appswitch.return-in-new-tab"):this._useDesktopQRFlow?this._createPromise=this._createPromise.then(function(R){var B=R.getConfiguration().gatewayConfiguration;return x({url:B.assetsUrl+"/web/"+U+"/html/venmo-desktop-frame.html",environment:B.environment==="production"?"PRODUCTION":"SANDBOX",profileId:_._profileId||B.payWithVenmo.merchantId,paymentMethodUsage:_._paymentMethodUsage,displayName:_._displayName,Promise,apiRequest:function(E,O){return R.request({api:"graphQLApi",data:{query:E,variables:O}}).then(function(w){return w.data})},sendEvent:function(E){a.sendEvent(_._createPromise,E)},verifyDomain:h}).then(function(E){return _._venmoDesktopInstance=E,a.sendEvent(_._createPromise,"venmo.desktop-flow.presented"),R}).catch(function(){return a.sendEvent(_._createPromise,"venmo.desktop-flow.setup-failed"),_._useDesktopQRFlow=!1,R})}):this._shouldCreateVenmoPaymentContext&&(this._mobilePollingInterval=H,this._mobilePollingExpiresThreshold=W,this._createPromise=this._createPromise.then(function(R){var B,E,O=_._cannotHaveReturnUrls?"manual-return":"mobile-payment-context",w=R.getConfiguration();return E=L.setupDesktopWebLogin({assetsUrl:w.gatewayConfiguration.assetsUrl,debug:w.isDebug}).then(function(k){_._frameServiceInstance=k}).catch(function(k){return k}),_._mobilePollingContextEnvironment=w.gatewayConfiguration.environment.toUpperCase(),B=_._createVenmoPaymentContext(R).then(function(){return a.sendEvent(_._createPromise,"venmo."+O+".presented"),R}).catch(function(k){return a.sendEvent(_._createPromise,"venmo."+O+".setup-failed"),Promise.reject(new v({type:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.type,code:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.code,message:F(k)?k.details.originalError[0].message:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,details:{originalError:k}}))}),A.all([E,B]).then(function(k){var V=k[1];return Promise.resolve(V)}).catch(function(k){return Promise.reject(k)})}))}function F(g){return g.details&&g.details.originalError&&g.details.originalError[0]&&g.details.originalError[0].extensions&&g.details.originalError[0].extensions.errorClass==="VALIDATION"&&g.details.originalError[0].extensions.errorType==="user_error"}S.prototype._createVenmoPaymentContext=function(g,_){var R=this,B,E,O=g.getConfiguration(),w=O.gatewayConfiguration.payWithVenmo,k=!1,V=R._useAllowDesktopWebLogin?"NATIVE_WEB":"MOBILE_WEB";if(!this._shouldCreateVenmoPaymentContext)return Promise.resolve();if(this._shouldUseLegacyFlow)B=g.request({api:"graphQLApi",data:{query:P.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{environment:this._mobilePollingContextEnvironment,intent:"PAY_FROM_APP"}}}}).then(function(N){return N.data.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext});else{if((this._collectCustomerBillingAddress||this._collectCustomerShippingAddress)&&!w.enrichedCustomerDataEnabled)return Promise.reject(new v(d.VENMO_ECD_DISABLED));this._lineItems&&this._lineItems.forEach(function(N){N.unitTaxAmount=N.unitTaxAmount||"0"}),E={subTotalAmount:this._subTotalAmount,discountAmount:this._discountAmount,taxAmount:this._taxAmount,shippingAmount:this._shippingAmount,totalAmount:this._totalAmount,lineItems:this._lineItems},k=Object.keys(E).some(function(N){return E[N]!==void 0}),B=g.request({api:"graphQLApi",data:{query:P.CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{paymentMethodUsage:this._paymentMethodUsage,intent:"CONTINUE",customerClient:V,isFinalAmount:this._isFinalAmount,displayName:this._displayName,paysheetDetails:{collectCustomerBillingAddress:this._collectCustomerBillingAddress,collectCustomerShippingAddress:this._collectCustomerShippingAddress,transactionDetails:k?E:void 0}}}}}).then(function(N){return N.data.createVenmoPaymentContext.venmoPaymentContext})}return B.then(function(N){var G=new Date(N.expiresAt)-new Date(N.createdAt),J=G*.6666;clearTimeout(R._refreshPaymentContextTimeout),R._refreshPaymentContextTimeout=setTimeout(function(){R._tokenizationInProgress||R._createVenmoPaymentContext(g,!0)},J),!(_&&R._tokenizationInProgress)&&(R._venmoPaymentContextStatus=N.status,R._venmoPaymentContextId=N.id)})},S.prototype._popupBridgeIsInstalled=function(){return window.popupBridge&&typeof window.popupBridge.open=="function"},S.prototype._venmoNativeAppIsInstalled=function(){return!!(window.popupBridge&&(window.parent&&window.parent.popupBridge.isVenmoInstalled||window.popupBridge.isVenmoInstalled))},S.prototype._handleDeepLinkAppSwitch=function(g){K()?this._handleIosWebviewDeepLink(g):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):(a.sendEvent(this._createPromise,"venmo.appswitch.start.webview"),this._venmoWindow=window.open(g))},S.prototype._handleIosWebviewDeepLink=function(g){a.sendEvent(this._createPromise,"venmo.appswitch.start.ios-webview"),b()?this._handleIosWebviewInIframe(g):!this._venmoNativeAppIsInstalled()&&this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):window.location.href=g},S.prototype._handleIosWebviewInIframe=function(g){this._venmoNativeAppIsInstalled()?this._handleIFrameBreakout(g):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):this._handleIFrameBreakout(g)},S.prototype._handlePopupBridgeAppSwitch=function(g){a.sendEvent(this._createPromise,"venmo.appswitch.start.popup-bridge"),window.popupBridge.open(g)},S.prototype._handleBrowserAppSwitch=function(g){a.sendEvent(this._createPromise,"venmo.appswitch.start.browser"),l.doesNotSupportWindowOpenInIos()||this._shouldUseRedirectStrategy()||this._mobileWebFallBack&&l.isAndroid()&&l.isChrome()?window.location.href=g:this._venmoWindow=window.open(g)},S.prototype._handleIFrameBreakout=function(g){window.top.location.href=g},S.prototype.appSwitch=function(g){this._deepLinkReturnUrl?this._handleDeepLinkAppSwitch(g):this._handleBrowserAppSwitch(g)},S.prototype.getUrl=function(){return this._createPromise.then(function(g){var _=g.getConfiguration(),R={},B=this._deepLinkReturnUrl||window.location.href.replace(window.location.hash,""),E=_.gatewayConfiguration.payWithVenmo,O=_.analyticsMetadata,w=E.accessToken,k={_meta:{version:O.sdkVersion,integration:O.integration,platform:O.platform,sessionId:O.sessionId}};return this._isDebug=_.isDebug,this._assetsUrl=_.gatewayConfiguration.assetsUrl,B=B.replace(/#*$/,""),this._venmoPaymentContextId&&(this._shouldUseLegacyFlow?w+="|pcid:"+this._venmoPaymentContextId:R.resource_id=this._venmoPaymentContextId),this._shouldIncludeReturnUrls()||this._useAllowDesktopWebLogin?(this._useAllowDesktopWebLogin&&(B=this._assetsUrl+"/web/"+U+"/html/redirect-frame.html"),R["x-success"]=B+"#venmoSuccess=1",R["x-cancel"]=B+"#venmoCancel=1",R["x-error"]=B+"#venmoError=1"):(R["x-success"]="NOOP",R["x-cancel"]="NOOP",R["x-error"]="NOOP"),this._allowAndroidRecreation?R.allowAndroidRecreation=1:R.allowAndroidRecreation=0,R.ua=window.navigator.userAgent,R.braintree_merchant_id=this._profileId||E.merchantId,R.braintree_access_token=w,R.braintree_environment=E.environment,R.braintree_sdk_data=btoa(JSON.stringify(k)),T({useAllowDesktopWebLogin:this._useAllowDesktopWebLogin,mobileWebFallBack:this._mobileWebFallBack})+"?"+u.stringify(R)}.bind(this))},S.prototype.isBrowserSupported=function(){return o.isBrowserSupported({allowNewBrowserTab:this._allowNewBrowserTab,allowWebviews:this._allowWebviews,allowDesktop:this._allowDesktop,allowDesktopWebLogin:this._allowDesktopWebLogin})},S.prototype.hasTokenizationResult=function(){return this._hasTokenizationResult()},S.prototype._hasTokenizationResult=function(g){var _=q(g),R=I.getUrlParams();return R.resource_id?this._venmoPaymentContextId=R.resource_id:_.id&&(this._venmoPaymentContextId=_.id),typeof(_.venmoSuccess||_.venmoError||_.venmoCancel)!="undefined"},S.prototype._shouldIncludeReturnUrls=function(){return this._deepLinkReturnUrl?!0:!this._cannotHaveReturnUrls},S.prototype._isDesktop=function(){return!(l.isIos()||l.isAndroid())},S.prototype.tokenize=function(g){var _=this,R;return g=g||{},this._tokenizationInProgress===!0?Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_ACTIVE)):(this._tokenizationInProgress=!0,this._useDesktopQRFlow?R=this._tokenizeForDesktopQRFlow(g):this._useAllowDesktopWebLogin?R=this._tokenizeWebLoginWithRedirect(g):this._cannotHaveReturnUrls?R=this._tokenizeForMobileWithManualReturn():R=this._tokenizeForMobileWithHashChangeListeners(g),R.then(function(B){return _._createPromise.then(function(E){return _._createVenmoPaymentContext(E)}).then(function(){return _._tokenizationInProgress=!1,_._venmoWindow=null,M(B)})}).catch(function(B){return _._createPromise.then(function(E){return _._createVenmoPaymentContext(E)}).then(function(){return _._tokenizationInProgress=!1,_._venmoWindow=null,Promise.reject(B)})}))},S.prototype.cancelTokenization=function(){return this._tokenizationInProgress?(this._removeVisibilityEventListener(),this._tokenizePromise&&this._tokenizePromise.reject(new v(d.VENMO_TOKENIZATION_CANCELED_BY_MERCHANT)),Promise.all([this._cancelMobilePaymentContext(),this._cancelVenmoDesktopContext()])):Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE))},S.prototype._tokenizeWebLoginWithRedirect=function(){var g=this,_;return a.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.start",{context_id:g._venmoPaymentContextId}),this._tokenizePromise=new A,this.getUrl().then(function(R){return _={checkForStatusChange:g._checkPaymentContextStatusAndProcessResult.bind(g),cancelTokenization:g.cancelTokenization.bind(g),frameServiceInstance:g._frameServiceInstance,venmoUrl:R,debug:g._isDebug,checkPaymentContextStatus:g._checkPaymentContextStatus.bind(g)},g._cspNonce&&(_=s({},_,{styleCspNonce:g._cspNonce})),L.runWebLogin(_).then(function(B){a.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.success",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.resolve({paymentMethodNonce:B.paymentMethodId,username:B.userName,payerInfo:B.payerInfo,id:g._venmoPaymentContextId})}).catch(function(B){a.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.failure",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.reject(B)}),g._tokenizePromise})},S.prototype._queryPaymentContextStatus=function(g){var _=this;return this._createPromise.then(function(R){var B=_._shouldUseLegacyFlow?P.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:P.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return R.request({api:"graphQLApi",data:{query:B,variables:{id:g}}})}).then(function(R){return R.data.node})},S.prototype._checkPaymentContextStatusAndProcessResult=function(g){var _=this;return _._checkPaymentContextStatus().then(function(R){var B=R.status;if(B!==_._venmoPaymentContextStatus)switch(_._venmoPaymentContextStatus=B,a.sendEventPlus(_._createPromise,"venmo.tokenize.web-login.status-change",{context_id:_._venmoPaymentContextId}),B){case"APPROVED":return Promise.resolve(R);case"CANCELED":return Promise.reject(new v(d.VENMO_CUSTOMER_CANCELED));case"FAILED":return Promise.reject(new v(d.VENMO_TOKENIZATION_FAILED))}return new Promise(function(E,O){g<_._maxRetryCount?(g++,_._checkPaymentContextStatusAndProcessResult(g).then(E).catch(O)):O(new v(d.VENMO_TOKENIZATION_FAILED))})})},S.prototype._checkPaymentContextStatus=function(){var g=this;return g._queryPaymentContextStatus(g._venmoPaymentContextId).catch(function(_){return Promise.reject(new v({type:d.VENMO_NETWORK_ERROR.type,code:d.VENMO_NETWORK_ERROR.code,message:d.VENMO_NETWORK_ERROR.message,details:_}))}).then(function(_){return Promise.resolve(_)})},S.prototype._pollForStatusChange=function(){var g=this;return g._venmoPaymentContextId?Date.now()>g._mobilePollingContextExpiresIn?Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT)):g._venmoWindow&&g._venmoWindow.closed&&g._venmoPaymentContextStatus==="CREATED"?(a.sendEvent(g._createPromise,"venmo.appswitch.browser-window.closed"),g._cancelMobilePaymentContext().then(function(){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.canceled",{context_id:g._venmoPaymentContextId})}).catch(function(_){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.canceled.error",{context_id:g._venmoPaymentContextId})}),Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED))):this._queryPaymentContextStatus(this._venmoPaymentContextId).catch(function(_){return Promise.reject(new v({type:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.type,code:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.code,message:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.message,details:{originalError:_}}))}).then(function(_){var R=_.status;if(R!==g._venmoPaymentContextStatus)switch(g._venmoPaymentContextStatus=R,a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.status-change."+R.toLowerCase(),{context_id:g._venmoPaymentContextId}),R){case"EXPIRED":case"FAILED":case"CANCELED":return Promise.reject(new v(d["VENMO_MOBILE_POLLING_TOKENIZATION_"+R]));case"APPROVED":return Promise.resolve(_)}return new Promise(function(B,E){setTimeout(function(){g._pollForStatusChange().then(B).catch(E)},g._mobilePollingInterval)})}):Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID))},S.prototype._tokenizeForMobileWithManualReturn=function(){var g=this;return a.sendEventPlus(this._createPromise,"venmo.tokenize.manual-return.start",{context_id:g._venmoPaymentContextId}),this._mobilePollingContextExpiresIn=Date.now()+this._mobilePollingExpiresThreshold,this._tokenizePromise=new A,this._pollForStatusChange().then(function(_){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.success",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.resolve({paymentMethodNonce:_.paymentMethodId,username:_.userName,payerInfo:_.payerInfo,id:g._venmoPaymentContextId})}).catch(function(_){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.failure",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.reject(_)}),this.getUrl().then(function(_){return g.appSwitch(_),g._tokenizePromise})},S.prototype._shouldUseRedirectStrategy=function(){return l.isIos()?this._mobileWebFallBack===!0?!0:this._useRedirectForIOS:!1},S.prototype._tokenizeForMobileWithHashChangeListeners=function(g){var _=this,R,B;if(this.hasTokenizationResult())return this.processHashChangeFlowResults();a.sendEvent(this._createPromise,"venmo.tokenize.mobile.start"),this._tokenizePromise=new A,this._previousHash=window.location.hash;function E(O){var w;_.processHashChangeFlowResults(O).catch(function(k){w=k}).then(function(k){!_._ignoreHistoryChanges&&window.location.hash!==_._previousHash&&(window.location.hash=_._previousHash),_._removeVisibilityEventListener(),w?_._tokenizePromise.reject(w):_._tokenizePromise.resolve(k),delete _._tokenizePromise})}return this._onHashChangeListener=function(O){var w=O.newURL.split("#")[1];_._hasTokenizationResult(w)&&(R=!0,clearTimeout(B),E(w))},window.addEventListener("hashchange",this._onHashChangeListener,!1),this._visibilityChangeListener=function(){var O=g.processResultsDelay||c.DEFAULT_PROCESS_RESULTS_DELAY;window.document.hidden||(_._venmoWindow&&!_._venmoWindow.closed&&_._venmoWindow.close(),R||(B=setTimeout(E,O)))},this.getUrl().then(function(O){return _.appSwitch(O),setTimeout(function(){window.document.addEventListener($(),_._visibilityChangeListener)},c.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY),_._tokenizePromise})},S.prototype._tokenizeForDesktopQRFlow=function(){var g=this;return a.sendEvent(this._createPromise,"venmo.tokenize.desktop.start"),this._tokenizePromise=new A,this._createPromise.then(function(){return g._venmoDesktopInstance.launchDesktopFlow()}).then(function(_){g._venmoDesktopInstance.hideDesktopFlow(),a.sendEvent(g._createPromise,"venmo.tokenize.desktop.success"),g._tokenizePromise.resolve(_)}).catch(function(_){if(a.sendEvent(g._createPromise,"venmo.tokenize.desktop.failure"),g._venmoDesktopInstance&&g._venmoDesktopInstance.hideDesktopFlow(),_&&_.reason==="CUSTOMER_CANCELED"){g._tokenizePromise.reject(new v(d.VENMO_DESKTOP_CANCELED));return}g._tokenizePromise.reject(new v({type:d.VENMO_DESKTOP_UNKNOWN_ERROR.type,code:d.VENMO_DESKTOP_UNKNOWN_ERROR.code,message:d.VENMO_DESKTOP_UNKNOWN_ERROR.message,details:{originalError:_}}))}),this._tokenizePromise},S.prototype._cancelMobilePaymentContext=function(){var g=this;return this._createPromise.then(function(_){var R;return g._venmoPaymentContextId?(R=g._shouldUseLegacyFlow?P.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:P.UPDATE_PAYMENT_CONTEXT_QUERY,_.request({api:"graphQLApi",data:{query:R,variables:{input:{id:g._venmoPaymentContextId,status:"CANCELED"}}}})):Promise.resolve()})},S.prototype._cancelVenmoDesktopContext=function(){var g=this;return this._createPromise.then(function(){return g._venmoDesktopInstance&&g._venmoDesktopInstance.updateVenmoDesktopPaymentContext("CANCELED"),Promise.resolve()})},S.prototype.teardown=function(){var g=this;return this._removeVisibilityEventListener(),this._createPromise.then(function(){g._venmoDesktopInstance&&g._venmoDesktopInstance.teardown(),clearTimeout(g._refreshPaymentContextTimeout),g._cancelMobilePaymentContext(),m(this,p(S.prototype))}.bind(this))},S.prototype._removeVisibilityEventListener=function(){window.removeEventListener("hashchange",this._onHashChangeListener),window.document.removeEventListener($(),this._visibilityChangeListener),delete this._visibilityChangeListener,delete this._onHashChangeListener},S.prototype.processHashChangeFlowResults=function(g){var _=this,R=q(g);return new Promise(function(B,E){_._shouldUseLegacyFlow?R.venmoSuccess?(a.sendEvent(_._createPromise,"venmo.appswitch.handle.success"),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:succeeded"),B(R)):R.venmoError?(a.sendEvent(_._createPromise,"venmo.appswitch.handle.error"),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:failed"),E(new v({type:d.VENMO_APP_FAILED.type,code:d.VENMO_APP_FAILED.code,message:d.VENMO_APP_FAILED.message,details:{originalError:{message:decodeURIComponent(R.errorMessage),code:R.errorCode}}}))):R.venmoCancel?(a.sendEvent(_._createPromise,"venmo.appswitch.handle.cancel"),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:canceled"),E(new v(d.VENMO_APP_CANCELED))):(a.sendEvent(_._createPromise,"venmo.appswitch.cancel-or-unavailable"),E(new v(d.VENMO_CANCELED))):_._pollForStatusChange().then(function(O){return a.sendEventPlus(_._createPromise,"venmo.appswitch.handle.payment-context-status-query.success",{context_id:_._venmoPaymentContextId}),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:succeeded"),B({paymentMethodNonce:O.paymentMethodId,username:O.userName,payerInfo:O.payerInfo,id:_._venmoPaymentContextId})}).catch(function(O){O.code===d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED.code?(window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:canceled"),E(O)):window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:failed"),a.sendEventPlus(_._createPromise,"venmo.process-results.payment-context-status-query-failed",{context_id:_._venmoPaymentContextId}),B(R)}),_._clearFragmentParameters()})},S.prototype._clearFragmentParameters=function(){this._ignoreHistoryChanges||typeof window.history.replaceState=="function"&&window.location.hash&&history.pushState({},"",window.location.href.slice(0,window.location.href.indexOf("#")))};function q(g){var _=(g||window.location.hash.substring(1)).split("&"),R=_.reduce(function(B,E){var O=E.split("="),w=decodeURIComponent(O[0]).replace(/\W/g,""),k=C(w),V=decodeURIComponent(O[1]);return B[k]=V,B},{});return R.resourceId&&(R.id=R.resourceId),R}function ee(g){return g=g||"","@"+g.replace("@","")}function M(g){var _={nonce:g.paymentMethodNonce,type:"VenmoAccount",details:{username:ee(g.username),paymentContextId:g.id}};return g.payerInfo&&(_.details.payerInfo=g.payerInfo,_.details.payerInfo.userName=ee(g.payerInfo.userName)),_}function $(){var g;return typeof window.document.hidden!="undefined"?g="visibilitychange":typeof window.document.msHidden!="undefined"?g="msvisibilitychange":typeof window.document.webkitHidden!="undefined"&&(g="webkitvisibilitychange"),g}function K(){return window.navigator.platform&&/iPhone|iPad|iPod/.test(window.navigator.platform)}n.exports=f.wrapPrototype(S)},{"../lib/analytics":55,"../lib/assign":57,"../lib/braintree-error":59,"../lib/convert-methods-to-error":61,"../lib/in-iframe":78,"../lib/is-verified-domain":79,"../lib/methods":81,"../lib/querystring":82,"../lib/snake-case-to-camel-case":83,"../lib/url-params":84,"./external/":87,"./external/queries":88,"./shared/browser-detection":91,"./shared/constants":92,"./shared/errors":93,"./shared/get-venmo-url":95,"./shared/supports-venmo":96,"./shared/web-login-backdrop":97,"@braintree/extended-promise":26,"@braintree/wrap-promise":35}]},{},[90])(90)})}(_r)),_r.exports}var _c=yc();const Ec=ri(_c);class Cc{constructor(){y(this,"client",null);y(this,"venmoInstance",null)}init(t){return z(this,null,function*(){try{this.client=yield bc.create({authorization:t.authorization})}catch(e){throw console.error("Failed to initialize Braintree client:",e),e}})}createVenmo(t){return z(this,null,function*(){if(!this.client)throw new Error("Braintree client must be initialized before creating Venmo instance");try{return this.venmoInstance=yield Ec.create(j({client:this.client,allowDesktop:!0,mobileWebFallBack:!0,allowDesktopWebLogin:!0,paymentMethodUsage:"multi_use"},t)),this.venmoInstance}catch(e){throw console.error("Failed to create Venmo instance:",e),e}})}isBrowserSupported(){var t,e;return(e=(t=this.venmoInstance)==null?void 0:t.isBrowserSupported())!=null?e:!1}hasTokenizationResult(){var t,e;return(e=(t=this.venmoInstance)==null?void 0:t.hasTokenizationResult())!=null?e:!1}tokenize(){return z(this,null,function*(){if(!this.venmoInstance)throw new Error("Venmo instance not initialized");return new Promise((t,e)=>{this.venmoInstance.tokenize(void 0,(n,i)=>{n?e(n):t(i)})})})}}class Ii{constructor(){y(this,"ev",new ji);y(this,"paypal",new fc);y(this,"braintree",new Cc);y(this,"state",{translate:new ic,checkout:new ec,transaction:new nc,styles:new rc});y(this,"checkout",new Xl({state:this.state,service:{ev:this.ev,paypal:this.paypal,braintree:this.braintree}}))}clearState(){Object.values(this.state).forEach(t=>t.clearState())}}class wc{constructor(t){y(this,"parent");y(this,"core",new Ii);this.parent=t}mount(t){return z(this,null,function*(){const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return z(this,null,function*(){this.parent.innerHTML="",this.core.clearState()})}}re.Core=Ii,re.PayNextCheckout=wc,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
450
|
+
</svg>`,h="Tap cancel payment to cancel and return to the business. Continue payment will relaunch the payment window.",p=400,m=570,f={backdrop:"venmo-desktop-web-backdrop",backdropHidden:"venmo-desktop-web-backdrop.hidden",backdropContainer:"venmo-backdrop-container",cancelButton:"venmo-popup-cancel-button",continueButton:"venmo-popup-continue-button",message:"venmo-message",instructions:"venmo-instructions",venmoLogo:"venmo-full-logo"};o.suppressUnhandledPromiseMessage=!0;function v(x){var k=x.frameServiceInstance,U=x.venmoUrl,H=x.checkForStatusChange,W=x.cancelTokenization,S=x.checkPaymentContextStatus,F=new o;return document.getElementById(f.continueButton).addEventListener("click",function(){k.focus()}),document.getElementById(f.cancelButton).addEventListener("click",function(){k.close(),W(),A()}),k.open({},function(q){var te=1;q?F.reject(q):H(te).then(function(M){F.resolve(M)}).catch(function(M){S().then(function($){$.status==="CREATED"?F.reject(new l(c.VENMO_CUSTOMER_CANCELED)):F.reject(M)})}),k.close(),A()}),k.redirect(U),F}function y(){var x=Math.round((window.outerHeight-m)/2)+window.screenTop,k=Math.round((window.outerWidth-p)/2)+window.screenLeft;return{top:x,left:k}}function A(){document.getElementById("venmo-desktop-web-backdrop").classList.add("hidden")}function I(){var x=["#"+f.backdropHidden+" {","display: none;","}","#"+f.backdrop+" {","z-index: 3141592632;","cursor: pointer;","position: fixed;","top: 0;","left: 0;","bottom: 0;","width: 100%;","background: rgba(0, 0, 0, 0.8);","}"],k=["#"+f.backdropContainer+" {","display: flex;","align-content: center;","justify-content: center;","align-items: center;","width: 100%;","height: 100%;","flex-direction: column;","}"],U=["#"+f.cancelButton+" {","height: 24px;","width: 380px;","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 700;","font-size: 18px;","line-height: 24px;","text-align: center;","background-color: transparent;","border: none;","color: #FFFFFF;","margin-top: 28px;","}"],H=["#"+f.continueButton+" {","width: 400px;","height: 50px;","background: #0074DE;","border-radius: 24px;","border: none;","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 700;","font-size: 18px;","color: #FFFFFF;","margin-top: 44px;","}"],W=["#"+f.message+" {","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 500;","font-size: 24px;","line-height: 32px;","text-align: center;","color: #FFFFFF;","margin-top: 32px;","}"],S=["#"+f.instructions+" {","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 400;","font-size: 16px;","line-height: 20px;","text-align: center;","color: #FFFFFF;","margin-top: 16px;","width: 400px;","}"],F=x.concat(k,U,H,W,S);return F.join(`
|
|
451
|
+
`)}function L(x){var k=document.getElementById(f.backdrop),U,H,W,S,F,q,te,M;if(k){k.classList.remove("hidden");return}U=document.createElement("style"),H=document.createElement("div"),W=document.createElement("div"),S=document.createElement("div"),F=document.createElement("div"),q=document.createElement("div"),te=document.createElement("button"),M=document.createElement("button"),x&&(U.nonce=x),U.id="venmo-desktop-web__injected-styles",U.innerHTML=I(),H.id=f.backdrop,W.id=f.backdropContainer,S.id=f.venmoLogo,S.innerHTML=u,F.id=f.message,F.innerText="What would you like to do?",q.id=f.instructions,q.innerText=h,te.id=f.continueButton,te.innerText="Continue payment",M.id=f.cancelButton,M.innerText="Cancel payment",document.head.appendChild(U),W.appendChild(S),W.appendChild(F),W.appendChild(q),W.appendChild(te),W.appendChild(M),H.appendChild(W),document.body.appendChild(H),H.addEventListener("click",function($){$.stopPropagation()})}function C(x){return L(x.styleCspNonce),v(x)}function T(x){var k=new o,U="venmoDesktopWebLogin",H=x.assetsUrl,W=x.debug||!1,S=y(),F=H+"/web/"+d+"/html";return i.create({name:U,dispatchFrameUrl:F+"/dispatch-frame"+s(W)+".html",openFrameUrl:F+"/venmo-landing-frame"+s(W)+".html",top:S.top,left:S.left,height:m,width:p},function(q){k.resolve(q)}),k}n.exports={runWebLogin:C,openPopup:v,setupDesktopWebLogin:T,POPUP_WIDTH:p,POPUP_HEIGHT:m}},{"../../lib/braintree-error":59,"../../lib/frame-service/external":68,"../../lib/use-min":85,"../shared/errors":93,"@braintree/extended-promise":26}],98:[function(e,n,a){var i=e("../lib/analytics"),s=e("../lib/assign").assign,o=e("./shared/supports-venmo"),c=e("./shared/browser-detection"),l=e("./shared/constants"),d=e("./shared/errors"),u=e("../lib/querystring"),h=e("../lib/is-verified-domain"),p=e("../lib/methods"),m=e("../lib/convert-methods-to-error"),f=e("@braintree/wrap-promise"),v=e("../lib/braintree-error"),y=e("../lib/in-iframe"),A=e("@braintree/extended-promise"),I=e("./shared/get-venmo-url"),L=e("./shared/web-login-backdrop"),C=e("../lib/snake-case-to-camel-case"),T=e("../lib/url-params"),x=e("./external/"),k=e("./external/queries"),U="3.126.0",H=250,W=3e5;A.suppressUnhandledPromiseMessage=!0;function S(g){var _=this;this._allowDesktopWebLogin=g.allowDesktopWebLogin||!1,this._mobileWebFallBack=g.mobileWebFallBack||!1,this._createPromise=g.createPromise,this._allowNewBrowserTab=g.allowNewBrowserTab!==!1,this._allowWebviews=g.allowWebviews!==!1,this._allowDesktop=g.allowDesktop===!0,this._useRedirectForIOS=g.useRedirectForIOS===!0,this._profileId=g.profileId,this._displayName=g.displayName,this._deepLinkReturnUrl=g.deepLinkReturnUrl,this._ignoreHistoryChanges=g.ignoreHistoryChanges,this._paymentMethodUsage=(g.paymentMethodUsage||"").toUpperCase(),this._shouldUseLegacyFlow=!this._paymentMethodUsage,this._requireManualReturn=g.requireManualReturn===!0,this._useDesktopQRFlow=this._allowDesktop&&this._isDesktop()&&!this._allowDesktopWebLogin,this._useAllowDesktopWebLogin=this._allowDesktopWebLogin&&this._isDesktop(),this._cannotHaveReturnUrls=y()||this._requireManualReturn,this._allowAndroidRecreation=g.allowAndroidRecreation!==!1,this._maxRetryCount=3,this._collectCustomerBillingAddress=g.collectCustomerBillingAddress||!1,this._collectCustomerShippingAddress=g.collectCustomerShippingAddress||!1,this._isFinalAmount=g.isFinalAmount||!1,this._lineItems=g.lineItems,this._subTotalAmount=g.subTotalAmount,this._discountAmount=g.discountAmount,this._taxAmount=g.taxAmount,this._shippingAmount=g.shippingAmount,this._totalAmount=g.totalAmount,this._cspNonce=(this._mobileWebFallBack||this._allowDesktopWebLogin)&&(g.styleCspNonce||!1),this._shouldCreateVenmoPaymentContext=this._cannotHaveReturnUrls||!this._shouldUseLegacyFlow,i.sendEvent(this._createPromise,"venmo.desktop-flow.configured."+String(!!this._allowDesktop)),this.hasTokenizationResult()?i.sendEvent(this._createPromise,"venmo.appswitch.return-in-new-tab"):this._useDesktopQRFlow?this._createPromise=this._createPromise.then(function(R){var j=R.getConfiguration().gatewayConfiguration;return x({url:j.assetsUrl+"/web/"+U+"/html/venmo-desktop-frame.html",environment:j.environment==="production"?"PRODUCTION":"SANDBOX",profileId:_._profileId||j.payWithVenmo.merchantId,paymentMethodUsage:_._paymentMethodUsage,displayName:_._displayName,Promise,apiRequest:function(E,O){return R.request({api:"graphQLApi",data:{query:E,variables:O}}).then(function(w){return w.data})},sendEvent:function(E){i.sendEvent(_._createPromise,E)},verifyDomain:h}).then(function(E){return _._venmoDesktopInstance=E,i.sendEvent(_._createPromise,"venmo.desktop-flow.presented"),R}).catch(function(){return i.sendEvent(_._createPromise,"venmo.desktop-flow.setup-failed"),_._useDesktopQRFlow=!1,R})}):this._shouldCreateVenmoPaymentContext&&(this._mobilePollingInterval=H,this._mobilePollingExpiresThreshold=W,this._createPromise=this._createPromise.then(function(R){var j,E,O=_._cannotHaveReturnUrls?"manual-return":"mobile-payment-context",w=R.getConfiguration();return E=L.setupDesktopWebLogin({assetsUrl:w.gatewayConfiguration.assetsUrl,debug:w.isDebug}).then(function(P){_._frameServiceInstance=P}).catch(function(P){return P}),_._mobilePollingContextEnvironment=w.gatewayConfiguration.environment.toUpperCase(),j=_._createVenmoPaymentContext(R).then(function(){return i.sendEvent(_._createPromise,"venmo."+O+".presented"),R}).catch(function(P){return i.sendEvent(_._createPromise,"venmo."+O+".setup-failed"),Promise.reject(new v({type:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.type,code:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.code,message:F(P)?P.details.originalError[0].message:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,details:{originalError:P}}))}),A.all([E,j]).then(function(P){var V=P[1];return Promise.resolve(V)}).catch(function(P){return Promise.reject(P)})}))}function F(g){return g.details&&g.details.originalError&&g.details.originalError[0]&&g.details.originalError[0].extensions&&g.details.originalError[0].extensions.errorClass==="VALIDATION"&&g.details.originalError[0].extensions.errorType==="user_error"}S.prototype._createVenmoPaymentContext=function(g,_){var R=this,j,E,O=g.getConfiguration(),w=O.gatewayConfiguration.payWithVenmo,P=!1,V=R._useAllowDesktopWebLogin?"NATIVE_WEB":"MOBILE_WEB";if(!this._shouldCreateVenmoPaymentContext)return Promise.resolve();if(this._shouldUseLegacyFlow)j=g.request({api:"graphQLApi",data:{query:k.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{environment:this._mobilePollingContextEnvironment,intent:"PAY_FROM_APP"}}}}).then(function(N){return N.data.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext});else{if((this._collectCustomerBillingAddress||this._collectCustomerShippingAddress)&&!w.enrichedCustomerDataEnabled)return Promise.reject(new v(d.VENMO_ECD_DISABLED));this._lineItems&&this._lineItems.forEach(function(N){N.unitTaxAmount=N.unitTaxAmount||"0"}),E={subTotalAmount:this._subTotalAmount,discountAmount:this._discountAmount,taxAmount:this._taxAmount,shippingAmount:this._shippingAmount,totalAmount:this._totalAmount,lineItems:this._lineItems},P=Object.keys(E).some(function(N){return E[N]!==void 0}),j=g.request({api:"graphQLApi",data:{query:k.CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{paymentMethodUsage:this._paymentMethodUsage,intent:"CONTINUE",customerClient:V,isFinalAmount:this._isFinalAmount,displayName:this._displayName,paysheetDetails:{collectCustomerBillingAddress:this._collectCustomerBillingAddress,collectCustomerShippingAddress:this._collectCustomerShippingAddress,transactionDetails:P?E:void 0}}}}}).then(function(N){return N.data.createVenmoPaymentContext.venmoPaymentContext})}return j.then(function(N){var G=new Date(N.expiresAt)-new Date(N.createdAt),ee=G*.6666;clearTimeout(R._refreshPaymentContextTimeout),R._refreshPaymentContextTimeout=setTimeout(function(){R._tokenizationInProgress||R._createVenmoPaymentContext(g,!0)},ee),!(_&&R._tokenizationInProgress)&&(R._venmoPaymentContextStatus=N.status,R._venmoPaymentContextId=N.id)})},S.prototype._popupBridgeIsInstalled=function(){return window.popupBridge&&typeof window.popupBridge.open=="function"},S.prototype._venmoNativeAppIsInstalled=function(){return!!(window.popupBridge&&(window.parent&&window.parent.popupBridge.isVenmoInstalled||window.popupBridge.isVenmoInstalled))},S.prototype._handleDeepLinkAppSwitch=function(g){K()?this._handleIosWebviewDeepLink(g):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):(i.sendEvent(this._createPromise,"venmo.appswitch.start.webview"),this._venmoWindow=window.open(g))},S.prototype._handleIosWebviewDeepLink=function(g){i.sendEvent(this._createPromise,"venmo.appswitch.start.ios-webview"),y()?this._handleIosWebviewInIframe(g):!this._venmoNativeAppIsInstalled()&&this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):window.location.href=g},S.prototype._handleIosWebviewInIframe=function(g){this._venmoNativeAppIsInstalled()?this._handleIFrameBreakout(g):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):this._handleIFrameBreakout(g)},S.prototype._handlePopupBridgeAppSwitch=function(g){i.sendEvent(this._createPromise,"venmo.appswitch.start.popup-bridge"),window.popupBridge.open(g)},S.prototype._handleBrowserAppSwitch=function(g){i.sendEvent(this._createPromise,"venmo.appswitch.start.browser"),c.doesNotSupportWindowOpenInIos()||this._shouldUseRedirectStrategy()||this._mobileWebFallBack&&c.isAndroid()&&c.isChrome()?window.location.href=g:this._venmoWindow=window.open(g)},S.prototype._handleIFrameBreakout=function(g){window.top.location.href=g},S.prototype.appSwitch=function(g){this._deepLinkReturnUrl?this._handleDeepLinkAppSwitch(g):this._handleBrowserAppSwitch(g)},S.prototype.getUrl=function(){return this._createPromise.then(function(g){var _=g.getConfiguration(),R={},j=this._deepLinkReturnUrl||window.location.href.replace(window.location.hash,""),E=_.gatewayConfiguration.payWithVenmo,O=_.analyticsMetadata,w=E.accessToken,P={_meta:{version:O.sdkVersion,integration:O.integration,platform:O.platform,sessionId:O.sessionId}};return this._isDebug=_.isDebug,this._assetsUrl=_.gatewayConfiguration.assetsUrl,j=j.replace(/#*$/,""),this._venmoPaymentContextId&&(this._shouldUseLegacyFlow?w+="|pcid:"+this._venmoPaymentContextId:R.resource_id=this._venmoPaymentContextId),this._shouldIncludeReturnUrls()||this._useAllowDesktopWebLogin?(this._useAllowDesktopWebLogin&&(j=this._assetsUrl+"/web/"+U+"/html/redirect-frame.html"),R["x-success"]=j+"#venmoSuccess=1",R["x-cancel"]=j+"#venmoCancel=1",R["x-error"]=j+"#venmoError=1"):(R["x-success"]="NOOP",R["x-cancel"]="NOOP",R["x-error"]="NOOP"),this._allowAndroidRecreation?R.allowAndroidRecreation=1:R.allowAndroidRecreation=0,R.ua=window.navigator.userAgent,R.braintree_merchant_id=this._profileId||E.merchantId,R.braintree_access_token=w,R.braintree_environment=E.environment,R.braintree_sdk_data=btoa(JSON.stringify(P)),I({useAllowDesktopWebLogin:this._useAllowDesktopWebLogin,mobileWebFallBack:this._mobileWebFallBack})+"?"+u.stringify(R)}.bind(this))},S.prototype.isBrowserSupported=function(){return o.isBrowserSupported({allowNewBrowserTab:this._allowNewBrowserTab,allowWebviews:this._allowWebviews,allowDesktop:this._allowDesktop,allowDesktopWebLogin:this._allowDesktopWebLogin})},S.prototype.hasTokenizationResult=function(){return this._hasTokenizationResult()},S.prototype._hasTokenizationResult=function(g){var _=q(g),R=T.getUrlParams();return R.resource_id?this._venmoPaymentContextId=R.resource_id:_.id&&(this._venmoPaymentContextId=_.id),typeof(_.venmoSuccess||_.venmoError||_.venmoCancel)!="undefined"},S.prototype._shouldIncludeReturnUrls=function(){return this._deepLinkReturnUrl?!0:!this._cannotHaveReturnUrls},S.prototype._isDesktop=function(){return!(c.isIos()||c.isAndroid())},S.prototype.tokenize=function(g){var _=this,R;return g=g||{},this._tokenizationInProgress===!0?Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_ACTIVE)):(this._tokenizationInProgress=!0,this._useDesktopQRFlow?R=this._tokenizeForDesktopQRFlow(g):this._useAllowDesktopWebLogin?R=this._tokenizeWebLoginWithRedirect(g):this._cannotHaveReturnUrls?R=this._tokenizeForMobileWithManualReturn():R=this._tokenizeForMobileWithHashChangeListeners(g),R.then(function(j){return _._createPromise.then(function(E){return _._createVenmoPaymentContext(E)}).then(function(){return _._tokenizationInProgress=!1,_._venmoWindow=null,M(j)})}).catch(function(j){return _._createPromise.then(function(E){return _._createVenmoPaymentContext(E)}).then(function(){return _._tokenizationInProgress=!1,_._venmoWindow=null,Promise.reject(j)})}))},S.prototype.cancelTokenization=function(){return this._tokenizationInProgress?(this._removeVisibilityEventListener(),this._tokenizePromise&&this._tokenizePromise.reject(new v(d.VENMO_TOKENIZATION_CANCELED_BY_MERCHANT)),Promise.all([this._cancelMobilePaymentContext(),this._cancelVenmoDesktopContext()])):Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE))},S.prototype._tokenizeWebLoginWithRedirect=function(){var g=this,_;return i.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.start",{context_id:g._venmoPaymentContextId}),this._tokenizePromise=new A,this.getUrl().then(function(R){return _={checkForStatusChange:g._checkPaymentContextStatusAndProcessResult.bind(g),cancelTokenization:g.cancelTokenization.bind(g),frameServiceInstance:g._frameServiceInstance,venmoUrl:R,debug:g._isDebug,checkPaymentContextStatus:g._checkPaymentContextStatus.bind(g)},g._cspNonce&&(_=s({},_,{styleCspNonce:g._cspNonce})),L.runWebLogin(_).then(function(j){i.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.success",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.resolve({paymentMethodNonce:j.paymentMethodId,username:j.userName,payerInfo:j.payerInfo,id:g._venmoPaymentContextId})}).catch(function(j){i.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.failure",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.reject(j)}),g._tokenizePromise})},S.prototype._queryPaymentContextStatus=function(g){var _=this;return this._createPromise.then(function(R){var j=_._shouldUseLegacyFlow?k.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:k.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return R.request({api:"graphQLApi",data:{query:j,variables:{id:g}}})}).then(function(R){return R.data.node})},S.prototype._checkPaymentContextStatusAndProcessResult=function(g){var _=this;return _._checkPaymentContextStatus().then(function(R){var j=R.status;if(j!==_._venmoPaymentContextStatus)switch(_._venmoPaymentContextStatus=j,i.sendEventPlus(_._createPromise,"venmo.tokenize.web-login.status-change",{context_id:_._venmoPaymentContextId}),j){case"APPROVED":return Promise.resolve(R);case"CANCELED":return Promise.reject(new v(d.VENMO_CUSTOMER_CANCELED));case"FAILED":return Promise.reject(new v(d.VENMO_TOKENIZATION_FAILED))}return new Promise(function(E,O){g<_._maxRetryCount?(g++,_._checkPaymentContextStatusAndProcessResult(g).then(E).catch(O)):O(new v(d.VENMO_TOKENIZATION_FAILED))})})},S.prototype._checkPaymentContextStatus=function(){var g=this;return g._queryPaymentContextStatus(g._venmoPaymentContextId).catch(function(_){return Promise.reject(new v({type:d.VENMO_NETWORK_ERROR.type,code:d.VENMO_NETWORK_ERROR.code,message:d.VENMO_NETWORK_ERROR.message,details:_}))}).then(function(_){return Promise.resolve(_)})},S.prototype._pollForStatusChange=function(){var g=this;return g._venmoPaymentContextId?Date.now()>g._mobilePollingContextExpiresIn?Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT)):g._venmoWindow&&g._venmoWindow.closed&&g._venmoPaymentContextStatus==="CREATED"?(i.sendEvent(g._createPromise,"venmo.appswitch.browser-window.closed"),g._cancelMobilePaymentContext().then(function(){i.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.canceled",{context_id:g._venmoPaymentContextId})}).catch(function(_){i.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.canceled.error",{context_id:g._venmoPaymentContextId})}),Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED))):this._queryPaymentContextStatus(this._venmoPaymentContextId).catch(function(_){return Promise.reject(new v({type:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.type,code:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.code,message:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.message,details:{originalError:_}}))}).then(function(_){var R=_.status;if(R!==g._venmoPaymentContextStatus)switch(g._venmoPaymentContextStatus=R,i.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.status-change."+R.toLowerCase(),{context_id:g._venmoPaymentContextId}),R){case"EXPIRED":case"FAILED":case"CANCELED":return Promise.reject(new v(d["VENMO_MOBILE_POLLING_TOKENIZATION_"+R]));case"APPROVED":return Promise.resolve(_)}return new Promise(function(j,E){setTimeout(function(){g._pollForStatusChange().then(j).catch(E)},g._mobilePollingInterval)})}):Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID))},S.prototype._tokenizeForMobileWithManualReturn=function(){var g=this;return i.sendEventPlus(this._createPromise,"venmo.tokenize.manual-return.start",{context_id:g._venmoPaymentContextId}),this._mobilePollingContextExpiresIn=Date.now()+this._mobilePollingExpiresThreshold,this._tokenizePromise=new A,this._pollForStatusChange().then(function(_){i.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.success",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.resolve({paymentMethodNonce:_.paymentMethodId,username:_.userName,payerInfo:_.payerInfo,id:g._venmoPaymentContextId})}).catch(function(_){i.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.failure",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.reject(_)}),this.getUrl().then(function(_){return g.appSwitch(_),g._tokenizePromise})},S.prototype._shouldUseRedirectStrategy=function(){return c.isIos()?this._mobileWebFallBack===!0?!0:this._useRedirectForIOS:!1},S.prototype._tokenizeForMobileWithHashChangeListeners=function(g){var _=this,R,j;if(this.hasTokenizationResult())return this.processHashChangeFlowResults();i.sendEvent(this._createPromise,"venmo.tokenize.mobile.start"),this._tokenizePromise=new A,this._previousHash=window.location.hash;function E(O){var w;_.processHashChangeFlowResults(O).catch(function(P){w=P}).then(function(P){!_._ignoreHistoryChanges&&window.location.hash!==_._previousHash&&(window.location.hash=_._previousHash),_._removeVisibilityEventListener(),w?_._tokenizePromise.reject(w):_._tokenizePromise.resolve(P),delete _._tokenizePromise})}return this._onHashChangeListener=function(O){var w=O.newURL.split("#")[1];_._hasTokenizationResult(w)&&(R=!0,clearTimeout(j),E(w))},window.addEventListener("hashchange",this._onHashChangeListener,!1),this._visibilityChangeListener=function(){var O=g.processResultsDelay||l.DEFAULT_PROCESS_RESULTS_DELAY;window.document.hidden||(_._venmoWindow&&!_._venmoWindow.closed&&_._venmoWindow.close(),R||(j=setTimeout(E,O)))},this.getUrl().then(function(O){return _.appSwitch(O),setTimeout(function(){window.document.addEventListener($(),_._visibilityChangeListener)},l.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY),_._tokenizePromise})},S.prototype._tokenizeForDesktopQRFlow=function(){var g=this;return i.sendEvent(this._createPromise,"venmo.tokenize.desktop.start"),this._tokenizePromise=new A,this._createPromise.then(function(){return g._venmoDesktopInstance.launchDesktopFlow()}).then(function(_){g._venmoDesktopInstance.hideDesktopFlow(),i.sendEvent(g._createPromise,"venmo.tokenize.desktop.success"),g._tokenizePromise.resolve(_)}).catch(function(_){if(i.sendEvent(g._createPromise,"venmo.tokenize.desktop.failure"),g._venmoDesktopInstance&&g._venmoDesktopInstance.hideDesktopFlow(),_&&_.reason==="CUSTOMER_CANCELED"){g._tokenizePromise.reject(new v(d.VENMO_DESKTOP_CANCELED));return}g._tokenizePromise.reject(new v({type:d.VENMO_DESKTOP_UNKNOWN_ERROR.type,code:d.VENMO_DESKTOP_UNKNOWN_ERROR.code,message:d.VENMO_DESKTOP_UNKNOWN_ERROR.message,details:{originalError:_}}))}),this._tokenizePromise},S.prototype._cancelMobilePaymentContext=function(){var g=this;return this._createPromise.then(function(_){var R;return g._venmoPaymentContextId?(R=g._shouldUseLegacyFlow?k.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:k.UPDATE_PAYMENT_CONTEXT_QUERY,_.request({api:"graphQLApi",data:{query:R,variables:{input:{id:g._venmoPaymentContextId,status:"CANCELED"}}}})):Promise.resolve()})},S.prototype._cancelVenmoDesktopContext=function(){var g=this;return this._createPromise.then(function(){return g._venmoDesktopInstance&&g._venmoDesktopInstance.updateVenmoDesktopPaymentContext("CANCELED"),Promise.resolve()})},S.prototype.teardown=function(){var g=this;return this._removeVisibilityEventListener(),this._createPromise.then(function(){g._venmoDesktopInstance&&g._venmoDesktopInstance.teardown(),clearTimeout(g._refreshPaymentContextTimeout),g._cancelMobilePaymentContext(),m(this,p(S.prototype))}.bind(this))},S.prototype._removeVisibilityEventListener=function(){window.removeEventListener("hashchange",this._onHashChangeListener),window.document.removeEventListener($(),this._visibilityChangeListener),delete this._visibilityChangeListener,delete this._onHashChangeListener},S.prototype.processHashChangeFlowResults=function(g){var _=this,R=q(g);return new Promise(function(j,E){_._shouldUseLegacyFlow?R.venmoSuccess?(i.sendEvent(_._createPromise,"venmo.appswitch.handle.success"),window.popupBridge&&i.sendEvent(_._createPromise,"popup-bridge:venmo:succeeded"),j(R)):R.venmoError?(i.sendEvent(_._createPromise,"venmo.appswitch.handle.error"),window.popupBridge&&i.sendEvent(_._createPromise,"popup-bridge:venmo:failed"),E(new v({type:d.VENMO_APP_FAILED.type,code:d.VENMO_APP_FAILED.code,message:d.VENMO_APP_FAILED.message,details:{originalError:{message:decodeURIComponent(R.errorMessage),code:R.errorCode}}}))):R.venmoCancel?(i.sendEvent(_._createPromise,"venmo.appswitch.handle.cancel"),window.popupBridge&&i.sendEvent(_._createPromise,"popup-bridge:venmo:canceled"),E(new v(d.VENMO_APP_CANCELED))):(i.sendEvent(_._createPromise,"venmo.appswitch.cancel-or-unavailable"),E(new v(d.VENMO_CANCELED))):_._pollForStatusChange().then(function(O){return i.sendEventPlus(_._createPromise,"venmo.appswitch.handle.payment-context-status-query.success",{context_id:_._venmoPaymentContextId}),window.popupBridge&&i.sendEvent(_._createPromise,"popup-bridge:venmo:succeeded"),j({paymentMethodNonce:O.paymentMethodId,username:O.userName,payerInfo:O.payerInfo,id:_._venmoPaymentContextId})}).catch(function(O){O.code===d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED.code?(window.popupBridge&&i.sendEvent(_._createPromise,"popup-bridge:venmo:canceled"),E(O)):window.popupBridge&&i.sendEvent(_._createPromise,"popup-bridge:venmo:failed"),i.sendEventPlus(_._createPromise,"venmo.process-results.payment-context-status-query-failed",{context_id:_._venmoPaymentContextId}),j(R)}),_._clearFragmentParameters()})},S.prototype._clearFragmentParameters=function(){this._ignoreHistoryChanges||typeof window.history.replaceState=="function"&&window.location.hash&&history.pushState({},"",window.location.href.slice(0,window.location.href.indexOf("#")))};function q(g){var _=(g||window.location.hash.substring(1)).split("&"),R=_.reduce(function(j,E){var O=E.split("="),w=decodeURIComponent(O[0]).replace(/\W/g,""),P=C(w),V=decodeURIComponent(O[1]);return j[P]=V,j},{});return R.resourceId&&(R.id=R.resourceId),R}function te(g){return g=g||"","@"+g.replace("@","")}function M(g){var _={nonce:g.paymentMethodNonce,type:"VenmoAccount",details:{username:te(g.username),paymentContextId:g.id}};return g.payerInfo&&(_.details.payerInfo=g.payerInfo,_.details.payerInfo.userName=te(g.payerInfo.userName)),_}function $(){var g;return typeof window.document.hidden!="undefined"?g="visibilitychange":typeof window.document.msHidden!="undefined"?g="msvisibilitychange":typeof window.document.webkitHidden!="undefined"&&(g="webkitvisibilitychange"),g}function K(){return window.navigator.platform&&/iPhone|iPad|iPod/.test(window.navigator.platform)}n.exports=f.wrapPrototype(S)},{"../lib/analytics":55,"../lib/assign":57,"../lib/braintree-error":59,"../lib/convert-methods-to-error":61,"../lib/in-iframe":78,"../lib/is-verified-domain":79,"../lib/methods":81,"../lib/querystring":82,"../lib/snake-case-to-camel-case":83,"../lib/url-params":84,"./external/":87,"./external/queries":88,"./shared/browser-detection":91,"./shared/constants":92,"./shared/errors":93,"./shared/get-venmo-url":95,"./shared/supports-venmo":96,"./shared/web-login-backdrop":97,"@braintree/extended-promise":26,"@braintree/wrap-promise":35}]},{},[90])(90)})}(_r)),_r.exports}var _c=bc();const Ec=ri(_c);class Cc{constructor(){b(this,"client",null);b(this,"venmoInstance",null)}init(t){return z(this,null,function*(){try{this.client=yield yc.create({authorization:t.authorization})}catch(e){throw console.error("Failed to initialize Braintree client:",e),e}})}createVenmo(t){return z(this,null,function*(){if(!this.client)throw new Error("Braintree client must be initialized before creating Venmo instance");try{return this.venmoInstance=yield Ec.create(B({client:this.client,allowDesktop:!0,mobileWebFallBack:!0,allowDesktopWebLogin:!0,paymentMethodUsage:"multi_use"},t)),this.venmoInstance}catch(e){throw console.error("Failed to create Venmo instance:",e),e}})}isBrowserSupported(){var t,e;return(e=(t=this.venmoInstance)==null?void 0:t.isBrowserSupported())!=null?e:!1}hasTokenizationResult(){var t,e;return(e=(t=this.venmoInstance)==null?void 0:t.hasTokenizationResult())!=null?e:!1}tokenize(){return z(this,null,function*(){if(!this.venmoInstance)throw new Error("Venmo instance not initialized");return new Promise((t,e)=>{this.venmoInstance.tokenize(void 0,(n,a)=>{n?e(n):t(a)})})})}}class Ti{constructor(){b(this,"ev",new ji);b(this,"paypal",new fc);b(this,"braintree",new Cc);b(this,"state",{translate:new ic,checkout:new ec,transaction:new nc,styles:new rc});b(this,"checkout",new Xl({state:this.state,service:{ev:this.ev,paypal:this.paypal,braintree:this.braintree}}))}clearState(){Object.values(this.state).forEach(t=>t.clearState())}}class wc{constructor(t){b(this,"parent");b(this,"core",new Ti);this.parent=t}mount(t){return z(this,null,function*(){const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return z(this,null,function*(){this.parent.innerHTML="",this.core.clearState()})}}re.Core=Ti,re.PayNextCheckout=wc,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
452
452
|
//# sourceMappingURL=index.umd.js.map
|