(()=>{"use strict";var t={n:e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},d:(e,r)=>{for(var a in r)t.o(r,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{default:()=>d});const r=window.wcStripe.utils,a=window.wp.apiFetch;var i=t.n(a);const n=window.wcStripe.actions;var s=t.n(n);const d=new class{constructor(t){this.data=t,this.actions=s()}async processPayment(t,e={}){return i()({method:"POST",url:(0,r.getRestRoute)("order/pay"),data:{payment_method:t,order_id:this.getId(),order_key:this.getOrderKey(),...e}}).then(t=>t)}needsShipping(){return this.actions.applyFilters("order_needs_shipping",!1,this)}getCurrency(){return this.data.currency}getTotal(){return this.data.total||0}getTotalCents(){return parseInt(this.data.totalCents||0)}needsPayment(){return this.actions.applyFilters("order_needs_payment",this.data?.needsPayment,this)}getLineItems(){return this.data.lineItems||[]}getId(){return this.data.order_id}getOrderKey(){return this.data.order_key}getBillingName(){return this.data.billing_address.name}getBillingEmail(){return this.data.billing_address.email}getBillingPhone(){return this.data.billing_address.phone}getBillingAddress(){return this.data.billing_address}}((0,r.getSetting)("order"));(this.wcStripe=this.wcStripe||{}).order=e.default})();