PageSourceSearch

https://www.druckluft-fachhandel.de/theme/ab446cc6d7d87ba72f54525c…swag-paypal.smart-payment-buttons.603337.js

js druckluft-fachhandel.de collected 2026-09-24 22:54:24 UTC 23,877 bytes, 31 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[69129],{156:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function n(t,e,r){return t.concat(e).map(function(t){return i(t,r)})}function s(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,r,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var c,d,u=Array.isArray(r);return u!==Array.isArray(t)?i(r,l):u?l.arrayMerge(t,r,l):(d={},(c=l).isMergeableObject(t)&&s(t).forEach(function(e){d[e]=i(t[e],c)}),s(r).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&c.isMergeableObject(r[e])?d[e]=(function(t,e){if(!e.customMerge)return a;var r=e.customMerge(t);return"function"==typeof r?r:a})(e,c)(t[e],r[e],c):d[e]=i(r[e],c))}),d)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return a(t,r,e)},{})},t.exports=a},795:(t,e,r)=>{r.d(e,{A:()=>n});var i=r(707);class n{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!n.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===n.hasAttribute(t,e))throw Error(`The required property "${e}" does not exist!`);if("function"!=typeof t.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=e.replace(/^data(|-)/,""),o=i.A.toLowerCamelCase(s,"-");if(!n.isNode(t)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[o];if(void 0===a){if(r)throw Error(`The required data attribute "${e}" does not exist on ${t}!`);return a}return i.A.parsePrimitive(a)}static querySelector(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(r&&!1===i)throw Error(`The required element "${e}" does not exist in parent node!`);return i}static querySelectorAll(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),r&&!1===i)throw Error(`At least one item of "${e}" must exist in parent node!`);return i}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=`
2            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),
3            select:not([tabindex^="-"]):not([disabled]),
4            textarea:not([tabindex^="-"]):not([disabled]),
5            button:not([tabindex^="-"]):not([disabled]),
6            a[href]:not([tabindex^="-"]):not([disabled]),
7            [tabindex]:not([tabindex^="-"]):not([disabled])
8        `;return t.querySelectorAll(e)}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}},707:(t,e,r)=>{r.d(e,{A:()=>i});class i{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let r=i.toUpperCamelCase(t,e);return i.lcFirst(r)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>i.ucFirst(t.toLowerCase())).join(""):i.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},737:(t,e,r)=>{r.d(e,{A:()=>a});var i=r(156),n=r.n(i),s=r(707);class o{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=t.split("."),s=r.scope?e.bind(r.scope):e;if(r.once&&!0===r.once){let e=s;s=function(r){i.unsubscribe(t),e(r)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:r,cb:s}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,r)=>([...r.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):t.push(r),t),[]),!0}
8reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}}class a{constructor(t,e={},r=!1){if(!(t instanceof Node))throw Error("There is no valid element given.");this.el=t,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){throw Error(`The "init" method for the plugin "${this._pluginName}" is not defined.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),n().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=s.A.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${e}-config`);return r?window.PluginConfigManager.get(this._pluginName,r):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=s.A.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${e}-options`);if(r)try{return JSON.parse(r)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return t}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}}},68:(t,e,r)=>{r.d(e,{A:()=>i});class i{constructor(){this._request=null,this._errorHandlingInternal=!1}get(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",i=this._createPreparedRequest("GET",t,r);return this._sendRequest(i,null,e)}post(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(e,i);let n=this._createPreparedRequest("POST",t,i);return this._sendRequest(n,e,r)}delete(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(e,i);let n=this._createPreparedRequest("DELETE",t,i);return this._sendRequest(n,e,r)}patch(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(e,i);let n=this._createPreparedRequest("PATCH",t,i);return this._sendRequest(n,e,r)}
8abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(t){this._errorHandlingInternal=t}_registerOnLoaded(t,e){e&&(!0===this._errorHandlingInternal?(t.addEventListener("load",()=>{e(t.responseText,t)}),t.addEventListener("abort",()=>{console.warn(`the request to ${t.responseURL} was aborted`)}),t.addEventListener("error",()=>{console.warn(`the request to ${t.responseURL} failed with status ${t.status}`)}),t.addEventListener("timeout",()=>{console.warn(`the request to ${t.responseURL} timed out`)})):t.addEventListener("loadend",()=>{e(t.responseText,t)}))}_sendRequest(t,e,r){return this._registerOnLoaded(t,r),t.send(e),t}_getContentType(t,e){return t instanceof FormData&&(e=!1),e}_createPreparedRequest(t,e,r){return this._request=new XMLHttpRequest,this._request.open(t,e),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}}},88:(t,e,r)=>{r.d(e,{A:()=>i});class i{static serialize(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if("FORM"!==t.nodeName){if(e)throw Error("The passed element is not a form!");return{}}return new FormData(t)}static serializeJson(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=i.serialize(t,e);if(!(r instanceof FormData)&&0===Object.keys(r).length||r instanceof FormData&&0===Array.from(r.entries()).length)return{};let n={};for(let[t,e]of r.entries())n[t]=e;return n}}},724:(t,e,r)=>{r.d(e,{A:()=>s});var i=r(683);let n="element-loader-backdrop";class s extends i.A{static create(t){t.classList.add("has-element-loader"),s.exists(t)||(s.appendLoader(t),setTimeout(()=>{let e=t.querySelector(`.${n}`);e&&e.classList.add("element-loader-backdrop-open")},1))}static remove(t){t.classList.remove("has-element-loader");let e=t.querySelector(`.${n}`);e&&e.remove()}static exists(t){return t.querySelectorAll(`.${n}`).length>0}static getTemplate(){return`
9        <div class="${n}">
10            <div class="loader" role="status">
11                <span class="visually-hidden">Loading...</span>
12            </div>
13        </div>
14        `}static appendLoader(t){t.insertAdjacentHTML("beforeend",s.getTemplate())}}},683:(t,e,r)=>{r.d(e,{A:()=>s});let i="loader",n={BEFORE:"before",INNER:"inner"};class s{constructor(t,e=n.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}create(){if(!this.exists()){if(this.position===n.INNER){this.parent.innerHTML=s.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),s.getTemplate())}}remove(){this.parent.querySelectorAll(`.${i}`).forEach(t=>t.remove())}exists(){return this.parent.querySelectorAll(`.${i}`).length>0}_getPosition(){return this.position===n.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${i}" role="status">
15                    <span class="visually-hidden">Loading...</span>
16                </div>`}static SELECTOR_CLASS(){return i}}},870:(t,e,r)=>{r.d(e,{A:()=>E});var i=r(795),n=r(88),s=r(68),o=r(683);class a{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return a.isIPhoneDevice()||a.isIPadDevice()}static isNativeWindowsBrowser(){return a.isIEBrowser()||a.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":a.isTouchDevice(),"is-ios":a.isIOSDevice(),"is-native-windows":a.isNativeWindowsBrowser(),"is-iphone":a.isIPhoneDevice(),"is-ipad":a.isIPadDevice(),"is-ie":a.isIEBrowser(),"is-edge":a.isEdgeBrowser()}}}let l="modal-backdrop",c="modal-backdrop-open",d="no-scroll",u={ON_CLICK:"backdrop/onclick"};class h{constructor(){return h.instance||(h.instance=this),h.instance}create(t){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let e=document.body.lastChild;document.documentElement.classList.add(d),setTimeout(function(){e.classList.add(c),"function"==typeof t&&t()},75),this._dispatchEvents()}remove(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;
16this._getBackdrops().forEach(t=>t.classList.remove(c)),setTimeout(this._removeExistingBackdrops.bind(this),t),document.documentElement.classList.remove(d)}_dispatchEvents(){let t=a.isTouchDevice()?"touchstart":"click";document.addEventListener(t,function(t){t.target.classList.contains(l)&&document.dispatchEvent(new CustomEvent(u.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(`.${l}`)}_removeExistingBackdrops(){!1!==this._exists()&&this._getBackdrops().forEach(t=>t.remove())}_exists(){return document.querySelectorAll(`.${l}`).length>0}_getTemplate(){return`<div class="${l}"></div>`}}let p=Object.freeze(new h);class m{static create(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;p.create(t)}static remove(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;p.remove(t)}static SELECTOR_CLASS(){return l}}class g extends o.A{constructor(){super(document.body)}create(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!this.exists()&&t&&(m.create(),document.querySelector(`.${m.SELECTOR_CLASS()}`).insertAdjacentHTML("beforeend",o.A.getTemplate()))}remove(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];super.remove(),t&&m.remove()}}let f=Object.freeze(new g);class b{static create(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];f.create(t)}static remove(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];f.remove(t)}}var v=r(198),y=r(724);class E extends v.A{static #t=this.product="spb";static #e=this.options={...super.options,orderId:null,confirmOrderFormSelector:"#confirmOrderForm",confirmOrderButtonSelector:'button[type="submit"]',preventErrorReload:!1,brandName:"",isCheckout:!0};init(){if(this.confirmOrderForm=i.A.querySelector(document,this.options.confirmOrderFormSelector),this.options.preventErrorReload){i.A.querySelector(this.confirmOrderForm,this.options.confirmOrderButtonSelector).disabled="disabled";return}y.A.create(this.el),i.A.querySelector(this.confirmOrderForm,this.options.confirmOrderButtonSelector).classList.add("d-none"),this._client=new s.A,this.createScript(async t=>{try{await this.render(t)}catch(t){this.handleError(this.SCRIPT_ERROR,!0,t)}y.A.remove(this.el)})}render(t){let e=t.Buttons(this.getButtonConfig(this.getFundingSource(t)));if(!e.isEligible())return void this.handleError(this.NOT_ELIGIBLE,!0,`Funding for PayPal button is not eligible (${this.getFundingSource(t)})`);e.render(this.el)}getFundingSource(t){return t.FUNDING.PAYPAL}getButtonConfig(t){return{fundingSource:t,style:{size:this.options.buttonSize,shape:this.options.buttonShape,color:this.options.buttonColor,label:"pay"},createOrder:this.createOrder.bind(this,this.constructor.product),onApprove:this.onApprove.bind(this),onCancel:this.onCancel.bind(this),onClick:this.onClick.bind(this),onError:this.onError.bind(this)}}createOrder(t){let e=n.A.serialize(this.confirmOrderForm);e.set("product",t);let r=this.options.orderId;return null!==r&&e.set("orderId",r),new Promise((t,r)=>{this._client.post(this.options.createOrderUrl,e,(e,i)=>{i.status>=400&&r(e);try{let r=JSON.parse(e);t(r.token)}catch(t){r(t)}})})}onApprove(t){if(this.confirmOrderForm.querySelector('[name="paypalOrderId"]'))return;b.create();let e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name","paypalOrderId"),e.setAttribute("value",t.orderID??t.orderId),this.confirmOrderForm.appendChild(e),this.confirmOrderForm.submit()}onClick(t,e){return this.confirmOrderForm.reportValidity()?e.resolve():e.reject()}}},129:(t,e,r)=>{r.r(e),r.d(e,{default:()=>n});var i=r(870);class n extends i.A{static #t=this.options={...super.options,buttonColor:"gold"};getFundingSource(){}}},198:(t,e,r)=>{r.d(e,{A:()=>n});var i=r(310);class n extends i.A{static #t=this.options={...super.options,buttonColor:null,buttonShape:"sharp",buttonSize:"small",createOrderUrl:"",handleErrorUrl:""};handleError(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r instanceof Error&&(r=String(r)),r&&"string"!=typeof r&&(r=JSON.stringify(r));let i=this._extractErrorCode(r);if(i&&(t=i),!this.options.handleErrorUrl){console.error(`PayPal ${e?"fatal ":""}error occurred: ${t} - ${String(r??"")}`);return}let n=!!this.options.isCheckout;this._client.post(this.options.handleErrorUrl,JSON.stringify({code:t,error:r,fatal:e,isCheckout:n}),()=>{this.onErrorHandled(t,e,r,n)})}onErrorHandled(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];i&&(window.scrollTo(0,0),window.location.reload())}onFatalError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.handleError(this.GENERIC_ERROR,!0,t)}onError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.handleError(this.GENERIC_ERROR,!1,t)}onCancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.handleError(this.USER_CANCELLED,!1,t)}_extractErrorCode(t){try{let e=JSON.parse(t)?.errors;if(!Array.isArray(e))return null;for(let t of e)if("object"==typeof t&&"string"==typeof t.code)return t.code}catch{}return null}constructor(...t){super(...t),this.GENERIC_ERROR="SWAG_PAYPAL__GENERIC_ERROR",this.NOT_ELIGIBLE="SWAG_PAYPAL__NOT_ELIGIBLE",this.USER_CANCELLED="SWAG_PAYPAL__USER_CANCELLED",this.BROWSER_UNSUPPORTED="SWAG_PAYPAL__BROWSER_UNSUPPORTED",this.SCRIPT_ERROR="SWAG_PAYPAL__SCRIPT_ERROR",this.SCRIPT_NOT_LOADED="SWAG_PAYPAL__SCRIPT_NOT_LOADED"}}},310:(t,e,r)=>{r.d(e,{A:()=>a});var i=r(737);function n(t,e){void 0===e&&(e={});var r=document.createElement("script");return r.src=t,Object.keys(e).forEach(function(t){r.setAttribute(t,e[t]),"data-csp-nonce"===t&&r.setAttribute("nonce",e["data-csp-nonce"])}),r}function s(t,e){if("object"!=typeof t||null===t)throw Error("Expected an options object.");var r=t.environment;if(r&&"production"!==r&&"sandbox"!==r)throw Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==e&&"function"!=typeof e)throw Error("Expected PromisePonyfill to be a function.")}"function"==typeof SuppressedError&&SuppressedError;let o=["card","bancontact","blik","eps","giropay","ideal","mybank","p24","sepa","sofort","venmo"];class a extends i.A{static #t=this.options={clientId:"",clientToken:"",merchantPayerId:"",partnerAttributionId:"",currency:"EUR",intent:"capture",commit:!0,languageIso:"en_GB",showPayLater
16:!0,useAlternativePaymentMethods:!0,disabledAlternativePaymentMethods:[],userIdToken:null,scriptAwaitVisibility:!1,partOfDomContentLoading:!0};static #e=this.scriptPromises={};static #r=this.paypal={};_init(){this.options.partOfDomContentLoading||"complete"===document.readyState?super._init():window.addEventListener("load",()=>{super._init()})}get scriptOptionsHash(){return JSON.stringify(this.getScriptOptions())}async createScript(t){a.scriptPromises[this.scriptOptionsHash]??=this._loadScript();let e=async()=>{t(await a.scriptPromises[this.scriptOptionsHash])};this.options.scriptAwaitVisibility?await this._awaitVisibility(e):await e()}async _awaitVisibility(t){let e=new IntersectionObserver(r=>{let[i]=r;i.isIntersecting&&(e.disconnect(),t())},{rootMargin:"200px"});e.observe(this.el)}async _loadScript(){return a.paypal[this.scriptOptionsHash]=await function(t,e){if(void 0===e&&(e=Promise),s(t,e),"undefined"==typeof document)return e.resolve(null);var r,i,o,a,l,c,d,u,h=(i=t.sdkBaseUrl,o=t.environment,a=/*!
17 * paypal-js v9.3.0 (2026-02-20T21:23:36.751Z)
18 * Copyright 2020-present, PayPal, Inc. All rights reserved.
19 *
20 * Licensed under the Apache License, Version 2.0 (the "License");
21 * you may not use this file except in compliance with the License.
22 * You may obtain a copy of the License at
23 *
24 * http://www.apache.org/licenses/LICENSE-2.0
25 *
26 * Unless required by applicable law or agreed to in writing, software
27 * distributed under the License is distributed on an "AS IS" BASIS,
28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 * See the License for the specific language governing permissions and
30 * limitations under the License.
31 */function(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&0>e.indexOf(i)&&(r[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++)0>e.indexOf(i[n])&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]]);return r}(t,["sdkBaseUrl","environment"]),l=i||("sandbox"===o?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"),d=(c=Object.keys(a).filter(function(t){return void 0!==a[t]&&null!==a[t]&&""!==a[t]}).reduce(function(t,e){var r=a[e].toString();return"data"===(e=e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,function(t,e){return(e?"-":"")+t.toLowerCase()})).substring(0,4)||"crossorigin"===e?t.attributes[e]=r:t.queryParams[e]=r,t},{queryParams:{},attributes:{}})).queryParams,u=c.attributes,d["merchant-id"]&&-1!==d["merchant-id"].indexOf(",")&&(u["data-merchant-id"]=d["merchant-id"],d["merchant-id"]="*"),{url:"".concat(l,"?").concat((r="",Object.keys(d).forEach(function(t){0!==r.length&&(r+="&"),r+=t+"="+d[t]}),r)),attributes:u}),p=h.url,m=h.attributes,g=m["data-namespace"]||"paypal",f=window[g];return(m["data-js-sdk-library"]||(m["data-js-sdk-library"]="paypal-js"),function(t,e){var r=document.querySelector('script[src="'.concat(t,'"]'));if(null===r)return null;var i=n(t,e),s=r.cloneNode();if(delete s.dataset.uidAuto,Object.keys(s.dataset).length!==Object.keys(i.dataset).length)return null;var o=!0;return Object.keys(s.dataset).forEach(function(t){s.dataset[t]!==i.dataset[t]&&(o=!1)}),o?r:null}(p,m)&&f)?e.resolve(f):(function(t,e){void 0===e&&(e=Promise),s(t,e);var r=t.url,i=t.attributes;if("string"!=typeof r||0===r.length)throw Error("Invalid url.");if(void 0!==i&&"object"!=typeof i)throw Error("Expected attributes to be an object.");return new e(function(t,e){var s,o,a,l,c,d;if("undefined"==typeof document)return t();o=(s={url:r,attributes:i,onSuccess:function(){return t()},onError:function(){return e(Error('The script "'.concat(r,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.')))}}).url,a=s.attributes,l=s.onSuccess,c=s.onError,(d=n(o,a)).onerror=c,d.onload=l,document.head.insertBefore(d,document.head.firstElementChild)})})({url:p,attributes:m},e).then(function(){var t=window[g];if(t)return t;throw Error("The window.".concat(g," global variable is not available."))})}(this.getScriptOptions()),delete window.paypal,a.paypal[this.scriptOptionsHash]}getScriptOptions(){let t={components:"buttons,messages,card-fields,funding-eligibility,applepay,googlepay","client-id":this.options.clientId,commit:!!this.options.commit,locale:this.options.languageIso,currency:this.options.currency,intent:this.options.intent,"enable-funding":"paylater,venmo"};return(this.options.disablePayLater||!1===this.options.showPayLater)&&(t["enable-funding"]="venmo"),!1===this.options.useAlternativePaymentMethods?t["disable-funding"]=o.join(","):this.options.disabledAlternativePaymentMethods.length>0&&(t["disable-funding"]=this.options.disabledAlternativePaymentMethods.join(",")),this.options.merchantPayerId&&(t["merchant-id"]=this.options.merchantPayerId),this.options.clientToken&&
31(t["data-client-token"]=this.options.clientToken),this.options.userIdToken&&(t["data-user-id-token"]=this.options.userIdToken),this.options.partnerAttributionId&&(t["data-partner-attribution-id"]=this.options.partnerAttributionId),t}}}}]);

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.