document.widgetServerBaseUrl = "https://widget.sezzle.com";
document.SezzleDynamicModalURL =  "https://dynamic-modal.sezzle.com";
document.sezzleButtonVersion = "sezzle-widget.js";
document.sezzleCssVersionOverride = "sezzle-styles-global.css";
document.sezzleDefaultModalVersion = "sezzle-modal-4.0.4.html";
document.sezzleModalAvailableLanguages = "en,fr,es";

// Sezzle's merchant widget config override
document.sezzleConfig = {
"configGroups": [{
"targetXPath": "#price",
"urlMatch": "product"
},{
"targetXPath": ".text-subtitle/P-1",
"alignment": "right",
"urlMatch": "cart"
}]
}

if (document.sezzleConfig){
   document.sezzleConfig.merchantID = '24e09f90-c502-4ebe-86d0-daa2e95373d0';

   // Sezzle's merchant payment settings override

   // Sezzle's merchant local config override
   try {document.sezzleConfig = Object.assign(document.localSezzleConfig, document.sezzleConfig); } catch(e) {}
 }
/*! For license information please see sezzle-widget.js.LICENSE.txt */
(()=>{var e={23:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(601),o=n.n(r),i=n(314),a=n.n(i)()(o());a.push([e.id,".sezzle-shopify-info-button{display:block;overflow:hidden;margin:0;border:none;padding:0;background:none}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper{display:block;box-sizing:border-box;width:100%;border:none;padding:0;background:none;color:inherit}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper:focus{outline:5px auto}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper.sezzle-left{text-align:left;float:left}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper.sezzle-center{text-align:center;float:none}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper.sezzle-right{text-align:right;float:right}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text{width:unset;margin:auto;border:0;padding:0;background:none;vertical-align:baseline;word-wrap:normal;line-height:18px;font-size:14px;font-weight:500;font-family:inherit;color:inherit}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text.sezzle-left{text-align:left;margin:0}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text.sezzle-center{text-align:center}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text.sezzle-right{float:right;text-align:right}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text sup{vertical-align:super;font-size:.5em}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-payment-amount{zoom:1;float:none;margin:0;border:0;padding:0;background:none;vertical-align:baseline;font-weight:900;font-size:1.2em}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-logo{display:inline-block;box-sizing:border-box;height:18px;width:auto;opacity:1;float:none;margin:0;margin-bottom:-3px;border:0;padding:0;background:none;vertical-align:baseline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-info-icon{display:contents;width:auto;position:absolute;margin:0;box-shadow:none;border:none;padding:0px 0px 0px 3px;background:none;vertical-align:baseline;line-height:initial;font-size:inherit;color:inherit;cursor:pointer}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-info-link{text-decoration:underline;cursor:pointer;background:none;border:none;padding:0px;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-giveaway-timer,.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-giveaway-award{font-weight:700}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-ap-logo{height:45px;margin:0;border:0;padding:0;vertical-align:middle;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text button.ap-modal-info-link{display:inline;width:auto;margin:0;box-shadow:none;border:none;padding:0;background:none;vertical-align:middle;line-height:inherit;font-size:inherit;color:inherit;cursor:pointer}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-klarna-logo{height:25px;margin:0;border:0;padding:0;vertical-align:bottom;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text button.klarna-modal-info-link{display:inline;width:auto;margin:0;box-shadow:none;border:none;padding:0;background:none;vertical-align:middle;line-height:inherit;font-size:inherit;color:inherit;cursor:pointer}.sezzle-hidden{display:none;visibility:hidden}.sezzle-checkout-modal-lightbox{display:none;position:fixed;top:0;left:0;z-index:99999998;background-color:rgba(5,31,52,.57);width:100vw;height:100vh;overflow-y:auto;overflow-x:hidden;color:unset}",""]);const c=a},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var c=0;c<this.length;c++){var s=this[c][0];null!=s&&(a[s]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},601:e=>{"use strict";e.exports=function(e){return e[1]}},353:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",c="week",s="month",l="quarter",u="year",f="date",h="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,s),i=n-o<0,a=t.clone().add(r+(i?-1:1),s);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:s,y:u,w:c,d:a,D:f,h:i,m:o,s:r,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",b={};b[v]=m;var w="$isDayjsObject",z=function(e){return e instanceof x||!(!e||!e[w])},E=function e(t,n,r){var o;if(!t)return v;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),n&&(b[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var c=t.name;b[c]=t,o=c}return!r&&o&&(v=o),o||!r&&v},S=function(e,t){if(z(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new x(n)},k=y;k.l=E,k.i=z,k.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){function m(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(d);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return k},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<S(e)},g.$g=function(e,t,n){return k.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,l=!!k.u(t)||t,h=k.p(e),d=function(e,t){var r=k.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return l?r:r.endOf(a)},p=function(e,t){return k.w(n.toDate()[e].apply(n.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,g=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case u:return l?d(1,0):d(31,11);case s:return l?d(1,g):d(0,g+1);case c:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return d(l?y-w:y+(6-w),g);case a:case f:return p(v+"Hours",0);case i:return p(v+"Minutes",1);case o:return p(v+"Seconds",2);case r:return p(v+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var c,l=k.p(e),h="set"+(this.$u?"UTC":""),d=(c={},c[a]=h+"Date",c[f]=h+"Date",c[s]=h+"Month",c[u]=h+"FullYear",c[i]=h+"Hours",c[o]=h+"Minutes",c[r]=h+"Seconds",c[n]=h+"Milliseconds",c)[l],p=l===a?this.$D+(t-this.$W):t;if(l===s||l===u){var m=this.clone().set(f,1);m.$d[d](p),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[k.p(e)]()},g.add=function(n,l){var f,h=this;n=Number(n);var d=k.p(l),p=function(e){var t=S(h);return k.w(t.date(t.date()+Math.round(e*n)),h)};if(d===s)return this.set(s,this.$M+n);if(d===u)return this.set(u,this.$y+n);if(d===a)return p(1);if(d===c)return p(7);var m=(f={},f[o]=e,f[i]=t,f[r]=1e3,f)[d]||1,g=this.$d.getTime()+n*m;return k.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=k.z(this),i=this.$H,a=this.$m,c=this.$M,s=n.weekdays,l=n.months,u=n.meridiem,f=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},d=function(e){return k.s(i%12||12,e,"0")},m=u||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return k.s(t.$y,4,"0");case"M":return c+1;case"MM":return k.s(c+1,2,"0");case"MMM":return f(n.monthsShort,c,l,3);case"MMMM":return f(l,c);case"D":return t.$D;case"DD":return k.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,s,2);case"ddd":return f(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(i);case"HH":return k.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return m(i,a,!0);case"A":return m(i,a,!1);case"m":return String(a);case"mm":return k.s(a,2,"0");case"s":return String(t.$s);case"ss":return k.s(t.$s,2,"0");case"SSS":return k.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,f,h){var d,p=this,m=k.p(f),g=S(n),y=(g.utcOffset()-this.utcOffset())*e,v=this-g,b=function(){return k.m(p,g)};switch(m){case u:d=b()/12;break;case s:d=b();break;case l:d=b()/3;break;case c:d=(v-y)/6048e5;break;case a:d=(v-y)/864e5;break;case i:d=v/t;break;case o:d=v/e;break;case r:d=v/1e3;break;default:d=v}return h?d:k.a(d)},g.daysInMonth=function(){return this.endOf(s).$D},g.$locale=function(){return b[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=E(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return k.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),L=x.prototype;return S.prototype=L,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",s],["$y",u],["$D",f]].forEach((function(e){L[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,x,S),e.$i=!0),S},S.locale=E,S.isDayjs=z,S.unix=function(e){return S(1e3*e)},S.en=b[v],S.Ls=b,S.p={},S}()},569:function(e){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,o){var i,a=function(e,n,r){void 0===r&&(r={});var o=new Date(e),i=function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",o=e+"|"+r,i=t[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[o]=i),i}(n,r);return i.formatToParts(o)},c=function(t,n){for(var r=a(t,n),i=[],c=0;c<r.length;c+=1){var s=r[c],l=s.type,u=s.value,f=e[l];f>=0&&(i[f]=parseInt(u,10))}var h=i[3],d=24===h?0:h,p=i[0]+"-"+i[1]+"-"+i[2]+" "+d+":"+i[4]+":"+i[5]+":000",m=+t;return(o.utc(p).valueOf()-(m-=m%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),a=this.toDate(),c=a.toLocaleString("en-US",{timeZone:e}),s=Math.round((a-new Date(c))/1e3/60),l=15*-Math.round(a.getTimezoneOffset()/15)-s;if(Number(l)){if(n=o(c,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var l=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,a=n||t||i,s=c(+o(),a);if("string"!=typeof e)return o(e).tz(a);var l=function(e,t,n){var r=e-60*t*1e3,o=c(r,n);if(t===o)return[r,t];var i=c(r-=60*(o-t)*1e3,n);return o===i?[r,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(e,r).valueOf(),s,a),u=l[0],f=l[1],h=o(u).utcOffset(f);return h.$x.$timezone=a,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){i=e}}}()},826:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var c=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),c.call(this,e)};var s=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var l=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,c=this;if(o)return c.$offset=a,c.$u=0===r,c;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(c=this.local().add(a+s,e)).$offset=a,c.$x.$localOffset=s}else c=this.utc();return c};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var h=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),o=i(e).local();return h.call(r,o,t,n)}}}()},193:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",c="[object Date]",s="[object Function]",l="[object GeneratorFunction]",u="[object Map]",f="[object Number]",h="[object Object]",d="[object Promise]",p="[object RegExp]",m="[object Set]",g="[object String]",y="[object Symbol]",v="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",z="[object Float32Array]",E="[object Float64Array]",S="[object Int8Array]",k="[object Int16Array]",x="[object Int32Array]",L="[object Uint8Array]",P="[object Uint8ClampedArray]",C="[object Uint16Array]",T="[object Uint32Array]",O=/\w*$/,_=/^\[object .+?Constructor\]$/,j=/^(?:0|[1-9]\d*)$/,M={};M[i]=M["[object Array]"]=M[b]=M[w]=M[a]=M[c]=M[z]=M[E]=M[S]=M[k]=M[x]=M[u]=M[f]=M[h]=M[p]=M[m]=M[g]=M[y]=M[L]=M[P]=M[C]=M[T]=!0,M["[object Error]"]=M[s]=M[v]=!1;var D="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,$="object"==typeof self&&self&&self.Object===Object&&self,N=D||$||Function("return this")(),I=t&&!t.nodeType&&t,A=I&&e&&!e.nodeType&&e,F=A&&A.exports===I;function W(e,t){return e.set(t[0],t[1]),e}function q(e,t){return e.add(t),e}function G(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function H(e,t){return function(n){return e(t(n))}}function R(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Y,X=Array.prototype,V=Function.prototype,J=Object.prototype,Z=N["__core-js_shared__"],K=(Y=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",Q=V.toString,ee=J.hasOwnProperty,te=J.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=F?N.Buffer:void 0,oe=N.Symbol,ie=N.Uint8Array,ae=H(Object.getPrototypeOf,Object),ce=Object.create,se=J.propertyIsEnumerable,le=X.splice,ue=Object.getOwnPropertySymbols,fe=re?re.isBuffer:void 0,he=H(Object.keys,Object),de=Ne(N,"DataView"),pe=Ne(N,"Map"),me=Ne(N,"Promise"),ge=Ne(N,"Set"),ye=Ne(N,"WeakMap"),ve=Ne(Object,"create"),be=qe(de),we=qe(pe),ze=qe(me),Ee=qe(ge),Se=qe(ye),ke=oe?oe.prototype:void 0,xe=ke?ke.valueOf:void 0;function Le(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){this.__data__=new Pe(e)}function Oe(e,t,n){var r=e[t];ee.call(e,t)&&Ge(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function _e(e,t){for(var n=e.length;n--;)if(Ge(e[n][0],t))return n;return-1}function je(e,t,n,r,o,d,v){var _;if(r&&(_=d?r(e,o,d,v):r(e)),void 0!==_)return _;if(!Ye(e))return e;var j=Ue(e);if(j){if(_=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,_)}else{var D=Ae(e),$=D==s||D==l;if(He(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(D==h||D==i||$&&!d){if(U(e))return d?e:{};if(_=function(e){return"function"!=typeof e.constructor||We(e)?{}:Ye(t=ae(e))?ce(t):{};var t}($?{}:e),!t)return function(e,t){return De(e,Ie(e),t)}(e,function(e,t){return e&&De(t,Xe(t),e)}(_,e))}else{if(!M[D])return d?e:{};_=function(e,t,n,r){var o,i=e.constructor;switch(t){case b:return Me(e);case a:case c:return new i(+e);case w:return function(e,t){var n=t?Me(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case z:case E:case S:case k:case x:case L:case P:case C:case T:return function(e,t){var n=t?Me(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case u:return function(e,t,n){return G(t?n(B(e),!0):B(e),W,new e.constructor)}(e,r,n);case f:case g:return new i(e);case p:return function(e){var t=new e.constructor(e.source,O.exec(e));return t.lastIndex=e.lastIndex,t}(e);case m:return function(e,t,n){return G(t?n(R(e),!0):R(e),q,new e.constructor)}(e,r,n);case y:return o=e,xe?Object(xe.call(o)):{}}}(e,D,je,t)}}v||(v=new Te);var N=v.get(e);if(N)return N;if(v.set(e,_),!j)var I=n?function(e){return function(e,t,n){var r=t(e);return Ue(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Xe,Ie)}(e):Xe(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n););}(I||e,(function(o,i){I&&(o=e[i=o]),Oe(_,i,je(o,t,n,r,i,e,v))})),_}function Me(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function De(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],c=r?r(n[a],e[a],a,n,e):void 0;Oe(n,a,void 0===c?e[a]:c)}return n}function $e(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Ne(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ye(e)||(t=e,K&&K in t))&&(Re(e)||U(e)?ne:_).test(qe(e));var t}(n)?n:void 0}Le.prototype.clear=function(){this.__data__=ve?ve(null):{}},Le.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Le.prototype.get=function(e){var t=this.__data__;if(ve){var n=t[e];return n===r?void 0:n}return ee.call(t,e)?t[e]:void 0},Le.prototype.has=function(e){var t=this.__data__;return ve?void 0!==t[e]:ee.call(t,e)},Le.prototype.set=function(e,t){return this.__data__[e]=ve&&void 0===t?r:t,this},Pe.prototype.clear=function(){this.__data__=[]},Pe.prototype.delete=function(e){var t=this.__data__,n=_e(t,e);return!(n<0||(n==t.length-1?t.pop():le.call(t,n,1),0))},Pe.prototype.get=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},Pe.prototype.has=function(e){return _e(this.__data__,e)>-1},Pe.prototype.set=function(e,t){var n=this.__data__,r=_e(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Ce.prototype.clear=function(){this.__data__={hash:new Le,map:new(pe||Pe),string:new Le}},Ce.prototype.delete=function(e){return $e(this,e).delete(e)},Ce.prototype.get=function(e){return $e(this,e).get(e)},Ce.prototype.has=function(e){return $e(this,e).has(e)},Ce.prototype.set=function(e,t){return $e(this,e).set(e,t),this},Te.prototype.clear=function(){this.__data__=new Pe},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Ce(r)}return n.set(e,t),this};var Ie=ue?H(ue,Object):function(){return[]},Ae=function(e){return te.call(e)};function Fe(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||j.test(e))&&e>-1&&e%1==0&&e<t}function We(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||J)}function qe(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ge(e,t){return e===t||e!=e&&t!=t}(de&&Ae(new de(new ArrayBuffer(1)))!=w||pe&&Ae(new pe)!=u||me&&Ae(me.resolve())!=d||ge&&Ae(new ge)!=m||ye&&Ae(new ye)!=v)&&(Ae=function(e){var t=te.call(e),n=t==h?e.constructor:void 0,r=n?qe(n):void 0;if(r)switch(r){case be:return w;case we:return u;case ze:return d;case Ee:return m;case Se:return v}return t});var Ue=Array.isArray;function Be(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}(e.length)&&!Re(e)}var He=fe||function(){return!1};function Re(e){var t=Ye(e)?te.call(e):"";return t==s||t==l}function Ye(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Xe(e){return Be(e)?function(e,t){var n=Ue(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Be(e)}(e)&&ee.call(e,"callee")&&(!se.call(e,"callee")||te.call(e)==i)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var a in e)!t&&!ee.call(e,a)||o&&("length"==a||Fe(a,r))||n.push(a);return n}(e):function(e){if(!We(e))return he(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return je(e,!0,!0)}},452:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),c=new O(r||[]);return o(a,"_invoke",{value:L(e,n,c)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};l(w,a,(function(){return this}));var z=Object.getPrototypeOf,E=z&&z(z(_([])));E&&E!==n&&r.call(E,a)&&(w=E);var S=b.prototype=y.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(o,i,a,c){var s=f(e[o],e,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function L(e,n,r){var o=h;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=P(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=f(e,n,r);if("normal"===l.type){if(o=r.done?m:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function P(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function _(e){if(null!=e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return v.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=l(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},k(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new x(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),l(S,s,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=_,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},72:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],c=0;c<e.length;c++){var s=e[c],l=r.base?s[0]+r.base:s[0],u=i[l]||0,f="".concat(l," ").concat(u);i[l]=u+1;var h=n(f),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==h)t[h].references++,t[h].updater(d);else{var p=o(d,r);r.byIndex=c,t.splice(c,0,{identifier:f,updater:p,references:1})}a.push(f)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var c=n(i[a]);t[c].references--}for(var s=r(e,o),l=0;l<i.length;l++){var u=n(i[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=s}}},659:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.nc=void 0,(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function r(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}n(452);var o=document.widgetServerBaseUrl?"".concat(document.widgetServerBaseUrl,"/v1/event/log"):"http://widget.sezzle.com/v1/event/log",i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},n=[{key:"httpRequestWrapper",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise((function(r,o){var i=new XMLHttpRequest;i.open(e,t,!0),null!==n&&i.setRequestHeader("Content-Type","application/json"),i.onload=function(){this.status>=200&&this.status<300?r(i.response):o(new Error("An error occurred when calling ".concat(t,". Status code: ").concat(this.status," Response text: ").concat(i.responseText)))},i.onerror=function(e){var n;n=e instanceof ErrorEvent?"An error occurred when calling ".concat(t,". Error message: ").concat(e.message," Filename: ").concat(e.filename," Line#: ").concat(e.lineno):"An error occurred when calling ".concat(t,". Error type: ").concat(e.type),o(new Error(n))},null===n?i.send():i.send(JSON.stringify(n))}))}},{key:"getCookie",value:function(e){var t="".concat(document.cookie);if(t){var n=t.split("".concat(e,"="));return 2===n.length?n.pop().split(";").shift():void 0}}},{key:"isWidgetDuplicateFound",value:function(){return document.querySelectorAll(".".concat("sezzle-shopify-info-button",":not([style*='display: none'])")).length>1}},{key:"sendEvents",value:function(e){this.httpRequestWrapper("post",o,e)}},{key:"breakXPath",value:function(e){return e.split("/").filter((function(e){return""!==e}))}},{key:"getWidgetBaseUrl",value:function(){return document.widgetServerBaseUrl||"https://widget.sezzle.com"}},{key:"getDynamicModalURL",value:function(){return document.SezzleDynamicModalURL||"https://dynamic-modal.sezzle.com"}},{key:"predictBackgroundTheme",value:function(){var e,t,n,r=window.getComputedStyle(document.body).getPropertyValue("background-color");if("transparent"===r||"rgba(0, 0, 0, 0)"===r)return"light";r.match(/^rgb/)?(e=(r=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/))[1],t=r[2],n=r[3]):(e=(r=+"0x".concat(r.slice(1).replace(r.length<5&&/./g,"$&$&")))>>16,t=r>>8&255,n=255&r);var o=.2126*e+.7152*t+.0722*n,i=(Math.max(e,t,n)+Math.min(e,t,n))/2;return Math.sqrt(e*e*.299+t*t*.587+n*n*.114)<=180&&o<=180&&i<=180?"dark":"light"}},{key:"matchAll",value:function(e,t){for(var n,r=[];n=e.exec(t);)r.push(n[0]);return r}},{key:"waitForBodyToBeReady",value:function(){return new Promise((function(e){document.body&&e();var t=new MutationObserver((function(){document.body&&(t.disconnect(),e())}));t.observe(document.documentElement,{childList:!0})}))}}],null&&t(e.prototype,null),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();const a=i;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function f(){f=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),c=new j(r||[]);return o(a,"_invoke",{value:C(e,n,c)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p="suspendedStart",m="suspendedYield",g="executing",y="completed",v={};function b(){}function w(){}function z(){}var E={};l(E,a,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(M([])));k&&k!==n&&r.call(k,a)&&(E=k);var x=z.prototype=b.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(o,i,a,c){var s=d(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,n,r){var o=p;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=T(c,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?y:m,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function M(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(u(t)+" is not iterable")}return w.prototype=z,o(x,"constructor",{value:z,configurable:!0}),o(z,"constructor",{value:w,configurable:!0}),w.displayName=l(z,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,z):(e.__proto__=z,l(e,s,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},L(P.prototype),l(P.prototype,c,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new P(h(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},L(x),l(x,s,"Generator"),l(x,a,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function h(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,c,"next",e)}function c(e){h(i,r,o,a,c,"throw",e)}a(void 0)}))}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function g(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var y=new WeakSet,v=function(){return e=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,y),this.basicWidgetConfig=t,this.propsNotInConfigGroup=["merchantID","minPrice","maxPrice","apModalHTML","klarnaModalHTML","language","apDualInstall","klarnaDualInstall","isLongTermOnly"],this.widgetConfig={config:null,configGroups:null,merchantID:null,minPrice:null,maxPrice:null,apModalHTML:null,klarnaModalHTML:null,fingerprint:null,apDualInstall:null,klarnaDualInstall:null,isLongTermOnly:null,mutationObserverConfig:{attributes:!0,childList:!0,characterData:!0},apiEndpoints:{dynamicModalURL:a.getDynamicModalURL(),sezzleAssetsCDN:"https://media.sezzle.com/shopify-app/assets/",cssForMerchantURL:"".concat(a.getWidgetBaseUrl(),"/v1/css/price-widget?uuid=").concat(t.merchantID)},observeElements:null,numberOfPayments:4},this.widgetEventLogger=r,g(y,this,b).call(this),this.language=n,this.language.setLanguage(this.widgetConfig.config.language)},t=[{key:"getSezzleConfig",get:function(){return this.widgetConfig}},{key:"setAPModalHTML",value:(r=d(f().mark((function e(){var t,n,r=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.widgetConfig.apDualInstall){e.next=2;break}return e.abrupt("return");case 2:return t=this.language.getLanguage(),n="https://media.sezzle.com/afterpay/modal/".concat(t,".html"),e.next=6,a.httpRequestWrapper("GET",n).then((function(e){r.widgetConfig.apModalHTML=e})).catch((function(e){r.widgetEventLogger.logEvent("error",e.message)}));case 6:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"setKlarnaModalHTML",value:(n=d(f().mark((function e(){var t,n,r=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.widgetConfig.klarnaDualInstall){e.next=2;break}return e.abrupt("return");case 2:return t=this.language.getLanguage(),n="https://media.sezzle.com/klarna/modal/".concat(t,".html"),e.next=6,a.httpRequestWrapper("GET",n).then((function(e){r.widgetConfig.klarnaModalHTML=e})).catch((function(e){r.widgetEventLogger.logEvent("error",e.message)}));case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})}],t&&p(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,r}();function b(){g(y,this,w).call(this),g(y,this,S).call(this),g(y,this,k).call(this),g(y,this,L).call(this)}function w(){if(!Array.isArray(this.basicWidgetConfig.configGroups))throw new Error("options.configGroups is not an array");if(!this.basicWidgetConfig.configGroups.length)throw new Error("options.configGroups must have at least one config object");var e=["targetXPath"];this.basicWidgetConfig.configGroups.forEach((function(t){e.forEach((function(e){if(!t.hasOwnProperty(e))throw new Error("".concat(e," must be specified in all configs in options.configGroups"))}))})),g(y,this,z).call(this),g(y,this,E).call(this)}function z(){var e={targetXPath:"string",renderToPath:"string",urlMatch:"string"};this.basicWidgetConfig.configGroups.forEach((function(t){Object.keys(e).forEach((function(n){if(t.hasOwnProperty(n)&&u(t[n])!==u(e[n]))throw new Error("".concat(n," must be of type ").concat(e[n]))}))}))}function E(){var e=this;this.basicWidgetConfig.configGroups.forEach((function(t){Object.keys(t).forEach((function(t){if(e.propsNotInConfigGroup.indexOf(t)>=0)throw new Error("".concat(t," is not a property of a configGroup. Specify this key at the outermost layer"))}))}))}function S(){this.basicWidgetConfig.configGroups=this.basicWidgetConfig.configGroups.filter((function(e){return!e.urlMatch||RegExp(e.urlMatch,"i").test(window.location.href)}))}function k(){var e={config:this.basicWidgetConfig,merchantID:this.basicWidgetConfig.merchantID||"",minPrice:this.basicWidgetConfig.minPrice||0,maxPrice:this.basicWidgetConfig.maxPrice||25e4,observeElements:this.basicWidgetConfig.observeElements||[],apDualInstall:this.basicWidgetConfig.apDualInstall||!1,klarnaDualInstall:this.basicWidgetConfig.klarnaDualInstall||!1,isLongTermOnly:this.basicWidgetConfig.isLongTermOnly||!1};this.widgetConfig=s(s({},this.widgetConfig),e)}function x(e){var t={};switch(t.xpath=a.breakXPath(e.targetXPath),t.rendertopath=e.renderToPath||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.renderToPath||"..",t.relatedElementActions=e.relatedElementActions||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.relatedElementActions||[],t.ignoredPriceElements=e.ignoredPriceElements||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.ignoredPriceElements||[],"string"==typeof t.ignoredPriceElements?t.ignoredPriceElements=[a.breakXPath(t.ignoredPriceElements.trim())]:t.ignoredPriceElements=t.ignoredPriceElements.map((function(e){return a.breakXPath(e.trim())})),t.alignment=e.alignment||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.alignment||"auto",t.alignmentSwitchMinWidth=e.alignmentSwitchMinWidth||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.alignmentSwitchMinWidth,t.alignmentSwitchType=e.alignmentSwitchType||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.alignmentSwitchType,t.containerStyle=e.containerStyle||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.containerStyle||{},t.textStyle=e.textStyle||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.textStyle||{},t.logoStyle=e.logoStyle||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.logoStyle||{},t.theme=e.theme||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.theme||"",t.theme){case"dark":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor_WhiteWM.svg",t.imageClassName="szl-dark-image";break;case"light":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",t.imageClassName="szl-light-image";break;case"white-flat":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_WhiteAlt.svg",t.imageClassName="szl-dark-image";break;case"black-flat":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_BlackAlt.svg",t.imageClassName="szl-light-image";break;default:"dark"===a.predictBackgroundTheme()?(t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor_WhiteWM.svg",t.imageClassName="szl-dark-image"):(t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",t.imageClassName="szl-light-image")}return t.hideClasses=e.hideClasses||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.hideClasses||[],"string"==typeof t.hideClasses?t.hideClasses=[a.breakXPath(t.hideClasses.trim())]:t.hideClasses=t.hideClasses.map((function(e){return a.breakXPath(e.trim())})),t.ignoredFormattedPriceText=e.ignoredFormattedPriceText||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.ignoredFormattedPriceText||["Subtotal","Total:","Sold Out"],Array.isArray(t.ignoredFormattedPriceText)||(t.ignoredFormattedPriceText=[t.ignoredFormattedPriceText]),t.widgetIsFirstChild=!1,t}function L(){var e=this;this.widgetConfig.configGroups=[],this.basicWidgetConfig.configGroups.forEach((function(t){e.widgetConfig.configGroups.push(g(y,e,x).call(e,t))}))}const P=v;function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O(r.key),r)}}function O(e){var t=function(e,t){if("object"!=C(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==C(t)?t:t+""}var _=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t},t=[{key:"getElementsByXPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.length)return[];if(t===e.length)return n||[];null===n&&(n=[document]);for(var r=[],o=Array.prototype.slice.call(n),i=function(){var n=o[a];if(".."===e[t])r.push(n.parentElement);else if("#"===e[t][0])r.push(n.getElementById(e[t].substr(1)));else if("."===e[t][0])1===e[t].trim().length&&r.push(n),Array.prototype.forEach.call(n.getElementsByClassName(e[t].substr(1)),(function(e){r.push(e)}));else if(0===e[t].indexOf("child")){var i=e[t].split("-")[1],c=n.childNodes[i];if(void 0!==c)if("#text"===c.nodeName){var s=document.createElement("span");s.appendChild(document.createTextNode(c.nodeValue)),n.replaceChild(s,c),r.push(s)}else r.push(c);else r.push(n)}else{var l=e[t].split("-"),u=0;l.length>1&&l[l.length-1]>=0&&(u=parseInt(l[l.length-1],10));var f=e[t].replace("-".concat(u),"");Array.prototype.forEach.call(n.getElementsByTagName(f),(function(e,t){t===u&&r.push(e)}))}},a=0;a<o.length;a++)i();return r=r.filter((function(e){return null!==e})),this.getElementsByXPath(e,t+1,r)}},{key:"getElementToRender",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.querySelector("#sezzle-widget-v2-render-reference");if(n)return n;var r=null;if(null!==this.config.configGroups[t].rendertopath){var o=a.breakXPath(this.config.configGroups[t].rendertopath);r=e;for(var i=0;i<o.length;i++){var c=o[i];if(null===r)break;if("."!==c)if(".."===c)r=r.parentElement;else if("."===c[0])r=r.getElementsByClassName(c.substr(1)).length?r.getElementsByClassName(c.substr(1))[0]:null;else if("#"===c[0])r=document.getElementById(c.substr(1));else if("::first-child"===c)r=r.children.length>0?r.firstElementChild:null,this.config.configGroups[t].widgetIsFirstChild=!0;else{var s=0;c.split("-").length>1&&c.split("-")[1]>=0&&(s=parseInt(c.split("-")[1],10)),r=r.getElementsByTagName(c.split("-")[0]).length>s?r.getElementsByTagName(c.split("-")[0])[s]:null}}}return r||e.parentElement}},{key:"getPriceText",value:function(e,t){var n=this;if(!t||0===t.length)return e.textContent;if(t.forEach((function(t){n.getElementsByXPath(t,0,[e]).forEach((function(e){e.classList.add("sezzle-ignored-price-element")}))})),!e.getElementsByClassName("sezzle-ignored-price-element").length)return e.textContent;var r=e.cloneNode(!0);return Array.prototype.forEach.call(r.getElementsByTagName("*"),(function(e){-1!==Array.prototype.slice.call(e.classList).indexOf("sezzle-ignored-price-element")&&r.removeChild(e)})),Array.prototype.forEach.call(e.getElementsByClassName("sezzle-ignored-price-element"),(function(e){e.classList.remove("sezzle-ignored-price-element")})),r.textContent}},{key:"startObserve",value:function(e,t){var n=new MutationObserver(t);return n.observe(e,this.config.mutationObserverConfig),n}},{key:"observeRelatedElements",value:function(e,t,n){var r=this;n&&n.forEach((function(n){if("string"==typeof n.relatedPath&&("function"==typeof n.action||"function"==typeof n.initialAction)){var o=r.getElementsByXPath(a.breakXPath(n.relatedPath),0,[e]);o.length>0&&("function"==typeof n.action&&r.startObserve(o[0],(function(e){n.action(e,t)})),"function"==typeof n.initialAction&&n.initialAction(o[0],t))}}))}},{key:"hideSezzleHideElements",value:function(e){var t=this;this.config.configGroups[e].hideClasses.forEach((function(e){t.getElementsByXPath(e).forEach((function(e){e.classList.contains("sezzle-hidden")||e.classList.add("sezzle-hidden")}))}))}}],t&&T(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const j=_;function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function D(){D=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),c=new O(r||[]);return o(a,"_invoke",{value:L(e,n,c)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};l(w,a,(function(){return this}));var z=Object.getPrototypeOf,E=z&&z(z(_([])));E&&E!==n&&r.call(E,a)&&(w=E);var S=b.prototype=y.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(o,i,a,c){var s=f(e[o],e,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==M(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function L(t,n,r){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=P(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function P(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(M(t)+" is not iterable")}return v.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=l(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(x.prototype),l(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new x(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),l(S,s,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function $(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function I(e){var t=function(e,t){if("object"!=M(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=M(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}function A(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var F=new WeakSet,W=function(){return e=function e(t,n,r,o,i,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,F),this.widgetConfig=t,this.widgetEventLogger=n,this.scrollDistance=0,this.modalNode=null,this.sezzleElement=null,this.promotion=o,this.giveaway=r,this.priceProcessor=i,this.languageConfig=a,this.messageEventHandler=this.messageEventHandler.bind(this),this.modalIframe=null},(t=[{key:"addClickEventForModal",value:function(e){this.sezzleElement=e.widget,A(F,this,Y).call(this,e),A(F,this,R).call(this,e),A(F,this,X).call(this),A(F,this,V).call(this)}},{key:"renderModals",value:function(){A(F,this,Z).call(this),A(F,this,K).call(this),A(F,this,Q).call(this)}},{key:"messageEventHandler",value:function(e){var t=e.origin,n=e.data;t==this.widgetConfig.apiEndpoints.dynamicModalURL&&"close-modal"==n&&(A(F,this,H).call(this),window.removeEventListener("message",this.messageEventHandler))}}])&&N(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function q(){return G.apply(this,arguments)}function G(){var e;return e=D().mark((function e(){var t,n;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!document.sezzleDefaultModalVersion||!document.sezzleModalAvailableLanguages){e.next=8;break}return document.sezzleModalAvailableLanguages.split(",").map((function(e){return e.trim()})).indexOf(this.languageConfig.language)>-1?document.modalLanguage=this.languageConfig.language:document.modalLanguage="en",t="".concat(this.widgetConfig.apiEndpoints.sezzleAssetsCDN).concat(document.sezzleDefaultModalVersion),e.next=6,a.httpRequestWrapper("GET",t);case 6:n=e.sent,this.modalNode.innerHTML=n;case 8:A(F,this,te).call(this),A(F,this,H).call(this);case 10:case"end":return e.stop()}}),e,this)})),G=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$(i,r,o,a,c,"next",e)}function c(e){$(i,r,o,a,c,"throw",e)}a(void 0)}))},G.apply(this,arguments)}function U(e,t){if(e.preventDefault(),!document.sezzleDefaultModalVersion||!document.sezzleModalAvailableLanguages)throw new Error("Could not open modal. Missing modal version (".concat(document.sezzleDefaultModalVersion,") or languages (").concat(document.sezzleModalAvailableLanguages,")"));if(A(F,this,ne).call(this,t),e.target.id="sezzle-modal-return",!e.target.classList.contains("no-sezzle-info")){var n,r=document.getElementsByClassName("sezzle-checkout-modal-lightbox");if(Array.prototype.forEach.call(r,(function(e){e.classList.contains("close-sezzle-modal")&&(n=e)})),n){A(F,this,J).call(this,!0),n.style.display="block",n.getElementsByClassName("close-sezzle-modal")[0].focus();var o=n.getElementsByClassName("sezzle-modal");o.length&&(o[0].className="sezzle-modal"),A(F,this,B).call(this),this.widgetEventLogger.logEvent("onclick")}}}function B(){var e=this,t=Array.prototype.slice.call(document.querySelector(".sezzle-modal-content").childNodes);t.unshift(document.querySelector("button.close-sezzle-modal"));var n=t[0],r=t[t.length-1],o={};document.addEventListener("keydown",(function(t){if(("Shift"===t.key||"Control"===t.key)&&(t.stopImmediatePropagation(),o[t.key]=!0),document.addEventListener("keyup",(function(e){delete o[e.key]})),o.Control&&!o.Shift&&"Tab"===t.key&&document.activeElement===r)n.focus();else if(o.Shift&&"Tab"===t.key&&document.activeElement===n)r.focus();else if("Escape"===t.key){for(var i=document.getElementsByClassName("sezzle-checkout-modal-lightbox"),a=0;a<i.length;a++)i[a].style.display="none",A(F,e,J).call(e,!1);var c=document.querySelector("#sezzle-modal-return");c?(c.focus(),c.removeAttribute("id")):document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".sezzle-info-icon")?document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".sezzle-info-icon").focus():document.querySelector(".sezzle-checkout-button-wrapper").focus()}}))}function H(){var e=this;Array.prototype.forEach.call(document.querySelectorAll(".close-sezzle-modal, .close-btn"),(function(t){t.addEventListener("click",(function(t){A(F,e,J).call(e,!1),e.modalNode.style.display="none",e.modalNode.getElementsByClassName("sezzle-modal")[0].className="sezzle-modal sezzle-checkout-modal-hidden";var n=document.querySelector("#sezzle-modal-return")||document.querySelector(".sezzle-checkout-button-wrapper");n&&(n.focus(),n.removeAttribute("id"))}))}));var t=document.getElementsByClassName("sezzle-modal")[0];t||(t=document.getElementsByClassName("sezzle-checkout-modal-lightbox")[0]),t.addEventListener("click",(function(e){return e.stopPropagation()}))}function R(e){var t=this;e.widget.addEventListener("keydown",(function(n){"Enter"!==n.key&&" "!==n.key||A(F,t,U).call(t,n,e)}))}function Y(e){var t=this;e.widget.addEventListener("click",(function(n){A(F,t,U).call(t,n,e)}))}function X(){var e=this;if(this.widgetConfig.apModalHTML){var t=this.sezzleElement.getElementsByClassName("ap-modal-info-link");Array.prototype.forEach.call(t,(function(t){t.addEventListener("click",(function(t){t.target.id="sezzle-modal-return",A(F,e,J).call(e,!0),document.querySelector(".sezzle-ap-modal").style.display="block",document.querySelector(".sezzle-ap-modal").focus(),e.widgetEventLogger.logEvent("onclick-ap")}))}))}}function V(){var e=this;if(this.widgetConfig.klarnaModalHTML){var t=this.sezzleElement.getElementsByClassName("klarna-modal-info-link");Array.prototype.forEach.call(t,(function(t){t.addEventListener("click",(function(t){t.target.id="sezzle-modal-return",A(F,e,J).call(e,!0),document.querySelector(".sezzle-klarna-modal").style.display="block",document.querySelector(".sezzle-klarna-modal").focus(),e.widgetEventLogger.logEvent("onclick-klarna")}))}))}}function J(e){var t=document.body;e?(this.scrollDistance=window.pageYOffset||(document.documentElement.clientHeight?document.documentElement.scrollTop:document.body.scrollTop)||0,t.classList.add("sezzle-modal-open"),t.style.top="".concat(-1*this.scrollDistance,"px")):(t.classList.remove("sezzle-modal-open"),window.scrollTo(0,this.scrollDistance),t.style.top=0,document.querySelector(".sezzle-modal")&&(document.querySelector(".sezzle-modal").scrollTop=0),this.scrollDistance=0)}function Z(){try{var e=document.getElementsByClassName("sezzle-checkout-modal-lightbox");e.length?this.modalNode=e[0]:(this.modalNode=document.createElement("section"),this.modalNode.className="sezzle-checkout-modal-lightbox close-sezzle-modal",this.modalNode.style.display="none",this.modalNode.role="dialog",this.modalNode.ariaLabel=this.languageConfig.translations.sezzleInformation,this.modalNode.style.maxHeight="100%",this.modalNode.lang=this.languageConfig.language,document.querySelector("body").appendChild(this.modalNode)),A(F,this,q).call(this)}catch(e){this.widgetEventLogger.logEvent("error",e.message)}}function K(){var e=this;if(document.querySelector(".ap-modal-info-link")){var t=document.createElement("section");t.className="sezzle-checkout-modal-lightbox sezzle-ap-modal",t.style="position: center",t.style.display="none",t.role="dialog",t.ariaLabel="".concat(this.languageConfig.translations.clickToLearnMore," Afterpay"),t.name="".concat(this.languageConfig.translations.clickToLearnMore," Afterpay"),t.innerHTML=this.widgetConfig.apModalHTML||"",document.querySelector("body").appendChild(t);var n=document.querySelector("#afterpay-modal-close-button");null==n||n.addEventListener("click",(function(n){A(F,e,J).call(e,!1),t.style.display="none";var r=document.querySelector("#sezzle-modal-return");r?(r.focus(),r.removeAttribute("id")):document.querySelector(".ap-modal-info-link")?document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".ap-modal-info-link").focus():document.querySelector(".sezzle-checkout-button-wrapper").focus(),n.stopPropagation()}))}}function Q(){var e=this;if(document.querySelector(".klarna-modal-info-link")){var t=document.createElement("section");t.className="sezzle-checkout-modal-lightbox sezzle-klarna-modal",t.style="position: center",t.style.display="none",t.role="dialog",t.ariaLabel="".concat(this.languageConfig.translations.clickToLearnMore," Klarna"),t.name="".concat(this.languageConfig.translations.clickToLearnMore," Klarna"),t.innerHTML=this.widgetConfig.klarnaModalHTML||"",document.querySelector("body").appendChild(t);var n=document.querySelector("button#payment-calculator-interstitial-default__nav-bar__right-icon");null==n||n.addEventListener("click",(function(n){A(F,e,J).call(e,!1),t.style.display="none";var r=document.querySelector("#sezzle-modal-return");r?(r.focus(),r.removeAttribute("id")):document.querySelector(".klarna-modal-info-link")?document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".klarna-modal-info-link").focus():document.querySelector(".sezzle-checkout-button-wrapper").focus(),n.stopPropagation()}))}}function ee(){var e=this;if(document.giveawayConfig){var t=document.querySelector(".sezzle-checkout-modal-lightbox").querySelector(".sezzle-giveaway-timer");t.textContent=this.giveaway.getTimeLeftInDay(),setInterval((function(){t.textContent=e.giveaway.getTimeLeftInDay()}),1e3)}}function te(){if(!document.sezzleDefaultModalVersion||!document.sezzleModalAvailableLanguages)return null;var e=document.head,t=document.createElement("script");t.innerHTML=this.modalNode.querySelector("script").innerHTML,e.appendChild(t)}function ne(e){var t=this.priceProcessor.getParsedPrice(e.priceElement,e.configGroup.ignoredPriceElements,e.configGroup.ignoredFormattedPriceText);if(!t)return this.widgetEventLogger.logEvent("warning","Cannot render modal. Failed to parse price for the element ".concat(e.id||e.className)),null;var n=this.priceProcessor.getProductPriceEligibility(t);n.isLongTermPaymentEligible?document.longTermPayment=this.priceProcessor.getFormattedLongTermPaymentInfo(t,"$"):document.longTermPayment=null,A(F,this,re).call(this,n.isLongTermPaymentEligible)}function re(e){ModalUI?ModalUI.load():this.widgetEventLogger.logEvent("error","ModalUI is undefined. Problem adding modal script to the document"),e||A(F,this,ee).call(this),A(F,this,H).call(this)}const oe=W;function ie(e){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(e)}function ae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,se(r.key),r)}}function ce(e,t,n){return(t=se(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(e){var t=function(e,t){if("object"!=ie(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ie(t)?t:t+""}function le(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ue=new WeakSet,fe=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,ue),ce(this,"merchantUUID",void 0),ce(this,"events",void 0),ce(this,"sentEvents",void 0),!e.initializing)throw new Error("Use static initializer to initialize the logger");this.merchantUUID=t,this.events=[],this.sentEvents=[]}return t=e,r=[{key:"NewWidgetEventLogger",value:function(t){return e.widgetEventLogger||(e.initializing=!0,e.widgetEventLogger=new e(t)),e.widgetEventLogger}},{key:"destruct",value:function(){e.widgetEventLogger=null}}],(n=[{key:"logEvent",value:function(e,t){var n={name:e,description:t||"",createdAt:(new Date).toJSON()},r=n.name.startsWith("onclick");!r&&le(ue,this,he).call(this,n.name,n.description)||(this.events.push(n),r&&(le(ue,this,pe).call(this),this.events=[]))}},{key:"forceSendEvents",value:function(){le(ue,this,pe).call(this),this.events=[]}}])&&ae(t.prototype,n),r&&ae(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function he(e,t){return this.events.some((function(n){return n.name===e&&n.description===t}))}function de(e,t){return this.sentEvents.some((function(n){return n.name===e&&n.description===t}))}function pe(){var e=this;try{var t=[];this.events.forEach((function(n){var r,o,i,a;le(ue,e,de).call(e,n.name,n.description)||(t.push({event_name:n.name,description:n.description,merchant_uuid:null!==(r=e.merchantUUID)&&void 0!==r?r:"",merchant_site:window.location.hostname,created_at:n.createdAt,theme:{name:(null===(o=window)||void 0===o||null===(o=o.Shopify)||void 0===o||null===(o=o.theme)||void 0===o?void 0:o.name)||"",id:(null===(i=window)||void 0===i||null===(i=i.Shopify)||void 0===i||null===(i=i.theme)||void 0===i?void 0:i.theme_store_id)||0,role:(null===(a=window)||void 0===a||null===(a=a.Shopify)||void 0===a||null===(a=a.theme)||void 0===a?void 0:a.role)||"",block_type:document.querySelector("#sezzle-widget-v2-render-reference")?"app":"embed"}}),n.name.startsWith("onclick")||e.sentEvents.push(n))})),t.length>0&&a.sendEvents(t)}catch(e){console.log(e)}}ce(fe,"initializing",void 0),ce(fe,"widgetEventLogger",void 0);const me=fe,ge=JSON.parse('{"apDualInstall":" or %%afterpay-logo%%","clickToLearnMore":"Click to learn more about","giveaway":"or 4 payments of %%price%% with %%logo%%{thresholdPriceText} within %%timer%% to win %%award%% %%info%%","klarnaDualInstall":" or %%klarna-logo%%","longTerm":"or monthly payments as low as %%price%% with %%logo%% %%info%%","sezzleInformation":"Sezzle Information","thresholdPrice":" for orders over %%min-price%%","widget":"or {numberOfPayments} payments of %%price%% with %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}{promotext} %%info%%"}'),ye=JSON.parse('{"apDualInstall":" ou %%afterpay-logo%%","clickToLearnMore":"Cliquez pour en savoir plus sur","giveaway":"ou 4 paiements de %%price%% avec %%logo%%{thresholdPriceText} dans les %%timer%% pour gagner %%award%% %%info%%","klarnaDualInstall":" ou %%afterpay-logo%%","longTerm":"ou des paiements mensuels aussi bas que %%price%% avec %%logo%% %%info%%","sezzleInformation":"Informations Sezzle","thresholdPrice":" pour les achats de plus de %%min-price%%","widget":"ou {numberOfPayments} paiements de %%price%% avec %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}{promotext} %%info%%"}'),ve=JSON.parse('{"apDualInstall":" o %%afterpay-logo%%","clickToLearnMore":"Haga clic para obtener más información sobre","giveaway":"o 4 pagos de %%price%% con %%logo%%{thresholdPriceText} dentro de %%timer%% para ganar %%award%% %%info%%","klarnaDualInstall":" o %%klarna-logo%%","longTerm":"o pagos mensuales tan bajos como %%price%% con %%logo%% %%info%%","sezzleInformation":"Información de Sezzle","thresholdPrice":" por compras superiores a %%min-price%%","widget":"o {numberOfPayments} pagos de %%price%% con %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}{promotext} %%info%%"}');function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ze(r.key),r)}}function ze(e){var t=function(e,t){if("object"!=be(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==be(t)?t:t+""}var Ee=new WeakSet,Se=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,Ee),this.defaultLanguage="en",this.translationsMap={en:ge,fr:ye,es:ve},this.translations=null,this.language=null},t=[{key:"getTranslations",value:function(){return this.translationsMap[this.language]}},{key:"setLanguage",value:function(e){var t;(t="function"==typeof e?e():e)&&"string"==typeof t||(t=document.querySelector("html").lang);var n=t.substring(0,2).toLowerCase();!function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(Ee,this,ke).call(this,n)?this.language=this.defaultLanguage:this.language=n,this.translations=this.getTranslations()}},{key:"getLanguage",value:function(){return this.language||this.defaultLanguage}}],t&&we(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ke(e){var t=0;return Object.getOwnPropertyNames(this.translationsMap).forEach((function(n){n===e&&t++})),t>0}const xe=Se;function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ce(r.key),r)}}function Ce(e){var t=function(e,t){if("object"!=Le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Le(t)?t:t+""}var Te=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.promoTranslations={main:{reward:{is_new_user_only:{true:{threshold:{true:{promocode:{true:[{en:" and get {money} back on first Sezzle order of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} en retour sur la premier achat Sezzle de {threshold} ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} back on first Sezzle order of {threshold} or more"},{fr:" et recevez {money} en retour sur la premier achat Sezzle de {threshold} ou plus"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} back on first Sezzle order using promo code {promocode}"},{fr:" et recevez {money} en retour sur la premier achat Sezzle en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle usando el código promocional {promocode}"}],false:[{en:" and get {money} back on first Sezzle order"},{fr:" et recevez {money} en retour sur la premier achat Sezzle"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle"}]}}}},false:{threshold:{true:{promocode:{true:[{en:" and get {money} back on purchases of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} en retour sur les achats de {threshold} ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta en compras de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} back on purchases of {threshold} or more"},{fr:" et recevez {money} en retour sur les achats de {threshold} ou plus"},{es:" y recibe {money} de vuelta en compras de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} back using promo code {promocode}"},{fr:" et recevez {money} en retour en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta usando el código promocional {promocode}"}],false:[{en:" and get {money} back"},{fr:" et recevez {money} en retour"},{es:" y recibe {money} de vuelta"}]}}}}}},discount:{is_new_user_only:{true:{threshold:{true:{promocode:{true:[{en:" and get {money} off first Sezzle order of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} off first Sezzle order of {threshold} or more"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle de {threshold} ou plus"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} off first Sezzle order using promo code {promocode}"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento en el primera compra de Sezzle usando el código promocional {promocode}"}],false:[{en:" and get {money} off first Sezzle order"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle"},{es:" y recibe {money} de descuento en el primera compra de Sezzle"}]}}}},false:{threshold:{true:{promocode:{true:[{en:" and get {money} off on purchases of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle de {threshold} ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} off on purchases of {threshold} or more"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle de {threshold} ou plus"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} off using promo code {promocode}"},{fr:" et recevez {money} de réduction en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento usando el código promocional {promocode}"}],false:[{en:" and get {money} off"},{fr:" et recevez {money} de réduction"},{es:" y recibe {money} de descuento"}]}}}}}}}}},t=[{key:"getMainViewTranslationTextByLanguage",value:function(e,t,n,r,o,i){var a=this.promoTranslations.main[e].is_new_user_only[t].threshold[n].promocode[r];if(a){var c=a.find((function(e){return e["".concat(o)]}));return c?c["".concat(o)]:(a.find((function(e){return e["".concat(i)]})),function(e){throw new TypeError('"languageText" is read-only')}(),c["".concat(i)])}return""}},{key:"getModalViewTranslationTextByLanguage",value:function(e,t){var n=this.promoTranslations.modal;if(n){var r=n.find((function(t){return t["".concat(e)]}));return r?r["".concat(e)]:(r=n.find((function(e){return e["".concat(t)]})))["".concat(t)]}return""}}],t&&Pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const Oe=Te;function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Me(r.key),r)}}function Me(e){var t=function(e,t){if("object"!=_e(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=_e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_e(t)?t:t+""}var De=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.promoConfig=t,this.promoConfig&&(this.promoInitiative={name:this.promoConfig.promo_initiative_name,link:this.promoConfig.promo_initiative_link}),this.language=n.language,this.defaultLanguage=n.defaultLanguage,this.promoTranslations=new Oe}return t=e,r=[{key:"getPromotionString",value:function(t,n,r,o){var i=$e[t.type],a=!!t.spend_award_threshold_in_cents,c=!!t.is_new_user_only&&t.is_new_user_only,s=!!t.promo_code,l=o.getMainViewTranslationTextByLanguage(i,c,a,s,n,r);return l=l.replace("{money}",e.format(n,t.currency_code,t.spend_award_in_cents)),a&&(l=l.replace("{threshold}",e.format(n,t.currency_code,t.spend_award_threshold_in_cents))),s&&(l=l.replace("{promocode}",t.promo_code)),l}},{key:"format",value:function(e,t,n){var r=new Intl.NumberFormat(e,{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:0}),o=new Intl.NumberFormat(e,{style:"currency",currency:t,minimumFractionDigits:2}),i=parseInt(n)/100;return i%1==0?r.format(i):o.format(i)}}],(n=[{key:"getPromotionString",value:function(){return this.promoConfig?e.getPromotionString(this.promoConfig,this.language,this.defaultLanguage,this.promoTranslations):""}}])&&je(t.prototype,n),r&&je(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}(),$e={1:"reward",2:"discount"};const Ne=De;var Ie=n(353),Ae=n.n(Ie),Fe=n(826),We=n.n(Fe),qe=n(569),Ge=n.n(qe);function Ue(e){return Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(e)}function Be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,He(r.key),r)}}function He(e){var t=function(e,t){if("object"!=Ue(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ue(t)?t:t+""}Ae().extend(We()),Ae().extend(Ge());var Re=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.giveawayConfig=t},(t=[{key:"getTimeLeftInDay",value:function(){Ae().tz.setDefault("America/Chicago");var e=Ae().tz(),t=Ae().tz().endOf("day").diff(e,"seconds");return Ae().tz.setDefault(),new Date(1e3*t).toISOString().substring(11,19)}}])&&Be(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const Ye=Re;function Xe(e){return Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xe(e)}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ze(r.key),r)}}function Ze(e){var t=function(e,t){if("object"!=Xe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Xe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xe(t)?t:t+""}function Ke(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Qe=new WeakSet,et=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,Qe),this.terms=t||[{price:1e3,options:[[48,8.99],[36,7.99],[3,0]]},{price:500,options:[[24,7.99],[12,6.99],[3,0]]},{price:250,options:[[12,6.99],[9,5.99],[3,0]]},{price:100,options:[[9,5.99],[6,5.99],[3,0]]}]},(t=[{key:"getPaymentInfo",value:function(e){var t=this;if(!e||e<=0)throw new Error("Unable to calculate Long Term payments: product price is undefined or non-positive");var n=Ke(Qe,this,rt).call(this,e),r={productPrice:e,paymentTerms:[]};return r.paymentTerms=n.map((function(n){var r=n[0],o=n[1],i=Ke(Qe,t,tt).call(t,e,r,o),a=Ke(Qe,t,ot).call(t,i*r);return{durationInMonths:r,apr:o,monthlyPayment:i,totalAmount:a,totalInterest:a-e}})),r.paymentTerms.sort((function(e,t){return e.monthlyPayment-t.monthlyPayment})),r}},{key:"calculateLowestAvailablePayment",value:function(e){if(!e||e<=0)throw new Error("Unable to calculate lowest Long Term payment: product price is undefined or non-positive");var t=Ke(Qe,this,nt).call(this,e);return Ke(Qe,this,tt).call(this,e,t[0],t[1])}}])&&Je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function tt(e,t,n){if(n>0){var r=n/100/12,o=Math.pow(1+r,t);return e*r*o/(o-1)}return e/t}function nt(e){return Ke(Qe,this,rt).call(this,e)[0]}function rt(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ve(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(this.terms);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e>r.price)return r.options}}catch(e){n.e(e)}finally{n.f()}return this.terms[this.terms.length-1].options}function ot(e){return Math.round(100*e)/100}const it=et;function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function st(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lt(r.key),r)}}function lt(e){var t=function(e,t){if("object"!=at(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=at(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==at(t)?t:t+""}function ut(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ft=new WeakSet,ht=function(){return e=function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,ft),this.sezzleDOMFunctions=r,this.widgetEventLogger=o,this.widgetConfig=t,this.longTermPaymentConfig=n,this.placeholder="{price}",this.numberOfDecimals=2,this.thousandDelimiter=/\B(?=(\d{3})+(?!\d))/g,this.naFormat=/^\d{1,3}(,\d{3})+(\.\d+)?$/,this.euFormat=/^\d{1,3}(\.\d{3})+(,\d+)?$/,this.euFormatWithSpace=/^\d{1,3}(\s\d{3})+(,\d+)?$/,this.euDecimalsNoThousandDelimiterFormat=/(^\d+((,\d{1,2})|(,\d{4,}))$)|(^\d{4,},\d+$)/},(t=[{key:"getParsedPrice",value:function(e,t,n){var r=this.sezzleDOMFunctions.getPriceText(e,t);return r?(r=ut(ft,this,dt).call(this,r,n),ut(ft,this,pt).call(this,r)):(this.widgetEventLogger.logEvent("warning","No price text after ignored price elements."),null)}},{key:"getCurrency",value:function(e){if(!e)return"";var t=e.match(/(?:[\$\xA2-\xA5\u058F\u060B\u07FE\u07FF\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20C0\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]|\uD807[\uDFDD-\uDFE0]|\uD838\uDEFF|\uD83B\uDCB0)/g);return t?t[0]:""}},{key:"getFormattedWidgetPrice",value:function(e,t){if(!e.prices||0===e.prices.length)throw new Error("Cannot get formatted widget price: no product prices are provided");var n,r=e.formatter,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ct(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(e.prices);try{for(o.s();!(n=o.n()).done;){var i,a,c=n.value;a=t?new it(this.longTermPaymentConfig.paymentTerms).calculateLowestAvailablePayment(c.value).toFixed(this.numberOfDecimals):(c.value/4).toFixed(this.numberOfDecimals),i=ut(ft,this,mt).call(this,a,c.format),r=r.replace(this.placeholder,i)}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"getFormattedMinPrice",value:function(e){var t=e.prices[0].format,n=e.formatter,r=ut(ft,this,mt).call(this,this.widgetConfig.minPrice/100,t),o=ut(ft,this,gt).call(this,n);return o?n.split(o)[0].replace(this.placeholder,r).trim():n.replace(this.placeholder,r)}},{key:"getProductPriceEligibility",value:function(e){var t=this.getProductPriceInCents(e);return{isPriceLessThanMinPrice:!!(t<this.widgetConfig.minPrice),isPriceGreaterThanMaxPrice:!!(t>this.widgetConfig.maxPrice),isLongTermPaymentEligible:!!(this.longTermPaymentConfig&&t>=this.longTermPaymentConfig.minPrice&&t<=this.longTermPaymentConfig.maxPrice)}}},{key:"getFormattedLongTermPaymentInfo",value:function(e){var t=this;if(!e.currency)throw new Error("Cannot get formatted long term payment info: the currency symbol is not provided");var n=e.prices[0].value,r=new it(this.longTermPaymentConfig.paymentTerms).getPaymentInfo(n),o={productPrice:e.currency+r.productPrice.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),paymentTerms:[]};return o.paymentTerms=r.paymentTerms.map((function(n){return{durationInMonths:n.durationInMonths,apr:n.apr,monthlyPayment:e.currency+n.monthlyPayment.toFixed(t.numberOfDecimals).replace(t.thousandDelimiter,","),totalAmount:e.currency+n.totalAmount.toFixed(t.numberOfDecimals).replace(t.thousandDelimiter,","),totalInterest:e.currency+n.totalInterest.toFixed(t.numberOfDecimals).replace(t.thousandDelimiter,",")}})),o}},{key:"getProductPriceInCents",value:function(e){if(!e.prices||0===e.prices.length)throw new Error("Cannot get formatted widget price: no product prices are provided");return 100*e.prices[0].value}}])&&st(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function dt(e,t){return e=e.replace("\n","").replace(/\u00a0/g," ").trim(),t&&t.forEach((function(t){var n=new RegExp(t,"ig");e=e.replace(n,"")})),e}function pt(e){var t=this,n=new RegExp(/\d+((\.|,|\s)\d+)*/g),r=a.matchAll(n,e);if(0===r.length||r.length>2)return this.widgetEventLogger.logEvent("warning","priceText ".concat(r," contains unexpected number of values")),null;var o={formatter:e.replace(n,this.placeholder),prices:[],currency:this.getCurrency(e)};return o.prices=r.map((function(e){var n,r=e;return t.naFormat.test(e)&&(r=e.replaceAll(",",""),n=t.naFormat),t.euFormat.test(e)&&(r=e.replaceAll(".","").replaceAll(",","."),n=t.euFormat),t.euFormatWithSpace.test(e)&&(r=e.replaceAll("/s","").replaceAll(",",".").replaceAll(" ",""),n=t.euFormatWithSpace),t.euDecimalsNoThousandDelimiterFormat.test(e)&&(r=e.replaceAll(",","."),n=t.euDecimalsNoThousandDelimiterFormat),NaN===parseFloat(r)&&t.widgetEventLogger.logEvent("warning","parsed price element text ".concat(r," is not a number")),{value:parseFloat(r),format:n}})),o}function mt(e,t){switch(t){case this.naFormat:return e.toString().replace(this.thousandDelimiter,",");case this.euFormat:return e.toString().replace(".",",").replace(this.thousandDelimiter,".");case this.euFormatWithSpace:return e.toString().replace(".",",").replace(this.thousandDelimiter," ");case this.euDecimalsNoThousandDelimiterFormat:return e.toString().replace(".",",");default:return e.toString()}}function gt(e){var t="";return["–","-"].forEach((function(n){e.includes(n)&&(t=n)})),t}const yt=ht;function vt(e){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vt(e)}var bt;function wt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return zt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,St(r.key),r)}}function St(e){var t=function(e,t){if("object"!=vt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vt(t)?t:t+""}function kt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var xt,Lt,Pt,Ct=new WeakSet,Tt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,Ct),this.widgetEventLogger=t}return t=e,(n=[{key:"logCompetitorEvents",value:function(){for(var t in e.competitorWidgets)kt(Ct,this,Ot).call(this,t)&&this.widgetEventLogger.logEvent("competitor-widget",t)}}])&&Et(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function Ot(e){var t,n=wt(bt.competitorWidgets[e].tagNames);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(document.getElementsByTagName(r).length)return!0}}catch(e){n.e(e)}finally{n.f()}var o,i=wt(bt.competitorWidgets[e].ids);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(document.getElementById(a))return!0}}catch(e){i.e(e)}finally{i.f()}var c,s=wt(bt.competitorWidgets[e].classes);try{for(s.s();!(c=s.n()).done;){var l=c.value;if(document.getElementsByClassName(l).length)return!0}}catch(e){s.e(e)}finally{s.f()}}bt=Tt,xt=Tt,Pt={klarna:{tagNames:["klarna-placement"],ids:[],classes:[]},afterpay:{tagNames:["afterpay-placement"],ids:[],classes:["afterpay-paragraph"]},shoppay:{tagNames:["shopify-payment-terms","shop-pay-installments-banner"],ids:["shopify-installments"],classes:["shopify-installments"]},affirm:{tagNames:[],ids:["afffirm-promo-box"],classes:["affirm-as-low-as"]},paypal:{tagNames:[],ids:["paypal-commerce-proddetails-messaging-banner","paypal_message","paypal_message_container"],classes:["paypal-message","paypal-message-container"]},quadpay:{tagNames:["quadpay-widget"],ids:["qp-container"],classes:["qp-widget-container","qp-container"]},zip:{tagNames:["quadpay-widget-v3"],ids:["qp-container"],classes:["qp-container"]}},(Lt=St(Lt="competitorWidgets"))in xt?Object.defineProperty(xt,Lt,{value:Pt,enumerable:!0,configurable:!0,writable:!0}):xt[Lt]=Pt;const _t=Tt;function jt(e){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(e)}function Mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dt(r.key),r)}}function Dt(e){var t=function(e,t){if("object"!=jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jt(t)?t:t+""}function $t(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Nt=n(193),It=new WeakSet,At=function(){return function(e,t,n){return t&&Mt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,It),function(e,t,n){(t=Dt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"intervalInMs",void 0),this.intervalInMs=2e3,this.widgetConfig=t,this.widgetEventLogger=n,this.competitor=new _t(this.widgetEventLogger),this.sezzleDOMFunctions=new j(t),this.language=r,this.promotion=new Ne(document.sezzlePromotion,this.language),this.giveaway=new Ye(document.giveawayConfig),this.priceProcessor=new yt(t,document.longTermPaymentConfig,this.sezzleDOMFunctions,this.widgetEventLogger),this.modal=new oe(t,n,this.giveaway,this.promotion,this.priceProcessor,this.language)}),[{key:"initializeRendering",value:function(){$t(It,this,en).call(this,this.widgetConfig.observeElements),$t(It,this,Ft).call(this,[]),this.modal.renderModals()}}])}();function Ft(e){var t=this;e=e.filter((function(e){return null!=e.widget})),this.widgetConfig.configGroups.forEach((function(n,r){t.sezzleDOMFunctions.getElementsByXPath(n.xpath).forEach((function(o){if(!o.hasAttribute("data-sezzleindex")){var i=$t(It,t,Gt).call(t,o,r,n);if(i){t.widgetEventLogger.logEvent("onload");try{var a={priceElement:o,observer:t.sezzleDOMFunctions.startObserve(o,(function(e){$t(It,t,Wt).call(t,e,n,t.priceProcessor)})),widget:i,configGroup:n};e.push(a),t.modal.addClickEventForModal(a),t.sezzleDOMFunctions.observeRelatedElements(a.priceElement,a.widget,a.configGroup.relatedElementActions)}catch(e){t.widgetEventLogger.logEvent("warning","The widget has been rendered, but an error occurred when running additional instructions: ".concat(e.message))}}}}))})),e.forEach((function(e){document.body.contains(e.priceElement)||(null!==e.observer&&e.observer.disconnect(),e.widget.remove(),e.widget=null)}));for(var n=0,r=this.widgetConfig.configGroups.length;n<r;n++)this.sezzleDOMFunctions.hideSezzleHideElements(n);setTimeout((function(){$t(It,t,Ft).call(t,e),t.competitor.logCompetitorEvents(),t.widgetEventLogger.forceSendEvents()}),this.intervalInMs);var o=document.querySelector(".sezzle-");null!==o&&(o.classList.contains("sezzle-hidden")||o.classList.add("sezzle-hidden"))}function Wt(e,t,n){var r=this;e.filter((function(e){return"childList"===e.type})).forEach((function(e){var o=e.target.dataset.sezzleindex,i=document.querySelector(".sezzleindex-".concat(o));if(i){var a=i.parentElement,c=a.parentElement.parentElement;try{c.classList.remove("sezzle-hidden");var s=n.getParsedPrice(e.target,t.ignoredPriceElements,t.ignoredFormattedPriceText),l=n.getProductPriceEligibility(s);(l.isPriceGreaterThanMaxPrice&&!l.isLongTermPaymentEligible||!l.isLongTermPaymentEligible&&r.widgetConfig.config.isLongTermOnly)&&c.classList.add("sezzle-hidden");var u=$t(It,r,Ut).call(r,t,o,l,s);a.innerHTML=u.innerHTML}catch(e){c.classList.add("sezzle-hidden"),r.widgetEventLogger.logEvent("warning",e.message)}}}))}function qt(e){return e&&0===Object.keys(e).length&&e.constructor===Object}function Gt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;try{if(e.classList.contains("sezzle-ignored-price-element"))return null;var r=this.priceProcessor.getParsedPrice(e,n.ignoredPriceElements,n.ignoredFormattedPriceText);if(!r)return this.widgetEventLogger.logEvent("warning","Cannot render widget. Failed to parse price for the element ".concat(e.id||e.className)),null;var o=this.priceProcessor.getProductPriceEligibility(r);if(o.isPriceGreaterThanMaxPrice&&!o.isLongTermPaymentEligible||!o.isLongTermPaymentEligible&&this.widgetConfig.config.isLongTermOnly)return null;var i=this.sezzleDOMFunctions.getElementToRender(e,t);e.dataset.sezzleindex=t,"auto"===n.alignment&&(n.alignment=$t(It,this,Ht).call(this,e));var a=document.createElement("div");a.className="sezzle-shopify-info-button sezzlewidgetindex-".concat(t),$t(It,this,Rt).call(this,a),$t(It,this,qt).call(this,n.containerStyle)||$t(It,this,Yt).call(this,a,n);var c=document.createElement("div");c.ariaHasPopup="dialog",c.role="button",c.className="sezzle-checkout-button-wrapper sezzle-modal-link",c.tabIndex=0,c.style.cursor="pointer",$t(It,this,Rt).call(this,c),$t(It,this,Xt).call(this,c,n);var s=$t(It,this,Ut).call(this,n,t,o,r);return c.appendChild(s),a.appendChild(c),n.widgetIsFirstChild?$t(It,this,Qt).call(this,a,i):$t(It,this,Kt).call(this,a,i),a}catch(e){return this.widgetEventLogger.logEvent("error","An exception occurred when rendering a widget: ".concat(e.message)),null}}function Ut(e,t,n,r){var o=this,i=document.createElement("div");return i.className="sezzle-button-text",i.style.fontSize="14px",i.style.lineHeight="18px",$t(It,this,qt).call(this,e.textStyle)||$t(It,this,Vt).call(this,i,e),$t(It,this,Xt).call(this,i,e),$t(It,this,Jt).call(this,i,e),$t(It,this,Bt).call(this,e,n).forEach((function(a){switch(a){case"sup":var c=document.createElement("sup");c.textContent="1",i.appendChild(c);break;case"price":var s=document.createElement("span");s.className="sezzle-payment-amount sezzle-button-text sezzleindex-".concat(t);var l=o.priceProcessor.getFormattedWidgetPrice(r,n.isLongTermPaymentEligible),u=document.createTextNode(l);s.appendChild(u),i.appendChild(s);break;case"logo":var f=document.createElement("img");f.className="sezzle-logo ".concat(e.imageClassName),f.src=e.imageURL,f.alt="Sezzle",f.style.height="18px",f.style.width="72px",i.appendChild(f),$t(It,o,qt).call(o,e.logoStyle)||$t(It,o,Zt).call(o,f,e);break;case"info":var h=document.createElement("div");h.ariaLabel="".concat(o.language.translations.clickToLearnMore," Sezzle"),h.name="".concat(o.language.translations.clickToLearnMore," Sezzle"),h.className="sezzle-info-icon sezzle-modal-link",h.innerHTML="&#9432",h.style="font-size: ".concat(e.textStyle.fontSize,"px"),i.appendChild(h);break;case"afterpay-logo":var d=document.createElement("img");d.className="sezzle-ap-logo ap-modal-info-link no-sezzle-info",d.src="https://media.sezzle.com/sezzle-credit-website-assets/ap-badge-black-on-mint.svg",d.alt="".concat(o.language.translations.clickToLearnMore," Afterpay"),i.appendChild(d);break;case"klarna-logo":var p=document.createElement("img");p.className="sezzle-klarna-logo klarna-modal-info-link no-sezzle-info",p.src="https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg",p.alt="".concat(o.language.translations.clickToLearnMore," Klarna"),i.appendChild(p);break;case"line-break":var m=document.createElement("br");i.appendChild(m);break;case"min-price":var g=document.createElement("span");g.className="sezzle-payment-amount sezzle-button-text sezzleindex-".concat(t);var y=o.priceProcessor.getFormattedMinPrice(r),v=document.createTextNode(y);g.appendChild(v),i.appendChild(g);break;case"timer":var b=document.createElement("span");b.className="sezzle-giveaway-timer",b.textContent=o.giveaway.getTimeLeftInDay(),i.appendChild(b),setInterval((function(){b.textContent=o.giveaway.getTimeLeftInDay()}),1e3);break;case"award":var w=document.createElement("span");w.className="sezzle-giveaway-award",w.textContent="$".concat(document.giveawayConfig.award),i.appendChild(w);break;default:var z=document.createTextNode(a);i.appendChild(z)}})),i}function Bt(e,t){var n;if(n=t.isLongTermPaymentEligible?this.language.translations.longTerm:document.giveawayConfig?this.language.translations.giveaway:this.language.translations.widget,t.isPriceLessThanMinPrice){var r=this.language.translations.thresholdPrice;n=n.replace("{thresholdPriceText}",r)}else if(this.widgetConfig.apDualInstall){var o=this.language.translations.apDualInstall;n=n.replace("{apDualInstallText}",o)}else if(this.widgetConfig.klarnaDualInstall){var i=this.language.translations.klarnaDualInstall;n=n.replace("{klarnaDualInstallText}",i)}n=(n=(n=n.replace("{numberOfPayments}",this.widgetConfig.numberOfPayments)).replace("{apDualInstallText}","")).replace("{klarnaDualInstallText}","");var a=this.promotion.getPromotionString();return(n=(n=n.replace("{promotext}",a)).replace("{thresholdPriceText}","")).split("%%")}function Ht(e){if(!e)return"left";var t=window.getComputedStyle(e).textAlign;return"start"===t||"justify"===t?"left":"end"===t?"right":t}function Rt(e){return e.className+=" sezzle-".concat(this.widgetConfig.merchantID),e}function Yt(e,t){Object.keys(t.containerStyle).forEach((function(n){e.style[n]=t.containerStyle[n]}))}function Xt(e,t){var n="";if("undefined"!=typeof matchMedia&&t.alignmentSwitchMinWidth&&t.alignmentSwitchType){var r="(min-width: ".concat(t.alignmentSwitchMinWidth,"px)");window.matchMedia(r).matches||(n=t.alignmentSwitchType)}var o=n||t.alignment||"auto";e.className+=" sezzle-".concat(o)}function Vt(e,t){Object.keys(t.textStyle).forEach((function(n){e.style[n]=t.textStyle[n]}))}function Jt(e,t){switch(t.theme){case"dark":case"white-flat":e.className+=" szl-dark";break;default:e.className+=" szl-light"}}function Zt(e,t){Object.keys(t.logoStyle).forEach((function(n){e.style[n]=t.logoStyle[n]}))}function Kt(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function Qt(e,t){for(t.parentElement.insertBefore(e,t);e.previousSibling;)e.parentElement.insertBefore(e,e.previousSibling)}function en(e){Array.isArray(e)&&0!=e.length&&e.forEach((function(e){var t=document.querySelectorAll(e.element);t.length>0&&t.forEach((function(t){t.addEventListener(e.eventType,(function(){var e=document.querySelector("[data-sezzleindex]");e&&e.removeAttribute("data-sezzleindex");var t=document.querySelector(".sezzle-shopify-info-button");t&&t.remove();var n=me.NewWidgetEventLogger(document.sezzleConfig.merchantID);new pn(Nt(document.sezzleConfig),n).init()}))}))}))}const tn=At;function nn(e){return nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nn(e)}function rn(){rn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),c=new O(r||[]);return o(a,"_invoke",{value:L(e,n,c)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};l(w,a,(function(){return this}));var z=Object.getPrototypeOf,E=z&&z(z(_([])));E&&E!==n&&r.call(E,a)&&(w=E);var S=b.prototype=y.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(o,i,a,c){var s=f(e[o],e,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==nn(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function L(t,n,r){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=P(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?m:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function P(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(nn(t)+" is not iterable")}return v.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=l(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(x.prototype),l(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new x(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),l(S,s,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function on(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function an(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){on(i,r,o,a,c,"next",e)}function c(e){on(i,r,o,a,c,"throw",e)}a(void 0)}))}}function cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sn(r.key),r)}}function sn(e){var t=function(e,t){if("object"!=nn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=nn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nn(t)?t:t+""}function ln(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var un=new WeakSet,fn=function(){return function(e,t,n){return t&&cn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,un),this.basicWidgetConfiguration=t,this.widgetEventLogger=n,this.competitor=new _t(this.widgetEventLogger)}),[{key:"init",value:(e=an(rn().mark((function e(){var t,n,r,o;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.widgetEventLogger.logEvent("request"),(t=a.getCookie("shopify_pay_redirect"))&&this.widgetEventLogger.logEvent("shopify-pay-redirect-".concat(t)),n=new xe,r=new P(this.basicWidgetConfiguration,n,this.widgetEventLogger),e.next=8,r.setAPModalHTML();case 8:return e.next=10,r.setKlarnaModalHTML();case 10:if(!((o=r.getSezzleConfig).configGroups.length>0)){e.next=14;break}return e.next=14,ln(un,this,hn).call(this,o,n);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),this.widgetEventLogger.logEvent("error",e.t0.message);case 19:this.widgetEventLogger.forceSendEvents();case 20:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(){return e.apply(this,arguments)})}]);var e}();function hn(e,t){return dn.apply(this,arguments)}function dn(){return(dn=an(rn().mark((function e(t,n){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:new tn(t,this.widgetEventLogger,n).initializeRendering(),a.isWidgetDuplicateFound()&&this.widgetEventLogger.logEvent("duplicate-widget"),this.competitor.logCompetitorEvents();case 4:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}const pn=fn;var mn=n(72),gn=n.n(mn),yn=n(825),vn=n.n(yn),bn=n(659),wn=n.n(bn),zn=n(56),En=n.n(zn),Sn=n(540),kn=n.n(Sn),xn=n(113),Ln=n.n(xn),Pn=n(23),Cn={};Cn.styleTagTransform=Ln(),Cn.setAttributes=En(),Cn.insert=wn().bind(null,"head"),Cn.domAPI=vn(),Cn.insertStyleElement=kn(),gn()(Pn.A,Cn),Pn.A&&Pn.A.locals&&Pn.A.locals;var Tn=n(193);!function(){var e=Tn(document.sezzleConfig),t=null==e?void 0:e.merchantID,n=me.NewWidgetEventLogger(t||"");if(!function(e){return!!e&&(document.sezzleJSMerchantUUIDs||(document.sezzleJSMerchantUUIDs=[]),!!document.sezzleJSMerchantUUIDs.includes(e)||(document.sezzleJSMerchantUUIDs.push(e),!1))}(t)){if(!e)return n.logEvent("request"),n.logEvent("error","No sezzleConfig is found in the document. Check that at least a default or a custom override config is presented for the merchant"),void n.forceSendEvents();t||n.logEvent("warning","Merchant UUID is not provided"),a.waitForBodyToBeReady().then((function(){new pn(e,n).init()}))}}()})()})();