@htmlbricks/hb-checkout 0.50.0-alpha.17 → 0.50.0-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/main.iife.js CHANGED
@@ -20,7 +20,7 @@ var Mi=Object.defineProperty;var Mr=K=>{throw TypeError(K)};var Ri=(K,re,de)=>re
20
20
  height: 0;
21
21
  overflow: hidden;
22
22
  }
23
- `,a instanceof Document&&a.head?a.head.appendChild(s):a.appendChild(s)}}isClientInvalidated(e){return this.oldInvalidationValues?this.getInvalidationValues(e).some((r,a)=>JSON.stringify(r)!==JSON.stringify(this.oldInvalidationValues[a])):!0}getInvalidationValues(e){var n,r;return[e.environment,e.existingPaymentMethodRequired,!!e.onPaymentDataChanged,!!e.onPaymentAuthorized,e.buttonType,e.buttonColor,e.buttonRadius,e.buttonLocale,e.buttonSizeMode,e.paymentRequest.merchantInfo.merchantId,e.paymentRequest.merchantInfo.merchantName,(n=e.paymentRequest.merchantInfo.softwareInfo)===null||n===void 0?void 0:n.id,(r=e.paymentRequest.merchantInfo.softwareInfo)===null||r===void 0?void 0:r.version,e.paymentRequest.allowedPaymentMethods]}}var Ka="@google-pay/button-element",Qa="3.1.0";function ei(t,e=0){let n;return function(...r){window.clearTimeout(n);const a=function(){return n=void 0,t(...r)};return new Promise(i=>{n=window.setTimeout(()=>{const s=a();i(s)},e)})}}class le extends HTMLElement{constructor(){super(...arguments),this.manager=new Za({cssSelector:"google-pay-button",softwareInfoId:Ka,softwareInfoVersion:Qa}),this.initializeButton=ei(()=>{if(!this.assertRequiredProperty("paymentRequest")||!this.assertRequiredProperty("environment"))return;const e={paymentRequest:this.paymentRequest,environment:this.environment,existingPaymentMethodRequired:this.existingPaymentMethodRequired,onPaymentDataChanged:this.onPaymentDataChanged,onPaymentAuthorized:this.onPaymentAuthorized,buttonColor:this.buttonColor,buttonType:this.buttonType,buttonRadius:this.buttonRadius,buttonSizeMode:this.buttonSizeMode,buttonLocale:this.buttonLocale,onReadyToPayChange:n=>{this.onReadyToPayChange&&this.onReadyToPayChange(n),this.dispatch("readytopaychange",n)},onCancel:n=>{this.onCancel&&this.onCancel(n),this.dispatch("cancel",n)},onError:n=>{var r;this.onError&&((r=this.onError)===null||r===void 0||r.call(this,n)),this.dispatchEvent(new ErrorEvent("error",{error:n}))},onLoadPaymentData:n=>{this.onLoadPaymentData&&this.onLoadPaymentData(n),this.dispatch("loadpaymentdata",n)},onClick:n=>{var r;this.onClick&&((r=this.onClick)===null||r===void 0||r.call(this,n))}};this.manager.configure(e)})}get isReadyToPay(){return this.manager.isReadyToPay}assertRequiredProperty(e){const n=this[e];return n==null?(this.throwError(Error(`Required property not set: ${e}`)),!1):!0}throwError(e){throw e}static get observedAttributes(){return le._observedAttributes}addObservedAttribute(e){le._observedAttributes.push(e)}dispatch(e,n){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,detail:n}))}connectedCallback(){return Gt(this,void 0,void 0,function*(){return yield this.manager.mount(this),this.initializeButton()})}disconnectedCallback(){this.manager.unmount()}attributeChangedCallback(e){return this.initializeButton()}notifyPropertyChanged(e){return this.initializeButton()}}le._observedAttributes=[],_e([_n(),U("paymentrequest")],le.prototype,"paymentRequest",void 0),_e([pt()],le.prototype,"environment",void 0),_e([Ja(),U("existingpaymentmethodrequired")],le.prototype,"existingPaymentMethodRequired",void 0),_e([pt(),U("buttoncolor")],le.prototype,"buttonColor",void 0),_e([pt(),U("buttontype")],le.prototype,"buttonType",void 0),_e([pt(),U("buttonradius")],le.prototype,"buttonRadius",void 0),_e([pt(),U("buttonsizemode")],le.prototype,"buttonSizeMode",void 0),_e([pt(),U("buttonlocale")],le.prototype,"buttonLocale",void 0),_e([_n(),U("paymentDataChangedCallback"),U("paymentdatachangedcallback"),U("onpaymentdatachanged")],le.prototype,"onPaymentDataChanged",void 0),_e([_n(),U("paymentAuthorizedCallback"),U("paymentauthorizedcallback"),U("onpaymentauthorized")],le.prototype,"onPaymentAuthorized",void 0),_e([U("readyToPayChangeCallback"),U("readytopaychangecallback"),U("onreadytopaychange")],le.prototype,"onReadyToPayChange",void 0),_e([U("loadPaymentDataCallback"),U("loadpaymentdatacallback"),U("onloadpaymentdata")],le.prototype,"onLoadPaymentData",void 0),_e([U("cancelCallback"),U("cancelcallback"),U("oncancel")],le.prototype,"onCancel",void 0),_e([U("errorCallback"),U("errorcallback"),U("onerror")],le.prototype,"onError",void 0),_e([U("clickCallback"),U("clickcallback"),U("onclick")],le.prototype,"onClick",void 0),customElements.define("google-pay-button",le);const _r={version:"0.50.0-alpha.17"},he=[{type:"text",placeholder:"Insert your Full Name here...",id:"fullName",required:!0,label:"Full Name",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your Street/Square address with number...",id:"addressWithNumber",required:!0,label:"Street/Square/...",validationTip:"This field cannot be empty."},{id:"name-row2",type:"row",params:{columns:[{type:"text",placeholder:"Insert your nationality here...",id:"nationality",required:!0,label:"Nationality",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your city name here...",id:"city",required:!0,label:"City",validationTip:"This field cannot be empty."},{type:"number",placeholder:"Insert your zip code here...",id:"zip",required:!0,label:"Zip",validationTip:"This field cannot be empty."}]}}];function yr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jt={exports:{}},ti=Jt.exports,br;function ni(){return br||(br=1,function(t,e){(function(n,r){t.exports=r()})(ti,function(){var n=1e3,r=6e4,a=36e5,i="millisecond",s="second",u="minute",l="hour",o="day",c="week",f="month",d="quarter",m="year",w="date",q="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,R={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(h){var p=["th","st","nd","rd"],_=h%100;return"["+h+(p[(_-20)%10]||p[_]||p[0])+"]"}},X=function(h,p,_){var E=String(h);return!E||E.length>=p?h:""+Array(p+1-E.length).join(_)+h},ae={s:X,z:function(h){var p=-h.utcOffset(),_=Math.abs(p),E=Math.floor(_/60),b=_%60;return(p<=0?"+":"-")+X(E,2,"0")+":"+X(b,2,"0")},m:function h(p,_){if(p.date()<_.date())return-h(_,p);var E=12*(_.year()-p.year())+(_.month()-p.month()),b=p.clone().add(E,f),v=_-b<0,g=p.clone().add(E+(v?-1:1),f);return+(-(E+(_-b)/(v?b-g:g-b))||0)},a:function(h){return h<0?Math.ceil(h)||0:Math.floor(h)},p:function(h){return{M:f,y:m,w:c,d:o,D:w,h:l,m:u,s,ms:i,Q:d}[h]||String(h||"").toLowerCase().replace(/s$/,"")},u:function(h){return h===void 0}},ee="en",F={};F[ee]=R;var ie="$isDayjsObject",fe=function(h){return h instanceof rt||!(!h||!h[ie])},Ce=function h(p,_,E){var b;if(!p)return ee;if(typeof p=="string"){var v=p.toLowerCase();F[v]&&(b=v),_&&(F[v]=_,b=v);var g=p.split("-");if(!b&&g.length>1)return h(g[0])}else{var x=p.name;F[x]=p,b=x}return!E&&b&&(ee=b),b||!E&&ee},Z=function(h,p){if(fe(h))return h.clone();var _=typeof p=="object"?p:{};return _.date=h,_.args=arguments,new rt(_)},j=ae;j.l=Ce,j.i=fe,j.w=function(h,p){return Z(h,{locale:p.$L,utc:p.$u,x:p.$x,$offset:p.$offset})};var rt=function(){function h(_){this.$L=Ce(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[ie]=!0}var p=h.prototype;return p.parse=function(_){this.$d=function(E){var b=E.date,v=E.utc;if(b===null)return new Date(NaN);if(j.u(b))return new Date;if(b instanceof Date)return new Date(b);if(typeof b=="string"&&!/Z$/i.test(b)){var g=b.match(D);if(g){var x=g[2]-1||0,T=(g[7]||"0").substring(0,3);return v?new Date(Date.UTC(g[1],x,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)):new Date(g[1],x,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)}}return new Date(b)}(_),this.init()},p.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},p.$utils=function(){return j},p.isValid=function(){return this.$d.toString()!==q},p.isSame=function(_,E){var b=Z(_);return this.startOf(E)<=b&&b<=this.endOf(E)},p.isAfter=function(_,E){return Z(_)<this.startOf(E)},p.isBefore=function(_,E){return this.endOf(E)<Z(_)},p.$g=function(_,E,b){return j.u(_)?this[E]:this.set(b,_)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(_,E){var b=this,v=!!j.u(E)||E,g=j.p(_),x=function(A,N){var se=j.w(b.$u?Date.UTC(b.$y,N,A):new Date(b.$y,N,A),b);return v?se:se.endOf(o)},T=function(A,N){return j.w(b.toDate()[A].apply(b.toDate("s"),(v?[0,0,0,0]:[23,59,59,999]).slice(N)),b)},k=this.$W,y=this.$M,$=this.$D,C="set"+(this.$u?"UTC":"");switch(g){case m:return v?x(1,0):x(31,11);case f:return v?x(1,y):x(0,y+1);case c:var S=this.$locale().weekStart||0,M=(k<S?k+7:k)-S;return x(v?$-M:$+(6-M),y);case o:case w:return T(C+"Hours",0);case l:return T(C+"Minutes",1);case u:return T(C+"Seconds",2);case s:return T(C+"Milliseconds",3);default:return this.clone()}},p.endOf=function(_){return this.startOf(_,!1)},p.$set=function(_,E){var b,v=j.p(_),g="set"+(this.$u?"UTC":""),x=(b={},b[o]=g+"Date",b[w]=g+"Date",b[f]=g+"Month",b[m]=g+"FullYear",b[l]=g+"Hours",b[u]=g+"Minutes",b[s]=g+"Seconds",b[i]=g+"Milliseconds",b)[v],T=v===o?this.$D+(E-this.$W):E;if(v===f||v===m){var k=this.clone().set(w,1);k.$d[x](T),k.init(),this.$d=k.set(w,Math.min(this.$D,k.daysInMonth())).$d}else x&&this.$d[x](T);return this.init(),this},p.set=function(_,E){return this.clone().$set(_,E)},p.get=function(_){return this[j.p(_)]()},p.add=function(_,E){var b,v=this;_=Number(_);var g=j.p(E),x=function(y){var $=Z(v);return j.w($.date($.date()+Math.round(y*_)),v)};if(g===f)return this.set(f,this.$M+_);if(g===m)return this.set(m,this.$y+_);if(g===o)return x(1);if(g===c)return x(7);var T=(b={},b[u]=r,b[l]=a,b[s]=n,b)[g]||1,k=this.$d.getTime()+_*T;return j.w(k,this)},p.subtract=function(_,E){return this.add(-1*_,E)},p.format=function(_){var E=this,b=this.$locale();if(!this.isValid())return b.invalidDate||q;var v=_||"YYYY-MM-DDTHH:mm:ssZ",g=j.z(this),x=this.$H,T=this.$m,k=this.$M,y=b.weekdays,$=b.months,C=b.meridiem,S=function(N,se,te,Q){return N&&(N[se]||N(E,v))||te[se].slice(0,Q)},M=function(N){return j.s(x%12||12,N,"0")},A=C||function(N,se,te){var Q=N<12?"AM":"PM";return te?Q.toLowerCase():Q};return v.replace(P,function(N,se){return se||function(te){switch(te){case"YY":return String(E.$y).slice(-2);case"YYYY":return j.s(E.$y,4,"0");case"M":return k+1;case"MM":return j.s(k+1,2,"0");case"MMM":return S(b.monthsShort,k,$,3);case"MMMM":return S($,k);case"D":return E.$D;case"DD":return j.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return S(b.weekdaysMin,E.$W,y,2);case"ddd":return S(b.weekdaysShort,E.$W,y,3);case"dddd":return y[E.$W];case"H":return String(x);case"HH":return j.s(x,2,"0");case"h":return M(1);case"hh":return M(2);case"a":return A(x,T,!0);case"A":return A(x,T,!1);case"m":return String(T);case"mm":return j.s(T,2,"0");case"s":return String(E.$s);case"ss":return j.s(E.$s,2,"0");case"SSS":return j.s(E.$ms,3,"0");case"Z":return g}return null}(N)||g.replace(":","")})},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(_,E,b){var v,g=this,x=j.p(E),T=Z(_),k=(T.utcOffset()-this.utcOffset())*r,y=this-T,$=function(){return j.m(g,T)};switch(x){case m:v=$()/12;break;case f:v=$();break;case d:v=$()/3;break;case c:v=(y-k)/6048e5;break;case o:v=(y-k)/864e5;break;case l:v=y/a;break;case u:v=y/r;break;case s:v=y/n;break;default:v=y}return b?v:j.a(v)},p.daysInMonth=function(){return this.endOf(f).$D},p.$locale=function(){return F[this.$L]},p.locale=function(_,E){if(!_)return this.$L;var b=this.clone(),v=Ce(_,E,!0);return v&&(b.$L=v),b},p.clone=function(){return j.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},h}(),z=rt.prototype;return Z.prototype=z,[["$ms",i],["$s",s],["$m",u],["$H",l],["$W",o],["$M",f],["$y",m],["$D",w]].forEach(function(h){z[h[1]]=function(p){return this.$g(p,h[0],h[1])}}),Z.extend=function(h,p){return h.$i||(h(p,rt,Z),h.$i=!0),Z},Z.locale=Ce,Z.isDayjs=fe,Z.unix=function(h){return Z(1e3*h)},Z.en=F[ee],Z.Ls=F,Z.p={},Z})}(Jt)),Jt.exports}var ri=ni();const ai=yr(ri);function wr(t,e){var r,a;let n="";if(t&&(e!=null&&e.length)&&((r=Object.keys(t))!=null&&r.length)&&((a=e==null?void 0:e.filter(i=>Object.keys(t).includes(i.name)))!=null&&a.length))for(const i of Object.keys(t))(e==null?void 0:e.filter(u=>u.name===i&&u.defaultValue!==t[i]))&&(n+=`${i}:${t[i]};`);return n}function $r(t){var r;const e=((r=t==null?void 0:t.repoName.split("/"))==null?void 0:r[1])||(t==null?void 0:t.repoName);if(!e)throw new Error("wrong componentPath "+(t==null?void 0:t.repoName));if(!(t!=null&&t.version))throw new Error("wrong version "+(t==null?void 0:t.version));const n=(t==null?void 0:t.iifePath)||"main.iife.js";if(!document.getElementById(e+"-script"))try{const a=document.createElement("script");a.id=e+"-script",a.src=`https://cdn.jsdelivr.net/npm/${t.repoName}@${t.version}/${n}`,t!=null&&t.local&&location.href.includes("localhost")&&(a.src=`${t.local}`),document.head.appendChild(a)}catch(a){console.warn(a)}}var _t={},bn,Er;function ii(){if(Er)return bn;Er=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,l=`
23
+ `,a instanceof Document&&a.head?a.head.appendChild(s):a.appendChild(s)}}isClientInvalidated(e){return this.oldInvalidationValues?this.getInvalidationValues(e).some((r,a)=>JSON.stringify(r)!==JSON.stringify(this.oldInvalidationValues[a])):!0}getInvalidationValues(e){var n,r;return[e.environment,e.existingPaymentMethodRequired,!!e.onPaymentDataChanged,!!e.onPaymentAuthorized,e.buttonType,e.buttonColor,e.buttonRadius,e.buttonLocale,e.buttonSizeMode,e.paymentRequest.merchantInfo.merchantId,e.paymentRequest.merchantInfo.merchantName,(n=e.paymentRequest.merchantInfo.softwareInfo)===null||n===void 0?void 0:n.id,(r=e.paymentRequest.merchantInfo.softwareInfo)===null||r===void 0?void 0:r.version,e.paymentRequest.allowedPaymentMethods]}}var Ka="@google-pay/button-element",Qa="3.1.0";function ei(t,e=0){let n;return function(...r){window.clearTimeout(n);const a=function(){return n=void 0,t(...r)};return new Promise(i=>{n=window.setTimeout(()=>{const s=a();i(s)},e)})}}class le extends HTMLElement{constructor(){super(...arguments),this.manager=new Za({cssSelector:"google-pay-button",softwareInfoId:Ka,softwareInfoVersion:Qa}),this.initializeButton=ei(()=>{if(!this.assertRequiredProperty("paymentRequest")||!this.assertRequiredProperty("environment"))return;const e={paymentRequest:this.paymentRequest,environment:this.environment,existingPaymentMethodRequired:this.existingPaymentMethodRequired,onPaymentDataChanged:this.onPaymentDataChanged,onPaymentAuthorized:this.onPaymentAuthorized,buttonColor:this.buttonColor,buttonType:this.buttonType,buttonRadius:this.buttonRadius,buttonSizeMode:this.buttonSizeMode,buttonLocale:this.buttonLocale,onReadyToPayChange:n=>{this.onReadyToPayChange&&this.onReadyToPayChange(n),this.dispatch("readytopaychange",n)},onCancel:n=>{this.onCancel&&this.onCancel(n),this.dispatch("cancel",n)},onError:n=>{var r;this.onError&&((r=this.onError)===null||r===void 0||r.call(this,n)),this.dispatchEvent(new ErrorEvent("error",{error:n}))},onLoadPaymentData:n=>{this.onLoadPaymentData&&this.onLoadPaymentData(n),this.dispatch("loadpaymentdata",n)},onClick:n=>{var r;this.onClick&&((r=this.onClick)===null||r===void 0||r.call(this,n))}};this.manager.configure(e)})}get isReadyToPay(){return this.manager.isReadyToPay}assertRequiredProperty(e){const n=this[e];return n==null?(this.throwError(Error(`Required property not set: ${e}`)),!1):!0}throwError(e){throw e}static get observedAttributes(){return le._observedAttributes}addObservedAttribute(e){le._observedAttributes.push(e)}dispatch(e,n){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,detail:n}))}connectedCallback(){return Gt(this,void 0,void 0,function*(){return yield this.manager.mount(this),this.initializeButton()})}disconnectedCallback(){this.manager.unmount()}attributeChangedCallback(e){return this.initializeButton()}notifyPropertyChanged(e){return this.initializeButton()}}le._observedAttributes=[],_e([_n(),U("paymentrequest")],le.prototype,"paymentRequest",void 0),_e([pt()],le.prototype,"environment",void 0),_e([Ja(),U("existingpaymentmethodrequired")],le.prototype,"existingPaymentMethodRequired",void 0),_e([pt(),U("buttoncolor")],le.prototype,"buttonColor",void 0),_e([pt(),U("buttontype")],le.prototype,"buttonType",void 0),_e([pt(),U("buttonradius")],le.prototype,"buttonRadius",void 0),_e([pt(),U("buttonsizemode")],le.prototype,"buttonSizeMode",void 0),_e([pt(),U("buttonlocale")],le.prototype,"buttonLocale",void 0),_e([_n(),U("paymentDataChangedCallback"),U("paymentdatachangedcallback"),U("onpaymentdatachanged")],le.prototype,"onPaymentDataChanged",void 0),_e([_n(),U("paymentAuthorizedCallback"),U("paymentauthorizedcallback"),U("onpaymentauthorized")],le.prototype,"onPaymentAuthorized",void 0),_e([U("readyToPayChangeCallback"),U("readytopaychangecallback"),U("onreadytopaychange")],le.prototype,"onReadyToPayChange",void 0),_e([U("loadPaymentDataCallback"),U("loadpaymentdatacallback"),U("onloadpaymentdata")],le.prototype,"onLoadPaymentData",void 0),_e([U("cancelCallback"),U("cancelcallback"),U("oncancel")],le.prototype,"onCancel",void 0),_e([U("errorCallback"),U("errorcallback"),U("onerror")],le.prototype,"onError",void 0),_e([U("clickCallback"),U("clickcallback"),U("onclick")],le.prototype,"onClick",void 0),customElements.define("google-pay-button",le);const _r={version:"0.50.0-alpha.19"},he=[{type:"text",placeholder:"Insert your Full Name here...",id:"fullName",required:!0,label:"Full Name",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your Street/Square address with number...",id:"addressWithNumber",required:!0,label:"Street/Square/...",validationTip:"This field cannot be empty."},{id:"name-row2",type:"row",params:{columns:[{type:"text",placeholder:"Insert your nationality here...",id:"nationality",required:!0,label:"Nationality",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your city name here...",id:"city",required:!0,label:"City",validationTip:"This field cannot be empty."},{type:"number",placeholder:"Insert your zip code here...",id:"zip",required:!0,label:"Zip",validationTip:"This field cannot be empty."}]}}];function yr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jt={exports:{}},ti=Jt.exports,br;function ni(){return br||(br=1,function(t,e){(function(n,r){t.exports=r()})(ti,function(){var n=1e3,r=6e4,a=36e5,i="millisecond",s="second",u="minute",l="hour",o="day",c="week",f="month",d="quarter",m="year",w="date",q="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,R={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(h){var p=["th","st","nd","rd"],_=h%100;return"["+h+(p[(_-20)%10]||p[_]||p[0])+"]"}},X=function(h,p,_){var E=String(h);return!E||E.length>=p?h:""+Array(p+1-E.length).join(_)+h},ae={s:X,z:function(h){var p=-h.utcOffset(),_=Math.abs(p),E=Math.floor(_/60),b=_%60;return(p<=0?"+":"-")+X(E,2,"0")+":"+X(b,2,"0")},m:function h(p,_){if(p.date()<_.date())return-h(_,p);var E=12*(_.year()-p.year())+(_.month()-p.month()),b=p.clone().add(E,f),v=_-b<0,g=p.clone().add(E+(v?-1:1),f);return+(-(E+(_-b)/(v?b-g:g-b))||0)},a:function(h){return h<0?Math.ceil(h)||0:Math.floor(h)},p:function(h){return{M:f,y:m,w:c,d:o,D:w,h:l,m:u,s,ms:i,Q:d}[h]||String(h||"").toLowerCase().replace(/s$/,"")},u:function(h){return h===void 0}},ee="en",F={};F[ee]=R;var ie="$isDayjsObject",fe=function(h){return h instanceof rt||!(!h||!h[ie])},Ce=function h(p,_,E){var b;if(!p)return ee;if(typeof p=="string"){var v=p.toLowerCase();F[v]&&(b=v),_&&(F[v]=_,b=v);var g=p.split("-");if(!b&&g.length>1)return h(g[0])}else{var x=p.name;F[x]=p,b=x}return!E&&b&&(ee=b),b||!E&&ee},Z=function(h,p){if(fe(h))return h.clone();var _=typeof p=="object"?p:{};return _.date=h,_.args=arguments,new rt(_)},j=ae;j.l=Ce,j.i=fe,j.w=function(h,p){return Z(h,{locale:p.$L,utc:p.$u,x:p.$x,$offset:p.$offset})};var rt=function(){function h(_){this.$L=Ce(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[ie]=!0}var p=h.prototype;return p.parse=function(_){this.$d=function(E){var b=E.date,v=E.utc;if(b===null)return new Date(NaN);if(j.u(b))return new Date;if(b instanceof Date)return new Date(b);if(typeof b=="string"&&!/Z$/i.test(b)){var g=b.match(D);if(g){var x=g[2]-1||0,T=(g[7]||"0").substring(0,3);return v?new Date(Date.UTC(g[1],x,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)):new Date(g[1],x,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)}}return new Date(b)}(_),this.init()},p.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},p.$utils=function(){return j},p.isValid=function(){return this.$d.toString()!==q},p.isSame=function(_,E){var b=Z(_);return this.startOf(E)<=b&&b<=this.endOf(E)},p.isAfter=function(_,E){return Z(_)<this.startOf(E)},p.isBefore=function(_,E){return this.endOf(E)<Z(_)},p.$g=function(_,E,b){return j.u(_)?this[E]:this.set(b,_)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(_,E){var b=this,v=!!j.u(E)||E,g=j.p(_),x=function(A,N){var se=j.w(b.$u?Date.UTC(b.$y,N,A):new Date(b.$y,N,A),b);return v?se:se.endOf(o)},T=function(A,N){return j.w(b.toDate()[A].apply(b.toDate("s"),(v?[0,0,0,0]:[23,59,59,999]).slice(N)),b)},k=this.$W,y=this.$M,$=this.$D,C="set"+(this.$u?"UTC":"");switch(g){case m:return v?x(1,0):x(31,11);case f:return v?x(1,y):x(0,y+1);case c:var S=this.$locale().weekStart||0,M=(k<S?k+7:k)-S;return x(v?$-M:$+(6-M),y);case o:case w:return T(C+"Hours",0);case l:return T(C+"Minutes",1);case u:return T(C+"Seconds",2);case s:return T(C+"Milliseconds",3);default:return this.clone()}},p.endOf=function(_){return this.startOf(_,!1)},p.$set=function(_,E){var b,v=j.p(_),g="set"+(this.$u?"UTC":""),x=(b={},b[o]=g+"Date",b[w]=g+"Date",b[f]=g+"Month",b[m]=g+"FullYear",b[l]=g+"Hours",b[u]=g+"Minutes",b[s]=g+"Seconds",b[i]=g+"Milliseconds",b)[v],T=v===o?this.$D+(E-this.$W):E;if(v===f||v===m){var k=this.clone().set(w,1);k.$d[x](T),k.init(),this.$d=k.set(w,Math.min(this.$D,k.daysInMonth())).$d}else x&&this.$d[x](T);return this.init(),this},p.set=function(_,E){return this.clone().$set(_,E)},p.get=function(_){return this[j.p(_)]()},p.add=function(_,E){var b,v=this;_=Number(_);var g=j.p(E),x=function(y){var $=Z(v);return j.w($.date($.date()+Math.round(y*_)),v)};if(g===f)return this.set(f,this.$M+_);if(g===m)return this.set(m,this.$y+_);if(g===o)return x(1);if(g===c)return x(7);var T=(b={},b[u]=r,b[l]=a,b[s]=n,b)[g]||1,k=this.$d.getTime()+_*T;return j.w(k,this)},p.subtract=function(_,E){return this.add(-1*_,E)},p.format=function(_){var E=this,b=this.$locale();if(!this.isValid())return b.invalidDate||q;var v=_||"YYYY-MM-DDTHH:mm:ssZ",g=j.z(this),x=this.$H,T=this.$m,k=this.$M,y=b.weekdays,$=b.months,C=b.meridiem,S=function(N,se,te,Q){return N&&(N[se]||N(E,v))||te[se].slice(0,Q)},M=function(N){return j.s(x%12||12,N,"0")},A=C||function(N,se,te){var Q=N<12?"AM":"PM";return te?Q.toLowerCase():Q};return v.replace(P,function(N,se){return se||function(te){switch(te){case"YY":return String(E.$y).slice(-2);case"YYYY":return j.s(E.$y,4,"0");case"M":return k+1;case"MM":return j.s(k+1,2,"0");case"MMM":return S(b.monthsShort,k,$,3);case"MMMM":return S($,k);case"D":return E.$D;case"DD":return j.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return S(b.weekdaysMin,E.$W,y,2);case"ddd":return S(b.weekdaysShort,E.$W,y,3);case"dddd":return y[E.$W];case"H":return String(x);case"HH":return j.s(x,2,"0");case"h":return M(1);case"hh":return M(2);case"a":return A(x,T,!0);case"A":return A(x,T,!1);case"m":return String(T);case"mm":return j.s(T,2,"0");case"s":return String(E.$s);case"ss":return j.s(E.$s,2,"0");case"SSS":return j.s(E.$ms,3,"0");case"Z":return g}return null}(N)||g.replace(":","")})},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(_,E,b){var v,g=this,x=j.p(E),T=Z(_),k=(T.utcOffset()-this.utcOffset())*r,y=this-T,$=function(){return j.m(g,T)};switch(x){case m:v=$()/12;break;case f:v=$();break;case d:v=$()/3;break;case c:v=(y-k)/6048e5;break;case o:v=(y-k)/864e5;break;case l:v=y/a;break;case u:v=y/r;break;case s:v=y/n;break;default:v=y}return b?v:j.a(v)},p.daysInMonth=function(){return this.endOf(f).$D},p.$locale=function(){return F[this.$L]},p.locale=function(_,E){if(!_)return this.$L;var b=this.clone(),v=Ce(_,E,!0);return v&&(b.$L=v),b},p.clone=function(){return j.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},h}(),z=rt.prototype;return Z.prototype=z,[["$ms",i],["$s",s],["$m",u],["$H",l],["$W",o],["$M",f],["$y",m],["$D",w]].forEach(function(h){z[h[1]]=function(p){return this.$g(p,h[0],h[1])}}),Z.extend=function(h,p){return h.$i||(h(p,rt,Z),h.$i=!0),Z},Z.locale=Ce,Z.isDayjs=fe,Z.unix=function(h){return Z(1e3*h)},Z.en=F[ee],Z.Ls=F,Z.p={},Z})}(Jt)),Jt.exports}var ri=ni();const ai=yr(ri);function wr(t,e){var r,a;let n="";if(t&&(e!=null&&e.length)&&((r=Object.keys(t))!=null&&r.length)&&((a=e==null?void 0:e.filter(i=>Object.keys(t).includes(i.name)))!=null&&a.length))for(const i of Object.keys(t))(e==null?void 0:e.filter(u=>u.name===i&&u.defaultValue!==t[i]))&&(n+=`${i}:${t[i]};`);return n}function $r(t){var r;const e=((r=t==null?void 0:t.repoName.split("/"))==null?void 0:r[1])||(t==null?void 0:t.repoName);if(!e)throw new Error("wrong componentPath "+(t==null?void 0:t.repoName));if(!(t!=null&&t.version))throw new Error("wrong version "+(t==null?void 0:t.version));const n=(t==null?void 0:t.iifePath)||"main.iife.js";if(!document.getElementById(e+"-script"))try{const a=document.createElement("script");a.id=e+"-script",a.src=`https://cdn.jsdelivr.net/npm/${t.repoName}@${t.version}/${n}`,t!=null&&t.local&&location.href.includes("localhost")&&(a.src=`${t.local}`),document.head.appendChild(a)}catch(a){console.warn(a)}}var _t={},bn,Er;function ii(){if(Er)return bn;Er=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,l=`
24
24
  `,o="/",c="*",f="",d="comment",m="declaration";bn=function(q,D){if(typeof q!="string")throw new TypeError("First argument must be a string");if(!q)return[];D=D||{};var P=1,R=1;function X(z){var h=z.match(e);h&&(P+=h.length);var p=z.lastIndexOf(l);R=~p?z.length-p:R+z.length}function ae(){var z={line:P,column:R};return function(h){return h.position=new ee(z),fe(),h}}function ee(z){this.start=z,this.end={line:P,column:R},this.source=D.source}ee.prototype.content=q;function F(z){var h=new Error(D.source+":"+P+":"+R+": "+z);if(h.reason=z,h.filename=D.source,h.line=P,h.column=R,h.source=q,!D.silent)throw h}function ie(z){var h=z.exec(q);if(h){var p=h[0];return X(p),q=q.slice(p.length),h}}function fe(){ie(n)}function Ce(z){var h;for(z=z||[];h=Z();)h!==!1&&z.push(h);return z}function Z(){var z=ae();if(!(o!=q.charAt(0)||c!=q.charAt(1))){for(var h=2;f!=q.charAt(h)&&(c!=q.charAt(h)||o!=q.charAt(h+1));)++h;if(h+=2,f===q.charAt(h-1))return F("End of comment missing");var p=q.slice(2,h-2);return R+=2,X(p),q=q.slice(h),R+=2,z({type:d,comment:p})}}function j(){var z=ae(),h=ie(r);if(h){if(Z(),!ie(a))return F("property missing ':'");var p=ie(i),_=z({type:m,property:w(h[0].replace(t,f)),value:p?w(p[0].replace(t,f)):f});return ie(s),_}}function rt(){var z=[];Ce(z);for(var h;h=j();)h!==!1&&(z.push(h),Ce(z));return z}return fe(),rt()};function w(q){return q?q.replace(u,f):f}return bn}var qr;function si(){if(qr)return _t;qr=1;var t=_t&&_t.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_t,"__esModule",{value:!0}),_t.default=n;var e=t(ii());function n(r,a){var i=null;if(!r||typeof r!="string")return i;var s=(0,e.default)(r),u=typeof a=="function";return s.forEach(function(l){if(l.type==="declaration"){var o=l.property,c=l.value;u?a(o,c,l):c&&(i=i||{},i[o]=c)}}),i}return _t}var oi=si();const xr=yr(oi),li=xr.default||xr,wn={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}]},$n={vars:[{name:"--hb-checkout-border",defaultValue:"0.5px solid rgba(197, 197, 197, 0.808)",description:"",valueType:"string"}]};function ui(t,e,n){W(e,!0),W(n,!1)}function Cr(t,e,n){W(e,!1),W(n,!0)}var ci=ce('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-agqvg0">'),fi=ce('<h1 class="title svelte-agqvg0" part="title">Checkout</h1>'),di=ce('<div class="dataentry svelte-agqvg0"><span class="dataentry_value svelte-agqvg0"> </span></div>'),vi=ce('<div class="dataentrycontainer svelte-agqvg0"><!></div>'),hi=ce('<h4 class="subtitle svelte-agqvg0" part="subtitle"><button class="btn btn-sm detail_btn svelte-agqvg0">edit</button></h4> <div class="dataentrycontainer svelte-agqvg0"><div class="dataentry svelte-agqvg0"><span class="dataentry_key svelte-agqvg0">Name</span><span class="dataentry_value svelte-agqvg0"> </span></div> <div class="dataentry svelte-agqvg0"><span class="dataentry_key svelte-agqvg0">Address</span><span class="dataentry_value svelte-agqvg0"> </span></div></div>',1),gi=(t,e)=>{W(e,"yes"),setTimeout(()=>{W(e,"no")},200)},mi=ce('<h4 class="subtitle svelte-agqvg0" part="subtitle">Address</h4> <div class="svelte-agqvg0"><hb-form></hb-form> <div class="svelte-agqvg0"><button style="width:100%;margin-bottom:10px" class="btn btn-primary svelte-agqvg0">continue</button></div></div>',3),pi=ce('<h4 style="margin-top:20px" class="subtitle svelte-agqvg0" part="subtitle"><span class="detail_label svelte-agqvg0"><i class="bi bi-truck svelte-agqvg0"></i> Shipment Service</span><button class="btn btn-sm detail_btn svelte-agqvg0">edit</button></h4> <div class="dataentrycontainer svelte-agqvg0"><div class="dataentry svelte-agqvg0"><span class="dataentry_key svelte-agqvg0">Shipping Fee</span><span class="dataentry_value svelte-agqvg0"> </span></div> <div class="dataentry svelte-agqvg0"><span class="dataentry_key svelte-agqvg0">Arrive</span><span class="dataentry_value svelte-agqvg0"> </span></div></div>',1),_i=(t,e)=>{W(e,"yes"),setTimeout(()=>{W(e,"no")},200)},yi=ce('<h4 class="subtitle svelte-agqvg0" part="subtitle" style="margin-top:20px"><i class="bi bi-truck svelte-agqvg0"></i> Shipment Service</h4> <div class="svelte-agqvg0"><hb-form></hb-form> <div class="svelte-agqvg0"><button style="width:100%" class="btn btn-primary svelte-agqvg0">continue</button></div></div>',3),bi=ce('<h4 style="margin-top:20px" class="subtitle svelte-agqvg0" part="subtitle"><span class="detail_label svelte-agqvg0"><i class="bi bi-truck svelte-agqvg0"></i> Shipment Service</span><button class="btn btn-sm detail_btn svelte-agqvg0">edit</button></h4> <div class="dataentrycontainer svelte-agqvg0"><div class="dataentry svelte-agqvg0"><span class="dataentry_key svelte-agqvg0">Shipping Fee</span><span class="dataentry_value svelte-agqvg0"> </span></div> <div class="dataentry svelte-agqvg0"><span class="dataentry_key svelte-agqvg0">Shipping Time</span><span class="dataentry_value svelte-agqvg0"> </span></div></div>',1),wi=ce('<div id="shipment_separator" class="svelte-agqvg0"><!></div>'),$i=ce("<hb-payment-paypal></hb-payment-paypal>",2),Ei=ce("<google-pay-button></google-pay-button>",2),qi=ce('<div class="payment_button_container svelte-agqvg0"><!></div>'),xi=ce('<div id="payment_btn_container" class="svelte-agqvg0"></div>'),Ci=ce('By Clicking..<button class="btn btn-default svelte-agqvg0">Terms and conditions</button>',1),Ti=ce('<h3 class="subtitle svelte-agqvg0" part="subtitle"><i class="bi bi-wallet2 svelte-agqvg0"></i> Payment Method</h3> <!> <div class="footer_note svelte-agqvg0"><!></div>',1),Si=ce('<div id="payment_completed_content" class="svelte-agqvg0"><div id="payment_completed_title" class="svelte-agqvg0">payment completed</div> <div id="payment_completed_content" class="svelte-agqvg0"> </div> <div id="payment_completed_footer" class="svelte-agqvg0"><button class="btn btn-link svelte-agqvg0">invoice</button></div></div>'),ki=ce('<!> <div id="border_top" class="svelte-agqvg0"><div class="svelte-agqvg0"><h3 class="subtitle svelte-agqvg0" part="subtitle"><i class="bi bi-send-fill svelte-agqvg0"></i> Delivery</h3> <!></div> <!></div> <div class="payment_title svelte-agqvg0"><!></div>',1);const Pi={hash:"svelte-agqvg0",code:`@charset "UTF-8";
25
25
  @import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
26
26
  @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");
package/manifest.json CHANGED
@@ -510,5 +510,5 @@
510
510
  "size": {},
511
511
  "iifePath": "main.iife.js",
512
512
  "repoName": "@htmlbricks/hb-checkout",
513
- "version": "0.50.0-alpha.17"
513
+ "version": "0.50.0-alpha.19"
514
514
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-checkout",
3
- "version": "0.50.0-alpha.17",
3
+ "version": "0.50.0-alpha.19",
4
4
  "contributors": [],
5
5
  "description": "",
6
6
  "licenses": [