1import{i as e,o as t,t as n}from"./rolldown-runtime-C0FnF6B9.js";import{a as r,o as i}from"./country-gzpb8V1n.js";import{n as a,r as o,t as s}from"./apm-utils-CiVaR-i6.js";import{t as c}from"./i18n-BHr0cF6m.js";var l=n(((t,n)=>{(function(e){if(typeof t==`object`&&n!==void 0)n.exports=e();else if(typeof define==`function`&&define.amd)define([],e);else{var r=typeof window<`u`?window:typeof globalThis<`u`?globalThis:typeof self<`u`?self:this;(r.braintree||={}).googlePayment=e()}})(function(){var t;return(function(){function t(n,r,i){function a(s,c){if(!r[s]){if(!n[s]){var l=typeof e==`function`&&e;if(!c&&l)return l(s,!0);if(o)return o(s,!0);var u=Error(`Cannot find module '`+s+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=r[s]={exports:{}};n[s][0].call(d.exports,function(e){var t=n[s][1][e];return a(t||e)},d,d.exports,t,n,r,i)}return r[s].exports}for(var o=typeof e==`function`&&e,s=0;s<i.length;s++)a(i[s]);return a}return t})()({1:[function(e,t,n){var r={};function i(e){var t,n=JSON.stringify(e);if(!e.forceScriptReload&&(t=r[n],t))return t;var i=document.createElement(`script`),a=e.dataAttributes||{},o=e.container||document.head;return i.src=e.src,i.id=e.id||``,i.async=!0,e.type&&i.setAttribute(`type`,`${e.type}`),e.crossorigin&&i.setAttribute(`crossorigin`,`${e.crossorigin}`),e.integrity&&i.setAttribute(`integrity`,`${e.integrity}`),Object.keys(a).forEach(function(e){i.setAttribute(`data-${e}`,`${a[e]}`)}),t=new Promise(function(t,n){i.addEventListener(`load`,function(){t(i)}),i.addEventListener(`error`,function(){n(Error(`${e.src} failed to load.`))}),i.addEventListener(`abort`,function(){n(Error(`${e.src} has aborted.`))}),o.appendChild(i)}),r[n]=t,t}i.clearCache=function(){r={}},t.exports=i},{}],2:[function(e,t,n){t.exports=e(`./dist/load-script`)},{"./dist/load-script":1}],3:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});function r(e){return function(){var t=[...arguments];setTimeout(function(){try{e.apply(void 0,t)}catch(e){console.log(`Error in callback function`),console.log(e)}},1)}}n.deferred=r},{}],4:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});function r(e){var t=!1;return function(){var n=[...arguments];t||(t=!0,e.apply(void 0,n))}}n.once=r},{}],5:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});function r(e,t){if(!t)return e;e.then(function(e){return t(null,e)}).catch(function(e){return t(e)})}n.promiseOrCallback=r},{}],6:[function(e,t,n){var r=e(`./lib/deferred`),i=e(`./lib/once`),a=e(`./lib/promise-or-callback`);function o(e){return function(){var t=[...arguments],n;return typeof t[t.length-1]==`function`&&(n=t.pop(),n=i.once(r.deferred(n))),a.promiseOrCallback(e.apply(this,t),n)}}o.wrapPrototype=function(e,t){t===void 0&&(t={});var n=t.ignoreMethods||[],r=t.transformPrivateMethods===!0;return Object.getOwnPropertyNames(e.prototype).filter(function(t){var i,a=t!==`constructor`&&typeof e.prototype[t]==`function`,o=n.indexOf(t)===-1;return i=r?!0:t.charAt(0)!==`_`,a&&i&&o}).forEach(function(t){var n=e.prototype[t];e.prototype[t]=o(n)}),e},t.exports=o},{"./lib/deferred":3,"./lib/once":4,"./lib/promise-or-callback":5}],7:[function(e,n,r){(function(e,i){typeof r==`object`&&n!==void 0?i(r):typeof t==`function`&&t.amd?t([`exports`],i):(e=typeof globalThis<`u`?globalThis:e||self,i(e.loadAxo={}))})(this,(function(e){function t(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function n(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>
10&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}var r={},i={};function a(e){var t,n=JSON.stringify(e);if(!e.forceScriptReload&&(t=i[n],t))return t;var r=document.createElement(`script`),a=e.dataAttributes||{},o=e.container||document.head;return r.src=e.src,r.id=e.id||``,r.async=!0,e.type&&r.setAttribute(`type`,`${e.type}`),e.crossorigin&&r.setAttribute(`crossorigin`,`${e.crossorigin}`),Object.keys(a).forEach(function(e){r.setAttribute(`data-${e}`,`${a[e]}`)}),t=new Promise(function(t,n){r.addEventListener(`load`,function(){t(r)}),r.addEventListener(`error`,function(){n(Error(`${e.src} failed to load.`))}),r.addEventListener(`abort`,function(){n(Error(`${e.src} has aborted.`))}),o.appendChild(r)}),i[n]=t,t}a.clearCache=function(){i={}};var o=a,s=function(e){var t=document.querySelector(`link[href="${e.href}"]`);if(t)return Promise.resolve(t);t=document.createElement(`link`);var n=e.container||document.head;return t.setAttribute(`rel`,`stylesheet`),t.setAttribute(`type`,`text/css`),t.setAttribute(`href`,e.href),t.setAttribute(`id`,e.id),n.firstChild?n.insertBefore(t,n.firstChild):n.appendChild(t),Promise.resolve(t)};Object.defineProperty(r,"__esModule",{value:!0}),r.loadStylesheet=c=r.loadScript=void 0;var c=r.loadScript=o;r.loadStylesheet=s;var l=`https://www.paypalobjects.com`,u={minified:`axo.min`,unminified:`axo`},d=`fastlane`,f=`connect-boba`,p={AXO_ASSET_NAME:u,AXO_ASSET_PATH:f,LOCALE_PATH:`${f}/locales/`,CDNX_PROD:l},m={BT:`BT`,PPCP:`PPCP`};function h(){return typeof window.define==`function`&&!!window.define.amd}function g(){return h()&&typeof window.requirejs==`function`&&typeof window.requirejs.config==`function`}function _(e,r,i){return i===void 0&&(i=!0),t(this,void 0,void 0,function(){var t,a;return n(this,function(n){if(t=y(),t&&t[e.module]){if(r&&t[e.module]?.VERSION!==r)throw a=t[e.module]?.VERSION,Error(`${e.module} already loaded with version ${a} cannot load version ${r}`);return[2,!0]}if(!r)throw Error(`Attempted to load ${e.module} without specifying version`);return[2,v(e,r,i)]})})}function v(e,t,n){if(n===void 0&&(n=!0),h()){var r=n?e.amdModule.minified:e.amdModule.unminified;return new Promise(function(e,t){window.require([r],e,t)})}var i=n?e.script.minified:e.script.unminified;return c({id:`${e.id}-${t}`,src:`https://js.braintreegateway.com/web/${t}/js/${i}`})}function y(){return window==null?void 0:window.braintree}var b,x,S={Client:`client`,HostedCardFields:`hostedFields`},C=`braintree`,w=(b={},b[S.Client]=`client`,b[S.HostedCardFields]=`hosted-fields`,b),T=(x={},x[S.Client]={id:`client`,module:S.Client,amdModule:{unminified:`${C}/${w[S.Client]}`,minified:`${C}/${w[S.Client]}.min`},script:{unminified:`${w[S.Client]}.js`,minified:`${w[S.Client]}.min.js`}},x[S.HostedCardFields]={id:`hcf`,module:S.HostedCardFields,amdModule:{unminified:`${C}/${w[S.HostedCardFields]}`,minified:`${C}/${w[S.HostedCardFields]}.min`},script:{unminified:`${w[S.HostedCardFields]}.js`,minified:`${w[S.HostedCardFields]}.min.js`}},x);function E(e){return t(this,void 0,void 0,function(){var t,r,i,a;return n(this,function(n){switch(n.label){case 0:return performance.mark(`pp_axo_sdk_init_invoked`),t=e.btSdkVersion,r=e.minified,i=k(e),a=A(e),e.platform===m.BT?[4,Promise.all([_(T.hostedFields,t,r),D(i,r)])]:[3,2];case 1:return n.sent(),[3,5];case 2:return e.platform===m.PPCP?[4,Promise.all([_(T.client,t,r),_(T.hostedFields,t,r),D(i,r)])]:[3,4];case 3:return n.sent(),[3,5];case 4:throw Error(`unsupported axo platform`);case 5:return[2,{metadata:{localeUrl:a}}]}})})}function D(e,t){var n;if(t===void 0&&(t=!0),h()){g()&&requirejs.config({paths:(n={},n[d]=e,n)});var r=`${d}/${t?p.AXO_ASSET_NAME.minified:p.AXO_ASSET_NAME.unminified}`;return new Promise(function(e,t){window.require([r],e,t)})}return c({id:`axo-id`,src:e,forceScriptReload:!0})}function O(e){var t=e.assetUrl,n=e.bundleId;return n?`https://cdn-${n}.static.engineering.dev.paypalinc.com/${t}`:`${p.CDNX_PROD}/${t}`}function k(e){var t=e?.minified===!1?p.AXO_ASSET_NAME.unminified:p.AXO_ASSET_NAME.minified;return O({assetUrl:h()?p.AXO_ASSET_PATH:`${p.AXO_ASSET_PATH}/${t}.js`,bundleId:e?.metadata?.bundleIdOverride})}function A(e){return O({assetUrl:p.LOCALE_PATH,bundleId:e?.metadata?.bundleIdOverride})}e.constants=p,e.loadAxo=E}))},{}],8:[function(e,t,n){var r=e(`../lib/braintree-error`);t.exports={GOOGLE_PAYMENT_NOT_ENABLED:{type:r.types.MERCHANT,code:`GOOGLE_PAYMENT_NOT_ENABLED`,message:`Google Pay is not enabled for this merchant.`}
1,GOOGLE_PAYMENT_GATEWAY_ERROR:{code:`GOOGLE_PAYMENT_GATEWAY_ERROR`,message:`There was an error when tokenizing the Google Pay payment method.`,type:r.types.UNKNOWN},GOOGLE_PAYMENT_UNSUPPORTED_VERSION:{code:`GOOGLE_PAYMENT_UNSUPPORTED_VERSION`,type:r.types.MERCHANT}}},{"../lib/braintree-error":16}],9:[function(e,t,n){var r=e(`../lib/analytics`),i=e(`../lib/assign`).assign,a=e(`../lib/convert-methods-to-error`),o=e(`../lib/find`),s=e(`../lib/generate-google-pay-configuration`),c=e(`../lib/braintree-error`),l=e(`./errors`),u=e(`../lib/methods`),d=e(`@braintree/wrap-promise`),f={1:`_createV1PaymentDataRequest`,2:`_createV2PaymentDataRequest`};function p(e){if(this._createPromise=e.createPromise,this._client=e.client,this._useDeferredClient=e.useDeferredClient,this._googlePayVersion=e.googlePayVersion||1,this._googleMerchantId=e.googleMerchantId,this._isUnsupportedGooglePayAPIVersion())throw new c({code:l.GOOGLE_PAYMENT_UNSUPPORTED_VERSION.code,message:`The Braintree SDK does not support Google Pay version `+this._googlePayVersion+`. Please upgrade the version of your Braintree SDK and contact support if this error persists.`,type:l.GOOGLE_PAYMENT_UNSUPPORTED_VERSION.type})}p.prototype._waitForClient=function(){return this._client?Promise.resolve():this._createPromise.then(function(e){this._client=e}.bind(this))},p.prototype._isUnsupportedGooglePayAPIVersion=function(){return!(this._googlePayVersion in f)},p.prototype._getDefaultConfig=function(){return this._defaultConfig||=s(this._client.getConfiguration(),this._googlePayVersion,this._googleMerchantId),this._defaultConfig},p.prototype._createV1PaymentDataRequest=function(e){var t=this._getDefaultConfig(),n=e.cardRequirements&&e.cardRequirements.allowedCardNetworks,r=t.cardRequirements.allowedCardNetworks,a=n||r;return e=i({},t,e),e.cardRequirements.allowedCardNetworks=a,e},p.prototype._createV2PaymentDataRequest=function(e){var t=this._getDefaultConfig();return e.allowedPaymentMethods&&e.allowedPaymentMethods.forEach(function(e){var n=o(t.allowedPaymentMethods,`type`,e.type);n&&m(e,n)}),e=i({},t,e),e},p.prototype.createPaymentDataRequest=function(e){return this._useDeferredClient?this._waitForClient().then(function(){return this._createPaymentDataRequestSyncronously(e)}.bind(this)):this._createPaymentDataRequestSyncronously(e)},p.prototype._createPaymentDataRequestSyncronously=function(e){var t=i({},e),n=this._googlePayVersion,a=f[n];return t.transactionInfo&&t.transactionInfo.totalPrice&&(t.transactionInfo.totalPrice=t.transactionInfo.totalPrice.toString()),r.sendEvent(this._createPromise,`google-payment.v`+n+`.createPaymentDataRequest`),this[a](t)},p.prototype.parseResponse=function(e){var t=this;return Promise.resolve().then(function(){var n,i=e.apiVersion===2?e.paymentMethodData.tokenizationData.token:e.paymentMethodToken.token,a=JSON.parse(i),o=a.error;return o?Promise.reject(o):(r.sendEvent(t._createPromise,`google-payment.parseResponse.succeeded`),a.paypalAccounts?(n=a.paypalAccounts[0],r.sendEvent(t._createPromise,`google-payment.parseResponse.succeeded.paypal`),Promise.resolve({nonce:n.nonce,type:n.type,description:n.description})):(n=a.androidPayCards[0],r.sendEvent(t._createPromise,`google-payment.parseResponse.succeeded.google-payment`),Promise.resolve({nonce:n.nonce,type:n.type,description:n.description,details:{cardType:n.details.cardType,lastFour:n.details.lastFour,lastTwo:n.details.lastTwo,isNetworkTokenized:n.details.isNetworkTokenized,bin:n.details.bin},binData:n.binData})))}).catch(function(e){return r.sendEvent(t._createPromise,`google-payment.parseResponse.failed`),Promise.reject(new c({code:l.GOOGLE_PAYMENT_GATEWAY_ERROR.code,message:l.GOOGLE_PAYMENT_GATEWAY_ERROR.message,type:l.GOOGLE_PAYMENT_GATEWAY_ERROR.type,details:{originalError:e}}))})},p.prototype.teardown=function(){return a(this,u(p.prototype)),Promise.resolve()};function m(e,t){Object.keys(t).forEach(function(n){e[n]=typeof t[n]==`object`?i({},t[n],e[n]):e[n]||t[n]})}t.exports=d.wrapPrototype(p)},{"../lib/analytics":12,"../lib/assign":14,"../lib/braintree-error":16,"../lib/convert-methods-to-error":18,"../lib/find":24,"../lib/generate-google-pay-configuration":25,"../lib/methods":27,"./errors":8,"@braintree/wrap-promise":6}],10:[function(e,t,n){var r=e(`./google-payment`),i=e(`../lib/braintree-error`),a=e(`../lib/create-assets-url`),o=e(`../lib/create-deferred-client`),s=e(`../lib/basic-component-verification`),c=e(`@braintree/wrap-promise`),l=`3.138.0`,u=e(`./errors`);function d(e){var t=`Google Pay`;return s.verify({name:t,client:e.client,authorization:e.authorization}).then(function(){var n=o.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:a.create(e.authorization),name:t}).then(function(t){var n=t.getConfiguration();return e.client=t,n.gatewayConfiguration.androidPay?t:Promise.reject(new i(u.GOOGLE_PAYMENT_NOT_ENABLED))}),s;return e.createPromise=n,s=new r(e),e.useDeferredClient?s:n.then(function(e){return s._client=e,s})})}t.exports={create:c(d),VERSION:l}},{"../lib/basic-component-verification":15,"../lib/braintree-error":16,"../lib/create-assets-url":19,"../lib/create-deferred-client":21,"./errors":8,"./google-payment":9,"@braintree/wrap-promise":6}],11:[function(e,t,n){var r=e(`./create-authorization-data`),i=e(`./json-clone`),a=e(`./constants`);function o(e,t){var n,o=t?i(t):{},s=r(e.authorization).attrs,c=i(e.analyticsMetadata);for(n in o.braintreeLibraryVersion=a.BRAINTREE_LIBRARY_VERSION,o._meta)o._meta.hasOwnProperty(n)&&(c[n]=o._meta[n]);return o._meta=c,s.tokenizationKey?o.tokenizationKey=s.tokenizationKey:o.authorizationFingerprint=s.authorizationFingerprint,o}function s(e){var t=e.getConfiguration(),n=r(t.authorization).attrs,i=t.gatewayConfiguration.environment===`production`,o={api_integration_type:t.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:a.VERSION,component:`braintreeclientsdk`,merchant_sdk_env:i?`production`:`sandbox`,merchant_id:t.gatewayConfiguration.merchantId,event_source:`web`,platform:a.PLATFORM,platform_version:window.navigator.userAgent,session_id:t.analyticsMetadata.sessionId,client_session_id:t.analyticsMetadata.sessionId,tenant_name:`braintree`,product_name:`BT_DCC`,space_key:`SKDUYK`};return n.tokenizationKey?o.tokenization_key=n.tokenizationKey:o.auth_fingerprint=n.authorizationFingerprint,o}t.exports={addMetadata:o,addEventMetadata:s}},{"./constants":17,"./create-authorization-data":20,"./json-clone":26}],12:[function(e,t,n){var r=e(`./constants`),i=e(`./add-metadata`),a=e(`./assign`).assign;function o(e,t,n){return s(e,t,{},n)}function s(e,t,n,o){var s=Date.now();return n.flow===`vault`?n.context_type=`BA_Token`:n.flow===`checkout`&&(n.context_type=`EC_Token`),Promise.resolve(e).then(function(e){var l=e._request,u=r.ANALYTICS_URL,d=r.ANALYTICS_PREFIX+t,f
1=e.getConfiguration().gatewayConfiguration.environment===`production`,p={events:[],tracking:[]},m=i.addEventMetadata(e,p);return m.event_name=d,m.t=s,p.events=[{level:`info`,event:d,payload:a({env:f?`production`:`sandbox`,timestamp:s},n)}],p.tracking=[m],n&&typeof n==`object`&&(p.tracking=[c(m,n)]),l({url:u,method:`post`,data:p,timeout:r.ANALYTICS_REQUEST_TIMEOUT_MS},o)}).catch(function(e){o&&o(e)})}function c(e,t){var n={},i=a({},t);return Object.keys(i).forEach(function(e){r.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(e)===-1&&delete i[e]}),n=a(e,i),n}t.exports={sendEvent:o,sendEventPlus:s}},{"./add-metadata":11,"./assign":14,"./constants":17}],13:[function(e,t,n){t.exports={loadScript:e(`@braintree/asset-loader/load-script`),loadFastlane:e(`@paypal/accelerated-checkout-loader`).loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":7}],14:[function(e,t,n){var r=typeof Object.assign==`function`?Object.assign:i;function i(e){for(var t=1,n,r;t<arguments.length;t++)for(r in n=arguments[t],n)n.hasOwnProperty(r)&&(e[r]=n[r]);return e}t.exports={assign:r,_assign:i}},{}],15:[function(e,t,n){var r=e(`./braintree-error`),i=e(`./errors`),a=`3.138.0`;function o(e){var t,n,o;return e?(o=e.name,t=e.client,n=e.authorization,!t&&!n?Promise.reject(new r({type:i.INSTANTIATION_OPTION_REQUIRED.type,code:i.INSTANTIATION_OPTION_REQUIRED.code,message:`options.client is required when instantiating `+o+`.`})):!n&&t.getVersion()!==a?Promise.reject(new r({type:i.INCOMPATIBLE_VERSIONS.type,code:i.INCOMPATIBLE_VERSIONS.code,message:`Client (version `+t.getVersion()+`) and `+o+` (version `+a+`) components must be from the same SDK version.`})):Promise.resolve()):Promise.reject(new r({type:i.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:i.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:`Options must be passed to basicComponentVerification function.`}))}t.exports={verify:o}},{"./braintree-error":16,"./errors":23}],16:[function(e,t,n){var r=e(`./enumerate`);function i(e){if(!i.types.hasOwnProperty(e.type))throw Error(e.type+` is not a valid type.`);if(!e.code)throw Error(`Error code required.`);if(!e.message)throw Error(`Error message required.`);this.name=`BraintreeError`,this.code=e.code,this.message=e.message,this.type=e.type,this.details=e.details}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.types=r([`CUSTOMER`,`MERCHANT`,`NETWORK`,`INTERNAL`,`UNKNOWN`]),i.findRootError=function(e){return e instanceof i&&e.details&&e.details.originalError?i.findRootError(e.details.originalError):e},t.exports=i},{"./enumerate":22}],17:[function(e,t,n){var r=`3.138.0`,i=`web`;t.exports={ANALYTICS_PREFIX:i+`.`,ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:`https://www.paypal.com/xoplatform/logger/api/logger`,ASSETS_URLS:{production:`https://assets.braintreegateway.com`,sandbox:`https://assets.braintreegateway.com`},CLIENT_API_URLS:{production:`https://api.braintreegateway.com:443`,sandbox:`https://api.sandbox.braintreegateway.com:443`},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:{production:`https://payments.braintree-api.com/graphql`,sandbox:`https://payments.sandbox.braintree-api.com/graphql`},INTEGRATION_TIMEOUT_MS:6e4,VERSION:r,INTEGRATION:`custom`,SOURCE:`client`,PLATFORM:i,BRAINTREE_LIBRARY_VERSION:`braintree/`+i+`/`+r,ALLOWED_EXTRA_EVENT_FIELDS:[`context_id`,`context_type`,`payment_ready_button_order`,`payment_ready_experiment_type`,`payment_ready_page_type`,`payment_ready_session_id`,`button_type`,`connectionStartTime`,`domain`,`endpoint`,`endTime`,`requestStartTime`,`startTime`]}},{}],18:[function(e,t,n){var r=e(`./braintree-error`),i=e(`./errors`);t.exports=function(e,t){t.forEach(function(t){e[t]=function(){throw new r({type:i.METHOD_CALLED_AFTER_TEARDOWN.type,code:i.METHOD_CALLED_AFTER_TEARDOWN.code,message:t+` cannot be called after teardown.`})}})}},{"./braintree-error":16,"./errors":23}],19:[function(e,t,n){var r=e(`./constants`).ASSETS_URLS;function i(e){return r.production}t.exports={create:i}},{"./constants":17}],20:[function(e,t,n){var r=e(`../lib/vendor/polyfill`).atob,i=e(`../lib/constants`).CLIENT_API_URLS;function a(e){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(e)}function o(e){var t=e.split(`_`),n=t[0];return{merchantId:t.slice(2).join(`_`),environment:n}}function s(e){var t,n,s={attrs:{},configUrl:``};return a(e)?(n=o(e),s.environment=n.environment,s.attrs.tokenizationKey=e,s.configUrl=i[n.environment]+`/merchants/`+n.merchantId+`/client_api/v1/configuration`):(t=JSON.parse(r(e)),s.environment=t.environment,s.attrs.authorizationFingerprint=t.authorizationFingerprint,s.configUrl=t.configUrl,s.graphQL=t.graphQL),s}t.exports=s},{"../lib/constants":17,"../lib/vendor/polyfill":28}],21:[function(e,t,n){var r=e(`./braintree-error`),i=e(`./assets`),a=e(`./errors`),o=`3.138.0`;function s(e){var t=Promise.resolve();return e.client?Promise.resolve(e.client):(window.braintree&&window.braintree.client||(t=i.loadScript({src:e.assetsUrl+`/web/`+o+`/js/client.min.js`}).catch(function(e){return Promise.reject(new r({type:a.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:a.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:a.CLIENT_SCRIPT_FAILED_TO_LOAD.message,details:{originalError:e}}))}
1)),t.then(function(){return window.braintree.client.VERSION===o?window.braintree.client.create({authorization:e.authorization,debug:e.debug}):Promise.reject(new r({type:a.INCOMPATIBLE_VERSIONS.type,code:a.INCOMPATIBLE_VERSIONS.code,message:`Client (version `+window.braintree.client.VERSION+`) and `+e.name+` (version `+o+`) components must be from the same SDK version.`}))}))}t.exports={create:s}},{"./assets":13,"./braintree-error":16,"./errors":23}],22:[function(e,t,n){function r(e,t){return t??=``,e.reduce(function(e,n){return e[n]=t+n,e},{})}t.exports=r},{}],23:[function(e,t,n){var r=e(`./braintree-error`);t.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:r.types.INTERNAL,code:`INVALID_USE_OF_INTERNAL_FUNCTION`},INSTANTIATION_OPTION_REQUIRED:{type:r.types.MERCHANT,code:`INSTANTIATION_OPTION_REQUIRED`},INCOMPATIBLE_VERSIONS:{type:r.types.MERCHANT,code:`INCOMPATIBLE_VERSIONS`},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:r.types.NETWORK,code:`CLIENT_SCRIPT_FAILED_TO_LOAD`,message:`Braintree client script could not be loaded.`},METHOD_CALLED_AFTER_TEARDOWN:{type:r.types.MERCHANT,code:`METHOD_CALLED_AFTER_TEARDOWN`},INSTANTIATION_OPTION_INVALID:{type:r.types.MERCHANT,code:`INSTANTIATION_OPTION_INVALID`}}},{"./braintree-error":16}],24:[function(e,t,n){t.exports=function(e,t,n){for(var r=0;r<e.length;r++)if(e[r].hasOwnProperty(t)&&e[r][t]===n)return e[r];return null}},{}],25:[function(e,t,n){var r=`3.138.0`,i=e(`./assign`).assign;function a(e,t){var n=e.analyticsMetadata;return i({},{gateway:`braintree`,"braintree:merchantId":e.gatewayConfiguration.merchantId,"braintree:apiVersion":`v1`,"braintree:sdkVersion":r,"braintree:metadata":JSON.stringify({source:n.source,integration:n.integration,sessionId:n.sessionId,version:r,platform:n.platform})},t)}t.exports=function(e,t,n){var r,i,o=e.gatewayConfiguration.androidPay,s=e.gatewayConfiguration.environment===`production`?`PRODUCTION`:`TEST`;return t===2?(r={apiVersion:2,apiVersionMinor:0,environment:s,allowedPaymentMethods:[{type:`CARD`,parameters:{allowedAuthMethods:[`PAN_ONLY`,`CRYPTOGRAM_3DS`],allowedCardNetworks:o.supportedNetworks.map(function(e){return e.toUpperCase()})},tokenizationSpecification:{type:`PAYMENT_GATEWAY`,parameters:a(e,{"braintree:authorizationFingerprint":o.googleAuthorizationFingerprint})}}]},n&&(r.merchantInfo={merchantId:n}),o.paypalClientId&&(i={type:`PAYPAL`,parameters:{purchase_context:{purchase_units:[{payee:{client_id:o.paypalClientId},recurring_payment:!0}]}},tokenizationSpecification:{type:`PAYMENT_GATEWAY`,parameters:a(e,{"braintree:paypalClientId":o.paypalClientId})}},r.allowedPaymentMethods.push(i))):(r={environment:s,allowedPaymentMethods:[`CARD`,`TOKENIZED_CARD`],paymentMethodTokenizationParameters:{tokenizationType:`PAYMENT_GATEWAY`,parameters:a(e,{"braintree:authorizationFingerprint":o.googleAuthorizationFingerprint})},cardRequirements:{allowedCardNetworks:o.supportedNetworks.map(function(e){return e.toUpperCase()})}},e.authorizationType===`TOKENIZATION_KEY`&&(r.paymentMethodTokenizationParameters.parameters[`braintree:clientKey`]=e.authorization),n&&(r.merchantId=n),t&&(r.apiVersion=t)),r}},{"./assign":14}],26:[function(e,t,n){t.exports=function(e){return JSON.parse(JSON.stringify(e))}},{}],27:[function(e,t,n){t.exports=function(e){return Object.keys(e).filter(function(t){return typeof e[t]==`function`})}},{}],28:[function(e,t,n){var r=typeof atob==`function`?atob:i;function i(e){var t,n,r,i,a,o,s,c,l=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/,u=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,d=``;if(!l.test(e))throw Error(`Non base64 encoded input passed to window.atob polyfill`);c=0;do i=u.indexOf(e.charAt(c++)),a=u.indexOf(e.charAt(c++)),o=u.indexOf(e.charAt(c++)),s=u.indexOf(e.charAt(c++)),t=(i&63)<<2|a>>4&3,n=(a&15)<<4|o>>2&15,r=(o&3)<<6|s&63,d+=String.fromCharCode(t)+(n?String.fromCharCode(n):``)+(r?String.fromCharCode(r):``);while(c<e.length);return d}t.exports={atob:function(e){return r.call(window,e)},_atob:i}},{}]},{},[10])(10)})})),u=t(i(),1),d=t(l(),1),f=t(r(),1),p=()=>new Promise((e,t)=>
1{if(window.google?.payments?.api?.PaymentsClient){e();return}let n=document.createElement(`script`);n.src=`https://pay.google.com/gp/p/js/pay.js`,n.async=!0,n.onload=e,n.onerror=t,document.head.appendChild(n)}),m=async function(){let e=document.getElementById(`google-pay-config`);if(!e){o(`googlePay`,!1);return}let t=JSON.parse(e.innerHTML),n=t.totalAmount,r=t.clientTokenUrl,i=document.getElementById(`google-pay-button`),l=document.getElementById(`google-pay-form`),m=document.getElementById(`google_pay_payment_method_nonce`),h=document.getElementById(`google_pay_device_data`),g=document.getElementById(`google_pay_billing_address`);if(!i||!l)return;try{await p()}catch(e){console.error(`Error loading Google Pay script:`,e);return}let _=new google.payments.api.PaymentsClient({environment:t.environment||`TEST`});s(i);let v;try{v=(await(await fetch(r)).json()).clientToken}catch(e){console.error(`Error fetching client token:`,e);return}u.default.create({authorization:v},function(e,r){if(e){console.error(`Error creating Braintree client:`,e);return}let s=``;f.default.create({client:r},function(e,t){if(e){console.error(`Error creating data collector:`,e);return}s=t.deviceData});let u={client:r,googlePayVersion:2};t.googleMerchantId&&t.googleMerchantId.trim()!==``&&(u.googleMerchantId=t.googleMerchantId),d.default.create(u,function(e,t){if(e){console.error(`Error creating Google Payment instance:`,e);return}_.isReadyToPay({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:t.createPaymentDataRequest().allowedPaymentMethods,existingPaymentMethodRequired:!0}).then(function(e){if(!e.result){console.log(`Google Pay is not available`),o(`googlePay`,!1);return}l.style.display=`inline-block`;let r=document.getElementById(`payment-button-skeletons`);r&&(r.style.display=`none`),o(`googlePay`,!0),i.addEventListener(`keydown`,function(e){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i.click())}),i.addEventListener(`click`,function(e){e.preventDefault();let r=document.getElementById(`cart-terms-checkbox`);if(r&&!r.checked){alert(c(`js.billing.accept_terms`));return}if(i.hasAttribute(`disabled`))return;i.style.opacity=`0.6`,i.style.pointerEvents=`none`;let o=t.createPaymentDataRequest({transactionInfo:{currencyCode:`USD`,totalPriceStatus:`FINAL`,totalPrice:n}}),d=o.allowedPaymentMethods[0];d.parameters.billingAddressRequired=!0,d.parameters.billingAddressParameters={format:`FULL`,phoneNumberRequired:!0},o.emailRequired=!0,o.shippingAddressRequired=!1,_.loadPaymentData(o).then(function(e){t.parseResponse(e,function(t,n){if(t){console.error(`Error parsing Google Pay response:`,t),u();return}let r=e.paymentMethodData.info.billingAddress,i=r.countryCode||`US`,o=a(i,`US`),c=[r.address1||``,r.address2||``,r.address3||``].filter(e=>e.length>0),d={givenName:r.name?r.name.split(` `)[0]:``,familyName:r.name?r.name.split(` `).slice(1).join(` `):``,phoneNumber:r.phoneNumber||``,emailAddress:e.email||``,addressLines:c,locality:r.locality||``,administrativeArea:r.administrativeArea||``,postalCode:r.postalCode||``,countryCode:i,countryName:o};m.value=n.nonce,h.value=s,g.value=JSON.stringify(d),l.submit()})}).catch(function(e){e.statusCode===`CANCELED`?console.log(`User canceled Google Pay`):console.error(`Error loading payment data:`,e),u()})});function u(){i.style.opacity=`1`,i.style.pointerEvents=`auto`}}).catch(function(e){console.error(`Error checking if ready to pay:`,e)})})})};document.addEventListener(`readystatechange`,function(){document.readyState===`complete`&&m()}); 2//# sourceMappingURL=google_pay-DlK-jHGP.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.