!function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},,,function(e,t,n){"use strict";n.r(t);var r=n(1),c=(n(2),n(0)),o=n(3);const{registerPlugin:i}=wp.plugins,{ExperimentalOrderMeta:a}=wc.blocksCheckout,l=Object(o.getSetting)("wc-affirm-block-cart_data",{}),u=Object(c.decodeEntities)(l.affirmColor),s=Object(c.decodeEntities)(l.learnmore),f=Object(c.decodeEntities)(l.script_url),d=Object(c.decodeEntities)(l.public_key),p=Object(c.decodeEntities)(l.public_key_ca),b=Object(c.decodeEntities)(l.public_key_gb),g=Object(c.decodeEntities)(l.enabled),m=Object(c.decodeEntities)(l.valid_use),_=Object(c.decodeEntities)(l.cart_ala),w=Object(c.decodeEntities)(l.language_selector);let y,O=Object(c.decodeEntities)(l.site_locale),j=!1,E="",v="";const k=e=>{let{cart:t,context:n}=e;const c=t.cartTotals.total_price;if("woocommerce/cart"!=n)return Object(r.createElement)("p",null);let o=t.cartTotals.currency_code;return y={USD:["US","USA"],CAD:["CA","CAN"],GBP:["GB","GBR"]}[o],y&&g&&m&&_?(v=function(e){let t="en_US";if("USD"!==e)if("GBP"===e)t="en_GB";else if("site_language"===w)O===t&&(t="en_CA");else{let e=(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language,browserLanguage.substring(0,2));O=e+"_"+y[0],O===t&&(t="en_CA")}return t}(o),E=function(e){return"CAN"===e?p:"GBR"===e?b:d}(y),j?affirm.ui.ready((function(){affirm.ui.refresh()})):(function(){if(void 0===e){var e={public_api_key:E,script:f,locale:v,country_code:y};!function(e,t,n,r,c,o,i){var a,l=e[n]||{},u=document.createElement(o),s=document.getElementsByTagName(o)[0],f=function(e,t,n){return function(){e[t]._.push([n,arguments])}};for(l[r]=f(l,r,"set"),a=l[r],l[c]={},l[c]._=[],a._=[],l[c][i]=f(l,c,i),c=0,i="set add save post open "+"empty reset on off trigger ready setProduct".split(" ");c<i.length;c++)a[i[c]]=f(l,r,i[c]);for(c=0,i=["get","token","url","items"];c<i.length;c++)a[i[c]]=function(){};u.async=!0,u.src=t[o],s.parentNode.insertBefore(u,s),delete t[o],a(t),e[n]=l}(window,e,"affirm","checkout","ui","script","ready")}}(),j=!0),Object(r.createElement)("p",{className:"class-affirm-ala-cart-block affirm-as-low-as","data-amount":c,"data-affirm-color":u,"data-learnmore-show":s,"data-page-type":"cart"})):Object(r.createElement)("p",null)};i("wc-affirm-block-cart",{render:()=>Object(r.createElement)(a,null,Object(r.createElement)(k,null)),scope:"woocommerce-checkout"})}]);