@everymatrix/cashier-iframe-redirect 1.24.7 → 1.26.0
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.
|
@@ -584,6 +584,6 @@ this.formats=dt(e.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.
|
|
|
584
584
|
// and Intl.DateTimeFormat instances.
|
|
585
585
|
e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const Tt={},Ht=(e,t,r)=>r?(t in Tt||(Tt[t]={}),e in Tt[t]||(Tt[t][e]=r),r):r,Bt=(e,t)=>{if(null==t)return;if(t in Tt&&e in Tt[t])return Tt[t][e];const r=Zt(t);for(let n=0;n<r.length;n++){const i=St(r[n],e);if(i)return Ht(e,t,i)}};let _t;const At=D({});function Pt(e){return e in _t}function St(e,t){if(!Pt(e))return null;const r=function(e){return _t[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let e=0;e<r.length;e++)if("object"==typeof n){if(e>0){const t=r.slice(e,r.length).join(".");if(t in n){n=n[t];break}}n=n[r[e]]}else n=void 0;return n}(r,t)}function Lt(e,...t){delete Tt[e],At.update((r=>(r[e]=Z.all([r[e]||{},...t]),r)))}k([At],(([e])=>Object.keys(e))),At.subscribe((e=>_t=e));const Nt={};function Ct(e){return Nt[e]}function It(e){return null!=e&&Zt(e).some((e=>{var t;return null==(t=Ct(e))?void 0:t.size}))}function Ot(e,t){const r=Promise.all(t.map((t=>(function(e,t){Nt[e].delete(t),0===Nt[e].size&&delete Nt[e]}(e,t),t().then((e=>e.default||e))))));return r.then((t=>Lt(e,...t)))}const wt={};function Rt(e){if(!It(e))return e in wt?wt[e]:Promise.resolve();const t=function(e){return Zt(e).map((e=>{const t=Ct(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return wt[e]=Promise.all(t.map((([e,t])=>Ot(e,t)))).then((()=>{if(It(e))return Rt(e);delete wt[e]})),wt[e]}const Mt={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Ut(){return Mt}const Gt=D(!1);var Dt=Object.defineProperty,kt=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Vt=(e,t,r)=>t in e?Dt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let Xt;const Kt=D(null);function Yt(e){return e.split("-").map(((e,t,r)=>r.slice(0,t+1).join("-"))).reverse()}function Zt(e,t=Ut().fallbackLocale){const r=Yt(e);return t?[...new Set([...r,...Yt(t)])]:r}function zt(){return null!=Xt?Xt:void 0}Kt.subscribe((e=>{Xt=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const Wt=(Qt=((e,t)=>{for(var r in t||(t={}))xt.call(t,r)&&Vt(e,r,t[r]);if($t)for(var r of $t(t))jt.call(t,r)&&Vt(e,r,t[r]);return e})({},Kt),kt(Qt,Ft({set:e=>{if(e&&function(e){if(null==e)return;const t=Zt(e);for(let e=0;e<t.length;e++){const r=t[e];if(Pt(r))return r}}(e)&&It(e)){const{loadingDelay:t}=Ut();let r;return"undefined"!=typeof window&&null!=zt()&&t?r=window.setTimeout((()=>Gt.set(!0)),t):Gt.set(!0),Rt(e).then((()=>{Kt.set(e)})).finally((()=>{clearTimeout(r),Gt.set(!1)}))}return Kt.set(e)}})));var Qt;const Jt=e=>{const t=Object.create(null);return r=>{const n=JSON.stringify(r);return n in t?t[n]:t[n]=e(r)}};var qt=Object.defineProperty,er=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,nr=(e,t,r)=>t in e?qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ir=(e,t)=>{for(var r in t||(t={}))tr.call(t,r)&&nr(e,r,t[r]);if(er)for(var r of er(t))rr.call(t,r)&&nr(e,r,t[r]);return e},or=(e,t)=>{var r={};for(var n in e)tr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&er)for(var n of er(e))t.indexOf(n)<0&&rr.call(e,n)&&(r[n]=e[n]);return r};const sr=(e,t)=>{const{formats:r}=Ut();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},ar=Jt((e=>{var t=e,{locale:r,format:n}=t,i=or(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=sr("number",n)),new Intl.NumberFormat(r,i)})),hr=Jt((e=>{var t=e,{locale:r,format:n}=t,i=or(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=sr("date",n):0===Object.keys(i).length&&(i=sr("date","short")),new Intl.DateTimeFormat(r,i)})),ur=Jt((e=>{var t=e,{locale:r,format:n}=t,i=or(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=sr("time",n):0===Object.keys(i).length&&(i=sr("time","short")),new Intl.DateTimeFormat(r,i)})),cr=Jt((
|
|
586
586
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
587
|
-
(e,t=zt())=>new vt(e,t,Ut().formats,{ignoreTag:Ut().ignoreTag}))),lr=(e,t={})=>{var r,n,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:h=zt(),default:u}=s;if(null==h)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=Bt(e,h);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!=(o=null!=(i=null==(n=(r=Ut()).handleMissingMessage)?void 0:n.call(r,{locale:h,id:e,defaultValue:u}))?i:u)?o:e;if(!a)return c;let l=c;try{l=cr(c,h).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return l},fr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return ur(ir({locale:r},n))})(t).format(e),pr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return hr(ir({locale:r},n))})(t).format(e),mr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return ar(ir({locale:r},n))})(t).format(e),br=(e,t=zt())=>Bt(e,t),gr=k([Wt,At],(()=>lr));function Er(e,t){Lt(e,t)}k([Wt],(()=>fr)),k([Wt],(()=>pr)),k([Wt],(()=>mr)),k([Wt,At],(()=>br));const dr={en:{backButton:"Back"}};
|
|
587
|
+
(e,t=zt())=>new vt(e,t,Ut().formats,{ignoreTag:Ut().ignoreTag}))),lr=(e,t={})=>{var r,n,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:h=zt(),default:u}=s;if(null==h)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=Bt(e,h);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!=(o=null!=(i=null==(n=(r=Ut()).handleMissingMessage)?void 0:n.call(r,{locale:h,id:e,defaultValue:u}))?i:u)?o:e;if(!a)return c;let l=c;try{l=cr(c,h).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return l},fr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return ur(ir({locale:r},n))})(t).format(e),pr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return hr(ir({locale:r},n))})(t).format(e),mr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return ar(ir({locale:r},n))})(t).format(e),br=(e,t=zt())=>Bt(e,t),gr=k([Wt,At],(()=>lr));function Er(e,t){Lt(e,t)}k([Wt],(()=>fr)),k([Wt],(()=>pr)),k([Wt],(()=>mr)),k([Wt,At],(()=>br));const dr={en:{backButton:"Back"},hr:{backButton:"Natrag"}};
|
|
588
588
|
/* src/CashierIframeRedirect.svelte generated by Svelte v3.59.2 */function yr(t){let r,n,i,o,s,a,u,d,y,v,T,H,B=/*$_*/t[1]("backButton")+"";return{c(){r=p("div"),n=p("div"),i=m("svg"),o=m("path"),s=g(),a=p("span"),u=b(B),d=g(),y=p("iframe"),this.c=e,E(o,"fill-rule","evenodd"),E(o,"clip-rule","evenodd"),E(o,"d","M12.5632 3.47776C12.4787 3.50132 12.3362 3.57499 12.2465 3.64147C12.1567 3.708 10.8069 5.0421 9.24694 6.6062C6.11944 9.74186 6.25999 9.58198 6.25999 10.0036C6.25999 10.4243 6.13093 10.2783 9.34296 13.4902C12.4449 16.5921 12.356 16.5115 12.7278 16.5555C13.1855 16.6098 13.6413 16.2584 13.7301 15.783C13.7612 15.6163 13.7212 15.3394 13.6437 15.1846C13.6158 15.1289 12.451 13.9396 11.0553 12.5417L8.51768 9.99999L11.0553 7.45831C12.451 6.06042 13.6158 4.87108 13.6437 4.81538C13.7729 4.55745 13.7703 4.20054 13.6374 3.94268C13.4469 3.57304 12.9668 3.36526 12.5632 3.47776Z"),E(o,"fill","#111111"),E(i,"xmlns","http://www.w3.org/2000/svg"),E(i,"width","20"),E(i,"height","20"),E(i,"viewBox","0 0 20 20"),E(i,"fill","none"),E(n,"class","BackButton"),h(y.src,v=/*iframeurl*/t[0])||E(y,"src",v),E(y,"frameborder","0"),E(r,"class","CashierRedirectIframe")},m(e,h){l(e,r,h),c(r,n),c(n,i),c(i,o),c(n,s),c(n,a),c(a,u),c(r,d),c(r,y),T||(H=function(e,t,r,n){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}(n,"click",/*close*/t[2]),T=!0)},p(e,[t]){/*$_*/2&t&&B!==(B=/*$_*/e[1]("backButton")+"")&&function(e,t){t=""+t,e.data!==t&&(e.data=t)}(u,B),/*iframeurl*/1&t&&!h(y.src,v=/*iframeurl*/e[0])&&E(y,"src",v)},i:e,o:e,d(e){e&&f(r),T=!1,H()}}}function vr(e,t,r){let n;var i,o;i=gr,o=e=>r(1,n=e),e.$$.on_destroy.push(u(i,o));let{lang:s="en"}=t,{iframeurl:a}=t,{translationurl:h=""}=t;v();Object.keys(dr).forEach((e=>{Er(e,dr[e])}));const c=()=>{var e;e=s,Wt.set(e)};return e.$$set=e=>{"lang"in e&&r(3,s=e.lang),"iframeurl"in e&&r(0,a=e.iframeurl),"translationurl"in e&&r(4,h=e.translationurl)},e.$$.update=()=>{/*lang*/8&e.$$.dirty&&s&&c(),/*translationurl*/16&e.$$.dirty&&h&&(()=>{if(h)fetch(h).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Er(t,e[t])}))})).catch((e=>{console.log(e)}))})()},[a,n,()=>{dispatchEvent(new CustomEvent("closeIframe",{bubbles:!0,cancelable:!0,composed:!0}))},s,h]}class Tr extends U{constructor(e){super();const t=document.createElement("style");t.textContent=".CashierRedirectIframe{height:inherit;width:inherit}iframe{height:100%;width:100%;background:rgba(0, 0, 0, 0.1)}.BackButton{position:absolute;display:flex;align-items:center;padding:8px 8px 8px 4px;margin:8px;border-radius:2px;background:rgba(0, 0, 0, 0.1);justify-content:center;cursor:pointer}",this.shadowRoot.appendChild(t),M(this,{target:this.shadowRoot,props:d(this.attributes),customElement:!0},vr,yr,o,{lang:3,iframeurl:0,translationurl:4},null),e&&(e.target&&l(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["lang","iframeurl","translationurl"]}get lang(){return this.$$.ctx[3]}set lang(e){this.$$set({lang:e}),C()}get iframeurl(){return this.$$.ctx[0]}set iframeurl(e){this.$$set({iframeurl:e}),C()}get translationurl(){return this.$$.ctx[4]}set translationurl(e){this.$$set({translationurl:e}),C()}}return!customElements.get("cashier-iframe-redirect")&&customElements.define("cashier-iframe-redirect",Tr),Tr}));
|
|
589
589
|
//# sourceMappingURL=cashier-iframe-redirect.js.map
|