PageSourceSearch

https://www.oilersplus.com/code/js/32849.36c7efb0863057725cb6.js

js oilersplus.com collected 2026-10-06 14:16:39 UTC 17,063 bytes, 3 lines download raw bytes

1(()=>{(function(){try{var _=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},M=new _.Error().stack;M&&(_._sentryDebugIds=_._sentryDebugIds||{},_._sentryDebugIds[M]="2e88da44-b93d-49c9-a8fb-046b2654c70f",_._sentryDebugIdIdentifier="sentry-dbid-2e88da44-b93d-49c9-a8fb-046b2654c70f")}catch(p){}})();(self.webpackChunkdice_web=self.webpackChunkdice_web||[]).push([[32849],{32849:((_,M,p)=>{p.d(M,{StripePaymentElement:()=>Se,V:()=>Ee});var g=p(96540),N=p(37427),x=p(21904),L=p(16505),z=p(61905),k=p(65013),J=p(11543);const B=async(e,r,a)=>{var s,t,n,l,o,i,d,c,u,m,y;const{stripe:v,paymentElement:P,primaryPaymentDetails:f,cardholderName:T,cardholderEmail:C,cardholderAddress:h,returnUrl:S}=e;try{const D=await v.confirmSetup({elements:P,clientSecret:(s=f==null?void 0:f.paymentMethodDetails)==null?void 0:s.setupIntentClientSecret,confirmParams:{payment_method_data:{billing_details:{name:T!=null?T:null,email:C!=null?C:null,address:{state:(t=h==null?void 0:h.administrativeLevel1)!=null?t:null,city:null,country:(n=h==null?void 0:h.countryCode)!=null?n:null,line1:(l=h==null?void 0:h.line1)!=null?l:null,line2:(o=h==null?void 0:h.line2)!=null?o:null,postal_code:(i=h==null?void 0:h.postalCode)!=null?i:null}}},expand:["payment_method"],return_url:S},redirect:"if_required"});if(D.error&&((c=(d=D.error)==null?void 0:d.setup_intent)==null?void 0:c.status)!=="succeeded")return r(D.error),null;const F=(m=D.setupIntent)!=null?m:(u=D.error)==null?void 0:u.setup_intent,A=(y=F==null?void 0:F.payment_method)==null?void 0:y.card;return A?a(A):{}}catch(D){return r(D),null}};var E=p(28971),w=p(60832);const K=async(e,r,a,s,t,n)=>{var l,o,i,d,c,u,m;if(!(0,E.WP)(r))return!1;const y=(i=(o=(l=e.paymentHelper)==null?void 0:l.basket)==null?void 0:o.paymentProvidersList)!=null?i:[],v=(0,E.Q5)(y,{streamlined:n}),{provider:P,paymentMethodType:f}=(0,E.UZ)(y,r,v,e.actualPaymentMethodType),T=(d=P==null?void 0:P.targetPaymentProvider)!=null?d:e.targetPaymentProvider,C=(0,k.M3)(T,f,x.Rq.STRIPE,e.routes,e.location,{paymentElementType:r}),h=w.getPaymentMethodInitPayloadFromProvider(x.Rq.STRIPE,f,T,C);try{const{primaryPaymentDetails:S}=await w.getPaymentMethodInit(h,s);e.setPrimaryPaymentDetails(S),(c=a==null?void 0:a.onBeforeRedirect)==null||c.call(a,S);const D=(m=(u=P==null?void 0:P.details)==null?void 0:u.publishableKey)!=null?m:e.apiKey,F=S.paymentMethodDetails.setupIntentClientSecret;if(r==="bancontact"){const A=await(0,N.c)(D,{betas:["bancontact_sepa_beta_1"]}),{error:O}=await A.confirmBancontactSetup(F,{return_url:C});return O&&t(O.message),!0}if(r==="ideal"){const A=await(0,N.c)(D),{error:O}=await A.confirmIdealSetup(F,{return_url:C});return O&&t(O.message),!0}}catch(S){return t(S),!0}return!1};var b=(e=>(e.HANDLED="handled",e))(b||{});const X=async(e,r,a,s)=>{var t,n;const l=(t=e.selectedPaymentElementType)!=null?t:"";await e.ensureSetupIntent(a);const o=await e.paymentElement.submit();if(o!=null&&o.error)return s(o.error),b.HANDLED;if(await K(e,l,r,a,s,!1))return b.HANDLED;if(!e.stripe)return s("errorOccurredPleaseTryAgain"),b.HANDLED;const i=await B({stripe:e.stripe,paymentElement:e.paymentElement,primaryPaymentDetails:e.primaryPaymentDetails,cardholderName:e.cardholderName,cardholderEmail:e.cardholderEmail,cardholderAddress:e.cardholderAddress,returnUrl:window.location.href},s,d=>e.getEligibilityData(d));return i===null&&(e.setPrimaryPaymentDetails(null),(n=r==null?void 0:r.onResetPaymentForm)==null||n.call(r)),i};var I=p(22926);const Z=(e,r)=>({theme:e?"night":"stripe",variables:{colorDanger:r},rules:{".Input--invalid":{color:"var(--colorText)"}}});var Y=Object.defineProperty,q=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,G=(e,r,a)=>r in e?Y(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,U=(e,r)=>{for(var a in r||(r={}))te.call(r,a)&&G(e,a,r[a]);if(j)for(var a of j(r))re.call(r,a)&&G(e,a,r[a]);return e},ne=(e,r)=>q(e,ee(r));const V=e=>{var r,a,s,t,n;const l=(0,I.useElements)(),o=(0,I.useStripe)(),i=g.useRef(null);return g.useEffect(()=>{o&&e.setStripe(o)},[o]),g.useEffect(()=>{l&&e.setCardElement(l)},[l]),g.createElement(I.PaymentElement,{options:U(ne(U({layout:"tabs",wallets:{applePay:"auto",googlePay:"auto"}},(r=e.paymentMethodOrder)!=null&&r.length?{paymentMethodOrder:e.paymentMethodOrder}:{}),{fields:{billingDetails:{name:"auto",address:"never",email:"auto",phone:"auto"}}}),e.isStreamlinedCheckoutFlow&&{defaultValues:{billingDetails:{name:(s=(a=e.profile)==null?void 0:a.name)==null?void 0:s.fullName,email:(t=e.profile)==null?void 0:t.contactEmail,phone:(n=e.profile)==null?void 0:n.phoneNumber}}}),onChange:d=>{var c,u;
1d.complete?e.onFormComplete():(c=e.onFormIncomplete)==null||c.call(e);const m=(u=d.value)==null?void 0:u.type;e.isStreamlinedCheckoutFlow&&e.onPaymentElementTypeChange&&m&&i.current!==m&&(i.current=m,e.onPaymentElementTypeChange(m,d.complete))}})},ae=({host:e,stripePromise:r,actualPaymentMethodType:a,handlers:s,onComplete:t,onIncomplete:n,isDarkMode:l,user:o,alertColor:i})=>g.createElement(I.Elements,{stripe:r,options:{mode:"setup",appearance:Z(!!l,i),payment_method_types:a===x.eq.CARD?["card"]:void 0}},g.createElement(V,{isStreamlinedCheckoutFlow:!1,setCardElement:e.setPaymentElement,onFormComplete:t,onFormIncomplete:n,onProviderChange:s.onProviderChange,paymentMethodOrder:["card"],setStripe:e.setStripe,address:o==null?void 0:o.address,profile:o==null?void 0:o.profile}));var $=p(89572);const le=e=>{var r,a,s,t;const n=(s=(a=(r=e.paymentHelper)==null?void 0:r.basket)==null?void 0:a.paymentProvidersList)!=null?s:[],l=(0,E.Q5)(n,{streamlined:!0}),o=(t=e.selectedPaymentElementType)!=null?t:"",i=(0,E.S$)(o,l)||!!e.selectedStreamlinedCustomMethodType;let d;return i&&(d=(0,E.PJ)(n,o||e.selectedStreamlinedCustomMethodType||"",l)),{isCustomPaymentTab:i,streamlinedCustomProvider:d}},ie=async(e,r,a)=>{const{isCustomPaymentTab:s,streamlinedCustomProvider:t}=r;return s?!t||!a?"error":(await a(t.providerType,t.paymentMethodType,t.providerId),"handled"):"unhandled"},oe=(e,r)=>(a,s)=>{var t,n,l,o,i,d;const c=(l=(n=(t=e.paymentHelper)==null?void 0:t.basket)==null?void 0:n.paymentProvidersList)!=null?l:[],u=(0,E.Q5)(c,{streamlined:!0}),m=e.selectedPaymentElementType;if(e.setSelectedPaymentElementType(a),(0,E.S$)(a,u)){r(),e.setSelectedStreamlinedCustomMethodType(a),(o=e.onCustomPaymentTabChange)==null||o.call(e,a);return}const y=(0,E.S$)(m,u)||!!e.selectedStreamlinedCustomMethodType;e.setSelectedStreamlinedCustomMethodType(null),y&&((i=e.onStreamlinedClearExternalForm)==null||i.call(e),(d=e.onCustomPaymentTabChange)==null||d.call(e,null),s&&r())},se=async(e,r,a,s)=>{var t,n,l;const o=le(e),{isCustomPaymentTab:i}=o,d=(n=(t=e.selectedPaymentElementType)!=null?t:e.selectedStreamlinedCustomMethodType)!=null?n:"";if(!i){await e.ensureSetupIntent(a);const m=await e.paymentElement.submit();if(m!=null&&m.error)return s(m.error),b.HANDLED}const c=await ie(e,o,e.onStreamlinedCustomPaymentSubmit);if(c==="handled")return b.HANDLED;if(c==="error")return s("errorOccurredPleaseTryAgain"),b.HANDLED;if(await K(e,d,r,a,s,!0))return b.HANDLED;if(!e.stripe)return s("errorOccurredPleaseTryAgain"),b.HANDLED;const u=await B({stripe:e.stripe,paymentElement:e.paymentElement,primaryPaymentDetails:e.primaryPaymentDetails,cardholderName:e.cardholderName,cardholderEmail:e.cardholderEmail,cardholderAddress:e.cardholderAddress,returnUrl:window.location.href},s,m=>e.getEligibilityData(m));return u===null&&(e.setPrimaryPaymentDetails(null),(l=r==null?void 0:r.onResetPaymentForm)==null||l.call(r)),u};var R=p(55172);const de=(e,r)=>({theme:e?"night":"stripe",variables:{colorBackground:e?R.A.darkGreyDarkModeColor:"inherit",borderRadius:"3px",colorText:e?"inherit":R.A.darkGreyDarkModeColor,colorPrimary:e?R.A.textDarkModeColor:"inherit",colorDanger:r,fontSizeSm:"16px",spacingGridRow:"24px",spacingGridColumn:"24px"},rules:{".Tab--selected, .Tab--selected:focus, .Tab--selected:hover":{backgroundColor:"var(--colorBackground)",color:"var(--colorText)"},".TabIcon--selected":{fill:"var(--colorText)"},".Label":{marginBottom:"6px",fontWeight:"600"},".TermsText":{fontSize:"11px"},".Block":{backgroundColor:e?"transparent":"inherit",borderRadius:"8px"},".Input--invalid":{color:"var(--colorText)"}}});var me=Object.defineProperty,ue=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,W=(e,r,a)=>r in e?me(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,Pe=(e,r)=>{for(var a in r||(r={}))ye.call(r,a)&&W(e,a,r[a]);if(Q)for(var a of Q(r))pe.call(r,a)&&W(e,a,r[a]);return e},he=(e,r)=>ue(e,ce(r));const ve=({host:e,stripePromise:r,handlers:a,onComplete:s,onIncomplete:t,alertColor:n,user:l})=>{var o,i,d,c,u;const m=(d=(i=(o=e.paymentHelper)==null?void 0:o.basket)==null?void 0:i.paymentProvidersList)!=null?d:[],y=(0,E.Q5)(m,{streamlined:!0}),P=!!a.onStreamlinedCustomPaymentSubmit?(0,E.WA)(y):[],f=e.preferredPaymentElementType,T=(0,E.dx)((0,E.B$)(y),f);f&&e.setPreferredPaymentElementType(null);const C=(u=(c=e.primaryPaymentDetails)==null?void 0:c.paymentMethodDetails)==null?void 0:u.setupIntentClientSecret;e.setOnStreamlinedCustomPaymentSubmit(a.onStreamlinedCustomPaymentSubmit),e.setOnCustomPaymentTabChange(a.onCustomPaymentTabChange),e.setOnStreamlinedClearExternalForm(
1a.onStreamlinedClearExternalForm);const h=oe(e,s);return g.createElement(I.Elements,{stripe:r,options:he(Pe({clientSecret:C},P.length>0?{customPaymentMethods:P}:{}),{appearance:de(e.isDarkMode,n)})},g.createElement(V,{isStreamlinedCheckoutFlow:!0,setCardElement:e.setPaymentElement,onFormComplete:s,onFormIncomplete:t,onProviderChange:a.onProviderChange,onPaymentElementTypeChange:h,paymentMethodOrder:T,setStripe:e.setStripe,address:l==null?void 0:l.address,profile:l==null?void 0:l.profile}))};var H=p(19220),fe=p(53665),ge=p(36497);const Ee=e=>"preferPaymentElementType"in e;class Se{constructor(r,a,s){this.id=x.Rq.STRIPE,this.paymentAuthorisationStatus=null,this.consent=null,this.stripe=null,this.apiKey=null,this.primaryPaymentDetails=null,this.paymentElement=null,this.cardholderName=null,this.cardholderEmail=null,this.cardholderAddress=null,this.routes=null,this.location=null,this.selectedPaymentElementType=null,this.preferredPaymentElementType=null,this.selectedStreamlinedCustomMethodType=null,this.getButton=async t=>{await this.stripePromise;const n=()=>{this.card=null,t()},l=g.createElement(J.A,null);return this.paymentHelper.commonGetButton(l,n)},this.getExpressButton=async()=>null,this.getPrimaryPaymentDetails=()=>this.primaryPaymentDetails,this.getAddCardForm=async(t,n,l,o,i)=>(await this.startPayment({continue:t,updateAddress:()=>{},onProviderChange:i,onError:l},L.LV),this.getForm({onProviderRedirect:()=>{},onFormComplete:n,onFormError:l,onFormChange:o,onProviderChange:i})),this.startPayment=async(t,n)=>{if(!this.getCardId()){const l=w.getPaymentMethodInitPayloadFromProvider(this.id,this.actualPaymentMethodType,this.targetPaymentProvider),{primaryPaymentDetails:o}=await w.getPaymentMethodInit(l,n);this.primaryPaymentDetails=o}return t.continue({requiresAddress:!1}),null},this.confirmPayment=async(t,n,l,o,i,d)=>{var c,u;const m=(0,k.Eb)(t);let y=null;if(this.paymentAuthorisationStatus===$.te.SUCCEEDED){const v=()=>{this.paymentAuthorisationStatus=null};await this.paymentHelper.commonConfirmPayment(t,n,l,o,i,d,this.primaryPaymentDetails,null,this.consent,null,v);return}else if(this.paymentAuthorisationStatus===$.te.FAILED){const v=()=>{this.paymentAuthorisationStatus=null};(c=t==null?void 0:t.onAfterRedirect)==null||c.call(t),v(),m("failedPayment");return}else if(this.getCardId())y=(0,H.eh)(this.card)?(0,H.MK)(this.card):null;else{const v=this.getPaymentElementHost(),P=this.isStreamlinedCheckoutFlow?await se(v,t,d,m):await X(v,t,d,m);if(P===b.HANDLED||P===null)return;y=P}await this.paymentHelper.commonConfirmPayment(t,n,l,o,i,d,this.primaryPaymentDetails,(u=this.getCardId())==null?void 0:u.toString(),this.consent,y)},this.addCard=async()=>{var t,n,l,o,i,d,c,u,m,y,v,P;await this.paymentElement.submit();const{error:f}=await this.stripe.confirmSetup({elements:this.paymentElement,clientSecret:this.primaryPaymentDetails.paymentMethodDetails.setupIntentClientSecret,confirmParams:{payment_method_data:{billing_details:{name:(t=this.cardholderName)!=null?t:null,email:(n=this.cardholderEmail)!=null?n:null,address:{state:(o=(l=this.cardholderAddress)==null?void 0:l.administrativeLevel1)!=null?o:null,city:null,country:(d=(i=this.cardholderAddress)==null?void 0:i.countryCode)!=null?d:null,line1:(u=(c=this.cardholderAddress)==null?void 0:c.line1)!=null?u:null,line2:(y=(m=this.cardholderAddress)==null?void 0:m.line2)!=null?y:null,postal_code:(P=(v=this.cardholderAddress)==null?void 0:v.postalCode)!=null?P:null}}},expand:["payment_method"],return_url:window.location.href},redirect:"if_required"});if(f)throw new Error(f.code)},this.getForm=async(t,n,l,o,i,d,c,u)=>{var m,y,v,P;const f=()=>{var S;(S=t.onFormComplete)==null||S.call(t)},T=()=>{var S;(S=t.onFormIncomplete)==null||S.call(t)};if(this.getCardId())return f(),null;this.paymentAuthorisationStatus&&((m=t.onProviderRedirect)==null||m.call(t)),i!=null&&i.profile&&(this.cardholderName=(y=i.profile.name)==null?void 0:y.preferredName,this.cardholderEmail=i.profile.contactEmail),i!=null&&i.address&&(this.cardholderAddress=i.address);const C=(0,fe.EO)()||R.A.colorRed,h=this.getPaymentElementHost();return this.isStreamlinedCheckoutFlow&&!((P=(v=h.primaryPaymentDetails)==null?void 0:v.paymentMethodDetails)!=null&&P.setupIntentClientSecret)&&this.paymentAuthorisationStatus?null:this.isStreamlinedCheckoutFlow?(await this.ensureSetupIntent(L.LV),ve({host:h,stripePromise:this.stripePromise,handlers:t,onComplete:f,onIncomplete:T,alertColor:C,user:i})):ae({host:h,stripePromise:this.stripePromise,actualPaymentMethodType:this.actualPaymentMethodType,handlers:t,onComplete:f,onIncomplete:T,isDarkMode:u,user:i,alertColor:C})},this.useCard=async t=>(this.card=t,null),this.useConsent=async t=>{this.consent=t},this.preferPaymentElementType=t=>{this.preferredPaymentElementType=t,t&&(this.selectedPaymentElementType=t)},this.getCardId=()=>{var t,n;return((t=this.card)==null?void 0:t.cardId)||((n=this.card)==null?void 0:n.paymentDetailsExternalId)},this.ensureSetupIntent=async t=>{if(this.primaryPaymentDetails)return;const n=w.getPaymentMethodInitPayloadFromProvider(this.id,this.actualPaymentMethodType,this.targetPaymentProvider),{primaryPaymentDetails:l}=await w.getPaymentMethodInit(n,t);this.primaryPaymentDetails=l},this.getEligibilityData=H.MK,this.getPaymentElementHost=()=>{const t=this;return{paymentHelper:t.paymentHelper,get selectedPaymentElementType(){return t.selectedPaymentElementType}
1,get selectedStreamlinedCustomMethodType(){return t.selectedStreamlinedCustomMethodType},get preferredPaymentElementType(){return t.preferredPaymentElementType},get paymentElement(){return t.paymentElement},get stripe(){return t.stripe},get primaryPaymentDetails(){return t.primaryPaymentDetails},apiKey:t.apiKey,targetPaymentProvider:t.targetPaymentProvider,routes:t.routes,location:t.location,actualPaymentMethodType:t.actualPaymentMethodType,get cardholderName(){return t.cardholderName},get cardholderEmail(){return t.cardholderEmail},get cardholderAddress(){return t.cardholderAddress},isDarkMode:t.isDarkMode,get onStreamlinedCustomPaymentSubmit(){return t.onStreamlinedCustomPaymentSubmit},get onCustomPaymentTabChange(){return t.onCustomPaymentTabChange},get onStreamlinedClearExternalForm(){return t.onStreamlinedClearExternalForm},setSelectedPaymentElementType:n=>{t.selectedPaymentElementType=n},setSelectedStreamlinedCustomMethodType:n=>{t.selectedStreamlinedCustomMethodType=n},setPreferredPaymentElementType:n=>{t.preferredPaymentElementType=n},setPrimaryPaymentDetails:n=>{t.primaryPaymentDetails=n},setOnStreamlinedCustomPaymentSubmit:n=>{t.onStreamlinedCustomPaymentSubmit=n},setOnCustomPaymentTabChange:n=>{t.onCustomPaymentTabChange=n},setOnStreamlinedClearExternalForm:n=>{t.onStreamlinedClearExternalForm=n},setPaymentElement:n=>{t.paymentElement=n},setStripe:n=>{t.stripe=n},ensureSetupIntent:t.ensureSetupIntent,getEligibilityData:t.getEligibilityData}},this.paymentMethodType=r,this.isDarkMode=a,this.isStreamlinedCheckoutFlow=s}configure(r,a,s,t,n,l){this.actualPaymentMethodType=r.paymentMethodType,this.apiKey=r.details.publishableKey,this.targetPaymentProvider=r.targetPaymentProvider,this.stripePromise=(0,N.c)(this.apiKey),this.routes=s,this.location=t,n&&(this.primaryPaymentDetails=n),l!==void 0&&(this.isStreamlinedCheckoutFlow=l),this.paymentHelper=new z.e(r,a)}}}),55172:((_,M,p)=>{p.d(M,{A:()=>g});const g={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"}})}]);})();
2
3//# sourceMappingURL=32849.36c7efb0863057725cb6.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.