1import{r as s,h as t,F as i}from"./p-9add63ef.js";import{a as r}from"./p-f961835c.js";import{a as e}from"./p-ccbb32da.js";import{s as o}from"./p-49fdface.js";import{s as a}from"./p-cc430af9.js";import{o as n}from"./p-4773325d.js";import{f as c}from"./p-b51de06c.js";import"./p-7ec75b85.js";import"./p-2b28ea49.js";import"./p-dd24e53c.js";import"./p-e2e1fe1f.js";import"./p-401e165e.js";import"./p-fb28f84f.js";import"./p-d3366af3.js";import"./p-830ab1a3.js";import"./p-d15c4b50.js";import"./p-0cb2e619.js";import"./p-31faf2b8.js";import"./p-297962fd.js";const d=(s=[],t,i)=>{var r;return((r=(s||[]).find((s=>(s===null||s===void 0?void 0:s.processor_type)===t&&(s===null||s===void 0?void 0:s.live_mode)===!!(i==="live"))))===null||r===void 0?void 0:r.processor_data)||{}};const l="sc-order-submit{display:block;width:auto;display:grid;gap:var(--sc-form-row-spacing)}.sc-secure-notice{display:flex;justify-content:center}";const p=l;const u=class{constructor(t){s(this,t);this.loading=undefined;this.paying=undefined;this.type="primary";this.size="medium";this.full=true;this.icon=undefined;this.showTotal=undefined;this.processors=undefined;this.order=undefined;this.currencyCode="usd";this.processor=undefined;this.secureNoticeText=undefined;this.secureNotice=true;this.backgroundColor="";this.textColor=""}cannotShipToLocation(){var s,t;return((s=a===null||a===void 0?void 0:a.checkout)===null||s===void 0?void 0:s.selected_shipping_choice_required)&&!((t=a.checkout)===null||t===void 0?void 0:t.selected_shipping_choice)}renderPayPalButton(s){const{client_id:i,account_id:o,merchant_initiated_enabled:n}=d(e(),"paypal",a.mode);if(!i&&!o)return null;return t("sc-paypal-buttons",{buttons:s,busy:c()||r(),mode:a.mode,order:a.checkout,merchantInitiated:n,"currency-code":a.currencyCode,"client-id":i,"merchant-id":o,label:"checkout",color:"blue"})}render(){var s;if(this.cannotShipToLocation()||r("OUT_OF_STOCK")){return t("sc-button",{type:this.t
1ype,size:this.size,full:this.full,loading:this.loading||this.paying,disabled:true,style:{"--sc-color-primary-text":this.textColor,"--sc-color-primary-500":this.backgroundColor}},!!this.icon&&t("sc-icon",{name:this.icon,slot:"prefix","aria-hidden":"true"}),t("slot",null,wp.i18n.__("Purchase","surecart")),this.showTotal&&t("span",null,"Â ",t("sc-total",null)),t("sc-visually-hidden",null," ",wp.i18n.__("Press enter to purchase","surecart")))}const e=(s=a.checkout)===null||s===void 0?void 0:s.payment_method_required;return t(i,null,e&&o.id==="paypal"&&this.renderPayPalButton(o.method==="card"?["card"]:["paypal"]),t("sc-button",{hidden:["paypal","paypal-card"].includes(o.id)&&e,submit:true,type:this.type,size:this.size,full:this.full,loading:this.loading||this.paying,disabled:this.loading||this.paying||c()||r()||this.cannotShipToLocation(),style:{"--sc-color-primary-text":this.textColor,"--sc-color-primary-500":this.backgroundColor}},!!this.icon&&t("sc-icon",{name:this.icon,slot:"prefix","aria-hidden":"true"}),t("slot",null,wp.i18n.__("Purchase","surecart")),this.showTotal&&t("span",null,"Â ",t("sc-total",null)),t("sc-visually-hidden",null," ",wp.i18n.__("Press enter to purchase","surecart"))),this.secureNotice&&location.protocol==="https:"&&t("div",{class:"sc-secure-notice"},t("sc-secure-notice",null,this.secureNoticeText||wp.i18n.__("This is a secure, encrypted payment.","surecart"))))}};n(u,["loading","paying","processors","processor","currencyCode","order"],false);u.style=p;export{u as sc_order_submit}; 2//# sourceMappingURL=p-4b140e4e.entry.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.