@paynext/sdk 0.0.53 → 0.0.55
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/dist/assets/index.css +1 -1
- package/dist/index.d.ts +25 -15
- package/dist/index.es.js +2240 -2047
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +25 -22
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(ee,re){typeof exports=="object"&&typeof module!="undefined"?re(exports):typeof define=="function"&&define.amd?define(["exports"],re):(ee=typeof globalThis!="undefined"?globalThis:ee||self,re(ee["PayNext TS SDK"]={}))})(this,function(ee){"use strict";var hd=Object.defineProperty,md=Object.defineProperties;var fd=Object.getOwnPropertyDescriptors;var Pt=Object.getOwnPropertySymbols;var Fa=Object.prototype.hasOwnProperty,Ua=Object.prototype.propertyIsEnumerable;var Or=(ee,re,ie)=>re in ee?hd(ee,re,{enumerable:!0,configurable:!0,writable:!0,value:ie}):ee[re]=ie,G=(ee,re)=>{for(var ie in re||(re={}))Fa.call(re,ie)&&Or(ee,ie,re[ie]);if(Pt)for(var ie of Pt(re))Ua.call(re,ie)&&Or(ee,ie,re[ie]);return ee},ne=(ee,re)=>md(ee,fd(re));var Ce=(ee,re)=>{var ie={};for(var ge in ee)Fa.call(ee,ge)&&re.indexOf(ge)<0&&(ie[ge]=ee[ge]);if(ee!=null&&Pt)for(var ge of Pt(ee))re.indexOf(ge)<0&&Ua.call(ee,ge)&&(ie[ge]=ee[ge]);return ie};var b=(ee,re,ie)=>Or(ee,typeof re!="symbol"?re+"":re,ie);var z=(ee,re,ie)=>new Promise((ge,He)=>{var kt=ae=>{try{We(ie.next(ae))}catch(Ge){He(Ge)}},Rt=ae=>{try{We(ie.throw(ae))}catch(Ge){He(Ge)}},We=ae=>ae.done?ge(ae.value):Promise.resolve(ae.value).then(kt,Rt);We((ie=ie.apply(ee,re)).next())});var re=document.createElement("style");re.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_1m9xd_1{border-radius:12px;height:40px;overflow:hidden;position:relative;background-color:#000}._applePay_1m9xd_1:hover{filter:contrast(.575) brightness(1.2)}._applePay_1m9xd_1 iframe{width:calc(100% + 12px)!important;height:44px!important;border:none;display:block;transform:translateY(-2px);margin:0 -6px}._hidden_1m9xd_22,._hidden_1xmjo_17{display:none!important}._hidden_7twkb_8{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_10t25_1{overflow:hidden;border-radius:12px;height:40px;background-color:#2b67bc;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;&:hover{background-color:#5683c1}}._hidden_10t25_17{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(re);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 He(){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 kt(r,t,e){return z(this,null,function*(){const n=yield He();return new n(r,t,e)})}Promise.resolve().then(()=>{He()});let Rt=class{constructor(t){b(this,"apple",null);b(this,"isAvailable",!1);b(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,ne(G({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(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),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))})}},We=class{constructor(t){b(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,ne(G({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 ae{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 Ge{constructor(t){b(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 Ba{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 ae})}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 kt(t.teamId,t.appId),this.apple=new Rt(this.ev),this.google=new We(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 Ge(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 Mt(r){return typeof r=="object"&&!Array.isArray(r)}function ja(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 Lr(r,t,e,n){return typeof r=="string"&&Mt(t)?ja(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function za(r,t,e){return r*(t+1)}function Pr(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,Ka=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},kr=r=>Array.isArray(r)&&typeof r[0]!="number";function Rr(r,t){return kr(r)?r[Ka(0,r.length,t)]:r}function qa(r,t){r.indexOf(t)===-1&&r.push(t)}function Mr(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function Ha(r,t,e){for(let n=0;n<r.length;n++){const i=r[n];i.at>t&&i.at<e&&(Mr(r,i),n--)}}function Wa(r,t,e,n,i,a){Ha(r,i,a);for(let s=0;s<t.length;s++)r.push({value:t[s],at:$e(i,a,n[s]),easing:Rr(e,s)})}function Ga(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function $a(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),St=(r,t,e)=>{const n=t-r;return n===0?1:(e-r)/n};function Sr(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const i=St(0,t,n);r.push($e(e,1,i))}}function Dr(r){const t=[0];return Sr(t,r.length-1),t}function Dt(r){return typeof r=="function"&&"applyToOptions"in r}const _t=2e4;function Vt(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<_t;)t+=e,n=r.next(t);return t>=_t?1/0:t}const Ee=r=>r*1e3,Ae=r=>r/1e3;function Vr(r,t=100,e){const n=e(ne(G({},r),{keyframes:[0,t]})),i=Math.min(Vt(n),_t);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:Ae(i)}}let Ye=()=>{},Te=()=>{};process.env.NODE_ENV!=="production"&&(Ye=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Te=(r,t)=>{if(!r)throw new Error(t)});const Ya="easeInOut",Qa=20;function Za(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,Pr(p,v.at,h,u));continue}let[y,A,T={}]=v;T.at!==void 0&&(p=Pr(p,T.at,h,u));let L=0;const w=(I,x,k,U=0,q=0)=>{const H=Xa(I),V=x,{delay:S=0,times:F=Dr(H),type:K="keyframes",repeat:J,repeatType:M,repeatDelay:$=0}=V,j=Ce(V,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:g=t.ease||"easeOut",duration:_}=x;const R=typeof S=="function"?S(U,q):S,B=H.length,E=Dt(K)?K:i==null?void 0:i[K];if(B<=2&&E){let O=100;if(B===2&&ts(H)){const le=H[1]-H[0];O=Math.abs(le)}const W=G({},j);_!==void 0&&(W.duration=Ee(_));const X=Vr(W,O,E);g=X.ease,_=X.duration}_!=null||(_=o);const N=p+R;F.length===1&&F[0]===0&&(F[1]=1);const C=F.length-H.length;if(C>0&&Sr(F,C),H.length===1&&H.unshift(null),J){Te(J<Qa,"Repeat count too high, must be less than 20"),_=za(_,J);const O=[...H],W=[...F];g=Array.isArray(g)?[...g]:[g];const X=[...g];for(let le=0;le<J;le++){H.push(...O);for(let D=0;D<O.length;D++)F.push(W[D]+(le+1)),g.push(D===0?"linear":Rr(X,D-1))}Ga(F,J)}const P=N+_;Wa(k,H,g,F,N,P),L=Math.max(R+_,L),m=Math.max(P,m)};if(fe(y)){const I=Fr(y,c);w(A,T,Ur("default",I))}else{const I=Lr(y,A,n,d),x=I.length;for(let k=0;k<x;k++){A=A,T=T;const U=I[k],q=Fr(U,c);for(const H in A)w(A[H],Ja(T,H),Ur(H,q),k,x)}}h=p,p+=L}return c.forEach((f,v)=>{for(const y in f){const A=f[y];A.sort($a);const T=[],L=[],w=[];for(let x=0;x<A.length;x++){const{at:k,value:U,easing:q}=A[x];T.push(U),L.push(St(0,m,k)),w.push(q||"easeOut")}L[0]!==0&&(L.unshift(0),T.unshift(T[0]),w.unshift(Ya)),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[y]=T,I.transition[y]=G(ne(G({},t),{duration:m,ease:w,times:L}),e)}}),l}function Fr(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function Ur(r,t){return t[r]||(t[r]=[]),t[r]}function Xa(r){return Array.isArray(r)?r:[r]}function Ja(r,t){return r&&r[t]?G(G({},r),r[t]):G({},r)}const es=r=>typeof r=="number",ts=r=>r.every(es),Qe=new WeakMap,rs=r=>Array.isArray(r);function Br(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function jr(r,t,e,n){if(typeof t=="function"){const[i,a]=Br(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]=Br(n);t=t(e!==void 0?e:r.custom,i,a)}return t}function ns(r,t,e){const n=r.getProps();return jr(n,t,n.custom,r)}const Et=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function is(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 Ie={},as=40;function ss(r,t){let e=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>e=!0,s=Et.reduce((T,L)=>(T[L]=is(a),T),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=s,f=()=>{const T=Ie.useManualTiming?i.timestamp:performance.now();e=!1,Ie.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(T-i.timestamp,as),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:Et.reduce((T,L)=>{const w=s[L];return T[L]=(I,x=!1,k=!1)=>(e||v(),w.schedule(I,x,k)),T},{}),cancel:T=>{for(let L=0;L<Et.length;L++)s[Et[L]].cancel(T)},state:i,steps:s}}const Se=r=>r,{schedule:xe,cancel:Ft,state:Ct}=ss(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Se,!0);let wt;function os(){wt=void 0}const be={now:()=>(wt===void 0&&be.set(Ct.isProcessing||Ie.useManualTiming?Ct.timestamp:performance.now()),wt),set:r=>{wt=r,queueMicrotask(os)}},zr=new Set;function Kr(r,t,e){r||zr.has(t)||(console.warn(t),zr.add(t))}class qr{constructor(){this.subscriptions=[]}add(t){return qa(this.subscriptions,t),()=>Mr(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 Hr(r,t){return t?r*(1e3/t):0}const Wr=30,ls=r=>!isNaN(parseFloat(r));class cs{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{var s,o;const a=be.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=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ls(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Kr(!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 qr);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>Wr)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Wr);return Hr(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 Ze(r,t){return new cs(r,t)}function ds(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,Ze(e))}function us(r){return rs(r)?r[r.length-1]||0:r}function ps(r,t){let s=ns(r,t)||{},{transitionEnd:n={},transition:i={}}=s,a=Ce(s,["transitionEnd","transition"]);a=G(G({},a),n);for(const o in a){const l=us(a[o]);ds(r,o,l)}}function hs(r){return!!(fe(r)&&r.add)}function ms(r,t){const e=r.getValue("willChange");if(hs(e))return e.add(t);if(!e&&Ie.WillChange){const n=new Ie.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const Ut=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),fs="data-"+Ut("framerAppearId");function vs(r){return r.props[fs]}const gs=r=>r!==null;function ys(r,{repeat:t,repeatType:e="loop"},n){const i=r.filter(gs),a=t&&e!=="loop"&&t%2===1?0:i.length-1;return i[a]}const De=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ve=new Set(De),bs={type:"spring",stiffness:500,damping:25,restSpeed:10},_s=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),Es={type:"keyframes",duration:.8},Cs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ws=(r,{keyframes:t})=>t.length>2?Es:Ve.has(r)?r.startsWith("scale")?_s(t[1]):bs:Cs;function As(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 Gr(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 $r=r=>t=>typeof t=="string"&&t.startsWith(r),Yr=$r("--"),Ts=$r("var(--"),Bt=r=>Ts(r)?Is.test(r.split("/*")[0].trim()):!1,Is=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Le=(r,t,e)=>e>t?t:e<r?r:e,Fe={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},Xe=ne(G({},Fe),{transform:r=>Le(0,1,r)}),At=ne(G({},Fe),{default:1}),Je=r=>Math.round(r*1e5)/1e5,jt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xs(r){return r==null}const Ns=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zt=(r,t)=>e=>!!(typeof e=="string"&&Ns.test(e)&&e.startsWith(r)||t&&!xs(e)&&Object.prototype.hasOwnProperty.call(e,t)),Qr=(r,t,e)=>n=>{if(typeof n!="string")return n;const[i,a,s,o]=n.match(jt);return{[r]:parseFloat(i),[t]:parseFloat(a),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},Os=r=>Le(0,255,r),Kt=ne(G({},Fe),{transform:r=>Math.round(Os(r))}),Pe={test:zt("rgb","red"),parse:Qr("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+Kt.transform(r)+", "+Kt.transform(t)+", "+Kt.transform(e)+", "+Je(Xe.transform(n))+")"};function Ls(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 qt={test:zt("#"),parse:Ls,transform:Pe.transform},et=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Ne=et("deg"),Ue=et("%"),Q=et("px"),Ps=et("vh"),ks=et("vw"),Zr=ne(G({},Ue),{parse:r=>Ue.parse(r)/100,transform:r=>Ue.transform(r*100)}),Be={test:zt("hsl","hue"),parse:Qr("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+Ue.transform(Je(t))+", "+Ue.transform(Je(e))+", "+Je(Xe.transform(n))+")"},he={test:r=>Pe.test(r)||qt.test(r)||Be.test(r),parse:r=>Pe.test(r)?Pe.parse(r):Be.test(r)?Be.parse(r):qt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Pe.transform(r):Be.transform(r)},Rs=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ms(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(jt))==null?void 0:t.length)||0)+(((e=r.match(Rs))==null?void 0:e.length)||0)>0}const Xr="number",Jr="color",Ss="var",Ds="var(",en="${}",Vs=/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 tt(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(Vs,l=>(he.test(l)?(n.color.push(a),i.push(Jr),e.push(he.parse(l))):l.startsWith(Ds)?(n.var.push(a),i.push(Ss),e.push(l)):(n.number.push(a),i.push(Xr),e.push(parseFloat(l))),++a,en)).split(en);return{values:e,split:o,indexes:n,types:i}}function tn(r){return tt(r).values}function rn(r){const{split:t,types:e}=tt(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===Xr?a+=Je(i[s]):o===Jr?a+=he.transform(i[s]):a+=i[s]}return a}}const Fs=r=>typeof r=="number"?0:r;function Us(r){const t=tn(r);return rn(r)(t.map(Fs))}const je={test:Ms,parse:tn,createTransformer:rn,getAnimatableNone:Us};function Ht(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 Bs({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=Ht(l,o,r+1/3),a=Ht(l,o,r),s=Ht(l,o,r-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:n}}function Tt(r,t){return e=>e>0?t:r}const Wt=(r,t,e)=>{const n=r*r,i=e*(t*t-n)+n;return i<0?0:Math.sqrt(i)},js=[qt,Pe,Be],zs=r=>js.find(t=>t.test(r));function nn(r){const t=zs(r);if(Ye(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===Be&&(e=Bs(e)),e}const an=(r,t)=>{const e=nn(r),n=nn(t);if(!e||!n)return Tt(r,t);const i=G({},e);return a=>(i.red=Wt(e.red,n.red,a),i.green=Wt(e.green,n.green,a),i.blue=Wt(e.blue,n.blue,a),i.alpha=$e(e.alpha,n.alpha,a),Pe.transform(i))},Gt=new Set(["none","hidden"]);function Ks(r,t){return Gt.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const qs=(r,t)=>e=>t(r(e)),$t=(...r)=>r.reduce(qs);function Hs(r,t){return e=>$e(r,t,e)}function Yt(r){return typeof r=="number"?Hs:typeof r=="string"?Bt(r)?Tt:he.test(r)?an:$s:Array.isArray(r)?sn:typeof r=="object"?he.test(r)?an:Ws:Tt}function sn(r,t){const e=[...r],n=e.length,i=r.map((a,s)=>Yt(a)(a,t[s]));return a=>{for(let s=0;s<n;s++)e[s]=i[s](a);return e}}function Ws(r,t){const e=G(G({},r),t),n={};for(const i in e)r[i]!==void 0&&t[i]!==void 0&&(n[i]=Yt(r[i])(r[i],t[i]));return i=>{for(const a in n)e[a]=n[a](i);return e}}function Gs(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 $s=(r,t)=>{const e=je.createTransformer(t),n=tt(r),i=tt(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?Gt.has(r)&&!i.values.length||Gt.has(t)&&!n.values.length?Ks(r,t):$t(sn(Gs(n,i),i.values),e):(Ye(!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.`),Tt(r,t))};function on(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?$e(r,t,e):Yt(r)(r,t)}const Ys=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>xe.update(t,e),stop:()=>Ft(t),now:()=>Ct.isProcessing?Ct.timestamp:be.now()}},ln=(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)})`},Qs=5;function cn(r,t,e){const n=Math.max(t-Qs,0);return Hr(e-r(n),t-n)}const oe={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},dn=.001;function Zs({duration:r=oe.duration,bounce:t=oe.bounce,velocity:e=oe.velocity,mass:n=oe.mass}){let i,a;Ye(r<=Ee(oe.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Le(oe.minDamping,oe.maxDamping,s),r=Le(oe.minDuration,oe.maxDuration,Ae(r)),s<1?(i=c=>{const d=c*s,u=d*r,h=d-e,p=Qt(c,s),m=Math.exp(-u);return dn-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=Qt(Math.pow(c,2),s);return(-i(c)+dn>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=Js(i,a,o);if(r=Ee(r),isNaN(l))return{stiffness:oe.stiffness,damping:oe.damping,duration:r};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:s*2*Math.sqrt(n*c),duration:r}}}const Xs=12;function Js(r,t,e){let n=e;for(let i=1;i<Xs;i++)n=n-r(n)/t(n);return n}function Qt(r,t){return r*Math.sqrt(1-t*t)}const eo=["duration","bounce"],to=["stiffness","damping","mass"];function un(r,t){return t.some(e=>r[e]!==void 0)}function ro(r){let t=G({velocity:oe.velocity,stiffness:oe.stiffness,damping:oe.damping,mass:oe.mass,isResolvedFromDuration:!1},r);if(!un(r,to)&&un(r,eo))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),i=n*n,a=2*Le(.05,1,1-(r.bounce||0))*Math.sqrt(i);t=ne(G({},t),{mass:oe.mass,stiffness:i,damping:a})}else{const e=Zs(r);t=ne(G(G({},t),e),{mass:oe.mass}),t.isResolvedFromDuration=!0}return t}function rt(r=oe.visualDuration,t=oe.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}=ro(ne(G({},e),{velocity:-Ae(e.velocity||0)})),m=h||0,f=c/(2*Math.sqrt(l*d)),v=s-a,y=Ae(Math.sqrt(l/d)),A=Math.abs(v)<5;n||(n=A?oe.restSpeed.granular:oe.restSpeed.default),i||(i=A?oe.restDelta.granular:oe.restDelta.default);let T;if(f<1){const w=Qt(y,f);T=I=>{const x=Math.exp(-f*y*I);return s-x*((m+f*y*v)/w*Math.sin(w*I)+v*Math.cos(w*I))}}else if(f===1)T=w=>s-Math.exp(-y*w)*(v+(m+y*v)*w);else{const w=y*Math.sqrt(f*f-1);T=I=>{const x=Math.exp(-f*y*I),k=Math.min(w*I,300);return s-x*((m+f*y*v)*Math.sinh(k)+w*v*Math.cosh(k))/w}}const L={calculatedDuration:p&&u||null,next:w=>{const I=T(w);if(p)o.done=w>=u;else{let x=w===0?m:0;f<1&&(x=w===0?Ee(m):cn(T,w,I));const k=Math.abs(x)<=n,U=Math.abs(s-I)<=i;o.done=k&&U}return o.value=o.done?s:I,o},toString:()=>{const w=Math.min(Vt(L),_t),I=ln(x=>L.next(w*x).value,w,30);return w+"ms "+I},toTransition:()=>{}};return L}rt.applyToOptions=r=>{const t=Vr(r,100,rt);return r.ease=t.ease,r.duration=Ee(t.duration),r.type="keyframes",r};function Zt({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=k=>o!==void 0&&k<o||l!==void 0&&k>l,m=k=>o===void 0?l:l===void 0||Math.abs(o-k)<Math.abs(l-k)?o:l;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),T=k=>y+A(k),L=k=>{const U=A(k),q=T(k);h.done=Math.abs(U)<=c,h.value=h.done?y:q};let w,I;const x=k=>{p(h.value)&&(w=k,I=rt({keyframes:[h.value,m(h.value)],velocity:cn(T,k,h.value),damping:i,stiffness:a,restDelta:c,restSpeed:d}))};return x(0),{calculatedDuration:null,next:k=>{let U=!1;return!I&&w===void 0&&(U=!0,L(k),x(k)),w!==void 0&&k>=w?I.next(k-w):(!U&&L(k),h)}}}function no(r,t,e){const n=[],i=e||Ie.mix||on,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]||Se:t;o=$t(l,o)}n.push(o)}return n}function io(r,t,{clamp:e=!0,ease:n,mixer:i}={}){const a=r.length;if(Te(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=no(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=St(r[u],r[u+1],d);return o[u](h)};return e?d=>c(Le(r[0],r[a-1],d)):c}function ao(r,t){return r.map(e=>e*t)}const pn=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,so=1e-7,oo=12;function lo(r,t,e,n,i){let a,s,o=0;do s=t+(e-t)/2,a=pn(s,n,i)-r,a>0?e=s:t=s;while(Math.abs(a)>so&&++o<oo);return s}function nt(r,t,e,n){if(r===t&&e===n)return Se;const i=a=>lo(a,0,1,r,e);return a=>a===0||a===1?a:pn(i(a),t,n)}const co=nt(.42,0,1,1),uo=nt(0,0,.58,1),hn=nt(.42,0,.58,1),mn=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,fn=r=>t=>1-r(1-t),vn=nt(.33,1.53,.69,.99),Xt=fn(vn),gn=mn(Xt),yn=r=>(r*=2)<1?.5*Xt(r):.5*(2-Math.pow(2,-10*(r-1))),Jt=r=>1-Math.sin(Math.acos(r)),po=fn(Jt),bn=mn(Jt),_n=r=>Array.isArray(r)&&typeof r[0]=="number",En={linear:Se,easeIn:co,easeInOut:hn,easeOut:uo,circIn:Jt,circInOut:bn,circOut:po,backIn:Xt,backInOut:gn,backOut:vn,anticipate:yn},ho=r=>typeof r=="string",Cn=r=>{if(_n(r)){Te(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,i]=r;return nt(t,e,n,i)}else if(ho(r))return Te(En[r]!==void 0,`Invalid easing type '${r}'`),En[r];return r};function mo(r,t){return r.map(()=>t||hn).splice(0,r.length-1)}function ze({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const i=kr(n)?n.map(Cn):Cn(n),a={done:!1,value:t[0]},s=ao(e&&e.length===t.length?e:Dr(t),r),o=io(s,t,{ease:Array.isArray(i)?i:mo(t,i)});return{calculatedDuration:r,next:l=>(a.value=o(l),a.done=l>=r,a)}}const fo=r=>r!==null;function er(r,{repeat:t,repeatType:e="loop"},n,i=1){const a=r.filter(fo),o=i<0||t&&e!=="loop"&&t%2===1?0:a.length-1;return!o||n===void 0?a[o]:n}const vo={decay:Zt,inertia:Zt,tween:ze,keyframes:ze,spring:rt};function wn(r){typeof r.type=="string"&&(r.type=vo[r.type])}class tr{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 go=r=>r/100;class rr extends tr{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!==be.now()&&this.tick(be.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;wn(t);const{type:e=ze,repeat:n=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=t;let{keyframes:o}=t;const l=e||ze;process.env.NODE_ENV!=="production"&&l!==ze&&Te(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),l!==ze&&typeof o[0]!="number"&&(this.mixKeyframes=$t(go,on(o[0],o[1])),o=[0,100]);const c=l(ne(G({},t),{keyframes:o}));a==="mirror"&&(this.mirroredGenerator=l(ne(G({},t),{keyframes:[...o].reverse(),velocity:-s}))),c.calculatedDuration===null&&(c.calculatedDuration=Vt(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 y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,L=n;if(u){const k=Math.min(this.currentTime,i)/o;let U=Math.floor(k),q=k%1;!q&&k>=1&&(q=1),q===1&&U--,U=Math.min(U,u+1),!!(U%2)&&(h==="reverse"?(q=1-q,p&&(q-=p/o)):h==="mirror"&&(L=s)),T=Le(0,1,q)*o}const w=A?{done:!1,value:d[0]}:L.next(T);a&&(w.value=a(w.value));let{done:I}=w;!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!==Zt&&(w.value=er(d,this.options,v,this.speed)),f&&f(w.value),x&&this.finish(),w}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 i,a;if(this.isStopped)return;const{driver:t=Ys,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(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 yo(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const ke=r=>r*180/Math.PI,nr=r=>{const t=ke(Math.atan2(r[1],r[0]));return ir(t)},bo={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:nr,rotateZ:nr,skewX:r=>ke(Math.atan(r[1])),skewY:r=>ke(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},ir=r=>(r=r%360,r<0&&(r+=360),r),An=nr,Tn=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),In=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),_o={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tn,scaleY:In,scale:r=>(Tn(r)+In(r))/2,rotateX:r=>ir(ke(Math.atan2(r[6],r[5]))),rotateY:r=>ir(ke(Math.atan2(-r[2],r[0]))),rotateZ:An,rotate:An,skewX:r=>ke(Math.atan(r[4])),skewY:r=>ke(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function ar(r){return r.includes("scale")?1:0}function sr(r,t){if(!r||r==="none")return ar(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(e)n=_o,i=e;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=bo,i=o}if(!i)return ar(t);const a=n[t],s=i[1].split(",").map(Co);return typeof a=="function"?a(s):s[a]}const Eo=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return sr(e,t)};function Co(r){return parseFloat(r.trim())}const xn=r=>r===Fe||r===Q,wo=new Set(["x","y","z"]),Ao=De.filter(r=>!wo.has(r));function To(r){const t=[];return Ao.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const Re={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})=>sr(t,"x"),y:(r,{transform:t})=>sr(t,"y")};Re.translateX=Re.x,Re.translateY=Re.y;const Me=new Set;let or=!1,lr=!1,cr=!1;function Nn(){if(lr){const r=Array.from(Me).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const i=To(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)})}lr=!1,or=!1,Me.forEach(r=>r.complete(cr)),Me.clear()}function On(){Me.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(lr=!0)})}function Io(){cr=!0,On(),Nn(),cr=!1}class dr{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?(Me.add(this),or||(or=!0,xe.read(On),xe.resolveKeyframes(Nn))):(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])}yo(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Me.delete(this)}cancel(){this.state==="scheduled"&&(Me.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xo=r=>r.startsWith("--");function No(r,t,e){xo(t)?r.style.setProperty(t,e):r.style[t]=e}function ur(r){let t;return()=>(t===void 0&&(t=r()),t)}const Oo=ur(()=>window.ScrollTimeline!==void 0),Lo={};function Po(r,t){const e=ur(r);return()=>{var n;return(n=Lo[t])!=null?n:e()}}const Ln=Po(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),it=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,Pn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:it([0,.65,.55,1]),circOut:it([.55,0,1,.45]),backIn:it([.31,.01,.66,-.59]),backOut:it([.33,1.53,.69,.99])};function kn(r,t){if(r)return typeof r=="function"?Ln()?ln(r,t):"ease-out":_n(r)?it(r):Array.isArray(r)?r.map(e=>kn(e,t)||Pn.easeOut):Pn[r]}function ko(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=kn(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 Ro(e){var n=e,{type:r}=n,t=Ce(n,["type"]);var i,a;return Dt(r)&&Ln()?r.applyToOptions(t):((i=t.duration)!=null||(t.duration=300),(a=t.ease)!=null||(t.ease="easeOut"),t)}class Mo extends tr{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,Te(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=Ro(t);this.animation=ko(e,n,i,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=er(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):No(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 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&&Oo()?(this.animation.timeline=t,Se):e(this)}}const Rn={anticipate:yn,backInOut:gn,circInOut:bn};function So(r){return r in Rn}function Do(r){typeof r.ease=="string"&&So(r.ease)&&(r.ease=Rn[r.ease])}const Mn=10;class Vo extends Mo{constructor(t){Do(t),wn(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 rr(ne(G({},s),{autoplay:!1})),l=Ee((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(l-Mn).value,o.sample(l).value,Mn),o.stop()}}const Sn=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(je.test(r)||r==="0")&&!r.startsWith("url("));function Fo(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 Uo(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=Sn(i,t),o=Sn(a,t);return Ye(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:Fo(r)||(e==="spring"||Dt(e))&&n}function Dn(r){return typeof r=="object"&&r!==null}function Bo(r){return Dn(r)&&"offsetHeight"in r}const jo=new Set(["opacity","clipPath","filter","transform"]),zo=ur(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ko(r){var c;const{motionValue:t,name:e,repeatDelay:n,repeatType:i,damping:a,type:s}=r;if(!Bo((c=t==null?void 0:t.owner)==null?void 0:c.current))return!1;const{onUpdate:o,transformTemplate:l}=t.owner.getProps();return zo()&&e&&jo.has(e)&&(e!=="transform"||!l)&&!o&&!n&&i!=="mirror"&&a!==0&&s!=="inertia"}const qo=40;class Ho extends tr{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 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=G({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)||dr;this.keyframeResolver=new f(o,(y,A,T)=>this.onKeyframesResolved(y,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=be.now(),Uo(t,a,s,o)||((Ie.instantAnimations||!l)&&(d==null||d(er(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=i?this.resolvedAt?this.resolvedAt-this.createdAt>qo?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=ne(G({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!c&&Ko(h)?new Vo(ne(G({},h),{element:h.motionValue.owner.current})):new rr(h);p.finished.then(()=>this.notifyFinished()).catch(Se),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(),Io()),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 Vn=(r,t,e,n={},i,a)=>s=>{const o=Gr(n,r)||{},l=o.delay||n.delay||0;let{elapsed:c=0}=n;c=c-Ee(l);const d=ne(G({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});As(o)||Object.assign(d,ws(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)),(Ie.instantAnimations||Ie.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!a&&t.get()!==void 0){const h=ys(d.keyframes,o);if(h!==void 0){xe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new rr(d):new Ho(d)},Fn=new Set(["width","height","top","left","right","bottom",...De]);function Wo({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function Go(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&&Wo(c,h))continue;const f=G({delay:e},Gr(a||{},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 T=vs(r);if(T){const L=window.MotionHandoffAnimation(T,h,xe);L!==null&&(f.startTime=L,y=!0)}}ms(r,h),p.start(Vn(h,p,m,r.shouldReduceMotion&&Fn.has(h)?{type:!1}:f,r,y));const A=p.animation;A&&l.push(A)}return s&&Promise.all(l).then(()=>{xe.update(()=>{s&&ps(r,s)})}),l}function $o({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function Yo(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 Qo(r,t){return $o(Yo(r.getBoundingClientRect(),t))}const Un={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"]},pr={};for(const r in Un)pr[r]={isEnabled:t=>Un[r].some(e=>!!t[e])};const Bn=()=>({min:0,max:0}),hr=()=>({x:Bn(),y:Bn()}),Zo=typeof window!="undefined",mr={current:null},jn={current:!1};function Xo(){if(jn.current=!0,!!Zo)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>mr.current=r.matches;r.addListener(t),t()}else mr.current=!1}function Jo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function el(r){return typeof r=="string"||Array.isArray(r)}const tl=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function zn(r){return Jo(r.animate)||tl.some(t=>el(r[t]))}function rl(r){return!!(zn(r)||r.variants)}function nl(r,t,e){for(const n in t){const i=t[n],a=e[n];if(fe(i))r.addValue(n,i);else if(fe(a))r.addValue(n,Ze(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,Ze(s!==void 0?s:i,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Kn=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),qn=r=>/^0[^.\s]+$/u.test(r),il={test:r=>r==="auto",parse:r=>r},Hn=r=>t=>t.test(r),Wn=[Fe,Q,Ue,Ne,ks,Ps,il],Gn=r=>Wn.find(Hn(r)),al=[...Wn,he,je],sl=r=>al.find(Hn(r)),ol=new Set(["brightness","contrast","saturate","opacity"]);function ll(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(jt)||[];if(!n)return r;const i=e.replace(n,"");let a=ol.has(t)?1:0;return n!==e&&(a*=100),t+"("+a+i+")"}const cl=/\b([a-z-]*)\(.*?\)/gu,fr=ne(G({},je),{getAnimatableNone:r=>{const t=r.match(cl);return t?t.map(ll).join(" "):r}}),$n=ne(G({},Fe),{transform:Math.round}),vr=ne(G({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:At,scaleX:At,scaleY:At,scaleZ:At,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:Xe,originX:Zr,originY:Zr,originZ:Q}),{zIndex:$n,fillOpacity:Xe,strokeOpacity:Xe,numOctaves:$n}),dl=ne(G({},vr),{color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:fr,WebkitFilter:fr}),Yn=r=>dl[r];function Qn(r,t){let e=Yn(r);return e!==fr&&(e=je),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const Zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xn{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=dr,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:l,renderState:c}=s;this.latestValues=l,this.baseTarget=G({},l),this.initialValues=e.initial?G({},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=zn(e),this.isVariantNode=rl(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&&fe(m)&&m.set(l[p],!1)}}mount(t){this.current=t,Qe.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)),jn.current||Xo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:mr.current,process.env.NODE_ENV!=="production"&&Kr(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(),Ft(this.notifyUpdate),Ft(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=Ve.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&xe.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 pr){const e=pr[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):hr()}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<Zn.length;n++){const i=Zn[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=nl(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=Ze(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"&&(Kn(n)||qn(n))?n=parseFloat(n):!sl(n)&&je.test(e)&&(n=Qn(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 a;const{initial:e}=this.props;let n;if(typeof e=="string"||typeof e=="object"){const s=jr(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&&!fe(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 qr),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const ul=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pl(r){const t=ul.exec(r);if(!t)return[,];const[,e,n,i]=t;return[`--${e!=null?e:n}`,i]}const hl=4;function Jn(r,t,e=1){Te(e<=hl,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,i]=pl(r);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const s=a.trim();return Kn(s)?parseFloat(s):s}return Bt(i)?Jn(i,t,e+1):i}function ml(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||qn(r):!0}const fl=new Set(["auto","none","0"]);function vl(r,t,e){let n=0,i;for(;n<r.length&&!i;){const a=r[n];typeof a=="string"&&!fl.has(a)&&tt(a).values.length&&(i=r[n]),n++}if(i&&e)for(const a of t)r[a]=Qn(e,i)}class gl extends dr{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(),Bt(c))){const d=Jn(c,e.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Fn.has(n)||t.length!==2)return;const[i,a]=t,s=Gn(i),o=Gn(a);if(s!==o)if(xn(s)&&xn(o))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Re[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||ml(t[i]))&&n.push(i);n.length&&vl(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=Re[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]=Re[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 ei extends Xn{constructor(){super(...arguments),this.KeyframeResolver=gl}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 ti=(r,t)=>t&&typeof r=="number"?t.transform(r):r,yl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bl=De.length;function _l(r,t,e){let n="",i=!0;for(let a=0;a<bl;a++){const s=De[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=ti(o,vr[s]);if(!l){i=!1;const d=yl[s]||s;n+=`${d}(${c}) `}e&&(t[s]=c)}}return n=n.trim(),e?n=e(t,i?"":n):i&&(n="none"),n}function ri(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(Ve.has(l)){s=!0;continue}else if(Yr(l)){i[l]=c;continue}else{const d=ti(c,vr[l]);l.startsWith("origin")?(o=!0,a[l]=d):n[l]=d}}if(t.transform||(s||e?n.transform=_l(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 ni(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 El={};function Cl(r,{layout:t,layoutId:e}){return Ve.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!El[r]||r==="opacity")}function ii(r,t,e){var a;const{style:n}=r,i={};for(const s in n)(fe(n[s])||t.style&&fe(t.style[s])||Cl(s,r)||((a=e==null?void 0:e.getValue(s))==null?void 0:a.liveStyle)!==void 0)&&(i[s]=n[s]);return i}function wl(r){return window.getComputedStyle(r)}class Al extends ei{constructor(){super(...arguments),this.type="html",this.renderInstance=ni}readValueFromInstance(t,e){var n;if(Ve.has(e))return(n=this.projection)!=null&&n.isProjecting?ar(e):Eo(t,e);{const i=wl(t),a=(Yr(e)?i.getPropertyValue(e):i[e])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:e}){return Qo(t,e)}build(t,e,n){ri(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ii(t,e,n)}}function Tl(r,t){return r in t}class Il extends Xn{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(Tl(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 hr()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const xl={offset:"stroke-dashoffset",array:"stroke-dasharray"},Nl={offset:"strokeDashoffset",array:"strokeDasharray"};function Ol(r,t,e=1,n=0,i=!0){r.pathLength=1;const a=i?xl:Nl;r[a.offset]=Q.transform(-n);const s=Q.transform(t),o=Q.transform(e);r[a.array]=`${s} ${o}`}function Ll(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(ri(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&&Ol(p,i,a,s,!1)}const ai=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"]),Pl=r=>typeof r=="string"&&r.toLowerCase()==="svg";function kl(r,t,e,n){ni(r,t,void 0,n);for(const i in t.attrs)r.setAttribute(ai.has(i)?i:Ut(i),t.attrs[i])}function Rl(r,t,e){const n=ii(r,t,e);for(const i in r)if(fe(r[i])||fe(t[i])){const a=De.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=r[i]}return n}class Ml extends ei{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ve.has(e)){const n=Yn(e);return n&&n.default||0}return e=ai.has(e)?e:Ut(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Rl(t,e,n)}build(t,e,n){Ll(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){kl(t,e,n,i)}mount(t){this.isSVGTag=Pl(t.tagName),super.mount(t)}}function si(r){return Dn(r)&&"ownerSVGElement"in r}function Sl(r){return si(r)&&r.tagName==="svg"}function Dl(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=si(r)&&!Sl(r)?new Ml(t):new Al(t);e.mount(r),Qe.set(r,e)}function Vl(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new Il(t);e.mount(r),Qe.set(r,e)}function Fl(r,t,e){const n=fe(r)?r:Ze(r);return n.start(Vn("",n,t,e)),n.animation}function Ul(r,t){return fe(r)||typeof r=="number"||typeof r=="string"&&!Mt(t)}function oi(r,t,e,n){const i=[];if(Ul(r,t))i.push(Fl(r,Mt(t)&&t.default||t,e&&(e.default||e)));else{const a=Lr(r,t,n),s=a.length;Te(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const l=a[o],c=l instanceof Element?Dl:Vl;Qe.has(l)||c(l);const d=Qe.get(l),u=G({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),i.push(...Go(d,ne(G({},t),{transition:u}),{}))}}return i}function Bl(r,t,e){const n=[];return Za(r,t,e,{spring:rt}).forEach(({keyframes:a,transition:s},o)=>{n.push(...oi(o,a,s))}),n}class jl{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 zl extends jl{then(t,e){return this.finished.finally(t).then(()=>{})}}function Kl(r){return Array.isArray(r)&&r.some(Array.isArray)}function ql(r){function t(e,n,i){let a=[];return Kl(e)?a=Bl(e,n,r):a=oi(e,n,i,r),new zl(a)}return t}const de=ql(),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 li{constructor(){b(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,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_1y98r_1:hover{filter:contrast(.575) brightness(1.2)}._hidden_1y98r_22,._hidden_1xmjo_17{display:none!important}._hidden_7twkb_8{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_w4oaz_1{display:block;justify-items:center;align-content: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_w4oaz_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",`
|
|
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
|
-
`);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 ci={loader:"_loader_nwq3e_1"};class Hl{constructor(){b(this,"loader");this.loader=document.createElement("div"),this.loader.classList.add(ci.loader),this.loader.appendChild(new li().render())}setClassName(t){t?this.loader.classList.add(t):this.loader.className=ci.loader}render(){return this.loader}}const pe={checkout:"_checkout_5sq3n_1",hidden:"_hidden_5sq3n_7",formInitial:"_formInitial_5sq3n_11",btnsInitial:"_btnsInitial_5sq3n_16"},gr={buttons:"_buttons_1i8cu_1",hidden:"_hidden_1i8cu_5"},yr={applePay:"_applePay_1m9xd_1",hidden:"_hidden_1m9xd_22"};class Wl{constructor({ev:t,customButtonStyles:e}){b(this,"element");b(this,"events",{ready:new ae});b(this,"ev");b(this,"customButtonStyles");this.ev=t,this.customButtonStyles=e,this.element=document.createElement("div"),this.element.classList.add(yr.applePay,yr.hidden)}init(t){return z(this,null,function*(){t&&(yield this.ev.initApple(t,this.customButtonStyles),this.ev.isAppleAvailable()&&(yield this.ev.renderApple(this.element),this.element.classList.remove(yr.hidden),this.events.ready.emit()))})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const Gl=[{type:"paypal",is_active:!0,order:1},{type:"apple-pay",is_active:!0,order:2},{type:"google-pay",is_active:!0,order:3},{type:"venmo",is_active:!0,order:4},{type:"card",is_active:!0,order:5}],Ke={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},It={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}};function di(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var br,ui;function $l(){if(ui)return br;ui=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 br=r,br}var at={},st={},pi;function hi(){if(pi)return st;pi=1,Object.defineProperty(st,"__esModule",{value:!0}),st.clone=void 0;function r(t){return t?JSON.parse(JSON.stringify(t)):null}return st.clone=r,st}var ot={},mi;function Yl(){if(mi)return ot;mi=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.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 ot.matches=e,ot}var fi;function Ql(){if(fi)return at;fi=1,Object.defineProperty(at,"__esModule",{value:!0}),at.addMatchingCardsToResults=void 0;var r=hi(),t=Yl();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 at.addMatchingCardsToResults=e,at}var lt={},vi;function Zl(){if(vi)return lt;vi=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.isValidInputType=void 0;function r(t){return typeof t=="string"||t instanceof String}return lt.isValidInputType=r,lt}var ct={},gi;function Xl(){if(gi)return ct;gi=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.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 ct.findBestMatch=t,ct}var dt,yi;function Jl(){if(yi)return dt;yi=1;var r=dt&&dt.__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=$l(),e=Ql(),n=Zl(),i=Xl(),a=hi(),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(y){var A=d(y);(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 y=(0,a.clone)(v);y=r(r({},y),f),s[y.type]=y},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,dt=p,dt}var qe=Jl();qe.updateCard("visa",{lengths:[16]}),qe.updateCard("unionpay",{gaps:[4,8,12,16]});const ec=(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)},tc=(r,t)=>{const e=qe.getTypeInfo(t),n=(e==null?void 0:e.code.size)||4;return r.replace(/\D/g,"").slice(0,n)},rc=(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 ue=(r=>(r.Invalid="invalid",r.Empty="empty",r.Incomplete="incomplete",r.Unsupported="unsupported",r.Expired="expired",r))(ue||{}),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 xt=[{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}],bi=r=>xt.find(t=>t.pattern.test(r))||null,_i=r=>xt.filter(t=>t.pattern.test(r)),nc=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},Ei=(r,t)=>{const e=r.replace(/\D/g,"");if(!e)return{isValid:!1,cardType:null,error:ue.Empty};if(!/^\d+$/.test(e))return{isValid:!1,cardType:null,error:ue.Invalid};const n=bi(e);if(n){if(e.length<n.minLength||e.length>n.maxLength)return{isValid:!1,cardType:n.name,error:ue.Incomplete}}else if(e.length<16)return{isValid:!1,cardType:null,error:ue.Incomplete};return n&&t&&!t.includes(n.type)?{isValid:!1,cardType:n.name,error:"unsupported"}:nc(e)?{isValid:!0,cardType:(n==null?void 0:n.name)||null,error:null}:{isValid:!1,cardType:(n==null?void 0:n.name)||null,error:ue.Invalid}},ic=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:[]}},ac=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)||[]}},sc=(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}},[]),_r={googlePay:"_googlePay_1xmjo_1",hidden:"_hidden_1xmjo_17"};class oc{constructor({ev:t,customButtonStyles:e}){b(this,"element");b(this,"events",{ready:new ae});b(this,"ev");b(this,"customButtonStyles");this.ev=t,this.customButtonStyles=e,this.element=document.createElement("div"),this.element.classList.add(_r.googlePay,_r.hidden)}init(t){return z(this,null,function*(){t&&(yield this.ev.initGoogle(t,this.customButtonStyles),yield this.ev.renderGoogle(this.element),this.element.classList.remove(_r.hidden),this.events.ready.emit())})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const Er={paypal:"_paypal_7twkb_1",hidden:"_hidden_7twkb_8"};class lc{constructor({paypal:t,customButtonStyles:e}){b(this,"element");b(this,"events",{ready:new ae});b(this,"paypal");b(this,"customButtonStyles");this.paypal=t,this.customButtonStyles=e,this.element=document.createElement("div"),this.element.classList.add(Er.paypal,Er.hidden)}init(t){return z(this,null,function*(){var e;t&&(yield this.paypal.init({clientId:t.clientId,vault:!0}),yield this.paypal.render(this.element,ne(G({},t),{onApprove:i=>z(this,[i],function*({billingToken:n}){var a;(a=t.onSuccess)==null||a.call(t,n||"")}),style:(e=this.customButtonStyles)==null?void 0:e.styles,onCancel:t.onCancel,onError:t.onError})),this.element.classList.remove(Er.hidden),this.events.ready.emit())})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const cc=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",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",sk:"sk-SK",sv:"sv-SE",th:"th-TH",tr:"tr-TR",vi:"vi-VN",zh:"zh-CN"})[r]||"en-US",dc=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 uc{constructor(){b(this,"template",`
|
|
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_1y98r_1",hidden:"_hidden_1y98r_22"};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(),{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}init(t){return z(this,null,function*(){if(!this.config||this.isIOS())return;const e=this.config.state.transaction.getState(),{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_7twkb_1",hidden:"_hidden_7twkb_8"};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&&(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",`
|
|
9
9
|
<svg
|
|
10
10
|
xmlns='http://www.w3.org/2000/svg'
|
|
11
11
|
fill='none'
|
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
<line x1='1' y1='8' x2='27' y2='8'></line>
|
|
21
21
|
</svg>
|
|
22
22
|
<span class="${Z.srOnly}">Pay with</span>
|
|
23
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.card),this.element.innerHTML=this.template}render(){return this.element}}const Nt={button:"_button_1br9w_1",press:"_press_1br9w_21"};class pc{constructor(t){b(this,"element");b(this,"icon",new uc);const e=t.styles.getState().WalletButton,n=t.translate;this.element=document.createElement("button"),this.element.classList.add(Nt.button),e!=null&&e.className&&this.element.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles);const i=document.createElement("span");i.textContent=n.getState().messages.card.compact.button,this.element.append(this.icon.render(),i),this.element.addEventListener("mousedown",()=>this.element.classList.add(Nt.press)),this.element.addEventListener("mouseup",()=>this.element.classList.remove(Nt.press)),this.element.addEventListener("mouseout",()=>this.element.classList.remove(Nt.press)),n.subscribe(({messages:a})=>{i.textContent=a.card.compact.button})}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const hc=(r,t,e)=>t.concat(r.filter(n=>t.every(i=>!e(n,i)))),Cr=(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],mc=[{type:"paypal",order:1,is_active:!0},{type:"apple-pay",order:2,is_active:!0},{type:"google-pay",order:3,is_active:!0},{type:"card",order:4,is_active:!0}],fc=(r,t,e)=>z(this,null,function*(){var o,l,c,d,u,h,p,m,f,v,y,A,T,L,w,I,x,k,U,q,H,S,F,K,J,M,$,j,g,_,R,B,E,N,C,P,V,O,W,X,le,D,te,ye,ut,pt,ht,mt,ft,vt,gt,yt,bt,Ri,Mi,Si,Di,Vi,Fi,Ui,Bi,ji,zi,Ki,qi,Hi,Wi,Gi,$i,Yi,Qi,Zi,Xi,Ji,ea,ta,ra,na,ia,aa,sa,oa,la,ca,da,ua,pa,ha,ma,fa,va,ga,ya,ba,_a,Ea,Ca,wa,Aa,Ta,Ia,xa,Na,Oa,La,Pa,ka,Ra,Ma,Sa,Da,Va;const n=`${Cr(t)}/internal/payments/create`,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.clientSession,three_ds_session_id:r.threeDsSessionId,type:r.googlePay?"GPAY":r.applePay?"APPLEPAY":r.paypal?"PAYPAL":"CARD",name:(l=(o=r.applePay)==null?void 0:o.billingContact)!=null&&l.givenName?((h=(u=r.applePay)==null?void 0:u.billingContact)==null?void 0:h.givenName)+" "+((m=(p=r.applePay)==null?void 0:p.billingContact)==null?void 0:m.familyName):(d=(c=r.card)==null?void 0:c.metadata)==null?void 0:d.name,phone:(v=(f=r.applePay)==null?void 0:f.shippingContact)==null?void 0:v.phoneNumber,billing_address:r.applePay||r.googlePay?{city:((A=(y=r.applePay)==null?void 0:y.billingContact)==null?void 0:A.locality)||((L=(T=r==null?void 0:r.googlePay)==null?void 0:T.billingAddress)==null?void 0:L.locality)||void 0,country:((I=(w=r.applePay)==null?void 0:w.billingContact)==null?void 0:I.countryCode)||((k=(x=r==null?void 0:r.googlePay)==null?void 0:x.billingAddress)==null?void 0:k.countryCode)||void 0,line1:((H=(q=(U=r.applePay)==null?void 0:U.billingContact)==null?void 0:q.addressLines)==null?void 0:H.at(0))||((F=(S=r==null?void 0:r.googlePay)==null?void 0:S.billingAddress)==null?void 0:F.address1)||void 0,line2:((M=(J=(K=r.applePay)==null?void 0:K.billingContact)==null?void 0:J.addressLines)==null?void 0:M.at(1))||((j=($=r==null?void 0:r.googlePay)==null?void 0:$.billingAddress)==null?void 0:j.address2)||void 0,postal_code:((_=(g=r.applePay)==null?void 0:g.billingContact)==null?void 0:_.postalCode)||((B=(R=r==null?void 0:r.googlePay)==null?void 0:R.billingAddress)==null?void 0:B.postalCode)||void 0,state:((N=(E=r.applePay)==null?void 0:E.billingContact)==null?void 0:N.administrativeArea)||((P=(C=r==null?void 0:r.googlePay)==null?void 0:C.billingAddress)==null?void 0:P.administrativeArea)||void 0}:void 0,card:r.card||(V=r.googlePay)!=null&&V.card||(O=r.applePay)!=null&&O.card?{bin:(W=r.card)==null?void 0:W.firstSixDigits,bin_data:{brand:((X=r.card)==null?void 0:X.cardBrand)||((D=(le=r.googlePay)==null?void 0:le.card)==null?void 0:D.brand)||((ye=(te=r.applePay)==null?void 0:te.card)==null?void 0:ye.brand),country:((ut=r.card)==null?void 0:ut.country)||((ht=(pt=r.googlePay)==null?void 0:pt.card)==null?void 0:ht.country)||((ft=(mt=r.applePay)==null?void 0:mt.card)==null?void 0:ft.country),currency_code:((vt=r.card)==null?void 0:vt.currency)||((yt=(gt=r.googlePay)==null?void 0:gt.card)==null?void 0:yt.currency)||((Ri=(bt=r.applePay)==null?void 0:bt.card)==null?void 0:Ri.currency),funding:((Mi=r.card)==null?void 0:Mi.funding)||((Di=(Si=r.googlePay)==null?void 0:Si.card)==null?void 0:Di.funding)||((Fi=(Vi=r.applePay)==null?void 0:Vi.card)==null?void 0:Fi.funding),issuer:((Ui=r.card)==null?void 0:Ui.issuer)||((ji=(Bi=r.googlePay)==null?void 0:Bi.card)==null?void 0:ji.issuer)||((Ki=(zi=r.applePay)==null?void 0:zi.card)==null?void 0:Ki.issuer),type:((qi=r.card)==null?void 0:qi.type)||((Wi=(Hi=r.googlePay)==null?void 0:Hi.card)==null?void 0:Wi.segment)||(($i=(Gi=r.applePay)==null?void 0:Gi.card)==null?void 0:$i.segment)},cvc:(Yi=r.card)==null?void 0:Yi.cvc,exp_month:(Qi=r.card)!=null&&Qi.expMonth||(Xi=(Zi=r.googlePay)==null?void 0:Zi.card)!=null&&Xi.expiry.month?Number(((Ji=r.card)==null?void 0:Ji.expMonth)||((ta=(ea=r.googlePay)==null?void 0:ea.card)==null?void 0:ta.expiry.month)):void 0,exp_year:(ra=r.card)!=null&&ra.expYear||(ia=(na=r.googlePay)==null?void 0:na.card)!=null&&ia.expiry.year?Number(((aa=r.card)==null?void 0:aa.expYear)||((oa=(sa=r.googlePay)==null?void 0:sa.card)==null?void 0:oa.expiry.year)):void 0,last4:((la=r.card)==null?void 0:la.lastFourDigits)||((da=(ca=r.googlePay)==null?void 0:ca.card)==null?void 0:da.lastFour)||((pa=(ua=r.applePay)==null?void 0:ua.card)==null?void 0:pa.lastFour),number:((ha=r.card)==null?void 0:ha.number)||((fa=(ma=r.googlePay)==null?void 0:ma.card)==null?void 0:fa.number)}:void 0,paypal:(va=r.paypal)!=null&&va.billing_agreement_token.paypalId?{billing_agreement_token:(ga=r.paypal)==null?void 0:ga.billing_agreement_token.paypalId}:void 0,google_pay:r.googlePay&&r.googlePay.token?{cryptogram:r.googlePay.cryptogram,eci:r.googlePay.eci,exp_month:(ba=(ya=r.googlePay)==null?void 0:ya.card)!=null&&ba.expiry.month||(_a=r.googlePay)!=null&&_a.token.expiry.month?Number(r.googlePay.card.expiry.month||r.googlePay.token.expiry.month):void 0,exp_year:(Ca=(Ea=r.googlePay)==null?void 0:Ea.card)!=null&&Ca.expiry.year||(wa=r.googlePay)!=null&&wa.token.expiry.year?Number(r.googlePay.card.expiry.year||r.googlePay.token.expiry.year):void 0,token:(Ta=(Aa=r.googlePay)==null?void 0:Aa.token)==null?void 0:Ta.number,token_service_provider:(xa=(Ia=r.googlePay)==null?void 0:Ia.token)==null?void 0:xa.tokenServiceProvider}:void 0,apple_pay:r.applePay?{cryptogram:r.applePay.cryptogram,eci:r.applePay.eci,exp_month:(La=(Oa=(Na=r.applePay)==null?void 0:Na.networkToken)==null?void 0:Oa.expiry)!=null&&La.month?Number(r.applePay.networkToken.expiry.month):void 0,exp_year:(Ra=(ka=(Pa=r.applePay)==null?void 0:Pa.networkToken)==null?void 0:ka.expiry)!=null&&Ra.year?Number(r.applePay.networkToken.expiry.year):void 0,token:(Sa=(Ma=r.applePay)==null?void 0:Ma.networkToken)==null?void 0:Sa.number,token_service_provider:(Va=(Da=r.applePay)==null?void 0:Da.networkToken)==null?void 0:Va.tokenServiceProvider}:void 0,braintree:r.braintree?{payment_method_nonce:r.braintree.nonce}:void 0})})).json()}),vc=(r,t,e)=>z(this,null,function*(){const n=`${Cr(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||""}),gc=(r,t,e)=>z(this,null,function*(){const n=`${Cr(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=mc),s});var Ci=(r=>(r.Card="CARD",r))(Ci||{});const wr={venmo:"_venmo_10t25_1",hidden:"_hidden_10t25_17"},yc={display:"block",height:40,borderRadius:12};class bc{constructor({braintree:t,customButtonStyles:e}){b(this,"isProcessing",!1);b(this,"venmoButton");b(this,"events",{ready:new ae});b(this,"braintree");this.braintree=t,this.venmoButton=document.createElement("button"),this.venmoButton.classList.add(wr.venmo,wr.hidden),e!=null&&e.className&&this.venmoButton.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.venmoButton.style,e.styles),this.venmoButton.textContent="Venmo"}init(t){return z(this,null,function*(){if(t){console.log("Initializing Braintree Venmo with config:",t);try{if(yield this.braintree.init({authorization:t.authorization}),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(wr.hidden),this.events.ready.emit()}catch(e){console.error("Error initializing Venmo:",e),this.handleVenmoError(e)}}})}displayVenmoButton(t){Object.assign(this.venmoButton.style,yc),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),(n=e.onSuccess)==null||n.call(e,t)}handleVenmoError(t,e){var n;console.error("Venmo error:",t),(n=e==null?void 0:e.onError)==null||n.call(e,t)}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.venmoButton}}class _c{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,"events",{ready:new ae,open:new ae,error:new ae,cancel:new ae,success:new ae});this.config=t;const e=t.state,n=e.styles.getState();this.applePay=new Wl({ev:t.service.ev,customButtonStyles:n.ApplePayButton}),this.paypal=new lc({paypal:t.service.paypal,customButtonStyles:n.PayPalButton}),this.googlePay=new oc({ev:t.service.ev,customButtonStyles:n.GooglePayButton}),this.braintree=new bc({braintree:t.service.braintree,customButtonStyles:n.BraintreeButton}),this.card=new pc(e),this.buttons=document.createElement("div"),this.buttons.classList.add(gr.buttons,gr.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)}),this.card.addEventListener(()=>this.events.open.emit())})}initApple(){return z(this,null,function*(){this.isAppleReady=!1,this.buttons.appendChild(this.applePay.render());const t=this.config.state.transaction.getState(),{locale:e,supportedCardTypes:n}=this.config.state.checkout.getState(),i=ac(t);try{if(!i)return;yield this.applePay.init({transaction:i,supportedCardTypes:sc(n),locale:cc(e||"en"),onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:a=>this.events.success.emit(ne(G({},a),{type:"apple"}))})}catch(a){console.error(a)}finally{this.isAppleReady=!0}})}initGoogle(){return z(this,null,function*(){this.isGoogleReady=!1,this.buttons.appendChild(this.googlePay.render());const t=this.config.state.transaction.getState(),{locale:e}=this.config.state.checkout.getState(),n=ic(t);try{if(!n)return;yield this.googlePay.init({transaction:n,locale:dc(e||"en"),onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:i=>this.events.success.emit(ne(G({},i),{type:"google"}))})}catch(i){console.error(i)}finally{this.isGoogleReady=!0}})}initPayPal(){return z(this,null,function*(){var i,a;this.isPayPalReady=!1,this.buttons.appendChild(this.paypal.render());const t=this.config.state.transaction.getState(),e=this.config.state.checkout.getState(),n=()=>z(this,null,function*(){return yield vc(e.clientToken,e.environment,e.apiVersion)});try{if(!t)return;yield this.paypal.init({clientId:((i=t==null?void 0:t.paypal_info)==null?void 0:i.client_id)||"",environment:((a=t==null?void 0:t.paypal_info)==null?void 0:a.environment)||"sandbox",createBillingAgreement:n,onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:s=>this.events.success.emit({paypalId:s,type:"paypal"})})}catch(s){console.error(s)}finally{this.isPayPalReady=!0}})}initBraintreeVenmo(){return z(this,null,function*(){var e;this.isBraintreeReady=!1,this.buttons.appendChild(this.braintree.render());const t=this.config.state.transaction.getState();console.log("----- init braintree venmo: ",t);try{if(!t)return;yield this.braintree.init({authorization:((e=t==null?void 0:t.brain_tree_info)==null?void 0:e.client_token)||"",onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:n=>this.events.success.emit({nonce:n.nonce,type:"venmo"})})}catch(n){console.error(n)}finally{this.isBraintreeReady=!0}})}initCard(){return z(this,null,function*(){this.buttons.appendChild(this.card.render())})}initPaymentMethods(){return z(this,null,function*(){const t=this.config.state.transaction.getState(),n=hc(Gl,(t==null?void 0:t.checkout_config)||[],(i,a)=>i.type===a.type).filter(({is_active:i})=>i).sort((i,a)=>i.order-a.order).map(({type:i})=>{switch(i){case"apple-pay":return this.initApple();case"google-pay":return this.initGoogle();case"paypal":return this.initPayPal();case"venmo":return this.initBraintreeVenmo();case"card":return this.initCard();default:throw new Error("Unknown button type")}});yield Promise.all(n),this.handleReady()})}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(gr.hidden)}render(){return this.buttons}}class Ec{constructor(){b(this,"template",`
|
|
23
|
+
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.card),this.element.innerHTML=this.template}render(){return this.element}}const _t={button:"_button_1br9w_1",press:"_press_1br9w_21"};class Il{constructor(t){y(this,"element");y(this,"icon",new Tl);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(_t.button),e!=null&&e.className&&this.element.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles);const i=document.createElement("span");i.textContent=n.getState().messages.card.compact.button,this.element.append(this.icon.render(),i),this.element.addEventListener("mousedown",()=>this.element.classList.add(_t.press)),this.element.addEventListener("mouseup",()=>this.element.classList.remove(_t.press)),this.element.addEventListener("mouseout",()=>this.element.classList.remove(_t.press)),n.subscribe(({messages:a})=>{i.textContent=a.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(i=>!e(n,i)))),vr={venmo:"_venmo_w4oaz_1",hidden:"_hidden_w4oaz_26"},Ol={display:"block",height:40,borderRadius:12},Nl=`<svg viewBox="2.3 484.3 611.9 117.80000000000001" xmlns="http://www.w3.org/2000/svg">
|
|
24
|
+
<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
|
+
fill="currentColor"/>
|
|
26
|
+
</svg>`;class Ll{constructor(t){y(this,"isProcessing",!1);y(this,"venmoButton");y(this,"events",{ready:new se});y(this,"braintree");this.config=t,this.braintree=this.config.service.braintree;const e=this.config.state.styles.getState().BraintreeButton;this.venmoButton=document.createElement("button"),this.venmoButton.classList.add(vr.venmo,vr.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}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)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(vr.hidden),this.events.ready.emit()}catch(i){console.error("Error initializing Venmo:",i),this.handleVenmoError(i)}})}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),(n=e.onSuccess)==null||n.call(e,t)}handleVenmoError(t,e){var n;console.error("Venmo error:",t),(n=e==null?void 0:e.onError)==null||n.call(e,t)}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.venmoButton}}class kl{constructor(t){y(this,"isAppleReady",!0);y(this,"isGoogleReady",!0);y(this,"isPayPalReady",!0);y(this,"isBraintreeReady",!0);y(this,"buttons");y(this,"applePay");y(this,"googlePay");y(this,"paypal");y(this,"card");y(this,"braintree");y(this,"events",{ready:new se,open:new se,error:new se,cancel:new se,success:new se});this.config=t,this.applePay=new ll(t),this.paypal=new Al(t),this.googlePay=new wl(t),this.braintree=new Ll(t),this.card=new Il(t),this.buttons=document.createElement("div"),this.buttons.classList.add(dr.buttons,dr.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)}),this.card.addEventListener(()=>this.events.open.emit())})}initApple(){return z(this,null,function*(){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.events.success.emit(X(j({},t),{type:"apple"}))})}catch(t){console.error(t)}finally{this.isAppleReady=!0}})}initGoogle(){return z(this,null,function*(){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.events.success.emit(X(j({},t),{type:"google"}))})}catch(t){console.error(t)}finally{this.isGoogleReady=!0}})}initPayPal(){return z(this,null,function*(){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.events.success.emit({paypalId:t,type:"paypal"})})}catch(t){console.error(t)}finally{this.isPayPalReady=!0}})}initBraintreeVenmo(){return z(this,null,function*(){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.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.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,a)=>i.type===a.type).filter(({is_active:i})=>i).sort((i,a)=>i.order-a.order).map(({type:i})=>{switch(i){case te.APPLE_PAY:return this.initApple();case te.GOOGLE_PAY:return this.initGoogle();case te.PAYPAL:return this.initPayPal();case te.VENMO:return this.initBraintreeVenmo();case te.CARD:return this.initCard();default:throw new Error("Unknown button type")}});yield Promise.all(n),this.handleReady()})}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(dr.hidden)}render(){return this.buttons}}class Pl{constructor(){y(this,"template",`
|
|
24
27
|
<svg
|
|
25
28
|
xmlns='http://www.w3.org/2000/svg'
|
|
26
29
|
width='24'
|
|
@@ -36,7 +39,7 @@
|
|
|
36
39
|
<polyline points='15 18 9 12 15 6'></polyline>
|
|
37
40
|
</svg>
|
|
38
41
|
<span class="${Z.srOnly}">Back</span>
|
|
39
|
-
`);
|
|
42
|
+
`);y(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(){y(this,"element");y(this,"icon",new Pl);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 we={button:"_button_rx9be_1",disabled:"_disabled_rx9be_17",press:"_press_rx9be_22",hidden:"_hidden_rx9be_26",spinner:"_spinner_rx9be_30"};class Sl{constructor(t,e){y(this,"element");y(this,"spinner",new ei);y(this,"message",document.createElement("span"));this.element=document.createElement("button"),this.element.classList.add(we.button),e!=null&&e.className&&this.element.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles),this.spinner.addClass(we.spinner),this.spinner.addClass(we.hidden),this.message.textContent=t.messages().card.pay.button,this.element.append(this.spinner.render(),this.message),this.element.addEventListener("mousedown",()=>this.element.classList.add(we.press)),this.element.addEventListener("mouseup",()=>this.element.classList.remove(we.press)),this.element.addEventListener("mouseout",()=>this.element.classList.remove(we.press)),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(we.disabled),this.spinner.removeClass(we.hidden)):(this.element.removeAttribute("disabled"),this.element.classList.remove(we.disabled),this.spinner.addClass(we.hidden))}render(){return this.element}}const Et={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 Ct{constructor(){y(this,"template",`
|
|
40
43
|
<svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
|
|
41
44
|
<g fill='none' fill-rule='evenodd' transform='matrix(1 0 0 -1 0 12)'>
|
|
42
45
|
<circle cx='6' cy='3.2' fill='currentColor' r='1'></circle>
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
</g>
|
|
48
51
|
</svg>
|
|
49
52
|
<span class="${Z.srOnly}">Warning</span>
|
|
50
|
-
`);
|
|
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",`
|
|
51
54
|
<svg
|
|
52
55
|
width='28'
|
|
53
56
|
height='19'
|
|
@@ -75,7 +78,7 @@
|
|
|
75
78
|
</defs>
|
|
76
79
|
</svg>
|
|
77
80
|
<span class="${Z.srOnly}">Unknown card</span>
|
|
78
|
-
`);
|
|
81
|
+
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Fl{constructor(){y(this,"template",`
|
|
79
82
|
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${Z.svg}'>
|
|
80
83
|
<g fill='none' fill-rule='evenodd'>
|
|
81
84
|
<rect fill='#016fd0' height='16' rx='2' width='24' />
|
|
@@ -102,7 +105,7 @@
|
|
|
102
105
|
</g>
|
|
103
106
|
</svg>
|
|
104
107
|
<span class="${Z.srOnly}">Amex</span>
|
|
105
|
-
`);
|
|
108
|
+
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Ul{constructor(){y(this,"template",`
|
|
106
109
|
<svg
|
|
107
110
|
xmlns='http://www.w3.org/2000/svg'
|
|
108
111
|
xmlns-xlink='http://www.w3.org/1999/xlink'
|
|
@@ -142,7 +145,7 @@
|
|
|
142
145
|
</g>
|
|
143
146
|
</svg>
|
|
144
147
|
<span class="${Z.srOnly}">Diners Club</span>
|
|
145
|
-
`);
|
|
148
|
+
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Bl{constructor(){y(this,"template",`
|
|
146
149
|
<svg
|
|
147
150
|
xmlns='http://www.w3.org/2000/svg'
|
|
148
151
|
xmlns-xlink='http://www.w3.org/1999/xlink'
|
|
@@ -187,7 +190,7 @@
|
|
|
187
190
|
</g>
|
|
188
191
|
</svg>
|
|
189
192
|
<span class="${Z.srOnly}">Discover</span>
|
|
190
|
-
`);
|
|
193
|
+
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class jl{constructor(){y(this,"template",`
|
|
191
194
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${Z.svg}'>
|
|
192
195
|
<g fill='none'>
|
|
193
196
|
<path
|
|
@@ -217,7 +220,7 @@
|
|
|
217
220
|
</g>
|
|
218
221
|
</svg>
|
|
219
222
|
<span class="${Z.srOnly}">JCB</span>
|
|
220
|
-
`);
|
|
223
|
+
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class zl{constructor(){y(this,"template",`
|
|
221
224
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
222
225
|
<g fill='none' fill-rule='evenodd'>
|
|
223
226
|
<rect fill='#252525' height='16' rx='2' width='24' />
|
|
@@ -230,7 +233,7 @@
|
|
|
230
233
|
</g>
|
|
231
234
|
</svg>
|
|
232
235
|
<span class="${Z.srOnly}">MasterCard</span>
|
|
233
|
-
`);
|
|
236
|
+
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Kl{constructor(){y(this,"template",`
|
|
234
237
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
235
238
|
<g fill='none'>
|
|
236
239
|
<path
|
|
@@ -252,7 +255,7 @@
|
|
|
252
255
|
</g>
|
|
253
256
|
</svg>
|
|
254
257
|
<span class="${Z.srOnly}">Union Pay</span>
|
|
255
|
-
`);
|
|
258
|
+
`);y(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class ql{constructor(){y(this,"template",`
|
|
256
259
|
<svg
|
|
257
260
|
xmlns='http://www.w3.org/2000/svg'
|
|
258
261
|
xmlns-xlink='http://www.w3.org/1999/xlink'
|
|
@@ -291,7 +294,7 @@
|
|
|
291
294
|
</g>
|
|
292
295
|
</svg>
|
|
293
296
|
<span class="${Z.srOnly}">Visa</span>
|
|
294
|
-
`);
|
|
297
|
+
`);y(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){y(this,"id","paynext-card-input-number");y(this,"initialCardTypes",bt.map(t=>t.type));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,"error",document.createElement("p"));y(this,"unknownCard",new Vl);y(this,"amex",new Fl);y(this,"dinerClub",new Ul);y(this,"discover",new Bl);y(this,"jcb",new jl);y(this,"masterCard",new zl);y(this,"unionPay",new Kl);y(this,"visa",new ql);y(this,"placeholderStyle",document.createElement("style"));y(this,"supportedCardTypes",this.initialCardTypes);y(this,"isTouchSubmit",!1);y(this,"errorMessage","");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;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),(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-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),(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(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),(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.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(a=>a.type),n=ui(t),i=Jo(t,(n==null?void 0:n.type)||"");i.replace(/\D/g,"").length===((n==null?void 0:n.maxLength)||16)&&this.validate(i),this.supportedCardTypes=e.length?e:this.initialCardTypes,this.input.value=i,this.events.change.emit({card:i,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,fe.open,fe.transition);return}yield ue(this.labelError,fe.close,fe.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 ge.Visa:return this.visa.render();case ge.Maestro:case ge.Mastercard:return this.masterCard.render();case ge.DinersClub:return this.dinerClub.render();case ge.JCB:return this.jcb.render();case ge.AmericanExpress:return this.amex.render();case ge.Discover:return this.discover.render();case ge.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:i}=hi(t,this.supportedCardTypes);return n?(this.isRequired=!1,this.errorMessage="",this.render(),n):(i===pe.Empty?(this.errorMessage="",this.isRequired=!0):i===pe.Unsupported?(this.errorMessage=e.card.number.error.unsupported,this.isRequired=!1):(this.errorMessage=i===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(){y(this,"template",`
|
|
295
298
|
<svg class='${Z.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
|
|
296
299
|
<title>CVC</title>
|
|
297
300
|
<g fill='none' fill-rule='evenodd'>
|
|
@@ -310,7 +313,7 @@
|
|
|
310
313
|
</g>
|
|
311
314
|
</svg>
|
|
312
315
|
<span class="${Z.srOnly}">Card CVC</span>
|
|
313
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Dc{constructor(t,e){b(this,"cvcId","paynext-card-input-cvc");b(this,"expiryId","paynext-card-input-expiry");b(this,"element");b(this,"warning",new Ar);b(this,"cardCvc",new Sc);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 ae,cvcChange:new ae});var s,o,l,c,d,u,h,p,m,f,v,y,A,T,L,w,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.warning.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.cvcError),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,q=>"-"+q.toLowerCase()),k=Object.entries(e.placeholder.styles).map(([U,q])=>`${x(U)}:${q};`).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),(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),(w=e==null?void 0:e.error)!=null&&w.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 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,i=t.length<((e==null?void 0:e.code.size)||3);return!n&&!i?null:n?ue.Empty:ue.Incomplete}validateCvc(t){const e=this.translate.messages(),n=this.cvcValidator(t);if(n){if(n===ue.Empty)this.cvcErrorMessage="",this.isCvcRequired=!0;else{const i=n===ue.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=tc(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 de(this.cvcLabelError,me.open,me.transition);return}yield de(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 de(this.cvcError,_e.open,_e.transition);return}yield de(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?ue.Empty:n?ue.Incomplete:i.getFullYear()===new Date().getFullYear()?"dateExpired":"expired"}validateExpiry(t){const e=this.translate.messages(),n=this.expiryValidator(t);if(n){if(n===ue.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===ue.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=rc(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 de(this.expiryLabelError,me.open,me.transition);return}yield de(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 de(this.expiryError,_e.open,_e.transition);return}yield de(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.warning.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 wi={container:"_container_94v1h_1",title:"_title_94v1h_10"};class Ai{constructor(t){b(this,"element");b(this,"message",document.createElement("p"));b(this,"icon",new Ar);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(wi.container),this.message.classList.add(wi.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 Vc{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 ae,close:new ae});const i=n.getState();this.element=document.createElement("form"),this.error=new Ai(t),this.submit=new Ac(t,i.SubmitButton),this.back=new wc,this.number=new Mc(t,i.Input),this.name=new Tc(t,i.Input),this.cardSecurity=new Dc(t,i.Input),this.error.addClassName(Ot.hidden),this.element.classList.add(Ot.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(Ot.hidden)}hideError(){this.error.addClassName(Ot.hidden)}render(){return this.element}}class Fc{constructor(){b(this,"template",`
|
|
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",`
|
|
314
317
|
<svg
|
|
315
318
|
fill='none'
|
|
316
319
|
height='24'
|
|
@@ -327,7 +330,7 @@
|
|
|
327
330
|
'></path>
|
|
328
331
|
</svg>
|
|
329
332
|
<span class="${Z.srOnly}">Success</span>
|
|
330
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.successContainer),this.element.innerHTML=this.template}render(){return this.element}}const Ti={container:"_container_hoha1_1",title:"_title_hoha1_5"};class Uc{constructor(t){b(this,"element");b(this,"message",document.createElement("p"));b(this,"icon",new Fc);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(Ti.container),this.message.classList.add(Ti.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 Bc{constructor(t){b(this,"isLoading",!1);b(this,"isFormOpen",!1);b(this,"checkout");b(this,"container",document.createElement("div"));b(this,"loader",new Hl);b(this,"error");b(this,"success");b(this,"buttons");b(this,"form");this.config=t,this.buttons=new _c(t),this.form=new Vc({translate:t.state.translate,className:pe.hidden,stylesState:t.state.styles}),this.error=new Ai(t.state.translate),this.success=new Uc(t.state.translate),this.error.addClassName(pe.hidden),this.success.addClassName(pe.hidden),this.container.append(this.loader.render(),this.buttons.render(),this.form.render()),this.checkout=document.createElement("div"),this.checkout.classList.add(pe.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(pe.hidden),this.buttons.showButton()}),this.buttons.addEventListener("open",()=>z(this,null,function*(){this.isLoading||(this.hideError(),yield de(this.buttons.buttons,It.close,It.transition),this.buttons.buttons.classList.add(pe.hidden),this.form.element.classList.add(pe.formInitial),this.form.element.classList.remove(pe.hidden),yield de(this.form.element,Ke.open,Ke.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 de(this.form.element,Ke.close,Ke.transition),this.form.element.classList.add(pe.hidden),this.buttons.buttons.classList.add(pe.btnsInitial),this.buttons.buttons.classList.remove(pe.hidden),yield de(this.buttons.buttons,It.open,It.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:Ci.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 fc(t,e.environment,e.apiVersion);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(ne(G({},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(pe.hidden),this.error.addClassName(pe.hidden),this.success.removeClassName(pe.hidden),yield de(this.success.element,Ke.open,Ke.transition)})}hideError(){this.error.addClassName(pe.hidden),this.form.hideError()}showError(){this.isFormOpen||this.error.removeClassName(pe.hidden),this.form.showError()}setLoading(t){this.isLoading=t,this.form.setLoading(t),this.loader.setClassName(!t||this.isFormOpen?pe.hidden:"")}render(){return this.checkout}}class jc{constructor(t){b(this,"component");this.config=t,this.component=new Bc(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 Lt{constructor(t){b(this,"initialState");b(this,"state");b(this,"observer",new ae);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 zc={clientToken:"",environment:"sandbox",apiVersion:"1.0.0"};class Kc extends Lt{constructor(t){super(G(G({},zc),t))}}const qc={};class Hc extends Lt{constructor(t){super(G(G({},qc),t))}}class Wc extends Lt{constructor(e){super(e||null);b(this,"clientToken","")}updateTransaction(e,n,i){return z(this,null,function*(){if(this.clientToken===e)return this.getState();this.clientToken=e;const a=yield gc(e,n,i);return this.setState(a),a})}}const Tr={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."}},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."}},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:"我们无法验证您的付款方式。请选择其他付款方式并重试。"}}},Ir=()=>{const r=navigator==null?void 0:navigator.language.split("-")[0];return Tr[r]||Tr.en},Ii=(r,t={})=>{var n,i,a,s,o,l,c,d,u,h,p,m,f,v,y,A,T,L,w,I,x,k,U,q,H,S,F,K,J,M,$,j,g,_,R,B,E,N,C,P,V,O,W,X,le,D,te,ye,ut,pt,ht,mt,ft,vt,gt,yt,bt;if(!r)return Ir();const e=Tr[r]||Ir();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:((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:((T=(A=t==null?void 0:t.card)==null?void 0:A.expiry)==null?void 0:T.label)||e.card.expiry.label,placeholder:((w=(L=t==null?void 0:t.card)==null?void 0:L.expiry)==null?void 0:w.placeholder)||e.card.expiry.placeholder,error:{required:((k=(x=(I=t==null?void 0:t.card)==null?void 0:I.expiry)==null?void 0:x.error)==null?void 0:k.required)||e.card.expiry.error.required,invalid:((H=(q=(U=t==null?void 0:t.card)==null?void 0:U.expiry)==null?void 0:q.error)==null?void 0:H.invalid)||e.card.expiry.error.invalid,incomplete:((K=(F=(S=t==null?void 0:t.card)==null?void 0:S.expiry)==null?void 0:F.error)==null?void 0:K.incomplete)||e.card.expiry.error.incomplete,expired:(($=(M=(J=t==null?void 0:t.card)==null?void 0:J.expiry)==null?void 0:M.error)==null?void 0:$.expired)||e.card.expiry.error.expired}},cvc:{label:((g=(j=t==null?void 0:t.card)==null?void 0:j.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.label)||e.card.cvc.label,error:{required:((E=(B=t==null?void 0:t.card)==null?void 0:B.cvc)==null?void 0:E.label)||e.card.cvc.label,incomplete:((C=(N=t==null?void 0:t.card)==null?void 0:N.cvc)==null?void 0:C.label)||e.card.cvc.label,invalid:((V=(P=t==null?void 0:t.card)==null?void 0:P.cvc)==null?void 0:V.label)||e.card.cvc.label}},name:{label:((W=(O=t==null?void 0:t.card)==null?void 0:O.name)==null?void 0:W.label)||e.card.name.label,placeholder:((le=(X=t==null?void 0:t.card)==null?void 0:X.name)==null?void 0:le.placeholder)||e.card.name.placeholder,error:{required:((ye=(te=(D=t==null?void 0:t.card)==null?void 0:D.name)==null?void 0:te.error)==null?void 0:ye.required)||e.card.name.error.required,invalid:((ht=(pt=(ut=t==null?void 0:t.card)==null?void 0:ut.name)==null?void 0:pt.error)==null?void 0:ht.invalid)||e.card.name.error.invalid}},pay:{button:((ft=(mt=t==null?void 0:t.card)==null?void 0:mt.pay)==null?void 0:ft.button)||e.card.pay.button},compact:{button:((gt=(vt=t==null?void 0:t.card)==null?void 0:vt.compact)==null?void 0:gt.button)||e.card.compact.button}},status:{success:((yt=t==null?void 0:t.status)==null?void 0:yt.success)||e.status.success,error:((bt=t==null?void 0:t.status)==null?void 0:bt.error)||e.status.error}}};class Gc extends Lt{constructor(){super({messages:Ir(),locale:(navigator==null?void 0:navigator.language.split("-")[0])||"en"})}setMessages(t){const e=this.locale(),n=Ii(e,t);this.setState({locale:e,messages:n,overrides:t})}setLocale(t){const e=this.overrides(),n=Ii(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
|
+
`);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"}}/*!
|
|
331
334
|
* paypal-js v8.2.0 (2025-01-23T17:26:53.747Z)
|
|
332
335
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
333
336
|
*
|
|
@@ -342,7 +345,7 @@
|
|
|
342
345
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
343
346
|
* See the License for the specific language governing permissions and
|
|
344
347
|
* limitations under the License.
|
|
345
|
-
*/function
|
|
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 i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);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),i=e.cloneNode();if(delete i.dataset.uidAuto,Object.keys(i.dataset).length!==Object.keys(n.dataset).length)return null;var a=!0;return Object.keys(i.dataset).forEach(function(s){i.dataset[s]!==n.dataset[s]&&(a=!1)}),a?e:null}function oc(r){var t=r.url,e=r.attributes,n=r.onSuccess,i=r.onError,a=Ei(t,e);a.onerror=i,a.onload=n,document.head.insertBefore(a,document.head.firstElementChild)}function lc(r){var t=r.sdkBaseUrl,e=r.environment,n=ac(r,["sdkBaseUrl","environment"]),i=t||uc(e),a=n,s=Object.keys(a).filter(function(c){return typeof a[c]!="undefined"&&a[c]!==null&&a[c]!==""}).reduce(function(c,d){var u=a[d].toString();return d=cc(d),d.substring(0,4)==="data"||d==="crossorigin"?c.attributes[d]=u:c.queryParams[d]=u,c},{queryParams:{},attributes:{}}),o=s.queryParams,l=s.attributes;return o["merchant-id"]&&o["merchant-id"].indexOf(",")!==-1&&(l["data-merchant-id"]=o["merchant-id"],o["merchant-id"]="*"),{url:"".concat(i,"?").concat(dc(o)),attributes:l}}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,i=e.attributes,a=i["data-namespace"]||"paypal",s=Ci(a);return i["data-js-sdk-library"]||(i["data-js-sdk-library"]="paypal-js"),sc(n,i)&&s?t.resolve(s):hc({url:n,attributes:i},t).then(function(){var o=Ci(a);if(o)return o;throw new Error("The window.".concat(a," 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(i,a){if(typeof document=="undefined")return i();oc({url:e,attributes:n,onSuccess:function(){return i()},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 a(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(){y(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,i;if(this.paypal){const a=j(j({},mc),(e==null?void 0:e.style)||{});yield(i=(n=this.paypal).Buttons)==null?void 0:i.call(n,X(j({fundingSource:"paypal"},e),{style:a})).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 yr={exports:{}},Ai;function vc(){return Ai||(Ai=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){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},{}],4:[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},{}],5:[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},{}],6:[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},{}],7:[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":4,"./lib/once":5,"./lib/promise-or-callback":6}],8:[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){/*! *****************************************************************************
|
|
346
349
|
Copyright (c) Microsoft Corporation.
|
|
347
350
|
|
|
348
351
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -355,7 +358,7 @@
|
|
|
355
358
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
356
359
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
357
360
|
PERFORMANCE OF THIS SOFTWARE.
|
|
358
|
-
***************************************************************************** */function s(E,N,C,P){function V(O){return O instanceof C?O:new C(function(W){W(O)})}return new(C||(C=Promise))(function(O,W){function X(te){try{D(P.next(te))}catch(ye){W(ye)}}function le(te){try{D(P.throw(te))}catch(ye){W(ye)}}function D(te){te.done?O(te.value):V(te.value).then(X,le)}D((P=P.apply(E,[])).next())})}function o(E,N){var C={label:0,sent:function(){if(O[0]&1)throw O[1];return O[1]},trys:[],ops:[]},P,V,O,W;return W={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(W[Symbol.iterator]=function(){return this}),W;function X(D){return function(te){return le([D,te])}}function le(D){if(P)throw new TypeError("Generator is already executing.");for(;C;)try{if(P=1,V&&(O=D[0]&2?V.return:D[0]?V.throw||((O=V.return)&&O.call(V),0):V.next)&&!(O=O.call(V,D[1])).done)return O;switch(V=0,O&&(D=[D[0]&2,O.value]),D[0]){case 0:case 1:O=D;break;case 4:return C.label++,{value:D[1],done:!1};case 5:C.label++,V=D[1],D=[0];continue;case 7:D=C.ops.pop(),C.trys.pop();continue;default:if(O=C.trys,!(O=O.length>0&&O[O.length-1])&&(D[0]===6||D[0]===2)){C=0;continue}if(D[0]===3&&(!O||D[1]>O[0]&&D[1]<O[3])){C.label=D[1];break}if(D[0]===6&&C.label<O[1]){C.label=O[1],O=D;break}if(O&&C.label<O[2]){C.label=O[2],C.ops.push(D);break}O[2]&&C.ops.pop(),C.trys.pop();continue}D=N.call(E,C)}catch(te){D=[6,te],V=0}finally{P=O=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 N,C=JSON.stringify(E);if(!E.forceScriptReload&&(N=c[C],N))return N;var P=document.createElement("script"),V=E.dataAttributes||{},O=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(W){P.setAttribute("data-".concat(W),"".concat(V[W]))}),N=new Promise(function(W,X){P.addEventListener("load",function(){W(P)}),P.addEventListener("error",function(){X(new Error("".concat(E.src," failed to load.")))}),P.addEventListener("abort",function(){X(new Error("".concat(E.src," has aborted.")))}),O.appendChild(P)}),c[C]=N,N}d.clearCache=function(){c={}};var u=d,h=function(N){var C=document.querySelector('link[href="'.concat(N.href,'"]'));if(C)return Promise.resolve(C);C=document.createElement("link");var P=N.container||document.head;return C.setAttribute("rel","stylesheet"),C.setAttribute("type","text/css"),C.setAttribute("href",N.href),C.setAttribute("id",N.id),P.firstChild?P.insertBefore(C,P.firstChild):P.appendChild(C),Promise.resolve(C)};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",y={minified:"axo.min",unminified:"axo"},A="fastlane",T="connect-boba",L="".concat(T,"/locales/"),w={AXO_ASSET_NAME:y,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 k(){return x()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function U(E,N,C){var P,V;return C===void 0&&(C=!0),s(this,void 0,void 0,function(){var O,W;return o(this,function(X){if(O=H(),O&&O[E.module]){if(N&&((P=O[E.module])===null||P===void 0?void 0:P.VERSION)!==N)throw W=(V=O[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(W," cannot load version ").concat(N));return[2,!0]}if(!N)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,q(E,N,C)]})})}function q(E,N,C){if(C===void 0&&(C=!0),x()){var P=C?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(O,W){window.require([P],O,W)})}var V=C?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(N),src:"https://js.braintreegateway.com/web/".concat(N,"/js/").concat(V)})}function H(){return window==null?void 0:window.braintree}var S,F,K={Client:"client",HostedCardFields:"hostedFields"},J="braintree",M=(S={},S[K.Client]="client",S[K.HostedCardFields]="hosted-fields",S),$=(F={},F[K.Client]={id:"client",module:K.Client,amdModule:{unminified:"".concat(J,"/").concat(M[K.Client]),minified:"".concat(J,"/").concat(M[K.Client],".min")},script:{unminified:"".concat(M[K.Client],".js"),minified:"".concat(M[K.Client],".min.js")}},F[K.HostedCardFields]={id:"hcf",module:K.HostedCardFields,amdModule:{unminified:"".concat(J,"/").concat(M[K.HostedCardFields]),minified:"".concat(J,"/").concat(M[K.HostedCardFields],".min")},script:{unminified:"".concat(M[K.HostedCardFields],".js"),minified:"".concat(M[K.HostedCardFields],".min.js")}},F);function j(E){return s(this,void 0,void 0,function(){var N,C,P,V;return o(this,function(O){switch(O.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),N=E.btSdkVersion,C=E.minified,P=R(E),V=B(E),E.platform!==I.BT?[3,2]:[4,Promise.all([U($.hostedFields,N,C),g(P,C)])];case 1:return O.sent(),[3,5];case 2:return E.platform!==I.PPCP?[3,4]:[4,Promise.all([U($.client,N,C),U($.hostedFields,N,C),g(P,C)])];case 3:return O.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,N){var C;if(N===void 0&&(N=!0),x()){k()&&requirejs.config({paths:(C={},C[A]=E,C)});var P="".concat(A,"/").concat(N?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified);return new Promise(function(V,O){window.require([P],V,O)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var N=E.assetUrl,C=E.bundleId;return C?"https://cdn-".concat(C,".static.engineering.dev.paypalinc.com/").concat(N):"".concat(w.CDNX_PROD,"/").concat(N)}function R(E){var N,C=(E==null?void 0:E.minified)!==!1?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified,P=x()?w.AXO_ASSET_PATH:"".concat(w.AXO_ASSET_PATH,"/").concat(C,".js");return _({assetUrl:P,bundleId:(N=E==null?void 0:E.metadata)===null||N===void 0?void 0:N.bundleIdOverride})}function B(E){var N;return _({assetUrl:w.LOCALE_PATH,bundleId:(N=E==null?void 0:E.metadata)===null||N===void 0?void 0:N.bundleIdOverride})}a.constants=w,a.loadAxo=j})},{}],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"),y=e("../lib/assign").assign,A=e("../lib/analytics"),T=e("./errors"),L=e("../lib/constants").VERSION,w=e("../lib/constants").GRAPHQL_URLS,I=e("../lib/methods"),x=e("../lib/convert-methods-to-error"),k=e("../lib/assets"),U=e("../lib/constants").FRAUDNET_FNCLS,q=e("../lib/constants").FRAUDNET_SOURCE,H=e("../lib/constants").FRAUDNET_URL,S={};function F(M){var $,j;if(M=M||{},$=JSON.stringify(M),j=M.gatewayConfiguration,!j)throw new c(T.CLIENT_MISSING_GATEWAY_CONFIGURATION);if(["assetsUrl","clientApiUrl","configUrl"].forEach(function(g){if(g in j&&!l(j[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=j.clientApiUrl+"/v1/",j.graphQL){if(!l(j.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:j.graphQL})}}F.initialize=function(M){var $,j,g=S[M.authorization];if(g)return A.sendEvent(g,"custom.client.load.cached"),g;try{j=h(M.authorization)}catch(_){return Promise.reject(new c(T.CLIENT_INVALID_AUTHORIZATION))}return g=u(j,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+'"]'),j,g,_,R;$||($=document.body.appendChild(document.createElement("script")),$.type="application/json",$.setAttribute("fncls",U)),j=this.getConfiguration(),g={rda_tenant:"bt_card",mid:j.gatewayConfiguration.merchantId},_=j.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:q},$.text=JSON.stringify(R)},F.prototype.request=function(M,$){var j=this,g=new Promise(function(_,R){var B,E,N,C,P=!!(M.endpoint==="payment_methods/credit_cards"&&j.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",C={method:M.method,graphQL:j._graphQL,timeout:M.timeout,metadata:j._configuration.analyticsMetadata},E==="clientApi")N=j._clientApiBaseUrl,C.data=p.addMetadata(j._configuration,M.data);else if(E==="graphQLApi")N=w[j._configuration.gatewayConfiguration.environment],M.endpoint="",C.method="post",C.data=y({clientSdkMetadata:{platform:j._configuration.analyticsMetadata.platform,source:j._configuration.analyticsMetadata.source,integration:j._configuration.analyticsMetadata.integration,sessionId:j._configuration.analyticsMetadata.sessionId,version:L}},M.data),C.headers=J(j._configuration);else throw new c({type:T.CLIENT_OPTION_INVALID.type,code:T.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});C.url=N+M.endpoint,C.sendAnalyticsEvent=function(V){A.sendEvent(j,V)},j._request(C,function(V,O,W){var X,le;if(le=K(W,V),le){R(le);return}if(E==="graphQLApi"&&O.errors){R(d(O.errors,{type:T.CLIENT_GRAPHQL_REQUEST_ERROR.type,code:T.CLIENT_GRAPHQL_REQUEST_ERROR.code,message:T.CLIENT_GRAPHQL_REQUEST_ERROR.message}));return}X=y({_httpStatus:W},O),P&&X.creditCards&&X.creditCards.length>0&&(j._findOrCreateFraudnetJSON(X.creditCards[0].nonce),k.loadScript({src:H,forceScriptReload:!0})),_(X)})});if(typeof $=="function"){$=f(v($)),g.then(function(_){$(null,_,_._httpStatus)}).catch(function(_){var R=_&&_.details&&_.details.httpStatus;$(_,null,R)});return}return g};function K(M,$){var j;if(M===-1?j=new c(T.CLIENT_REQUEST_TIMEOUT):M===401?j=new c(T.CLIENT_AUTHORIZATION_INVALID):M===403?j=new c(T.CLIENT_AUTHORIZATION_INSUFFICIENT):M===429?j=new c(T.CLIENT_RATE_LIMITED):M>=500?j=new c(T.CLIENT_GATEWAY_NETWORK):(M<200||M>=400)&&(j=d($,{type:T.CLIENT_REQUEST_ERROR.type,code:T.CLIENT_REQUEST_ERROR.code,message:T.CLIENT_REQUEST_ERROR.message})),j)return j.details=j.details||{},j.details.httpStatus=M,j}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 J(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,y){return new Promise(function(A,T){var L,w,I,x,k=y||l(),U={merchantAppId:window.location.host,platform:c.PLATFORM,sdkVersion:c.VERSION,source:c.SOURCE,integration:c.INTEGRATION,integrationType:c.INTEGRATION,sessionId:k};w=v.attrs,I=v.configUrl,w._meta=U,w.braintreeLibraryVersion=c.BRAINTREE_LIBRARY_VERSION,w.configVersion="3",x={url:I,method:"GET",data:w},w.authorizationFingerprint&&v.graphQL?(p(v.graphQL.date,m)&&(x.graphQL=new u({graphQL:{url:v.graphQL.url,features:["configuration"]}})),x.metadata=U):w.tokenizationKey&&(x.graphQL=new u({graphQL:{url:h[v.environment],features:["configuration"]}}),x.metadata=U),o(x,function(q,H,S){var F;if(q){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:q}}));return}L={authorizationType:w.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:w.authorizationFingerprint,analyticsMetadata:U,gatewayConfiguration:H},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 y(T,L,w){var I,x,k,U,q,H,S,F=T.url,K=T.graphQL,J=T.timeout,M=c.getRequestObject(),$=w,j=!!(K&&K.isGraphQLRequest(F,T.data));T.headers=s({"Content-Type":"application/json"},T.headers),j?k=new u(T):k=new h(T),F=k.getUrl(),U=k.getBody(),q=k.getMethod(),H=k.getHeaders(),q==="GET"&&(F=a.queryify(F,U),U=null),d?M.onreadystatechange=function(){if(M.readyState===4){if(M.status===0&&j){delete T.graphQL,y(T,L,w);return}if(S=l(M.responseText),x=k.adaptResponseBody(S),I=k.determineStatus(M.status,S),I>=400||I<200){if(j&&v(S)){delete T.graphQL,y(T,L,w);return}if(L<p&&f(I)){L++,y(T,L,w);return}$(x||"error",null,I||500)}else $(null,x,I)}}:(T.headers&&(F=a.queryify(F,H)),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(q,F,!0)}catch(g){if(!j)throw g;delete T.graphQL,y(T,L,w);return}M.timeout=J,d&&Object.keys(H).forEach(function(g){M.setRequestHeader(g,H[g])});try{M.send(o(q,U))}catch(g){}}function A(T,L){y(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,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:l[y]||y.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,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:l[y]||y.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(y){y.field===v&&(m=y)}),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,y=p.email,A="hasBuyerConsent"in m&&m.hasBuyerConsent,T=p.shippingAddress,L=l(u,h),w=a({},L.input,{email:y,optIn:A,phone:p.phone});return f&&(w.termsAndConditionsVersion=f),v&&(w.termsAndConditionsCountry=v),"authAssertion"in m&&(w.authAssertion=m.authAssertion),T&&(w.shippingAddress=T),{input:w}}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()),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=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()),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=l(d,y.input),y}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,w){return w?h(L):c(L)},configuration:p},v={"payment_methods/credit_cards":function(L,w,I){return I?u(L,w):d(L,w)},configuration:m};function y(L){var w=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[w],this._adapter=v[w],this._sendAnalyticsEvent("graphql.init")}y.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},y.prototype.getBody=function(){var L=T(this._data),w=this._generator(L,l(this._data.creditCard)),I=s({clientSdkMetadata:this._clientSdkMetadata},w);return JSON.stringify(I)},y.prototype.getMethod=function(){return"POST"},y.prototype.getHeaders=function(){var L,w;return this._data.authorizationFingerprint?(this._sendAnalyticsEvent("graphql.authorization-fingerprint"),L=this._data.authorizationFingerprint):(this._sendAnalyticsEvent("graphql.tokenization-key"),L=this._data.tokenizationKey),w={Authorization:"Bearer "+L,"Braintree-Version":a},s({},this._headers,w)},y.prototype.adaptResponseBody=function(L){return this._adapter(L,this,"creditCard"in this._data&&l(this._data.creditCard))},y.prototype.determineStatus=function(L,w){var I,x;return L===200?(x=w.errors&&w.errors[0]&&w.errors[0].extensions&&w.errors[0].extensions.errorClass,w.data&&!w.errors?I=200:x==="VALIDATION"?I=422:x==="AUTHORIZATION"?I=403:x==="AUTHENTICATION"?I=401:A(x,w)?I=403:I=500):L?I=L:I=500,this._sendAnalyticsEvent("graphql.status."+L),this._sendAnalyticsEvent("graphql.determinedStatus."+I),I};function A(L,w){return!L&&w.errors[0].message}function T(L){var w={};return Object.keys(L).forEach(function(I){var x=o(I);typeof L[I]=="object"?w[x]=T(L[I]):typeof L[I]=="number"?w[x]=String(L[I]):w[x]=L[I]}),w}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,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 y=v._request,A=a.ANALYTICS_URL,T=a.ANALYTICS_PREFIX+h,L=v.getConfiguration(),w=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:w?"production":"sandbox",timestamp:f},p)}],I.tracking=[x],p&&typeof p=="object"&&(I.tracking=[d(x,p)]),y({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("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return m[y]=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})?$/,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++)),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)})}(xr)),xr.exports}var sd=ad();const od=di(sd);var Nr={exports:{}},Pi;function ld(){return Pi||(Pi=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 Oe=="function"&&Oe;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 Oe=="function"&&Oe,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 y=v.match(/CriOS\/(\d+)\./);if(!y)return!1;var A=parseInt(y[1],10);return A<a}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!c(v)&&!d(v)&&/samsung/i.test(v)}n.exports=function(y){return y=y||window.navigator.userAgent,!(l(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,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",y=u.indexOf(m)===-1;return h?f=!0:f=m.charAt(0)!=="_",v&&f&&y});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,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){/*! *****************************************************************************
|
|
359
362
|
Copyright (c) Microsoft Corporation.
|
|
360
363
|
|
|
361
364
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -368,7 +371,7 @@
|
|
|
368
371
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
369
372
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
370
373
|
PERFORMANCE OF THIS SOFTWARE.
|
|
371
|
-
***************************************************************************** */function s(E,N,C,P){function V(O){return O instanceof C?O:new C(function(W){W(O)})}return new(C||(C=Promise))(function(O,W){function X(te){try{D(P.next(te))}catch(ye){W(ye)}}function le(te){try{D(P.throw(te))}catch(ye){W(ye)}}function D(te){te.done?O(te.value):V(te.value).then(X,le)}D((P=P.apply(E,[])).next())})}function o(E,N){var C={label:0,sent:function(){if(O[0]&1)throw O[1];return O[1]},trys:[],ops:[]},P,V,O,W;return W={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(W[Symbol.iterator]=function(){return this}),W;function X(D){return function(te){return le([D,te])}}function le(D){if(P)throw new TypeError("Generator is already executing.");for(;C;)try{if(P=1,V&&(O=D[0]&2?V.return:D[0]?V.throw||((O=V.return)&&O.call(V),0):V.next)&&!(O=O.call(V,D[1])).done)return O;switch(V=0,O&&(D=[D[0]&2,O.value]),D[0]){case 0:case 1:O=D;break;case 4:return C.label++,{value:D[1],done:!1};case 5:C.label++,V=D[1],D=[0];continue;case 7:D=C.ops.pop(),C.trys.pop();continue;default:if(O=C.trys,!(O=O.length>0&&O[O.length-1])&&(D[0]===6||D[0]===2)){C=0;continue}if(D[0]===3&&(!O||D[1]>O[0]&&D[1]<O[3])){C.label=D[1];break}if(D[0]===6&&C.label<O[1]){C.label=O[1],O=D;break}if(O&&C.label<O[2]){C.label=O[2],C.ops.push(D);break}O[2]&&C.ops.pop(),C.trys.pop();continue}D=N.call(E,C)}catch(te){D=[6,te],V=0}finally{P=O=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 N,C=JSON.stringify(E);if(!E.forceScriptReload&&(N=c[C],N))return N;var P=document.createElement("script"),V=E.dataAttributes||{},O=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(W){P.setAttribute("data-".concat(W),"".concat(V[W]))}),N=new Promise(function(W,X){P.addEventListener("load",function(){W(P)}),P.addEventListener("error",function(){X(new Error("".concat(E.src," failed to load.")))}),P.addEventListener("abort",function(){X(new Error("".concat(E.src," has aborted.")))}),O.appendChild(P)}),c[C]=N,N}d.clearCache=function(){c={}};var u=d,h=function(N){var C=document.querySelector('link[href="'.concat(N.href,'"]'));if(C)return Promise.resolve(C);C=document.createElement("link");var P=N.container||document.head;return C.setAttribute("rel","stylesheet"),C.setAttribute("type","text/css"),C.setAttribute("href",N.href),C.setAttribute("id",N.id),P.firstChild?P.insertBefore(C,P.firstChild):P.appendChild(C),Promise.resolve(C)};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",y={minified:"axo.min",unminified:"axo"},A="fastlane",T="connect-boba",L="".concat(T,"/locales/"),w={AXO_ASSET_NAME:y,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 k(){return x()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function U(E,N,C){var P,V;return C===void 0&&(C=!0),s(this,void 0,void 0,function(){var O,W;return o(this,function(X){if(O=H(),O&&O[E.module]){if(N&&((P=O[E.module])===null||P===void 0?void 0:P.VERSION)!==N)throw W=(V=O[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(W," cannot load version ").concat(N));return[2,!0]}if(!N)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,q(E,N,C)]})})}function q(E,N,C){if(C===void 0&&(C=!0),x()){var P=C?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(O,W){window.require([P],O,W)})}var V=C?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(N),src:"https://js.braintreegateway.com/web/".concat(N,"/js/").concat(V)})}function H(){return window==null?void 0:window.braintree}var S,F,K={Client:"client",HostedCardFields:"hostedFields"},J="braintree",M=(S={},S[K.Client]="client",S[K.HostedCardFields]="hosted-fields",S),$=(F={},F[K.Client]={id:"client",module:K.Client,amdModule:{unminified:"".concat(J,"/").concat(M[K.Client]),minified:"".concat(J,"/").concat(M[K.Client],".min")},script:{unminified:"".concat(M[K.Client],".js"),minified:"".concat(M[K.Client],".min.js")}},F[K.HostedCardFields]={id:"hcf",module:K.HostedCardFields,amdModule:{unminified:"".concat(J,"/").concat(M[K.HostedCardFields]),minified:"".concat(J,"/").concat(M[K.HostedCardFields],".min")},script:{unminified:"".concat(M[K.HostedCardFields],".js"),minified:"".concat(M[K.HostedCardFields],".min.js")}},F);function j(E){return s(this,void 0,void 0,function(){var N,C,P,V;return o(this,function(O){switch(O.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),N=E.btSdkVersion,C=E.minified,P=R(E),V=B(E),E.platform!==I.BT?[3,2]:[4,Promise.all([U($.hostedFields,N,C),g(P,C)])];case 1:return O.sent(),[3,5];case 2:return E.platform!==I.PPCP?[3,4]:[4,Promise.all([U($.client,N,C),U($.hostedFields,N,C),g(P,C)])];case 3:return O.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,N){var C;if(N===void 0&&(N=!0),x()){k()&&requirejs.config({paths:(C={},C[A]=E,C)});var P="".concat(A,"/").concat(N?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified);return new Promise(function(V,O){window.require([P],V,O)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var N=E.assetUrl,C=E.bundleId;return C?"https://cdn-".concat(C,".static.engineering.dev.paypalinc.com/").concat(N):"".concat(w.CDNX_PROD,"/").concat(N)}function R(E){var N,C=(E==null?void 0:E.minified)!==!1?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified,P=x()?w.AXO_ASSET_PATH:"".concat(w.AXO_ASSET_PATH,"/").concat(C,".js");return _({assetUrl:P,bundleId:(N=E==null?void 0:E.metadata)===null||N===void 0?void 0:N.bundleIdOverride})}function B(E){var N;return _({assetUrl:w.LOCALE_PATH,bundleId:(N=E==null?void 0:E.metadata)===null||N===void 0?void 0:N.bundleIdOverride})}a.constants=w,a.loadAxo=j})},{}],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 y=v._request,A=a.ANALYTICS_URL,T=a.ANALYTICS_PREFIX+h,L=v.getConfiguration(),w=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:w?"production":"sandbox",timestamp:f},p)}],I.tracking=[x],p&&typeof p=="object"&&(I.tracking=[d(x,p)]),y({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,y=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 w(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()}w.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()},w.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)},w.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(y,function(I){I(this.state)}.bind(this))},w.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()}},w.prototype.redirect=function(I){this._frame&&!this.isFrameClosed()&&this._frame.redirect(I)},w.prototype.close=function(){this.isFrameClosed()||this._frame.close()},w.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},w.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)}},w.prototype.createNoopHandler=function(){return{close:T,focus:T}},w.prototype.teardown=function(){this.close(),this._dispatchFrame.parentNode.removeChild(this._dispatchFrame),this._dispatchFrame=null,this._cleanupFrame()},w.prototype.isFrameClosed=function(){return this._frame==null||this._frame.isClosed()},w.prototype._cleanupFrame=function(){this._frame=null,clearInterval(this._popupInterval),this._popupInterval=null},w.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},w.prototype._getFrameForEnvironment=function(I){var x=f.supportsPopups(),k=!!window.popupBridge,U=v({},this._options,I);return k?new s(U):x?new a(U):new o(U)},n.exports=w},{"../../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("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return m[y]=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})?$/,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++)),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,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!) {
|
|
372
375
|
createVenmoQRCodePaymentContext(input: $input) {
|
|
373
376
|
clientMutationId
|
|
374
377
|
venmoQRCodePaymentContext {
|
|
@@ -438,12 +441,12 @@
|
|
|
438
441
|
}
|
|
439
442
|
}
|
|
440
443
|
}
|
|
441
|
-
}`},{}],89:[function(e,n,i){var a=this&&this.__assign||function(){return a=Object.assign||function(f){for(var v,y=1,A=arguments.length;y<A;y++){v=arguments[y];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 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=l.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,T){v.launchDesktopPromiseRejectFunction=T;var L=function(){v.bus.off(d.VENMO_DESKTOP_CUSTOMER_CANCELED,I),v.bus.off(d.VENMO_DESKTOP_UNKNOWN_ERROR,w)},w=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,w)});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(),T=Date.now()+A;return v.displayQRCode(y.id,y.merchantId),v.pollForStatusChange(y.status,T)}).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(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 w=v==="CANCELED"?"The authorization was canceled":"Something went wrong";return A.displayError(w),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,y).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(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 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,y){if(y===void 0&&(y={}),!this.venmoContextId)return this.Promise.resolve();var A={input:a({id:this.venmoContextId,status:v},y)},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(y){return y.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(y){var A="Venmo";return s.verify({name:A,client:y.client,authorization:y.authorization}).then(function(){var T,L;return y.profileId&&typeof y.profileId!="string"?Promise.reject(new u(c.VENMO_INVALID_PROFILE_ID)):y.deepLinkReturnUrl&&typeof y.deepLinkReturnUrl!="string"?Promise.reject(new u(c.VENMO_INVALID_DEEP_LINK_RETURN_URL)):(T=o.create({authorization:y.authorization,client:y.client,debug:y.debug,assetsUrl:l.create(y.authorization),name:A}).then(function(w){var I=w.getConfiguration();return y.client=w,I.gatewayConfiguration.payWithVenmo?w:Promise.reject(new u(c.VENMO_NOT_ENABLED))}),y.createPromise=T,L=new h(y),a.sendEvent(T,"venmo.initialized"),T.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,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(),y=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:y: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,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">
|
|
442
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"/>
|
|
443
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"/>
|
|
444
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"/>
|
|
445
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"/>
|
|
446
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"/>
|
|
447
|
-
</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
|
|
448
|
-
`)}function L(x){var k=document.getElementById(f.backdrop),U,q,H,S,F,K,J,M;if(k){k.classList.remove("hidden");return}U=document.createElement("style"),q=document.createElement("div"),H=document.createElement("div"),S=document.createElement("div"),F=document.createElement("div"),K=document.createElement("div"),J=document.createElement("button"),M=document.createElement("button"),x&&(U.nonce=x),U.id="venmo-desktop-web__injected-styles",U.innerHTML=T(),q.id=f.backdrop,H.id=f.backdropContainer,S.id=f.venmoLogo,S.innerHTML=u,F.id=f.message,F.innerText="What would you like to do?",K.id=f.instructions,K.innerText=h,J.id=f.continueButton,J.innerText="Continue payment",M.id=f.cancelButton,M.innerText="Cancel payment",document.head.appendChild(U),H.appendChild(S),H.appendChild(F),H.appendChild(K),H.appendChild(J),H.appendChild(M),q.appendChild(H),document.body.appendChild(q),q.addEventListener("click",function($){$.stopPropagation()})}function w(x){return L(x.styleCspNonce),v(x)}function I(x){var k=new o,U="venmoDesktopWebLogin",q=x.assetsUrl,H=x.debug||!1,S=y(),F=q+"/web/"+d+"/html";return a.create({name:U,dispatchFrameUrl:F+"/dispatch-frame"+s(H)+".html",openFrameUrl:F+"/venmo-landing-frame"+s(H)+".html",top:S.top,left:S.left,height:m,width:p},function(K){k.resolve(K)}),k}n.exports={runWebLogin:w,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"),y=e("../lib/in-iframe"),A=e("@braintree/extended-promise"),T=e("./shared/get-venmo-url"),L=e("./shared/web-login-backdrop"),w=e("../lib/snake-case-to-camel-case"),I=e("../lib/url-params"),x=e("./external/"),k=e("./external/queries"),U="3.126.0",q=250,H=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,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,N){return R.request({api:"graphQLApi",data:{query:E,variables:N}}).then(function(C){return C.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=q,this._mobilePollingExpiresThreshold=H,this._createPromise=this._createPromise.then(function(R){var B,E,N=_._cannotHaveReturnUrls?"manual-return":"mobile-payment-context",C=R.getConfiguration();return E=L.setupDesktopWebLogin({assetsUrl:C.gatewayConfiguration.assetsUrl,debug:C.isDebug}).then(function(P){_._frameServiceInstance=P}).catch(function(P){return P}),_._mobilePollingContextEnvironment=C.gatewayConfiguration.environment.toUpperCase(),B=_._createVenmoPaymentContext(R).then(function(){return a.sendEvent(_._createPromise,"venmo."+N+".presented"),R}).catch(function(P){return a.sendEvent(_._createPromise,"venmo."+N+".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,B]).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,B,E,N=g.getConfiguration(),C=N.gatewayConfiguration.payWithVenmo,P=!1,V=R._useAllowDesktopWebLogin?"NATIVE_WEB":"MOBILE_WEB";if(!this._shouldCreateVenmoPaymentContext)return Promise.resolve();if(this._shouldUseLegacyFlow)B=g.request({api:"graphQLApi",data:{query:k.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{environment:this._mobilePollingContextEnvironment,intent:"PAY_FROM_APP"}}}}).then(function(O){return O.data.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext});else{if((this._collectCustomerBillingAddress||this._collectCustomerShippingAddress)&&!C.enrichedCustomerDataEnabled)return Promise.reject(new v(d.VENMO_ECD_DISABLED));this._lineItems&&this._lineItems.forEach(function(O){O.unitTaxAmount=O.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(O){return E[O]!==void 0}),B=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(O){return O.data.createVenmoPaymentContext.venmoPaymentContext})}return B.then(function(O){var W=new Date(O.expiresAt)-new Date(O.createdAt),X=W*.6666;clearTimeout(R._refreshPaymentContextTimeout),R._refreshPaymentContextTimeout=setTimeout(function(){R._tokenizationInProgress||R._createVenmoPaymentContext(g,!0)},X),!(_&&R._tokenizationInProgress)&&(R._venmoPaymentContextStatus=O.status,R._venmoPaymentContextId=O.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){j()?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"),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){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,N=_.analyticsMetadata,C=E.accessToken,P={_meta:{version:N.sdkVersion,integration:N.integration,platform:N.platform,sessionId:N.sessionId}};return this._isDebug=_.isDebug,this._assetsUrl=_.gatewayConfiguration.assetsUrl,B=B.replace(/#*$/,""),this._venmoPaymentContextId&&(this._shouldUseLegacyFlow?C+="|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=C,R.braintree_environment=E.environment,R.braintree_sdk_data=btoa(JSON.stringify(P)),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 _=K(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?k.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:k.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,N){g<_._maxRetryCount?(g++,_._checkPaymentContextStatusAndProcessResult(g).then(E).catch(N)):N(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(N){var C;_.processHashChangeFlowResults(N).catch(function(P){C=P}).then(function(P){!_._ignoreHistoryChanges&&window.location.hash!==_._previousHash&&(window.location.hash=_._previousHash),_._removeVisibilityEventListener(),C?_._tokenizePromise.reject(C):_._tokenizePromise.resolve(P),delete _._tokenizePromise})}return this._onHashChangeListener=function(N){var C=N.newURL.split("#")[1];_._hasTokenizationResult(C)&&(R=!0,clearTimeout(B),E(C))},window.addEventListener("hashchange",this._onHashChangeListener,!1),this._visibilityChangeListener=function(){var N=g.processResultsDelay||c.DEFAULT_PROCESS_RESULTS_DELAY;window.document.hidden||(_._venmoWindow&&!_._venmoWindow.closed&&_._venmoWindow.close(),R||(B=setTimeout(E,N)))},this.getUrl().then(function(N){return _.appSwitch(N),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?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=K(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(N){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:N.paymentMethodId,username:N.userName,payerInfo:N.payerInfo,id:_._venmoPaymentContextId})}).catch(function(N){N.code===d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED.code?(window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:canceled"),E(N)):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 K(g){var _=(g||window.location.hash.substring(1)).split("&"),R=_.reduce(function(B,E){var N=E.split("="),C=decodeURIComponent(N[0]).replace(/\W/g,""),P=w(C),V=decodeURIComponent(N[1]);return B[P]=V,B},{});return R.resourceId&&(R.id=R.resourceId),R}function J(g){return g=g||"","@"+g.replace("@","")}function M(g){var _={nonce:g.paymentMethodNonce,type:"VenmoAccount",details:{username:J(g.username),paymentContextId:g.id}};return g.payerInfo&&(_.details.payerInfo=g.payerInfo,_.details.payerInfo.userName=J(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 j(){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)})}(Nr)),Nr.exports}var cd=ld();const dd=di(cd);class ud{constructor(){b(this,"client",null);b(this,"venmoInstance",null)}init(t){return z(this,null,function*(){try{this.client=yield od.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 dd.create(G({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 ki{constructor(){b(this,"ev",new Ba);b(this,"paypal",new id);b(this,"braintree",new ud);b(this,"state",{translate:new Gc,checkout:new Kc,transaction:new Wc,styles:new Hc});b(this,"checkout",new jc({state:this.state,service:{ev:this.ev,paypal:this.paypal,braintree:this.braintree}}))}clearState(){Object.values(this.state).forEach(t=>t.clearState())}}class pd{constructor(t){b(this,"parent");b(this,"core",new ki);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()})}}ee.Core=ki,ee.PayNextCheckout=pd,Object.defineProperty(ee,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 P=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(){P.focus()}),document.getElementById(f.cancelButton).addEventListener("click",function(){P.close(),W(),A()}),P.open({},function(q){var ee=1;q?F.reject(q):H(ee).then(function(M){F.resolve(M)}).catch(function(M){S().then(function($){$.status==="CREATED"?F.reject(new c(l.VENMO_CUSTOMER_CANCELED)):F.reject(M)})}),P.close(),A()}),P.redirect(U),F}function b(){var x=Math.round((window.outerHeight-m)/2)+window.screenTop,P=Math.round((window.outerWidth-p)/2)+window.screenLeft;return{top:x,left:P}}function A(){document.getElementById("venmo-desktop-web-backdrop").classList.add("hidden")}function T(){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);","}"],P=["#"+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(P,U,H,W,S);return F.join(`
|
|
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"})});
|
|
449
452
|
//# sourceMappingURL=index.umd.js.map
|