@revenuecat/purchases-js 0.13.1 → 0.15.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.
@@ -1,64 +1,65 @@
1
- (function(E,O){typeof exports=="object"&&typeof module<"u"?O(exports):typeof define=="function"&&define.amd?define(["exports"],O):(E=typeof globalThis<"u"?globalThis:E||self,O(E.Purchases={}))})(this,function(E){"use strict";var Uu=Object.create;var bn=Object.defineProperty;var Lu=Object.getOwnPropertyDescriptor;var ho=(E,O)=>(O=Symbol[E])?O:Symbol.for("Symbol."+E),ir=E=>{throw TypeError(E)};var _o=(E,O,S)=>O in E?bn(E,O,{enumerable:!0,configurable:!0,writable:!0,value:S}):E[O]=S;var fo=(E,O)=>bn(E,"name",{value:O,configurable:!0});var po=E=>[,,,Uu((E==null?void 0:E[ho("metadata")])??null)],bo=["class","method","getter","setter","accessor","field","value","get","set"],nr=E=>E!==void 0&&typeof E!="function"?ir("Function expected"):E,Cu=(E,O,S,ye,K)=>({kind:bo[E],name:O,metadata:ye,addInitializer:J=>S._?ir("Already initialized"):K.push(nr(J||null))}),mn=(E,O)=>_o(O,ho("metadata"),E[3]),mo=(E,O,S,ye)=>{for(var K=0,J=E[O>>1],Ne=J&&J.length;K<Ne;K++)O&1?J[K].call(S):ye=J[K].call(S,ye);return ye},yo=(E,O,S,ye,K,J)=>{var Ne,he,or,lt,St,H=O&7,Rt=!!(O&8),ke=!!(O&16),Mt=H>3?E.length+1:H?Rt?1:2:0,ar=bo[H+5],se=H>3&&(E[Mt-1]=[]),Dt=E[Mt]||(E[Mt]=[]),we=H&&(!ke&&!Rt&&(K=K.prototype),H<5&&(H>3||!ke)&&Lu(H<4?K:{get[S](){return vo(this,J)},set[S](ie){return go(this,J,ie)}},S));H?ke&&H<4&&fo(J,(H>2?"set ":H>1?"get ":"")+S):fo(K,S);for(var Ve=ye.length-1;Ve>=0;Ve--)lt=Cu(H,S,or={},E[3],Dt),H&&(lt.static=Rt,lt.private=ke,St=lt.access={has:ke?ie=>Bu(K,ie):ie=>S in ie},H^3&&(St.get=ke?ie=>(H^1?vo:qu)(ie,K,H^4?J:we.get):ie=>ie[S]),H>2&&(St.set=ke?(ie,Ut)=>go(ie,K,Ut,H^4?J:we.set):(ie,Ut)=>ie[S]=Ut)),he=(0,ye[Ve])(H?H<4?ke?J:we[ar]:H>4?void 0:{get:we.get,set:we.set}:K,lt),or._=1,H^4||he===void 0?nr(he)&&(H>4?se.unshift(he):H?ke?J=he:we[ar]=he:K=he):typeof he!="object"||he===null?ir("Object expected"):(nr(Ne=he.get)&&(we.get=Ne),nr(Ne=he.set)&&(we.set=Ne),nr(Ne=he.init)&&se.unshift(Ne));return H||mn(E,K),we&&bn(K,S,we),ke?H^4?J:we:K},B=(E,O,S)=>_o(E,typeof O!="symbol"?O+"":O,S),yn=(E,O,S)=>O.has(E)||ir("Cannot "+S),Bu=(E,O)=>Object(O)!==O?ir('Cannot use the "in" operator on this value'):E.has(O),vo=(E,O,S)=>(yn(E,O,"read from private field"),S?S.call(E):O.get(E));var go=(E,O,S,ye)=>(yn(E,O,"write to private field"),ye?ye.call(E,S):O.set(E,S),S),qu=(E,O,S)=>(yn(E,O,"access private method"),S);var co,pn;const O="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(O);let S=!1;function ye(){S=!0}ye();const K=1,J=2,Ne=4,he=8,or=16,lt=1,St=2,H=4,Rt=8,ke=16,Mt=1,ar=2,se=Symbol(),Dt="http://www.w3.org/2000/svg",we=!1;var Ve=Array.isArray,ie=Array.from,Ut=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,wn=Object.getOwnPropertyDescriptors,wo=Object.prototype,Eo=Array.prototype,sr=Object.getPrototypeOf;function Lt(e){return typeof e=="function"}const $e=()=>{};function xo(e){return e()}function Or(e){for(var t=0;t<e.length;t++)e[t]()}const Ye=2,En=4,Ct=8,Nr=16,Se=32,Bt=64,ct=128,lr=256,ue=512,rt=1024,_t=2048,Ue=4096,qt=8192,Io=16384,pt=32768,Po=65536,ko=1<<18,xn=1<<19,nt=Symbol("$state"),In=Symbol("legacy props"),To=Symbol("");function Pn(e){return e===this.v}function kn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Sr(e){return!kn(e,this.v)}function Ao(e){throw new Error("effect_in_teardown")}function Oo(){throw new Error("effect_in_unowned_derived")}function No(e){throw new Error("effect_orphan")}function So(){throw new Error("effect_update_depth_exceeded")}function Ro(e){throw new Error("lifecycle_legacy_only")}function Mo(e){throw new Error("props_invalid_value")}function Do(){throw new Error("state_descriptors_fixed")}function Uo(){throw new Error("state_prototype_fixed")}function Lo(){throw new Error("state_unsafe_local_read")}function Co(){throw new Error("state_unsafe_mutation")}function Ee(e){return{f:0,v:e,reactions:null,equals:Pn,version:0}}function Bo(e){return Tn(Ee(e))}function cr(e,t=!1){var n;const r=Ee(e);return t||(r.equals=Sr),S&&U!==null&&U.l!==null&&((n=U.l).s??(n.s=[])).push(r),r}function _e(e,t=!1){return Tn(cr(e,t))}function Tn(e){return G!==null&&G.f&Ye&&(Be===null?Go([e]):Be.push(e)),e}function N(e,t){return G!==null&&dr()&&G.f&(Ye|Nr)&&(Be===null||!Be.includes(e))&&Co(),Rr(e,t)}function Rr(e,t){return e.equals(t)||(e.v=t,e.version=Hn(),An(e,rt),dr()&&M!==null&&M.f&ue&&!(M.f&Se)&&(le!==null&&le.includes(e)?(Re(M,rt),vr(M)):ot===null?$o([e]):ot.push(e))),t}function An(e,t){var r=e.reactions;if(r!==null)for(var n=dr(),i=r.length,o=0;o<i;o++){var a=r[o],s=a.f;s&rt||!n&&a===M||(Re(a,t),s&(ue|ct)&&(s&Ye?An(a,_t):vr(a)))}}function ee(e){var t=Ye|rt;M===null?t|=ct:M.f|=xn;const r={children:null,ctx:U,deps:null,equals:Pn,f:t,fn:e,reactions:null,v:null,version:0,parent:M};if(G!==null&&G.f&Ye){var n=G;(n.children??(n.children=[])).push(r)}return r}function fe(e){const t=ee(e);return t.equals=Sr,t}function On(e){var t=e.children;if(t!==null){e.children=null;for(var r=0;r<t.length;r+=1){var n=t[r];n.f&Ye?Mr(n):Le(n)}}}function Nn(e){var t,r=M;Ce(e.parent);try{On(e),t=Vn(e)}finally{Ce(r)}return t}function Sn(e){var t=Nn(e),r=(wt||e.f&ct)&&e.deps!==null?_t:ue;Re(e,r),e.equals(t)||(e.v=t,e.version=Hn())}function Mr(e){On(e),Gt(e,0),Re(e,qt),e.v=e.children=e.deps=e.ctx=e.reactions=null}function Rn(e){M===null&&G===null&&No(),G!==null&&G.f&ct&&Oo(),jr&&Ao()}function qo(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function bt(e,t,r,n=!0){var i=(e&Bt)!==0,o=M,a={ctx:U,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|rt,first:null,fn:t,last:null,next:null,parent:i?null:o,prev:null,teardown:null,transitions:null,version:0};if(r){var s=yt;try{qn(!0),$t(a),a.f|=Io}catch(u){throw Le(a),u}finally{qn(s)}}else t!==null&&vr(a);var l=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&xn)===0;if(!l&&!i&&n&&(o!==null&&qo(a,o),G!==null&&G.f&Ye)){var c=G;(c.children??(c.children=[])).push(a)}return a}function Dr(e){const t=bt(Ct,null,!1);return Re(t,ue),t.teardown=e,t}function Ur(e){Rn();var t=M!==null&&(M.f&Se)!==0&&U!==null&&!U.m;if(t){var r=U;(r.e??(r.e=[])).push({fn:e,effect:M,reaction:G})}else{var n=Lr(e);return n}}function Fo(e){return Rn(),Ft(e)}function jo(e){const t=bt(Bt,e,!0);return()=>{Le(t)}}function Lr(e){return bt(En,e,!1)}function ut(e,t){var r=U,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=Ft(()=>{e(),!n.ran&&(n.ran=!0,N(r.l.r2,!0),dt(t))})}function Cr(){var e=U;Ft(()=>{if(v(e.l.r2)){for(var t of e.l.r1){var r=t.effect;r.f&ue&&Re(r,_t),Et(r)&&$t(r),t.ran=!1}e.l.r2.v=!1}})}function Ft(e){return bt(Ct,e,!0)}function F(e){return ft(e)}function ft(e,t=0){return bt(Ct|Nr|t,e,!0)}function ze(e,t=!0){return bt(Ct|Se,e,!0,t)}function Mn(e){var t=e.teardown;if(t!==null){const r=jr,n=G;Fn(!0),it(null);try{t.call(null)}finally{Fn(r),it(n)}}}function Dn(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var r=0;r<t.length;r+=1)Mr(t[r])}}function Un(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var n=r.next;Le(r,t),r=n}}function Ho(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Se||Le(t),t=r}}function Le(e,t=!0){var r=!1;if((t||e.f&ko)&&e.nodes_start!==null){for(var n=e.nodes_start,i=e.nodes_end;n!==null;){var o=n===i?null:gr(n);n.remove(),n=o}r=!0}Un(e,t&&!r),Dn(e),Gt(e,0),Re(e,qt);var a=e.transitions;if(a!==null)for(const l of a)l.stop();Mn(e);var s=e.parent;s!==null&&s.first!==null&&Ln(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.parent=e.fn=e.nodes_start=e.nodes_end=null}function Ln(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function jt(e,t){var r=[];Br(e,r,!0),Cn(r,()=>{Le(e),t&&t()})}function Cn(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Br(e,t,r){if(!(e.f&Ue)){if(e.f^=Ue,e.transitions!==null)for(const a of e.transitions)(a.is_global||r)&&t.push(a);for(var n=e.first;n!==null;){var i=n.next,o=(n.f&pt)!==0||(n.f&Se)!==0;Br(n,t,o?r:!1),n=i}}}function Ht(e){Bn(e,!0)}function Bn(e,t){if(e.f&Ue){Et(e)&&$t(e),e.f^=Ue;for(var r=e.first;r!==null;){var n=r.next,i=(r.f&pt)!==0||(r.f&Se)!==0;Bn(r,i?t:!1),r=n}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}let qr=!1,Fr=[];function Vo(){qr=!1;const e=Fr.slice();Fr=[],Or(e)}function mt(e){qr||(qr=!0,queueMicrotask(Vo)),Fr.push(e)}function ur(e){throw new Error("lifecycle_outside_component")}let fr=!1,yt=!1,jr=!1;function qn(e){yt=e}function Fn(e){jr=e}let Hr=[],Vt=0,Fu=[],G=null;function it(e){G=e}let M=null;function Ce(e){M=e}let Be=null;function Go(e){Be=e}let le=null,xe=0,ot=null;function $o(e){ot=e}let jn=0,wt=!1,U=null;function Hn(){return++jn}function dr(){return!S||U!==null&&U.l===null}function Et(e){var a,s;var t=e.f;if(t&rt)return!0;if(t&_t){var r=e.deps,n=(t&ct)!==0;if(r!==null){var i;if(t&lr){for(i=0;i<r.length;i++)((a=r[i]).reactions??(a.reactions=[])).push(e);e.f^=lr}for(i=0;i<r.length;i++){var o=r[i];if(Et(o)&&Sn(o),n&&M!==null&&!wt&&!((s=o==null?void 0:o.reactions)!=null&&s.includes(e))&&(o.reactions??(o.reactions=[])).push(e),o.version>e.version)return!0}}n||Re(e,ue)}return!1}function Yo(e,t,r){throw e}function Vn(e){var d;var t=le,r=xe,n=ot,i=G,o=wt,a=Be,s=U,l=e.f;le=null,xe=0,ot=null,G=l&(Se|Bt)?null:e,wt=!yt&&(l&ct)!==0,Be=null,U=e.ctx;try{var c=(0,e.fn)(),u=e.deps;if(le!==null){var f;if(Gt(e,xe),u!==null&&xe>0)for(u.length=xe+le.length,f=0;f<le.length;f++)u[xe+f]=le[f];else e.deps=u=le;if(!wt)for(f=xe;f<u.length;f++)((d=u[f]).reactions??(d.reactions=[])).push(e)}else u!==null&&xe<u.length&&(Gt(e,xe),u.length=xe);return c}finally{le=t,xe=r,ot=n,G=i,wt=o,Be=a,U=s}}function zo(e,t){let r=t.reactions;if(r!==null){var n=r.indexOf(e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&t.f&Ye&&(le===null||!le.includes(t))&&(Re(t,_t),t.f&(ct|lr)||(t.f^=lr),Gt(t,0))}function Gt(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)zo(e,r[n])}function $t(e){var t=e.f;if(!(t&qt)){Re(e,ue);var r=M;M=e;try{t&Nr?Ho(e):Un(e),Dn(e),Mn(e);var n=Vn(e);e.teardown=typeof n=="function"?n:null,e.version=jn}catch(i){Yo(i)}finally{M=r}}}function Ko(){Vt>1e3&&(Vt=0,So()),Vt++}function Qo(e){var t=e.length;if(t!==0){Ko();var r=yt;yt=!0;try{for(var n=0;n<t;n++){var i=e[n];i.f&ue||(i.f^=ue);var o=[];Gn(i,o),Wo(o)}}finally{yt=r}}}function Wo(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var n=e[r];!(n.f&(qt|Ue))&&Et(n)&&($t(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Ln(n):n.fn=null))}}function Zo(){if(fr=!1,Vt>1001)return;const e=Hr;Hr=[],Qo(e),fr||(Vt=0)}function vr(e){fr||(fr=!0,queueMicrotask(Zo));for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&(Bt|Se)){if(!(r&ue))return;t.f^=ue}}Hr.push(t)}function Gn(e,t){var r=e.first,n=[];e:for(;r!==null;){var i=r.f,o=(i&Se)!==0,a=o&&(i&ue)!==0;if(!a&&!(i&Ue))if(i&Ct){o?r.f^=ue:Et(r)&&$t(r);var s=r.first;if(s!==null){r=s;continue}}else i&En&&n.push(r);var l=r.next;if(l===null){let f=r.parent;for(;f!==null;){if(e===f)break e;var c=f.next;if(c!==null){r=c;continue e}f=f.parent}}r=l}for(var u=0;u<n.length;u++)s=n[u],t.push(s),Gn(s,t)}function v(e){var s;var t=e.f,r=(t&Ye)!==0;if(r&&t&qt){var n=Nn(e);return Mr(e),n}if(G!==null){Be!==null&&Be.includes(e)&&Lo();var i=G.deps;le===null&&i!==null&&i[xe]===e?xe++:le===null?le=[e]:le.push(e),ot!==null&&M!==null&&M.f&ue&&!(M.f&Se)&&ot.includes(e)&&(Re(M,rt),vr(M))}else if(r&&e.deps===null){var o=e,a=o.parent;a!==null&&!((s=a.deriveds)!=null&&s.includes(o))&&(a.deriveds??(a.deriveds=[])).push(o)}return r&&(o=e,Et(o)&&Sn(o)),e.v}function dt(e){const t=G;try{return G=null,e()}finally{G=t}}const Xo=~(rt|_t|ue);function Re(e,t){e.f=e.f&Xo|t}function Jo(e){return Yn().get(e)}function $n(e,t){return Yn().set(e,t),t}function Yn(e){return U===null&&ur(),U.c??(U.c=new Map(ea(U)||void 0))}function ea(e){let t=e.p;for(;t!==null;){const r=t.c;if(r!==null)return r;t=t.p}return null}function W(e,t=!1,r){U={p:U,c:null,e:null,m:!1,s:e,x:null,l:null},S&&!t&&(U.l={s:null,u:null,r1:[],r2:Ee(!1)})}function Z(e){const t=U;if(t!==null){e!==void 0&&(t.x=e);const a=t.e;if(a!==null){var r=M,n=G;t.e=null;try{for(var i=0;i<a.length;i++){var o=a[i];Ce(o.effect),it(o.reaction),Lr(o.fn)}}finally{Ce(r),it(n)}}U=t.p,t.m=!0}return e||{}}function ce(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(nt in e)Vr(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&nt in r&&Vr(r)}}}function Vr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Vr(e[n],t)}catch{}const r=sr(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=wn(r);for(let i in n){const o=n[i].get;if(o)try{o.call(e)}catch{}}}}}function Ke(e,t=null,r){if(typeof e!="object"||e===null||nt in e)return e;const n=sr(e);if(n!==wo&&n!==Eo)return e;var i=new Map,o=Ve(e),a=Ee(0);o&&i.set("length",Ee(e.length));var s;return new Proxy(e,{defineProperty(l,c,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Do();var f=i.get(c);return f===void 0?(f=Ee(u.value),i.set(c,f)):N(f,Ke(u.value,s)),!0},deleteProperty(l,c){var u=i.get(c);if(u===void 0)c in l&&i.set(c,Ee(se));else{if(o&&typeof c=="string"){var f=i.get("length"),d=Number(c);Number.isInteger(d)&&d<f.v&&N(f,d)}N(u,se),zn(a)}return!0},get(l,c,u){var h;if(c===nt)return e;var f=i.get(c),d=c in l;if(f===void 0&&(!d||(h=Ge(l,c))!=null&&h.writable)&&(f=Ee(Ke(d?l[c]:se,s)),i.set(c,f)),f!==void 0){var g=v(f);return g===se?void 0:g}return Reflect.get(l,c,u)},getOwnPropertyDescriptor(l,c){var u=Reflect.getOwnPropertyDescriptor(l,c);if(u&&"value"in u){var f=i.get(c);f&&(u.value=v(f))}else if(u===void 0){var d=i.get(c),g=d==null?void 0:d.v;if(d!==void 0&&g!==se)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return u},has(l,c){var g;if(c===nt)return!0;var u=i.get(c),f=u!==void 0&&u.v!==se||Reflect.has(l,c);if(u!==void 0||M!==null&&(!f||(g=Ge(l,c))!=null&&g.writable)){u===void 0&&(u=Ee(f?Ke(l[c],s):se),i.set(c,u));var d=v(u);if(d===se)return!1}return f},set(l,c,u,f){var k;var d=i.get(c),g=c in l;if(o&&c==="length")for(var h=u;h<d.v;h+=1){var b=i.get(h+"");b!==void 0?N(b,se):h in l&&(b=Ee(se),i.set(h+"",b))}d===void 0?(!g||(k=Ge(l,c))!=null&&k.writable)&&(d=Ee(void 0),N(d,Ke(u,s)),i.set(c,d)):(g=d.v!==se,N(d,Ke(u,s)));var x=Reflect.getOwnPropertyDescriptor(l,c);if(x!=null&&x.set&&x.set.call(f,u),!g){if(o&&typeof c=="string"){var y=i.get("length"),w=Number(c);Number.isInteger(w)&&w>=y.v&&N(y,w+1)}zn(a)}return!0},ownKeys(l){v(a);var c=Reflect.ownKeys(l).filter(d=>{var g=i.get(d);return g===void 0||g.v!==se});for(var[u,f]of i)f.v!==se&&!(u in l)&&c.push(u);return c},setPrototypeOf(){Uo()}})}function zn(e,t=1){N(e,e.v+t)}var Kn,Qn,Wn;function ta(){if(Kn===void 0){Kn=window;var e=Element.prototype,t=Node.prototype;Qn=Ge(t,"firstChild").get,Wn=Ge(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function Yt(e=""){return document.createTextNode(e)}function zt(e){return Qn.call(e)}function gr(e){return Wn.call(e)}function T(e,t){return zt(e)}function L(e,t){{var r=zt(e);return r instanceof Comment&&r.data===""?gr(r):r}}function D(e,t=1,r=!1){let n=e;for(;t--;)n=gr(n);return n}function ra(e){e.textContent=""}let Zn=!1;function na(e,t){if(t){const r=document.body;e.autofocus=!0,mt(()=>{document.activeElement===r&&e.focus()})}}let Xn=!1;function ia(){Xn||(Xn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Jn(e){var t=G,r=M;it(null),Ce(null);try{return e()}finally{it(t),Ce(r)}}function oa(e,t,r,n=r){e.addEventListener(t,()=>Jn(r));const i=e.__on_r;i?e.__on_r=()=>{i(),n()}:e.__on_r=n,ia()}const ei=new Set,Gr=new Set;function $r(e,t,r,n){function i(o){if(n.capture||Kt.call(t,o),!o.cancelBubble)return Jn(()=>r.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?mt(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function hr(e,t,r,n,i){var o={capture:n,passive:i},a=$r(e,t,r,o);(t===document.body||t===window||t===document)&&Dr(()=>{t.removeEventListener(e,a,o)})}function Yr(e){for(var t=0;t<e.length;t++)ei.add(e[t]);for(var r of Gr)r(e)}function Kt(e){var w;var t=this,r=t.ownerDocument,n=e.type,i=((w=e.composedPath)==null?void 0:w.call(e))||[],o=i[0]||e.target,a=0,s=e.__root;if(s){var l=i.indexOf(s);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(a=l)}if(o=i[a]||e.target,o!==t){Ut(e,"currentTarget",{configurable:!0,get(){return o||r}});var u=G,f=M;it(null),Ce(null);try{for(var d,g=[];o!==null;){var h=o.assignedSlot||o.parentNode||o.host||null;try{var b=o["__"+n];if(b!==void 0&&!o.disabled)if(Ve(b)){var[x,...y]=b;x.apply(o,[e,...y])}else b.call(o,e)}catch(k){d?g.push(k):d=k}if(e.cancelBubble||h===t||h===null)break;o=h}if(d){for(let k of g)queueMicrotask(()=>{throw k});throw d}}finally{e.__root=t,delete e.currentTarget,it(u),Ce(f)}}}function ti(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function xt(e,t){var r=M;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function I(e,t){var r=(t&Mt)!==0,n=(t&ar)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=ti(o?e:"<!>"+e),r||(i=zt(i)));var a=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var s=zt(a),l=a.lastChild;xt(s,l)}else xt(a,a);return a}}function at(e=""){{var t=Yt(e+"");return xt(t,t),t}}function oe(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Yt();return e.append(t,r),xt(t,r),e}function _(e,t){e!==null&&e.before(t)}function aa(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const sa=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function la(e){return sa.includes(e)}const ca={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"};function ua(e){return e=e.toLowerCase(),ca[e]??e}const fa=["touchstart","touchmove"];function da(e){return fa.includes(e)}function de(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r==null?"":r+"")}function ri(e,t){return va(e,t)}const It=new Map;function va(e,{target:t,anchor:r,props:n={},events:i,context:o,intro:a=!0}){ta();var s=new Set,l=f=>{for(var d=0;d<f.length;d++){var g=f[d];if(!s.has(g)){s.add(g);var h=da(g);t.addEventListener(g,Kt,{passive:h});var b=It.get(g);b===void 0?(document.addEventListener(g,Kt,{passive:h}),It.set(g,1)):It.set(g,b+1)}}};l(ie(ei)),Gr.add(l);var c=void 0,u=jo(()=>{var f=r??t.appendChild(Yt());return ze(()=>{if(o){W({});var d=U;d.c=o}i&&(n.$$events=i),c=e(f,n)||{},o&&Z()}),()=>{var h;for(var d of s){t.removeEventListener(d,Kt);var g=It.get(d);--g===0?(document.removeEventListener(d,Kt),It.delete(d)):It.set(d,g)}Gr.delete(l),ni.delete(c),f!==r&&((h=f.parentNode)==null||h.removeChild(f))}});return ni.set(c,u),c}let ni=new WeakMap;function j(e,t,r,n=null,i=!1){var o=e,a=null,s=null,l=null,c=i?pt:0;ft(()=>{l!==(l=!!t())&&(l?(a?Ht(a):a=ze(()=>r(o)),s&&jt(s,()=>{s=null})):(s?Ht(s):n&&(s=ze(()=>n(o))),a&&jt(a,()=>{a=null})))},c)}function ii(e,t){return t}function ga(e,t,r,n){for(var i=[],o=t.length,a=0;a<o;a++)Br(t[a].e,i,!0);var s=o>0&&i.length===0&&r!==null;if(s){var l=r.parentNode;ra(l),l.append(r),n.clear(),st(e,t[0].prev,t[o-1].next)}Cn(i,()=>{for(var c=0;c<o;c++){var u=t[c];s||(n.delete(u.k),st(e,u.prev,u.next)),Le(u.e,!s)}})}function oi(e,t,r,n,i,o=null){var a=e,s={flags:t,items:new Map,first:null},l=(t&Ne)!==0;if(l){var c=e;a=c.appendChild(Yt())}var u=null,f=!1;ft(()=>{var d=r(),g=Ve(d)?d:d==null?[]:ie(d),h=g.length;if(!(f&&h===0)){f=h===0;{var b=G;ha(g,s,a,i,t,(b.f&Ue)!==0,n)}o!==null&&(h===0?u?Ht(u):u=ze(()=>o(a)):u!==null&&jt(u,()=>{u=null})),r()}})}function ha(e,t,r,n,i,o,a){var Ae,We,qe,gt;var s=(i&he)!==0,l=(i&(K|J))!==0,c=e.length,u=t.items,f=t.first,d=f,g,h=null,b,x=[],y=[],w,k,p,P;if(s)for(P=0;P<c;P+=1)w=e[P],k=a(w,P),p=u.get(k),p!==void 0&&((Ae=p.a)==null||Ae.measure(),(b??(b=new Set)).add(p));for(P=0;P<c;P+=1){if(w=e[P],k=a(w,P),p=u.get(k),p===void 0){var C=d?d.e.nodes_start:r;h=pa(C,t,h,h===null?t.first:h.next,w,k,P,n,i),u.set(k,h),x=[],y=[],d=h.next;continue}if(l&&_a(p,w,P,i),p.e.f&Ue&&(Ht(p.e),s&&((We=p.a)==null||We.unfix(),(b??(b=new Set)).delete(p))),p!==d){if(g!==void 0&&g.has(p)){if(x.length<y.length){var V=y[0],A;h=V.prev;var z=x[0],X=x[x.length-1];for(A=0;A<x.length;A+=1)ai(x[A],V,r);for(A=0;A<y.length;A+=1)g.delete(y[A]);st(t,z.prev,X.next),st(t,h,z),st(t,X,V),d=V,h=X,P-=1,x=[],y=[]}else g.delete(p),ai(p,d,r),st(t,p.prev,p.next),st(t,p,h===null?t.first:h.next),st(t,h,p),h=p;continue}for(x=[],y=[];d!==null&&d.k!==k;)(o||!(d.e.f&Ue))&&(g??(g=new Set)).add(d),y.push(d),d=d.next;if(d===null)continue;p=d}x.push(p),h=p,d=p.next}if(d!==null||g!==void 0){for(var Ie=g===void 0?[]:ie(g);d!==null;)(o||!(d.e.f&Ue))&&Ie.push(d),d=d.next;var R=Ie.length;if(R>0){var $=i&Ne&&c===0?r:null;if(s){for(P=0;P<R;P+=1)(qe=Ie[P].a)==null||qe.measure();for(P=0;P<R;P+=1)(gt=Ie[P].a)==null||gt.fix()}ga(t,Ie,$,u)}}s&&mt(()=>{var De;if(b!==void 0)for(p of b)(De=p.a)==null||De.apply()}),M.first=t.first&&t.first.e,M.last=h&&h.e}function _a(e,t,r,n){n&K&&Rr(e.v,t),n&J?Rr(e.i,r):e.i=r}function pa(e,t,r,n,i,o,a,s,l){var c=(l&K)!==0,u=(l&or)===0,f=c?u?cr(i):Ee(i):i,d=l&J?Ee(a):a,g={i:d,v:f,k:o,a:null,e:null,prev:r,next:n};try{return g.e=ze(()=>s(e,f,d),Zn),g.e.prev=r&&r.e,g.e.next=n&&n.e,r===null?t.first=g:(r.next=g,r.e.next=g.e),n!==null&&(n.prev=g,n.e.prev=g.e),g}finally{}}function ai(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,o=e.e.nodes_start;o!==n;){var a=gr(o);i.before(o),o=a}}function st(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function Pt(e,t,r,n,i){var o=e,a="",s;ft(()=>{a!==(a=t()??"")&&(s!==void 0&&(Le(s),s=void 0),a!==""&&(s=ze(()=>{var l=a+"",c=ti(l);xt(zt(c),c.lastChild),o.before(c)})))})}function re(e,t,r,n,i){var s;var o=(s=t.$$slots)==null?void 0:s[r],a=!1;o===!0&&(o=t[r==="default"?"children":r],a=!0),o===void 0||o(e,a?()=>n:n)}function si(e,t,...r){var n=e,i=$e,o;ft(()=>{i!==(i=t())&&(o&&(Le(o),o=null),o=ze(()=>i(n,...r)))},pt)}function ba(e,t,r){var n=e,i,o;ft(()=>{i!==(i=t())&&(o&&(jt(o),o=null),i&&(o=ze(()=>r(n,i))))},pt)}function li(e,t,r,n,i,o){var a,s,l=null,c=e,u;ft(()=>{const f=t()||null;var d=f==="svg"?Dt:null;f!==a&&(u&&(f===null?jt(u,()=>{u=null,s=null}):f===s?Ht(u):Le(u)),f&&f!==s&&(u=ze(()=>{if(l=d?document.createElementNS(d,f):document.createElement(f),xt(l,l),n){var g=l.appendChild(Yt());n(l,g)}M.nodes_end=l,c.before(l)})),a=f,a&&(s=a))},pt)}function q(e,t){mt(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function Q(e,t,r,n){var i=e.__attributes??(e.__attributes={});i[t]!==(i[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[To]=r),r==null?e.removeAttribute(t):typeof r!="string"&&fi(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ci(e,t,r,n,i=!1,o=!1,a=!1){var s=t||{},l=e.tagName==="OPTION";for(var c in t)c in r||(r[c]=null);n!==void 0&&(r.class=r.class?r.class+" "+n:n);var u=fi(e),f=e.__attributes??(e.__attributes={}),d=[];for(const y in r){let w=r[y];if(l&&y==="value"&&w==null){e.value=e.__value="",s[y]=w;continue}var g=s[y];if(w!==g){s[y]=w;var h=y[0]+y[1];if(h!=="$$"){if(h==="on"){const k={},p="$$"+y;let P=y.slice(2);var b=la(P);if(aa(P)&&(P=P.slice(0,-7),k.capture=!0),!b&&g){if(w!=null)continue;e.removeEventListener(P,s[p],k),s[p]=null}if(w!=null)if(b)e[`__${P}`]=w,Yr([P]);else{let C=function(V){s[y].call(this,V)};t?s[p]=$r(P,e,C,k):d.push([y,w,()=>s[p]=$r(P,e,C,k)])}}else if(y==="style"&&w!=null)e.style.cssText=w+"";else if(y==="autofocus")na(e,!!w);else if(y==="__value"||y==="value"&&w!=null)e.value=e[y]=e.__value=w;else{var x=y;i||(x=ua(x)),w==null&&!o?(f[y]=null,e.removeAttribute(y)):u.includes(x)&&(o||typeof w!="string")?e[x]=w:typeof w!="function"&&Q(e,x,w)}y==="style"&&"__styles"in e&&(e.__styles={})}}}return t||mt(()=>{if(e.isConnected)for(const[y,w,k]of d)s[y]===w&&k()}),s}var ui=new Map;function fi(e){var t=ui.get(e.nodeName);if(t)return t;ui.set(e.nodeName,t=[]);for(var r,n=sr(e),i=Element.prototype;i!==n;){r=wn(n);for(var o in r)r[o].set&&t.push(o);n=sr(n)}return t}function zr(e,t){var r=e.__className,n=ma(t);(r!==n||Zn)&&(t==null?e.removeAttribute("class"):e.className=n,e.__className=n)}function ma(e){return e??""}function ya(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function wa(e,t,r=t){var n=dr();oa(e,"input",()=>{var i=di(e)?vi(e.value):e.value;r(i),n&&i!==(i=t())&&(e.value=i??"")}),Ft(()=>{var i=t();di(e)&&i===vi(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function di(e){var t=e.type;return t==="number"||t==="range"}function vi(e){return e===""?null:+e}function _r(e,t,r){var n=Ge(e,t);n&&n.set&&(e[t]=r,Dr(()=>{e[t]=null}))}function gi(e,t){return e===t||(e==null?void 0:e[nt])===t}function Ea(e={},t,r,n){return Lr(()=>{var i,o;return Ft(()=>{i=o,o=[],dt(()=>{e!==r(...o)&&(t(e,...o),i&&gi(r(...i),e)&&t(null,...i))})}),()=>{mt(()=>{o&&gi(r(...o),e)&&t(null,...o)})}}),e}function hi(e){return function(...t){var r=t[0];return r.preventDefault(),e==null?void 0:e.apply(this,t)}}function Me(e=!1){const t=U,r=t.l.u;if(!r)return;let n=()=>ce(t.s);if(e){let i=0,o={};const a=ee(()=>{let s=!1;const l=t.s;for(const c in l)l[c]!==o[c]&&(o[c]=l[c],s=!0);return s&&i++,i});n=()=>v(a)}r.b.length&&Fo(()=>{_i(t,n),Or(r.b)}),Ur(()=>{const i=dt(()=>r.m.map(xo));return()=>{for(const o of i)typeof o=="function"&&o()}}),r.a.length&&Ur(()=>{_i(t,n),Or(r.a)})}function _i(e,t){if(e.l.s)for(const r of e.l.s)v(r);t()}function pi(e,t){var o;var r=(o=e.$$events)==null?void 0:o[t.type],n=Ve(r)?r.slice():r==null?[]:[r];for(var i of n)i.call(this,t)}function pr(e){U===null&&ur(),S&&U.l!==null?bi(U).m.push(e):Ur(()=>{const t=dt(e);if(typeof t=="function")return t})}function xa(e,t,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:r,cancelable:n})}function Ia(){const e=U;return e===null&&ur(),(t,r,n)=>{var o;const i=(o=e.s.$$events)==null?void 0:o[t];if(i){const a=Ve(i)?i.slice():[i],s=xa(t,r,n);for(const l of a)l.call(e.x,s);return!s.defaultPrevented}return!0}}function Pa(e){U===null&&ur(),U.l===null&&Ro(),bi(U).b.push(e)}function bi(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function ka(e,t,r){if(e==null)return t(void 0),$e;const n=dt(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}let br=!1;function Ta(e,t,r){const n=r[t]??(r[t]={store:null,source:cr(void 0),unsubscribe:$e});if(n.store!==e)if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=$e;else{var i=!0;n.unsubscribe=ka(e,o=>{i?n.source.v=o:N(n.source,o)}),i=!1}return v(n.source)}function Aa(){const e={};return Dr(()=>{for(var t in e)e[t].unsubscribe()}),e}function Oa(e){var t=br;try{return br=!1,[e(),br]}finally{br=t}}const Na={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function Kr(e,t,r){return new Proxy({props:e,exclude:t},Na)}const Sa={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(Lt(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let i=e.props[n];Lt(i)&&(i=i());const o=Ge(i,t);if(o&&o.set)return o.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(Lt(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Ge(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===nt||t===In)return!1;for(let r of e.props)if(Lt(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props){Lt(r)&&(r=r());for(const n in r)t.includes(n)||t.push(n)}return t}};function Qt(...e){return new Proxy({props:e},Sa)}function mi(e){for(var t=M,r=M;t!==null&&!(t.f&(Se|Bt));)t=t.parent;try{return Ce(t),e()}finally{Ce(r)}}function m(e,t,r,n){var V;var i=(r&lt)!==0,o=!S||(r&St)!==0,a=(r&Rt)!==0,s=(r&ke)!==0,l=!1,c;a?[c,l]=Oa(()=>e[t]):c=e[t];var u=nt in e||In in e,f=((V=Ge(e,t))==null?void 0:V.set)??(u&&a&&t in e?A=>e[t]=A:void 0),d=n,g=!0,h=!1,b=()=>(h=!0,g&&(g=!1,s?d=dt(n):d=n),d);c===void 0&&n!==void 0&&(f&&o&&Mo(),c=b(),f&&f(c));var x;if(o)x=()=>{var A=e[t];return A===void 0?b():(g=!0,h=!1,A)};else{var y=mi(()=>(i?ee:fe)(()=>e[t]));y.f|=Po,x=()=>{var A=v(y);return A!==void 0&&(d=void 0),A===void 0?d:A}}if(!(r&H))return x;if(f){var w=e.$$legacy;return function(A,z){return arguments.length>0?((!o||!z||w||l)&&f(z?x():A),A):x()}}var k=!1,p=!1,P=cr(c),C=mi(()=>ee(()=>{var A=x(),z=v(P);return k?(k=!1,p=!0,z):(p=!1,P.v=A)}));return i||(C.equals=Sr),function(A,z){if(arguments.length>0){const X=z?v(C):o&&a?Ke(A):A;return C.equals(X)||(k=!0,N(P,X),h&&d!==void 0&&(d=X),dt(()=>v(C))),A}return v(C)}}const Ra={hash:"svelte-1bzqb13",code:".rcb-modal-section.svelte-1bzqb13 {padding:8px 0px;display:flex;}section.rcb-modal-section.svelte-1bzqb13 {flex-grow:1;}.rcb-modal-section.svelte-1bzqb13:last-of-type {padding:0;}"};function kt(e,t){q(e,Ra);let r=m(t,"as",8,"section");var n=oe(),i=L(n);li(i,r,!1,(o,a)=>{ci(o,null,{class:"rcb-modal-section"},"svelte-1bzqb13",o.namespaceURI===Dt,o.nodeName.includes("-"));var s=oe(),l=L(s);re(l,t,"default",{}),_(a,s)}),_(e,n)}var pe=(e=>(e[e.Silent=0]="Silent",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Info=3]="Info",e[e.Debug=4]="Debug",e[e.Verbose=5]="Verbose",e))(pe||{});class Y{static setLogLevel(t){this.logLevel=t}static log(t,r=this.logLevel){const n=`[Purchases] ${t}`;if(!(this.logLevel<r||r===pe.Silent))switch(r){case pe.Error:console.error(n);break;case pe.Warn:console.warn(n);break;case pe.Info:console.info(n);break;case pe.Debug:console.debug(n);break;case pe.Verbose:console.debug(n);break}}static errorLog(t){this.log(t,pe.Error)}static warnLog(t){this.log(t,pe.Warn)}static infoLog(t){this.log(t,pe.Info)}static debugLog(t){this.log(t,pe.Debug)}static verboseLog(t){this.log(t,pe.Verbose)}}B(Y,"logLevel",pe.Silent);var Qe=(e=>(e.Year="year",e.Month="month",e.Week="week",e.Day="day",e))(Qe||{});function Qr(e){const t=e.match(/^PT?([0-9]+)([MDYW])$/);if(!t||t.length<3)return Y.errorLog(`Invalid ISO 8601 duration format: ${e}`),null;const r=parseInt(t[1]);switch(t[2]){case"Y":return{number:r,unit:"year"};case"M":return{number:r,unit:"month"};case"W":return{number:r,unit:"week"};case"D":return{number:r,unit:"day"};default:return Y.errorLog(`Invalid ISO 8601 unit duration format: ${e}`),null}}const ve=(e,t,r)=>{const n=e/1e6;return new Intl.NumberFormat(r,{style:"currency",currency:t}).format(n)},yi=e=>{const t=e.number;if(t===1)switch(e.unit){case Qe.Year:return"yearly";case Qe.Month:return"monthly";case Qe.Week:return"weekly";case Qe.Day:return"daily"}else return`every ${t} ${e.unit}s`},wi=e=>{const t=e.number;if(t===1)switch(e.unit){case Qe.Year:return"1 year";case Qe.Month:return"1 month";case Qe.Week:return"1 week";case Qe.Day:return"1 day"}else return`${t} ${e.unit}s`},Ma=e=>{const t=Qr(e);return t?yi(t):"unknown"},Da=e=>{const t=Qr(e);return t?wi(t):"unknown"};function Ua(e){return e!=null}var Ei=(e=>(e.Unknown="unknown",e.Custom="custom",e.Lifetime="$rc_lifetime",e.Annual="$rc_annual",e.SixMonth="$rc_six_month",e.ThreeMonth="$rc_three_month",e.TwoMonth="$rc_two_month",e.Monthly="$rc_monthly",e.Weekly="$rc_weekly",e))(Ei||{}),Te=(e=>(e.Subscription="subscription",e.Consumable="consumable",e.NonConsumable="non_consumable",e))(Te||{});const xi=e=>({amount:e.amount_micros/1e4,amountMicros:e.amount_micros,currency:e.currency,formattedPrice:ve(e.amount_micros,e.currency)}),Ii=e=>{const t=e.period_duration;return{periodDuration:t,period:t?Qr(t):null,cycleCount:e.cycle_count,price:e.price?xi(e.price):null}},La=e=>e.base==null?(Y.debugLog("Missing base phase for subscription option. Ignoring."),null):{id:e.id,priceId:e.price_id,base:Ii(e.base),trial:e.trial?Ii(e.trial):null},Ca=e=>e.base_price==null?(Y.debugLog("Missing base price for non-subscription option. Ignoring."),null):{id:e.id,priceId:e.price_id,basePrice:xi(e.base_price)},Ba=(e,t)=>{const r=e.product_type;return r==="subscription"?Fa(e,t,r):qa(e,t,r)},qa=(e,t,r)=>{const n={};if(Object.entries(e.purchase_options).forEach(([a,s])=>{const l=Ca(s);l!=null&&(n[a]=l)}),Object.keys(n).length===0)return Y.debugLog(`Product ${e.identifier} has no purchase options. Ignoring.`),null;const i=e.default_purchase_option_id,o=i&&i in e.purchase_options?n[i]:null;return o==null?(Y.debugLog(`Product ${e.identifier} has no default purchase option. Ignoring.`),null):{identifier:e.identifier,displayName:e.title,title:e.title,description:e.description,productType:r,currentPrice:o.basePrice,normalPeriodDuration:null,presentedOfferingIdentifier:t.offeringIdentifier,presentedOfferingContext:t,defaultPurchaseOption:o,defaultSubscriptionOption:null,subscriptionOptions:{},defaultNonSubscriptionOption:o}},Fa=(e,t,r)=>{const n={};if(Object.entries(e.purchase_options).forEach(([s,l])=>{const c=La(l);c!=null&&(n[s]=c)}),Object.keys(n).length===0)return Y.debugLog(`Product ${e.identifier} has no subscription options. Ignoring.`),null;const i=e.default_purchase_option_id,o=i&&i in n?n[i]:null;if(o==null)return Y.debugLog(`Product ${e.identifier} has no default subscription option. Ignoring.`),null;const a=o.base.price;return a==null?(Y.debugLog(`Product ${e.identifier} default option has no base price. Ignoring.`),null):{identifier:e.identifier,displayName:e.title,title:e.title,description:e.description,productType:r,currentPrice:a,normalPeriodDuration:o.base.periodDuration,presentedOfferingIdentifier:t.offeringIdentifier,presentedOfferingContext:t,defaultPurchaseOption:o,defaultSubscriptionOption:o,subscriptionOptions:n,defaultNonSubscriptionOption:null}},ja=(e,t,r)=>{const n=r[t.platform_product_identifier];if(n===void 0)return null;const i=Ba(n,e);return i===null?null:{identifier:t.identifier,rcBillingProduct:i,packageType:Va(t.identifier)}},Ha=(e,t,r,n)=>{const i={offeringIdentifier:t.identifier,targetingContext:e&&n?{ruleId:n.rule_id,revision:n.revision}:null,placementIdentifier:null},o=t.packages.map(s=>ja(i,s,r)).filter(Ua),a={};for(const s of o)s!=null&&(a[s.identifier]=s);return o.length==0?null:{identifier:t.identifier,serverDescription:t.description,metadata:t.metadata,packagesById:a,availablePackages:o,lifetime:a.$rc_lifetime??null,annual:a.$rc_annual??null,sixMonth:a.$rc_six_month??null,threeMonth:a.$rc_three_month??null,twoMonth:a.$rc_two_month??null,monthly:a.$rc_monthly??null,weekly:a.$rc_weekly??null,paywall_components:t.paywall_components?t.paywall_components:null}};function Va(e){switch(e){case"$rc_lifetime":return"$rc_lifetime";case"$rc_annual":return"$rc_annual";case"$rc_six_month":return"$rc_six_month";case"$rc_three_month":return"$rc_three_month";case"$rc_two_month":return"$rc_two_month";case"$rc_monthly":return"$rc_monthly";case"$rc_weekly":return"$rc_weekly";default:return e.startsWith("$rc_")?"unknown":"custom"}}var Ga=I('<span class="rcb-product-price-after-trial svelte-1mdrqnh"> </span>'),$a=I('<span class="rcb-product-description svelte-1mdrqnh"> </span>'),Ya=I("<li> </li>"),za=I('<span class="rcb-product-price svelte-1mdrqnh"><!> <!></span> <!> <!> <ul class="rcb-product-details svelte-1mdrqnh"><!> <li>Continues until canceled</li> <li>Cancel anytime</li></ul>',1),Ka=I('<span class="rcb-product-description svelte-1mdrqnh"> </span>'),Qa=I('<span class="rcb-product-price svelte-1mdrqnh"> </span> <!>',1),Wa=I('<div class="rcb-pricing-info svelte-1mdrqnh"><span class="rc-product-title"> </span> <!> <!></div>');const Za={hash:"svelte-1mdrqnh",code:`.rcb-pricing-info.svelte-1mdrqnh {display:flex;flex-direction:column;margin-top:102px;font-weight:500;}.rcb-product-price.svelte-1mdrqnh {color:var(--rc-color-grey-text-dark);font-size:24px;margin:12px 0px;}.rcb-product-description.svelte-1mdrqnh {color:var(--rc-color-grey-text-dark);margin:0 0 12px 0;}.rcb-product-price-after-trial.svelte-1mdrqnh {margin-bottom:12px;}.rcb-product-details.svelte-1mdrqnh {color:var(--rc-color-grey-text-light);list-style-type:disc;list-style-position:inside;margin:0px;padding:0px;}
1
+ (function(S,F){typeof exports=="object"&&typeof module<"u"?F(exports):typeof define=="function"&&define.amd?define(["exports"],F):(S=typeof globalThis<"u"?globalThis:S||self,F(S.Purchases={}))})(this,function(S){"use strict";var Z_=Object.create;var Gn=Object.defineProperty;var Q_=Object.getOwnPropertyDescriptor;var zo=(S,F)=>(F=Symbol[S])?F:Symbol.for("Symbol."+S),wt=S=>{throw TypeError(S)};var Vo=(S,F,R)=>F in S?Gn(S,F,{enumerable:!0,configurable:!0,writable:!0,value:R}):S[F]=R;var Uo=(S,F)=>Gn(S,"name",{value:F,configurable:!0});var Ho=S=>[,,,Z_((S==null?void 0:S[zo("metadata")])??null)],Yo=["class","method","getter","setter","accessor","field","value","get","set"],bt=S=>S!==void 0&&typeof S!="function"?wt("Function expected"):S,J_=(S,F,R,Oe,te)=>({kind:Yo[S],name:F,metadata:Oe,addInitializer:le=>R._?wt("Already initialized"):te.push(bt(le||null))}),Wn=(S,F)=>Vo(F,zo("metadata"),S[3]),Go=(S,F,R,Oe)=>{for(var te=0,le=S[F>>1],Re=le&&le.length;te<Re;te++)F&1?le[te].call(R):Oe=le[te].call(R,Oe);return Oe},Wo=(S,F,R,Oe,te,le)=>{var Re,qe,Pt,wr,Wr,W=F&7,Zr=!!(F&8),Ce=!!(F&16),Qr=W>3?S.length+1:W?Zr?1:2:0,kt=Yo[W+5],he=W>3&&(S[Qr-1]=[]),Jr=S[Qr]||(S[Qr]=[]),De=W&&(!Ce&&!Zr&&(te=te.prototype),W<5&&(W>3||!Ce)&&Q_(W<4?te:{get[R](){return Lo(this,le)},set[R](ye){return Bo(this,le,ye)}},R));W?Ce&&W<4&&Uo(le,(W>2?"set ":W>1?"get ":"")+R):Uo(te,R);for(var er=Oe.length-1;er>=0;er--)wr=J_(W,R,Pt={},S[3],Jr),W&&(wr.static=Zr,wr.private=Ce,Wr=wr.access={has:Ce?ye=>K_(te,ye):ye=>R in ye},W^3&&(Wr.get=Ce?ye=>(W^1?Lo:X_)(ye,te,W^4?le:De.get):ye=>ye[R]),W>2&&(Wr.set=Ce?(ye,Kr)=>Bo(ye,te,Kr,W^4?le:De.set):(ye,Kr)=>ye[R]=Kr)),qe=(0,Oe[er])(W?W<4?Ce?le:De[kt]:W>4?void 0:{get:De.get,set:De.set}:te,wr),Pt._=1,W^4||qe===void 0?bt(qe)&&(W>4?he.unshift(qe):W?Ce?le=qe:De[kt]=qe:te=qe):typeof qe!="object"||qe===null?wt("Object expected"):(bt(Re=qe.get)&&(De.get=Re),bt(Re=qe.set)&&(De.set=Re),bt(Re=qe.init)&&he.unshift(Re));return W||Wn(S,te),De&&Gn(te,R,De),Ce?W^4?le:De:te},V=(S,F,R)=>Vo(S,typeof F!="symbol"?F+"":F,R),Zn=(S,F,R)=>F.has(S)||wt("Cannot "+R),K_=(S,F)=>Object(F)!==F?wt('Cannot use the "in" operator on this value'):S.has(F),Lo=(S,F,R)=>(Zn(S,F,"read from private field"),R?R.call(S):F.get(S));var Bo=(S,F,R,Oe)=>(Zn(S,F,"write to private field"),Oe?Oe.call(S,R):F.set(S,R),R),X_=(S,F,R)=>(Zn(S,F,"access private method"),R);var Co,Vn;const F="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(F);let R=!1;function Oe(){R=!0}Oe();const te=1,le=2,Re=4,qe=8,Pt=16,wr=1,Wr=2,W=4,Zr=8,Ce=16,Qr=1,kt=2,he=Symbol(),Jr="http://www.w3.org/2000/svg",De=!1;var er=Array.isArray,ye=Array.from,Kr=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,Qn=Object.getOwnPropertyDescriptors,Zo=Object.prototype,Qo=Array.prototype,Jt=Object.getPrototypeOf;function Xr(e){return typeof e=="function"}const Ye=()=>{};function Jo(e){return e()}function Kt(e){for(var r=0;r<e.length;r++)e[r]()}const Ue=2,Jn=4,$r=8,Xt=16,Le=32,et=64,$t=128,Pr=256,Et=512,xe=1024,ur=2048,Fr=4096,Ge=8192,Ar=16384,Ko=32768,Or=65536,Xo=1<<17,$o=1<<19,Kn=1<<20,cr=Symbol("$state"),Xn=Symbol("legacy props"),es=Symbol("");function $n(e){return e===this.v}function ea(e,r){return e!=e?r==r:e!==r||e!==null&&typeof e=="object"||typeof e=="function"}function en(e){return!ea(e,this.v)}function rs(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ts(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ns(e){throw new Error("https://svelte.dev/e/effect_orphan")}function as(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function os(e){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function ss(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function is(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ls(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function us(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function cs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Me(e){return{f:0,v:e,reactions:null,equals:$n,version:0}}function _s(e){return ra(Me(e))}function xt(e,r=!1){var n;const t=Me(e);return r||(t.equals=en),R&&z!==null&&z.l!==null&&((n=z.l).s??(n.s=[])).push(t),t}function Se(e,r=!1){return ra(xt(e,r))}function ra(e){return J!==null&&J.f&Ue&&(Qe===null?bs([e]):Qe.push(e)),e}function A(e,r){return J!==null&&At()&&J.f&(Ue|Xt)&&(Qe===null||!Qe.includes(e))&&cs(),rn(e,r)}function rn(e,r){return e.equals(r)||(e.v=r,e.version=wa(),ta(e,ur),At()&&B!==null&&B.f&xe&&!(B.f&Le)&&(ve!==null&&ve.includes(e)?(Be(B,ur),Dt(B)):dr===null?ws([e]):dr.push(e))),r}function ta(e,r){var t=e.reactions;if(t!==null)for(var n=At(),a=t.length,o=0;o<a;o++){var s=t[o],i=s.f;i&ur||!n&&s===B||(Be(s,r),i&(xe|Pr)&&(i&Ue?ta(s,Fr):Dt(s)))}}let na=!1;function tr(e,r=null,t){if(typeof e!="object"||e===null||cr in e)return e;const n=Jt(e);if(n!==Zo&&n!==Qo)return e;var a=new Map,o=er(e),s=Me(0);o&&a.set("length",Me(e.length));var i;return new Proxy(e,{defineProperty(l,u,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&is();var d=a.get(u);return d===void 0?(d=Me(c.value),a.set(u,d)):A(d,tr(c.value,i)),!0},deleteProperty(l,u){var c=a.get(u);if(c===void 0)u in l&&a.set(u,Me(he));else{if(o&&typeof u=="string"){var d=a.get("length"),_=Number(u);Number.isInteger(_)&&_<d.v&&A(d,_)}A(c,he),aa(s)}return!0},get(l,u,c){var m;if(u===cr)return e;var d=a.get(u),_=u in l;if(d===void 0&&(!_||(m=rr(l,u))!=null&&m.writable)&&(d=Me(tr(_?l[u]:he,i)),a.set(u,d)),d!==void 0){var f=p(d);return f===he?void 0:f}return Reflect.get(l,u,c)},getOwnPropertyDescriptor(l,u){var c=Reflect.getOwnPropertyDescriptor(l,u);if(c&&"value"in c){var d=a.get(u);d&&(c.value=p(d))}else if(c===void 0){var _=a.get(u),f=_==null?void 0:_.v;if(_!==void 0&&f!==he)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return c},has(l,u){var f;if(u===cr)return!0;var c=a.get(u),d=c!==void 0&&c.v!==he||Reflect.has(l,u);if(c!==void 0||B!==null&&(!d||(f=rr(l,u))!=null&&f.writable)){c===void 0&&(c=Me(d?tr(l[u],i):he),a.set(u,c));var _=p(c);if(_===he)return!1}return d},set(l,u,c,d){var I;var _=a.get(u),f=u in l;if(o&&u==="length")for(var m=c;m<_.v;m+=1){var y=a.get(m+"");y!==void 0?A(y,he):m in l&&(y=Me(he),a.set(m+"",y))}_===void 0?(!f||(I=rr(l,u))!=null&&I.writable)&&(_=Me(void 0),A(_,tr(c,i)),a.set(u,_)):(f=_.v!==he,A(_,tr(c,i)));var w=Reflect.getOwnPropertyDescriptor(l,u);if(w!=null&&w.set&&w.set.call(d,c),!f){if(o&&typeof u=="string"){var P=a.get("length"),E=Number(u);Number.isInteger(E)&&E>=P.v&&A(P,E+1)}aa(s)}return!0},ownKeys(l){p(s);var u=Reflect.ownKeys(l).filter(_=>{var f=a.get(_);return f===void 0||f.v!==he});for(var[c,d]of a)d.v!==he&&!(c in l)&&u.push(c);return u},setPrototypeOf(){ls()}})}function aa(e,r=1){A(e,e.v+r)}var oa,sa,ia;function ds(){if(oa===void 0){oa=window;var e=Element.prototype,r=Node.prototype;sa=rr(r,"firstChild").get,ia=rr(r,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function rt(e=""){return document.createTextNode(e)}function tt(e){return sa.call(e)}function St(e){return ia.call(e)}function q(e,r){return tt(e)}function j(e,r){{var t=tt(e);return t instanceof Comment&&t.data===""?St(t):t}}function N(e,r=1,t=!1){let n=e;for(;r--;)n=St(n);return n}function ps(e){e.textContent=""}function ee(e){var r=Ue|ur;B===null?r|=Pr:B.f|=Kn;var t=J!==null&&J.f&Ue?J:null;const n={children:null,ctx:z,deps:null,equals:$n,f:r,fn:e,reactions:null,v:null,version:0,parent:t??B};return t!==null&&(t.children??(t.children=[])).push(n),n}function re(e){const r=ee(e);return r.equals=en,r}function la(e){var r=e.children;if(r!==null){e.children=null;for(var t=0;t<r.length;t+=1){var n=r[t];n.f&Ue?tn(n):We(n)}}}function fs(e){for(var r=e.parent;r!==null;){if(!(r.f&Ue))return r;r=r.parent}return null}function ua(e){var r,t=B;Ze(fs(e));try{la(e),r=Pa(e)}finally{Ze(t)}return r}function ca(e){var r=ua(e),t=(Nr||e.f&Pr)&&e.deps!==null?Fr:xe;Be(e,t),e.equals(r)||(e.v=r,e.version=wa())}function tn(e){la(e),lt(e,0),Be(e,Ar),e.v=e.children=e.deps=e.ctx=e.reactions=null}function _a(e){B===null&&J===null&&ns(),J!==null&&J.f&Pr&&ts(),_n&&rs()}function ms(e,r){var t=r.last;t===null?r.last=r.first=e:(t.next=e,e.prev=t,r.last=e)}function Dr(e,r,t,n=!0){var a=(e&et)!==0,o=B,s={ctx:z,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|ur,first:null,fn:r,last:null,next:null,parent:a?null:o,prev:null,teardown:null,transitions:null,version:0};if(t){var i=Mr;try{ga(!0),ut(s),s.f|=Ko}catch(c){throw We(s),c}finally{ga(i)}}else r!==null&&Dt(s);var l=t&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&Kn)===0;if(!l&&!a&&n&&(o!==null&&ms(s,o),J!==null&&J.f&Ue)){var u=J;(u.children??(u.children=[])).push(s)}return s}function nn(e){const r=Dr($r,null,!1);return Be(r,xe),r.teardown=e,r}function an(e){_a();var r=B!==null&&(B.f&Le)!==0&&z!==null&&!z.m;if(r){var t=z;(t.e??(t.e=[])).push({fn:e,effect:B,reaction:J})}else{var n=on(e);return n}}function hs(e){return _a(),nt(e)}function ys(e){const r=Dr(et,e,!0);return()=>{We(r)}}function on(e){return Dr(Jn,e,!1)}function kr(e,r){var t=z,n={effect:null,ran:!1};t.l.r1.push(n),n.effect=nt(()=>{e(),!n.ran&&(n.ran=!0,A(t.l.r2,!0),pr(r))})}function sn(){var e=z;nt(()=>{if(p(e.l.r2)){for(var r of e.l.r1){var t=r.effect;t.f&xe&&Be(t,Fr),Cr(t)&&ut(t),r.ran=!1}e.l.r2.v=!1}})}function nt(e){return Dr($r,e,!0)}function Z(e){return Er(e)}function Er(e,r=0){return Dr($r|Xt|r,e,!0)}function nr(e,r=!0){return Dr($r|Le,e,!0,r)}function da(e){var r=e.teardown;if(r!==null){const t=_n,n=J;va(!0),_r(null);try{r.call(null)}finally{va(t),_r(n)}}}function pa(e){var r=e.deriveds;if(r!==null){e.deriveds=null;for(var t=0;t<r.length;t+=1)tn(r[t])}}function fa(e,r=!1){var t=e.first;for(e.first=e.last=null;t!==null;){var n=t.next;We(t,r),t=n}}function gs(e){for(var r=e.first;r!==null;){var t=r.next;r.f&Le||We(r),r=t}}function We(e,r=!0){var t=!1;if((r||e.f&$o)&&e.nodes_start!==null){for(var n=e.nodes_start,a=e.nodes_end;n!==null;){var o=n===a?null:St(n);n.remove(),n=o}t=!0}fa(e,r&&!t),pa(e),lt(e,0),Be(e,Ar);var s=e.transitions;if(s!==null)for(const l of s)l.stop();da(e);var i=e.parent;i!==null&&i.first!==null&&ma(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function ma(e){var r=e.parent,t=e.prev,n=e.next;t!==null&&(t.next=n),n!==null&&(n.prev=t),r!==null&&(r.first===e&&(r.first=n),r.last===e&&(r.last=t))}function at(e,r){var t=[];ln(e,t,!0),ha(t,()=>{We(e),r&&r()})}function ha(e,r){var t=e.length;if(t>0){var n=()=>--t||r();for(var a of e)a.out(n)}else r()}function ln(e,r,t){if(!(e.f&Ge)){if(e.f^=Ge,e.transitions!==null)for(const s of e.transitions)(s.is_global||t)&&r.push(s);for(var n=e.first;n!==null;){var a=n.next,o=(n.f&Or)!==0||(n.f&Le)!==0;ln(n,r,o?t:!1),n=a}}}function ot(e){ya(e,!0)}function ya(e,r){if(e.f&Ge){Cr(e)&&ut(e),e.f^=Ge;for(var t=e.first;t!==null;){var n=t.next,a=(t.f&Or)!==0||(t.f&Le)!==0;ya(t,a?r:!1),t=n}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&o.in()}}let un=!1,cn=[];function vs(){un=!1;const e=cn.slice();cn=[],Kt(e)}function st(e){un||(un=!0,queueMicrotask(vs)),cn.push(e)}function It(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let qt=!1,Tt=!1,Ft=null,Mr=!1,_n=!1;function ga(e){Mr=e}function va(e){_n=e}let dn=[],it=0,$_=[],J=null;function _r(e){J=e}let B=null;function Ze(e){B=e}let Qe=null;function bs(e){Qe=e}let ve=null,Ne=0,dr=null;function ws(e){dr=e}let ba=0,Nr=!1,z=null;function wa(){return++ba}function At(){return!R||z!==null&&z.l===null}function Cr(e){var s,i;var r=e.f;if(r&ur)return!0;if(r&Fr){var t=e.deps,n=(r&Pr)!==0;if(t!==null){var a;if(r&Et){for(a=0;a<t.length;a++)((s=t[a]).reactions??(s.reactions=[])).push(e);e.f^=Et}for(a=0;a<t.length;a++){var o=t[a];if(Cr(o)&&ca(o),n&&B!==null&&!Nr&&!((i=o==null?void 0:o.reactions)!=null&&i.includes(e))&&(o.reactions??(o.reactions=[])).push(e),o.version>e.version)return!0}}n||Be(e,xe)}return!1}function Ps(e,r){for(var t=r;t!==null;){if(t.f&$t)try{t.fn(e);return}catch{t.f^=$t}t=t.parent}throw qt=!1,e}function ks(e){return(e.f&Ar)===0&&(e.parent===null||(e.parent.f&$t)===0)}function Ot(e,r,t,n){if(qt){if(t===null&&(qt=!1),ks(r))throw e;return}t!==null&&(qt=!0);{Ps(e,r);return}}function Pa(e){var _;var r=ve,t=Ne,n=dr,a=J,o=Nr,s=Qe,i=z,l=e.f;ve=null,Ne=0,dr=null,J=l&(Le|et)?null:e,Nr=!Mr&&(l&Pr)!==0,Qe=null,z=e.ctx;try{var u=(0,e.fn)(),c=e.deps;if(ve!==null){var d;if(lt(e,Ne),c!==null&&Ne>0)for(c.length=Ne+ve.length,d=0;d<ve.length;d++)c[Ne+d]=ve[d];else e.deps=c=ve;if(!Nr)for(d=Ne;d<c.length;d++)((_=c[d]).reactions??(_.reactions=[])).push(e)}else c!==null&&Ne<c.length&&(lt(e,Ne),c.length=Ne);return u}finally{ve=r,Ne=t,dr=n,J=a,Nr=o,Qe=s,z=i}}function Es(e,r){let t=r.reactions;if(t!==null){var n=t.indexOf(e);if(n!==-1){var a=t.length-1;a===0?t=r.reactions=null:(t[n]=t[a],t.pop())}}t===null&&r.f&Ue&&(ve===null||!ve.includes(r))&&(Be(r,Fr),r.f&(Pr|Et)||(r.f^=Et),lt(r,0))}function lt(e,r){var t=e.deps;if(t!==null)for(var n=r;n<t.length;n++)Es(e,t[n])}function ut(e){var r=e.f;if(!(r&Ar)){Be(e,xe);var t=B,n=z;B=e;try{r&Xt?gs(e):fa(e),pa(e),da(e);var a=Pa(e);e.teardown=typeof a=="function"?a:null,e.version=ba}catch(o){Ot(o,e,t,n||e.ctx)}finally{B=t}}}function xs(){if(it>1e3){it=0;try{as()}catch(e){if(Ft!==null)Ot(e,Ft,null);else throw e}}it++}function Ss(e){var r=e.length;if(r!==0){xs();var t=Mr;Mr=!0;try{for(var n=0;n<r;n++){var a=e[n];a.f&xe||(a.f^=xe);var o=[];ka(a,o),Is(o)}}finally{Mr=t}}}function Is(e){var r=e.length;if(r!==0)for(var t=0;t<r;t++){var n=e[t];if(!(n.f&(Ar|Ge)))try{Cr(n)&&(ut(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?ma(n):n.fn=null))}catch(a){Ot(a,n,null,n.ctx)}}}function qs(){if(Tt=!1,it>1001)return;const e=dn;dn=[],Ss(e),Tt||(it=0,Ft=null)}function Dt(e){Tt||(Tt=!0,queueMicrotask(qs)),Ft=e;for(var r=e;r.parent!==null;){r=r.parent;var t=r.f;if(t&(et|Le)){if(!(t&xe))return;r.f^=xe}}dn.push(r)}function ka(e,r){var t=e.first,n=[];e:for(;t!==null;){var a=t.f,o=(a&Le)!==0,s=o&&(a&xe)!==0,i=t.next;if(!s&&!(a&Ge))if(a&$r){if(o)t.f^=xe;else try{Cr(t)&&ut(t)}catch(d){Ot(d,t,null,t.ctx)}var l=t.first;if(l!==null){t=l;continue}}else a&Jn&&n.push(t);if(i===null){let d=t.parent;for(;d!==null;){if(e===d)break e;var u=d.next;if(u!==null){t=u;continue e}d=d.parent}}t=i}for(var c=0;c<n.length;c++)l=n[c],r.push(l),ka(l,r)}function p(e){var c;var r=e.f,t=(r&Ue)!==0;if(t&&r&Ar){var n=ua(e);return tn(e),n}if(J!==null){Qe!==null&&Qe.includes(e)&&us();var a=J.deps;ve===null&&a!==null&&a[Ne]===e?Ne++:ve===null?ve=[e]:ve.push(e),dr!==null&&B!==null&&B.f&xe&&!(B.f&Le)&&dr.includes(e)&&(Be(B,ur),Dt(B))}else if(t&&e.deps===null)for(var o=e,s=o.parent,i=o;s!==null;)if(s.f&Ue){var l=s;i=l,s=l.parent}else{var u=s;(c=u.deriveds)!=null&&c.includes(i)||(u.deriveds??(u.deriveds=[])).push(i);break}return t&&(o=e,Cr(o)&&ca(o)),e.v}function pr(e){const r=J;try{return J=null,e()}finally{J=r}}const Ts=~(ur|Fr|xe);function Be(e,r){e.f=e.f&Ts|r}function xr(e){return Ea().get(e)}function pn(e,r){return Ea().set(e,r),r}function Ea(e){return z===null&&It(),z.c??(z.c=new Map(Fs(z)||void 0))}function Fs(e){let r=e.p;for(;r!==null;){const t=r.c;if(t!==null)return t;r=r.p}return null}function ne(e,r=!1,t){z={p:z,c:null,e:null,m:!1,s:e,x:null,l:null},R&&!r&&(z.l={s:null,u:null,r1:[],r2:Me(!1)})}function ae(e){const r=z;if(r!==null){e!==void 0&&(r.x=e);const s=r.e;if(s!==null){var t=B,n=J;r.e=null;try{for(var a=0;a<s.length;a++){var o=s[a];Ze(o.effect),_r(o.reaction),on(o.fn)}}finally{Ze(t),_r(n)}}z=r.p,r.m=!0}return e||{}}function be(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(cr in e)fn(e);else if(!Array.isArray(e))for(let r in e){const t=e[r];typeof t=="object"&&t&&cr in t&&fn(t)}}}function fn(e,r=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!r.has(e)){r.add(e),e instanceof Date&&e.getTime();for(let n in e)try{fn(e[n],r)}catch{}const t=Jt(e);if(t!==Object.prototype&&t!==Array.prototype&&t!==Map.prototype&&t!==Set.prototype&&t!==Date.prototype){const n=Qn(t);for(let a in n){const o=n[a].get;if(o)try{o.call(e)}catch{}}}}}function As(e,r){if(r){const t=document.body;e.autofocus=!0,st(()=>{document.activeElement===t&&e.focus()})}}let xa=!1;function Os(){xa||(xa=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var r;if(!e.defaultPrevented)for(const t of e.target.elements)(r=t.__on_r)==null||r.call(t)})},{capture:!0}))}function Sa(e){var r=J,t=B;_r(null),Ze(null);try{return e()}finally{_r(r),Ze(t)}}function Ds(e,r,t,n=t){e.addEventListener(r,()=>Sa(t));const a=e.__on_r;a?e.__on_r=()=>{a(),n(!0)}:e.__on_r=()=>n(!0),Os()}const Ia=new Set,mn=new Set;function qa(e,r,t,n){function a(o){if(n.capture||ct.call(r,o),!o.cancelBubble)return Sa(()=>t.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?st(()=>{r.addEventListener(e,a,n)}):r.addEventListener(e,a,n),a}function Mt(e,r,t,n,a){var o={capture:n,passive:a},s=qa(e,r,t,o);(r===document.body||r===window||r===document)&&nn(()=>{r.removeEventListener(e,s,o)})}function hn(e){for(var r=0;r<e.length;r++)Ia.add(e[r]);for(var t of mn)t(e)}function ct(e){var E;var r=this,t=r.ownerDocument,n=e.type,a=((E=e.composedPath)==null?void 0:E.call(e))||[],o=a[0]||e.target,s=0,i=e.__root;if(i){var l=a.indexOf(i);if(l!==-1&&(r===document||r===window)){e.__root=r;return}var u=a.indexOf(r);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==r){Kr(e,"currentTarget",{configurable:!0,get(){return o||t}});var c=J,d=B;_r(null),Ze(null);try{for(var _,f=[];o!==null;){var m=o.assignedSlot||o.parentNode||o.host||null;try{var y=o["__"+n];if(y!==void 0&&!o.disabled)if(er(y)){var[w,...P]=y;w.apply(o,[e,...P])}else y.call(o,e)}catch(I){_?f.push(I):_=I}if(e.cancelBubble||m===r||m===null)break;o=m}if(_){for(let I of f)queueMicrotask(()=>{throw I});throw _}}finally{e.__root=r,delete e.currentTarget,_r(c),Ze(d)}}}function Ta(e){var r=document.createElement("template");return r.innerHTML=e,r.content}function jr(e,r){var t=B;t.nodes_start===null&&(t.nodes_start=e,t.nodes_end=r)}function x(e,r){var t=(r&Qr)!==0,n=(r&kt)!==0,a,o=!e.startsWith("<!>");return()=>{a===void 0&&(a=Ta(o?e:"<!>"+e),t||(a=tt(a)));var s=n?document.importNode(a,!0):a.cloneNode(!0);if(t){var i=tt(s),l=s.lastChild;jr(i,l)}else jr(s,s);return s}}function _t(e=""){{var r=rt(e+"");return jr(r,r),r}}function ie(){var e=document.createDocumentFragment(),r=document.createComment(""),t=rt();return e.append(r,t),jr(r,t),e}function h(e,r){e!==null&&e.before(r)}function Ms(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Ns=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Cs(e){return Ns.includes(e)}const js={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function Rs(e){return e=e.toLowerCase(),js[e]??e}const Us=["touchstart","touchmove"];function Ls(e){return Us.includes(e)}function ar(e,r){var t=r==null?"":typeof r=="object"?r+"":r;t!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=t,e.nodeValue=t==null?"":t+"")}function Fa(e,r){return Bs(e,r)}const Rr=new Map;function Bs(e,{target:r,anchor:t,props:n={},events:a,context:o,intro:s=!0}){ds();var i=new Set,l=d=>{for(var _=0;_<d.length;_++){var f=d[_];if(!i.has(f)){i.add(f);var m=Ls(f);r.addEventListener(f,ct,{passive:m});var y=Rr.get(f);y===void 0?(document.addEventListener(f,ct,{passive:m}),Rr.set(f,1)):Rr.set(f,y+1)}}};l(ye(Ia)),mn.add(l);var u=void 0,c=ys(()=>{var d=t??r.appendChild(rt());return nr(()=>{if(o){ne({});var _=z;_.c=o}a&&(n.$$events=a),u=e(d,n)||{},o&&ae()}),()=>{var m;for(var _ of i){r.removeEventListener(_,ct);var f=Rr.get(_);--f===0?(document.removeEventListener(_,ct),Rr.delete(_)):Rr.set(_,f)}mn.delete(l),Aa.delete(u),d!==t&&((m=d.parentNode)==null||m.removeChild(d))}});return Aa.set(u,c),u}let Aa=new WeakMap;function U(e,r,t=!1){var n=e,a=null,o=null,s=he,i=t?Or:0,l=!1;const u=(d,_=!0)=>{l=!0,c(_,d)},c=(d,_)=>{s!==(s=d)&&(s?(a?ot(a):_&&(a=nr(()=>_(n))),o&&at(o,()=>{o=null})):(o?ot(o):_&&(o=nr(()=>_(n))),a&&at(a,()=>{a=null})))};Er(()=>{l=!1,r(u),l||c(null,null)},i)}function Oa(e,r){return r}function zs(e,r,t,n){for(var a=[],o=r.length,s=0;s<o;s++)ln(r[s].e,a,!0);var i=o>0&&a.length===0&&t!==null;if(i){var l=t.parentNode;ps(l),l.append(t),n.clear(),fr(e,r[0].prev,r[o-1].next)}ha(a,()=>{for(var u=0;u<o;u++){var c=r[u];i||(n.delete(c.k),fr(e,c.prev,c.next)),We(c.e,!i)}})}function Da(e,r,t,n,a,o=null){var s=e,i={flags:r,items:new Map,first:null},l=(r&Re)!==0;if(l){var u=e;s=u.appendChild(rt())}var c=null,d=!1;Er(()=>{var _=t(),f=er(_)?_:_==null?[]:ye(_),m=f.length;if(!(d&&m===0)){d=m===0;{var y=J;Vs(f,i,s,a,r,(y.f&Ge)!==0,n)}o!==null&&(m===0?c?ot(c):c=nr(()=>o(s)):c!==null&&at(c,()=>{c=null})),t()}})}function Vs(e,r,t,n,a,o,s){var Y,M,se,Pe;var i=(a&qe)!==0,l=(a&(te|le))!==0,u=e.length,c=r.items,d=r.first,_=d,f,m=null,y,w=[],P=[],E,I,b,v;if(i)for(v=0;v<u;v+=1)E=e[v],I=s(E,v),b=c.get(I),b!==void 0&&((Y=b.a)==null||Y.measure(),(y??(y=new Set)).add(b));for(v=0;v<u;v+=1){if(E=e[v],I=s(E,v),b=c.get(I),b===void 0){var T=_?_.e.nodes_start:t;m=Ys(T,r,m,m===null?r.first:m.next,E,I,v,n,a),c.set(I,m),w=[],P=[],_=m.next;continue}if(l&&Hs(b,E,v,a),b.e.f&Ge&&(ot(b.e),i&&((M=b.a)==null||M.unfix(),(y??(y=new Set)).delete(b))),b!==_){if(f!==void 0&&f.has(b)){if(w.length<P.length){var k=P[0],O;m=k.prev;var G=w[0],D=w[w.length-1];for(O=0;O<w.length;O+=1)Ma(w[O],k,t);for(O=0;O<P.length;O+=1)f.delete(P[O]);fr(r,G.prev,D.next),fr(r,m,G),fr(r,D,k),_=k,m=D,v-=1,w=[],P=[]}else f.delete(b),Ma(b,_,t),fr(r,b.prev,b.next),fr(r,b,m===null?r.first:m.next),fr(r,m,b),m=b;continue}for(w=[],P=[];_!==null&&_.k!==I;)(o||!(_.e.f&Ge))&&(f??(f=new Set)).add(_),P.push(_),_=_.next;if(_===null)continue;b=_}w.push(b),m=b,_=b.next}if(_!==null||f!==void 0){for(var oe=f===void 0?[]:ye(f);_!==null;)(o||!(_.e.f&Ge))&&oe.push(_),_=_.next;var _e=oe.length;if(_e>0){var we=a&Re&&u===0?t:null;if(i){for(v=0;v<_e;v+=1)(se=oe[v].a)==null||se.measure();for(v=0;v<_e;v+=1)(Pe=oe[v].a)==null||Pe.fix()}zs(r,oe,we,c)}}i&&st(()=>{var sr;if(y!==void 0)for(b of y)(sr=b.a)==null||sr.apply()}),B.first=r.first&&r.first.e,B.last=m&&m.e}function Hs(e,r,t,n){n&te&&rn(e.v,r),n&le?rn(e.i,t):e.i=t}function Ys(e,r,t,n,a,o,s,i,l){var u=(l&te)!==0,c=(l&Pt)===0,d=u?c?xt(a):Me(a):a,_=l&le?Me(s):s,f={i:_,v:d,k:o,a:null,e:null,prev:t,next:n};try{return f.e=nr(()=>i(e,d,_),na),f.e.prev=t&&t.e,f.e.next=n&&n.e,t===null?r.first=f:(t.next=f,t.e.next=f.e),n!==null&&(n.prev=f,n.e.prev=f.e),f}finally{}}function Ma(e,r,t){for(var n=e.next?e.next.e.nodes_start:t,a=r?r.e.nodes_start:t,o=e.e.nodes_start;o!==n;){var s=St(o);a.before(o),o=s}}function fr(e,r,t){r===null?e.first=t:(r.next=t,r.e.next=t&&t.e),t!==null&&(t.prev=r,t.e.prev=r&&r.e)}function Ur(e,r,t,n,a){var o=e,s="",i;Er(()=>{s!==(s=r()??"")&&(i!==void 0&&(We(i),i=void 0),s!==""&&(i=nr(()=>{var l=s+"",u=Ta(l);jr(tt(u),u.lastChild),o.before(u)})))})}function pe(e,r,t,n,a){var i;var o=(i=r.$$slots)==null?void 0:i[t],s=!1;o===!0&&(o=r[t==="default"?"children":t],s=!0),o===void 0||o(e,s?()=>n:n)}function yn(e,r,...t){var n=e,a=Ye,o;Er(()=>{a!==(a=r())&&(o&&(We(o),o=null),o=nr(()=>a(n,...t)))},Or)}function Gs(e,r,t){var n=e,a,o;Er(()=>{a!==(a=r())&&(o&&(at(o),o=null),a&&(o=nr(()=>t(n,a))))},Or)}function Na(e,r,t,n,a,o){var s,i,l=null,u=e,c;Er(()=>{const d=r()||null;var _=d==="svg"?Jr:null;d!==s&&(c&&(d===null?at(c,()=>{c=null,i=null}):d===i?ot(c):We(c)),d&&d!==i&&(c=nr(()=>{if(l=_?document.createElementNS(_,d):document.createElement(d),jr(l,l),n){var f=l.appendChild(rt());n(l,f)}B.nodes_end=l,u.before(l)})),s=d,s&&(i=s))},Or)}function H(e,r){st(()=>{var t=e.getRootNode(),n=t.host?t:t.head??t.ownerDocument.head;if(!n.querySelector("#"+r.hash)){const a=document.createElement("style");a.id=r.hash,a.textContent=r.code,n.appendChild(a)}})}function Ws(e,r){r?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function K(e,r,t,n){var a=e.__attributes??(e.__attributes={});a[r]!==(a[r]=t)&&(r==="style"&&"__styles"in e&&(e.__styles={}),r==="loading"&&(e[es]=t),t==null?e.removeAttribute(r):typeof t!="string"&&Ra(e).includes(r)?e[r]=t:e.setAttribute(r,t))}function Ca(e,r,t,n,a=!1,o=!1,s=!1){var i=r||{},l=e.tagName==="OPTION";for(var u in r)u in t||(t[u]=null);n!==void 0&&(t.class=t.class?t.class+" "+n:n);var c=Ra(e),d=e.__attributes??(e.__attributes={});for(const P in t){let E=t[P];if(l&&P==="value"&&E==null){e.value=e.__value="",i[P]=E;continue}var _=i[P];if(E!==_){i[P]=E;var f=P[0]+P[1];if(f!=="$$"){if(f==="on"){const I={},b="$$"+P;let v=P.slice(2);var m=Cs(v);if(Ms(v)&&(v=v.slice(0,-7),I.capture=!0),!m&&_){if(E!=null)continue;e.removeEventListener(v,i[b],I),i[b]=null}if(E!=null)if(m)e[`__${v}`]=E,hn([v]);else{let T=function(k){i[P].call(this,k)};i[b]=qa(v,e,T,I)}else m&&(e[`__${v}`]=void 0)}else if(P==="style"&&E!=null)e.style.cssText=E+"";else if(P==="autofocus")As(e,!!E);else if(P==="__value"||P==="value"&&E!=null)e.value=e[P]=e.__value=E;else if(P==="selected"&&l)Ws(e,E);else{var y=P;a||(y=Rs(y));var w=y==="defaultValue"||y==="defaultChecked";if(E==null&&!o&&!w)if(d[P]=null,y==="value"||y==="checked"){let I=e;if(y==="value"){let b=I.defaultValue;I.removeAttribute(y),I.defaultValue=b}else{let b=I.defaultChecked;I.removeAttribute(y),I.defaultChecked=b}}else e.removeAttribute(P);else w||c.includes(y)&&(o||typeof E!="string")?e[y]=E:typeof E!="function"&&K(e,y,E)}P==="style"&&"__styles"in e&&(e.__styles={})}}}return i}var ja=new Map;function Ra(e){var r=ja.get(e.nodeName);if(r)return r;ja.set(e.nodeName,r=[]);for(var t,n=e,a=Element.prototype;a!==n;){t=Qn(n);for(var o in t)t[o].set&&r.push(o);n=Jt(n)}return r}function gn(e,r){var t=e.__className,n=Zs(r);(t!==n||na)&&(r==null?e.removeAttribute("class"):e.className=n,e.__className=n)}function Zs(e){return e??""}function Qs(e,r,t){if(t){if(e.classList.contains(r))return;e.classList.add(r)}else{if(!e.classList.contains(r))return;e.classList.remove(r)}}function Js(e,r,t=r){var n=At();Ds(e,"input",a=>{var o=a?e.defaultValue:e.value;if(o=vn(e)?bn(o):o,t(o),n&&o!==(o=r())){var s=e.selectionStart,i=e.selectionEnd;e.value=o??"",i!==null&&(e.selectionStart=s,e.selectionEnd=Math.min(i,e.value.length))}}),pr(r)==null&&e.value&&t(vn(e)?bn(e.value):e.value),nt(()=>{var a=r();vn(e)&&a===bn(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function vn(e){var r=e.type;return r==="number"||r==="range"}function bn(e){return e===""?null:+e}function Nt(e,r,t){var n=rr(e,r);n&&n.set&&(e[r]=t,nn(()=>{e[r]=null}))}function Ua(e,r){return e===r||(e==null?void 0:e[cr])===r}function Ks(e={},r,t,n){return on(()=>{var a,o;return nt(()=>{a=o,o=[],pr(()=>{e!==t(...o)&&(r(e,...o),a&&Ua(t(...a),e)&&r(null,...a))})}),()=>{st(()=>{o&&Ua(t(...o),e)&&r(null,...o)})}}),e}function La(e){return function(...r){var t=r[0];return t.preventDefault(),e==null?void 0:e.apply(this,r)}}function ze(e=!1){const r=z,t=r.l.u;if(!t)return;let n=()=>be(r.s);if(e){let a=0,o={};const s=ee(()=>{let i=!1;const l=r.s;for(const u in l)l[u]!==o[u]&&(o[u]=l[u],i=!0);return i&&a++,a});n=()=>p(s)}t.b.length&&hs(()=>{Ba(r,n),Kt(t.b)}),an(()=>{const a=pr(()=>t.m.map(Jo));return()=>{for(const o of a)typeof o=="function"&&o()}}),t.a.length&&an(()=>{Ba(r,n),Kt(t.a)})}function Ba(e,r){if(e.l.s)for(const t of e.l.s)p(t);r()}function za(e,r){var o;var t=(o=e.$$events)==null?void 0:o[r.type],n=er(t)?t.slice():t==null?[]:[t];for(var a of n)a.call(this,r)}function Ct(e){z===null&&It(),R&&z.l!==null?Va(z).m.push(e):an(()=>{const r=pr(e);if(typeof r=="function")return r})}function Xs(e,r,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:r,bubbles:t,cancelable:n})}function $s(){const e=z;return e===null&&It(),(r,t,n)=>{var o;const a=(o=e.s.$$events)==null?void 0:o[r];if(a){const s=er(a)?a.slice():[a],i=Xs(r,t,n);for(const l of s)l.call(e.x,i);return!i.defaultPrevented}return!0}}function ei(e){z===null&&It(),z.l===null&&os(),Va(z).b.push(e)}function Va(e){var r=e.l;return r.u??(r.u={a:[],b:[],m:[]})}function ri(e,r,t){if(e==null)return r(void 0),Ye;const n=pr(()=>e.subscribe(r,t));return n.unsubscribe?()=>n.unsubscribe():n}let jt=!1;function Ha(e,r,t){const n=t[r]??(t[r]={store:null,source:xt(void 0),unsubscribe:Ye});if(n.store!==e)if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=Ye;else{var a=!0;n.unsubscribe=ri(e,o=>{a?n.source.v=o:A(n.source,o)}),a=!1}return p(n.source)}function Ya(){const e={};return nn(()=>{for(var r in e)e[r].unsubscribe()}),e}function ti(e){var r=jt;try{return jt=!1,[e(),jt]}finally{jt=r}}const ni={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function wn(e,r,t){return new Proxy({props:e,exclude:r},ni)}const ai={get(e,r){let t=e.props.length;for(;t--;){let n=e.props[t];if(Xr(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,t){let n=e.props.length;for(;n--;){let a=e.props[n];Xr(a)&&(a=a());const o=rr(a,r);if(o&&o.set)return o.set(t),!0}return!1},getOwnPropertyDescriptor(e,r){let t=e.props.length;for(;t--;){let n=e.props[t];if(Xr(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const a=rr(n,r);return a&&!a.configurable&&(a.configurable=!0),a}}},has(e,r){if(r===cr||r===Xn)return!1;for(let t of e.props)if(Xr(t)&&(t=t()),t!=null&&r in t)return!0;return!1},ownKeys(e){const r=[];for(let t of e.props){Xr(t)&&(t=t());for(const n in t)r.includes(n)||r.push(n)}return r}};function dt(...e){return new Proxy({props:e},ai)}function Ga(e){for(var r=B,t=B;r!==null&&!(r.f&(Le|et));)r=r.parent;try{return Ze(r),e()}finally{Ze(t)}}function g(e,r,t,n){var k;var a=(t&wr)!==0,o=!R||(t&Wr)!==0,s=(t&Zr)!==0,i=(t&Ce)!==0,l=!1,u;s?[u,l]=ti(()=>e[r]):u=e[r];var c=cr in e||Xn in e,d=((k=rr(e,r))==null?void 0:k.set)??(c&&s&&r in e?O=>e[r]=O:void 0),_=n,f=!0,m=!1,y=()=>(m=!0,f&&(f=!1,i?_=pr(n):_=n),_);u===void 0&&n!==void 0&&(d&&o&&ss(),u=y(),d&&d(u));var w;if(o)w=()=>{var O=e[r];return O===void 0?y():(f=!0,m=!1,O)};else{var P=Ga(()=>(a?ee:re)(()=>e[r]));P.f|=Xo,w=()=>{var O=p(P);return O!==void 0&&(_=void 0),O===void 0?_:O}}if(!(t&W))return w;if(d){var E=e.$$legacy;return function(O,G){return arguments.length>0?((!o||!G||E||l)&&d(G?w():O),O):w()}}var I=!1,b=!1,v=xt(u),T=Ga(()=>ee(()=>{var O=w(),G=p(v);return I?(I=!1,b=!0,G):(b=!1,v.v=O)}));return a||(T.equals=en),function(O,G){if(arguments.length>0){const D=G?p(T):o&&s?tr(O):O;return T.equals(D)||(I=!0,A(v,D),m&&_!==void 0&&(_=D),pr(()=>p(T))),O}return p(T)}}const oi={hash:"svelte-1bzqb13",code:".rcb-modal-section.svelte-1bzqb13 {padding:8px 0px;display:flex;}section.rcb-modal-section.svelte-1bzqb13 {flex-grow:1;}.rcb-modal-section.svelte-1bzqb13:last-of-type {padding:0;}"};function Lr(e,r){H(e,oi);let t=g(r,"as",8,"section");var n=ie(),a=j(n);Na(a,t,!1,(o,s)=>{Ca(o,null,{class:"rcb-modal-section"},"svelte-1bzqb13",o.namespaceURI===Jr,o.nodeName.includes("-"));var i=ie(),l=j(i);pe(l,r,"default",{}),h(s,i)}),h(e,n)}const Sr="rcb-ui-translator",or="en",si={"periods.week":"{{amount}} week","periods.month":"{{amount}} month","periods.year":"{{amount}} year","periods.day":"{{amount}} day","periods.weekShort":"{{amount}}wk","periods.monthShort":"{{amount}}mo","periods.yearShort":"{{amount}}yr","periods.dayShort":"{{amount}}d","periods.lifetime":"lifetime","periods.weekPlural":"{{amount}} weeks","periods.monthPlural":"{{amount}} months","periods.yearPlural":"{{amount}} years","periods.dayPlural":"{{amount}} days","periods.weekFrequency":"weekly","periods.monthFrequency":"monthly","periods.yearFrequency":"yearly","periods.dayFrequency":"daily","periods.unknownFrequency":"unknown","periods.weekFrequencyPlural":"every {{amount}} weeks","periods.monthFrequencyPlural":"every {{amount}} months","periods.yearFrequencyPlural":"every {{amount}} years","periods.dayFrequencyPlural":"every {{amount}} days","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} free trial","state_present_offer.price_after_free_trial":"{{productPrice}} after end of trial","state_present_offer.renewal_frequency":"Renews {{frequency}}","state_present_offer.continues_until_cancelled":"Continues until cancelled","state_present_offer.cancel_anytime":"Cancel anytime","state_needs_auth_info.email_step_title":"Billing email address","state_needs_auth_info.email_input_label":"Email","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Continue","state_needs_payment_info.payment_step_title":"Secure checkout","state_needs_payment_info.button_pay":"Pay","state_needs_payment_info.button_start_trial":"Start Trial","state_success.purchase_successful":"Purchase successful","state_success.subscription_now_active":"Your subscription is now active","state_success.button_close":"Close","state_error.if_error_persists":"If the error persists, please contact ","state_error.error_title_already_subscribed":"Already Subscribed","state_error.error_title_already_purchased":"Already Purchased","state_error.error_title_other_errors":"Something went wrong","state_error.error_message_already_subscribed":"You are already subscribed to this product.","state_error.error_message_already_purchased":"You have already purchased this product.","state_error.error_message_missing_email_error":"Email is required to complete the purchase.","state_error.error_message_network_error":"Network error. Please check your internet connection.","state_error.error_message_error_charging_payment":"Payment failed.","state_error.error_message_error_setting_up_purchase":"Purchase not started due to an error. Error code: {{errorCode}}","state_error.error_message_unknown_error":"An unknown error occurred. Error code: {{errorCode}}","state_error.button_try_again":"Try again","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% off","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})"},ii={"periods.week":"{{amount}} semana","periods.month":"{{amount}} mes","periods.year":"{{amount}} año","periods.day":"{{amount}} día","periods.weekShort":"{{amount}}wk","periods.monthShort":"{{amount}}mo","periods.yearShort":"{{amount}}yr","periods.dayShort":"{{amount}}d","periods.lifetime":"de por vida","periods.weekPlural":"{{amount}} semanas","periods.monthPlural":"{{amount}} meses","periods.yearPlural":"{{amount}} años","periods.dayPlural":"{{amount}} días","periods.weekFrequency":"cada semana","periods.monthFrequency":"cada mes","periods.yearFrequency":"cada año","periods.dayFrequency":"cada día","periods.unknownFrequency":"desconocida","periods.weekFrequencyPlural":"cada {{amount}} semanas","periods.monthFrequencyPlural":"cada {{amount}} meses","periods.yearFrequencyPlural":"cada {{amount}} años","periods.dayFrequencyPlural":"cada {{amount}} días","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"Prueba gratuita de {{trialDuration}}","state_present_offer.price_after_free_trial":"{{productPrice}} tras el periodo de prueba","state_present_offer.renewal_frequency":"Se renueva {{frequency}}","state_present_offer.continues_until_cancelled":"Continúa hasta que se cancele","state_present_offer.cancel_anytime":"Cancela en cualquier momento","state_needs_auth_info.email_step_title":"Email de facturación","state_needs_auth_info.email_input_label":"Email","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Continuar","state_needs_payment_info.payment_step_title":"Pago seguro","state_needs_payment_info.button_pay":"Pagar","state_needs_payment_info.button_start_trial":"Comenzar la prueba","state_success.purchase_successful":"Compra completada","state_success.subscription_now_active":"Tu suscripción ya está activa","state_success.button_close":"Cerrar","state_error.if_error_persists":"Si el problema persiste, por favor contáctanos en ","state_error.error_title_already_subscribed":"Suscripción existente","state_error.error_title_already_purchased":"Producto ya adquirido","state_error.error_title_other_errors":"Algo salió mal","state_error.error_message_already_subscribed":"Ya te has suscrito a este producto.","state_error.error_message_already_purchased":"Ya has comprado este producto.","state_error.error_message_missing_email_error":"Se requiere un email para completar la compra.","state_error.error_message_network_error":"Error de red. Por favor, verifica tu conexión a internet.","state_error.error_message_error_charging_payment":"El pago no se completó.","state_error.error_message_error_setting_up_purchase":"La compra no se inició debido a un error. Código de error: {{errorCode}}","state_error.error_message_unknown_error":"Ocurrió un error desconocido. Código de error: {{errorCode}}","state_error.button_try_again":"Intentar de nuevo","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% de descuento","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})"},li={"periods.week":"{{amount}} settimana","periods.month":"{{amount}} mese","periods.year":"{{amount}} anno","periods.day":"{{amount}} giorno","periods.weekShort":"{{amount}} settim.","periods.monthShort":"{{amount}} mese","periods.yearShort":"{{amount}} anno","periods.dayShort":"{{amount}} giorno","periods.lifetime":"a vita","periods.weekPlural":"{{amount}} settimane","periods.monthPlural":"{{amount}} mesi","periods.yearPlural":"{{amount}} anni","periods.dayPlural":"{{amount}} giorni","periods.weekFrequency":"ogni settimana","periods.monthFrequency":"ogni mese","periods.yearFrequency":"ogni anno","periods.dayFrequency":"ogni giorno","periods.unknownFrequency":"sconosciuta","periods.weekFrequencyPlural":"ogni {{amount}} settimane","periods.monthFrequencyPlural":"ogni {{amount}} mesi","periods.yearFrequencyPlural":"ogni {{amount}} anni","periods.dayFrequencyPlural":"ogni {{amount}} giorni","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} prova gratuita","state_present_offer.price_after_free_trial":"{{productPrice}} dopo la fine della prova","state_present_offer.renewal_frequency":"Si rinnova {{frequency}}","state_present_offer.continues_until_cancelled":"Continua fino alla cancellazione","state_present_offer.cancel_anytime":"Cancella in qualsiasi momento","state_needs_auth_info.email_step_title":"Indirizzo email per la fatturazione","state_needs_auth_info.email_input_label":"Email","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Continua","state_needs_payment_info.payment_step_title":"Pagamento sicuro","state_needs_payment_info.button_pay":"Paga","state_needs_payment_info.button_start_trial":"Inizia la prova","state_success.purchase_successful":"Acquisto riuscito","state_success.subscription_now_active":"Il tuo abbonamento è ora attivo","state_success.button_close":"Chiudi","state_error.if_error_persists":"Se l'errore persiste, contatta ","state_error.error_title_already_subscribed":"Già abbonato","state_error.error_title_already_purchased":"Già acquistato","state_error.error_title_other_errors":"Qualcosa è andato storto","state_error.error_message_already_subscribed":"Sei già abbonato a questo prodotto.","state_error.error_message_already_purchased":"Hai già acquistato questo prodotto.","state_error.error_message_missing_email_error":"L'email è necessaria per completare l'acquisto.","state_error.error_message_network_error":"Errore di rete. Controlla la tua connessione internet.","state_error.error_message_error_charging_payment":"Pagamento fallito.","state_error.error_message_error_setting_up_purchase":"Acquisto non avviato a causa di un errore. Codice errore: {{errorCode}}","state_error.error_message_unknown_error":"Si è verificato un errore sconosciuto. Codice errore: {{errorCode}}","state_error.button_try_again":"Riprova","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% di sconto","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}}({{formattedPricePerMonth}}/{{monthPeriod}})"},ui={"periods.unknownFrequency":"غير معروف","periods.week":"{{amount}} أسبوع","periods.month":"{{amount}} شهر","periods.year":"{{amount}} سنة","periods.day":"{{amount}} يوم","periods.weekShort":"{{amount}} أسب.","periods.monthShort":"{{amount}} شه.","periods.yearShort":"{{amount}} سن.","periods.dayShort":"{{amount}} يوم","periods.lifetime":"مدى الحياة","periods.weekPlural":"{{amount}} أسابيع","periods.monthPlural":"{{amount}} أشهر","periods.yearPlural":"{{amount}} سنوات","periods.dayPlural":"{{amount}} أيام","periods.weekFrequency":"أسبوعيًا","periods.monthFrequency":"شهريًا","periods.yearFrequency":"سنويًا","periods.dayFrequency":"يوميًا","periods.weekFrequencyPlural":"كل {{amount}} أسابيع","periods.monthFrequencyPlural":"كل {{amount}} أشهر","periods.yearFrequencyPlural":"كل {{amount}} سنوات","periods.dayFrequencyPlural":"كل {{amount}} أيام","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} تجربة مجانية","state_present_offer.price_after_free_trial":"{{productPrice}} بعد نهاية التجربة","state_present_offer.renewal_frequency":"تجدد {{frequency}}","state_present_offer.continues_until_cancelled":"تستمر حتى الإلغاء","state_present_offer.cancel_anytime":"الإلغاء في أي وقت","state_needs_auth_info.email_step_title":"عنوان البريد الإلكتروني للفوترة","state_needs_auth_info.email_input_label":"البريد الإلكتروني","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"متابعة","state_needs_payment_info.payment_step_title":"الدفع الآمن","state_needs_payment_info.button_pay":"دفع","state_needs_payment_info.button_start_trial":"ابدأ التجربة","state_success.purchase_successful":"تم الشراء بنجاح","state_success.subscription_now_active":"اشتراكك نشط الآن","state_success.button_close":"إغلاق","state_error.if_error_persists":"إذا استمرت المشكلة، يرجى الاتصال بـ ","state_error.error_title_already_subscribed":"مشترك بالفعل","state_error.error_title_already_purchased":"تم الشراء بالفعل","state_error.error_title_other_errors":"حدث خطأ ما","state_error.error_message_already_subscribed":"أنت مشترك بالفعل في هذا المنتج.","state_error.error_message_already_purchased":"لقد قمت بالفعل بشراء هذا المنتج.","state_error.error_message_missing_email_error":"البريد الإلكتروني مطلوب لإكمال عملية الشراء.","state_error.error_message_network_error":"خطأ في الشبكة. يرجى التحقق من اتصال الإنترنت.","state_error.error_message_error_charging_payment":"فشل الدفع.","state_error.error_message_error_setting_up_purchase":"لم يتم بدء عملية الشراء بسبب خطأ. رمز الخطأ: {{errorCode}}","state_error.error_message_unknown_error":"حدث خطأ غير معروف. رمز الخطأ: {{errorCode}}","state_error.button_try_again":"حاول مرة أخرى","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% خصم","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},ci={"periods.unknownFrequency":"desconegut","periods.week":"{{amount}} setmana","periods.month":"{{amount}} mes","periods.year":"{{amount}} any","periods.day":"{{amount}} dia","periods.weekShort":"{{amount}} set.","periods.monthShort":"{{amount}} mes","periods.yearShort":"{{amount}} any","periods.dayShort":"{{amount}} dia","periods.lifetime":"de per vida","periods.weekPlural":"{{amount}} setmanes","periods.monthPlural":"{{amount}} mesos","periods.yearPlural":"{{amount}} anys","periods.dayPlural":"{{amount}} dies","periods.weekFrequency":"setmanal","periods.monthFrequency":"mensual","periods.yearFrequency":"anual","periods.dayFrequency":"diari","periods.weekFrequencyPlural":"cada {{amount}} setmanes","periods.monthFrequencyPlural":"cada {{amount}} mesos","periods.yearFrequencyPlural":"cada {{amount}} anys","periods.dayFrequencyPlural":"cada {{amount}} dies","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} prova gratuïta","state_present_offer.price_after_free_trial":"{{productPrice}} després de la prova","state_present_offer.renewal_frequency":"Es renova {{frequency}}","state_present_offer.continues_until_cancelled":"Continua fins a la cancel·lació","state_present_offer.cancel_anytime":"Cancel·la en qualsevol moment","state_needs_auth_info.email_step_title":"Adreça de correu electrònic de facturació","state_needs_auth_info.email_input_label":"Correu electrònic","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Continua","state_needs_payment_info.payment_step_title":"Pagament segur","state_needs_payment_info.button_pay":"Paga","state_needs_payment_info.button_start_trial":"Comença la prova","state_success.purchase_successful":"Compra realitzada amb èxit","state_success.subscription_now_active":"La teva subscripció ja està activa","state_success.button_close":"Tanca","state_error.if_error_persists":"Si l'error persisteix, contacta amb ","state_error.error_title_already_subscribed":"Ja subscrit","state_error.error_title_already_purchased":"Ja comprat","state_error.error_title_other_errors":"Alguna cosa ha fallat","state_error.error_message_already_subscribed":"Ja estàs subscrit a aquest producte.","state_error.error_message_already_purchased":"Ja has comprat aquest producte.","state_error.error_message_missing_email_error":"Es necessita el correu electrònic per completar la compra.","state_error.error_message_network_error":"Error de xarxa. Comprova la teva connexió a Internet.","state_error.error_message_error_charging_payment":"El pagament ha fallat.","state_error.error_message_error_setting_up_purchase":"No s'ha pogut iniciar la compra a causa d'un error. Codi d'error: {{errorCode}}","state_error.error_message_unknown_error":"S'ha produït un error desconegut. Codi d'error: {{errorCode}}","state_error.button_try_again":"Torna-ho a provar","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% de descompte","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},_i={"periods.unknownFrequency":"未知","periods.week":"{{amount}} 周","periods.month":"{{amount}} 月","periods.year":"{{amount}} 年","periods.day":"{{amount}} 天","periods.weekShort":"{{amount}} 周","periods.monthShort":"{{amount}} 月","periods.yearShort":"{{amount}} 年","periods.dayShort":"{{amount}} 天","periods.lifetime":"终身","periods.weekPlural":"{{amount}} 周","periods.monthPlural":"{{amount}} 月","periods.yearPlural":"{{amount}} 年","periods.dayPlural":"{{amount}} 天","periods.weekFrequency":"每周","periods.monthFrequency":"每月","periods.yearFrequency":"每年","periods.dayFrequency":"每天","periods.weekFrequencyPlural":"每 {{amount}} 周","periods.monthFrequencyPlural":"每 {{amount}} 月","periods.yearFrequencyPlural":"每 {{amount}} 年","periods.dayFrequencyPlural":"每 {{amount}} 天","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} 免费试用","state_present_offer.price_after_free_trial":"{{productPrice}} 试用结束后","state_present_offer.renewal_frequency":"续订 {{frequency}}","state_present_offer.continues_until_cancelled":"持续至取消","state_present_offer.cancel_anytime":"随时取消","state_needs_auth_info.email_step_title":"账单电子邮件地址","state_needs_auth_info.email_input_label":"电子邮件","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"继续","state_needs_payment_info.payment_step_title":"安全结账","state_needs_payment_info.button_pay":"支付","state_needs_payment_info.button_start_trial":"开始试用","state_success.purchase_successful":"购买成功","state_success.subscription_now_active":"您的订阅现已激活","state_success.button_close":"关闭","state_error.if_error_persists":"如果错误仍然存在,请联系 ","state_error.error_title_already_subscribed":"已订阅","state_error.error_title_already_purchased":"已购买","state_error.error_title_other_errors":"出了点问题","state_error.error_message_already_subscribed":"您已订阅此产品。","state_error.error_message_already_purchased":"您已购买此产品。","state_error.error_message_missing_email_error":"需要电子邮件才能完成购买。","state_error.error_message_network_error":"网络错误。请检查您的互联网连接。","state_error.error_message_error_charging_payment":"付款失败。","state_error.error_message_error_setting_up_purchase":"由于错误,购买未开始。错误代码:{{errorCode}}","state_error.error_message_unknown_error":"发生未知错误。错误代码:{{errorCode}}","state_error.button_try_again":"再试一次","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% 折扣","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},di={"periods.unknownFrequency":"未知","periods.week":"{{amount}} 週","periods.month":"{{amount}} 月","periods.year":"{{amount}} 年","periods.day":"{{amount}} 天","periods.weekShort":"{{amount}} 週","periods.monthShort":"{{amount}} 月","periods.yearShort":"{{amount}} 年","periods.dayShort":"{{amount}} 天","periods.lifetime":"終身","periods.weekPlural":"{{amount}} 週","periods.monthPlural":"{{amount}} 月","periods.yearPlural":"{{amount}} 年","periods.dayPlural":"{{amount}} 天","periods.weekFrequency":"每週","periods.monthFrequency":"每月","periods.yearFrequency":"每年","periods.dayFrequency":"每天","periods.weekFrequencyPlural":"每 {{amount}} 週","periods.monthFrequencyPlural":"每 {{amount}} 月","periods.yearFrequencyPlural":"每 {{amount}} 年","periods.dayFrequencyPlural":"每 {{amount}} 天","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} 免費試用","state_present_offer.price_after_free_trial":"{{productPrice}} 試用結束後","state_present_offer.renewal_frequency":"續訂 {{frequency}}","state_present_offer.continues_until_cancelled":"持續至取消","state_present_offer.cancel_anytime":"隨時取消","state_needs_auth_info.email_step_title":"帳單電子郵件地址","state_needs_auth_info.email_input_label":"電子郵件","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"繼續","state_needs_payment_info.payment_step_title":"安全結帳","state_needs_payment_info.button_pay":"支付","state_needs_payment_info.button_start_trial":"開始試用","state_success.purchase_successful":"購買成功","state_success.subscription_now_active":"您的訂閱現已啟用","state_success.button_close":"關閉","state_error.if_error_persists":"如果錯誤仍然存在,請聯繫 ","state_error.error_title_already_subscribed":"已訂閱","state_error.error_title_already_purchased":"已購買","state_error.error_title_other_errors":"出了一些問題","state_error.error_message_already_subscribed":"您已訂閱此產品。","state_error.error_message_already_purchased":"您已購買此產品。","state_error.error_message_missing_email_error":"需要電子郵件才能完成購買。","state_error.error_message_network_error":"網絡錯誤。請檢查您的互聯網連接。","state_error.error_message_error_charging_payment":"付款失敗。","state_error.error_message_error_setting_up_purchase":"由於錯誤,購買未開始。錯誤代碼:{{errorCode}}","state_error.error_message_unknown_error":"發生未知錯誤。錯誤代碼:{{errorCode}}","state_error.button_try_again":"再試一次","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% 折扣","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},pi={"periods.unknownFrequency":"nepoznato","periods.week":"{{amount}} tjedan","periods.month":"{{amount}} mjesec","periods.year":"{{amount}} godina","periods.day":"{{amount}} dan","periods.weekShort":"{{amount}} tj.","periods.monthShort":"{{amount}} mj.","periods.yearShort":"{{amount}} god.","periods.dayShort":"{{amount}} dan","periods.lifetime":"doživotno","periods.weekPlural":"{{amount}} tjedana","periods.monthPlural":"{{amount}} mjeseci","periods.yearPlural":"{{amount}} godina","periods.dayPlural":"{{amount}} dana","periods.weekFrequency":"tjedno","periods.monthFrequency":"mjesečno","periods.yearFrequency":"godišnje","periods.dayFrequency":"dnevno","periods.weekFrequencyPlural":"svakih {{amount}} tjedana","periods.monthFrequencyPlural":"svakih {{amount}} mjeseci","periods.yearFrequencyPlural":"svakih {{amount}} godina","periods.dayFrequencyPlural":"svakih {{amount}} dana","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} besplatno probno razdoblje","state_present_offer.price_after_free_trial":"{{productPrice}} nakon završetka probnog razdoblja","state_present_offer.renewal_frequency":"Obnavlja se {{frequency}}","state_present_offer.continues_until_cancelled":"Traje dok se ne otkaže","state_present_offer.cancel_anytime":"Otkaži bilo kada","state_needs_auth_info.email_step_title":"Adresa e-pošte za naplatu","state_needs_auth_info.email_input_label":"E-pošta","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Nastavi","state_needs_payment_info.payment_step_title":"Sigurna naplata","state_needs_payment_info.button_pay":"Plati","state_needs_payment_info.button_start_trial":"Započni probu","state_success.purchase_successful":"Kupnja uspješna","state_success.subscription_now_active":"Vaša pretplata je sada aktivna","state_success.button_close":"Zatvori","state_error.if_error_persists":"Ako pogreška i dalje traje, kontaktirajte ","state_error.error_title_already_subscribed":"Već pretplaćeno","state_error.error_title_already_purchased":"Već kupljeno","state_error.error_title_other_errors":"Nešto je pošlo po krivu","state_error.error_message_already_subscribed":"Već ste pretplaćeni na ovaj proizvod.","state_error.error_message_already_purchased":"Već ste kupili ovaj proizvod.","state_error.error_message_missing_email_error":"E-pošta je potrebna za dovršetak kupnje.","state_error.error_message_network_error":"Greška u mreži. Provjerite internetsku vezu.","state_error.error_message_error_charging_payment":"Plaćanje nije uspjelo.","state_error.error_message_error_setting_up_purchase":"Kupnja nije započeta zbog greške. Kôd greške: {{errorCode}}","state_error.error_message_unknown_error":"Došlo je do nepoznate greške. Kôd greške: {{errorCode}}","state_error.button_try_again":"Pokušaj ponovno","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% popust","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},fi={"periods.unknownFrequency":"neznámý","periods.week":"{{amount}} týden","periods.month":"{{amount}} měsíc","periods.year":"{{amount}} rok","periods.day":"{{amount}} den","periods.weekShort":"{{amount}} týd.","periods.monthShort":"{{amount}} měs.","periods.yearShort":"{{amount}} rok","periods.dayShort":"{{amount}} den","periods.lifetime":"doživotní","periods.weekPlural":"{{amount}} týdnů","periods.monthPlural":"{{amount}} měsíců","periods.yearPlural":"{{amount}} let","periods.dayPlural":"{{amount}} dnů","periods.weekFrequency":"týdně","periods.monthFrequency":"měsíčně","periods.yearFrequency":"ročně","periods.dayFrequency":"denně","periods.weekFrequencyPlural":"každých {{amount}} týdnů","periods.monthFrequencyPlural":"každých {{amount}} měsíců","periods.yearFrequencyPlural":"každých {{amount}} let","periods.dayFrequencyPlural":"každých {{amount}} dnů","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} bezplatná zkušební verze","state_present_offer.price_after_free_trial":"{{productPrice}} po skončení zkušební verze","state_present_offer.renewal_frequency":"Obnovuje se {{frequency}}","state_present_offer.continues_until_cancelled":"Pokračuje, dokud není zrušeno","state_present_offer.cancel_anytime":"Zrušit kdykoliv","state_needs_auth_info.email_step_title":"Fakturační e-mailová adresa","state_needs_auth_info.email_input_label":"E-mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Pokračovat","state_needs_payment_info.payment_step_title":"Bezpečná platba","state_needs_payment_info.button_pay":"Zaplatit","state_needs_payment_info.button_start_trial":"Zahájit zkušební verzi","state_success.purchase_successful":"Nákup úspěšný","state_success.subscription_now_active":"Vaše předplatné je nyní aktivní","state_success.button_close":"Zavřít","state_error.if_error_persists":"Pokud chyba přetrvává, kontaktujte ","state_error.error_title_already_subscribed":"Již přihlášeno k odběru","state_error.error_title_already_purchased":"Již zakoupeno","state_error.error_title_other_errors":"Něco se pokazilo","state_error.error_message_already_subscribed":"Již jste přihlášeni k odběru tohoto produktu.","state_error.error_message_already_purchased":"Tento produkt jste již zakoupili.","state_error.error_message_missing_email_error":"Pro dokončení nákupu je vyžadován e-mail.","state_error.error_message_network_error":"Chyba sítě. Zkontrolujte své internetové připojení.","state_error.error_message_error_charging_payment":"Platba nebyla úspěšná.","state_error.error_message_error_setting_up_purchase":"Nákup nebyl zahájen kvůli chybě. Kód chyby: {{errorCode}}","state_error.error_message_unknown_error":"Došlo k neznámé chybě. Kód chyby: {{errorCode}}","state_error.button_try_again":"Zkusit znovu","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% sleva","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},mi={"periods.unknownFrequency":"ukendt","periods.week":"{{amount}} uge","periods.month":"{{amount}} måned","periods.year":"{{amount}} år","periods.day":"{{amount}} dag","periods.weekShort":"{{amount}} uge","periods.monthShort":"{{amount}} md.","periods.yearShort":"{{amount}} år","periods.dayShort":"{{amount}} dag","periods.lifetime":"livstid","periods.weekPlural":"{{amount}} uger","periods.monthPlural":"{{amount}} måneder","periods.yearPlural":"{{amount}} år","periods.dayPlural":"{{amount}} dage","periods.weekFrequency":"ugentlig","periods.monthFrequency":"månedlig","periods.yearFrequency":"årlig","periods.dayFrequency":"daglig","periods.weekFrequencyPlural":"hver {{amount}} uge","periods.monthFrequencyPlural":"hver {{amount}} måned","periods.yearFrequencyPlural":"hvert {{amount}} år","periods.dayFrequencyPlural":"hver {{amount}} dag","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} gratis prøveperiode","state_present_offer.price_after_free_trial":"{{productPrice}} efter prøveperioden","state_present_offer.renewal_frequency":"Fornyes {{frequency}}","state_present_offer.continues_until_cancelled":"Fortsætter indtil annulleret","state_present_offer.cancel_anytime":"Annuller når som helst","state_needs_auth_info.email_step_title":"Fakturerings-e-mailadresse","state_needs_auth_info.email_input_label":"E-mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Fortsæt","state_needs_payment_info.payment_step_title":"Sikker betaling","state_needs_payment_info.button_pay":"Betal","state_needs_payment_info.button_start_trial":"Start prøveperiode","state_success.purchase_successful":"Købet lykkedes","state_success.subscription_now_active":"Dit abonnement er nu aktivt","state_success.button_close":"Luk","state_error.if_error_persists":"Hvis fejlen fortsætter, kontakt ","state_error.error_title_already_subscribed":"Allerede abonneret","state_error.error_title_already_purchased":"Allerede købt","state_error.error_title_other_errors":"Noget gik galt","state_error.error_message_already_subscribed":"Du er allerede abonneret på dette produkt.","state_error.error_message_already_purchased":"Du har allerede købt dette produkt.","state_error.error_message_missing_email_error":"E-mail er påkrævet for at fuldføre købet.","state_error.error_message_network_error":"Netværksfejl. Tjek din internetforbindelse.","state_error.error_message_error_charging_payment":"Betalingen mislykkedes.","state_error.error_message_error_setting_up_purchase":"Købet blev ikke startet på grund af en fejl. Fejlkode: {{errorCode}}","state_error.error_message_unknown_error":"Der opstod en ukendt fejl. Fejlkode: {{errorCode}}","state_error.button_try_again":"Prøv igen","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% rabat","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},hi={"periods.unknownFrequency":"onbekend","periods.week":"{{amount}} week","periods.month":"{{amount}} maand","periods.year":"{{amount}} jaar","periods.day":"{{amount}} dag","periods.weekShort":"{{amount}} wk","periods.monthShort":"{{amount}} mnd","periods.yearShort":"{{amount}} jr","periods.dayShort":"{{amount}} dag","periods.lifetime":"levenslang","periods.weekPlural":"{{amount}} weken","periods.monthPlural":"{{amount}} maanden","periods.yearPlural":"{{amount}} jaren","periods.dayPlural":"{{amount}} dagen","periods.weekFrequency":"wekelijks","periods.monthFrequency":"maandelijks","periods.yearFrequency":"jaarlijks","periods.dayFrequency":"dagelijks","periods.weekFrequencyPlural":"elke {{amount}} weken","periods.monthFrequencyPlural":"elke {{amount}} maanden","periods.yearFrequencyPlural":"elke {{amount}} jaren","periods.dayFrequencyPlural":"elke {{amount}} dagen","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} gratis proefperiode","state_present_offer.price_after_free_trial":"{{productPrice}} na afloop van de proefperiode","state_present_offer.renewal_frequency":"Verlengt {{frequency}}","state_present_offer.continues_until_cancelled":"Gaat door tot het wordt geannuleerd","state_present_offer.cancel_anytime":"Annuleer op elk moment","state_needs_auth_info.email_step_title":"Facturatie e-mailadres","state_needs_auth_info.email_input_label":"E-mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Doorgaan","state_needs_payment_info.payment_step_title":"Veilige betaling","state_needs_payment_info.button_pay":"Betalen","state_needs_payment_info.button_start_trial":"Proef starten","state_success.purchase_successful":"Aankoop geslaagd","state_success.subscription_now_active":"Uw abonnement is nu actief","state_success.button_close":"Sluiten","state_error.if_error_persists":"Als het probleem zich blijft voordoen, neem contact op met ","state_error.error_title_already_subscribed":"Al geabonneerd","state_error.error_title_already_purchased":"Al gekocht","state_error.error_title_other_errors":"Er is iets misgegaan","state_error.error_message_already_subscribed":"U bent al geabonneerd op dit product.","state_error.error_message_already_purchased":"U heeft dit product al gekocht.","state_error.error_message_missing_email_error":"Een e-mailadres is vereist om de aankoop te voltooien.","state_error.error_message_network_error":"Netwerkfout. Controleer uw internetverbinding.","state_error.error_message_error_charging_payment":"Betaling mislukt.","state_error.error_message_error_setting_up_purchase":"Aankoop is niet gestart vanwege een fout. Foutcode: {{errorCode}}","state_error.error_message_unknown_error":"Er is een onbekende fout opgetreden. Foutcode: {{errorCode}}","state_error.button_try_again":"Opnieuw proberen","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% korting","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},yi={"periods.unknownFrequency":"tuntematon","periods.week":"{{amount}} viikko","periods.month":"{{amount}} kuukausi","periods.year":"{{amount}} vuosi","periods.day":"{{amount}} päivä","periods.weekShort":"{{amount}} vk","periods.monthShort":"{{amount}} kk","periods.yearShort":"{{amount}} v","periods.dayShort":"{{amount}} pv","periods.lifetime":"elinikäinen","periods.weekPlural":"{{amount}} viikkoa","periods.monthPlural":"{{amount}} kuukautta","periods.yearPlural":"{{amount}} vuotta","periods.dayPlural":"{{amount}} päivää","periods.weekFrequency":"viikoittain","periods.monthFrequency":"kuukausittain","periods.yearFrequency":"vuosittain","periods.dayFrequency":"päivittäin","periods.weekFrequencyPlural":"joka {{amount}} viikko","periods.monthFrequencyPlural":"joka {{amount}} kuukausi","periods.yearFrequencyPlural":"joka {{amount}} vuosi","periods.dayFrequencyPlural":"joka {{amount}} päivä","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} ilmainen kokeilu","state_present_offer.price_after_free_trial":"{{productPrice}} kokeilujakson jälkeen","state_present_offer.renewal_frequency":"Uudistuu {{frequency}}","state_present_offer.continues_until_cancelled":"Jatkuu, kunnes peruutetaan","state_present_offer.cancel_anytime":"Peruuta milloin tahansa","state_needs_auth_info.email_step_title":"Laskutussähköpostiosoite","state_needs_auth_info.email_input_label":"Sähköposti","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Jatka","state_needs_payment_info.payment_step_title":"Turvallinen maksaminen","state_needs_payment_info.button_pay":"Maksa","state_needs_payment_info.button_start_trial":"Aloita kokeilu","state_success.purchase_successful":"Osto onnistui","state_success.subscription_now_active":"Tilauksesi on nyt aktiivinen","state_success.button_close":"Sulje","state_error.if_error_persists":"Jos virhe jatkuu, ota yhteyttä ","state_error.error_title_already_subscribed":"Jo tilattu","state_error.error_title_already_purchased":"Jo ostettu","state_error.error_title_other_errors":"Jotain meni pieleen","state_error.error_message_already_subscribed":"Olet jo tilannut tämän tuotteen.","state_error.error_message_already_purchased":"Olet jo ostanut tämän tuotteen.","state_error.error_message_missing_email_error":"Sähköposti tarvitaan ostoksen suorittamiseen.","state_error.error_message_network_error":"Verkkovirhe. Tarkista internetyhteytesi.","state_error.error_message_error_charging_payment":"Maksu epäonnistui.","state_error.error_message_error_setting_up_purchase":"Ostosta ei aloitettu virheen vuoksi. Virhekoodi: {{errorCode}}","state_error.error_message_unknown_error":"Tapahtui tuntematon virhe. Virhekoodi: {{errorCode}}","state_error.button_try_again":"Yritä uudelleen","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% alennus","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},gi={"periods.unknownFrequency":"inconnu","periods.week":"{{amount}} semaine","periods.month":"{{amount}} mois","periods.year":"{{amount}} an","periods.day":"{{amount}} jour","periods.weekShort":"{{amount}} sem.","periods.monthShort":"{{amount}} mois","periods.yearShort":"{{amount}} an","periods.dayShort":"{{amount}} j","periods.lifetime":"à vie","periods.weekPlural":"{{amount}} semaines","periods.monthPlural":"{{amount}} mois","periods.yearPlural":"{{amount}} ans","periods.dayPlural":"{{amount}} jours","periods.weekFrequency":"hebdomadaire","periods.monthFrequency":"mensuel","periods.yearFrequency":"annuel","periods.dayFrequency":"quotidien","periods.weekFrequencyPlural":"toutes les {{amount}} semaines","periods.monthFrequencyPlural":"tous les {{amount}} mois","periods.yearFrequencyPlural":"toutes les {{amount}} années","periods.dayFrequencyPlural":"tous les {{amount}} jours","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} essai gratuit","state_present_offer.price_after_free_trial":"{{productPrice}} après la fin de l'essai","state_present_offer.renewal_frequency":"Renouvellement {{frequency}}","state_present_offer.continues_until_cancelled":"Continue jusqu'à annulation","state_present_offer.cancel_anytime":"Annulez à tout moment","state_needs_auth_info.email_step_title":"Adresse e-mail de facturation","state_needs_auth_info.email_input_label":"E-mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Continuer","state_needs_payment_info.payment_step_title":"Paiement sécurisé","state_needs_payment_info.button_pay":"Payer","state_needs_payment_info.button_start_trial":"Démarrer l'essai","state_success.purchase_successful":"Achat réussi","state_success.subscription_now_active":"Votre abonnement est maintenant actif","state_success.button_close":"Fermer","state_error.if_error_persists":"Si l'erreur persiste, contactez ","state_error.error_title_already_subscribed":"Déjà abonné","state_error.error_title_already_purchased":"Déjà acheté","state_error.error_title_other_errors":"Quelque chose a mal tourné","state_error.error_message_already_subscribed":"Vous êtes déjà abonné à ce produit.","state_error.error_message_already_purchased":"Vous avez déjà acheté ce produit.","state_error.error_message_missing_email_error":"L'e-mail est requis pour finaliser l'achat.","state_error.error_message_network_error":"Erreur réseau. Veuillez vérifier votre connexion Internet.","state_error.error_message_error_charging_payment":"Échec du paiement.","state_error.error_message_error_setting_up_purchase":"L'achat n'a pas été lancé en raison d'une erreur. Code d'erreur : {{errorCode}}","state_error.error_message_unknown_error":"Une erreur inconnue est survenue. Code d'erreur : {{errorCode}}","state_error.button_try_again":"Réessayer","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% de réduction","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},vi={"periods.unknownFrequency":"unbekannt","periods.week":"{{amount}} Woche","periods.month":"{{amount}} Monat","periods.year":"{{amount}} Jahr","periods.day":"{{amount}} Tag","periods.weekShort":"{{amount}} Wo.","periods.monthShort":"{{amount}} Mo.","periods.yearShort":"{{amount}} J.","periods.dayShort":"{{amount}} T.","periods.lifetime":"lebenslang","periods.weekPlural":"{{amount}} Wochen","periods.monthPlural":"{{amount}} Monate","periods.yearPlural":"{{amount}} Jahre","periods.dayPlural":"{{amount}} Tage","periods.weekFrequency":"wöchentlich","periods.monthFrequency":"monatlich","periods.yearFrequency":"jährlich","periods.dayFrequency":"täglich","periods.weekFrequencyPlural":"alle {{amount}} Wochen","periods.monthFrequencyPlural":"alle {{amount}} Monate","periods.yearFrequencyPlural":"alle {{amount}} Jahre","periods.dayFrequencyPlural":"alle {{amount}} Tage","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} kostenlose Testphase","state_present_offer.price_after_free_trial":"{{productPrice}} nach Ende der Testphase","state_present_offer.renewal_frequency":"Erneuert sich {{frequency}}","state_present_offer.continues_until_cancelled":"Läuft bis zur Kündigung","state_present_offer.cancel_anytime":"Jederzeit kündbar","state_needs_auth_info.email_step_title":"E-Mail-Adresse für Rechnungsstellung","state_needs_auth_info.email_input_label":"E-Mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Weiter","state_needs_payment_info.payment_step_title":"Sicherer Checkout","state_needs_payment_info.button_pay":"Bezahlen","state_needs_payment_info.button_start_trial":"Test starten","state_success.purchase_successful":"Kauf erfolgreich","state_success.subscription_now_active":"Ihr Abonnement ist jetzt aktiv","state_success.button_close":"Schließen","state_error.if_error_persists":"Falls der Fehler weiterhin besteht, kontaktieren Sie ","state_error.error_title_already_subscribed":"Bereits abonniert","state_error.error_title_already_purchased":"Bereits gekauft","state_error.error_title_other_errors":"Etwas ist schiefgelaufen","state_error.error_message_already_subscribed":"Sie sind bereits für dieses Produkt abonniert.","state_error.error_message_already_purchased":"Sie haben dieses Produkt bereits gekauft.","state_error.error_message_missing_email_error":"Zum Abschließen des Kaufs wird eine E-Mail benötigt.","state_error.error_message_network_error":"Netzwerkfehler. Bitte überprüfen Sie Ihre Internetverbindung.","state_error.error_message_error_charging_payment":"Zahlung fehlgeschlagen.","state_error.error_message_error_setting_up_purchase":"Kauf konnte aufgrund eines Fehlers nicht gestartet werden. Fehlercode: {{errorCode}}","state_error.error_message_unknown_error":"Ein unbekannter Fehler ist aufgetreten. Fehlercode: {{errorCode}}","state_error.button_try_again":"Erneut versuchen","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% Rabatt","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},bi={"periods.unknownFrequency":"άγνωστος","periods.week":"{{amount}} εβδομάδα","periods.month":"{{amount}} μήνας","periods.year":"{{amount}} έτος","periods.day":"{{amount}} ημέρα","periods.weekShort":"{{amount}} εβδ.","periods.monthShort":"{{amount}} μ.","periods.yearShort":"{{amount}} έτ.","periods.dayShort":"{{amount}} ημ.","periods.lifetime":"εφ' όρου ζωής","periods.weekPlural":"{{amount}} εβδομάδες","periods.monthPlural":"{{amount}} μήνες","periods.yearPlural":"{{amount}} έτη","periods.dayPlural":"{{amount}} ημέρες","periods.weekFrequency":"εβδομαδιαία","periods.monthFrequency":"μηνιαία","periods.yearFrequency":"ετήσια","periods.dayFrequency":"καθημερινά","periods.weekFrequencyPlural":"κάθε {{amount}} εβδομάδες","periods.monthFrequencyPlural":"κάθε {{amount}} μήνες","periods.yearFrequencyPlural":"κάθε {{amount}} έτη","periods.dayFrequencyPlural":"κάθε {{amount}} ημέρες","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} δωρεάν δοκιμή","state_present_offer.price_after_free_trial":"{{productPrice}} μετά το τέλος της δοκιμής","state_present_offer.renewal_frequency":"Ανανεώνεται {{frequency}}","state_present_offer.continues_until_cancelled":"Συνεχίζεται έως την ακύρωση","state_present_offer.cancel_anytime":"Ακύρωση οποιαδήποτε στιγμή","state_needs_auth_info.email_step_title":"Διεύθυνση email χρέωσης","state_needs_auth_info.email_input_label":"Email","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Συνέχεια","state_needs_payment_info.payment_step_title":"Ασφαλής πληρωμή","state_needs_payment_info.button_pay":"Πληρωμή","state_needs_payment_info.button_start_trial":"Έναρξη δοκιμής","state_success.purchase_successful":"Η αγορά ολοκληρώθηκε με επιτυχία","state_success.subscription_now_active":"Η συνδρομή σας είναι πλέον ενεργή","state_success.button_close":"Κλείσιμο","state_error.if_error_persists":"Εάν το σφάλμα παραμένει, επικοινωνήστε με ","state_error.error_title_already_subscribed":"Ήδη εγγεγραμμένος","state_error.error_title_already_purchased":"Ήδη αγορασμένο","state_error.error_title_other_errors":"Κάτι πήγε στραβά","state_error.error_message_already_subscribed":"Έχετε ήδη εγγραφεί σε αυτό το προϊόν.","state_error.error_message_already_purchased":"Έχετε ήδη αγοράσει αυτό το προϊόν.","state_error.error_message_missing_email_error":"Απαιτείται email για να ολοκληρωθεί η αγορά.","state_error.error_message_network_error":"Σφάλμα δικτύου. Ελέγξτε τη σύνδεσή σας στο διαδίκτυο.","state_error.error_message_error_charging_payment":"Η πληρωμή απέτυχε.","state_error.error_message_error_setting_up_purchase":"Η αγορά δεν ξεκίνησε λόγω σφάλματος. Κωδικός σφάλματος: {{errorCode}}","state_error.error_message_unknown_error":"Παρουσιάστηκε άγνωστο σφάλμα. Κωδικός σφάλματος: {{errorCode}}","state_error.button_try_again":"Προσπαθήστε ξανά","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% έκπτωση","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},wi={"periods.unknownFrequency":"לא ידוע","periods.week":"{{amount}} שבוע","periods.month":"{{amount}} חודש","periods.year":"{{amount}} שנה","periods.day":"{{amount}} יום","periods.weekShort":"{{amount}} שב","periods.monthShort":"{{amount}} חד","periods.yearShort":"{{amount}} שנ","periods.dayShort":"{{amount}} יום","periods.lifetime":"לכל החיים","periods.weekPlural":"{{amount}} שבועות","periods.monthPlural":"{{amount}} חודשים","periods.yearPlural":"{{amount}} שנים","periods.dayPlural":"{{amount}} ימים","periods.weekFrequency":"שבועי","periods.monthFrequency":"חודשי","periods.yearFrequency":"שנתי","periods.dayFrequency":"יומי","periods.weekFrequencyPlural":"כל {{amount}} שבועות","periods.monthFrequencyPlural":"כל {{amount}} חודשים","periods.yearFrequencyPlural":"כל {{amount}} שנים","periods.dayFrequencyPlural":"כל {{amount}} ימים","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} ניסיון חינם","state_present_offer.price_after_free_trial":"{{productPrice}} לאחר סיום הניסיון","state_present_offer.renewal_frequency":"מתחדש {{frequency}}","state_present_offer.continues_until_cancelled":"ממשיך עד לביטול","state_present_offer.cancel_anytime":"ביטול בכל עת","state_needs_auth_info.email_step_title":"כתובת דוא״ל לחיוב","state_needs_auth_info.email_input_label":"דוא״ל","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"המשך","state_needs_payment_info.payment_step_title":"תשלום מאובטח","state_needs_payment_info.button_pay":"שלם","state_needs_payment_info.button_start_trial":"התחל ניסיון","state_success.purchase_successful":"הרכישה הושלמה בהצלחה","state_success.subscription_now_active":"המנוי שלך פעיל כעת","state_success.button_close":"סגור","state_error.if_error_persists":"אם התקלה נמשכת, פנה ל ","state_error.error_title_already_subscribed":"כבר מנוי","state_error.error_title_already_purchased":"כבר נרכש","state_error.error_title_other_errors":"משהו השתבש","state_error.error_message_already_subscribed":"כבר יש לך מנוי למוצר זה.","state_error.error_message_already_purchased":"כבר רכשת מוצר זה.","state_error.error_message_missing_email_error":"נדרש דוא״ל להשלמת הרכישה.","state_error.error_message_network_error":"שגיאת רשת. בדוק את חיבור האינטרנט שלך.","state_error.error_message_error_charging_payment":"התשלום נכשל.","state_error.error_message_error_setting_up_purchase":"הרכישה לא החלה עקב שגיאה. קוד שגיאה: {{errorCode}}","state_error.error_message_unknown_error":"אירעה שגיאה לא ידועה. קוד שגיאה: {{errorCode}}","state_error.button_try_again":"נסה שוב","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% הנחה","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Pi={"periods.unknownFrequency":"अज्ञात","periods.week":"{{amount}} सप्ताह","periods.month":"{{amount}} महीना","periods.year":"{{amount}} वर्ष","periods.day":"{{amount}} दिन","periods.weekShort":"{{amount}} सप.","periods.monthShort":"{{amount}} माह.","periods.yearShort":"{{amount}} वर्ष","periods.dayShort":"{{amount}} दिन","periods.lifetime":"आजीवन","periods.weekPlural":"{{amount}} सप्ताह","periods.monthPlural":"{{amount}} महीने","periods.yearPlural":"{{amount}} वर्ष","periods.dayPlural":"{{amount}} दिन","periods.weekFrequency":"साप्ताहिक","periods.monthFrequency":"मासिक","periods.yearFrequency":"वार्षिक","periods.dayFrequency":"दैनिक","periods.weekFrequencyPlural":"हर {{amount}} सप्ताह","periods.monthFrequencyPlural":"हर {{amount}} महीना","periods.yearFrequencyPlural":"हर {{amount}} वर्ष","periods.dayFrequencyPlural":"हर {{amount}} दिन","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} मुफ्त परीक्षण","state_present_offer.price_after_free_trial":"{{productPrice}} परीक्षण के बाद","state_present_offer.renewal_frequency":"पुनः नवीनीकरण {{frequency}}","state_present_offer.continues_until_cancelled":"रद्द होने तक जारी रहेगा","state_present_offer.cancel_anytime":"कभी भी रद्द करें","state_needs_auth_info.email_step_title":"बिलिंग ईमेल पता","state_needs_auth_info.email_input_label":"ईमेल","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"जारी रखें","state_needs_payment_info.payment_step_title":"सुरक्षित भुगतान","state_needs_payment_info.button_pay":"भुगतान करें","state_needs_payment_info.button_start_trial":"परीक्षण शुरू करें","state_success.purchase_successful":"खरीदारी सफल रही","state_success.subscription_now_active":"आपकी सदस्यता अब सक्रिय है","state_success.button_close":"बंद करें","state_error.if_error_persists":"यदि समस्या बनी रहती है, तो संपर्क करें ","state_error.error_title_already_subscribed":"पहले से सदस्यता ली गई है","state_error.error_title_already_purchased":"पहले से खरीदा गया है","state_error.error_title_other_errors":"कुछ गलत हो गया","state_error.error_message_already_subscribed":"आपने पहले से इस उत्पाद की सदस्यता ली हुई है।","state_error.error_message_already_purchased":"आपने पहले ही इस उत्पाद को खरीद लिया है।","state_error.error_message_missing_email_error":"खरीदारी पूरी करने के लिए ईमेल आवश्यक है।","state_error.error_message_network_error":"नेटवर्क त्रुटि। कृपया अपना इंटरनेट कनेक्शन जांचें।","state_error.error_message_error_charging_payment":"भुगतान असफल।","state_error.error_message_error_setting_up_purchase":"त्रुटि के कारण खरीद शुरू नहीं हो सकी। त्रुटि कोड: {{errorCode}}","state_error.error_message_unknown_error":"एक अज्ञात त्रुटि हुई। त्रुटि कोड: {{errorCode}}","state_error.button_try_again":"पुनः प्रयास करें","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% छूट","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},ki={"periods.unknownFrequency":"ismeretlen","periods.week":"{{amount}} hét","periods.month":"{{amount}} hónap","periods.year":"{{amount}} év","periods.day":"{{amount}} nap","periods.weekShort":"{{amount}} hét","periods.monthShort":"{{amount}} hó","periods.yearShort":"{{amount}} év","periods.dayShort":"{{amount}} nap","periods.lifetime":"élethosszig","periods.weekPlural":"{{amount}} hetek","periods.monthPlural":"{{amount}} hónapok","periods.yearPlural":"{{amount}} évek","periods.dayPlural":"{{amount}} napok","periods.weekFrequency":"heti","periods.monthFrequency":"havi","periods.yearFrequency":"éves","periods.dayFrequency":"napi","periods.weekFrequencyPlural":"minden {{amount}} hét","periods.monthFrequencyPlural":"minden {{amount}} hónap","periods.yearFrequencyPlural":"minden {{amount}} év","periods.dayFrequencyPlural":"minden {{amount}} nap","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} ingyenes próbaidőszak","state_present_offer.price_after_free_trial":"{{productPrice}} a próbaidőszak után","state_present_offer.renewal_frequency":"Megújul {{frequency}}","state_present_offer.continues_until_cancelled":"Folytatódik a lemondásig","state_present_offer.cancel_anytime":"Bármikor lemondható","state_needs_auth_info.email_step_title":"Számlázási e-mail cím","state_needs_auth_info.email_input_label":"E-mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Folytatás","state_needs_payment_info.payment_step_title":"Biztonságos fizetés","state_needs_payment_info.button_pay":"Fizetés","state_needs_payment_info.button_start_trial":"Próba indítása","state_success.purchase_successful":"Vásárlás sikeres","state_success.subscription_now_active":"Az előfizetés most aktív","state_success.button_close":"Bezárás","state_error.if_error_persists":"Ha a hiba továbbra is fennáll, lépjen kapcsolatba a(z) ","state_error.error_title_already_subscribed":"Már előfizetett","state_error.error_title_already_purchased":"Már megvásárolt","state_error.error_title_other_errors":"Valami elromlott","state_error.error_message_already_subscribed":"Már előfizetett erre a termékre.","state_error.error_message_already_purchased":"Már megvásárolta ezt a terméket.","state_error.error_message_missing_email_error":"Az e-mail cím szükséges a vásárlás befejezéséhez.","state_error.error_message_network_error":"Hálózati hiba. Ellenőrizze az internetkapcsolatot.","state_error.error_message_error_charging_payment":"A fizetés nem sikerült.","state_error.error_message_error_setting_up_purchase":"A vásárlás hibája miatt nem kezdődött el. Hibakód: {{errorCode}}","state_error.error_message_unknown_error":"Ismeretlen hiba történt. Hibakód: {{errorCode}}","state_error.button_try_again":"Próbálja újra","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% kedvezmény","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Ei={"periods.unknownFrequency":"tidak dikenal","periods.week":"{{amount}} minggu","periods.month":"{{amount}} bulan","periods.year":"{{amount}} tahun","periods.day":"{{amount}} hari","periods.weekShort":"{{amount}} mgg","periods.monthShort":"{{amount}} bln","periods.yearShort":"{{amount}} thn","periods.dayShort":"{{amount}} hr","periods.lifetime":"seumur hidup","periods.weekPlural":"{{amount}} minggu","periods.monthPlural":"{{amount}} bulan","periods.yearPlural":"{{amount}} tahun","periods.dayPlural":"{{amount}} hari","periods.weekFrequency":"mingguan","periods.monthFrequency":"bulanan","periods.yearFrequency":"tahunan","periods.dayFrequency":"harian","periods.weekFrequencyPlural":"setiap {{amount}} minggu","periods.monthFrequencyPlural":"setiap {{amount}} bulan","periods.yearFrequencyPlural":"setiap {{amount}} tahun","periods.dayFrequencyPlural":"setiap {{amount}} hari","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} uji coba gratis","state_present_offer.price_after_free_trial":"{{productPrice}} setelah uji coba selesai","state_present_offer.renewal_frequency":"Diperbarui {{frequency}}","state_present_offer.continues_until_cancelled":"Berlanjut hingga dibatalkan","state_present_offer.cancel_anytime":"Dapat dibatalkan kapan saja","state_needs_auth_info.email_step_title":"Alamat email penagihan","state_needs_auth_info.email_input_label":"Email","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Lanjutkan","state_needs_payment_info.payment_step_title":"Pembayaran aman","state_needs_payment_info.button_pay":"Bayar","state_needs_payment_info.button_start_trial":"Mulai Uji Coba","state_success.purchase_successful":"Pembelian berhasil","state_success.subscription_now_active":"Langganan Anda sekarang aktif","state_success.button_close":"Tutup","state_error.if_error_persists":"Jika masalah terus berlanjut, hubungi ","state_error.error_title_already_subscribed":"Sudah Berlangganan","state_error.error_title_already_purchased":"Sudah Dibeli","state_error.error_title_other_errors":"Terjadi kesalahan","state_error.error_message_already_subscribed":"Anda sudah berlangganan produk ini.","state_error.error_message_already_purchased":"Anda sudah membeli produk ini.","state_error.error_message_missing_email_error":"Email diperlukan untuk menyelesaikan pembelian.","state_error.error_message_network_error":"Kesalahan jaringan. Periksa koneksi internet Anda.","state_error.error_message_error_charging_payment":"Pembayaran gagal.","state_error.error_message_error_setting_up_purchase":"Pembelian tidak dapat dimulai karena kesalahan. Kode kesalahan: {{errorCode}}","state_error.error_message_unknown_error":"Terjadi kesalahan yang tidak diketahui. Kode kesalahan: {{errorCode}}","state_error.button_try_again":"Coba Lagi","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"Diskon {{discount}}%","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},xi={"periods.unknownFrequency":"不明","periods.week":"{{amount}} 週","periods.month":"{{amount}} 月","periods.year":"{{amount}} 年","periods.day":"{{amount}} 日","periods.weekShort":"{{amount}} 週","periods.monthShort":"{{amount}} 月","periods.yearShort":"{{amount}} 年","periods.dayShort":"{{amount}} 日","periods.lifetime":"生涯","periods.weekPlural":"{{amount}} 週間","periods.monthPlural":"{{amount}} ヶ月","periods.yearPlural":"{{amount}} 年","periods.dayPlural":"{{amount}} 日","periods.weekFrequency":"毎週","periods.monthFrequency":"毎月","periods.yearFrequency":"毎年","periods.dayFrequency":"毎日","periods.weekFrequencyPlural":"{{amount}} 週間ごと","periods.monthFrequencyPlural":"{{amount}} ヶ月ごと","periods.yearFrequencyPlural":"{{amount}} 年ごと","periods.dayFrequencyPlural":"{{amount}} 日ごと","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} 無料トライアル","state_present_offer.price_after_free_trial":"{{productPrice}} トライアル終了後","state_present_offer.renewal_frequency":"更新 {{frequency}}","state_present_offer.continues_until_cancelled":"キャンセルされるまで継続","state_present_offer.cancel_anytime":"いつでもキャンセル可能","state_needs_auth_info.email_step_title":"請求メールアドレス","state_needs_auth_info.email_input_label":"メールアドレス","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"続行","state_needs_payment_info.payment_step_title":"安全なチェックアウト","state_needs_payment_info.button_pay":"支払う","state_needs_payment_info.button_start_trial":"トライアルを開始","state_success.purchase_successful":"購入が成功しました","state_success.subscription_now_active":"あなたのサブスクリプションは今アクティブです","state_success.button_close":"閉じる","state_error.if_error_persists":"エラーが続く場合は、 ","state_error.error_title_already_subscribed":"すでに登録されています","state_error.error_title_already_purchased":"すでに購入されています","state_error.error_title_other_errors":"何かがうまくいきませんでした","state_error.error_message_already_subscribed":"この製品にはすでに登録されています。","state_error.error_message_already_purchased":"この製品はすでに購入されています。","state_error.error_message_missing_email_error":"購入を完了するにはメールアドレスが必要です。","state_error.error_message_network_error":"ネットワークエラーです。インターネット接続を確認してください。","state_error.error_message_error_charging_payment":"支払いが失敗しました。","state_error.error_message_error_setting_up_purchase":"エラーのため、購入が開始されませんでした。エラーコード: {{errorCode}}","state_error.error_message_unknown_error":"不明なエラーが発生しました。エラーコード: {{errorCode}}","state_error.button_try_again":"再試行する","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% 割引","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Si={"periods.unknownFrequency":"알 수 없음","periods.week":"{{amount}} 주","periods.month":"{{amount}} 월","periods.year":"{{amount}} 년","periods.day":"{{amount}} 일","periods.weekShort":"{{amount}} 주","periods.monthShort":"{{amount}} 월","periods.yearShort":"{{amount}} 년","periods.dayShort":"{{amount}} 일","periods.lifetime":"평생","periods.weekPlural":"{{amount}} 주","periods.monthPlural":"{{amount}} 개월","periods.yearPlural":"{{amount}} 년","periods.dayPlural":"{{amount}} 일","periods.weekFrequency":"주간","periods.monthFrequency":"월간","periods.yearFrequency":"연간","periods.dayFrequency":"일간","periods.weekFrequencyPlural":"{{amount}} 주마다","periods.monthFrequencyPlural":"{{amount}} 개월마다","periods.yearFrequencyPlural":"{{amount}} 년마다","periods.dayFrequencyPlural":"{{amount}} 일마다","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} 무료 체험","state_present_offer.price_after_free_trial":"{{productPrice}} 체험 종료 후","state_present_offer.renewal_frequency":"갱신 {{frequency}}","state_present_offer.continues_until_cancelled":"취소될 때까지 계속","state_present_offer.cancel_anytime":"언제든지 취소 가능","state_needs_auth_info.email_step_title":"결제 이메일 주소","state_needs_auth_info.email_input_label":"이메일","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"계속","state_needs_payment_info.payment_step_title":"안전한 결제","state_needs_payment_info.button_pay":"결제","state_needs_payment_info.button_start_trial":"체험 시작","state_success.purchase_successful":"구매 성공","state_success.subscription_now_active":"구독이 활성화되었습니다","state_success.button_close":"닫기","state_error.if_error_persists":"문제가 지속되면 문의하십시오 ","state_error.error_title_already_subscribed":"이미 구독 중","state_error.error_title_already_purchased":"이미 구매 완료","state_error.error_title_other_errors":"문제가 발생했습니다","state_error.error_message_already_subscribed":"이미 이 제품을 구독 중입니다.","state_error.error_message_already_purchased":"이미 이 제품을 구매했습니다.","state_error.error_message_missing_email_error":"구매를 완료하려면 이메일이 필요합니다.","state_error.error_message_network_error":"네트워크 오류입니다. 인터넷 연결을 확인하세요.","state_error.error_message_error_charging_payment":"결제 실패.","state_error.error_message_error_setting_up_purchase":"오류로 인해 구매를 시작하지 못했습니다. 오류 코드: {{errorCode}}","state_error.error_message_unknown_error":"알 수 없는 오류가 발생했습니다. 오류 코드: {{errorCode}}","state_error.button_try_again":"다시 시도","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% 할인","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Ii={"periods.unknownFrequency":"tidak diketahui","periods.week":"{{amount}} minggu","periods.month":"{{amount}} bulan","periods.year":"{{amount}} tahun","periods.day":"{{amount}} hari","periods.weekShort":"{{amount}} mgg","periods.monthShort":"{{amount}} bln","periods.yearShort":"{{amount}} thn","periods.dayShort":"{{amount}} hr","periods.lifetime":"seumur hidup","periods.weekPlural":"{{amount}} minggu","periods.monthPlural":"{{amount}} bulan","periods.yearPlural":"{{amount}} tahun","periods.dayPlural":"{{amount}} hari","periods.weekFrequency":"mingguan","periods.monthFrequency":"bulanan","periods.yearFrequency":"tahunan","periods.dayFrequency":"harian","periods.weekFrequencyPlural":"setiap {{amount}} minggu","periods.monthFrequencyPlural":"setiap {{amount}} bulan","periods.yearFrequencyPlural":"setiap {{amount}} tahun","periods.dayFrequencyPlural":"setiap {{amount}} hari","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} percubaan percuma","state_present_offer.price_after_free_trial":"{{productPrice}} selepas percubaan tamat","state_present_offer.renewal_frequency":"Diperbaharui {{frequency}}","state_present_offer.continues_until_cancelled":"Berterusan sehingga dibatalkan","state_present_offer.cancel_anytime":"Boleh dibatalkan pada bila-bila masa","state_needs_auth_info.email_step_title":"Alamat emel pengebilan","state_needs_auth_info.email_input_label":"Emel","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Teruskan","state_needs_payment_info.payment_step_title":"Pembayaran Selamat","state_needs_payment_info.button_pay":"Bayar","state_needs_payment_info.button_start_trial":"Mulakan Percubaan","state_success.purchase_successful":"Pembelian berjaya","state_success.subscription_now_active":"Langganan anda kini aktif","state_success.button_close":"Tutup","state_error.if_error_persists":"Jika masalah berterusan, sila hubungi ","state_error.error_title_already_subscribed":"Telah Melanggan","state_error.error_title_already_purchased":"Telah Dibeli","state_error.error_title_other_errors":"Ada masalah berlaku","state_error.error_message_already_subscribed":"Anda sudah melanggan produk ini.","state_error.error_message_already_purchased":"Anda telah membeli produk ini.","state_error.error_message_missing_email_error":"Emel diperlukan untuk menyelesaikan pembelian.","state_error.error_message_network_error":"Ralat rangkaian. Sila semak sambungan internet anda.","state_error.error_message_error_charging_payment":"Pembayaran gagal.","state_error.error_message_error_setting_up_purchase":"Pembelian tidak dapat dimulakan kerana ralat. Kod ralat: {{errorCode}}","state_error.error_message_unknown_error":"Ralat yang tidak diketahui berlaku. Kod ralat: {{errorCode}}","state_error.button_try_again":"Cuba Lagi","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% diskaun","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},qi={"periods.unknownFrequency":"ukjent","periods.week":"{{amount}} uke","periods.month":"{{amount}} måned","periods.year":"{{amount}} år","periods.day":"{{amount}} dag","periods.weekShort":"{{amount}} u","periods.monthShort":"{{amount}} mnd","periods.yearShort":"{{amount}} år","periods.dayShort":"{{amount}} d","periods.lifetime":"livstid","periods.weekPlural":"{{amount}} uker","periods.monthPlural":"{{amount}} måneder","periods.yearPlural":"{{amount}} år","periods.dayPlural":"{{amount}} dager","periods.weekFrequency":"ukentlig","periods.monthFrequency":"månedlig","periods.yearFrequency":"årlig","periods.dayFrequency":"daglig","periods.weekFrequencyPlural":"hver {{amount}} uker","periods.monthFrequencyPlural":"hver {{amount}} måneder","periods.yearFrequencyPlural":"hver {{amount}} år","periods.dayFrequencyPlural":"hver {{amount}} dager","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} gratis prøveperiode","state_present_offer.price_after_free_trial":"{{productPrice}} etter prøveperioden","state_present_offer.renewal_frequency":"Fornyes {{frequency}}","state_present_offer.continues_until_cancelled":"Fortsetter til avbestilt","state_present_offer.cancel_anytime":"Avslutt når som helst","state_needs_auth_info.email_step_title":"Fakturering e-postadresse","state_needs_auth_info.email_input_label":"E-post","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Fortsett","state_needs_payment_info.payment_step_title":"Sikker betaling","state_needs_payment_info.button_pay":"Betale","state_needs_payment_info.button_start_trial":"Start prøveperiode","state_success.purchase_successful":"Kjøp vellykket","state_success.subscription_now_active":"Abonnementet ditt er nå aktivt","state_success.button_close":"Lukk","state_error.if_error_persists":"Hvis problemet vedvarer, vennligst kontakt ","state_error.error_title_already_subscribed":"Allerede abonnert","state_error.error_title_already_purchased":"Allerede kjøpt","state_error.error_title_other_errors":"Noe gikk galt","state_error.error_message_already_subscribed":"Du abonnerer allerede på dette produktet.","state_error.error_message_already_purchased":"Du har allerede kjøpt dette produktet.","state_error.error_message_missing_email_error":"E-post er nødvendig for å fullføre kjøpet.","state_error.error_message_network_error":"Nettverksfeil. Vennligst sjekk internettforbindelsen din.","state_error.error_message_error_charging_payment":"Betaling mislyktes.","state_error.error_message_error_setting_up_purchase":"Kjøpet ble ikke startet på grunn av en feil. Feilkode: {{errorCode}}","state_error.error_message_unknown_error":"En ukjent feil oppstod. Feilkode: {{errorCode}}","state_error.button_try_again":"Prøv igjen","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% rabatt","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Ti={"periods.unknownFrequency":"nieznany","periods.week":"{{amount}} tydzień","periods.month":"{{amount}} miesiąc","periods.year":"{{amount}} rok","periods.day":"{{amount}} dzień","periods.weekShort":"{{amount}} tydz.","periods.monthShort":"{{amount}} mies.","periods.yearShort":"{{amount}} rok","periods.dayShort":"{{amount}} dzień","periods.lifetime":"na całe życie","periods.weekPlural":"{{amount}} tygodnie","periods.monthPlural":"{{amount}} miesiące","periods.yearPlural":"{{amount}} lata","periods.dayPlural":"{{amount}} dni","periods.weekFrequency":"tygodniowo","periods.monthFrequency":"miesięcznie","periods.yearFrequency":"rocznie","periods.dayFrequency":"codziennie","periods.weekFrequencyPlural":"co {{amount}} tygodnie","periods.monthFrequencyPlural":"co {{amount}} miesiące","periods.yearFrequencyPlural":"co {{amount}} lata","periods.dayFrequencyPlural":"co {{amount}} dni","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} darmowy okres próbny","state_present_offer.price_after_free_trial":"{{productPrice}} po zakończeniu okresu próbnego","state_present_offer.renewal_frequency":"Odnawia się {{frequency}}","state_present_offer.continues_until_cancelled":"Kontynuuje się do anulowania","state_present_offer.cancel_anytime":"Anuluj w dowolnym momencie","state_needs_auth_info.email_step_title":"Adres e-mail do rozliczeń","state_needs_auth_info.email_input_label":"E-mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Kontynuuj","state_needs_payment_info.payment_step_title":"Bezpieczna płatność","state_needs_payment_info.button_pay":"Zapłać","state_needs_payment_info.button_start_trial":"Rozpocznij okres próbny","state_success.purchase_successful":"Zakup zakończony sukcesem","state_success.subscription_now_active":"Twoja subskrypcja jest teraz aktywna","state_success.button_close":"Zamknij","state_error.if_error_persists":"Jeśli problem będzie się powtarzał, skontaktuj się z ","state_error.error_title_already_subscribed":"Już subskrybowano","state_error.error_title_already_purchased":"Już zakupiono","state_error.error_title_other_errors":"Coś poszło nie tak","state_error.error_message_already_subscribed":"Już subskrybujesz ten produkt.","state_error.error_message_already_purchased":"Już kupiłeś ten produkt.","state_error.error_message_missing_email_error":"E-mail jest wymagany, aby zakończyć zakup.","state_error.error_message_network_error":"Błąd sieci. Sprawdź swoje połączenie z internetem.","state_error.error_message_error_charging_payment":"Płatność nie powiodła się.","state_error.error_message_error_setting_up_purchase":"Zakup nie został rozpoczęty z powodu błędu. Kod błędu: {{errorCode}}","state_error.error_message_unknown_error":"Wystąpił nieznany błąd. Kod błędu: {{errorCode}}","state_error.button_try_again":"Spróbuj ponownie","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% zniżki","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Fi={"periods.unknownFrequency":"desconhecido","periods.week":"{{amount}} semana","periods.month":"{{amount}} mês","periods.year":"{{amount}} ano","periods.day":"{{amount}} dia","periods.weekShort":"{{amount}} sem.","periods.monthShort":"{{amount}} mês","periods.yearShort":"{{amount}} ano","periods.dayShort":"{{amount}} dia","periods.lifetime":"vitalício","periods.weekPlural":"{{amount}} semanas","periods.monthPlural":"{{amount}} meses","periods.yearPlural":"{{amount}} anos","periods.dayPlural":"{{amount}} dias","periods.weekFrequency":"semanal","periods.monthFrequency":"mensal","periods.yearFrequency":"anual","periods.dayFrequency":"diário","periods.weekFrequencyPlural":"a cada {{amount}} semanas","periods.monthFrequencyPlural":"a cada {{amount}} meses","periods.yearFrequencyPlural":"a cada {{amount}} anos","periods.dayFrequencyPlural":"a cada {{amount}} dias","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} teste gratuito","state_present_offer.price_after_free_trial":"{{productPrice}} após o fim do teste","state_present_offer.renewal_frequency":"Renova-se {{frequency}}","state_present_offer.continues_until_cancelled":"Continua até ser cancelado","state_present_offer.cancel_anytime":"Cancele a qualquer momento","state_needs_auth_info.email_step_title":"Endereço de e-mail para faturamento","state_needs_auth_info.email_input_label":"E-mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Continuar","state_needs_payment_info.payment_step_title":"Pagamento seguro","state_needs_payment_info.button_pay":"Pagar","state_needs_payment_info.button_start_trial":"Iniciar teste","state_success.purchase_successful":"Compra bem-sucedida","state_success.subscription_now_active":"Sua assinatura agora está ativa","state_success.button_close":"Fechar","state_error.if_error_persists":"Se o erro persistir, entre em contato ","state_error.error_title_already_subscribed":"Já inscrito","state_error.error_title_already_purchased":"Já comprado","state_error.error_title_other_errors":"Algo deu errado","state_error.error_message_already_subscribed":"Você já está inscrito neste produto.","state_error.error_message_already_purchased":"Você já comprou este produto.","state_error.error_message_missing_email_error":"O e-mail é necessário para concluir a compra.","state_error.error_message_network_error":"Erro de rede. Verifique sua conexão com a internet.","state_error.error_message_error_charging_payment":"Pagamento falhou.","state_error.error_message_error_setting_up_purchase":"A compra não foi iniciada devido a um erro. Código do erro: {{errorCode}}","state_error.error_message_unknown_error":"Ocorreu um erro desconhecido. Código do erro: {{errorCode}}","state_error.button_try_again":"Tente novamente","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% de desconto","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Ai={"periods.unknownFrequency":"necunoscut","periods.week":"{{amount}} săptămână","periods.month":"{{amount}} lună","periods.year":"{{amount}} an","periods.day":"{{amount}} zi","periods.weekShort":"{{amount}} săpt.","periods.monthShort":"{{amount}} lună","periods.yearShort":"{{amount}} an","periods.dayShort":"{{amount}} zi","periods.lifetime":"pe viață","periods.weekPlural":"{{amount}} săptămâni","periods.monthPlural":"{{amount}} luni","periods.yearPlural":"{{amount}} ani","periods.dayPlural":"{{amount}} zile","periods.weekFrequency":"săptămânal","periods.monthFrequency":"lunar","periods.yearFrequency":"anual","periods.dayFrequency":"zilnic","periods.weekFrequencyPlural":"la fiecare {{amount}} săptămâni","periods.monthFrequencyPlural":"la fiecare {{amount}} luni","periods.yearFrequencyPlural":"la fiecare {{amount}} ani","periods.dayFrequencyPlural":"la fiecare {{amount}} zile","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} probă gratuită","state_present_offer.price_after_free_trial":"{{productPrice}} după sfârșitul probei","state_present_offer.renewal_frequency":"Se reînnoiește {{frequency}}","state_present_offer.continues_until_cancelled":"Continuă până la anulare","state_present_offer.cancel_anytime":"Anulează oricând","state_needs_auth_info.email_step_title":"Adresa de e-mail pentru facturare","state_needs_auth_info.email_input_label":"E-mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Continuă","state_needs_payment_info.payment_step_title":"Plată sigură","state_needs_payment_info.button_pay":"Plătește","state_needs_payment_info.button_start_trial":"Începe Proba","state_success.purchase_successful":"Cumpărare reușită","state_success.subscription_now_active":"Abonamentul tău este acum activ","state_success.button_close":"Închide","state_error.if_error_persists":"Dacă eroarea persistă, contactați ","state_error.error_title_already_subscribed":"Deja abonat","state_error.error_title_already_purchased":"Deja cumpărat","state_error.error_title_other_errors":"Ceva a mers prost","state_error.error_message_already_subscribed":"Ești deja abonat la acest produs.","state_error.error_message_already_purchased":"Ai cumpărat deja acest produs.","state_error.error_message_missing_email_error":"Adresa de e-mail este necesară pentru a finaliza cumpărarea.","state_error.error_message_network_error":"Eroare de rețea. Verificați conexiunea la internet.","state_error.error_message_error_charging_payment":"Plata a eșuat.","state_error.error_message_error_setting_up_purchase":"Cumpărarea nu a fost inițiată din cauza unei erori. Cod eroare: {{errorCode}}","state_error.error_message_unknown_error":"A apărut o eroare necunoscută. Cod eroare: {{errorCode}}","state_error.button_try_again":"Încercați din nou","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% reducere","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Oi={"periods.unknownFrequency":"неизвестно","periods.week":"{{amount}} неделя","periods.month":"{{amount}} месяц","periods.year":"{{amount}} год","periods.day":"{{amount}} день","periods.weekShort":"{{amount}} нед.","periods.monthShort":"{{amount}} мес.","periods.yearShort":"{{amount}} г.","periods.dayShort":"{{amount}} дн.","periods.lifetime":"пожизненно","periods.weekPlural":"{{amount}} недели","periods.monthPlural":"{{amount}} месяца","periods.yearPlural":"{{amount}} года","periods.dayPlural":"{{amount}} дней","periods.weekFrequency":"еженедельно","periods.monthFrequency":"ежемесячно","periods.yearFrequency":"ежегодно","periods.dayFrequency":"ежедневно","periods.weekFrequencyPlural":"каждые {{amount}} недель","periods.monthFrequencyPlural":"каждые {{amount}} месяца","periods.yearFrequencyPlural":"каждые {{amount}} года","periods.dayFrequencyPlural":"каждые {{amount}} дней","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} бесплатный пробный период","state_present_offer.price_after_free_trial":"{{productPrice}} после окончания пробного периода","state_present_offer.renewal_frequency":"Обновляется {{frequency}}","state_present_offer.continues_until_cancelled":"Продолжается до отмены","state_present_offer.cancel_anytime":"Отмена в любое время","state_needs_auth_info.email_step_title":"Адрес электронной почты для выставления счета","state_needs_auth_info.email_input_label":"Электронная почта","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Продолжить","state_needs_payment_info.payment_step_title":"Безопасная оплата","state_needs_payment_info.button_pay":"Оплатить","state_needs_payment_info.button_start_trial":"Начать пробный период","state_success.purchase_successful":"Покупка прошла успешно","state_success.subscription_now_active":"Ваша подписка теперь активна","state_success.button_close":"Закрыть","state_error.if_error_persists":"Если ошибка сохраняется, свяжитесь с ","state_error.error_title_already_subscribed":"Уже подписан","state_error.error_title_already_purchased":"Уже приобретено","state_error.error_title_other_errors":"Что-то пошло не так","state_error.error_message_already_subscribed":"Вы уже подписаны на этот продукт.","state_error.error_message_already_purchased":"Вы уже приобрели этот продукт.","state_error.error_message_missing_email_error":"Электронная почта требуется для завершения покупки.","state_error.error_message_network_error":"Сетевая ошибка. Проверьте ваше интернет-соединение.","state_error.error_message_error_charging_payment":"Ошибка при оплате.","state_error.error_message_error_setting_up_purchase":"Покупка не была начата из-за ошибки. Код ошибки: {{errorCode}}","state_error.error_message_unknown_error":"Произошла неизвестная ошибка. Код ошибки: {{errorCode}}","state_error.button_try_again":"Попробовать снова","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% скидка","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Di={"periods.unknownFrequency":"neznámy","periods.week":"{{amount}} týždeň","periods.month":"{{amount}} mesiac","periods.year":"{{amount}} rok","periods.day":"{{amount}} deň","periods.weekShort":"{{amount}} týž.","periods.monthShort":"{{amount}} mes.","periods.yearShort":"{{amount}} rok","periods.dayShort":"{{amount}} deň","periods.lifetime":"na celý život","periods.weekPlural":"{{amount}} týždne","periods.monthPlural":"{{amount}} mesiace","periods.yearPlural":"{{amount}} roky","periods.dayPlural":"{{amount}} dni","periods.weekFrequency":"týždenne","periods.monthFrequency":"mesačne","periods.yearFrequency":"ročne","periods.dayFrequency":"denne","periods.weekFrequencyPlural":"každé {{amount}} týždne","periods.monthFrequencyPlural":"každé {{amount}} mesiace","periods.yearFrequencyPlural":"každé {{amount}} roky","periods.dayFrequencyPlural":"každé {{amount}} dni","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} bezplatné skúšobné obdobie","state_present_offer.price_after_free_trial":"{{productPrice}} po skončení skúšobného obdobia","state_present_offer.renewal_frequency":"Obnovuje sa {{frequency}}","state_present_offer.continues_until_cancelled":"Pokračuje až do zrušenia","state_present_offer.cancel_anytime":"Zrušiť kedykoľvek","state_needs_auth_info.email_step_title":"Fakturačná e-mailová adresa","state_needs_auth_info.email_input_label":"E-mail","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Pokračovať","state_needs_payment_info.payment_step_title":"Bezpečná platba","state_needs_payment_info.button_pay":"Zaplatíť","state_needs_payment_info.button_start_trial":"Spustiť skúšobnú verziu","state_success.purchase_successful":"Nákup úspešný","state_success.subscription_now_active":"Vaše predplatné je teraz aktívne","state_success.button_close":"Zatvoriť","state_error.if_error_persists":"Ak chyba pretrváva, kontaktujte ","state_error.error_title_already_subscribed":"Už prihlásené","state_error.error_title_already_purchased":"Už zakúpené","state_error.error_title_other_errors":"Niečo sa pokazilo","state_error.error_message_already_subscribed":"Už ste prihlásení na tento produkt.","state_error.error_message_already_purchased":"Tento produkt ste už zakúpili.","state_error.error_message_missing_email_error":"E-mail je potrebný na dokončenie nákupu.","state_error.error_message_network_error":"Chyba siete. Skontrolujte svoje pripojenie na internet.","state_error.error_message_error_charging_payment":"Platba zlyhala.","state_error.error_message_error_setting_up_purchase":"Nákup nebol spustený kvôli chybe. Kód chyby: {{errorCode}}","state_error.error_message_unknown_error":"Vyskytla sa neznáma chyba. Kód chyby: {{errorCode}}","state_error.button_try_again":"Skúsiť znova","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% zľava","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Mi={"periods.unknownFrequency":"okänd","periods.week":"{{amount}} vecka","periods.month":"{{amount}} månad","periods.year":"{{amount}} år","periods.day":"{{amount}} dag","periods.weekShort":"{{amount}} v","periods.monthShort":"{{amount}} mån","periods.yearShort":"{{amount}} år","periods.dayShort":"{{amount}} dag","periods.lifetime":"livstid","periods.weekPlural":"{{amount}} veckor","periods.monthPlural":"{{amount}} månader","periods.yearPlural":"{{amount}} år","periods.dayPlural":"{{amount}} dagar","periods.weekFrequency":"veckovis","periods.monthFrequency":"månadsvis","periods.yearFrequency":"årligen","periods.dayFrequency":"dagligen","periods.weekFrequencyPlural":"varje {{amount}} veckor","periods.monthFrequencyPlural":"varje {{amount}} månader","periods.yearFrequencyPlural":"varje {{amount}} år","periods.dayFrequencyPlural":"varje {{amount}} dagar","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} gratis provperiod","state_present_offer.price_after_free_trial":"{{productPrice}} efter provperiodens slut","state_present_offer.renewal_frequency":"Förnyas {{frequency}}","state_present_offer.continues_until_cancelled":"Fortsätter tills det avbryts","state_present_offer.cancel_anytime":"Avbryt när som helst","state_needs_auth_info.email_step_title":"Fakturerings-e-postadress","state_needs_auth_info.email_input_label":"E-post","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Fortsätt","state_needs_payment_info.payment_step_title":"Säker betalning","state_needs_payment_info.button_pay":"Betala","state_needs_payment_info.button_start_trial":"Börja provperiod","state_success.purchase_successful":"Köpet lyckades","state_success.subscription_now_active":"Din prenumeration är nu aktiv","state_success.button_close":"Stäng","state_error.if_error_persists":"Om felet kvarstår, kontakta ","state_error.error_title_already_subscribed":"Redan prenumererad","state_error.error_title_already_purchased":"Redan köpt","state_error.error_title_other_errors":"Något gick fel","state_error.error_message_already_subscribed":"Du är redan prenumererad på denna produkt.","state_error.error_message_already_purchased":"Du har redan köpt denna produkt.","state_error.error_message_missing_email_error":"E-post krävs för att slutföra köpet.","state_error.error_message_network_error":"Nätverksfel. Kontrollera din internetanslutning.","state_error.error_message_error_charging_payment":"Betalningen misslyckades.","state_error.error_message_error_setting_up_purchase":"Köpet kunde inte påbörjas på grund av ett fel. Felkod: {{errorCode}}","state_error.error_message_unknown_error":"Ett okänt fel inträffade. Felkod: {{errorCode}}","state_error.button_try_again":"Försök igen","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% rabatt","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Ni={"periods.unknownFrequency":"ไม่ทราบ","periods.week":"{{amount}} สัปดาห์","periods.month":"{{amount}} เดือน","periods.year":"{{amount}} ปี","periods.day":"{{amount}} วัน","periods.weekShort":"{{amount}} สัปด.","periods.monthShort":"{{amount}} ด.","periods.yearShort":"{{amount}} ป.","periods.dayShort":"{{amount}} ว.","periods.lifetime":"ตลอดชีพ","periods.weekPlural":"{{amount}} สัปดาห์","periods.monthPlural":"{{amount}} เดือน","periods.yearPlural":"{{amount}} ปี","periods.dayPlural":"{{amount}} วัน","periods.weekFrequency":"รายสัปดาห์","periods.monthFrequency":"รายเดือน","periods.yearFrequency":"รายปี","periods.dayFrequency":"รายวัน","periods.weekFrequencyPlural":"ทุก {{amount}} สัปดาห์","periods.monthFrequencyPlural":"ทุก {{amount}} เดือน","periods.yearFrequencyPlural":"ทุก {{amount}} ปี","periods.dayFrequencyPlural":"ทุก {{amount}} วัน","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} ทดลองใช้งานฟรี","state_present_offer.price_after_free_trial":"{{productPrice}} หลังสิ้นสุดการทดลอง","state_present_offer.renewal_frequency":"ต่ออายุ {{frequency}}","state_present_offer.continues_until_cancelled":"ดำเนินต่อไปจนกว่าจะยกเลิก","state_present_offer.cancel_anytime":"ยกเลิกได้ทุกเมื่อ","state_needs_auth_info.email_step_title":"อีเมลสำหรับเรียกเก็บเงิน","state_needs_auth_info.email_input_label":"อีเมล","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"ดำเนินการต่อ","state_needs_payment_info.payment_step_title":"ชำระเงินอย่างปลอดภัย","state_needs_payment_info.button_pay":"ชำระเงิน","state_needs_payment_info.button_start_trial":"เริ่มการทดลอง","state_success.purchase_successful":"ซื้อสำเร็จ","state_success.subscription_now_active":"การสมัครใช้งานของคุณใช้งานได้แล้ว","state_success.button_close":"ปิด","state_error.if_error_persists":"หากข้อผิดพลาดยังคงอยู่ โปรดติดต่อ ","state_error.error_title_already_subscribed":"สมัครสมาชิกแล้ว","state_error.error_title_already_purchased":"ซื้อแล้ว","state_error.error_title_other_errors":"เกิดข้อผิดพลาดบางอย่าง","state_error.error_message_already_subscribed":"คุณสมัครสมาชิกผลิตภัณฑ์นี้แล้ว","state_error.error_message_already_purchased":"คุณได้ซื้อผลิตภัณฑ์นี้แล้ว","state_error.error_message_missing_email_error":"จำเป็นต้องใช้อีเมลเพื่อทำการซื้อให้เสร็จสมบูรณ์","state_error.error_message_network_error":"ข้อผิดพลาดของเครือข่าย โปรดตรวจสอบการเชื่อมต่ออินเทอร์เน็ตของคุณ","state_error.error_message_error_charging_payment":"การชำระเงินล้มเหลว","state_error.error_message_error_setting_up_purchase":"ไม่สามารถเริ่มการซื้อเนื่องจากข้อผิดพลาด รหัสข้อผิดพลาด: {{errorCode}}","state_error.error_message_unknown_error":"เกิดข้อผิดพลาดที่ไม่รู้จัก รหัสข้อผิดพลาด: {{errorCode}}","state_error.button_try_again":"ลองอีกครั้ง","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% ส่วนลด","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Ci={"periods.unknownFrequency":"bilinmeyen","periods.week":"{{amount}} hafta","periods.month":"{{amount}} ay","periods.year":"{{amount}} yıl","periods.day":"{{amount}} gün","periods.weekShort":"{{amount}} hft","periods.monthShort":"{{amount}} ay","periods.yearShort":"{{amount}} yıl","periods.dayShort":"{{amount}} gün","periods.lifetime":"ömür boyu","periods.weekPlural":"{{amount}} haftalar","periods.monthPlural":"{{amount}} aylar","periods.yearPlural":"{{amount}} yıllar","periods.dayPlural":"{{amount}} günler","periods.weekFrequency":"haftalık","periods.monthFrequency":"aylık","periods.yearFrequency":"yıllık","periods.dayFrequency":"günlük","periods.weekFrequencyPlural":"her {{amount}} hafta","periods.monthFrequencyPlural":"her {{amount}} ay","periods.yearFrequencyPlural":"her {{amount}} yıl","periods.dayFrequencyPlural":"her {{amount}} gün","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} ücretsiz deneme","state_present_offer.price_after_free_trial":"{{productPrice}} deneme sonunda","state_present_offer.renewal_frequency":"{{frequency}} yenilenir","state_present_offer.continues_until_cancelled":"İptal edilene kadar devam eder","state_present_offer.cancel_anytime":"Her zaman iptal edebilirsiniz","state_needs_auth_info.email_step_title":"Fatura e-posta adresi","state_needs_auth_info.email_input_label":"E-posta","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Devam et","state_needs_payment_info.payment_step_title":"Güvenli ödeme","state_needs_payment_info.button_pay":"Öde","state_needs_payment_info.button_start_trial":"Denemeyi Başlat","state_success.purchase_successful":"Satın alma başarılı","state_success.subscription_now_active":"Aboneliğiniz artık aktif","state_success.button_close":"Kapat","state_error.if_error_persists":"Sorun devam ederse, iletişime geçin ","state_error.error_title_already_subscribed":"Zaten Abone","state_error.error_title_already_purchased":"Zaten Satın Alındı","state_error.error_title_other_errors":"Bir şeyler yanlış gitti","state_error.error_message_already_subscribed":"Bu ürüne zaten abonesiniz.","state_error.error_message_already_purchased":"Bu ürünü zaten satın aldınız.","state_error.error_message_missing_email_error":"Satın almayı tamamlamak için e-posta gereklidir.","state_error.error_message_network_error":"Ağ hatası. İnternet bağlantınızı kontrol edin.","state_error.error_message_error_charging_payment":"Ödeme başarısız oldu.","state_error.error_message_error_setting_up_purchase":"Bir hata nedeniyle satın alma başlatılamadı. Hata kodu: {{errorCode}}","state_error.error_message_unknown_error":"Bilinmeyen bir hata oluştu. Hata kodu: {{errorCode}}","state_error.button_try_again":"Tekrar dene","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% indirim","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},ji={"periods.unknownFrequency":"невідомий","periods.week":"{{amount}} тиждень","periods.month":"{{amount}} місяць","periods.year":"{{amount}} рік","periods.day":"{{amount}} день","periods.weekShort":"{{amount}} тиж.","periods.monthShort":"{{amount}} міс.","periods.yearShort":"{{amount}} р.","periods.dayShort":"{{amount}} д.","periods.lifetime":"на все життя","periods.weekPlural":"{{amount}} тижнів","periods.monthPlural":"{{amount}} місяців","periods.yearPlural":"{{amount}} років","periods.dayPlural":"{{amount}} днів","periods.weekFrequency":"щотижня","periods.monthFrequency":"щомісяця","periods.yearFrequency":"щорічно","periods.dayFrequency":"щодня","periods.weekFrequencyPlural":"кожні {{amount}} тижні","periods.monthFrequencyPlural":"кожні {{amount}} місяці","periods.yearFrequencyPlural":"кожні {{amount}} роки","periods.dayFrequencyPlural":"кожні {{amount}} дні","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} безкоштовна пробна версія","state_present_offer.price_after_free_trial":"{{productPrice}} після закінчення пробного періоду","state_present_offer.renewal_frequency":"Оновлюється {{frequency}}","state_present_offer.continues_until_cancelled":"Продовжується до скасування","state_present_offer.cancel_anytime":"Скасувати будь-коли","state_needs_auth_info.email_step_title":"Електронна адреса для виставлення рахунків","state_needs_auth_info.email_input_label":"Електронна пошта","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Продовжити","state_needs_payment_info.payment_step_title":"Безпечна оплата","state_needs_payment_info.button_pay":"Оплатити","state_needs_payment_info.button_start_trial":"Розпочати пробний період","state_success.purchase_successful":"Покупка успішна","state_success.subscription_now_active":"Ваша підписка активна","state_success.button_close":"Закрити","state_error.if_error_persists":"Якщо помилка не зникає, зверніться до ","state_error.error_title_already_subscribed":"Вже підписано","state_error.error_title_already_purchased":"Вже придбано","state_error.error_title_other_errors":"Щось пішло не так","state_error.error_message_already_subscribed":"Ви вже підписані на цей продукт.","state_error.error_message_already_purchased":"Ви вже придбали цей продукт.","state_error.error_message_missing_email_error":"Електронна пошта необхідна для завершення покупки.","state_error.error_message_network_error":"Помилка мережі. Перевірте своє інтернет-з’єднання.","state_error.error_message_error_charging_payment":"Оплата не вдалася.","state_error.error_message_error_setting_up_purchase":"Придбання не розпочато через помилку. Код помилки: {{errorCode}}","state_error.error_message_unknown_error":"Сталася невідома помилка. Код помилки: {{errorCode}}","state_error.button_try_again":"Спробуйте ще раз","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% знижка","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"},Ri={"periods.unknownFrequency":"không xác định","periods.week":"{{amount}} tuần","periods.month":"{{amount}} tháng","periods.year":"{{amount}} năm","periods.day":"{{amount}} ngày","periods.weekShort":"{{amount}} tu.","periods.monthShort":"{{amount}} th.","periods.yearShort":"{{amount}} năm","periods.dayShort":"{{amount}} ng.","periods.lifetime":"trọn đời","periods.weekPlural":"{{amount}} tuần","periods.monthPlural":"{{amount}} tháng","periods.yearPlural":"{{amount}} năm","periods.dayPlural":"{{amount}} ngày","periods.weekFrequency":"hàng tuần","periods.monthFrequency":"hàng tháng","periods.yearFrequency":"hàng năm","periods.dayFrequency":"hàng ngày","periods.weekFrequencyPlural":"mỗi {{amount}} tuần","periods.monthFrequencyPlural":"mỗi {{amount}} tháng","periods.yearFrequencyPlural":"mỗi {{amount}} năm","periods.dayFrequencyPlural":"mỗi {{amount}} ngày","state_present_offer.product_title":"{{productTitle}}","state_present_offer.product_description":"{{productDescription}}","state_present_offer.product_price":"{{productPrice}}","state_present_offer.free_trial_duration":"{{trialDuration}} dùng thử miễn phí","state_present_offer.price_after_free_trial":"{{productPrice}} sau khi hết hạn dùng thử","state_present_offer.renewal_frequency":"Gia hạn {{frequency}}","state_present_offer.continues_until_cancelled":"Tiếp tục cho đến khi bị hủy","state_present_offer.cancel_anytime":"Hủy bất cứ lúc nào","state_needs_auth_info.email_step_title":"Địa chỉ email thanh toán","state_needs_auth_info.email_input_label":"Email","state_needs_auth_info.email_input_placeholder":"john@appleseed.com","state_needs_auth_info.button_continue":"Tiếp tục","state_needs_payment_info.payment_step_title":"Thanh toán an toàn","state_needs_payment_info.button_pay":"Thanh toán","state_needs_payment_info.button_start_trial":"Bắt đầu dùng thử","state_success.purchase_successful":"Mua thành công","state_success.subscription_now_active":"Gói đăng ký của bạn hiện đã hoạt động","state_success.button_close":"Đóng","state_error.if_error_persists":"Nếu lỗi vẫn tiếp diễn, vui lòng liên hệ ","state_error.error_title_already_subscribed":"Đã đăng ký","state_error.error_title_already_purchased":"Đã mua","state_error.error_title_other_errors":"Đã xảy ra sự cố","state_error.error_message_already_subscribed":"Bạn đã đăng ký sản phẩm này.","state_error.error_message_already_purchased":"Bạn đã mua sản phẩm này.","state_error.error_message_missing_email_error":"Cần email để hoàn tất việc mua hàng.","state_error.error_message_network_error":"Lỗi mạng. Vui lòng kiểm tra kết nối internet của bạn.","state_error.error_message_error_charging_payment":"Thanh toán không thành công.","state_error.error_message_error_setting_up_purchase":"Không thể bắt đầu giao dịch mua do lỗi. Mã lỗi: {{errorCode}}","state_error.error_message_unknown_error":"Đã xảy ra lỗi không xác định. Mã lỗi: {{errorCode}}","state_error.button_try_again":"Thử lại","paywall_variables.price_per_period":"{{formattedPrice}}/{{period}}","paywall_variables.sub_relative_discount":"{{discount}}% giảm giá","paywall_variables.total_price_and_per_month":"{{formattedPrice}}/{{period}} ({{formattedPricePerMonth}}/{{monthPeriod}})"};var C=(e=>(e.PeriodsWeek="periods.week",e.PeriodsMonth="periods.month",e.PeriodsYear="periods.year",e.PeriodsDay="periods.day",e.PeriodsWeekShort="periods.weekShort",e.PeriodsMonthShort="periods.monthShort",e.PeriodsYearShort="periods.yearShort",e.PeriodsDayShort="periods.dayShort",e.PeriodsLifetime="periods.lifetime",e.PeriodsWeekPlural="periods.weekPlural",e.PeriodsMonthPlural="periods.monthPlural",e.PeriodsYearPlural="periods.yearPlural",e.PeriodsDayPlural="periods.dayPlural",e.PeriodsWeekFrequency="periods.weekFrequency",e.PeriodsMonthFrequency="periods.monthFrequency",e.PeriodsYearFrequency="periods.yearFrequency",e.PeriodsDayFrequency="periods.dayFrequency",e.PeriodsUnknownFrequency="periods.unknownFrequency",e.PeriodsWeekFrequencyPlural="periods.weekFrequencyPlural",e.PeriodsMonthFrequencyPlural="periods.monthFrequencyPlural",e.PeriodsYearFrequencyPlural="periods.yearFrequencyPlural",e.PeriodsDayFrequencyPlural="periods.dayFrequencyPlural",e.StatePresentOfferProductTitle="state_present_offer.product_title",e.StatePresentOfferProductDescription="state_present_offer.product_description",e.StatePresentOfferProductPrice="state_present_offer.product_price",e.StatePresentOfferFreeTrialDuration="state_present_offer.free_trial_duration",e.StatePresentOfferPriceAfterFreeTrial="state_present_offer.price_after_free_trial",e.StatePresentOfferRenewalFrequency="state_present_offer.renewal_frequency",e.StatePresentOfferContinuesUntilCancelled="state_present_offer.continues_until_cancelled",e.StatePresentOfferCancelAnytime="state_present_offer.cancel_anytime",e.StateNeedsAuthInfoEmailStepTitle="state_needs_auth_info.email_step_title",e.StateNeedsAuthInfoEmailInputLabel="state_needs_auth_info.email_input_label",e.StateNeedsAuthInfoEmailInputPlaceholder="state_needs_auth_info.email_input_placeholder",e.StateNeedsAuthInfoButtonContinue="state_needs_auth_info.button_continue",e.StateNeedsPaymentInfoPaymentStepTitle="state_needs_payment_info.payment_step_title",e.StateNeedsPaymentInfoButtonPay="state_needs_payment_info.button_pay",e.StateNeedsPaymentInfoButtonStartTrial="state_needs_payment_info.button_start_trial",e.StateSuccessPurchaseSuccessful="state_success.purchase_successful",e.StateSuccessSubscriptionNowActive="state_success.subscription_now_active",e.StateSuccessButtonClose="state_success.button_close",e.StateErrorIfErrorPersists="state_error.if_error_persists",e.StateErrorErrorTitleAlreadySubscribed="state_error.error_title_already_subscribed",e.StateErrorErrorTitleAlreadyPurchased="state_error.error_title_already_purchased",e.StateErrorErrorTitleOtherErrors="state_error.error_title_other_errors",e.StateErrorErrorMessageAlreadySubscribed="state_error.error_message_already_subscribed",e.StateErrorErrorMessageAlreadyPurchased="state_error.error_message_already_purchased",e.StateErrorErrorMessageMissingEmailError="state_error.error_message_missing_email_error",e.StateErrorErrorMessageNetworkError="state_error.error_message_network_error",e.StateErrorErrorMessageErrorChargingPayment="state_error.error_message_error_charging_payment",e.StateErrorErrorMessageErrorSettingUpPurchase="state_error.error_message_error_setting_up_purchase",e.StateErrorErrorMessageUnknownError="state_error.error_message_unknown_error",e.StateErrorButtonTryAgain="state_error.button_try_again",e.PaywallVariablesPricePerPeriod="paywall_variables.price_per_period",e.PaywallVariablesSubRelativeDiscount="paywall_variables.sub_relative_discount",e.PaywallVariablesTotalPriceAndPerMonth="paywall_variables.total_price_and_per_month",e))(C||{});const Ui={en:si,es:ii,it:li,ar:ui,ca:ci,zh_Hans:_i,zh_Hant:di,hr:pi,cs:fi,da:mi,nl:hi,fi:yi,fr:gi,de:vi,el:bi,he:wi,hi:Pi,hu:ki,id:Ei,ja:xi,ko:Si,ms:Ii,no:qi,pl:Ti,pt:Fi,ro:Ai,ru:Oi,sk:Di,sv:Mi,th:Ni,tr:Ci,uk:ji,vi:Ri},Br={noWhitespace:!1,short:!1};class Ve{constructor(r={},t=or,n=or){V(this,"locales",{});this.selectedLocale=t,this.defaultLocale=n;const a={};Object.entries(Ui).forEach(([o,s])=>{a[o]=new Wa(s,o)}),this.locales=a,r&&this.override(r)}static fallback(){return new Ve}override(r){Object.entries(r).forEach(([t,n])=>{this.locales[t]=new Wa({...this.locales[t].labels||{},...n},this.getLanguageCodeString(t))})}formatPrice(r,t){const n=r/1e6;try{return new Intl.NumberFormat(this.locale,{style:"currency",currency:t}).format(n)}catch{console.debug(`Failed to create a price formatter for locale: ${this.locale}`)}try{return new Intl.NumberFormat(this.fallbackLocale,{style:"currency",currency:t}).format(n)}catch{console.debug(`Failed to create a price formatter for locale: ${this.fallbackLocale}`)}return new Intl.NumberFormat(or,{style:"currency",currency:t}).format(n)}get locale(){var r;return((r=this.getLocaleInstance(this.selectedLocale))==null?void 0:r.localeKey)||this.getLanguageCodeString(this.selectedLocale)}get fallbackLocale(){var r;return((r=this.getLocaleInstance(this.defaultLocale))==null?void 0:r.localeKey)||this.getLanguageCodeString(this.defaultLocale)}getLanguageCodeString(r){return r.split("_")[0].split("-")[0]}getLocaleInstance(r){const t=this.getLanguageCodeString(r);return this.locales[r]||this.locales[t]}translate(r,t){const n=this.getLocaleInstance(this.selectedLocale),a=this.getLocaleInstance(this.defaultLocale);return(n==null?void 0:n.translate(r,t))||(a==null?void 0:a.translate(r,t))||""}translatePeriod(r,t,n=Br){const a=this.getLocaleInstance(this.selectedLocale),o=this.getLocaleInstance(this.defaultLocale);return(a==null?void 0:a.translatePeriod(r,t,n))||(o==null?void 0:o.translatePeriod(r,t,n))}translatePeriodUnit(r,t=Br){const n=this.getLocaleInstance(this.selectedLocale),a=this.getLocaleInstance(this.defaultLocale);return(n==null?void 0:n.translatePeriodUnit(r,t))||(a==null?void 0:a.translatePeriodUnit(r,t))}translatePeriodFrequency(r,t){const n=this.getLocaleInstance(this.selectedLocale),a=this.getLocaleInstance(this.defaultLocale);return(n==null?void 0:n.translatePeriodFrequency(r,t))||(a==null?void 0:a.translatePeriodFrequency(r,t))}}class Wa{constructor(r={},t){this.labels=r,this.localeKey=t}replaceVariables(r,t){return Object.entries(t).reduce((n,[a,o])=>n.replace(`{{${a}}}`,`${o??""}`),r)}translate(r,t){const n=this.labels[r];if(n)return this.replaceVariables(n,t||{})}translatePeriod(r,t,n=Br){var i;const{noWhitespace:a,short:o}={...Br,...n},s=o?`periods.${t}Short`:Math.abs(r)===1?`periods.${t}`:`periods.${t}Plural`;return(i=this.translate(s,{amount:r.toString()}))==null?void 0:i.replace(" ",a?"":" ")}translatePeriodUnit(r,t=Br){var s;const{noWhitespace:n,short:a}={...Br,...t},o=`periods.${r}${a?"Short":""}`;return(s=this.translate(o,{amount:""}))==null?void 0:s.replace(" ",n?"":" ")}translatePeriodFrequency(r,t){const n=Math.abs(r)===1?`periods.${t}Frequency`:`periods.${t}FrequencyPlural`;return this.translate(n,{amount:r.toString()})}}function ue(e,r){ne(r,!0);const t=g(r,"key",3,""),n=g(r,"defaultLocale",3,or),a=new Ve({},r.selectedLocale||"",n()),o=xr(Sr),s=r.selectedLocale?a:o||Ve.fallback(),i=ee(()=>t()?s.translate(t()||"",r.variables):void 0);var l=ie(),u=j(l);{var c=_=>{var f=_t();Z(()=>ar(f,p(i))),h(_,f)},d=_=>{var f=ie(),m=j(f);yn(m,()=>r.children??Ye),h(_,f)};U(u,_=>{p(i)?_(c):_(d,!1)})}h(e,l),ae()}var Te=(e=>(e[e.Silent=0]="Silent",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Info=3]="Info",e[e.Debug=4]="Debug",e[e.Verbose=5]="Verbose",e))(Te||{});class X{static setLogLevel(r){this.logLevel=r}static log(r,t=this.logLevel){const n=`[Purchases] ${r}`;if(!(this.logLevel<t||t===Te.Silent))switch(t){case Te.Error:console.error(n);break;case Te.Warn:console.warn(n);break;case Te.Info:console.info(n);break;case Te.Debug:console.debug(n);break;case Te.Verbose:console.debug(n);break}}static errorLog(r){this.log(r,Te.Error)}static warnLog(r){this.log(r,Te.Warn)}static infoLog(r){this.log(r,Te.Info)}static debugLog(r){this.log(r,Te.Debug)}static verboseLog(r){this.log(r,Te.Verbose)}}V(X,"logLevel",Te.Silent);var mr=(e=>(e.Year="year",e.Month="month",e.Week="week",e.Day="day",e))(mr||{});function Pn(e){const r=e.match(/^PT?([0-9]+)([MDYW])$/);if(!r||r.length<3)return X.errorLog(`Invalid ISO 8601 duration format: ${e}`),null;const t=parseInt(r[1]);switch(r[2]){case"Y":return{number:t,unit:"year"};case"M":return{number:t,unit:"month"};case"W":return{number:t,unit:"week"};case"D":return{number:t,unit:"day"};default:return X.errorLog(`Invalid ISO 8601 unit duration format: ${e}`),null}}const Li=(e,r,t)=>{const n=e/1e6;return new Intl.NumberFormat(t,{style:"currency",currency:r}).format(n)},Bi=(e,r)=>{const t=Pn(e);return t?r.translatePeriodFrequency(t.number,t.unit)||`${t.number} ${t.unit}s`:r.translate(C.PeriodsUnknownFrequency)},zi=(e,r)=>{const t=Pn(e);return t?r.translatePeriod(t.number,t.unit)||`${t.number} ${t.unit}s`:e};function Vi(e){return e!=null}var Za=(e=>(e.Unknown="unknown",e.Custom="custom",e.Lifetime="$rc_lifetime",e.Annual="$rc_annual",e.SixMonth="$rc_six_month",e.ThreeMonth="$rc_three_month",e.TwoMonth="$rc_two_month",e.Monthly="$rc_monthly",e.Weekly="$rc_weekly",e))(Za||{}),Je=(e=>(e.Subscription="subscription",e.Consumable="consumable",e.NonConsumable="non_consumable",e))(Je||{});const Qa=e=>({amount:e.amount_micros/1e4,amountMicros:e.amount_micros,currency:e.currency,formattedPrice:Li(e.amount_micros,e.currency)}),Ja=e=>{const r=e.period_duration;return{periodDuration:r,period:r?Pn(r):null,cycleCount:e.cycle_count,price:e.price?Qa(e.price):null}},Hi=e=>e.base==null?(X.debugLog("Missing base phase for subscription option. Ignoring."),null):{id:e.id,priceId:e.price_id,base:Ja(e.base),trial:e.trial?Ja(e.trial):null},Yi=e=>e.base_price==null?(X.debugLog("Missing base price for non-subscription option. Ignoring."),null):{id:e.id,priceId:e.price_id,basePrice:Qa(e.base_price)},Gi=(e,r)=>{const t=e.product_type;return t==="subscription"?Zi(e,r,t):Wi(e,r,t)},Wi=(e,r,t)=>{const n={};if(Object.entries(e.purchase_options).forEach(([s,i])=>{const l=Yi(i);l!=null&&(n[s]=l)}),Object.keys(n).length===0)return X.debugLog(`Product ${e.identifier} has no purchase options. Ignoring.`),null;const a=e.default_purchase_option_id,o=a&&a in e.purchase_options?n[a]:null;return o==null?(X.debugLog(`Product ${e.identifier} has no default purchase option. Ignoring.`),null):{identifier:e.identifier,displayName:e.title,title:e.title,description:e.description,productType:t,currentPrice:o.basePrice,normalPeriodDuration:null,presentedOfferingIdentifier:r.offeringIdentifier,presentedOfferingContext:r,defaultPurchaseOption:o,defaultSubscriptionOption:null,subscriptionOptions:{},defaultNonSubscriptionOption:o}},Zi=(e,r,t)=>{const n={};if(Object.entries(e.purchase_options).forEach(([i,l])=>{const u=Hi(l);u!=null&&(n[i]=u)}),Object.keys(n).length===0)return X.debugLog(`Product ${e.identifier} has no subscription options. Ignoring.`),null;const a=e.default_purchase_option_id,o=a&&a in n?n[a]:null;if(o==null)return X.debugLog(`Product ${e.identifier} has no default subscription option. Ignoring.`),null;const s=o.base.price;return s==null?(X.debugLog(`Product ${e.identifier} default option has no base price. Ignoring.`),null):{identifier:e.identifier,displayName:e.title,title:e.title,description:e.description,productType:t,currentPrice:s,normalPeriodDuration:o.base.periodDuration,presentedOfferingIdentifier:r.offeringIdentifier,presentedOfferingContext:r,defaultPurchaseOption:o,defaultSubscriptionOption:o,subscriptionOptions:n,defaultNonSubscriptionOption:null}},Qi=(e,r,t)=>{const n=t[r.platform_product_identifier];if(n===void 0)return null;const a=Gi(n,e);return a===null?null:{identifier:r.identifier,rcBillingProduct:a,packageType:Ki(r.identifier)}},Ji=(e,r,t,n)=>{const a={offeringIdentifier:r.identifier,targetingContext:e&&n?{ruleId:n.rule_id,revision:n.revision}:null,placementIdentifier:null},o=r.packages.map(i=>Qi(a,i,t)).filter(Vi),s={};for(const i of o)i!=null&&(s[i.identifier]=i);return o.length==0?null:{identifier:r.identifier,serverDescription:r.description,metadata:r.metadata,packagesById:s,availablePackages:o,lifetime:s.$rc_lifetime??null,annual:s.$rc_annual??null,sixMonth:s.$rc_six_month??null,threeMonth:s.$rc_three_month??null,twoMonth:s.$rc_two_month??null,monthly:s.$rc_monthly??null,weekly:s.$rc_weekly??null,paywall_components:r.paywall_components?r.paywall_components:null}};function Ki(e){switch(e){case"$rc_lifetime":return"$rc_lifetime";case"$rc_annual":return"$rc_annual";case"$rc_six_month":return"$rc_six_month";case"$rc_three_month":return"$rc_three_month";case"$rc_two_month":return"$rc_two_month";case"$rc_monthly":return"$rc_monthly";case"$rc_weekly":return"$rc_weekly";default:return e.startsWith("$rc_")?"unknown":"custom"}}var Xi=x('<span class="rcb-product-price-after-trial svelte-1cj3ch9"><!></span>'),$i=x('<span class="rcb-product-description svelte-1cj3ch9"><!></span>'),el=x("<li><!></li>"),rl=x('<span class="rcb-product-price svelte-1cj3ch9"><!> <!></span> <!> <!> <ul class="rcb-product-details svelte-1cj3ch9"><!> <li><!></li> <li><!></li></ul>',1),tl=x('<span class="rcb-product-description svelte-1cj3ch9"><!></span>'),nl=x('<span class="rcb-product-price svelte-1cj3ch9"><!></span> <!>',1),al=x('<div class="rcb-pricing-info svelte-1cj3ch9"><span class="rcb-product-title svelte-1cj3ch9"><!></span> <!> <!></div>');const ol={hash:"svelte-1cj3ch9",code:`.rcb-pricing-info.svelte-1cj3ch9 {display:flex;flex-direction:column;margin-top:102px;font-weight:500;}.rcb-product-title.svelte-1cj3ch9 {color:var(--rc-color-grey-text-dark);}.rcb-product-price.svelte-1cj3ch9 {color:var(--rc-color-grey-text-dark);font-size:24px;margin:12px 0px;}.rcb-product-description.svelte-1cj3ch9 {color:var(--rc-color-grey-text-dark);margin:0 0 12px 0;}.rcb-product-price-after-trial.svelte-1cj3ch9 {margin-bottom:12px;}.rcb-product-details.svelte-1cj3ch9 {color:var(--rc-color-grey-text-light);list-style-type:disc;list-style-position:inside;margin:0px;padding:0px;}
2
2
 
3
- @media screen and (max-width: 960px) {.rcb-pricing-info.svelte-1mdrqnh {margin-top:48px;}
4
- }`};function Pi(e,t){var f;W(t,!1),q(e,Za);let r=m(t,"productDetails",8),n=m(t,"purchaseOption",8),i=m(t,"brandingAppearance",8,void 0);const o=r().productType===Te.Subscription,a=n(),s=n(),l=a==null?void 0:a.trial,c=(f=a==null?void 0:a.base)==null?void 0:f.price,u=s==null?void 0:s.basePrice;Me(),kt(e,{children:(d,g)=>{var h=Wa(),b=T(h),x=T(b),y=D(b,2);j(y,()=>o,k=>{var p=za(),P=L(p),C=T(P);j(C,()=>l==null?void 0:l.periodDuration,R=>{var $=at();F(()=>de($,`${Da(l.periodDuration)??""} free trial`)),_(R,$)});var V=D(C,2);j(V,()=>!(l!=null&&l.periodDuration)&&c,R=>{var $=at();F(()=>de($,c.formattedPrice)),_(R,$)});var A=D(P,2);j(A,()=>l&&c,R=>{var $=Ga(),Ae=T($);F(()=>de(Ae,l&&c&&`${c.formattedPrice} after end of trial`)),_(R,$)});var z=D(A,2);j(z,()=>{var R;return((R=i())==null?void 0:R.show_product_description)&&r().description},R=>{var $=$a(),Ae=T($);F(()=>de(Ae,r().description)),_(R,$)});var X=D(z,2),Ie=T(X);j(Ie,()=>r().normalPeriodDuration,R=>{var $=Ya(),Ae=T($);F(()=>de(Ae,`Renews ${Ma(r().normalPeriodDuration)??""}`)),_(R,$)}),_(k,p)});var w=D(y,2);j(w,()=>!o,k=>{var p=Qa(),P=L(p),C=T(P),V=D(P,2);j(V,()=>{var A;return(A=i())==null?void 0:A.show_product_description},A=>{var z=Ka(),X=T(z);F(()=>de(X,r().description)),_(A,z)}),F(()=>de(C,u==null?void 0:u.formattedPrice)),_(k,p)}),F(()=>de(x,r().title)),_(d,h)},$$slots:{default:!0}}),Z()}const Xa='<svg width="80" height="80" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg" transform="rotate(0 0 0)"><path d="M12 3.5C7.30558 3.5 3.5 7.30558 3.5 12C3.5 16.6944 7.30558 20.5 12 20.5C16.6944 20.5 20.5 16.6944 20.5 12C20.5 11.5858 20.8358 11.25 21.25 11.25C21.6642 11.25 22 11.5858 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C12.4142 2 12.75 2.33579 12.75 2.75C12.75 3.16421 12.4142 3.5 12 3.5Z" fill="currentColor"/></svg>';var Ja=I('<div style="color:var(--rc-color-accent);" class="rcb-ui-asset-icon svelte-16h2a8k"><!></div>');const es={hash:"svelte-16h2a8k",code:`
5
- @-webkit-keyframes svelte-16h2a8k-rotating /* Safari and Chrome */ {
6
- from {
7
- -webkit-transform: rotate(0deg);
8
- -o-transform: rotate(0deg);
9
- transform: rotate(0deg);
10
- }
11
- to {
12
- -webkit-transform: rotate(360deg);
13
- -o-transform: rotate(360deg);
14
- transform: rotate(360deg);
15
- }
3
+ @media screen and (max-width: 960px) {.rcb-pricing-info.svelte-1cj3ch9 {margin-top:48px;}
4
+ }`};function Ka(e,r){var y;ne(r,!1),H(e,ol);let t=g(r,"productDetails",8),n=g(r,"purchaseOption",8),a=g(r,"brandingAppearance",8,void 0);const o=t().productType===Je.Subscription,s=n(),i=n(),l=s==null?void 0:s.trial,u=(y=s==null?void 0:s.base)==null?void 0:y.price,c=i==null?void 0:i.basePrice,d=xr(Sr)||Ve.fallback(),_=u&&d.formatPrice(u.amountMicros,u.currency),f=l&&_,m=c&&d.formatPrice(c.amountMicros,c.currency);ze(),Lr(e,{children:(w,P)=>{var E=al(),I=q(E),b=q(I),v=re(()=>({productTitle:t().title}));ue(b,{get key(){return C.StatePresentOfferProductTitle},get variables(){return p(v)}});var T=N(I,2);{var k=D=>{var oe=rl(),_e=j(oe),we=q(_e);{var Y=L=>{var $=re(()=>({trialDuration:zi(l.periodDuration,d)}));ue(L,{get key(){return C.StatePresentOfferFreeTrialDuration},get variables(){return p($)}})};U(we,L=>{l!=null&&l.periodDuration&&L(Y)})}var M=N(we,2);{var se=L=>{ue(L,{get key(){return C.StatePresentOfferProductPrice},variables:{productPrice:_}})};U(M,L=>{!(l!=null&&l.periodDuration)&&u&&L(se)})}var Pe=N(_e,2);{var sr=L=>{var $=Xi(),de=q($);ue(de,{get key(){return C.StatePresentOfferPriceAfterFreeTrial},variables:{productPrice:f}}),h(L,$)};U(Pe,L=>{l&&u&&L(sr)})}var hr=N(Pe,2);{var Wt=L=>{var $=$i(),de=q($),Ie=re(()=>({productDescription:t().description}));ue(de,{get key(){return C.StatePresentOfferProductDescription},get variables(){return p(Ie)}}),h(L,$)};U(hr,L=>{var $;($=a())!=null&&$.show_product_description&&t().description&&L(Wt)})}var Ke=N(hr,2),qr=q(Ke);{var ir=L=>{var $=el(),de=q($),Ie=re(()=>({frequency:Bi(t().normalPeriodDuration,d)}));ue(de,{get key(){return C.StatePresentOfferRenewalFrequency},get variables(){return p(Ie)}}),h(L,$)};U(qr,L=>{t().normalPeriodDuration&&L(ir)})}var Xe=N(qr,2),yr=q(Xe);ue(yr,{get key(){return C.StatePresentOfferContinuesUntilCancelled}});var ke=N(Xe,2),gr=q(ke);ue(gr,{get key(){return C.StatePresentOfferCancelAnytime}}),h(D,oe)};U(T,D=>{o&&D(k)})}var O=N(T,2);{var G=D=>{var oe=nl(),_e=j(oe),we=q(_e);ue(we,{get key(){return C.StatePresentOfferProductPrice},variables:{productPrice:m}});var Y=N(_e,2);{var M=se=>{var Pe=tl(),sr=q(Pe),hr=re(()=>({productDescription:t().description}));ue(sr,{get key(){return C.StatePresentOfferProductDescription},get variables(){return p(hr)}}),h(se,Pe)};U(Y,se=>{var Pe;(Pe=a())!=null&&Pe.show_product_description&&se(M)})}h(D,oe)};U(O,D=>{o||D(G)})}h(w,E)},$$slots:{default:!0}}),ae()}const sl='<svg width="80" height="80" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg" transform="rotate(0 0 0)"><path d="M12 3.5C7.30558 3.5 3.5 7.30558 3.5 12C3.5 16.6944 7.30558 20.5 12 20.5C16.6944 20.5 20.5 16.6944 20.5 12C20.5 11.5858 20.8358 11.25 21.25 11.25C21.6642 11.25 22 11.5858 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C12.4142 2 12.75 2.33579 12.75 2.75C12.75 3.16421 12.4142 3.5 12 3.5Z" fill="currentColor"/></svg>';var il=x('<div style="color:var(--rc-color-accent);" class="rcb-ui-asset-icon svelte-1sxpw7o"><!></div>');const ll={hash:"svelte-1sxpw7o",code:`
5
+ @-webkit-keyframes svelte-1sxpw7o-rotating /* Safari and Chrome */ {
6
+ from {
7
+ -webkit-transform: rotate(0deg);
8
+ -o-transform: rotate(0deg);
9
+ transform: rotate(0deg);
16
10
  }
17
- @keyframes svelte-16h2a8k-rotating {
18
- from {
19
- -ms-transform: rotate(0deg);
20
- -moz-transform: rotate(0deg);
21
- -webkit-transform: rotate(0deg);
22
- -o-transform: rotate(0deg);
23
- transform: rotate(0deg);
24
- }
25
- to {
26
- -ms-transform: rotate(360deg);
27
- -moz-transform: rotate(360deg);
28
- -webkit-transform: rotate(360deg);
29
- -o-transform: rotate(360deg);
30
- transform: rotate(360deg);
31
- }
32
- }div.svelte-16h2a8k {width:80px;height:80px;
33
- -webkit-animation: svelte-16h2a8k-rotating 2s ease-in-out infinite;
34
- -moz-animation: svelte-16h2a8k-rotating 2s ease-in-out infinite;
35
- -ms-animation: svelte-16h2a8k-rotating 2s ease-in-out infinite;
36
- -o-animation: svelte-16h2a8k-rotating 2s ease-in-out infinite;
37
- animation: svelte-16h2a8k-rotating 2s ease-in-out infinite;}`};function ts(e){q(e,es);var t=Ja(),r=T(t);Pt(r,()=>Xa),_(e,t)}var rs=I('<div class="rcb-modal-loader svelte-l57ojl"><!></div>');const ns={hash:"svelte-l57ojl",code:".rcb-modal-loader.svelte-l57ojl {width:100%;flex-grow:1;min-height:100%;display:flex;justify-content:center;align-items:center;}"};function Wr(e){q(e,ns);var t=rs(),r=T(t);ts(r),_(e,t)}var ae=(e=>(e[e.UnknownError=0]="UnknownError",e[e.UserCancelledError=1]="UserCancelledError",e[e.StoreProblemError=2]="StoreProblemError",e[e.PurchaseNotAllowedError=3]="PurchaseNotAllowedError",e[e.PurchaseInvalidError=4]="PurchaseInvalidError",e[e.ProductNotAvailableForPurchaseError=5]="ProductNotAvailableForPurchaseError",e[e.ProductAlreadyPurchasedError=6]="ProductAlreadyPurchasedError",e[e.ReceiptAlreadyInUseError=7]="ReceiptAlreadyInUseError",e[e.InvalidReceiptError=8]="InvalidReceiptError",e[e.MissingReceiptFileError=9]="MissingReceiptFileError",e[e.NetworkError=10]="NetworkError",e[e.InvalidCredentialsError=11]="InvalidCredentialsError",e[e.UnexpectedBackendResponseError=12]="UnexpectedBackendResponseError",e[e.InvalidAppUserIdError=14]="InvalidAppUserIdError",e[e.OperationAlreadyInProgressError=15]="OperationAlreadyInProgressError",e[e.UnknownBackendError=16]="UnknownBackendError",e[e.InvalidAppleSubscriptionKeyError=17]="InvalidAppleSubscriptionKeyError",e[e.IneligibleError=18]="IneligibleError",e[e.InsufficientPermissionsError=19]="InsufficientPermissionsError",e[e.PaymentPendingError=20]="PaymentPendingError",e[e.InvalidSubscriberAttributesError=21]="InvalidSubscriberAttributesError",e[e.LogOutWithAnonymousUserError=22]="LogOutWithAnonymousUserError",e[e.ConfigurationError=23]="ConfigurationError",e[e.UnsupportedError=24]="UnsupportedError",e[e.EmptySubscriberAttributesError=25]="EmptySubscriberAttributesError",e[e.CustomerInfoError=28]="CustomerInfoError",e[e.SignatureVerificationError=36]="SignatureVerificationError",e[e.InvalidEmailError=38]="InvalidEmailError",e))(ae||{});class Wt{static getPublicMessage(t){switch(t){case 0:return"Unknown error.";case 1:return"Purchase was cancelled.";case 2:return"There was a problem with the store.";case 3:return"The device or user is not allowed to make the purchase.";case 4:return"One or more of the arguments provided are invalid.";case 5:return"The product is not available for purchase.";case 6:return"This product is already active for the user.";case 7:return"There is already another active subscriber using the same receipt.";case 8:return"The receipt is not valid.";case 9:return"The receipt is missing.";case 10:return"Error performing request. Please check your network connection and try again.";case 11:return"There was a credentials issue. Check the underlying error for more details.";case 12:return"Received unexpected response from the backend.";case 14:return"The app user id is not valid.";case 15:return"The operation is already in progress.";case 16:return"There was an unknown backend error.";case 17:return"Apple Subscription Key is invalid or not present. In order to provide subscription offers, you must first generate a subscription key. Please see https://docs.revenuecat.com/docs/ios-subscription-offers for more info.";case 18:return"The User is ineligible for that action.";case 19:return"App does not have sufficient permissions to make purchases.";case 20:return"The payment is pending.";case 21:return"One or more of the attributes sent could not be saved.";case 22:return"Called logOut but the current user is anonymous.";case 23:return"There is an issue with your configuration. Check the underlying error for more details.";case 24:return"There was a problem with the operation. Looks like we doesn't support that yet. Check the underlying error for more details.";case 25:return"A request for subscriber attributes returned none.";case 28:return"There was a problem related to the customer info.";case 36:return"Request failed signature verification. Please see https://rev.cat/trusted-entitlements for more info.";case 38:return"Email is not valid. Please provide a valid email address."}}static getErrorCodeForBackendErrorCode(t){switch(t){case 7101:case 7773:return 2;case 7102:return 7;case 7103:return 8;case 7107:case 7224:case 7225:return 11;case 7105:case 7106:case 7814:return 4;case 7772:return 6;case 7220:return 14;case 7229:return 2;case 7230:case 7e3:return 23;case 7231:return 2;case 7232:return 18;case 7263:case 7264:return 21;case 7104:case 7234:case 7226:case 7110:return 12;case 7662:return 24;case 7012:case 7834:return 38}}static convertCodeToBackendErrorCode(t){return t in ki?t:null}static convertPurchaseFlowErrorCodeToErrorCode(t){switch(t){case ge.ErrorSettingUpPurchase:return 2;case ge.ErrorChargingPayment:return 20;case ge.NetworkError:return 10;case ge.MissingEmailError:return 4;case ge.StripeError:return 2;case ge.UnknownError:return 0;case ge.AlreadyPurchasedError:return 6}}}var ki=(e=>(e[e.BackendInvalidPlatform=7e3]="BackendInvalidPlatform",e[e.BackendInvalidEmail=7012]="BackendInvalidEmail",e[e.BackendStoreProblem=7101]="BackendStoreProblem",e[e.BackendCannotTransferPurchase=7102]="BackendCannotTransferPurchase",e[e.BackendInvalidReceiptToken=7103]="BackendInvalidReceiptToken",e[e.BackendInvalidAppStoreSharedSecret=7104]="BackendInvalidAppStoreSharedSecret",e[e.BackendInvalidPaymentModeOrIntroPriceNotProvided=7105]="BackendInvalidPaymentModeOrIntroPriceNotProvided",e[e.BackendProductIdForGoogleReceiptNotProvided=7106]="BackendProductIdForGoogleReceiptNotProvided",e[e.BackendInvalidPlayStoreCredentials=7107]="BackendInvalidPlayStoreCredentials",e[e.BackendInternalServerError=7110]="BackendInternalServerError",e[e.BackendEmptyAppUserId=7220]="BackendEmptyAppUserId",e[e.BackendInvalidAuthToken=7224]="BackendInvalidAuthToken",e[e.BackendInvalidAPIKey=7225]="BackendInvalidAPIKey",e[e.BackendBadRequest=7226]="BackendBadRequest",e[e.BackendPlayStoreQuotaExceeded=7229]="BackendPlayStoreQuotaExceeded",e[e.BackendPlayStoreInvalidPackageName=7230]="BackendPlayStoreInvalidPackageName",e[e.BackendPlayStoreGenericError=7231]="BackendPlayStoreGenericError",e[e.BackendUserIneligibleForPromoOffer=7232]="BackendUserIneligibleForPromoOffer",e[e.BackendInvalidAppleSubscriptionKey=7234]="BackendInvalidAppleSubscriptionKey",e[e.BackendInvalidSubscriberAttributes=7263]="BackendInvalidSubscriberAttributes",e[e.BackendInvalidSubscriberAttributesBody=7264]="BackendInvalidSubscriberAttributesBody",e[e.BackendProductIDsMalformed=7662]="BackendProductIDsMalformed",e[e.BackendAlreadySubscribedError=7772]="BackendAlreadySubscribedError",e[e.BackendPaymentGatewayGenericError=7773]="BackendPaymentGatewayGenericError",e[e.BackendOfferNotFound=7814]="BackendOfferNotFound",e[e.BackendNoMXRecordsFound=7834]="BackendNoMXRecordsFound",e))(ki||{});class ne extends Error{constructor(r,n,i,o){super(n);B(this,"toString",()=>`PurchasesError(code: ${ae[this.errorCode]}, message: ${this.message})`);this.errorCode=r,this.underlyingErrorMessage=i,this.extra=o}static getForBackendError(r,n){const i=Wt.getErrorCodeForBackendErrorCode(r);return new ne(i,Wt.getPublicMessage(i),n,{backendErrorCode:r})}static getForPurchasesFlowError(r){return new ne(Wt.convertPurchaseFlowErrorCodeToErrorCode(r.errorCode),r.message,r.underlyingErrorMessage)}}class Ti extends Error{constructor(){super("Purchases must be configured before calling getInstance")}}var Zt=(e=>(e.Started="started",e.InProgress="in_progress",e.Succeeded="succeeded",e.Failed="failed",e))(Zt||{}),Tt=(e=>(e[e.SetupIntentCreationFailed=1]="SetupIntentCreationFailed",e[e.PaymentMethodCreationFailed=2]="PaymentMethodCreationFailed",e[e.PaymentChargeFailed=3]="PaymentChargeFailed",e[e.SetupIntentCompletionFailed=4]="SetupIntentCompletionFailed",e[e.AlreadyPurchased=5]="AlreadyPurchased",e))(Tt||{});function is(e){var t;return e.operation.redemption_info?{redeemUrl:((t=e.operation.redemption_info)==null?void 0:t.redeem_url)??null}:null}var ge=(e=>(e[e.ErrorSettingUpPurchase=0]="ErrorSettingUpPurchase",e[e.ErrorChargingPayment=1]="ErrorChargingPayment",e[e.UnknownError=2]="UnknownError",e[e.NetworkError=3]="NetworkError",e[e.StripeError=4]="StripeError",e[e.MissingEmailError=5]="MissingEmailError",e[e.AlreadyPurchasedError=6]="AlreadyPurchasedError",e))(ge||{});class te extends Error{constructor(t,r,n,i,o){super(r),this.errorCode=t,this.underlyingErrorMessage=n,this.purchasesErrorCode=i,this.extra=o}isRecoverable(){switch(this.errorCode){case 3:case 5:return!0;case 0:case 1:case 6:case 4:case 2:return!1}}getPublicErrorMessage(t){var n;const r=((n=this.extra)==null?void 0:n.backendErrorCode)??this.purchasesErrorCode??this.errorCode;switch(this.errorCode){case 2:return`An unknown error occurred. Error code: ${r}.`;case 0:return`Purchase not started due to an error. Error code: ${r}.`;case 1:return"Payment failed.";case 3:return"Network error. Please check your internet connection.";case 4:return this.message;case 5:return"Email is required to complete the purchase.";case 6:return(t==null?void 0:t.productType)===Te.Subscription?"You are already subscribed to this product.":"You have already purchased this product."}}static fromPurchasesError(t,r){let n;return t.errorCode===ae.ProductAlreadyPurchasedError?n=6:t.errorCode===ae.InvalidEmailError?n=5:t.errorCode===ae.NetworkError?n=3:n=r,new te(n,t.message,t.underlyingErrorMessage,t.errorCode,t.extra)}}class os{constructor(t,r=10){B(this,"operationSessionId",null);B(this,"backend");B(this,"maxNumberAttempts");B(this,"waitMSBetweenAttempts",1e3);this.backend=t,this.maxNumberAttempts=r}async startPurchase(t,r,n,i,o){try{const a=await this.backend.postPurchase(t,r,i,o,n);return this.operationSessionId=a.operation_session_id,a}catch(a){if(a instanceof ne)throw te.fromPurchasesError(a,0);{const s="Unknown error starting purchase: "+String(a);throw Y.errorLog(s),new te(2,s)}}}async pollCurrentPurchaseForCompletion(){const t=this.operationSessionId;if(!t)throw new te(0,"No purchase in progress");return new Promise((r,n)=>{const i=(o=1)=>{if(o>this.maxNumberAttempts){this.clearPurchaseInProgress(),n(new te(2,"Max attempts reached trying to get successful purchase status"));return}this.backend.getCheckoutStatus(t).then(a=>{switch(a.operation.status){case Zt.Started:case Zt.InProgress:setTimeout(()=>i(o+1),this.waitMSBetweenAttempts);break;case Zt.Succeeded:this.clearPurchaseInProgress(),r({redemptionInfo:is(a)});return;case Zt.Failed:this.clearPurchaseInProgress(),this.handlePaymentError(a.operation.error,n)}}).catch(a=>{const s=te.fromPurchasesError(a,3);n(s)})};i()})}clearPurchaseInProgress(){this.operationSessionId=null}handlePaymentError(t,r){if(t==null){r(new te(2,"Got an error status but error field is empty."));return}switch(t.code){case Tt.SetupIntentCreationFailed:r(new te(0,"Setup intent creation failed"));return;case Tt.PaymentMethodCreationFailed:r(new te(0,"Payment method creation failed"));return;case Tt.PaymentChargeFailed:r(new te(1,"Payment charge failed"));return;case Tt.SetupIntentCompletionFailed:r(new te(0,"Setup intent completion failed"));return;case Tt.AlreadyPurchased:r(new te(6,"Purchased was already completed"));return;default:r(new te(2,"Unknown error code received"));return}}}const as=`<svg width="96" height="96" viewBox="0 0 124 124" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
11
+ to {
12
+ -webkit-transform: rotate(360deg);
13
+ -o-transform: rotate(360deg);
14
+ transform: rotate(360deg);
15
+ }
16
+ }
17
+ @keyframes svelte-1sxpw7o-rotating {
18
+ from {
19
+ -ms-transform: rotate(0deg);
20
+ -moz-transform: rotate(0deg);
21
+ -webkit-transform: rotate(0deg);
22
+ -o-transform: rotate(0deg);
23
+ transform: rotate(0deg);
24
+ }
25
+ to {
26
+ -ms-transform: rotate(360deg);
27
+ -moz-transform: rotate(360deg);
28
+ -webkit-transform: rotate(360deg);
29
+ -o-transform: rotate(360deg);
30
+ transform: rotate(360deg);
31
+ }
32
+ }div.svelte-1sxpw7o {width:80px;height:80px;
33
+ -webkit-animation: svelte-1sxpw7o-rotating 2s ease-in-out infinite;
34
+ -moz-animation: svelte-1sxpw7o-rotating 2s ease-in-out infinite;
35
+ -ms-animation: svelte-1sxpw7o-rotating 2s ease-in-out infinite;
36
+ -o-animation: svelte-1sxpw7o-rotating 2s ease-in-out infinite;
37
+ animation: svelte-1sxpw7o-rotating 2s ease-in-out infinite;}`};function ul(e){H(e,ll);var r=il(),t=q(r);Ur(t,()=>sl),h(e,r)}var cl=x('<div class="rcb-modal-loader svelte-1mxx341"><!></div>');const _l={hash:"svelte-1mxx341",code:".rcb-modal-loader.svelte-1mxx341 {width:100%;flex-grow:1;min-height:100%;display:flex;justify-content:center;align-items:center;}"};function kn(e){H(e,_l);var r=cl(),t=q(r);ul(t),h(e,r)}var ge=(e=>(e[e.UnknownError=0]="UnknownError",e[e.UserCancelledError=1]="UserCancelledError",e[e.StoreProblemError=2]="StoreProblemError",e[e.PurchaseNotAllowedError=3]="PurchaseNotAllowedError",e[e.PurchaseInvalidError=4]="PurchaseInvalidError",e[e.ProductNotAvailableForPurchaseError=5]="ProductNotAvailableForPurchaseError",e[e.ProductAlreadyPurchasedError=6]="ProductAlreadyPurchasedError",e[e.ReceiptAlreadyInUseError=7]="ReceiptAlreadyInUseError",e[e.InvalidReceiptError=8]="InvalidReceiptError",e[e.MissingReceiptFileError=9]="MissingReceiptFileError",e[e.NetworkError=10]="NetworkError",e[e.InvalidCredentialsError=11]="InvalidCredentialsError",e[e.UnexpectedBackendResponseError=12]="UnexpectedBackendResponseError",e[e.InvalidAppUserIdError=14]="InvalidAppUserIdError",e[e.OperationAlreadyInProgressError=15]="OperationAlreadyInProgressError",e[e.UnknownBackendError=16]="UnknownBackendError",e[e.InvalidAppleSubscriptionKeyError=17]="InvalidAppleSubscriptionKeyError",e[e.IneligibleError=18]="IneligibleError",e[e.InsufficientPermissionsError=19]="InsufficientPermissionsError",e[e.PaymentPendingError=20]="PaymentPendingError",e[e.InvalidSubscriberAttributesError=21]="InvalidSubscriberAttributesError",e[e.LogOutWithAnonymousUserError=22]="LogOutWithAnonymousUserError",e[e.ConfigurationError=23]="ConfigurationError",e[e.UnsupportedError=24]="UnsupportedError",e[e.EmptySubscriberAttributesError=25]="EmptySubscriberAttributesError",e[e.CustomerInfoError=28]="CustomerInfoError",e[e.SignatureVerificationError=36]="SignatureVerificationError",e[e.InvalidEmailError=38]="InvalidEmailError",e))(ge||{});class pt{static getPublicMessage(r){switch(r){case 0:return"Unknown error.";case 1:return"Purchase was cancelled.";case 2:return"There was a problem with the store.";case 3:return"The device or user is not allowed to make the purchase.";case 4:return"One or more of the arguments provided are invalid.";case 5:return"The product is not available for purchase.";case 6:return"This product is already active for the user.";case 7:return"There is already another active subscriber using the same receipt.";case 8:return"The receipt is not valid.";case 9:return"The receipt is missing.";case 10:return"Error performing request. Please check your network connection and try again.";case 11:return"There was a credentials issue. Check the underlying error for more details.";case 12:return"Received unexpected response from the backend.";case 14:return"The app user id is not valid.";case 15:return"The operation is already in progress.";case 16:return"There was an unknown backend error.";case 17:return"Apple Subscription Key is invalid or not present. In order to provide subscription offers, you must first generate a subscription key. Please see https://docs.revenuecat.com/docs/ios-subscription-offers for more info.";case 18:return"The User is ineligible for that action.";case 19:return"App does not have sufficient permissions to make purchases.";case 20:return"The payment is pending.";case 21:return"One or more of the attributes sent could not be saved.";case 22:return"Called logOut but the current user is anonymous.";case 23:return"There is an issue with your configuration. Check the underlying error for more details.";case 24:return"There was a problem with the operation. Looks like we doesn't support that yet. Check the underlying error for more details.";case 25:return"A request for subscriber attributes returned none.";case 28:return"There was a problem related to the customer info.";case 36:return"Request failed signature verification. Please see https://rev.cat/trusted-entitlements for more info.";case 38:return"Email is not valid. Please provide a valid email address."}}static getErrorCodeForBackendErrorCode(r){switch(r){case 7101:case 7773:return 2;case 7102:return 7;case 7103:return 8;case 7107:case 7224:case 7225:return 11;case 7105:case 7106:case 7814:return 4;case 7772:return 6;case 7220:return 14;case 7229:return 2;case 7230:case 7e3:return 23;case 7231:return 2;case 7232:return 18;case 7263:case 7264:return 21;case 7104:case 7234:case 7226:case 7110:return 12;case 7662:return 24;case 7012:case 7834:return 38}}static convertCodeToBackendErrorCode(r){return r in Xa?r:null}static convertPurchaseFlowErrorCodeToErrorCode(r){switch(r){case ce.ErrorSettingUpPurchase:return 2;case ce.ErrorChargingPayment:return 20;case ce.NetworkError:return 10;case ce.MissingEmailError:return 4;case ce.UnknownError:return 0;case ce.AlreadyPurchasedError:return 6}}}var Xa=(e=>(e[e.BackendInvalidPlatform=7e3]="BackendInvalidPlatform",e[e.BackendInvalidEmail=7012]="BackendInvalidEmail",e[e.BackendStoreProblem=7101]="BackendStoreProblem",e[e.BackendCannotTransferPurchase=7102]="BackendCannotTransferPurchase",e[e.BackendInvalidReceiptToken=7103]="BackendInvalidReceiptToken",e[e.BackendInvalidAppStoreSharedSecret=7104]="BackendInvalidAppStoreSharedSecret",e[e.BackendInvalidPaymentModeOrIntroPriceNotProvided=7105]="BackendInvalidPaymentModeOrIntroPriceNotProvided",e[e.BackendProductIdForGoogleReceiptNotProvided=7106]="BackendProductIdForGoogleReceiptNotProvided",e[e.BackendInvalidPlayStoreCredentials=7107]="BackendInvalidPlayStoreCredentials",e[e.BackendInternalServerError=7110]="BackendInternalServerError",e[e.BackendEmptyAppUserId=7220]="BackendEmptyAppUserId",e[e.BackendInvalidAuthToken=7224]="BackendInvalidAuthToken",e[e.BackendInvalidAPIKey=7225]="BackendInvalidAPIKey",e[e.BackendBadRequest=7226]="BackendBadRequest",e[e.BackendPlayStoreQuotaExceeded=7229]="BackendPlayStoreQuotaExceeded",e[e.BackendPlayStoreInvalidPackageName=7230]="BackendPlayStoreInvalidPackageName",e[e.BackendPlayStoreGenericError=7231]="BackendPlayStoreGenericError",e[e.BackendUserIneligibleForPromoOffer=7232]="BackendUserIneligibleForPromoOffer",e[e.BackendInvalidAppleSubscriptionKey=7234]="BackendInvalidAppleSubscriptionKey",e[e.BackendInvalidSubscriberAttributes=7263]="BackendInvalidSubscriberAttributes",e[e.BackendInvalidSubscriberAttributesBody=7264]="BackendInvalidSubscriberAttributesBody",e[e.BackendProductIDsMalformed=7662]="BackendProductIDsMalformed",e[e.BackendAlreadySubscribedError=7772]="BackendAlreadySubscribedError",e[e.BackendPaymentGatewayGenericError=7773]="BackendPaymentGatewayGenericError",e[e.BackendOfferNotFound=7814]="BackendOfferNotFound",e[e.BackendNoMXRecordsFound=7834]="BackendNoMXRecordsFound",e))(Xa||{});class fe extends Error{constructor(t,n,a,o){super(n);V(this,"toString",()=>`PurchasesError(code: ${ge[this.errorCode]}, message: ${this.message})`);this.errorCode=t,this.underlyingErrorMessage=a,this.extra=o}static getForBackendError(t,n){const a=pt.getErrorCodeForBackendErrorCode(t);return new fe(a,pt.getPublicMessage(a),n,{backendErrorCode:t})}static getForPurchasesFlowError(t){return new fe(pt.convertPurchaseFlowErrorCodeToErrorCode(t.errorCode),t.message,t.underlyingErrorMessage)}}class $a extends Error{constructor(){super("Purchases must be configured before calling getInstance")}}var ft=(e=>(e.Started="started",e.InProgress="in_progress",e.Succeeded="succeeded",e.Failed="failed",e))(ft||{}),zr=(e=>(e[e.SetupIntentCreationFailed=1]="SetupIntentCreationFailed",e[e.PaymentMethodCreationFailed=2]="PaymentMethodCreationFailed",e[e.PaymentChargeFailed=3]="PaymentChargeFailed",e[e.SetupIntentCompletionFailed=4]="SetupIntentCompletionFailed",e[e.AlreadyPurchased=5]="AlreadyPurchased",e))(zr||{});function dl(e){var r;return e.operation.redemption_info?{redeemUrl:((r=e.operation.redemption_info)==null?void 0:r.redeem_url)??null}:null}var ce=(e=>(e[e.ErrorSettingUpPurchase=0]="ErrorSettingUpPurchase",e[e.ErrorChargingPayment=1]="ErrorChargingPayment",e[e.UnknownError=2]="UnknownError",e[e.NetworkError=3]="NetworkError",e[e.MissingEmailError=4]="MissingEmailError",e[e.AlreadyPurchasedError=5]="AlreadyPurchasedError",e))(ce||{});class me extends Error{constructor(r,t,n,a,o){super(t),this.errorCode=r,this.underlyingErrorMessage=n,this.purchasesErrorCode=a,this.extra=o}isRecoverable(){switch(this.errorCode){case 3:case 4:return!0;case 0:case 1:case 5:case 2:return!1}}getErrorCode(){var r;return((r=this.extra)==null?void 0:r.backendErrorCode)??this.purchasesErrorCode??this.errorCode}getPublicErrorMessage(r){var n;const t=((n=this.extra)==null?void 0:n.backendErrorCode)??this.purchasesErrorCode??this.errorCode;switch(this.errorCode){case 2:return`An unknown error occurred. Error code: ${t}.`;case 0:return`Purchase not started due to an error. Error code: ${t}.`;case 1:return"Payment failed.";case 3:return"Network error. Please check your internet connection.";case 4:return"Email is required to complete the purchase.";case 5:return(r==null?void 0:r.productType)===Je.Subscription?"You are already subscribed to this product.":"You have already purchased this product."}}static fromPurchasesError(r,t){let n;return r.errorCode===ge.ProductAlreadyPurchasedError?n=5:r.errorCode===ge.InvalidEmailError?n=4:r.errorCode===ge.NetworkError?n=3:n=t,new me(n,r.message,r.underlyingErrorMessage,r.errorCode,r.extra)}}class pl{constructor(r,t=10){V(this,"operationSessionId",null);V(this,"backend");V(this,"maxNumberAttempts");V(this,"waitMSBetweenAttempts",1e3);this.backend=r,this.maxNumberAttempts=t}async startPurchase(r,t,n,a,o){try{const s=await this.backend.postPurchase(r,t,a,o,n);return this.operationSessionId=s.operation_session_id,s}catch(s){if(s instanceof fe)throw me.fromPurchasesError(s,0);{const i="Unknown error starting purchase: "+String(s);throw X.errorLog(i),new me(2,i)}}}async pollCurrentPurchaseForCompletion(){const r=this.operationSessionId;if(!r)throw new me(0,"No purchase in progress");return new Promise((t,n)=>{const a=(o=1)=>{if(o>this.maxNumberAttempts){this.clearPurchaseInProgress(),n(new me(2,"Max attempts reached trying to get successful purchase status"));return}this.backend.getCheckoutStatus(r).then(s=>{switch(s.operation.status){case ft.Started:case ft.InProgress:setTimeout(()=>a(o+1),this.waitMSBetweenAttempts);break;case ft.Succeeded:this.clearPurchaseInProgress(),t({redemptionInfo:dl(s)});return;case ft.Failed:this.clearPurchaseInProgress(),this.handlePaymentError(s.operation.error,n)}}).catch(s=>{const i=me.fromPurchasesError(s,3);n(i)})};a()})}clearPurchaseInProgress(){this.operationSessionId=null}handlePaymentError(r,t){if(r==null){t(new me(2,"Got an error status but error field is empty."));return}switch(r.code){case zr.SetupIntentCreationFailed:t(new me(0,"Setup intent creation failed"));return;case zr.PaymentMethodCreationFailed:t(new me(0,"Payment method creation failed"));return;case zr.PaymentChargeFailed:t(new me(1,"Payment charge failed"));return;case zr.SetupIntentCompletionFailed:t(new me(0,"Setup intent completion failed"));return;case zr.AlreadyPurchased:t(new me(5,"Purchased was already completed"));return;default:t(new me(2,"Unknown error code received"));return}}}const fl=`<svg width="96" height="96" viewBox="0 0 124 124" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
38
38
  <circle cx="62" cy="62" r="62" fill="currentColor"/>
39
39
  <path d="M87.6668 41.504L82.4968 36.334L62.0002 56.8307L41.5035 36.334L36.3335 41.504L56.8302 62.0006L36.3335 82.4973L41.5035 87.6673L62.0002 67.1706L82.4968 87.6673L87.6668 82.4973L67.1702 62.0006L87.6668 41.504Z"
40
40
  fill="white"/>
41
41
  </svg>
42
- `;var ss=I('<div style="color:var(--rc-color-error);" class="rcb-ui-asset-icon svelte-7wiquz"><!></div>');const ls={hash:"svelte-7wiquz",code:".rcb-ui-asset-icon.svelte-7wiquz {width:96px;height:96px;margin:0 auto;}"};function cs(e){q(e,ls);var t=ss(),r=T(t);Pt(r,()=>as),_(e,t)}var us=I("<button><!></button>");const fs={hash:"svelte-2xwwo",code:`button.svelte-2xwwo {border:none;border-radius:var(--rc-shape-input-button-border-radius);font-size:16px;cursor:pointer;height:56px;color:var(--rc-color-grey-text-dark);background-color:var(--rc-color-grey-ui-dark);display:flex;align-items:center;justify-content:center;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent;}button.svelte-2xwwo:focus,
43
- button.svelte-2xwwo:active {outline:2px solid var(--rc-color-focus);}button.intent-primary.svelte-2xwwo {background-color:var(--rc-color-primary);color:var(--rc-color-primary-text);font-size:16px;}button.svelte-2xwwo:disabled {color:var(--rc-color-grey-text-light);background-color:var(--rc-color-grey-ui-dark);}button.intent-primary.svelte-2xwwo:disabled {color:var(--rc-color-grey-text-light);background-color:var(--rc-color-grey-ui-dark);}`};function Zr(e,t){q(e,fs);let r=m(t,"intent",8,"primary"),n=m(t,"disabled",8,!1),i=m(t,"testId",8,void 0),o=m(t,"type",8,void 0);var a=us(),s=T(a);re(s,t,"default",{}),F(()=>{zr(a,`${`intent-${r()}`??""} svelte-2xwwo`),a.disabled=n(),Q(a,"data-testid",i()),Q(a,"type",o())}),hr("click",a,function(l){pi.call(this,t,l)}),_(e,a)}var ds=I('<footer class="rcb-modal-footer svelte-1f9z0o8"><!></footer>');const vs={hash:"svelte-1f9z0o8",code:"footer.svelte-1f9z0o8 {display:flex;flex-direction:column;}"};function Xr(e,t){q(e,vs);var r=ds(),n=T(r);re(n,t,"default",{}),_(e,r)}var gs=I('<div class="column svelte-6o8e90"><!></div>');const hs={hash:"svelte-6o8e90",code:'.column.svelte-6o8e90 {display:flex;flex-direction:column;justify-content:flex-start;gap:var(--gap, "8px");flex-grow:1;}'};function Xt(e,t){q(e,hs);let r=m(t,"gutter",8,"8px");var n=gs(),i=T(n);re(i,t,"default",{}),F(()=>Q(n,"style",`--gap:${r()};`)),_(e,n)}const _s=`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
42
+ `;var ml=x('<div style="color:var(--rc-color-error);" class="rcb-ui-asset-icon svelte-1yeecu3"><!></div>');const hl={hash:"svelte-1yeecu3",code:".rcb-ui-asset-icon.svelte-1yeecu3 {width:96px;height:96px;margin:0 auto;}"};function eo(e){H(e,hl);var r=ml(),t=q(r);Ur(t,()=>fl),h(e,r)}var yl=x("<button><!></button>");const gl={hash:"svelte-1mac4qb",code:`button.svelte-1mac4qb {border:none;border-radius:var(--rc-shape-input-button-border-radius);font-size:16px;cursor:pointer;height:56px;color:var(--rc-color-grey-text-dark);background-color:var(--rc-color-grey-ui-dark);display:flex;align-items:center;justify-content:center;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent;}button.svelte-1mac4qb:focus,
43
+ button.svelte-1mac4qb:active {outline:2px solid var(--rc-color-focus);}button.intent-primary.svelte-1mac4qb {background-color:var(--rc-color-primary);color:var(--rc-color-primary-text);font-size:16px;}button.svelte-1mac4qb:disabled {color:var(--rc-color-grey-text-light);background-color:var(--rc-color-grey-ui-dark);outline:none;}button.intent-primary.svelte-1mac4qb:disabled {color:var(--rc-color-grey-text-light);background-color:var(--rc-color-grey-ui-dark);}`};function En(e,r){H(e,gl);let t=g(r,"intent",8,"primary"),n=g(r,"disabled",8,!1),a=g(r,"testId",8,void 0),o=g(r,"type",8,void 0);var s=yl(),i=q(s);pe(i,r,"default",{}),Z(()=>{gn(s,`${`intent-${t()}`??""} svelte-1mac4qb`),s.disabled=n(),K(s,"data-testid",a()),K(s,"type",o())}),Mt("click",s,function(l){za.call(this,r,l)}),h(e,s)}var vl=x('<footer class="rcb-modal-footer svelte-1f9z0o8"><!></footer>');const bl={hash:"svelte-1f9z0o8",code:"footer.svelte-1f9z0o8 {display:flex;flex-direction:column;}"};function xn(e,r){H(e,bl);var t=vl(),n=q(t);pe(n,r,"default",{}),h(e,t)}var wl=x('<div class="column svelte-6o8e90"><!></div>');const Pl={hash:"svelte-6o8e90",code:'.column.svelte-6o8e90 {display:flex;flex-direction:column;justify-content:flex-start;gap:var(--gap, "8px");flex-grow:1;}'};function mt(e,r){H(e,Pl);let t=g(r,"gutter",8,"8px");var n=wl(),a=q(n);pe(a,r,"default",{}),Z(()=>K(n,"style",`--gap:${t()};`)),h(e,n)}const kl=`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
44
44
  <g id="mdi_close">
45
45
  <path id="Vector" d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"
46
46
  fill="currentColor"/>
47
47
  </g>
48
48
  </svg>
49
- `;var ps=I('<button class="close-button svelte-1y0elb4"><div><!></div></button>');const bs={hash:"svelte-1y0elb4",code:".close-button.svelte-1y0elb4 {border:none;cursor:pointer;background-color:transparent;padding:0px;height:24px;border-radius:50%;color:var(--rc-color-grey-text-light);}.close-button.svelte-1y0elb4:focus {outline:2px solid var(--rc-color-focus);}.close-button.svelte-1y0elb4:hover {color:var(--rc-color-grey-text-dark);}"};function Jr(e,t){q(e,bs);let r=m(t,"disabled",8,!1);var n=ps(),i=T(n),o=T(i);Pt(o,()=>_s),F(()=>n.disabled=r()),hr("click",n,function(a){pi.call(this,t,a)}),_(e,n)}var ms=I('<picture class="rcb-app-icon-picture-container svelte-44qpq9"><source type="image/webp"> <img class="rcb-app-icon svelte-44qpq9" alt="App icon"></picture>'),ys=I('<div class="rcb-app-icon loading svelte-44qpq9"></div>');const ws={hash:"svelte-44qpq9",code:".rcb-app-icon.svelte-44qpq9 {width:40px;height:40px;border-radius:12px;box-shadow:0px 1px 10px 0px rgba(0, 0, 0, 0.1);margin-right:16px;}.rcb-app-icon-picture-container.svelte-44qpq9 {height:40px;}.rcb-app-icon.loading.svelte-44qpq9 {background-color:gray;}"};function Ai(e,t){q(e,ws);let r=m(t,"src",8,null),n=m(t,"srcWebp",8,null);var i=oe(),o=L(i);j(o,()=>r()!==null,a=>{var s=ms(),l=T(s),c=D(l,2);F(()=>{Q(l,"srcset",n()),Q(c,"src",r())}),_(a,s)},a=>{var s=ys();_(a,s)}),_(e,i)}const Oi=e=>`https://da08ctfrofx1b.cloudfront.net/${e}`;var Es=I('<!> <span class="app-title svelte-10uf5fq"> </span>',1),xs=I('<div class="rcb-header-layout__business-info svelte-10uf5fq"><!></div>');const Is={hash:"svelte-10uf5fq",code:".app-title.svelte-10uf5fq {font-weight:500;margin:8px 0;font-size:16px;}.rcb-header-layout__business-info.svelte-10uf5fq {display:flex;align-items:center;}"};function Ni(e,t){W(t,!1),q(e,Is);let r=m(t,"brandingInfo",8,null);Me();var n=xs(),i=T(n);j(i,()=>r()!==null,o=>{var a=Es(),s=L(a);j(s,()=>r().app_icon_webp!==null&&r().app_icon!==null,u=>{var f=fe(()=>Oi(r().app_icon)),d=fe(()=>Oi(r().app_icon_webp));Ai(u,{get src(){return v(f)},get srcWebp(){return v(d)}})});var l=D(s,2),c=T(l);F(()=>de(c,r().seller_company_name)),_(o,a)},o=>{Ai(o,{})}),_(e,n),Z()}var Ps=I('<div class="rcb-post-purchase-header-layout svelte-17puakv"><!> <!></div>');const ks={hash:"svelte-17puakv",code:".rcb-post-purchase-header-layout.svelte-17puakv {display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:-4px;}"};function Ts(e,t){q(e,ks);let r=m(t,"brandingInfo",8,null),n=m(t,"onClose",8);kt(e,{as:"header",children:(i,o)=>{var a=Ps(),s=T(a);Ni(s,{get brandingInfo(){return r()}});var l=D(s,2);Jr(l,{$$events:{click(...c){var u;(u=n())==null||u.apply(this,c)}}}),_(i,a)},$$slots:{default:!0}})}var As=I('<span class="title svelte-idou50"> </span> <span class="subtitle svelte-idou50"><!></span>',1),Os=I("<!> <!>",1),Ns=I('<div class="rcb-modal-message svelte-idou50"><!></div>'),Ss=I("<!> <!> <!>",1);const Rs={hash:"svelte-idou50",code:".rcb-modal-message.svelte-idou50 {width:100%;min-height:160px;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;margin-bottom:16px;margin-top:16px;}.title.svelte-idou50 {font-size:24px;line-height:1.25em;}.subtitle.svelte-idou50 {font-size:16px;line-height:1.25em;overflow-wrap:anywhere;}"};function Si(e,t){q(e,Rs);let r=m(t,"brandingInfo",8,null),n=m(t,"onContinue",8),i=m(t,"title",8),o=m(t,"type",8),a=m(t,"closeButtonTitle",8,"Go back to app");Xt(e,{gutter:"32px",children:(s,l)=>{var c=Ss(),u=L(c);Ts(u,{get brandingInfo(){return r()},get onClose(){return n()}});var f=D(u,2);kt(f,{children:(g,h)=>{var b=Ns(),x=T(b);Xt(x,{gutter:"48px",children:(y,w)=>{var k=Os(),p=L(k);re(p,t,"icon",{});var P=D(p,2);Xt(P,{gutter:"16px",children:(C,V)=>{var A=As(),z=L(A),X=T(z),Ie=D(z,2),R=T(Ie);re(R,t,"default",{}),F(()=>de(X,i())),_(C,A)},$$slots:{default:!0}}),_(y,k)},$$slots:{default:!0}}),F(()=>Q(b,"data-type",o())),_(g,b)},$$slots:{default:!0}});var d=D(f,2);Xr(d,{children:(g,h)=>{Zr(g,{type:"submit",$$events:{click(...b){var x;(x=n())==null||x.apply(this,b)}},children:(b,x)=>{var y=at();F(()=>de(y,a())),_(b,y)},$$slots:{default:!0}})},$$slots:{default:!0}}),_(s,c)},$$slots:{default:!0}})}var Ms=I("<br>If this error persists, please contact <a> </a>.",1),Ds=I(" <!>",1);function Us(e,t){W(t,!1);let r=m(t,"brandingInfo",8,null),n=m(t,"lastError",8),i=m(t,"supportEmail",8,null),o=m(t,"productDetails",8,null),a=m(t,"onContinue",8);pr(()=>{Y.errorLog(`Displayed error: ${ge[n().errorCode]}. Message: ${n().message??"None"}. Underlying error: ${n().underlyingErrorMessage??"None"}`)});function s(){var c;switch(n().errorCode){case ge.AlreadyPurchasedError:return((c=o())==null?void 0:c.productType)===Te.Subscription?"Already subscribed":"Already purchased";default:return"Something went wrong"}}Me();var l=fe(s);Si(e,{get title(){return v(l)},get brandingInfo(){return r()},get onContinue(){return a()},type:"error",closeButtonTitle:"Try Again",children:(c,u)=>{var f=Ds(),d=L(f);F(()=>de(d,`${n().getPublicErrorMessage(o())??""} `));var g=D(d);j(g,i,h=>{var b=Ms(),x=D(L(b),2),y=T(x);F(()=>{Q(x,"href",`mailto:${i()??""}`),de(y,i())}),_(h,b)}),_(c,f)},$$slots:{default:!0,icon:(c,u)=>{cs(c)}}}),Z()}const Ls=`<svg width="96" height="96" viewBox="0 0 124 124" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
49
+ `;var El=x('<button class="close-button svelte-1y0elb4"><div><!></div></button>');const xl={hash:"svelte-1y0elb4",code:".close-button.svelte-1y0elb4 {border:none;cursor:pointer;background-color:transparent;padding:0px;height:24px;border-radius:50%;color:var(--rc-color-grey-text-light);}.close-button.svelte-1y0elb4:focus {outline:2px solid var(--rc-color-focus);}.close-button.svelte-1y0elb4:hover {color:var(--rc-color-grey-text-dark);}"};function Sn(e,r){H(e,xl);let t=g(r,"disabled",8,!1);var n=El(),a=q(n),o=q(a);Ur(o,()=>kl),Z(()=>n.disabled=t()),Mt("click",n,function(s){za.call(this,r,s)}),h(e,n)}var Sl=x('<picture class="rcb-app-icon-picture-container svelte-44qpq9"><source type="image/webp"> <img class="rcb-app-icon svelte-44qpq9" alt="App icon"></picture>'),Il=x('<div class="rcb-app-icon loading svelte-44qpq9"></div>');const ql={hash:"svelte-44qpq9",code:".rcb-app-icon.svelte-44qpq9 {width:40px;height:40px;border-radius:12px;box-shadow:0px 1px 10px 0px rgba(0, 0, 0, 0.1);margin-right:16px;}.rcb-app-icon-picture-container.svelte-44qpq9 {height:40px;}.rcb-app-icon.loading.svelte-44qpq9 {background-color:gray;}"};function ro(e,r){H(e,ql);let t=g(r,"src",8,null),n=g(r,"srcWebp",8,null);var a=ie(),o=j(a);{var s=l=>{var u=Sl(),c=q(u),d=N(c,2);Z(()=>{K(c,"srcset",n()),K(d,"src",t())}),h(l,u)},i=l=>{var u=Il();h(l,u)};U(o,l=>{t()!==null?l(s):l(i,!1)})}h(e,a)}const to=e=>`https://da08ctfrofx1b.cloudfront.net/${e}`;var Tl=x('<!> <span class="app-title svelte-10uf5fq"><!></span>',1),Fl=x('<div class="rcb-header-layout__business-info svelte-10uf5fq"><!></div>');const Al={hash:"svelte-10uf5fq",code:".app-title.svelte-10uf5fq {font-weight:500;margin:8px 0;font-size:16px;}.rcb-header-layout__business-info.svelte-10uf5fq {display:flex;align-items:center;}"};function no(e,r){ne(r,!1),H(e,Al);let t=g(r,"brandingInfo",8,null);ze();var n=Fl(),a=q(n);{var o=i=>{var l=Tl(),u=j(l);{var c=f=>{var m=re(()=>to(t().app_icon)),y=re(()=>to(t().app_icon_webp));ro(f,{get src(){return p(m)},get srcWebp(){return p(y)}})};U(u,f=>{t().app_icon_webp!==null&&t().app_icon!==null&&f(c)})}var d=N(u,2),_=q(d);ue(_,{children:(f,m)=>{var y=_t();Z(()=>ar(y,t().app_name)),h(f,y)},$$slots:{default:!0}}),h(i,l)},s=i=>{ro(i,{})};U(a,i=>{t()!==null?i(o):i(s,!1)})}h(e,n),ae()}var Ol=x('<div class="rcb-post-purchase-header-layout svelte-17puakv"><!> <!></div>');const Dl={hash:"svelte-17puakv",code:".rcb-post-purchase-header-layout.svelte-17puakv {display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:-4px;}"};function Ml(e,r){H(e,Dl);let t=g(r,"brandingInfo",8,null),n=g(r,"onClose",8);Lr(e,{as:"header",children:(a,o)=>{var s=Ol(),i=q(s);no(i,{get brandingInfo(){return t()}});var l=N(i,2);Sn(l,{$$events:{click(...u){var c;(c=n())==null||c.apply(this,u)}}}),h(a,s)},$$slots:{default:!0}})}var Nl=x('<span class="title svelte-6irwts"> </span>'),Cl=x('<!> <span class="subtitle svelte-6irwts"><!></span>',1),jl=x("<!> <!>",1),Rl=x('<div class="rcb-modal-message svelte-6irwts"><!></div>'),Ul=x("<!> <!> <!>",1);const Ll={hash:"svelte-6irwts",code:'.rcb-modal-message.svelte-6irwts {width:100%;min-height:160px;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;margin-bottom:16px;margin-top:16px;}.rcb-modal-message[data-has-title="false"].svelte-6irwts {margin-top:80px;}.title.svelte-6irwts {font-size:24px;line-height:1.25em;}.subtitle.svelte-6irwts {font-size:16px;line-height:1.25em;overflow-wrap:anywhere;}'};function In(e,r){H(e,Ll);let t=g(r,"brandingInfo",8,null),n=g(r,"onContinue",8),a=g(r,"title",8,null),o=g(r,"type",8),s=g(r,"closeButtonTitle",8,"Go back to app");mt(e,{gutter:"32px",children:(i,l)=>{var u=Ul(),c=j(u);{var d=m=>{Ml(m,{get brandingInfo(){return t()},get onClose(){return n()}})};U(c,m=>{a()&&m(d)})}var _=N(c,2);Lr(_,{children:(m,y)=>{var w=Rl(),P=q(w);mt(P,{gutter:"48px",children:(E,I)=>{var b=jl(),v=j(b);pe(v,r,"icon",{});var T=N(v,2);mt(T,{gutter:"16px",children:(k,O)=>{var G=Cl(),D=j(G);{var oe=Y=>{var M=Nl(),se=q(M);Z(()=>ar(se,a())),h(Y,M)};U(D,Y=>{a()&&Y(oe)})}var _e=N(D,2),we=q(_e);pe(we,r,"default",{}),h(k,G)},$$slots:{default:!0}}),h(E,b)},$$slots:{default:!0}}),Z(()=>{K(w,"data-type",o()),K(w,"data-has-title",!!a())}),h(m,w)},$$slots:{default:!0}});var f=N(_,2);xn(f,{children:(m,y)=>{En(m,{type:"submit",$$events:{click(...w){var P;(P=n())==null||P.apply(this,w)}},children:(w,P)=>{var E=_t();Z(()=>ar(E,s())),h(w,E)},$$slots:{default:!0}})},$$slots:{default:!0}}),h(i,u)},$$slots:{default:!0}})}var Bl=x("<br> <!> <a> </a>.",1),zl=x(" <!>",1);function Vl(e,r){ne(r,!1);let t=g(r,"brandingInfo",8,null),n=g(r,"lastError",8),a=g(r,"supportEmail",8,null),o=g(r,"productDetails",8,null),s=g(r,"onContinue",8);const i=xr(Sr)||Ve.fallback();Ct(()=>{X.errorLog(`Displayed error: ${ce[n().errorCode]}. Message: ${n().message??"None"}. Underlying error: ${n().underlyingErrorMessage??"None"}`)});function l(){var _;switch(n().errorCode){case ce.AlreadyPurchasedError:return((_=o())==null?void 0:_.productType)===Je.Subscription?i.translate(C.StateErrorErrorTitleAlreadySubscribed):i.translate(C.StateErrorErrorTitleAlreadyPurchased);default:return i.translate(C.StateErrorErrorTitleOtherErrors)}}function u(){var f;const _=n().getErrorCode();switch(n().errorCode){case ce.UnknownError:return i.translate(C.StateErrorErrorMessageUnknownError,{errorCode:_});case ce.ErrorSettingUpPurchase:return i.translate(C.StateErrorErrorMessageErrorSettingUpPurchase,{errorCode:_});case ce.ErrorChargingPayment:return i.translate(C.StateErrorErrorMessageErrorChargingPayment,{errorCode:_});case ce.NetworkError:return i.translate(C.StateErrorErrorMessageNetworkError,{errorCode:_});case ce.MissingEmailError:return i.translate(C.StateErrorErrorMessageMissingEmailError,{errorCode:_});case ce.AlreadyPurchasedError:return((f=o())==null?void 0:f.productType)===Je.Subscription?i.translate(C.StateErrorErrorMessageAlreadySubscribed,{errorCode:_}):i.translate(C.StateErrorErrorMessageAlreadyPurchased,{errorCode:_})}}ze();var c=re(l),d=re(()=>i.translate(C.StateErrorButtonTryAgain));In(e,{get title(){return p(c)},get brandingInfo(){return t()},get onContinue(){return s()},type:"error",get closeButtonTitle(){return p(d)},children:(_,f)=>{var m=zl(),y=j(m);Z(()=>ar(y,`${u()??""} `));var w=N(y);{var P=E=>{var I=Bl(),b=N(j(I),2);ue(b,{get key(){return C.StateErrorIfErrorPersists}});var v=N(b,2),T=q(v);Z(()=>{K(v,"href",`mailto:${a()??""}`),ar(T,a())}),h(E,I)};U(w,E=>{a()&&E(P)})}h(_,m)},$$slots:{default:!0,icon:(_,f)=>{eo(_)}}}),ae()}const Hl=`<svg width="96" height="96" viewBox="0 0 124 124" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
50
50
  <circle cx="62" cy="62" r="62" fill="currentColor"/>
51
51
  <rect x="44.1116" y="56" width="27.5" height="11" transform="rotate(45 44.1116 56)" fill="white"/>
52
52
  <rect x="79.1133" y="44.334" width="11" height="44" transform="rotate(45 79.1133 44.334)" fill="white"/>
53
53
  </svg>
54
- `;var Cs=I('<div style="color:var(--rc-color-accent);" class="rcb-ui-asset-icon svelte-7wiquz"><!></div>');const Bs={hash:"svelte-7wiquz",code:".rcb-ui-asset-icon.svelte-7wiquz {width:96px;height:96px;margin:0 auto;}"};function qs(e){q(e,Bs);var t=Cs(),r=T(t);Pt(r,()=>Ls),_(e,t)}function Fs(e,t){var a;W(t,!1);let r=m(t,"productDetails",8,null),n=m(t,"brandingInfo",8,null),i=m(t,"onContinue",8);const o=((a=r())==null?void 0:a.productType)===Te.Subscription;Me(),Si(e,{type:"success",title:"Purchase successful",get brandingInfo(){return n()},get onContinue(){return i()},closeButtonTitle:"Close",children:(s,l)=>{var c=oe(),u=L(c);j(u,()=>o,f=>{var d=at("Your subscription is now active.");_(f,d)}),_(s,c)},$$slots:{default:!0,icon:(s,l)=>{qs(s)}}}),Z()}function js(e,t,r,n,i={}){const o=r.create(t,i);return o.mount(e),o.on("change",a=>n("change",a)),o.on("ready",a=>n("ready",a)),o.on("focus",a=>n("focus",a)),o.on("blur",a=>n("blur",a)),o.on("escape",a=>n("escape",a)),o.on("click",a=>n("click",a)),o.on("loaderror",a=>n("loaderror",a)),o.on("loaderstart",a=>n("loaderstart",a)),o.on("networkschange",a=>n("networkschange",a)),o}const Hs=typeof window>"u";function Vs(e){if(!Hs)return e.registerAppInfo({name:"svelte-stripe-js",url:"https://svelte-stripe-js.vercel.app"})}var Gs=I("<div></div>");function $s(e,t){W(t,!1);let r,n=_e();const i=Ia(),{elements:o}=Jo("stripe");let a=m(t,"options",8,void 0);pr(()=>(r=js(v(n),"payment",o,i,a()),()=>r.destroy()));function s(){r.blur()}function l(){r.clear()}function c(){r.destroy()}function u(){r.focus()}Me();var f=Gs();return Ea(f,d=>N(n,d),()=>v(n)),_(e,f),_r(t,"blur",s),_r(t,"clear",l),_r(t,"destroy",c),_r(t,"focus",u),Z({blur:s,clear:l,destroy:c,focus:u})}function Ys(e,t){W(t,!1);const r=_e();let n=m(t,"stripe",8),i=m(t,"mode",8,void 0),o=m(t,"theme",8,"stripe"),a=m(t,"variables",24,()=>({})),s=m(t,"rules",24,()=>({})),l=m(t,"labels",8,"above"),c=m(t,"loader",8,"auto"),u=m(t,"fonts",24,()=>[]),f=m(t,"locale",8,"auto"),d=m(t,"currency",8,void 0),g=m(t,"amount",8,void 0),h=m(t,"clientSecret",8,void 0),b=m(t,"elements",12,null);ut(()=>(ce(o()),ce(a()),ce(s()),ce(l())),()=>{N(r,{theme:o(),variables:a(),rules:s(),labels:l()})}),ut(()=>(ce(n()),ce(b()),ce(i()),ce(d()),ce(g()),v(r),ce(h()),ce(u()),ce(c()),ce(f()),$n),()=>{n()&&!b()&&(b(n().elements({mode:i(),currency:d(),amount:g(),appearance:v(r),clientSecret:h(),fonts:u(),loader:c(),locale:f()})),Vs(n()),$n("stripe",{stripe:n(),elements:b()}))}),ut(()=>(ce(b()),v(r),ce(f())),()=>{b()&&b().update({appearance:v(r),locale:f()})}),Cr(),Me();var x=oe(),y=L(x);j(y,()=>n()&&b(),w=>{var k=oe(),p=L(k);re(p,t,"default",{}),_(w,k)}),_(e,x),Z()}var Ri="https://js.stripe.com/v3",zs=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Mi="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Ks=function(){for(var t=document.querySelectorAll('script[src^="'.concat(Ri,'"]')),r=0;r<t.length;r++){var n=t[r];if(zs.test(n.src))return n}return null},Di=function(t){var r="",n=document.createElement("script");n.src="".concat(Ri).concat(r);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(n),n},Qs=function(t,r){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"4.6.0",startTime:r})},Jt=null,mr=null,yr=null,Ws=function(t){return function(){t(new Error("Failed to load Stripe.js"))}},Zs=function(t,r){return function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))}},Xs=function(t){return Jt!==null?Jt:(Jt=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&t&&console.warn(Mi),window.Stripe){r(window.Stripe);return}try{var i=Ks();if(i&&t)console.warn(Mi);else if(!i)i=Di(t);else if(i&&yr!==null&&mr!==null){var o;i.removeEventListener("load",yr),i.removeEventListener("error",mr),(o=i.parentNode)===null||o===void 0||o.removeChild(i),i=Di(t)}yr=Zs(r,n),mr=Ws(n),i.addEventListener("load",yr),i.addEventListener("error",mr)}catch(a){n(a);return}}),Jt.catch(function(r){return Jt=null,Promise.reject(r)}))},Js=function(t,r,n){if(t===null)return null;var i=t.apply(void 0,r);return Qs(i,n),i},er,Ui=!1,Li=function(){return er||(er=Xs(null).catch(function(t){return er=null,Promise.reject(t)}),er)};Promise.resolve().then(function(){return Li()}).catch(function(e){Ui||console.warn(e)});var el=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];Ui=!0;var i=Date.now();return Li().then(function(o){return Js(o,r,i)})},tl=I('<div class="rcb-header-layout svelte-1xe711j"><!></div>');const rl={hash:"svelte-1xe711j",code:".rcb-header-layout.svelte-1xe711j {display:flex;justify-content:space-between;align-items:center;width:100%;font-size:24px;margin:0;font-weight:500;}"};function en(e,t){q(e,rl),kt(e,{as:"header",children:(r,n)=>{var i=tl(),o=T(i);re(o,t,"default",{}),_(r,i)},$$slots:{default:!0}})}const nl=`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"
54
+ `;var Yl=x('<div style="color:var(--rc-color-accent);" class="rcb-ui-asset-icon svelte-1yeecu3"><!></div>');const Gl={hash:"svelte-1yeecu3",code:".rcb-ui-asset-icon.svelte-1yeecu3 {width:96px;height:96px;margin:0 auto;}"};function Wl(e){H(e,Gl);var r=Yl(),t=q(r);Ur(t,()=>Hl),h(e,r)}function Zl(e,r){var u;ne(r,!1);let t=g(r,"productDetails",8,null),n=g(r,"brandingInfo",8,null),a=g(r,"onContinue",8);const o=((u=t())==null?void 0:u.productType)===Je.Subscription,s=xr(Sr)||Ve.fallback();ze();var i=re(()=>s.translate(C.StateSuccessPurchaseSuccessful)),l=re(()=>s.translate(C.StateSuccessButtonClose));In(e,{type:"success",get title(){return p(i)},get brandingInfo(){return n()},get onContinue(){return a()},get closeButtonTitle(){return p(l)},children:(c,d)=>{var _=ie(),f=j(_);{var m=y=>{ue(y,{get key(){return C.StateSuccessSubscriptionNowActive}})};U(f,y=>{o&&y(m)})}h(c,_)},$$slots:{default:!0,icon:(c,d)=>{Wl(c)}}}),ae()}function Ql(e,r,t,n,a={}){const o=t.create(r,a);return o.mount(e),o.on("change",s=>n("change",s)),o.on("ready",s=>n("ready",s)),o.on("focus",s=>n("focus",s)),o.on("blur",s=>n("blur",s)),o.on("escape",s=>n("escape",s)),o.on("click",s=>n("click",s)),o.on("loaderror",s=>n("loaderror",s)),o.on("loaderstart",s=>n("loaderstart",s)),o.on("networkschange",s=>n("networkschange",s)),o}const Jl=typeof window>"u";function Kl(e){if(!Jl)return e.registerAppInfo({name:"svelte-stripe-js",url:"https://svelte-stripe-js.vercel.app"})}var Xl=x("<div></div>");function $l(e,r){ne(r,!1);let t,n=Se();const a=$s(),{elements:o}=xr("stripe");let s=g(r,"options",8,void 0);Ct(()=>(t=Ql(p(n),"payment",o,a,s()),()=>t.destroy()));function i(){t.blur()}function l(){t.clear()}function u(){t.destroy()}function c(){t.focus()}ze();var d=Xl();return Ks(d,_=>A(n,_),()=>p(n)),h(e,d),Nt(r,"blur",i),Nt(r,"clear",l),Nt(r,"destroy",u),Nt(r,"focus",c),ae({blur:i,clear:l,destroy:u,focus:c})}function eu(e,r){ne(r,!1);const t=Se();let n=g(r,"stripe",8),a=g(r,"mode",8,void 0),o=g(r,"theme",8,"stripe"),s=g(r,"variables",24,()=>({})),i=g(r,"rules",24,()=>({})),l=g(r,"labels",8,"above"),u=g(r,"loader",8,"auto"),c=g(r,"fonts",24,()=>[]),d=g(r,"locale",8,"auto"),_=g(r,"currency",8,void 0),f=g(r,"amount",8,void 0),m=g(r,"clientSecret",8,void 0),y=g(r,"elements",12,null);kr(()=>(be(o()),be(s()),be(i()),be(l())),()=>{A(t,{theme:o(),variables:s(),rules:i(),labels:l()})}),kr(()=>(be(n()),be(y()),be(a()),be(_()),be(f()),p(t),be(m()),be(c()),be(u()),be(d()),pn),()=>{n()&&!y()&&(y(n().elements({mode:a(),currency:_(),amount:f(),appearance:p(t),clientSecret:m(),fonts:c(),loader:u(),locale:d()})),Kl(n()),pn("stripe",{stripe:n(),elements:y()}))}),kr(()=>(be(y()),p(t),be(d())),()=>{y()&&y().update({appearance:p(t),locale:d()})}),sn(),ze();var w=ie(),P=j(w);{var E=I=>{var b=ie(),v=j(b);pe(v,r,"default",{}),h(I,b)};U(P,I=>{n()&&y()&&I(E)})}h(e,w),ae()}var ao="https://js.stripe.com/v3",ru=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,oo="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",tu=function(){for(var r=document.querySelectorAll('script[src^="'.concat(ao,'"]')),t=0;t<r.length;t++){var n=r[t];if(ru.test(n.src))return n}return null},so=function(r){var t="",n=document.createElement("script");n.src="".concat(ao).concat(t);var a=document.head||document.body;if(!a)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return a.appendChild(n),n},nu=function(r,t){!r||!r._registerWrapper||r._registerWrapper({name:"stripe-js",version:"4.6.0",startTime:t})},ht=null,Rt=null,Ut=null,au=function(r){return function(){r(new Error("Failed to load Stripe.js"))}},ou=function(r,t){return function(){window.Stripe?r(window.Stripe):t(new Error("Stripe.js not available"))}},su=function(r){return ht!==null?ht:(ht=new Promise(function(t,n){if(typeof window>"u"||typeof document>"u"){t(null);return}if(window.Stripe&&r&&console.warn(oo),window.Stripe){t(window.Stripe);return}try{var a=tu();if(a&&r)console.warn(oo);else if(!a)a=so(r);else if(a&&Ut!==null&&Rt!==null){var o;a.removeEventListener("load",Ut),a.removeEventListener("error",Rt),(o=a.parentNode)===null||o===void 0||o.removeChild(a),a=so(r)}Ut=ou(t,n),Rt=au(n),a.addEventListener("load",Ut),a.addEventListener("error",Rt)}catch(s){n(s);return}}),ht.catch(function(t){return ht=null,Promise.reject(t)}))},iu=function(r,t,n){if(r===null)return null;var a=r.apply(void 0,t);return nu(a,n),a},yt,io=!1,lo=function(){return yt||(yt=su(null).catch(function(r){return yt=null,Promise.reject(r)}),yt)};Promise.resolve().then(function(){return lo()}).catch(function(e){io||console.warn(e)});var lu=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];io=!0;var a=Date.now();return lo().then(function(o){return iu(o,t,a)})},uu=x('<div class="rcb-header-layout svelte-1xe711j"><!></div>');const cu={hash:"svelte-1xe711j",code:".rcb-header-layout.svelte-1xe711j {display:flex;justify-content:space-between;align-items:center;width:100%;font-size:24px;margin:0;font-weight:500;}"};function qn(e,r){H(e,cu),Lr(e,{as:"header",children:(t,n)=>{var a=uu(),o=q(a);pe(o,r,"default",{}),h(t,a)},$$slots:{default:!0}})}const _u=`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"
55
55
  xmlns="http://www.w3.org/2000/svg">
56
56
  <path d="M18 8H17V6C17 3.24 14.76 1 12 1C9.24 1 7 3.24 7 6V8H6C4.9 8 4 8.9 4 10V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V10C20 8.9 19.1 8 18 8ZM12 17C10.9 17 10 16.1 10 15C10 13.9 10.9 13 12 13C13.1 13 14 13.9 14 15C14 16.1 13.1 17 12 17ZM15.1 8H8.9V6C8.9 4.29 10.29 2.9 12 2.9C13.71 2.9 15.1 4.29 15.1 6V8Z"
57
57
  fill="currentColor"/>
58
58
  </svg>
59
- `;var il=I('<div style="color:var(--rc-color-accent);" class="rcb-ui-asset-icon svelte-1z0jca3"><!></div>');const ol={hash:"svelte-1z0jca3",code:"div.svelte-1z0jca3 {height:24px;width:24px;}"};function al(e){q(e,ol);var t=il(),r=T(t);Pt(r,()=>nl),_(e,t)}var sl=I('<div class="processing svelte-rjmul6"></div>');const ll={hash:"svelte-rjmul6",code:`.processing.svelte-rjmul6 {width:12px;aspect-ratio:1;border-radius:50%;
60
- animation: svelte-rjmul6-l5 1.5s infinite linear;}
61
- @keyframes svelte-rjmul6-l5 {
59
+ `;var du=x('<div style="color:var(--rc-color-accent);" class="rcb-ui-asset-icon svelte-wgufvv"><!></div>');const pu={hash:"svelte-wgufvv",code:"div.svelte-wgufvv {height:24px;width:24px;}"};function fu(e){H(e,pu);var r=du(),t=q(r);Ur(t,()=>_u),h(e,r)}var mu=x('<div class="processing svelte-bkjupy"></div>');const hu={hash:"svelte-bkjupy",code:`.processing.svelte-bkjupy {width:12px;aspect-ratio:1;border-radius:50%;
60
+ animation: svelte-bkjupy-l5 1.5s infinite linear;}
61
+
62
+ @keyframes svelte-bkjupy-l5 {
62
63
  0% {
63
64
  box-shadow:
64
65
  20px 0 #fff2,
@@ -89,13 +90,13 @@
89
90
  -20px 0 #fff2;
90
91
  background: #fff2;
91
92
  }
92
- }`};function Ci(e){q(e,ll);var t=sl();_(e,t)}const cl={error:"#f2545b",warning:"#f4e971",focus:"#000080",accent:"#767676",primary:"#000000","primary-text":"#ffffff",white:"#ffffff","grey-text-dark":"rgba(0,0,0,1)","grey-text-light":"rgba(0,0,0,0.5)","grey-ui-dark":"rgba(0,0,0,0.125)","grey-ui-light":"rgba(0,0,0,0.005)","input-background":"transparent",background:"white"},ul={error:"#f2545b",warning:"#f4e971",focus:"#000080",accent:"#767676",primary:"#ffffff","primary-text":"#000000",white:"#ffffff","grey-text-dark":"rgba(255,255,255,1)","grey-text-light":"rgba(255,255,255,0.5)","grey-ui-dark":"rgba(255,255,255,0.125)","grey-ui-light":"rgba(255,255,255,0.005)","input-background":"transparent",background:"#000000"},Bi={error:"color_error",focus:"color_accent",accent:"color_accent",primary:"color_buttons_primary"},fl={...Bi,background:"color_form_bg"},dl={...Bi,background:"color_product_info_bg"},qi={"input-border-radius":"12px","input-button-border-radius":"12px","modal-border-radius":"16px"},vl={"input-border-radius":"0px","input-button-border-radius":"0px","modal-border-radius":"0px"},gl={"input-border-radius":"24px","input-button-border-radius":"56px","modal-border-radius":"16px"},Fi=qi,ji=e=>e.length==7?{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}:e.length==4?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null,Hi=({r:e,g:t,b:r,luminanceThreshold:n})=>{const i=a=>(a=a/255,a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4));return .2126*i(e)+.7152*i(t)+.0722*i(r)>n},Vi=.37,hl=(e,t=Vi)=>{const r=Hi({...e,luminanceThreshold:t})?"0,0,0":"255,255,255";return{"grey-text-dark":`rgb(${r})`,"grey-text-light":`rgba(${r},0.50)`,"grey-ui-dark":`rgba(${r},0.125)`,"grey-ui-light":`rgba(${r},0.05)`}},_l=(e,t,r,n=Vi)=>{const i={"grey-text-dark":r["grey-text-dark"],"grey-text-light":r["grey-text-light"],"grey-ui-dark":r["grey-ui-dark"],"grey-ui-light":r["grey-ui-light"],"primary-text":r["primary-text"]};if(e!=null&&e.startsWith("#")){const o=ji(e);o!==null&&Object.assign(i,hl(o))}if(t!=null&&t.startsWith("#")){const o=ji(t);o!==null&&(i["primary-text"]=Hi({...o,luminanceThreshold:n})?"black":"white")}return i},pl=(e,t)=>e||t,bl=(e,t,r)=>{const n=Object.entries(e).map(([i,o])=>[i,pl(r?r[o]:null,t[i])]);return Object.fromEntries(n)},Gi=(e,t,r)=>{const n=bl(e,t,r);return r?{...t,...n,..._l(n.background,n.primary,t)}:{...t}},ml=e=>Gi(dl,ul,e),$i=e=>Gi(fl,cl,e),tn=e=>{if(!e)return Fi;switch(e.shapes){case"rounded":return qi;case"rectangle":return vl;case"pill":return gl;default:return Fi}},wr=(e="",t)=>t.map(([r,n])=>`--rc-${e}-${r}: ${n}`).join("; "),Yi=e=>{const t=wr("color",Object.entries(ml(e))),r=wr("shape",Object.entries(tn(e)));return[t,r].join("; ")},yl=e=>{const t=wr("color",Object.entries($i(e))),r=wr("shape",Object.entries(tn(e)));return[t,r].join("; ")};class rn{constructor(t){this.brandingAppearance=t}get shape(){return tn(this.brandingAppearance)}get formColors(){return $i(this.brandingAppearance)}get formStyleVars(){return yl(this.brandingAppearance)}get productInfoStyleVars(){return Yi(this.brandingAppearance)}}var wl=I('<div style="display: flex; align-items: center; justify-content: baseline;"><!> <div style="margin-left: 10px">Secure Checkout</div></div> <!>',1),El=I('<div class="rcb-stripe-elements-container svelte-8jsoa8"><!></div>'),xl=I("<!> <!>",1),Il=I("<!> <form><!></form>",1),Pl=I("<div><!></div>");const kl={hash:"svelte-8jsoa8",code:`.rcb-stripe-elements-container.svelte-8jsoa8 {width:100%;
93
+ }`};function uo(e){H(e,hu);var r=mu();h(e,r)}const yu={error:"#f2545b",warning:"#f4e971",focus:"#000080",accent:"#767676",primary:"#000000","primary-text":"#ffffff",white:"#ffffff","grey-text-dark":"rgba(0,0,0,1)","grey-text-light":"rgba(0,0,0,0.5)","grey-ui-dark":"rgba(0,0,0,0.125)","grey-ui-light":"rgba(0,0,0,0.005)","input-background":"transparent",background:"white"},gu={error:"#f2545b",warning:"#f4e971",focus:"#000080",accent:"#767676",primary:"#ffffff","primary-text":"#000000",white:"#ffffff","grey-text-dark":"rgba(255,255,255,1)","grey-text-light":"rgba(255,255,255,0.5)","grey-ui-dark":"rgba(255,255,255,0.125)","grey-ui-light":"rgba(255,255,255,0.005)","input-background":"transparent",background:"#000000"},co={error:"color_error",focus:"color_accent",accent:"color_accent",primary:"color_buttons_primary"},vu={...co,background:"color_form_bg"},bu={...co,background:"color_product_info_bg"},_o={"input-border-radius":"12px","input-button-border-radius":"12px","modal-border-radius":"16px"},wu={"input-border-radius":"0px","input-button-border-radius":"0px","modal-border-radius":"0px"},Pu={"input-border-radius":"24px","input-button-border-radius":"56px","modal-border-radius":"16px"},po=_o,fo=e=>e.length==7?{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}:e.length==4?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null,mo=({r:e,g:r,b:t,luminanceThreshold:n})=>{const a=s=>(s=s/255,s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4));return .2126*a(e)+.7152*a(r)+.0722*a(t)>n},ho=.37,ku=(e,r=ho)=>{const t=mo({...e,luminanceThreshold:r})?"0,0,0":"255,255,255";return{"grey-text-dark":`rgb(${t})`,"grey-text-light":`rgba(${t},0.50)`,"grey-ui-dark":`rgba(${t},0.125)`,"grey-ui-light":`rgba(${t},0.05)`}},Eu=(e,r,t,n=ho)=>{const a={"grey-text-dark":t["grey-text-dark"],"grey-text-light":t["grey-text-light"],"grey-ui-dark":t["grey-ui-dark"],"grey-ui-light":t["grey-ui-light"],"primary-text":t["primary-text"]};if(e!=null&&e.startsWith("#")){const o=fo(e);o!==null&&Object.assign(a,ku(o))}if(r!=null&&r.startsWith("#")){const o=fo(r);o!==null&&(a["primary-text"]=mo({...o,luminanceThreshold:n})?"black":"white")}return a},xu=(e,r)=>e||r,Su=(e,r,t)=>{const n=Object.entries(e).map(([a,o])=>[a,xu(t?t[o]:null,r[a])]);return Object.fromEntries(n)},yo=(e,r,t)=>{const n=Su(e,r,t);return t?{...r,...n,...Eu(n.background,n.primary,r)}:{...r}},Iu=e=>yo(bu,gu,e),go=e=>yo(vu,yu,e),Tn=e=>{if(!e)return po;switch(e.shapes){case"rounded":return _o;case"rectangle":return wu;case"pill":return Pu;default:return po}},Lt=(e="",r)=>r.map(([t,n])=>`--rc-${e}-${t}: ${n}`).join("; "),vo=e=>{const r=Lt("color",Object.entries(Iu(e))),t=Lt("shape",Object.entries(Tn(e)));return[r,t].join("; ")},qu=e=>{const r=Lt("color",Object.entries(go(e))),t=Lt("shape",Object.entries(Tn(e)));return[r,t].join("; ")};class Fn{constructor(r){this.brandingAppearance=r}get shape(){return Tn(this.brandingAppearance)}get formColors(){return go(this.brandingAppearance)}get formStyleVars(){return qu(this.brandingAppearance)}get productInfoStyleVars(){return vo(this.brandingAppearance)}}var Tu=x('<div class="rcb-header-wrapper svelte-1a9rihw"><!> <div class="rcb-step-title svelte-1a9rihw"><!></div></div> <!>',1),Fu=x('<div class="rcb-stripe-elements-container svelte-1a9rihw"><!></div> <!>',1),Au=x("<!> <!>",1),Ou=x("<!> <form><!></form>",1),Du=x("<div><!></div>");const Mu={hash:"svelte-1a9rihw",code:`.rcb-header-wrapper.svelte-1a9rihw {display:flex;align-items:center;}.rcb-step-title.svelte-1a9rihw {margin-left:10px;}.rcb-stripe-elements-container.svelte-1a9rihw {width:100%;
93
94
 
94
- /* The standard height of the payment form from Stripe */
95
- /* Added to avoid the card getting smaller while loading */min-height:320px;margin-top:32px;margin-bottom:24px;}`};function Tl(e,t){var P;W(t,!1),q(e,kl);let r=m(t,"onClose",8),n=m(t,"onContinue",8),i=m(t,"onError",8),o=m(t,"paymentInfoCollectionMetadata",8),a=m(t,"processing",12,!1),s=m(t,"productDetails",8),l=m(t,"purchaseOptionToUse",8),c=m(t,"brandingInfo",8);const u=o().data.client_secret;let f=_e(null),d=_e(),g=_e(),h=_e(!1);pr(async()=>{const C=o().data.publishable_api_key,V=o().data.stripe_account_id;if(!C||!V)throw new Error("Stripe publishable key or account ID not found");N(f,await el(C,{stripeAccount:V}))});const b=async()=>{if(a()||!v(f)||!v(g))return;a(!0);const C=await v(f).confirmSetup({elements:v(g),redirect:"if_required"});C.error?(a(!1),i()(new te(ge.StripeError,C.error.message))):n()()},x=new rn((P=c())==null?void 0:P.appearance);let y=x.shape,w=x.formColors;ut(()=>v(d),()=>{v(d)&&v(d)._elements.length>0&&N(g,v(d))}),Cr(),Me();var k=Pl(),p=T(k);j(p,()=>v(f)&&u,C=>{var V=Il(),A=L(V);en(A,{children:($,Ae)=>{var We=wl(),qe=L(We),gt=T(qe);al(gt);var De=D(qe,2);Jr(De,{$$events:{click(...Nt){var Ze;(Ze=r())==null||Ze.apply(this,Nt)}}}),_($,We)},$$slots:{default:!0}});var z=D(A,2),X=T(z),Ie=fe(()=>({borderRadius:y["input-border-radius"],fontSizeBase:"16px",fontSizeSm:"16px",spacingGridRow:"16px",focusBoxShadow:"none",colorDanger:w.error,colorTextPlaceholder:w["grey-text-light"],colorText:w["grey-text-dark"],colorTextSecondary:w["grey-text-light"]})),R=fe(()=>({".Input":{boxShadow:"none",border:`2px solid ${w["grey-ui-dark"]}`,backgroundColor:"transparent",color:w["grey-text-dark"]},".Input:focus":{border:`2px solid ${w.focus}`,outline:"none"},".Label":{marginBottom:"8px",fontWeight:"500",lineHeight:"22px",color:w["grey-text-dark"]},".Input--invalid":{boxShadow:"none"},".Tab":{boxShadow:"none",backgroundColor:"transparent",color:w["grey-text-light"],border:`2px solid ${w["grey-ui-dark"]}`},".Tab:hover, .Tab:focus, .Tab--selected, .Tab--selected:hover, .Tab--selected:focus":{boxShadow:"none",color:w["grey-text-dark"]},".Tab:focus, .Tab--selected, .Tab--selected:hover, .Tab--selected:focus":{border:`2px solid ${w.focus}`},".TabIcon":{fill:w["grey-text-light"]},".TabIcon--selected":{fill:w["grey-text-dark"]},".Block":{boxShadow:"none",backgroundColor:"transparent",border:`2px solid ${w["grey-ui-dark"]}`}}));Ys(X,{get stripe(){return v(f)},clientSecret:u,loader:"always",locale:"en",get elements(){return v(d)},set elements($){N(d,$)},theme:"stripe",get variables(){return v(Ie)},get rules(){return v(R)},children:($,Ae)=>{var We=xl(),qe=L(We);kt(qe,{children:(De,Nt)=>{var Ze=El(),Ar=T(Ze),Fe=fe(()=>{var Xe;return{business:(Xe=c())!=null&&Xe.seller_company_name?{name:c().seller_company_name}:void 0,layout:{type:"tabs"}}});$s(Ar,{get options(){return v(Fe)},$$events:{change:Xe=>{N(h,Xe.detail.complete)}}}),_(De,Ze)},$$slots:{default:!0}});var gt=D(qe,2);Xr(gt,{children:(De,Nt)=>{Xt(De,{children:(Ze,Ar)=>{var Fe=fe(()=>a()||!v(h));Zr(Ze,{get disabled(){return v(Fe)},testId:"PayButton",children:(Xe,je)=>{var ht=oe(),Je=L(ht);j(Je,a,et=>{Ci(et)},et=>{var He=oe(),tt=L(He);j(tt,()=>{var me,Oe;return(Oe=(me=s().subscriptionOptions)==null?void 0:me[l().id])==null?void 0:Oe.trial},me=>{var Oe=at("Start Trial");_(me,Oe)},me=>{var Oe=at("Pay");_(me,Oe)},!0),_(et,He)}),_(Xe,ht)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),_($,We)},$$slots:{default:!0},$$legacy:!0}),hr("submit",z,hi(b)),_(C,V)},C=>{Wr(C)}),_(e,k),Z()}function Al(e){return e.trim()===""?"You need to provide your email address to continue.":e.match(/^[^@]+@[^@]+\.[^@]+$/)?null:"Email is not valid. Please provide a valid email address."}function Ol(e){if(e&&!e.match(/^[A-Z]{3}$/)){const t=`Currency code ${e} is not valid. Please provide a valid ISO 4217 currency code.`;throw Y.errorLog(t),new ne(ae.ConfigurationError,t)}}var Nl=I("<span>Billing email address</span> <!>",1),Sl=I('<div class="form-error svelte-yf01ty"> </div>'),Rl=I('<div class="form-container svelte-yf01ty"><div class="form-label svelte-yf01ty"><label for="email">Email</label></div> <div><input name="email" placeholder="john@appleseed.com" autocapitalize="off" class="svelte-yf01ty"></div> <!></div>'),Ml=I('<div class="container svelte-yf01ty"><!> <form class="svelte-yf01ty"><!> <!></form></div>');const Dl={hash:"svelte-yf01ty",code:".container.svelte-yf01ty {display:flex;flex-direction:column;flex-grow:1;}form.svelte-yf01ty {display:flex;flex-direction:column;min-height:100%;flex-grow:1;}.form-container.svelte-yf01ty {display:flex;flex-direction:column;width:100%;margin-top:32px;margin-bottom:16px;}.form-label.svelte-yf01ty {margin-top:8px;margin-bottom:8px;display:block;font-weight:500;line-height:22px;}.form-input.error.svelte-yf01ty input:where(.svelte-yf01ty) {border-color:var(--rc-color-error);}.form-error.svelte-yf01ty {margin-top:4px;font-size:16px;line-height:20px;min-height:40px;color:var(--rc-color-error);}input.svelte-yf01ty {width:100%;box-sizing:border-box;padding:8px;border:2px solid var(--rc-color-grey-ui-dark);border-radius:var(--rc-shape-input-border-radius);font-size:16px;height:48px;padding:6px 14px;background:var(--rc-color-input-background);color:inherit;}input.svelte-yf01ty:focus {outline:none;border:2px solid var(--rc-color-focus);}"};function Ul(e,t){W(t,!1),q(e,Dl);const r=_e(),n=_e(),i=_e();let o=m(t,"onContinue",8),a=m(t,"onClose",8),s=m(t,"processing",8),l=m(t,"lastError",8);const c=async()=>{const b=Al(v(r));b?N(n,b):o()({email:v(r)})};Pa(async()=>{var b;N(n,((b=l())==null?void 0:b.message)??"")}),ut(()=>{},()=>{N(r,"")}),ut(()=>{},()=>{N(n,"")}),ut(()=>v(n),()=>{N(i,v(n)?"error":"")}),Cr(),Me();var u=Ml(),f=T(u);en(f,{children:(b,x)=>{var y=Nl(),w=D(L(y),2);Jr(w,{$$events:{click(...k){var p;(p=a())==null||p.apply(this,k)}}}),_(b,y)},$$slots:{default:!0}});var d=D(f,2),g=T(d);kt(g,{children:(b,x)=>{var y=Rl(),w=D(T(y),2),k=T(w),p=D(w,2);j(p,()=>v(n),P=>{var C=Sl(),V=T(C);F(()=>de(V,v(n))),_(P,C)}),F(()=>zr(w,`form-input ${v(i)??""} svelte-yf01ty`)),wa(k,()=>v(r),P=>N(r,P)),_(b,y)},$$slots:{default:!0}});var h=D(g,2);Xr(h,{children:(b,x)=>{Xt(b,{children:(y,w)=>{Zr(y,{get disabled(){return s()},type:"submit",children:(k,p)=>{var P=oe(),C=L(P);j(C,s,V=>{Ci(V)},V=>{var A=at("Continue");_(V,A)}),_(k,P)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),hr("submit",d,hi(c)),_(e,u),Z()}var Ll=I('<div class="rcb-modal-backdrop svelte-17tslso"><!></div>');const Cl={hash:"svelte-17tslso",code:".rcb-modal-backdrop.svelte-17tslso {position:fixed;top:0;left:0;right:0;min-width:100%;width:100vw;width:100dvw;min-height:100%;height:100vh;height:100dvh;background-color:rgba(40, 40, 40, 0.75);display:flex;flex-direction:column;justify-content:space-around;z-index:1000001;}"};function Bl(e,t){q(e,Cl);var r=Ll(),n=T(r);re(n,t,"default",{}),_(e,r)}var ql=I('<div class="rcb-modal-container svelte-1fufj5b"><main class="rcb-modal-main svelte-1fufj5b"><!></main></div>');const Fl={hash:"svelte-1fufj5b",code:`.rcb-modal-container.svelte-1fufj5b {width:100%;}.rcb-modal-main.svelte-1fufj5b {box-sizing:border-box;border-radius:var(--rc-shape-modal-border-radius);background-color:var(--rc-color-background);color:var(--rc-color-grey-text-dark);padding:40px;flex-direction:column;display:flex;}
95
+ /* The standard height of the payment form from Stripe */
96
+ /* Added to avoid the card getting smaller while loading */min-height:320px;margin-top:32px;margin-bottom:24px;}`};function Nu(e,r){var we;ne(r,!1),H(e,Mu);let t=g(r,"onClose",8),n=g(r,"onContinue",8),a=g(r,"paymentInfoCollectionMetadata",8),o=g(r,"processing",12,!1),s=g(r,"productDetails",8),i=g(r,"purchaseOptionToUse",8),l=g(r,"brandingInfo",8);const u=a().data.client_secret;let c=Se(null),d=Se(),_=Se(),f=Se(void 0),m=Se(!1);Ct(async()=>{const Y=a().data.publishable_api_key,M=a().data.stripe_account_id;if(!Y||!M)throw new Error("Stripe publishable key or account ID not found");A(c,await lu(Y,{stripeAccount:M}))});const y=async()=>{if(o()||!p(c)||!p(_)||!u)return;o(!0);const Y=u.startsWith("seti_");let M;Y?M=(await p(c).confirmSetup({elements:p(_),redirect:"if_required"})).error:M=(await p(c).confirmPayment({elements:p(_),redirect:"if_required"})).error,M?(o(!1),w(M)&&A(f,M.message)):n()()};function w(Y){const M=["card_declined","expired_card","incorrect_cvc","incorrect_number"];return!(Y.type==="card_error"&&Y.code&&M.includes(Y.code))}const P=()=>{A(f,void 0)},E=new Fn((we=l())==null?void 0:we.appearance);let I=E.shape,b=E.formColors;const v=xr(Sr)||Ve.fallback(),T=v.locale||v.fallbackLocale,O=(Y=>{if(["ca","hi","uk"].includes(Y))return"auto";const se={zh_Hans:"zh",zh_Hant:"zh"};return Object.keys(se).includes(Y)?se[Y]:Y})(T);kr(()=>p(d),()=>{p(d)&&p(d)._elements.length>0&&A(_,p(d))}),sn(),ze();var G=Du(),D=q(G);{var oe=Y=>{var M=Ou(),se=j(M);qn(se,{children:(Ke,qr)=>{var ir=Tu(),Xe=j(ir),yr=q(Xe);fu(yr);var ke=N(yr,2),gr=q(ke);ue(gr,{get key(){return C.StateNeedsPaymentInfoPaymentStepTitle}});var L=N(Xe,2);Sn(L,{$$events:{click(...$){var de;(de=t())==null||de.apply(this,$)}}}),h(Ke,ir)},$$slots:{default:!0}});var Pe=N(se,2),sr=q(Pe),hr=re(()=>({borderRadius:I["input-border-radius"],fontSizeBase:"16px",fontSizeSm:"16px",spacingGridRow:"16px",focusBoxShadow:"none",colorDanger:b.error,colorTextPlaceholder:b["grey-text-light"],colorText:b["grey-text-dark"],colorTextSecondary:b["grey-text-light"]})),Wt=re(()=>({".Input":{boxShadow:"none",border:`2px solid ${b["grey-ui-dark"]}`,backgroundColor:"transparent",color:b["grey-text-dark"]},".Input:focus":{border:`2px solid ${b.focus}`,outline:"none"},".Label":{marginBottom:"8px",fontWeight:"500",lineHeight:"22px",color:b["grey-text-dark"]},".Input--invalid":{boxShadow:"none"},".Tab":{boxShadow:"none",backgroundColor:"transparent",color:b["grey-text-light"],border:`2px solid ${b["grey-ui-dark"]}`},".Tab:hover, .Tab:focus, .Tab--selected, .Tab--selected:hover, .Tab--selected:focus":{boxShadow:"none",color:b["grey-text-dark"]},".Tab:focus, .Tab--selected, .Tab--selected:hover, .Tab--selected:focus":{border:`2px solid ${b.focus}`},".TabIcon":{fill:b["grey-text-light"]},".TabIcon--selected":{fill:b["grey-text-dark"]},".Block":{boxShadow:"none",backgroundColor:"transparent",border:`2px solid ${b["grey-ui-dark"]}`}}));eu(sr,{get stripe(){return p(c)},clientSecret:u,loader:"always",locale:O,theme:"stripe",get variables(){return p(hr)},get rules(){return p(Wt)},get elements(){return p(d)},set elements(Ke){A(d,Ke)},children:(Ke,qr)=>{var ir=Au(),Xe=j(ir);Lr(Xe,{children:(ke,gr)=>{var L=Fu(),$=j(L),de=q($),Ie=re(()=>{var Ee;return{business:(Ee=l())!=null&&Ee.app_name?{name:l().app_name}:void 0,layout:{type:"tabs"}}});$l(de,{get options(){return p(Ie)},$$events:{change:Ee=>{A(m,Ee.detail.complete)}}});var $e=N($,2);{var je=Ee=>{var He=re(()=>v.translate(C.StateErrorButtonTryAgain));In(Ee,{title:null,type:"error",get closeButtonTitle(){return p(He)},onContinue:P,brandingInfo:null,children:(vr,Ae)=>{var Gr=_t();Z(()=>ar(Gr,p(f))),h(vr,Gr)},$$slots:{default:!0,icon:(vr,Ae)=>{eo(vr)}}})};U($e,Ee=>{p(f)&&Ee(je)})}Z(()=>$.hidden=!!p(f)),h(ke,L)},$$slots:{default:!0}});var yr=N(Xe,2);xn(yr,{children:(ke,gr)=>{var L=ie(),$=j(L);{var de=Ie=>{mt(Ie,{children:($e,je)=>{var Ee=re(()=>o()||!p(m));En($e,{get disabled(){return p(Ee)},testId:"PayButton",children:(He,vr)=>{var Ae=ie(),Gr=j(Ae);{var Zt=br=>{uo(br)},Hn=br=>{var Qt=ie(),Q=j(Qt);{var Tr=lr=>{ue(lr,{get key(){return C.StateNeedsPaymentInfoButtonStartTrial}})},Yn=lr=>{ue(lr,{get key(){return C.StateNeedsPaymentInfoButtonPay}})};U(Q,lr=>{var jo,Ro;(Ro=(jo=s().subscriptionOptions)==null?void 0:jo[i().id])!=null&&Ro.trial?lr(Tr):lr(Yn,!1)},!0)}h(br,Qt)};U(Gr,br=>{o()?br(Zt):br(Hn,!1)})}h(He,Ae)},$$slots:{default:!0}})},$$slots:{default:!0}})};U($,Ie=>{p(f)||Ie(de)})}h(ke,L)},$$slots:{default:!0}}),h(Ke,ir)},$$slots:{default:!0},$$legacy:!0}),Mt("submit",Pe,La(y)),h(Y,M)},_e=Y=>{kn(Y)};U(D,Y=>{p(c)&&u?Y(oe):Y(_e,!1)})}h(e,G),ae()}function Cu(e){return e.trim()===""?"You need to provide your email address to continue.":e.match(/^[^@]+@[^@]+\.[^@]+$/)?null:"Email is not valid. Please provide a valid email address."}function ju(e){if(e&&!e.match(/^[A-Z]{3}$/)){const r=`Currency code ${e} is not valid. Please provide a valid ISO 4217 currency code.`;throw X.errorLog(r),new fe(ge.ConfigurationError,r)}}var Ru=x("<span><!></span> <!>",1),Uu=x('<div class="form-error svelte-1rq8p9w"> </div>'),Lu=x('<div class="form-container svelte-1rq8p9w"><div class="form-label svelte-1rq8p9w"><label for="email"><!></label></div> <div><input name="email" autocapitalize="off" class="svelte-1rq8p9w"></div> <!></div>'),Bu=x('<div class="container svelte-1rq8p9w"><!> <form class="svelte-1rq8p9w"><!> <!></form></div>');const zu={hash:"svelte-1rq8p9w",code:".container.svelte-1rq8p9w {display:flex;flex-direction:column;flex-grow:1;}form.svelte-1rq8p9w {display:flex;flex-direction:column;min-height:100%;flex-grow:1;}.form-container.svelte-1rq8p9w {display:flex;flex-direction:column;width:100%;margin-top:32px;margin-bottom:16px;}.form-label.svelte-1rq8p9w {margin-top:8px;margin-bottom:8px;display:block;font-weight:500;line-height:22px;}.form-input.error.svelte-1rq8p9w input:where(.svelte-1rq8p9w) {border-color:var(--rc-color-error);}.form-error.svelte-1rq8p9w {margin-top:4px;font-size:16px;line-height:20px;min-height:40px;color:var(--rc-color-error);}input.svelte-1rq8p9w {width:100%;box-sizing:border-box;padding:8px;border:2px solid var(--rc-color-grey-ui-dark);border-radius:var(--rc-shape-input-border-radius);font-size:16px;height:48px;padding:6px 14px;background:var(--rc-color-input-background);color:inherit;}input.svelte-1rq8p9w:focus {outline:none;border:2px solid var(--rc-color-focus);}"};function Vu(e,r){ne(r,!1),H(e,zu);const t=Se(),n=Se(),a=Se();let o=g(r,"onContinue",8),s=g(r,"onClose",8),i=g(r,"processing",8),l=g(r,"lastError",8);const u=async()=>{const w=Cu(p(t));w?A(n,w):o()({email:p(t)})};ei(async()=>{var w;A(n,((w=l())==null?void 0:w.message)??"")});const c=xr(Sr)||Ve.fallback();kr(()=>{},()=>{A(t,"")}),kr(()=>{},()=>{A(n,"")}),kr(()=>p(n),()=>{A(a,p(n)?"error":"")}),sn(),ze();var d=Bu(),_=q(d);qn(_,{children:(w,P)=>{var E=Ru(),I=j(E),b=q(I);ue(b,{get key(){return C.StateNeedsAuthInfoEmailStepTitle}});var v=N(I,2);Sn(v,{$$events:{click(...T){var k;(k=s())==null||k.apply(this,T)}}}),h(w,E)},$$slots:{default:!0}});var f=N(_,2),m=q(f);Lr(m,{children:(w,P)=>{var E=Lu(),I=q(E),b=q(I),v=q(b);ue(v,{get key(){return C.StateNeedsAuthInfoEmailInputLabel}});var T=N(I,2),k=q(T);Z(()=>K(k,"placeholder",c.translate(C.StateNeedsAuthInfoEmailInputPlaceholder)));var O=N(T,2);{var G=D=>{var oe=Uu(),_e=q(oe);Z(()=>ar(_e,p(n))),h(D,oe)};U(O,D=>{p(n)&&D(G)})}Z(()=>gn(T,`form-input ${p(a)??""} svelte-1rq8p9w`)),Js(k,()=>p(t),D=>A(t,D)),h(w,E)},$$slots:{default:!0}});var y=N(m,2);xn(y,{children:(w,P)=>{mt(w,{children:(E,I)=>{En(E,{get disabled(){return i()},type:"submit",children:(b,v)=>{var T=ie(),k=j(T);{var O=D=>{uo(D)},G=D=>{ue(D,{get key(){return C.StateNeedsAuthInfoButtonContinue}})};U(k,D=>{i()?D(O):D(G,!1)})}h(b,T)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),Mt("submit",f,La(u)),h(e,d),ae()}var Hu=x('<div class="rcb-modal-backdrop svelte-17tslso"><!></div>');const Yu={hash:"svelte-17tslso",code:".rcb-modal-backdrop.svelte-17tslso {position:fixed;top:0;left:0;right:0;min-width:100%;width:100vw;width:100dvw;min-height:100%;height:100vh;height:100dvh;background-color:rgba(40, 40, 40, 0.75);display:flex;flex-direction:column;justify-content:space-around;z-index:1000001;}"};function Gu(e,r){H(e,Yu);var t=Hu(),n=q(t);pe(n,r,"default",{}),h(e,t)}var Wu=x('<div class="rcb-modal-container svelte-15w05wv"><main class="rcb-modal-main svelte-15w05wv"><!></main></div>');const Zu={hash:"svelte-15w05wv",code:`.rcb-modal-container.svelte-15w05wv {width:100%;}.rcb-modal-main.svelte-15w05wv {box-sizing:border-box;border-radius:var(--rc-shape-modal-border-radius);background-color:var(--rc-color-background);color:var(--rc-color-grey-text-dark);padding:40px;flex-direction:column;display:flex;}
96
97
 
97
- @media screen and (max-width: 960px) {.rcb-modal-container.svelte-1fufj5b {width:calc(100% - 32px);min-width:300px;max-width:640px;margin:auto;}.rcb-modal-main.svelte-1fufj5b {min-width:300px;max-width:640px;padding:32px;}
98
- }`};function zi(e,t){q(e,Fl);let r=m(t,"style",8,"");var n=ql(),i=T(n),o=T(i);re(o,t,"default",{}),F(()=>Q(i,"style",r())),_(e,n)}function jl(e,t){let r=m(t,"condition",8,!1);var n=oe(),i=L(n);j(i,r,o=>{Bl(o,{children:(a,s)=>{var l=oe(),c=L(l);re(c,t,"default",{}),_(a,l)},$$slots:{default:!0}})},o=>{var a=oe(),s=L(a);re(s,t,"default",{}),_(o,a)}),_(e,n)}const Hl=`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"
98
+ @media screen and (max-width: 960px) {.rcb-modal-container.svelte-15w05wv {width:calc(100% - 32px);min-width:300px;max-width:640px;margin:auto;}.rcb-modal-main.svelte-15w05wv {min-width:300px;max-width:640px;padding:32px;}
99
+ }`};function bo(e,r){H(e,Zu);let t=g(r,"style",8,"");var n=Wu(),a=q(n),o=q(a);pe(o,r,"default",{}),Z(()=>K(a,"style",t())),h(e,n)}function Qu(e,r){let t=g(r,"condition",8,!1);var n=ie(),a=j(n);{var o=i=>{Gu(i,{children:(l,u)=>{var c=ie(),d=j(c);pe(d,r,"default",{}),h(l,c)},$$slots:{default:!0}})},s=i=>{var l=ie(),u=j(l);pe(u,r,"default",{}),h(i,l)};U(a,i=>{t()?i(o):i(s,!1)})}h(e,n)}const Ju=`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"
99
100
  xmlns="http://www.w3.org/2000/svg">
100
101
  <g opacity="0.5" clip-path="url(#clip0_344_3390)">
101
102
  <path d="M7 18C5.9 18 5.01 18.9 5.01 20C5.01 21.1 5.9 22 7 22C8.1 22 9 21.1 9 20C9 18.9 8.1 18 7 18ZM1 2V4H3L6.6 11.59L5.25 14.04C5.09 14.32 5 14.65 5 15C5 16.1 5.9 17 7 17H19V15H7.42C7.28 15 7.17 14.89 7.17 14.75L7.2 14.63L8.1 13H15.55C16.3 13 16.96 12.59 17.3 11.97L20.88 5.48C20.96 5.34 21 5.17 21 5C21 4.45 20.55 4 20 4H5.21L4.27 2H1ZM17 18C15.9 18 15.01 18.9 15.01 20C15.01 21.1 15.9 22 17 22C18.1 22 19 21.1 19 20C19 18.9 18.1 18 17 18Z"
@@ -107,28 +108,26 @@
107
108
  </clipPath>
108
109
  </defs>
109
110
  </svg>
110
- `;var Vl=I('<div style="color:var(--rc-color-gray-text-dark);"><!></div>');function Gl(e){var t=Vl(),r=T(t);Pt(r,()=>Hl),_(e,t)}var $l=I('<div class="svelte-1ny4y2s">Sandbox</div>');const Yl={hash:"svelte-1ny4y2s",code:"div.svelte-1ny4y2s {background-color:var(--rc-color-warning);color:rgba(0,0,0,1);font-size:10px;font-weight:bold;text-transform:uppercase;padding:4px 10px;line-height:10px;border-radius:9px;margin:0px;margin-left:16px;}"};function zl(e){q(e,Yl);var t=$l();_(e,t)}var Kl=I('<div class="rcb-ui-layout svelte-wuqzav"><!></div>');const Ql={hash:"svelte-wuqzav",code:`.rcb-ui-layout.svelte-wuqzav {width:100vw;margin-right:auto;display:flex;justify-content:center;align-items:flex-start;position:relative;padding:0px 80px;box-sizing:border-box;}
111
-
112
- @media screen and (max-width: 960px) {.rcb-ui-layout.svelte-wuqzav {flex-direction:column;align-items:center;justify-content:center;height:100%;min-width:100%;padding:16px 0;}
113
- }
111
+ `;var Ku=x('<div style="color:var(--rc-color-gray-text-dark);"><!></div>');function Xu(e){var r=Ku(),t=q(r);Ur(t,()=>Ju),h(e,r)}var $u=x('<div class="svelte-ha0rzs">Sandbox</div>');const ec={hash:"svelte-ha0rzs",code:"div.svelte-ha0rzs {background-color:var(--rc-color-warning);color:rgba(0, 0, 0, 1);font-size:10px;font-weight:bold;text-transform:uppercase;padding:4px 10px;line-height:10px;border-radius:9px;margin:0px;margin-left:16px;}"};function rc(e){H(e,ec);var r=$u();h(e,r)}var tc=x('<div class="rcb-ui-layout svelte-1veyi7r"><!></div>');const nc={hash:"svelte-1veyi7r",code:`.rcb-ui-layout.svelte-1veyi7r {width:100vw;margin-right:auto;display:flex;justify-content:center;align-items:flex-start;position:relative;padding:0px 80px;box-sizing:border-box;}
114
112
 
115
- @media screen and (max-width: 960px) and (max-height: 960px) {.rcb-ui-layout.svelte-wuqzav {overflow-y:scroll;justify-content:flex-start;}
116
- }`};function Wl(e,t){q(e,Ql);let r=m(t,"style",8,"");var n=Kl(),i=T(n);re(i,t,"default",{}),F(()=>Q(n,"style",r())),_(e,n)}var Zl=I('<div class="rcb-ui-container svelte-1sfb5if"><!></div>');const Xl={hash:"svelte-1sfb5if",code:`.rcb-ui-container.svelte-1sfb5if {color-scheme:none;font-size:16px;line-height:1.5em;font-weight:400;font-family:-apple-system, "system-ui", "Segoe UI", Roboto, Oxygen, Ubuntu,
117
- Cantarell, "Open Sans", "Helvetica Neue", sans-serif;}`};function Jl(e,t){q(e,Xl);let r=m(t,"style",8,"");var n=Zl(),i=T(n);re(i,t,"default",{}),F(()=>Q(n,"style",r())),_(e,n)}var ec=I("<!> <!>",1),tc=I('<div class="rcb-ui-aside svelte-17dr902"><!></div>');const rc={hash:"svelte-17dr902",code:`.rcb-ui-aside.svelte-17dr902 {margin-right:16px;flex:320px 1 0;max-width:480px;}
113
+ @media screen and (max-width: 960px) {.rcb-ui-layout.svelte-1veyi7r {flex-direction:column;align-items:center;justify-content:center;height:100%;min-width:100%;padding:16px 0;}
114
+ }
118
115
 
119
- @media screen and (max-width: 960px) {.rcb-ui-aside.svelte-17dr902 {margin-right:0;margin-bottom:16px;min-width:100%;display:flex;flex-direction:column;align-items:center;flex:none;max-width:none;}
120
- }`};function nc(e,t){W(t,!1),q(e,rc);let r=m(t,"brandingAppearance",8,void 0),n=new rn(r()).productInfoStyleVars;Me();var i=tc();Q(i,"style",n);var o=T(i);zi(o,{children:(a,s)=>{var l=ec(),c=L(l);re(c,t,"header",{});var u=D(c,2);re(u,t,"default",{}),_(a,l)},$$slots:{default:!0}}),_(e,i),Z()}var ic=I("<!> <!>",1),oc=I('<div class="rcb-ui-main svelte-vpgys"><!></div>');const ac={hash:"svelte-vpgys",code:`.rcb-ui-main.svelte-vpgys {flex:480px 1 0;max-width:640px;}
116
+ @media screen and (max-width: 960px) and (max-height: 960px) {.rcb-ui-layout.svelte-1veyi7r {overflow-y:scroll;justify-content:flex-start;}
117
+ }`};function ac(e,r){H(e,nc);let t=g(r,"style",8,"");var n=tc(),a=q(n);pe(a,r,"default",{}),Z(()=>K(n,"style",t())),h(e,n)}var oc=x('<div class="rcb-ui-container svelte-4xe07"><!></div>');const sc={hash:"svelte-4xe07",code:`.rcb-ui-container.svelte-4xe07 {color-scheme:none;font-size:16px;line-height:1.5em;font-weight:400;font-family:-apple-system, "system-ui", "Segoe UI", Roboto, Oxygen, Ubuntu,
118
+ Cantarell, "Open Sans", "Helvetica Neue", sans-serif;}`};function ic(e,r){H(e,sc);let t=g(r,"style",8,"");var n=oc(),a=q(n);pe(a,r,"default",{}),Z(()=>K(n,"style",t())),h(e,n)}var lc=x("<!> <!>",1),uc=x('<div class="rcb-ui-aside svelte-2nbj9u"><!></div>');const cc={hash:"svelte-2nbj9u",code:`.rcb-ui-aside.svelte-2nbj9u {margin-right:16px;flex:320px 1 0;max-width:480px;}
121
119
 
122
- @media screen and (max-width: 960px) {.rcb-ui-main.svelte-vpgys {flex:none;max-width:none;min-width:100%;}
123
- }`};function sc(e,t){W(t,!1),q(e,ac);let r=m(t,"brandingAppearance",8,void 0),n=new rn(r()).formStyleVars;Me();var i=oc();Q(i,"style",n);var o=T(i);zi(o,{style:"min-height: 360px;",children:(a,s)=>{var l=ic(),c=L(l);re(c,t,"header",{});var u=D(c,2);re(u,t,"default",{}),_(a,l)},$$slots:{default:!0}}),_(e,i),Z()}var lc=I("<!> <!>",1),cc=I("<!> <!> <!> <!> <!> <!> <!>",1),uc=I("<!> <!>",1);function fc(e,t){W(t,!1);let r=m(t,"asModal",8,!0),n=m(t,"customerEmail",12),i=m(t,"appUserId",8),o=m(t,"rcPackage",8),a=m(t,"purchaseOption",8),s=m(t,"brandingInfo",8),l=m(t,"onFinished",8),c=m(t,"onError",8),u=m(t,"onClose",8),f=m(t,"purchases",8),d=m(t,"purchaseOperationHelper",8),g=_e(""),h=_e(null),b=_e(null),x=_e(null);const y=o().rcBillingProduct.identifier??null,w=o().rcBillingProduct.defaultPurchaseOption,k=a()?a():w;let p=_e("present-offer"),P=null;const C=["present-offer","needs-auth-info","processing-auth-info","needs-payment-info","polling-purchase-status","loading"];pr(async()=>{var R;if(N(h,o().rcBillingProduct),N(g,Yi((R=s())==null?void 0:R.appearance)),v(p)==="present-offer"){n()?A():N(p,"needs-auth-info");return}});const V=()=>{u()()},A=()=>{if(y===null){X(new te(ge.ErrorSettingUpPurchase,"Product ID was not set before purchase."));return}else v(p)==="present-offer"&&N(p,"loading");if(!n()){X(new te(ge.MissingEmailError));return}d().startPurchase(i(),y,k,n(),o().rcBillingProduct.presentedOfferingContext).then(R=>{if(R.next_action==="collect_payment_info"){N(x,null),N(p,"needs-payment-info"),N(b,R);return}if(R.next_action==="completed"){N(x,null),N(p,"success");return}}).catch(R=>{X(R)})},z=R=>{if(v(p)==="needs-auth-info"){R&&(n(R.email),N(p,"processing-auth-info")),A();return}if(v(p)==="needs-payment-info"){N(p,"polling-purchase-status"),d().pollCurrentPurchaseForCompletion().then($=>{N(p,"success"),P=$.redemptionInfo}).catch($=>{X($)});return}if(v(p)==="success"||v(p)==="error"){l()(P);return}N(p,"success")},X=R=>{if(v(p)==="processing-auth-info"&&R.isRecoverable()){N(x,R),N(p,"needs-auth-info");return}N(x,R),N(p,"error")},Ie=()=>{c()(v(x)??new te(ge.UnknownError,"Unknown error without state set."))};Me(),Jl(e,{children:(R,$)=>{jl(R,{get condition(){return r()},children:(Ae,We)=>{Wl(Ae,{get style(){return v(g)},children:(qe,gt)=>{var De=uc(),Nt=L(De);j(Nt,()=>C.includes(v(p)),Fe=>{var Xe=fe(()=>{var je;return(je=s())==null?void 0:je.appearance});nc(Fe,{get brandingAppearance(){return v(Xe)},children:(je,ht)=>{var Je=oe(),et=L(Je);j(et,()=>v(h)&&k,He=>{var tt=fe(()=>{var me;return(me=s())==null?void 0:me.appearance});Pi(He,{get productDetails(){return v(h)},get brandingAppearance(){return v(tt)},purchaseOption:k})}),_(je,Je)},$$slots:{default:!0,header:(je,ht)=>{en(je,{slot:"header",children:(Je,et)=>{var He=lc(),tt=L(He);Ni(tt,{get brandingInfo(){return s()}});var me=D(tt,2);j(me,()=>f().isSandbox(),Oe=>{zl(Oe)},Oe=>{Gl(Oe)}),_(Je,He)},$$slots:{default:!0}})}}})});var Ze=D(Nt,2),Ar=fe(()=>{var Fe;return(Fe=s())==null?void 0:Fe.appearance});sc(Ze,{get brandingAppearance(){return v(Ar)},children:(Fe,Xe)=>{var je=cc(),ht=L(je);j(ht,()=>v(p)==="present-offer"&&v(h)&&k,Pe=>{Pi(Pe,{get productDetails(){return v(h)},purchaseOption:k})});var Je=D(ht,2);j(Je,()=>v(p)==="present-offer"&&!v(h),Pe=>{Wr(Pe)});var et=D(Je,2);j(et,()=>v(p)==="needs-auth-info"||v(p)==="processing-auth-info",Pe=>{var rr=fe(()=>v(p)==="processing-auth-info");Ul(Pe,{onContinue:z,onClose:V,get processing(){return v(rr)},get lastError(){return v(x)}})});var He=D(et,2);j(He,()=>v(b)&&(v(p)==="needs-payment-info"||v(p)==="polling-purchase-status")&&v(h)&&k,Pe=>{var rr=fe(()=>v(p)==="polling-purchase-status");Tl(Pe,{get paymentInfoCollectionMetadata(){return v(b)},onContinue:z,onClose:V,onError:X,get processing(){return v(rr)},get productDetails(){return v(h)},purchaseOptionToUse:k,get brandingInfo(){return s()}})});var tt=D(He,2);j(tt,()=>v(p)==="loading",Pe=>{Wr(Pe)});var me=D(tt,2);j(me,()=>v(p)==="error",Pe=>{var rr=fe(()=>v(x)??new te(ge.UnknownError,"Unknown error without state set.")),Du=fe(()=>{var uo;return(uo=s())==null?void 0:uo.seller_company_support_email});Us(Pe,{get brandingInfo(){return s()},get lastError(){return v(rr)},get supportEmail(){return v(Du)},get productDetails(){return v(h)},onContinue:Ie})});var Oe=D(me,2);j(Oe,()=>v(p)==="success",Pe=>{Fs(Pe,{get productDetails(){return v(h)},get brandingInfo(){return s()},onContinue:z})}),_(Fe,je)},$$slots:{default:!0}}),_(qe,De)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),Z()}function dc(e){return e.expires_date==null?!0:new Date(e.expires_date)>new Date}function vc(e,t,r,n){const i=t.product_identifier;if(i in r)return gc(e,t,r[i]);if(i in n)return hc(e,t,n[i]);throw new ne(ae.CustomerInfoError,"Could not find entitlement product in subscriptions or non-subscriptions.")}function gc(e,t,r){return{identifier:e,isActive:dc(t),willRenew:bc(t,r),store:(r==null?void 0:r.store)??"unknown",latestPurchaseDate:new Date(t.purchase_date),originalPurchaseDate:new Date(t.purchase_date),expirationDate:Er(t.expires_date),productIdentifier:t.product_identifier,unsubscribeDetectedAt:Er(r==null?void 0:r.unsubscribe_detected_at),billingIssueDetectedAt:Er(r==null?void 0:r.billing_issues_detected_at),isSandbox:(r==null?void 0:r.is_sandbox)??!1,periodType:(r==null?void 0:r.period_type)??"normal"}}function hc(e,t,r){return{identifier:e,isActive:!0,willRenew:!1,store:r.store,latestPurchaseDate:new Date(t.purchase_date),originalPurchaseDate:new Date(r.original_purchase_date),expirationDate:null,productIdentifier:t.product_identifier,unsubscribeDetectedAt:null,billingIssueDetectedAt:null,isSandbox:r.is_sandbox,periodType:"normal"}}function _c(e,t,r){const n={},i={};for(const o in e){const a=vc(o,e[o],t,r);n[o]=a,a.isActive&&(i[o]=a)}return{all:n,active:i}}function Er(e){return e==null?null:new Date(e)}function pc(e){const t=yc(e),r=e.subscriber,n=Ec(r.non_subscriptions);return{entitlements:_c(r.entitlements,r.subscriptions,n),allExpirationDatesByProduct:t,allPurchaseDatesByProduct:mc(e,n),activeSubscriptions:wc(t),managementURL:r.management_url,requestDate:new Date(e.request_date),firstSeenDate:new Date(r.first_seen),originalPurchaseDate:Er(r.original_purchase_date),originalAppUserId:e.subscriber.original_app_user_id}}function bc(e,t){if(t==null)return!1;const r=t.store=="promotional",n=e.expires_date==null,i=t.unsubscribe_detected_at!=null,o=t.billing_issues_detected_at!=null;return!(r||n||i||o)}function mc(e,t){const r={};for(const n in e.subscriber.subscriptions){const i=e.subscriber.subscriptions[n];r[n]=new Date(i.purchase_date)}for(const n in t){const i=t[n].purchase_date;i==null?r[n]=null:r[n]=new Date(i)}return r}function yc(e){const t={};for(const r in e.subscriber.subscriptions){const n=e.subscriber.subscriptions[r];n.expires_date==null?t[r]=null:t[r]=new Date(n.expires_date)}return t}function wc(e){const t=new Set,r=new Date;for(const n in e){const i=e[n];(i==null||i>r)&&t.add(n)}return t}function Ec(e){const t={};for(const r in e){if(e[r].length===0)continue;const n=e[r].length;t[r]=e[r][n-1]}return t}const xc="0.13.1",Ic="https://api.revenuecat.com";var xr;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.EARLY_HINTS=103]="EARLY_HINTS",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(xr||(xr={}));function nn(e){return e?e.startsWith("rcb_sb_"):!1}async function At(e,t){const{apiKey:r,body:n,headers:i,httpConfig:o}=t,s=`${(o==null?void 0:o.proxyURL)??Ic}${e.urlPath()}`;try{const l=await fetch(s,{method:e.method,headers:Ac(r,i,o==null?void 0:o.additionalHeaders),body:kc(n)});return await Pc(l,e),await l.json()}catch(l){throw l instanceof TypeError?new ne(ae.NetworkError,Wt.getPublicMessage(ae.NetworkError),l.message):l}}async function Pc(e,t){const r=e.status;if(r>=xr.INTERNAL_SERVER_ERROR)on(t,r,await e.text());else if(r>=xr.BAD_REQUEST){const n=await e.json(),i=n?JSON.stringify(n):null,o=n==null?void 0:n.code,a=n==null?void 0:n.message;if(o!=null){const s=Wt.convertCodeToBackendErrorCode(o);if(s==null)on(t,r,i,o);else throw ne.getForBackendError(s,a)}else on(t,r,i)}}function on(e,t,r,n){throw new ne(ae.UnknownBackendError,"Unknown backend error.",`Request: ${e.name}. Status code: ${t}. Body: ${r}.`,{backendErrorCode:n})}function kc(e){return e==null?null:JSON.stringify(e)}const Ki="Authorization",Qi="Content-Type",Wi="Accept",Zi="X-Platform",Xi="X-Version",Ji="X-Is-Sandbox",Tc=new Set([Ki,Qi,Wi,Zi,Xi,Ji]);function Ac(e,t,r){let n={[Ki]:`Bearer ${e}`,[Qi]:"application/json",[Wi]:"application/json",[Zi]:"web",[Xi]:xc,[Ji]:`${nn(e)}`};return t&&(n={...n,...t}),r&&(n={...r,...n}),n}const eo="/v1/subscribers",Ir="/rcbilling/v1";class Oc{constructor(t){B(this,"appUserId");B(this,"method","GET");B(this,"name","getOfferings");this.appUserId=t}urlPath(){const t=encodeURIComponent(this.appUserId);return`${eo}/${t}/offerings`}}class Nc{constructor(){B(this,"method","POST");B(this,"name","purchase")}urlPath(){return`${Ir}/purchase`}}class Sc{constructor(t,r,n){B(this,"method","GET");B(this,"name","getProducts");B(this,"appUserId");B(this,"productIds");B(this,"currency");this.appUserId=t,this.productIds=r,this.currency=n}urlPath(){const t=encodeURIComponent(this.appUserId),r=this.productIds.map(encodeURIComponent).join("&id="),n=this.currency?`&currency=${this.currency}`:"";return`${Ir}/subscribers/${t}/products?id=${r}${n}`}}class Rc{constructor(t){B(this,"method","GET");B(this,"name","getCustomerInfo");B(this,"appUserId");this.appUserId=t}urlPath(){const t=encodeURIComponent(this.appUserId);return`${eo}/${t}`}}class Mc{constructor(){B(this,"method","GET");B(this,"name","getBrandingInfo")}urlPath(){return`${Ir}/branding`}}class Dc{constructor(t){B(this,"method","GET");B(this,"name","getCheckoutStatus");B(this,"operationSessionId");this.operationSessionId=t}urlPath(){return`${Ir}/checkout/${this.operationSessionId}`}}const an={};class Uc{constructor(t,r=an){B(this,"API_KEY");B(this,"httpConfig");this.API_KEY=t,this.httpConfig=r}async getOfferings(t){return await At(new Oc(t),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getCustomerInfo(t){return await At(new Rc(t),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getProducts(t,r,n){return await At(new Sc(t,r,n),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getBrandingInfo(){return await At(new Mc,{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async postPurchase(t,r,n,i,o){const a={app_user_id:t,product_id:r,email:n,price_id:o.priceId,presented_offering_identifier:i.offeringIdentifier};return o.id!=="base_option"&&(a.offer_id=o.id),i.targetingContext&&(a.applied_targeting_rule={rule_id:i.targetingContext.ruleId,revision:i.targetingContext.revision}),i.placementIdentifier&&(a.presented_placement_identifier=i.placementIdentifier),await At(new Nc,{apiKey:this.API_KEY,body:a,httpConfig:this.httpConfig})}async getCheckoutStatus(t){return await At(new Dc(t),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}}function Lc(e){if(!/^rcb_[a-zA-Z0-9_.-]+$/.test(e))throw new ne(ae.InvalidCredentialsError,"Invalid API key. Use your RevenueCat Billing API key.")}function Cc(e){if(new Set(["no_user","null","none","nil","(null)","NaN","\\x00","","unidentified","undefined","unknown"]).has(e)||e.includes("/"))throw new ne(ae.InvalidAppUserIdError,'Provided user id: "'+e+'" is not valid. See https://www.revenuecat.com/docs/customers/user-ids#tips-for-setting-app-user-ids for more information.')}function Bc(e){if(e!=null&&e.endsWith("/"))throw new ne(ae.ConfigurationError,"Invalid proxy URL. The proxy URL should not end with a trailing slash.")}function qc(e){if(e){for(const t in e)if(Tc.has(t))throw new ne(ae.ConfigurationError,"Invalid additional headers. Some headers are reserved for internal use.")}}var sn=(e=>(e.Current="current",e))(sn||{});function Fc(e,t){async function r(...n){return await this.preload(),await e.call(this,...n)}return r}const to=(e,t)=>({...e,rcBillingProduct:{...e.rcBillingProduct,presentedOfferingContext:{...e.rcBillingProduct.presentedOfferingContext,placementIdentifier:t}}}),vt=(e,t)=>e==null?null:to(e,t),jc=(e,t,r)=>{const n=e.offering_ids_by_placement??null;if(n==null)return null;const i=e.fallback_offering_id??null;let o;if(r in n){const s=n[r]??null;if(s==null)return null;o=t[s],o==null&&(o=t[i])}else o=t[i];if(o==null)return null;const a=Object.fromEntries(Object.entries(o.packagesById).map(([s,l])=>[s,to(l,r)]));return{...o,packagesById:a,availablePackages:Object.values(a),weekly:vt(o.weekly,r),monthly:vt(o.monthly,r),twoMonth:vt(o.twoMonth,r),threeMonth:vt(o.threeMonth,r),sixMonth:vt(o.sixMonth,r),annual:vt(o.annual,r),lifetime:vt(o.lifetime,r)}};function Hc(e,t){const r={};t.product_details.forEach(o=>{r[o.identifier]=o});const n={};e.offerings.forEach(o=>{const a=o.identifier===e.current_offering_id,s=Ha(a,o,r,e.targeting);s!=null&&(n[o.identifier]=s)});const i=e.current_offering_id?n[e.current_offering_id]??null:null;return Object.keys(n).length==0&&Y.debugLog("Empty offerings. Please make sure you've configured offerings correctly in the RevenueCat dashboard and that the products are properly configured."),{all:n,current:i}}var ln;(function(e){e.body_s="p",e.body_m="p",e.body_l="p",e.body_xl="p",e.heading_xs="h6",e.heading_s="h5",e.heading_m="h4",e.heading_l="h3",e.heading_xl="h2",e.heading_xxl="h1"})(ln||(ln={}));var cn;(function(e){e[e.extra_light=100]="extra_light",e[e.thin=200]="thin",e[e.light=300]="light",e[e.regular=400]="regular",e[e.medium=500]="medium",e[e.semi_bold=600]="semi_bold",e[e.bold=700]="bold",e[e.extra_bold=800]="extra_bold",e[e.black=900]="black"})(cn||(cn={}));var un;(function(e){e.body_s="13px",e.body_m="14px",e.body_l="15px",e.body_xl="16px",e.heading_xs="14px",e.heading_s="16px",e.heading_m="18px",e.heading_l="20px",e.heading_xl="26px",e.heading_xxl="32px"})(un||(un={}));var fn;(function(e){e.vertical="column",e.horizontal="row"})(fn||(fn={}));var dn;(function(e){e.top="flex-start",e.leading="flex-start",e.center="center",e.bottom="flex-end",e.trailing="flex-end"})(dn||(dn={}));var vn;(function(e){e.space_between="space-between",e.space_around="space-around",e.space_evenly="space-evenly",e.start="flex-start",e.center="center",e.end="flex-end"})(vn||(vn={}));const Ot=[];function Vc(e,t){return{subscribe:Gc(e,t).subscribe}}function Gc(e,t=$e){let r=null;const n=new Set;function i(s){if(kn(e,s)&&(e=s,r)){const l=!Ot.length;for(const c of n)c[1](),Ot.push(c,e);if(l){for(let c=0;c<Ot.length;c+=2)Ot[c][0](Ot[c+1]);Ot.length=0}}}function o(s){i(s(e))}function a(s,l=$e){const c=[s,l];return n.add(c),n.size===1&&(r=t(i,o)||$e),s(e),()=>{n.delete(c),n.size===0&&r&&(r(),r=null)}}return{set:i,update:o,subscribe:a}}const $c=Vc(!1,e=>{if(typeof window<"u"){const t=window.matchMedia("(prefers-color-scheme: dark)");e(t.matches);const r=n=>e(n.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)}return()=>{}}),Yc=(e,t)=>{var r;(r=t.onclick)==null||r.call(t)};var zc=I("<button><!></button>");const Kc={hash:"svelte-g3k3fu",code:"button.svelte-g3k3fu {border:none;cursor:pointer;background:transparent;padding:0;width:100%;display:flex;align-items:center;justify-content:center;}"};function ro(e,t){W(t,!0),q(e,Kc);var r=zc();r.__click=[Yc,t];var n=T(r);si(n,()=>t.children??$e),F(()=>{zr(r,`${t.class??""} svelte-g3k3fu`),r.disabled=!t.onclick,Q(r,"style",t.style)}),_(e,r),Z()}Yr(["click"]);function no(e,t){return!e||!t?"":{[`--${t}-block-start`]:`${e.top??0}px`,[`--${t}-inline-end`]:`${e.trailing??0}px`,[`--${t}-block-end`]:`${e.bottom??0}px`,[`--${t}-inline-start`]:`${e.leading??0}px`}}function Qc(e){return ln[e]}function Pr({colorMap:e,colorMode:t="light",fallback:r="FFFFFF"}){const n=e==null?void 0:e[t];if(!n)return r;let i="";switch(n.type){case"hex":case"alias":return n.value??r;case"linear":return i=(n.points||[]).map(o=>`${o.color} ${o.percent}%`).join(", "),`linear-gradient(${n.degrees}deg, ${i})`;case"radial":return i=(n.points||[]).map(o=>`${o.color} ${o.percent}%`).join(", "),`radial-gradient(${i})`}return r}function Wc(e,t="light"){const r=Pr({colorMap:e.color,colorMode:t});return`${e.width}px solid ${r}`}function io(e){return`${e.top_leading}px ${e.top_trailing}px ${e.bottom_trailing}px ${e.bottom_leading}px`}function oo({backgroundColor:e,border:t,margin:r,padding:n,textColor:i,colorMode:o="light",shape:a,shadow:s}){const l={"--margin-block-start":"0px","--margin-inline-end":"0px","--margin-block-end":"0px","--margin-inline-start":"0px","--padding-block-start":"0px","--padding-inline-end":"0px","--padding-block-end":"0px","--padding-inline-start":"0px","--background":"transparent","--text-color":"#000000","--border":"none","--border-radius":"0px","--shadow":"none"};return n&&Object.assign(l,no(n,"padding")),r&&Object.assign(l,no(r,"margin")),e&&(l["--background"]=Pr({colorMap:e,colorMode:o,fallback:"transparent"})),i&&(l["--text-color"]=Pr({colorMap:i,colorMode:o,fallback:"#000000"})),t&&(l["--border"]=Wc(t,o)),(a==null?void 0:a.type)==="rectangle"&&a.corners&&(l["--border-radius"]=io(a.corners)),(a==null?void 0:a.type)==="pill"&&(l["--border-radius"]="9999px"),s&&(l["--shadow"]=`${s.x}px ${s.y}px ${s.radius}px
124
- ${Pr({colorMap:s.color,colorMode:o,fallback:"#000000"})}`),l}function gn(e){function t(o){return o.type==="fixed"?`${o.value}px`:o.type==="fit"?"fit-content":o.type==="fill"?navigator.userAgent.match(/firefox|fxios/i)?"-moz-available":"-webkit-fill-available":"unset"}const r=t(e.width),n=t(e.height),i=e.width.type==="fill"||e.height.type==="fill";return{"--width":r,"--height":n,"--flex":i?"unset":"0 1 auto"}}function Zc(e,t){return t?{"--background":`linear-gradient(${t.map(r=>{var n;return(n=r[e])==null?void 0:n.value}).join(", ")})`}:{"--background":"none"}}const Xc=e=>{let t={"--corner-radius":"0px","--clip-path":"none"};return(e==null?void 0:e.type)==="circle"&&(t["--corner-radius"]="50%"),(e==null?void 0:e.type)==="rectangle"&&e.corners&&(t["--corner-radius"]=io(e.corners)),(e==null?void 0:e.type)==="convex"&&(t["--corner-radius"]="0 0 50% 50%;"),(e==null?void 0:e.type)==="concave"&&(t["--clip-path"]="polygon(0 0, 100% 0, 100% 100%, 50% 110%, 0 100%);"),t};function Jc(e){const t={"--direction":"initial","--alignment":"initial","--distribution":"initial"};return e.type==="zlayer"||(t["--direction"]=fn[e.type],t["--alignment"]=dn[e.alignment],e.distribution&&(t["--distribution"]=vn[e.distribution])),t}function eu(e){const{font_size:t,horizontal_alignment:r,font_weight:n,font_name:i}=e,o={"--text-align":"initial","--font-weight":400,"--font-size":"initial","--font-family":"sans-serif"};return o["--text-align"]=r,o["--font-weight"]=cn[n],o["--font-size"]=un[t],o["--font-family"]=i||"sans-serif",o}function kr(e){return Object.entries(e).map(([t,r])=>`${t}: ${r}`).join("; ")}function ao(e,t,r,n){const i=(n[r]||{})[e];return(n[t]||{})[e]?n[t][e]:i}function tu(e){const t=n=>{if(n.type==="package"&&n.is_selected_by_default)return n;if(n.components)for(let i of n.components){const o=t(i);if(o)return o}if(n.stack!==void 0){const i=t(n.stack);if(i)return i}},r=t(e.components_config.base.stack);if(r!==void 0)return r.package_id}const ru=e=>{const{background_color:t,margin:r,padding:n,spacing:i,size:o,border:a,shape:s,colorMode:l,shadow:c,dimension:u}=e,f=oo({backgroundColor:t,margin:r,padding:n,border:a,colorMode:l,shape:s,shadow:c}),d=Jc(u);return{...gn(o),...d,...f,"--spacing":`${i||0}px`}};var nu=I('<div class="stack svelte-hkx1fg"></div>');const iu={hash:"svelte-hkx1fg",code:".stack.svelte-hkx1fg {box-sizing:border-box;display:flex;flex-direction:var(--direction, unset);width:var(--width, unset);height:var(--height, unset);gap:var(--spacing, 0);background:var(--background, none);border:var(--border, none);border-radius:var(--border-radius, 0);box-shadow:var(--shadow, none);justify-content:var(--distribution, flex-start);align-items:var(--alignment, flex-start);padding-block-start:var(--padding-block-start, 0);padding-inline-end:var(--padding-inline-end, 0);padding-block-end:var(--padding-block-end, 0);padding-inline-start:var(--padding-inline-start, 0);margin-block-start:var(--margin-block-start, 0);margin-inline-end:var(--margin-inline-end, 0);margin-block-end:var(--margin-block-end, 0);margin-inline-start:var(--margin-inline-start, 0);flex:var(--flex, 0 1 auto);}"};function tr(e,t){W(t,!0),q(e,iu);const r=Kr(t,["$$slots","$$events","$$legacy","id","components","labels","onAction","purchaseState","variableDictionary"]),n=ee(()=>kr(ru({id:t.id,components:t.components,labels:t.labels,onAction:t.onAction,purchaseState:t.purchaseState,...r})));var i=nu();oi(i,21,()=>t.components,ii,(o,a)=>{hn(o,{get nodeData(){return v(a)},get labels(){return t.labels},get onAction(){return t.onAction},get purchaseState(){return t.purchaseState},get variableDictionary(){return t.variableDictionary}})}),F(()=>{Q(i,"id",t.id),Q(i,"style",v(n))}),_(e,i),Z()}function ou(e,t){W(t,!0),ro(e,{onclick:()=>{t.onAction&&t.onAction(t.action)},children:(n,i)=>{tr(n,Qt(()=>t.stack,{get labels(){return t.labels},get purchaseState(){return t.purchaseState},get variableDictionary(){return t.variableDictionary}}))},$$slots:{default:!0}}),Z()}const au=e=>{const{font_size:t="body_m",color:r={dark:{type:"hex",value:"#000000"},light:{type:"hex",value:"#000000"}},background_color:n={dark:{type:"hex",value:"#FFFFFF"},light:{type:"hex",value:"#FFFFFF"}},padding:i,margin:o,colorMode:a,size:s}=e,l=Qc(t),c=eu(e),u=oo({backgroundColor:n,textColor:r,margin:o,padding:i,colorMode:a}),f=gn(s);return{textStyles:{...c,...u,...f},tagToRender:l}},su={hash:"svelte-9lrpkv",code:".text-block.svelte-9lrpkv {display:block;padding-block-start:var(--padding-block-start, unset);padding-inline-end:var(--padding-inline-end, unset);padding-block-end:var(--padding-block-end, unset);padding-inline-start:var(--padding-inline-start, unset);margin-block-start:var(--margin-block-start, unset);margin-inline-end:var(--margin-inline-end, unset);margin-block-end:var(--margin-block-end, unset);margin-inline-start:var(--margin-inline-start, unset);color:var(--text-color, #ffffff);background:var(--background, none);font-size:var(--font-size, 1rem);font-weight:var(--font-weight, normal);text-align:var(--text-align, center);height:var(--height, unset);width:var(--width, unset);font-family:var(--font-family, sans-serif);}"};function lu(e,t){W(t,!0),q(e,su);const r=m(t,"styleVariables",3,""),n=m(t,"component",3,"p");var i=oe(),o=L(i);li(o,n,!1,(a,s)=>{let l;F(()=>l=ci(a,l,{id:t.id,style:r(),class:"text-block"},"svelte-9lrpkv",a.namespaceURI===Dt,a.nodeName.includes("-")));var c=oe(),u=L(c);si(u,()=>t.children??$e),_(s,c)}),_(e,i),Z()}const cu=["product_name","price","price_per_period","price_per_period_full","total_price_and_per_month","total_price_and_per_month_full","sub_price_per_month","sub_price_per_week","sub_duration","sub_duration_in_months","sub_period","sub_period_length","sub_period_abbreviated","sub_offer_duration","sub_offer_duration_2","sub_offer_price","sub_offer_price_2","sub_relative_discount"],uu=({value:e="",variableDictionary:t})=>t?cu.reduce((r,n)=>{var o;return r.replaceAll(`{{ ${n} }}`,((o=t[n])==null?void 0:o.toString())||"N/A")},e):e;function fu(e,t){W(t,!0);const r=Kr(t,["$$slots","$$events","$$legacy","id","labels","text_lid","purchaseState","variableDictionary"]),n=ee(()=>au({id:t.id,labels:t.labels,text_lid:t.text_lid,purchaseState:t.purchaseState,...r})),i=ee(()=>v(n).tagToRender),o=ee(()=>v(n).textStyles),a=ee(()=>kr(v(o))),s=ee(()=>ao(t.text_lid,t.purchaseState.locale,t.purchaseState.defaultLocale,t.labels)),l=ee(()=>uu({value:v(s),variableDictionary:t.variableDictionary}));lu(e,{get styleVariables(){return v(a)},get component(){return v(i)},get id(){return t.id},children:(c,u)=>{var f=at();F(()=>de(f,v(l))),_(c,f)},$$slots:{default:!0}}),Z()}function hn(e,t){W(t,!0);const r=Aa(),n=()=>Ta($c,"$prefersDarkMode",r),i={text:fu,stack:tr,image:bu,button:ou,purchase_button:yu,package:Iu,footer:ku},o=ee(()=>i[t.nodeData.type]);var a=oe(),s=L(a);ba(s,()=>v(o),(l,c)=>{c(l,Qt(()=>t.nodeData||{},{get labels(){return t.labels},get prefersDarkMode(){return n()},get onAction(){return t.onAction},get purchaseState(){return t.purchaseState},get variableDictionary(){return t.variableDictionary},children:(u,f)=>{var d=oe(),g=L(d);oi(g,17,()=>t.nodeData.components,ii,(h,b)=>{hn(h,{get nodeData(){return v(b)},get labels(){return t.labels},get onAction(){return t.onAction},get purchaseState(){return t.purchaseState},get variableDictionary(){return t.variableDictionary}})}),_(u,d)},$$slots:{default:!0}}))}),_(e,a),Z()}var du=I('<div class="paywall svelte-1f98y3q"><!></div>');const vu={hash:"svelte-1f98y3q",code:`
125
- /* 1. Use a more-intuitive box-sizing model */.svelte-1f98y3q,
126
- .svelte-1f98y3q::before,
127
- .svelte-1f98y3q::after {box-sizing:border-box;}
120
+ @media screen and (max-width: 960px) {.rcb-ui-aside.svelte-2nbj9u {margin-right:0;margin-bottom:16px;min-width:100%;display:flex;flex-direction:column;align-items:center;flex:none;max-width:none;}
121
+ }`};function _c(e,r){ne(r,!1),H(e,cc);let t=g(r,"brandingAppearance",8,void 0),n=new Fn(t()).productInfoStyleVars;ze();var a=uc();K(a,"style",n);var o=q(a);bo(o,{children:(s,i)=>{var l=lc(),u=j(l);pe(u,r,"header",{});var c=N(u,2);pe(c,r,"default",{}),h(s,l)},$$slots:{default:!0}}),h(e,a),ae()}var dc=x("<!> <!>",1),pc=x('<div class="rcb-ui-main svelte-kxew5e"><!></div>');const fc={hash:"svelte-kxew5e",code:`.rcb-ui-main.svelte-kxew5e {flex:480px 1 0;max-width:640px;}
128
122
 
129
- /* 2. Remove default margin */.svelte-1f98y3q {margin:0;}
123
+ @media screen and (max-width: 960px) {.rcb-ui-main.svelte-kxew5e {flex:none;max-width:none;min-width:100%;}
124
+ }`};function mc(e,r){ne(r,!1),H(e,fc);let t=g(r,"brandingAppearance",8,void 0),n=new Fn(t()).formStyleVars;ze();var a=pc();K(a,"style",n);var o=q(a);bo(o,{style:"min-height: 360px;",children:(s,i)=>{var l=dc(),u=j(l);pe(u,r,"header",{});var c=N(u,2);pe(c,r,"default",{}),h(s,l)},$$slots:{default:!0}}),h(e,a),ae()}var hc=x("<!> <!>",1),yc=x("<!> <!> <!> <!> <!> <!> <!>",1),gc=x("<!> <!>",1);function vc(e,r){ne(r,!1);let t=g(r,"asModal",8,!0),n=g(r,"customerEmail",12),a=g(r,"appUserId",8),o=g(r,"rcPackage",8),s=g(r,"purchaseOption",8),i=g(r,"brandingInfo",8),l=g(r,"onFinished",8),u=g(r,"onError",8),c=g(r,"onClose",8),d=g(r,"purchases",8),_=g(r,"purchaseOperationHelper",8),f=g(r,"selectedLocale",8,or),m=g(r,"defaultLocale",8,or),y=g(r,"customTranslations",24,()=>({})),w=Se(""),P=Se(null),E=Se(null),I=Se(null);const b=o().rcBillingProduct.identifier??null,v=o().rcBillingProduct.defaultPurchaseOption,T=s()?s():v;let k=Se("present-offer"),O=null;const G=["present-offer","needs-auth-info","processing-auth-info","needs-payment-info","polling-purchase-status","loading"];pn(Sr,new Ve(y(),f(),m())),Ct(async()=>{var M;if(A(P,o().rcBillingProduct),A(w,vo((M=i())==null?void 0:M.appearance)),p(k)==="present-offer"){n()?oe():A(k,"needs-auth-info");return}});const D=()=>{c()()},oe=()=>{if(b===null){we(new me(ce.ErrorSettingUpPurchase,"Product ID was not set before purchase."));return}else p(k)==="present-offer"&&A(k,"loading");if(!n()){we(new me(ce.MissingEmailError));return}_().startPurchase(a(),b,T,n(),o().rcBillingProduct.presentedOfferingContext).then(M=>{if(M.next_action==="collect_payment_info"){A(I,null),A(k,"needs-payment-info"),A(E,M);return}if(M.next_action==="completed"){A(I,null),A(k,"success");return}}).catch(M=>{we(M)})},_e=M=>{if(p(k)==="needs-auth-info"){M&&(n(M.email),A(k,"processing-auth-info")),oe();return}if(p(k)==="needs-payment-info"){A(k,"polling-purchase-status"),_().pollCurrentPurchaseForCompletion().then(se=>{A(k,"success"),O=se.redemptionInfo}).catch(se=>{we(se)});return}if(p(k)==="success"||p(k)==="error"){l()(O);return}A(k,"success")},we=M=>{if(p(k)==="processing-auth-info"&&M.isRecoverable()){A(I,M),A(k,"needs-auth-info");return}A(I,M),A(k,"error")},Y=()=>{u()(p(I)??new me(ce.UnknownError,"Unknown error without state set."))};ze(),ic(e,{children:(M,se)=>{Qu(M,{get condition(){return t()},children:(Pe,sr)=>{ac(Pe,{get style(){return p(w)},children:(hr,Wt)=>{var Ke=gc(),qr=j(Ke);{var ir=ke=>{var gr=re(()=>{var L;return(L=i())==null?void 0:L.appearance});_c(ke,{get brandingAppearance(){return p(gr)},children:(L,$)=>{var de=ie(),Ie=j(de);{var $e=je=>{var Ee=re(()=>{var He;return(He=i())==null?void 0:He.appearance});Ka(je,{get productDetails(){return p(P)},get brandingAppearance(){return p(Ee)},purchaseOption:T})};U(Ie,je=>{p(P)&&T&&je($e)})}h(L,de)},$$slots:{default:!0,header:(L,$)=>{qn(L,{slot:"header",children:(de,Ie)=>{var $e=hc(),je=j($e);no(je,{get brandingInfo(){return i()}});var Ee=N(je,2);{var He=Ae=>{rc(Ae)},vr=Ae=>{Xu(Ae)};U(Ee,Ae=>{d().isSandbox()?Ae(He):Ae(vr,!1)})}h(de,$e)},$$slots:{default:!0}})}}})};U(qr,ke=>{G.includes(p(k))&&ke(ir)})}var Xe=N(qr,2),yr=re(()=>{var ke;return(ke=i())==null?void 0:ke.appearance});mc(Xe,{get brandingAppearance(){return p(yr)},children:(ke,gr)=>{var L=yc(),$=j(L);{var de=Q=>{Ka(Q,{get productDetails(){return p(P)},purchaseOption:T})};U($,Q=>{p(k)==="present-offer"&&p(P)&&T&&Q(de)})}var Ie=N($,2);{var $e=Q=>{kn(Q)};U(Ie,Q=>{p(k)==="present-offer"&&!p(P)&&Q($e)})}var je=N(Ie,2);{var Ee=Q=>{var Tr=re(()=>p(k)==="processing-auth-info");Vu(Q,{onContinue:_e,onClose:D,get processing(){return p(Tr)},get lastError(){return p(I)}})};U(je,Q=>{(p(k)==="needs-auth-info"||p(k)==="processing-auth-info")&&Q(Ee)})}var He=N(je,2);{var vr=Q=>{var Tr=re(()=>p(k)==="polling-purchase-status");Nu(Q,{get paymentInfoCollectionMetadata(){return p(E)},onContinue:_e,onClose:D,get processing(){return p(Tr)},get productDetails(){return p(P)},purchaseOptionToUse:T,get brandingInfo(){return i()}})};U(He,Q=>{p(E)&&(p(k)==="needs-payment-info"||p(k)==="polling-purchase-status")&&p(P)&&T&&Q(vr)})}var Ae=N(He,2);{var Gr=Q=>{kn(Q)};U(Ae,Q=>{p(k)==="loading"&&Q(Gr)})}var Zt=N(Ae,2);{var Hn=Q=>{var Tr=re(()=>p(I)??new me(ce.UnknownError,"Unknown error without state set.")),Yn=re(()=>{var lr;return(lr=i())==null?void 0:lr.support_email});Vl(Q,{get brandingInfo(){return i()},get lastError(){return p(Tr)},get supportEmail(){return p(Yn)},get productDetails(){return p(P)},onContinue:Y})};U(Zt,Q=>{p(k)==="error"&&Q(Hn)})}var br=N(Zt,2);{var Qt=Q=>{Zl(Q,{get productDetails(){return p(P)},get brandingInfo(){return i()},onContinue:_e})};U(br,Q=>{p(k)==="success"&&Q(Qt)})}h(ke,L)},$$slots:{default:!0}}),h(hr,Ke)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),ae()}function bc(e){return e.expires_date==null?!0:new Date(e.expires_date)>new Date}function wc(e,r,t,n){const a=r.product_identifier;if(a in t)return Pc(e,r,t[a]);if(a in n)return kc(e,r,n[a]);throw new fe(ge.CustomerInfoError,"Could not find entitlement product in subscriptions or non-subscriptions.")}function Pc(e,r,t){return{identifier:e,isActive:bc(r),willRenew:Sc(r,t),store:(t==null?void 0:t.store)??"unknown",latestPurchaseDate:new Date(r.purchase_date),originalPurchaseDate:new Date(r.purchase_date),expirationDate:Bt(r.expires_date),productIdentifier:r.product_identifier,unsubscribeDetectedAt:Bt(t==null?void 0:t.unsubscribe_detected_at),billingIssueDetectedAt:Bt(t==null?void 0:t.billing_issues_detected_at),isSandbox:(t==null?void 0:t.is_sandbox)??!1,periodType:(t==null?void 0:t.period_type)??"normal"}}function kc(e,r,t){return{identifier:e,isActive:!0,willRenew:!1,store:t.store,latestPurchaseDate:new Date(r.purchase_date),originalPurchaseDate:new Date(t.original_purchase_date),expirationDate:null,productIdentifier:r.product_identifier,unsubscribeDetectedAt:null,billingIssueDetectedAt:null,isSandbox:t.is_sandbox,periodType:"normal"}}function Ec(e,r,t){const n={},a={};for(const o in e){const s=wc(o,e[o],r,t);n[o]=s,s.isActive&&(a[o]=s)}return{all:n,active:a}}function Bt(e){return e==null?null:new Date(e)}function xc(e){const r=qc(e),t=e.subscriber,n=Fc(t.non_subscriptions);return{entitlements:Ec(t.entitlements,t.subscriptions,n),allExpirationDatesByProduct:r,allPurchaseDatesByProduct:Ic(e,n),activeSubscriptions:Tc(r),managementURL:t.management_url,requestDate:new Date(e.request_date),firstSeenDate:new Date(t.first_seen),originalPurchaseDate:Bt(t.original_purchase_date),originalAppUserId:e.subscriber.original_app_user_id}}function Sc(e,r){if(r==null)return!1;const t=r.store=="promotional",n=e.expires_date==null,a=r.unsubscribe_detected_at!=null,o=r.billing_issues_detected_at!=null;return!(t||n||a||o)}function Ic(e,r){const t={};for(const n in e.subscriber.subscriptions){const a=e.subscriber.subscriptions[n];t[n]=new Date(a.purchase_date)}for(const n in r){const a=r[n].purchase_date;a==null?t[n]=null:t[n]=new Date(a)}return t}function qc(e){const r={};for(const t in e.subscriber.subscriptions){const n=e.subscriber.subscriptions[t];n.expires_date==null?r[t]=null:r[t]=new Date(n.expires_date)}return r}function Tc(e){const r=new Set,t=new Date;for(const n in e){const a=e[n];(a==null||a>t)&&r.add(n)}return r}function Fc(e){const r={};for(const t in e){if(e[t].length===0)continue;const n=e[t].length;r[t]=e[t][n-1]}return r}const Ac="0.15.0",Oc="https://api.revenuecat.com";var zt;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.EARLY_HINTS=103]="EARLY_HINTS",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(zt||(zt={}));function An(e){return e?e.startsWith("rcb_sb_"):!1}async function Vr(e,r){const{apiKey:t,body:n,headers:a,httpConfig:o}=r,i=`${(o==null?void 0:o.proxyURL)??Oc}${e.urlPath()}`;try{const l=await fetch(i,{method:e.method,headers:Cc(t,a,o==null?void 0:o.additionalHeaders),body:Mc(n)});return await Dc(l,e),await l.json()}catch(l){throw l instanceof TypeError?new fe(ge.NetworkError,pt.getPublicMessage(ge.NetworkError),l.message):l}}async function Dc(e,r){const t=e.status;if(t>=zt.INTERNAL_SERVER_ERROR)On(r,t,await e.text());else if(t>=zt.BAD_REQUEST){const n=await e.json(),a=n?JSON.stringify(n):null,o=n==null?void 0:n.code,s=n==null?void 0:n.message;if(o!=null){const i=pt.convertCodeToBackendErrorCode(o);if(i==null)On(r,t,a,o);else throw fe.getForBackendError(i,s)}else On(r,t,a)}}function On(e,r,t,n){throw new fe(ge.UnknownBackendError,"Unknown backend error.",`Request: ${e.name}. Status code: ${r}. Body: ${t}.`,{backendErrorCode:n})}function Mc(e){return e==null?null:JSON.stringify(e)}const wo="Authorization",Po="Content-Type",ko="Accept",Eo="X-Platform",xo="X-Version",So="X-Is-Sandbox",Nc=new Set([wo,Po,ko,Eo,xo,So]);function Cc(e,r,t){let n={[wo]:`Bearer ${e}`,[Po]:"application/json",[ko]:"application/json",[Eo]:"web",[xo]:Ac,[So]:`${An(e)}`};return r&&(n={...n,...r}),t&&(n={...t,...n}),n}const Io="/v1/subscribers",Vt="/rcbilling/v1";class jc{constructor(r){V(this,"appUserId");V(this,"method","GET");V(this,"name","getOfferings");this.appUserId=r}urlPath(){const r=encodeURIComponent(this.appUserId);return`${Io}/${r}/offerings`}}class Rc{constructor(){V(this,"method","POST");V(this,"name","purchase")}urlPath(){return`${Vt}/purchase`}}class Uc{constructor(r,t,n){V(this,"method","GET");V(this,"name","getProducts");V(this,"appUserId");V(this,"productIds");V(this,"currency");this.appUserId=r,this.productIds=t,this.currency=n}urlPath(){const r=encodeURIComponent(this.appUserId),t=this.productIds.map(encodeURIComponent).join("&id="),n=this.currency?`&currency=${this.currency}`:"";return`${Vt}/subscribers/${r}/products?id=${t}${n}`}}class Lc{constructor(r){V(this,"method","GET");V(this,"name","getCustomerInfo");V(this,"appUserId");this.appUserId=r}urlPath(){const r=encodeURIComponent(this.appUserId);return`${Io}/${r}`}}class Bc{constructor(){V(this,"method","GET");V(this,"name","getBrandingInfo")}urlPath(){return`${Vt}/branding`}}class zc{constructor(r){V(this,"method","GET");V(this,"name","getCheckoutStatus");V(this,"operationSessionId");this.operationSessionId=r}urlPath(){return`${Vt}/checkout/${this.operationSessionId}`}}const Dn={};class Vc{constructor(r,t=Dn){V(this,"API_KEY");V(this,"httpConfig");this.API_KEY=r,this.httpConfig=t}async getOfferings(r){return await Vr(new jc(r),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getCustomerInfo(r){return await Vr(new Lc(r),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getProducts(r,t,n){return await Vr(new Uc(r,t,n),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async getBrandingInfo(){return await Vr(new Bc,{apiKey:this.API_KEY,httpConfig:this.httpConfig})}async postPurchase(r,t,n,a,o){const s={app_user_id:r,product_id:t,email:n,price_id:o.priceId,presented_offering_identifier:a.offeringIdentifier,supports_direct_payment:!0};return o.id!=="base_option"&&(s.offer_id=o.id),a.targetingContext&&(s.applied_targeting_rule={rule_id:a.targetingContext.ruleId,revision:a.targetingContext.revision}),a.placementIdentifier&&(s.presented_placement_identifier=a.placementIdentifier),await Vr(new Rc,{apiKey:this.API_KEY,body:s,httpConfig:this.httpConfig})}async getCheckoutStatus(r){return await Vr(new zc(r),{apiKey:this.API_KEY,httpConfig:this.httpConfig})}}function Hc(e){if(!/^rcb_[a-zA-Z0-9_.-]+$/.test(e))throw new fe(ge.InvalidCredentialsError,"Invalid API key. Use your RevenueCat Billing API key.")}function Yc(e){if(new Set(["no_user","null","none","nil","(null)","NaN","\\x00","","unidentified","undefined","unknown"]).has(e)||e.includes("/"))throw new fe(ge.InvalidAppUserIdError,'Provided user id: "'+e+'" is not valid. See https://www.revenuecat.com/docs/customers/user-ids#tips-for-setting-app-user-ids for more information.')}function Gc(e){if(e!=null&&e.endsWith("/"))throw new fe(ge.ConfigurationError,"Invalid proxy URL. The proxy URL should not end with a trailing slash.")}function Wc(e){if(e){for(const r in e)if(Nc.has(r))throw new fe(ge.ConfigurationError,"Invalid additional headers. Some headers are reserved for internal use.")}}var Mn=(e=>(e.Current="current",e))(Mn||{});function Zc(e,r){async function t(...n){return await this.preload(),await e.call(this,...n)}return t}const qo=(e,r)=>({...e,rcBillingProduct:{...e.rcBillingProduct,presentedOfferingContext:{...e.rcBillingProduct.presentedOfferingContext,placementIdentifier:r}}}),Ir=(e,r)=>e==null?null:qo(e,r),Qc=(e,r,t)=>{const n=e.offering_ids_by_placement??null;if(n==null)return null;const a=e.fallback_offering_id??null;let o;if(t in n){const i=n[t]??null;if(i==null)return null;o=r[i],o==null&&(o=r[a])}else o=r[a];if(o==null)return null;const s=Object.fromEntries(Object.entries(o.packagesById).map(([i,l])=>[i,qo(l,t)]));return{...o,packagesById:s,availablePackages:Object.values(s),weekly:Ir(o.weekly,t),monthly:Ir(o.monthly,t),twoMonth:Ir(o.twoMonth,t),threeMonth:Ir(o.threeMonth,t),sixMonth:Ir(o.sixMonth,t),annual:Ir(o.annual,t),lifetime:Ir(o.lifetime,t)}};function Jc(e,r){const t={};r.product_details.forEach(o=>{t[o.identifier]=o});const n={};e.offerings.forEach(o=>{const s=o.identifier===e.current_offering_id,i=Ji(s,o,t,e.targeting);i!=null&&(n[o.identifier]=i)});const a=e.current_offering_id?n[e.current_offering_id]??null:null;return Object.keys(n).length==0&&X.debugLog("Empty offerings. Please make sure you've configured offerings correctly in the RevenueCat dashboard and that the products are properly configured."),{all:n,current:a}}var Nn;(function(e){e.body_s="p",e.body_m="p",e.body_l="p",e.body_xl="p",e.heading_xs="h6",e.heading_s="h5",e.heading_m="h4",e.heading_l="h3",e.heading_xl="h2",e.heading_xxl="h1"})(Nn||(Nn={}));var Ht;(function(e){e[e.extra_light=100]="extra_light",e[e.thin=200]="thin",e[e.light=300]="light",e[e.regular=400]="regular",e[e.medium=500]="medium",e[e.semibold=600]="semibold",e[e.bold=700]="bold",e[e.extra_bold=800]="extra_bold",e[e.black=900]="black"})(Ht||(Ht={}));var Yt;(function(e){e.body_s="13px",e.body_m="14px",e.body_l="15px",e.body_xl="16px",e.heading_xs="14px",e.heading_s="16px",e.heading_m="18px",e.heading_l="20px",e.heading_xl="26px",e.heading_xxl="32px"})(Yt||(Yt={}));var Cn;(function(e){e.vertical="column",e.horizontal="row"})(Cn||(Cn={}));var jn;(function(e){e.top="flex-start",e.leading="flex-start",e.center="center",e.bottom="flex-end",e.trailing="flex-end"})(jn||(jn={}));var Rn;(function(e){e.space_between="space-between",e.space_around="space-around",e.space_evenly="space-evenly",e.start="flex-start",e.center="center",e.end="flex-end"})(Rn||(Rn={}));const Hr=[];function Kc(e,r){return{subscribe:Xc(e,r).subscribe}}function Xc(e,r=Ye){let t=null;const n=new Set;function a(i){if(ea(e,i)&&(e=i,t)){const l=!Hr.length;for(const u of n)u[1](),Hr.push(u,e);if(l){for(let u=0;u<Hr.length;u+=2)Hr[u][0](Hr[u+1]);Hr.length=0}}}function o(i){a(i(e))}function s(i,l=Ye){const u=[i,l];return n.add(u),n.size===1&&(t=r(a,o)||Ye),i(e),()=>{n.delete(u),n.size===0&&t&&(t(),t=null)}}return{set:a,update:o,subscribe:s}}const To=Kc(!1,e=>{if(typeof window<"u"){const r=window.matchMedia("(prefers-color-scheme: dark)");e(r.matches);const t=n=>e(n.matches);return r.addEventListener("change",t),()=>r.removeEventListener("change",t)}return()=>{}}),$c=(e,r)=>{var t;(t=r.onclick)==null||t.call(r)};var e_=x("<button><!></button>");const r_={hash:"svelte-g3k3fu",code:"button.svelte-g3k3fu {border:none;cursor:pointer;background:transparent;padding:0;width:100%;display:flex;align-items:center;justify-content:center;}"};function Fo(e,r){ne(r,!0),H(e,r_);var t=e_();t.__click=[$c,r];var n=q(t);yn(n,()=>r.children??Ye),Z(()=>{gn(t,`${r.class??""} svelte-g3k3fu`),t.disabled=!r.onclick,K(t,"style",r.style)}),h(e,t),ae()}hn(["click"]);function Ao(e,r){return!e||!r?"":{[`--${r}-block-start`]:`${e.top??0}px`,[`--${r}-inline-end`]:`${e.trailing??0}px`,[`--${r}-block-end`]:`${e.bottom??0}px`,[`--${r}-inline-start`]:`${e.leading??0}px`}}function t_(e){return Nn[e]}function Yr({colorMap:e,colorMode:r="light",fallback:t="FFFFFF"}){if(!e)return t;const n=e[r]||e.light;let a="";switch(n.type){case"hex":case"alias":return n.value??t;case"linear":return a=(n.points||[]).map(o=>`${o.color} ${o.percent}%`).join(", "),`linear-gradient(${n.degrees}deg, ${a})`;case"radial":return a=(n.points||[]).map(o=>`${o.color} ${o.percent}%`).join(", "),`radial-gradient(${a})`}return t}function n_(e,r="light"){const t=Yr({colorMap:e.color,colorMode:r});return`${e.width}px solid ${t}`}function Oo(e){return`${e.top_leading}px ${e.top_trailing}px ${e.bottom_trailing}px ${e.bottom_leading}px`}function Un({backgroundColor:e,border:r,margin:t,padding:n,textColor:a,colorMode:o="light",shape:s,shadow:i}){const l={"--margin-block-start":"0px","--margin-inline-end":"0px","--margin-block-end":"0px","--margin-inline-start":"0px","--padding-block-start":"0px","--padding-inline-end":"0px","--padding-block-end":"0px","--padding-inline-start":"0px","--background":"transparent","--text-color":"#000000","--border":"none","--border-radius":"0px","--shadow":"none"};return n&&Object.assign(l,Ao(n,"padding")),t&&Object.assign(l,Ao(t,"margin")),e&&(l["--background"]=Yr({colorMap:e,colorMode:o,fallback:"transparent"})),a&&(l["--text-color"]=Yr({colorMap:a,colorMode:o,fallback:"#000000"})),r&&(l["--border"]=n_(r,o)),(s==null?void 0:s.type)==="rectangle"&&s.corners&&(l["--border-radius"]=Oo(s.corners)),(s==null?void 0:s.type)==="pill"&&(l["--border-radius"]="9999px"),i&&(l["--shadow"]=`${i.x}px ${i.y}px ${i.radius}px
125
+ ${Yr({colorMap:i.color,colorMode:o,fallback:"#000000"})}`),l}function Gt(e){function r(o){return o.type==="fixed"?`${o.value}px`:o.type==="fit"?"fit-content":o.type==="fill"?navigator.userAgent.match(/firefox|fxios/i)?"-moz-available":"-webkit-fill-available":"unset"}const t=r(e.width),n=r(e.height),a=e.width.type==="fill"||e.height.type==="fill";return{"--width":t,"--height":n,"--flex":a?"unset":"0 1 auto"}}function a_(e,r){return r?{"--background":`linear-gradient(${r.map(t=>{var n;return((n=t[e])==null?void 0:n.value)||t.light.value}).join(", ")})`}:{"--background":"none"}}const o_=e=>{const r={"--corner-radius":"0px","--clip-path":"none"};return(e==null?void 0:e.type)==="circle"&&(r["--corner-radius"]="50%"),(e==null?void 0:e.type)==="rectangle"&&e.corners&&(r["--corner-radius"]=Oo(e.corners)),(e==null?void 0:e.type)==="convex"&&(r["--corner-radius"]="0 0 50% 50%;"),(e==null?void 0:e.type)==="concave"&&(r["--clip-path"]="polygon(0 0, 100% 0, 100% 100%, 50% 110%, 0 100%);"),r};function s_(e){const r={"--direction":"initial","--alignment":"initial","--distribution":"initial"};return e.type==="zlayer"||(r["--direction"]=Cn[e.type],r["--alignment"]=jn[e.alignment],e.distribution&&(r["--distribution"]=Rn[e.distribution])),r}function i_(e,r="light"){var l,u;const{font_size:t,horizontal_alignment:n,font_weight:a,font_name:o,color:s}=e,i={"--text-align":"initial","--font-weight":400,"--font-size":"initial","--font-family":"sans-serif","--background-clip":"initial","--text-fill-color":"initial"};return i["--text-align"]=n,i["--font-weight"]=Ht[a]||Ht.regular,i["--font-size"]=Yt[t]||Yt.body_m,i["--font-family"]=o||"sans-serif",s&&(((l=s[r])==null?void 0:l.type)==="linear"||((u=s[r])==null?void 0:u.type)==="radial")&&(i["--background-clip"]="text",i["--text-fill-color"]="transparent",i["--background"]=Yr({colorMap:s,colorMode:r})),i}function gt(e){return Object.entries(e).map(([r,t])=>`${r}: ${t}`).join("; ")}function Do(e,r,t,n){var o;const a=(o=n[t])==null?void 0:o[e];return(n[r]||{})[e]?n[r][e]:a}function l_(e){const r=n=>{if(n.type==="package"&&n.is_selected_by_default)return n;if(n.components&&Array.isArray(n.components))for(const a of n.components){const o=r(a);if(o)return o}if(n.stack!==void 0){const a=r(n.stack);if(a)return a}},t=r(e.components_config.base.stack);if(t!==void 0)return t.package_id}const Ln=(e,r)=>r?u_(r).reduce((a,o)=>{if(e){const s=e[o]||{};return{...a,...s}}return a},{}):{},u_=e=>e?Object.entries(e).reduce((t,[n,a])=>(a&&t.push(n),t),[]):[],c_=e=>{const{background_color:r,margin:t,padding:n,spacing:a,size:o,border:s,shape:i,colorMode:l,shadow:u,dimension:c,componentState:d,overrides:_}=e,f=Ln(_,d),m=Un({backgroundColor:r,margin:t,padding:n,border:s,colorMode:l,shape:i,shadow:u,...f}),y=s_({...c,...f});return{...Gt({...o,...f}),...y,...m,"--spacing":`${a||0}px`}};var __=x('<div class="stack svelte-hkx1fg"></div>');const d_={hash:"svelte-hkx1fg",code:".stack.svelte-hkx1fg {box-sizing:border-box;display:flex;flex-direction:var(--direction, unset);width:var(--width, unset);height:var(--height, unset);gap:var(--spacing, 0);background:var(--background, none);border:var(--border, none);border-radius:var(--border-radius, 0);box-shadow:var(--shadow, none);justify-content:var(--distribution, flex-start);align-items:var(--alignment, flex-start);padding-block-start:var(--padding-block-start, 0);padding-inline-end:var(--padding-inline-end, 0);padding-block-end:var(--padding-block-end, 0);padding-inline-start:var(--padding-inline-start, 0);margin-block-start:var(--margin-block-start, 0);margin-inline-end:var(--margin-inline-end, 0);margin-block-end:var(--margin-block-end, 0);margin-inline-start:var(--margin-inline-start, 0);flex:var(--flex, 0 1 auto);}"};function vt(e,r){ne(r,!0),H(e,d_);const t=wn(r,["$$slots","$$events","$$legacy","id","components","labels","onAction","purchaseState","variableDictionary"]),n=ee(()=>gt(c_({id:r.id,components:r.components,labels:r.labels,onAction:r.onAction,purchaseState:r.purchaseState,...t})));var a=__();Da(a,21,()=>r.components,Oa,(o,s)=>{Bn(o,{get nodeData(){return p(s)},get labels(){return r.labels},get onAction(){return r.onAction},get purchaseState(){return r.purchaseState},get variableDictionary(){return r.variableDictionary}})}),Z(()=>{K(a,"id",r.id),K(a,"style",p(n))}),h(e,a),ae()}function p_(e,r){ne(r,!0),Fo(e,{onclick:()=>{r.onAction&&r.onAction(r.action)},children:(n,a)=>{vt(n,dt(()=>r.stack,{get labels(){return r.labels},get purchaseState(){return r.purchaseState},get variableDictionary(){return r.variableDictionary}}))},$$slots:{default:!0}}),ae()}const f_=e=>{const{font_size:r="body_m",color:t={dark:{type:"hex",value:"#000000"},light:{type:"hex",value:"#000000"}},background_color:n={dark:{type:"hex",value:"#FFFFFF"},light:{type:"hex",value:"#FFFFFF"}},padding:a,margin:o,colorMode:s,size:i}=e,l=Ln(e.overrides,e.componentState),u=t_(r),c=i_({...e,...l},s),d=Un({backgroundColor:n,textColor:t,margin:o,padding:a,colorMode:s,...l}),_=Gt({...i,...l});return{textStyles:{...d,...c,..._},tagToRender:u}},m_={hash:"svelte-vi0oj2",code:".text-block.svelte-vi0oj2 {display:block;padding-block-start:var(--padding-block-start, unset);padding-inline-end:var(--padding-inline-end, unset);padding-block-end:var(--padding-block-end, unset);padding-inline-start:var(--padding-inline-start, unset);margin-block-start:var(--margin-block-start, unset);margin-inline-end:var(--margin-inline-end, unset);margin-block-end:var(--margin-block-end, unset);margin-inline-start:var(--margin-inline-start, unset);color:var(--text-color, #ffffff);background:var(--background, none);font-size:var(--font-size, 1rem);font-weight:var(--font-weight, normal);text-align:var(--text-align, center);font-family:var(--font-family, sans-serif);-webkit-background-clip:var(--background-clip, initial);background-clip:var(--background-clip, initial);-webkit-text-fill-color:var(--text-fill-color, initial);}"};function h_(e,r){ne(r,!0),H(e,m_);const t=g(r,"styleVariables",3,""),n=g(r,"component",3,"p");var a=ie(),o=j(a);Na(o,n,!1,(s,i)=>{let l;Z(()=>l=Ca(s,l,{id:r.id,style:t(),class:"text-block"},"svelte-vi0oj2",s.namespaceURI===Jr,s.nodeName.includes("-")));var u=ie(),c=j(u);yn(c,()=>r.children??Ye),h(i,u)}),h(e,a),ae()}const y_=["product_name","price","price_per_period","price_per_period_full","total_price_and_per_month","total_price_and_per_month_full","sub_price_per_month","sub_price_per_week","sub_duration","sub_duration_in_months","sub_period","sub_period_length","sub_period_abbreviated","sub_offer_duration","sub_offer_duration_2","sub_offer_price","sub_offer_price_2","sub_relative_discount"],g_=({value:e="",variableDictionary:r})=>r?y_.reduce((t,n)=>{var o;return t.replaceAll(`{{ ${n} }}`,((o=r[n])==null?void 0:o.toString())||"N/A")},e):e;var v_=x('<span class="text-wrapper svelte-1wjl3r3"><!></span>');const b_={hash:"svelte-1wjl3r3",code:".text-wrapper.svelte-1wjl3r3 {display:block;height:var(--height, unset);width:var(--width, unset);background:var(--background, none);}"};function w_(e,r){ne(r,!0),H(e,b_);const t=wn(r,["$$slots","$$events","$$legacy","id","labels","text_lid","purchaseState","variableDictionary","background_color","size"]),n=ee(()=>f_({id:r.id,labels:r.labels,text_lid:r.text_lid,purchaseState:r.purchaseState,background_color:r.background_color,size:r.size,...t})),a=ee(()=>p(n).tagToRender),o=ee(()=>p(n).textStyles),s=ee(()=>gt({...Un({backgroundColor:r.background_color,...t}),...Gt(r.size)})),i=ee(()=>gt(p(o))),l=ee(()=>Do(r.text_lid,r.purchaseState.locale,r.purchaseState.defaultLocale,r.labels)),u=ee(()=>g_({value:p(l),variableDictionary:r.variableDictionary}));var c=v_(),d=q(c);h_(d,{get styleVariables(){return p(i)},get component(){return p(a)},get id(){return r.id},children:(_,f)=>{var m=_t();Z(()=>ar(m,p(u))),h(_,m)},$$slots:{default:!0}}),Z(()=>K(c,"style",p(s))),h(e,c),ae()}function Bn(e,r){ne(r,!0);const t=Ya(),n=()=>Ha(To,"$prefersDarkMode",t),a={text:w_,stack:vt,image:O_,button:p_,purchase_button:M_,package:R_,footer:L_},o=ee(()=>a[r.nodeData.type]);var s=ie(),i=j(s);Gs(i,()=>p(o),(l,u)=>{u(l,dt(()=>r.nodeData||{},{get labels(){return r.labels},get prefersDarkMode(){return n()},get onAction(){return r.onAction},get purchaseState(){return r.purchaseState},get variableDictionary(){return r.variableDictionary},children:(c,d)=>{var _=ie(),f=j(_);Da(f,17,()=>r.nodeData.components,Oa,(m,y)=>{Bn(m,{get nodeData(){return p(y)},get labels(){return r.labels},get onAction(){return r.onAction},get purchaseState(){return r.purchaseState},get variableDictionary(){return r.variableDictionary}})}),h(c,_)},$$slots:{default:!0}}))}),h(e,s),ae()}function P_({background:e,colorMode:r}){if(!e)return"";if(e.type==="color")return`--background: ${Yr({colorMap:e.value,colorMode:r,fallback:"transparent"})};`}function k_(e,r){var n,a,o,s;if(((a=(n=e.components_config.base)==null?void 0:n.background)==null?void 0:a.type)!=="image")return"";const t=e.components_config.base.background;return((o=t.value[r])==null?void 0:o.original)||((s=t.value.light)==null?void 0:s.original)}var E_=x('<div class="paywall-background svelte-mzlfw9"></div>'),x_=x('<div class="paywall-background image-container svelte-mzlfw9"><img class="image svelte-mzlfw9" alt=""></div>'),S_=x('<div class="paywall svelte-mzlfw9"><!> <!></div>');const I_={hash:"svelte-mzlfw9",code:`
126
+ /* 1. Use a more-intuitive box-sizing model */.svelte-mzlfw9,
127
+ .svelte-mzlfw9::before,
128
+ .svelte-mzlfw9::after {box-sizing:border-box;margin:0;}.paywall.svelte-mzlfw9 {position:relative;}.paywall-background.svelte-mzlfw9 {position:absolute;top:0;left:0;width:100%;height:100%;background:var(--background, none);z-index:-1;}.image-container.svelte-mzlfw9 {overflow:hidden;background:none;}.image.svelte-mzlfw9 {width:100%;height:100%;object-fit:cover;display:block;}
130
129
 
131
- /* 5. Improve media defaults */
130
+ /* 5. Improve media defaults */img.svelte-mzlfw9 {display:block;max-width:100%;}
132
131
 
133
132
  /* 6. Inherit fonts for form controls */
134
133
 
@@ -138,6 +137,6 @@
138
137
 
139
138
  /*
140
139
  9. Create a root stacking context
141
- */`};function gu(e,t){W(t,!0),q(e,vu);const r=m(t,"variablesPerPackage",19,()=>({}));let n=Ke({selectedPackageId:tu(t.paywallData),locale:t.selectedLocale||t.paywallData.default_locale,defaultLocale:t.paywallData.default_locale,variablesPerPackage:r()}),i=Bo(Ke(r()[n.selectedPackageId||""]));const o=(g,h)=>{var b;(b=t.onRestorePurchasesClicked)==null||b.call(t)},a=(g,h)=>{var b;(b=t.onBackClicked)==null||b.call(t)},s=(g,h)=>{var x,y;if(g.destination==="customer_center"&&((x=t.onVisitCustomerCenterClicked)==null||x.call(t)),!g.url)return;const b=ao(g.url.url_lid,n.locale,n.defaultLocale,t.paywallData.components_localizations);b&&((y=t.onNavigateToUrlClicked)==null||y.call(t,b))},l=(g,h)=>{n.selectedPackageId=h==null?void 0:h.packageId,h!=null&&h.packageId&&N(i,Ke(r()[h.packageId]))},c=(g,h)=>{var b;n.selectedPackageId!==void 0&&((b=t.onPurchaseClicked)==null||b.call(t,n.selectedPackageId))},u=(g,h)=>{switch(g.type){case"select_package":l(g,h);break;case"navigate_to":s(g);break;case"navigate_back":a();break;case"restore_purchases":o();break;case"purchase":c();break}};var f=du(),d=T(f);hn(d,{onAction:u,get nodeData(){return t.paywallData.components_config.base.stack},get labels(){return t.paywallData.components_localizations},get purchaseState(){return n},get variableDictionary(){return v(i)}}),_(e,f),Z()}const hu=e=>{const{gradient_colors:t,colorMode:r,mask_shape:n,size:i,max_height:o,override_source_lid:a}=e,s=Zc(r,t),l=gn(i),c=Xc(n);return{imageStyles:{...l,...c},gradientStyles:s}};var _u=I('<div class="image-container svelte-1bktrru"><img class="image svelte-1bktrru" alt=""> <span class="image-overlay svelte-1bktrru"></span></div>');const pu={hash:"svelte-1bktrru",code:".image-container.svelte-1bktrru {position:relative;height:var(--height, unset);width:var(--width, unset);overflow:hidden;border-radius:var(--corner-radius, unset);clip-path:var(--clip-path, unset);display:flex;flex:var(--flex, 1 0 auto);}.image.svelte-1bktrru {width:100%;height:100%;object-fit:cover;display:block;}.image-overlay.svelte-1bktrru {position:absolute;inset:0;background:var(--background, none);}"};function bu(e,t){W(t,!0),q(e,pu);const r=Kr(t,["$$slots","$$events","$$legacy","id","colorMode","source"]),n=ee(()=>hu({id:t.id,colorMode:t.colorMode,source:t.source,...r})),i=ee(()=>v(n).gradientStyles),o=ee(()=>v(n).imageStyles),a=ee(()=>kr(v(i))),s=ee(()=>kr(v(o)));var l=_u(),c=T(l),u=D(c,2);F(()=>{var f;Q(l,"id",`image-container-${t.id}`),Q(l,"style",v(s)),Q(c,"src",(f=t.source[t.colorMode||"light"])==null?void 0:f.original),Q(c,"id",t.id),Q(u,"style",v(a))}),_(e,l),Z()}const mu={hash:"svelte-raczc6",code:""};function yu(e,t){W(t,!0),q(e,mu),ro(e,{onclick:()=>{t.onAction&&t.onAction({type:"purchase"})},class:"purchase-button",children:(n,i)=>{tr(n,Qt(()=>t.stack,{get labels(){return t.labels},get purchaseState(){return t.purchaseState},get variableDictionary(){return t.variableDictionary}}))},$$slots:{default:!0}}),Z()}const wu=(e,t)=>{e.preventDefault(),e.stopPropagation(),t.onAction&&t.onAction({type:"select_package"},{packageId:t.package_id})};var Eu=I('<button class="package svelte-128m8vw"><!></button>');const xu={hash:"svelte-128m8vw",code:".package.svelte-128m8vw {width:100%;display:flex;margin:0;padding:0;background:unset;border:unset;text-align:unset;}"};function Iu(e,t){W(t,!0),q(e,xu);const r=ee(()=>{var a;return((a=t.purchaseState.variablesPerPackage)==null?void 0:a[t.package_id])||t.variableDictionary}),n=ee(()=>{var a;return((a=t.purchaseState)==null?void 0:a.selectedPackageId)===t.package_id});var i=Eu();i.__click=[wu,t];var o=T(i);tr(o,Qt(()=>t.stack,{get labels(){return t.labels},get onAction(){return t.onAction},get purchaseState(){return t.purchaseState},get variableDictionary(){return v(r)}})),F(()=>{Q(i,"id",t.id),ya(i,"selected",v(n))}),_(e,i),Z()}Yr(["click"]);var Pu=I('<div class="footer"><!></div>');function ku(e,t){var r=Pu(),n=T(r);tr(n,Qt(()=>t.stack,{get labels(){return t.labels},get purchaseState(){return t.purchaseState},get variableDictionary(){return t.variableDictionary}})),F(()=>Q(r,"id",t.id)),_(e,r)}const Tu=1000001;function Au(e){switch(e.rcBillingProduct.productType){case Te.Subscription:return e.rcBillingProduct.defaultSubscriptionOption;case(Te.Consumable||Te.NonConsumable):return e.rcBillingProduct.defaultNonSubscriptionOption}}var Tr=(e=>(e.month="mo",e.year="yr",e.week="wk",e.day="d",e))(Tr||{});function so(e,t,r=!1){var n;return`${e}/${(n=t.base.period)==null?void 0:n.number}${r?t.base.period.unit:Tr[t.base.period.unit]}`}function Ou(e){if(e.unit==="week"||e.unit==="day")return`${e.number} ${e.unit}`;if(e.unit==="month")return`${e.number>1?e.number+"s":e.number} ${e.unit}`;if(e.unit==="year")return`${e.number*12} ${e.unit}`}function Nu({price:e,period:t,selectedLocale:r}){const n=ve(e.amountMicros,e.currency,r);return t?t.unit==="year"?ve(e.amountMicros/12/4,e.currency,r):t.unit==="month"||t.unit==="week"&&t.number>1?ve(e.amountMicros/t.number,e.currency,r):t.unit==="day"?ve(e.amountMicros*7/t.number,e.currency,r):n:n}function Su({price:e,period:t,selectedLocale:r}){const n=ve(e.amountMicros,e.currency,r);return!t||!t.number?n:t.unit==="year"?ve(e.amountMicros/12,e.currency,r):t.unit==="month"&&t.number>1?ve(e.amountMicros/t.number,e.currency,r):t.unit==="week"?ve(e.amountMicros*4/t.number,e.currency,r):t.unit==="day"?ve(e.amountMicros*30/t.number,e.currency,r):n}function lo({price:e,period:t,full:r=!1,selectedLocale:n}){if(!t||!t.number)return e.formattedPrice;let i="";const o=r?"month":"mo",a=r?t.unit:Tr[t.unit];return t.unit==="year"?(i=ve(e.amountMicros/12,e.currency,n),`${e.formattedPrice}/${t.number}${a}($${i}/(${o})`):t.unit==="month"?(i=ve(e.amountMicros/t.number,e.currency,n),t.number>1?`${e.formattedPrice}/${t.number}${a}(${i}/${o})`:`${e.formattedPrice}`):t.unit==="week"?(i=ve(e.amountMicros*4/t.number,e.currency,n),`${e.formattedPrice}/${t.number}${a}(${i}/${o})`):t.unit==="day"?(i=ve(e.amountMicros*30/t.number,e.currency,n),`${e.formattedPrice}/${t.number}${a}(${i}/${o})`):e.formattedPrice}function Ru(e,t){const r=e.availablePackages,n=r.reduce((o,a)=>o.rcBillingProduct.currentPrice.amountMicros>a.rcBillingProduct.currentPrice.amountMicros?o:a);return r.reduce((o,a)=>(o[a.identifier]=Mu(a,n,t),o),{})}function Mu(e,t,r){var l;const n=e.rcBillingProduct,i=n.currentPrice.formattedPrice,o=Au(e),a=n.productType,s={product_name:n.title,price:i,price_per_period:"",price_per_period_full:"",total_price_and_per_month:"",total_price_and_per_month_full:"",sub_price_per_month:"",sub_price_per_week:"",sub_duration:"",sub_duration_in_months:"",sub_period:"",sub_period_length:"",sub_period_abbreviated:"",sub_offer_duration:void 0,sub_offer_duration_2:void 0,sub_offer_price:void 0,sub_offer_price_2:void 0,sub_relative_discount:""};if(a===Te.Subscription&&o){const c=so(i,o);s.price_per_period=c,s.price_per_period_full=so(i,o,!0),s.total_price_and_per_month=lo({price:n.currentPrice,period:o.base.period,selectedLocale:r}),s.total_price_and_per_month_full=lo({price:n.currentPrice,period:o.base.period,full:!0,selectedLocale:r}),s.sub_price_per_month=Su({price:n.currentPrice,period:o.base.period,selectedLocale:r}),s.sub_price_per_week=Nu({price:n.currentPrice,period:o.base.period,selectedLocale:r}),s.sub_duration=wi(o.base.period),s.sub_duration_in_months=Ou(o.base.period),s.sub_period=yi(o.base.period),s.sub_period_length=`${(l=o.base.period)==null?void 0:l.unit}`,s.sub_period_abbreviated=`${Tr[o.base.period.unit]}`;const u=n.currentPrice.amountMicros,f=t.rcBillingProduct.currentPrice.amountMicros,d=((f-u)*100/f).toFixed(0);s.sub_relative_discount=u===f?"":`${d}% off`}return(a===Te.NonConsumable||a===Te.Consumable)&&o&&(s.price=i,s.price_per_period=i,s.price_per_period_full=i,s.total_price_and_per_month=i,s.sub_price_per_month=i,s.sub_duration="Lifetime",s.sub_duration_in_months="Lifetime",s.sub_period="Lifetime",s.sub_price_per_week=void 0,s.sub_relative_discount=void 0,s.price_per_period_full=i,s.total_price_and_per_month_full=i,s.sub_period_length=void 0,s.sub_period_abbreviated=void 0),s}co=[Fc];const be=class be{constructor(t,r,n=an){mo(pn,5,this);B(this,"_API_KEY");B(this,"_appUserId");B(this,"_brandingInfo",null);B(this,"_loadingResourcesPromise",null);B(this,"backend");B(this,"purchaseOperationHelper");this._API_KEY=t,this._appUserId=r,nn(t)&&Y.debugLog("Initializing Purchases SDK with sandbox API Key"),this.backend=new Uc(this._API_KEY,n),this.purchaseOperationHelper=new os(this.backend)}static setLogLevel(t){Y.setLogLevel(t)}static getSharedInstance(){if(be.isConfigured())return be.instance;throw new Ti}static isConfigured(){return be.instance!==void 0}static configure(t,r,n=an){return be.instance!==void 0&&Y.warnLog("Purchases is already initialized. You normally should only configure Purchases once. Creating and returning new instance."),Lc(t),Cc(r),Bc(n.proxyURL),qc(n.additionalHeaders),be.instance=new be(t,r,n),be.getSharedInstance()}async preload(){if(this.hasLoadedResources()){Y.verboseLog("Purchases resources are loaded. Skipping.");return}if(this._loadingResourcesPromise!==null){Y.verboseLog("Purchases resources are loading. Waiting."),await this._loadingResourcesPromise;return}return this._loadingResourcesPromise=this.backend.getBrandingInfo().then(t=>{this._brandingInfo=t}).catch(t=>{let r=`${t}`;t instanceof ne&&(r=`${t.message}. ${t.underlyingErrorMessage?`Underlying error: ${t.underlyingErrorMessage}`:""}`),Y.errorLog(`Error fetching branding info: ${r}`)}).finally(()=>{this._loadingResourcesPromise=null}),this._loadingResourcesPromise}hasLoadedResources(){return this._brandingInfo!==null}async renderPaywall(t){console.warn("This method is @experimental, Paywalls are not generally available but they will come soon!");let n=t.htmlTarget??document.getElementById("rcb-ui-pw-root");if(n===null){const f=document.createElement("div");f.id="rcb-ui-pw-root",f.className="rcb-ui-pw-root",f.style.zIndex=`${Tu}`,document.body.appendChild(f),n=f}if(n===null)throw new Error("Could not generate a mount point for the billing widget");const i=n;i.innerHTML="";const o=t.offering;if(!o.paywall_components)throw new Error("You cannot use paywalls yet, they are coming soon!");const a=f=>{const d=o.availablePackages.find(g=>g.identifier===f);if(d===void 0)throw new Error(`No package found for ${f}`);return this.purchase({rcPackage:d,htmlTarget:t.purchaseHtmlTarget,customerEmail:t.customerEmail})},s=f=>{var d;if(t.onNavigateToUrl){t.onNavigateToUrl(f);return}(d=window.open(f,"_blank"))==null||d.focus()},l=()=>{},c=()=>{if(t.onVisitCustomerCenter){t.onVisitCustomerCenter();return}},u=t.selectedLocale||navigator.language;return new Promise((f,d)=>{ri(gu,{target:i,props:{paywallData:o.paywall_components,selectedLocale:u,onNavigateToUrlClicked:s,onVisitCustomerCenterClicked:c,onBackClicked:()=>{if(t.onBack){t.onBack();return}i.innerHTML="",Y.debugLog("Purchase cancelled by user"),d(new ne(ae.UserCancelledError))},onRestorePurchasesClicked:l,onPurchaseClicked:g=>{a(g).then(h=>{f(h)}).catch(h=>d(h))},variablesPerPackage:Ru(o,u)}})})}async getOfferings(t){Ol(t==null?void 0:t.currency);const r=this._appUserId,n=await this.backend.getOfferings(r),i=(t==null?void 0:t.offeringIdentifier)===sn.Current?n.current_offering_id:t==null?void 0:t.offeringIdentifier;return i&&(n.offerings=n.offerings.filter(o=>o.identifier===i)),await this.getAllOfferings(n,r,t)}async getCurrentOfferingForPlacement(t,r){const n=this._appUserId,i=await this.backend.getOfferings(n),o=await this.getAllOfferings(i,n,r),a=i.placements??null;return a==null?null:jc(a,o.all,t)}async getAllOfferings(t,r,n){const i=t.offerings.flatMap(a=>a.packages).map(a=>a.platform_product_identifier),o=await this.backend.getProducts(r,i,n==null?void 0:n.currency);return this.logMissingProductIds(i,o.product_details),Hc(t,o)}async isEntitledTo(t){const r=await this.getCustomerInfo();return t in r.entitlements.active}purchasePackage(t,r,n){return this.purchase({rcPackage:t,customerEmail:r,htmlTarget:n})}purchase(t){const{rcPackage:r,purchaseOption:n,htmlTarget:i,customerEmail:o}=t;let a=i??document.getElementById("rcb-ui-root");if(a===null){const u=document.createElement("div");u.className="rcb-ui-root",document.body.appendChild(u),a=u}if(a===null)throw new Error("Could not generate a mount point for the billing widget");const s=a,l=!i,c=this._appUserId;return Y.debugLog(`Presenting purchase form for package ${r.identifier}`),new Promise((u,f)=>{ri(fc,{target:s,props:{appUserId:c,rcPackage:r,purchaseOption:n,customerEmail:o,onFinished:async d=>{Y.debugLog("Purchase finished"),s.innerHTML="";const g={customerInfo:await this._getCustomerInfoForUserId(c),redemptionInfo:d};u(g)},onClose:()=>{s.innerHTML="",Y.debugLog("Purchase cancelled by user"),f(new ne(ae.UserCancelledError))},onError:d=>{s.innerHTML="",f(ne.getForPurchasesFlowError(d))},purchases:this,brandingInfo:this._brandingInfo,purchaseOperationHelper:this.purchaseOperationHelper,asModal:l}})})}async getCustomerInfo(){return await this._getCustomerInfoForUserId(this._appUserId)}getAppUserId(){return this._appUserId}async changeUser(t){return this._appUserId=t,await this.getCustomerInfo()}logMissingProductIds(t,r){const n={};r.forEach(o=>n[o.identifier]=o);const i=[];t.forEach(o=>{n[o]===void 0&&i.push(o)}),i.length>0&&Y.debugLog(`Could not find product data for product ids:
142
- ${i.join()}.
143
- Please check that your product configuration is correct.`)}isSandbox(){return nn(this._API_KEY)}close(){be.instance===this?be.instance=void 0:Y.warnLog("Trying to close a Purchases instance that is not the current instance. Ignoring.")}async _getCustomerInfoForUserId(t){const r=await this.backend.getCustomerInfo(t);return pc(r)}static generateRevenueCatAnonymousAppUserId(){return`$RCAnonymousID:${crypto.randomUUID().replace(/-/g,"")}`}};pn=po(null),yo(pn,1,"purchase",co,be),mn(pn,be),B(be,"instance");let _n=be;E.ErrorCode=ae,E.LogLevel=pe,E.OfferingKeyword=sn,E.PackageType=Ei,E.ProductType=Te,E.Purchases=_n,E.PurchasesError=ne,E.UninitializedPurchasesError=Ti,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
140
+ */`};function q_(e,r){ne(r,!0),H(e,I_);const t=Ya(),n=()=>Ha(To,"$prefersDarkMode",t),a=g(r,"variablesPerPackage",19,()=>({}));let o=tr({selectedPackageId:l_(r.paywallData),locale:r.selectedLocale||r.paywallData.default_locale,defaultLocale:r.paywallData.default_locale,variablesPerPackage:a()}),s=_s(tr(a()[o.selectedPackageId||""]));const i=(v,T)=>{var k;(k=r.onRestorePurchasesClicked)==null||k.call(r)},l=(v,T)=>{var k;(k=r.onBackClicked)==null||k.call(r)},u=(v,T)=>{var O,G;if(v.destination==="customer_center"&&((O=r.onVisitCustomerCenterClicked)==null||O.call(r)),!v.url)return;const k=Do(v.url.url_lid,o.locale,o.defaultLocale,r.paywallData.components_localizations);k&&((G=r.onNavigateToUrlClicked)==null||G.call(r,k))},c=(v,T)=>{o.selectedPackageId=T==null?void 0:T.packageId,T!=null&&T.packageId&&A(s,tr(a()[T.packageId]))},d=(v,T)=>{var k;o.selectedPackageId!==void 0&&((k=r.onPurchaseClicked)==null||k.call(r,o.selectedPackageId))},_=(v,T)=>{switch(v.type){case"select_package":c(v,T);break;case"navigate_to":u(v);break;case"navigate_back":l();break;case"restore_purchases":i();break;case"purchase":d();break}},f=ee(()=>n()?"dark":"light"),m=ee(()=>{var v;return P_({background:(v=r.paywallData.components_config.base)==null?void 0:v.background,colorMode:p(f)})}),y=ee(()=>k_(r.paywallData,n()?"dark":"light"));var w=S_(),P=q(w);Bn(P,{onAction:_,get nodeData(){return r.paywallData.components_config.base.stack},get labels(){return r.paywallData.components_localizations},get purchaseState(){return o},get variableDictionary(){return p(s)}});var E=N(P,2);{var I=v=>{var T=E_();Z(()=>K(T,"style",p(m))),h(v,T)},b=v=>{var T=ie(),k=j(T);{var O=G=>{var D=x_(),oe=q(D);Z(()=>K(oe,"src",p(y))),h(G,D)};U(k,G=>{var D;((D=r.paywallData.components_config.base.background)==null?void 0:D.type)==="image"&&G(O)},!0)}h(v,T)};U(E,v=>{var T;((T=r.paywallData.components_config.base.background)==null?void 0:T.type)==="color"?v(I):v(b,!1)})}h(e,w),ae()}const T_=e=>{const{gradient_colors:r,colorMode:t,mask_shape:n,size:a,overrides:o,componentState:s}=e,i=Ln(o,s),l=a_(t,(i==null?void 0:i.gradient_colors)||r),u=Gt({...a,...i}),c=o_({...n,...i});return{imageStyles:{...u,...c},gradientStyles:l}};var F_=x('<div class="image-container svelte-3o7c39"><img class="image svelte-3o7c39" alt=""> <span class="image-overlay svelte-3o7c39"></span></div>');const A_={hash:"svelte-3o7c39",code:".image-container.svelte-3o7c39 {position:relative;height:var(--height, unset);width:var(--width, unset);overflow:hidden;border-radius:var(--corner-radius, unset);clip-path:var(--clip-path, unset);display:flex;flex:var(--flex, 1 1 auto);}.image.svelte-3o7c39 {width:100%;height:100%;object-fit:cover;display:block;}.image-overlay.svelte-3o7c39 {position:absolute;inset:0;background:var(--background, none);}"};function O_(e,r){ne(r,!0),H(e,A_);const t=wn(r,["$$slots","$$events","$$legacy","id","colorMode","source"]),n=ee(()=>T_({id:r.id,colorMode:r.colorMode,source:r.source,...t})),a=ee(()=>p(n).gradientStyles),o=ee(()=>p(n).imageStyles),s=ee(()=>gt(p(a))),i=ee(()=>gt(p(o)));var l=F_(),u=q(l),c=N(u,2);Z(()=>{var d;K(l,"id",`image-container-${r.id}`),K(l,"style",p(i)),K(u,"src",(d=r.source[r.colorMode||"light"])==null?void 0:d.original),K(u,"id",r.id),K(c,"style",p(s))}),h(e,l),ae()}const D_={hash:"svelte-raczc6",code:""};function M_(e,r){ne(r,!0),H(e,D_),Fo(e,{onclick:()=>{r.onAction&&r.onAction({type:"purchase"})},class:"purchase-button",children:(n,a)=>{vt(n,dt(()=>r.stack,{get labels(){return r.labels},get purchaseState(){return r.purchaseState},get variableDictionary(){return r.variableDictionary}}))},$$slots:{default:!0}}),ae()}const N_=(e,r)=>{e.preventDefault(),e.stopPropagation(),r.onAction&&r.onAction({type:"select_package"},{packageId:r.package_id})};var C_=x('<button class="package svelte-128m8vw"><!></button>');const j_={hash:"svelte-128m8vw",code:".package.svelte-128m8vw {width:100%;display:flex;margin:0;padding:0;background:unset;border:unset;text-align:unset;}"};function R_(e,r){ne(r,!0),H(e,j_);const t=ee(()=>{var s;return((s=r.purchaseState.variablesPerPackage)==null?void 0:s[r.package_id])||r.variableDictionary}),n=ee(()=>{var s;return{selected:((s=r.purchaseState)==null?void 0:s.selectedPackageId)===r.package_id}});var a=C_();a.__click=[N_,r];var o=q(a);vt(o,dt(()=>r.stack,{get labels(){return r.labels},get onAction(){return r.onAction},get purchaseState(){return r.purchaseState},get componentState(){return p(n)},get variableDictionary(){return p(t)}})),Z(()=>{K(a,"id",r.id),Qs(a,"selected",p(n).selected)}),h(e,a),ae()}hn(["click"]);var U_=x('<div class="footer"><!></div>');function L_(e,r){var t=U_(),n=q(t);vt(n,dt(()=>r.stack,{get labels(){return r.labels},get purchaseState(){return r.purchaseState},get variableDictionary(){return r.variableDictionary}})),Z(()=>K(t,"id",r.id)),h(e,t)}const B_=1000001;function z_(e){return e.rcBillingProduct.defaultPurchaseOption}function Mo(e,r,t,n=!1){return t.translate(C.PaywallVariablesPricePerPeriod,{formattedPrice:e,period:r.base.period?t.translatePeriod(r.base.period.number,r.base.period.unit,{noWhitespace:!0,short:!n}):""})}function V_(e,r){return e.unit==="year"?r.translatePeriod(e.number*12,mr.Month):r.translatePeriod(e.number,e.unit)}function H_({price:e,period:r,translator:t}){const n=t.formatPrice(e.amountMicros,e.currency);return r?r.unit==="year"?t.formatPrice(e.amountMicros/12/4,e.currency):r.unit==="month"||r.unit==="week"&&r.number>1?t.formatPrice(e.amountMicros/r.number,e.currency):r.unit==="day"?t.formatPrice(e.amountMicros*7/r.number,e.currency):n:n}function Y_({price:e,period:r,translator:t}){const n=t.formatPrice(e.amountMicros,e.currency);return!r||!r.number?n:r.unit==="year"?t.formatPrice(e.amountMicros/12,e.currency):r.unit==="month"&&r.number>1?t.formatPrice(e.amountMicros/r.number,e.currency):r.unit==="week"?t.formatPrice(e.amountMicros*4/r.number,e.currency):r.unit==="day"?t.formatPrice(e.amountMicros*30/r.number,e.currency):n}function No({price:e,period:r,full:t=!1,translator:n}){if(!r||!r.number||r.unit===mr.Month&&r.number==1)return n.formatPrice(e.amountMicros,e.currency);let a="";switch(r.unit){case mr.Year:a=n.formatPrice(e.amountMicros/12,e.currency);break;case mr.Month:a=n.formatPrice(e.amountMicros/r.number,e.currency);break;case mr.Week:a=n.formatPrice(e.amountMicros*4/r.number,e.currency);break;case mr.Day:a=n.formatPrice(e.amountMicros*30/r.number,e.currency);break}return n.translate(C.PaywallVariablesTotalPriceAndPerMonth,{formattedPrice:n.formatPrice(e.amountMicros,e.currency),period:n.translatePeriod(r.number,r.unit,{noWhitespace:!0,short:!t}),formattedPricePerMonth:a,monthPeriod:n.translatePeriodUnit(mr.Month,{noWhitespace:!0,short:!t})})}function G_(e,r){const t=e.availablePackages,n=t.reduce((a,o)=>a.rcBillingProduct.currentPrice.amountMicros>o.rcBillingProduct.currentPrice.amountMicros?a:o);return t.reduce((a,o)=>(a[o.identifier]=W_(o,n,r),a),{})}function W_(e,r,t){const n=e.rcBillingProduct,a=t.formatPrice(n.currentPrice.amountMicros,n.currentPrice.currency),o=z_(e),s=n.productType,i={product_name:n.title,price:a,price_per_period:"",price_per_period_full:"",total_price_and_per_month:"",total_price_and_per_month_full:"",sub_price_per_month:"",sub_price_per_week:"",sub_duration:"",sub_duration_in_months:"",sub_period:"",sub_period_length:"",sub_period_abbreviated:"",sub_offer_duration:void 0,sub_offer_duration_2:void 0,sub_offer_price:void 0,sub_offer_price_2:void 0,sub_relative_discount:""};if(s===Je.Subscription&&o){i.price_per_period=Mo(a,o,t),i.price_per_period_full=Mo(a,o,t,!0);const l=o.base.period;i.total_price_and_per_month=No({price:n.currentPrice,period:l,translator:t}),i.total_price_and_per_month_full=No({price:n.currentPrice,period:l,full:!0,translator:t}),i.sub_price_per_month=Y_({price:n.currentPrice,period:l,translator:t}),i.sub_price_per_week=H_({price:n.currentPrice,period:l,translator:t}),i.sub_duration=t.translatePeriod(l==null?void 0:l.number,l==null?void 0:l.unit),i.sub_duration_in_months=V_(l,t),i.sub_period=t.translatePeriodFrequency(l==null?void 0:l.number,l==null?void 0:l.unit),i.sub_period_length=l?t.translatePeriodUnit(l.unit,{noWhitespace:!0}):void 0,i.sub_period_abbreviated=l?t.translatePeriodUnit(l.unit,{noWhitespace:!0,short:!0}):void 0;const u=n.currentPrice.amountMicros,c=r.rcBillingProduct.currentPrice.amountMicros,d=((c-u)*100/c).toFixed(0);i.sub_relative_discount=u===c?"":t.translate(C.PaywallVariablesSubRelativeDiscount,{discount:d})}return(s===Je.NonConsumable||s===Je.Consumable)&&o&&(i.price=a,i.price_per_period=a,i.price_per_period_full=a,i.total_price_and_per_month=a,i.sub_price_per_month=a,i.sub_duration=t.translate(C.PeriodsLifetime),i.sub_duration_in_months=t.translate(C.PeriodsLifetime),i.sub_period=t.translate(C.PeriodsLifetime),i.sub_price_per_week=void 0,i.sub_relative_discount=void 0,i.price_per_period_full=a,i.total_price_and_per_month_full=a,i.sub_period_length=void 0,i.sub_period_abbreviated=void 0),i}Co=[Zc];const Fe=class Fe{constructor(r,t,n=Dn){Go(Vn,5,this);V(this,"_API_KEY");V(this,"_appUserId");V(this,"_brandingInfo",null);V(this,"_loadingResourcesPromise",null);V(this,"backend");V(this,"purchaseOperationHelper");this._API_KEY=r,this._appUserId=t,An(r)&&X.debugLog("Initializing Purchases SDK with sandbox API Key"),this.backend=new Vc(this._API_KEY,n),this.purchaseOperationHelper=new pl(this.backend)}static setLogLevel(r){X.setLogLevel(r)}static getSharedInstance(){if(Fe.isConfigured())return Fe.instance;throw new $a}static isConfigured(){return Fe.instance!==void 0}static configure(r,t,n=Dn){return Fe.instance!==void 0&&X.warnLog("Purchases is already initialized. You normally should only configure Purchases once. Creating and returning new instance."),Hc(r),Yc(t),Gc(n.proxyURL),Wc(n.additionalHeaders),Fe.instance=new Fe(r,t,n),Fe.getSharedInstance()}async preload(){if(this.hasLoadedResources()){X.verboseLog("Purchases resources are loaded. Skipping.");return}if(this._loadingResourcesPromise!==null){X.verboseLog("Purchases resources are loading. Waiting."),await this._loadingResourcesPromise;return}return this._loadingResourcesPromise=this.backend.getBrandingInfo().then(r=>{this._brandingInfo=r}).catch(r=>{let t=`${r}`;r instanceof fe&&(t=`${r.message}. ${r.underlyingErrorMessage?`Underlying error: ${r.underlyingErrorMessage}`:""}`),X.errorLog(`Error fetching branding info: ${t}`)}).finally(()=>{this._loadingResourcesPromise=null}),this._loadingResourcesPromise}hasLoadedResources(){return this._brandingInfo!==null}async renderPaywall(r){console.warn("This method is @experimental, Paywalls are not generally available but they will come soon!");let n=r.htmlTarget??document.getElementById("rcb-ui-pw-root");if(n===null){const f=document.createElement("div");f.id="rcb-ui-pw-root",f.className="rcb-ui-pw-root",f.style.zIndex=`${B_}`,document.body.appendChild(f),n=f}if(n===null)throw new Error("Could not generate a mount point for the billing widget");const a=n;a.innerHTML="";const o=r.offering;if(!o.paywall_components)throw new Error("You cannot use paywalls yet, they are coming soon!");const s=r.selectedLocale||navigator.language,i=new Ve({},s,o.paywall_components.default_locale),l=f=>{var y;const m=o.availablePackages.find(w=>w.identifier===f);if(m===void 0)throw new Error(`No package found for ${f}`);return this.purchase({rcPackage:m,htmlTarget:r.purchaseHtmlTarget,customerEmail:r.customerEmail,selectedLocale:s,defaultLocale:((y=o.paywall_components)==null?void 0:y.default_locale)||or})},u=f=>{var m;if(r.onNavigateToUrl){r.onNavigateToUrl(f);return}(m=window.open(f,"_blank"))==null||m.focus()},c=()=>{},d=()=>{if(r.onVisitCustomerCenter){r.onVisitCustomerCenter();return}},_=G_(o,i);return new Promise((f,m)=>{Fa(q_,{target:a,props:{paywallData:o.paywall_components,selectedLocale:s,onNavigateToUrlClicked:u,onVisitCustomerCenterClicked:d,onBackClicked:()=>{if(r.onBack){r.onBack();return}a.innerHTML="",X.debugLog("Purchase cancelled by user"),m(new fe(ge.UserCancelledError))},onRestorePurchasesClicked:c,onPurchaseClicked:y=>{l(y).then(w=>{f(w)}).catch(w=>m(w))},onError:y=>m(y),variablesPerPackage:_}})})}async getOfferings(r){ju(r==null?void 0:r.currency);const t=this._appUserId,n=await this.backend.getOfferings(t),a=(r==null?void 0:r.offeringIdentifier)===Mn.Current?n.current_offering_id:r==null?void 0:r.offeringIdentifier;return a&&(n.offerings=n.offerings.filter(o=>o.identifier===a)),await this.getAllOfferings(n,t,r)}async getCurrentOfferingForPlacement(r,t){const n=this._appUserId,a=await this.backend.getOfferings(n),o=await this.getAllOfferings(a,n,t),s=a.placements??null;return s==null?null:Qc(s,o.all,r)}async getAllOfferings(r,t,n){const a=r.offerings.flatMap(s=>s.packages).map(s=>s.platform_product_identifier),o=await this.backend.getProducts(t,a,n==null?void 0:n.currency);return this.logMissingProductIds(a,o.product_details),Jc(r,o)}async isEntitledTo(r){const t=await this.getCustomerInfo();return r in t.entitlements.active}purchasePackage(r,t,n){return this.purchase({rcPackage:r,customerEmail:t,htmlTarget:n})}purchase(r){const{rcPackage:t,purchaseOption:n,htmlTarget:a,customerEmail:o,selectedLocale:s=or,defaultLocale:i=or}=r;let l=a??document.getElementById("rcb-ui-root");if(l===null){const f=document.createElement("div");f.className="rcb-ui-root",document.body.appendChild(f),l=f}if(l===null)throw new Error("Could not generate a mount point for the billing widget");const u=l,c=!a,d=this._appUserId;X.debugLog(`Presenting purchase form for package ${t.identifier}`);const _=s||i;return new Promise((f,m)=>{Fa(vc,{target:u,props:{appUserId:d,rcPackage:t,purchaseOption:n,customerEmail:o,onFinished:async y=>{X.debugLog("Purchase finished"),u.innerHTML="";const w={customerInfo:await this._getCustomerInfoForUserId(d),redemptionInfo:y};f(w)},onClose:()=>{u.innerHTML="",X.debugLog("Purchase cancelled by user"),m(new fe(ge.UserCancelledError))},onError:y=>{u.innerHTML="",m(fe.getForPurchasesFlowError(y))},purchases:this,brandingInfo:this._brandingInfo,purchaseOperationHelper:this.purchaseOperationHelper,asModal:c,selectedLocale:_,defaultLocale:i}})})}async getCustomerInfo(){return await this._getCustomerInfoForUserId(this._appUserId)}getAppUserId(){return this._appUserId}async changeUser(r){return this._appUserId=r,await this.getCustomerInfo()}logMissingProductIds(r,t){const n={};t.forEach(o=>n[o.identifier]=o);const a=[];r.forEach(o=>{n[o]===void 0&&a.push(o)}),a.length>0&&X.debugLog(`Could not find product data for product ids:
141
+ ${a.join()}.
142
+ Please check that your product configuration is correct.`)}isSandbox(){return An(this._API_KEY)}close(){Fe.instance===this?Fe.instance=void 0:X.warnLog("Trying to close a Purchases instance that is not the current instance. Ignoring.")}async _getCustomerInfoForUserId(r){const t=await this.backend.getCustomerInfo(r);return xc(t)}static generateRevenueCatAnonymousAppUserId(){return`$RCAnonymousID:${crypto.randomUUID().replace(/-/g,"")}`}};Vn=Ho(null),Wo(Vn,1,"purchase",Co,Fe),Wn(Vn,Fe),V(Fe,"instance");let zn=Fe;S.ErrorCode=ge,S.LogLevel=Te,S.OfferingKeyword=Mn,S.PackageType=Za,S.ProductType=Je,S.Purchases=zn,S.PurchasesError=fe,S.UninitializedPurchasesError=$a,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});