@revenuecat/purchases-js 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -74
- package/dist/Purchases.es.d.ts +430 -64
- package/dist/Purchases.es.js +2712 -1606
- package/dist/Purchases.umd.js +14 -14
- package/dist/style.css +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +9 -2
package/dist/Purchases.umd.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(G,Y){typeof exports=="object"&&typeof module<"u"?Y(exports):typeof define=="function"&&define.amd?define(["exports"],Y):(G=typeof globalThis<"u"?globalThis:G||self,Y(G.Purchases={}))})(this,function(G){"use strict";var Xr=Object.defineProperty;var Zr=(G,Y,x)=>Y in G?Xr(G,Y,{enumerable:!0,configurable:!0,writable:!0,value:x}):G[Y]=x;var q=(G,Y,x)=>(Zr(G,typeof Y!="symbol"?Y+"":Y,x),x);const Y=t=>({amount:t.amount,currency:t.currency}),x=t=>({id:t.identifier,identifier:t.identifier,displayName:t.title,currentPrice:t.current_price?Y(t.current_price):null,normalPeriodDuration:t.normal_period_duration}),lt=(t,e)=>{const r=e[t.platform_product_identifier];return r===void 0?null:{id:t.identifier,identifier:t.identifier,rcBillingProduct:x(r)}},Ne=(t,e)=>{const r=t.packages.map(n=>lt(n,e)).filter(n=>n!=null);return r.length==0?null:{id:t.identifier,identifier:t.identifier,displayName:t.description,packages:r}};function T(){}function ot(t,e){for(const r in e)t[r]=e[r];return t}function ke(t){return t()}function Oe(){return Object.create(null)}function ne(t){t.forEach(ke)}function ue(t){return typeof t=="function"}function y(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let ae;function Ae(t,e){return t===e?!0:(ae||(ae=document.createElement("a")),ae.href=e,t===ae.href)}function st(t){return Object.keys(t).length===0}function H(t,e,r,n){if(t){const i=Ue(t,e,r,n);return t[0](i)}}function Ue(t,e,r,n){return t[1]&&n?ot(r.ctx.slice(),t[1](n(e))):r.ctx}function K(t,e,r,n){if(t[2]&&n){const i=t[2](n(r));if(e.dirty===void 0)return i;if(typeof i=="object"){const l=[],o=Math.max(e.dirty.length,i.length);for(let s=0;s<o;s+=1)l[s]=e.dirty[s]|i[s];return l}return e.dirty|i}return e.dirty}function j(t,e,r,n,i,l){if(i){const o=Ue(e,r,n,l);t.p(o,i)}}function J(t){if(t.ctx.length>32){const e=[],r=t.ctx.length/32;for(let n=0;n<r;n++)e[n]=-1;return e}return-1}function re(t){return t??""}function M(t,e){t.appendChild(e)}function P(t,e,r){const n=ct(t);if(!n.getElementById(e)){const i=C("style");i.id=e,i.textContent=r,ft(n,i)}}function ct(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function ft(t,e){return M(t.head||t,e),e.sheet}function h(t,e,r){t.insertBefore(e,r||null)}function g(t){t.parentNode&&t.parentNode.removeChild(t)}function C(t){return document.createElement(t)}function L(t){return document.createTextNode(t)}function U(){return L(" ")}function W(){return L("")}function me(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function ve(t){return function(e){return e.preventDefault(),t.call(this,e)}}function I(t,e,r){r==null?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}const ut=["width","height"];function at(t,e){const r=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:r[n]&&r[n].set&&ut.indexOf(n)===-1?t[n]=e[n]:I(t,n,e[n])}function At(t,e){Object.keys(e).forEach(r=>{mt(t,r,e[r])})}function mt(t,e,r){const n=e.toLowerCase();n in t?t[n]=typeof t[n]=="boolean"&&r===""?!0:r:e in t?t[e]=typeof t[e]=="boolean"&&r===""?!0:r:I(t,e,r)}function dt(t){return/-/.test(t)?At:at}function Et(t){return Array.from(t.childNodes)}function ie(t,e){e=""+e,t.data!==e&&(t.data=e)}function Pe(t,e){t.value=e??""}function gt(t,e,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:r,cancelable:n})}let le;function oe(t){le=t}function de(){if(!le)throw new Error("Function called outside component initialization");return le}function we(t){de().$$.on_mount.push(t)}function ht(){const t=de();return(e,r,{cancelable:n=!1}={})=>{const i=t.$$.callbacks[e];if(i){const l=gt(e,r,{cancelable:n});return i.slice().forEach(o=>{o.call(t,l)}),!l.defaultPrevented}return!0}}function _t(t,e){return de().$$.context.set(t,e),e}function pt(t){return de().$$.context.get(t)}function It(t,e){const r=t.$$.callbacks[e.type];r&&r.slice().forEach(n=>n.call(this,e))}const z=[],Ee=[];let X=[];const be=[],wt=Promise.resolve();let Be=!1;function bt(){Be||(Be=!0,wt.then(Le))}function Qe(t){X.push(t)}function Bt(t){be.push(t)}const Ce=new Set;let Z=0;function Le(){if(Z!==0)return;const t=le;do{try{for(;Z<z.length;){const e=z[Z];Z++,oe(e),Qt(e.$$)}}catch(e){throw z.length=0,Z=0,e}for(oe(null),z.length=0,Z=0;Ee.length;)Ee.pop()();for(let e=0;e<X.length;e+=1){const r=X[e];Ce.has(r)||(Ce.add(r),r())}X.length=0}while(z.length);for(;be.length;)be.pop()();Be=!1,Ce.clear(),oe(t)}function Qt(t){if(t.fragment!==null){t.update(),ne(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Qe)}}function Ct(t){const e=[],r=[];X.forEach(n=>t.indexOf(n)===-1?e.push(n):r.push(n)),r.forEach(n=>n()),X=e}const ge=new Set;let V;function F(){V={r:0,c:[],p:V}}function S(){V.r||ne(V.c),V=V.p}function u(t,e){t&&t.i&&(ge.delete(t),t.i(e))}function A(t,e,r,n){if(t&&t.o){if(ge.has(t))return;ge.add(t),V.c.push(()=>{ge.delete(t),n&&(r&&t.d(1),n())}),t.o(e)}else n&&n()}function Dt(t,e,r){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=r,r(t.$$.ctx[n]))}function B(t){t&&t.c()}function w(t,e,r){const{fragment:n,after_update:i}=t.$$;n&&n.m(e,r),Qe(()=>{const l=t.$$.on_mount.map(ke).filter(ue);t.$$.on_destroy?t.$$.on_destroy.push(...l):ne(l),t.$$.on_mount=[]}),i.forEach(Qe)}function b(t,e){const r=t.$$;r.fragment!==null&&(Ct(r.after_update),ne(r.on_destroy),r.fragment&&r.fragment.d(e),r.on_destroy=r.fragment=null,r.ctx=[])}function Rt(t,e){t.$$.dirty[0]===-1&&(z.push(t),bt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function N(t,e,r,n,i,l,o=null,s=[-1]){const c=le;oe(t);const f=t.$$={fragment:null,ctx:[],props:l,update:T,not_equal:i,bound:Oe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Oe(),dirty:s,skip_bound:!1,root:e.target||c.$$.root};o&&o(f.root);let a=!1;if(f.ctx=r?r(t,e.props||{},(m,p,...E)=>{const D=E.length?E[0]:p;return f.ctx&&i(f.ctx[m],f.ctx[m]=D)&&(!f.skip_bound&&f.bound[m]&&f.bound[m](D),a&&Rt(t,m)),p}):[],f.update(),a=!0,ne(f.before_update),f.fragment=n?n(f.ctx):!1,e.target){if(e.hydrate){const m=Et(e.target);f.fragment&&f.fragment.l(m),m.forEach(g)}else f.fragment&&f.fragment.c();e.intro&&u(t.$$.fragment),w(t,e.target,e.anchor),Le()}oe(c)}class k{constructor(){q(this,"$$");q(this,"$$set")}$destroy(){b(this,1),this.$destroy=T}$on(e,r){if(!ue(r))return T;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(r),()=>{const i=n.indexOf(r);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!st(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Tt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Tt);function Mt(t){P(t,"svelte-8uc6s0","aside.svelte-8uc6s0{color:yellowgreen;font-weight:bold;text-transform:uppercase;padding:0.5rem 0;width:100%;font-size:0.75rem;border-radius:0.5rem}")}function yt(t){let e;return{c(){e=C("aside"),e.innerHTML="<span>Sandbox Mode</span>",I(e,"class","svelte-8uc6s0")},m(r,n){h(r,e,n)},p:T,i:T,o:T,d(r){r&&g(e)}}}class Nt extends k{constructor(e){super(),N(this,e,null,yt,y,{},Mt)}}function kt(t){P(t,"svelte-ujomz3",".rcb-modal-section.svelte-ujomz3{padding:0.5rem 0rem;display:flex}.rcb-modal-section.svelte-ujomz3:last-of-type{padding:0}")}function De(t){let e,r;const n=t[2].default,i=H(n,t,t[1],null);return{c(){e=C(t[0]),i&&i.c(),dt(t[0])(e,{class:re("rcb-modal-section")+" svelte-ujomz3"})},m(l,o){h(l,e,o),i&&i.m(e,null),r=!0},p(l,o){i&&i.p&&(!r||o&2)&&j(i,n,l,l[1],r?K(n,l[1],o,null):J(l[1]),null)},i(l){r||(u(i,l),r=!0)},o(l){A(i,l),r=!1},d(l){l&&g(e),i&&i.d(l)}}}function Ot(t){let e=t[0],r,n,i=t[0]&&De(t);return{c(){i&&i.c(),r=W()},m(l,o){i&&i.m(l,o),h(l,r,o),n=!0},p(l,[o]){l[0]?e?y(e,l[0])?(i.d(1),i=De(l),e=l[0],i.c(),i.m(r.parentNode,r)):i.p(l,o):(i=De(l),e=l[0],i.c(),i.m(r.parentNode,r)):e&&(i.d(1),i=null,e=l[0])},i(l){n||(u(i,l),n=!0)},o(l){A(i,l),n=!1},d(l){l&&g(r),i&&i.d(l)}}}function Ut(t,e,r){let{$$slots:n={},$$scope:i}=e,{as:l="section"}=e;return t.$$set=o=>{"as"in o&&r(0,l=o.as),"$$scope"in o&&r(1,i=o.$$scope)},[l,i,n]}class ee extends k{constructor(e){super(),N(this,e,Ut,Ot,y,{as:0},kt)}}const vt={Y:"year",M:"month",W:"week",D:"day",H:"hour"},Fe=(t,e)=>{const r=t/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:e}).format(r)},Se=t=>{const e=t.slice(-1);return e==="D"?"daily":`${vt[e]}ly`};function Pt(t){P(t,"svelte-1oa6nu8",".rcb-pricing-info.svelte-1oa6nu8{display:flex;flex-direction:column;height:10rem;justify-content:flex-end}.rcb-product-price.svelte-1oa6nu8{font-size:1.5rem}.rcb-product-duration.svelte-1oa6nu8{opacity:0.6}")}function Lt(t){let e,r,n=t[0].displayName+"",i,l,o,s=t[0].currentPrice.currency+"",c,f=" ",a,m=Fe(t[0].currentPrice.amount,t[0].currentPrice.currency)+"",p,E,D,_,d=Se(t[0].normalPeriodDuration)+"",Q;return{c(){e=C("div"),r=C("span"),i=L(n),l=U(),o=C("span"),c=L(s),a=L(f),p=L(m),E=U(),D=C("span"),_=L("Billed "),Q=L(d),I(o,"class","rcb-product-price svelte-1oa6nu8"),I(D,"class","rcb-product-duration svelte-1oa6nu8"),I(e,"class","rcb-pricing-info svelte-1oa6nu8")},m(O,R){h(O,e,R),M(e,r),M(r,i),M(e,l),M(e,o),M(o,c),M(o,a),M(o,p),M(e,E),M(e,D),M(D,_),M(D,Q)},p(O,R){R&1&&n!==(n=O[0].displayName+"")&&ie(i,n),R&1&&s!==(s=O[0].currentPrice.currency+"")&&ie(c,s),R&1&&m!==(m=Fe(O[0].currentPrice.amount,O[0].currentPrice.currency)+"")&&ie(p,m),R&1&&d!==(d=Se(O[0].normalPeriodDuration)+"")&&ie(Q,d)},d(O){O&&g(e)}}}function Ft(t){let e,r;return e=new ee({props:{$$slots:{default:[Lt]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,[i]){const l={};i&9&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function St(t,e,r){let{productDetails:n}=e,{onClose:i}=e,{onContinue:l}=e;return t.$$set=o=>{"productDetails"in o&&r(0,n=o.productDetails),"onClose"in o&&r(1,i=o.onClose),"onContinue"in o&&r(2,l=o.onContinue)},[n,i,l]}class Ye extends k{constructor(e){super(),N(this,e,St,Ft,y,{productDetails:0,onClose:1,onContinue:2},Pt)}}const Yt="data:image/gif;base64,R0lGODlhMgAyAPcBAAAAAAD/AAMDAwcHBxERERUVFSoqKi0tLTAwMDg4OD09PURERElJSUtLS1BQUFJSUlVVVVdXV1paWl9fX2NjY2ZmZmlpaWxsbG1tbXNzc3t7e39/f4GBgYKCgoSEhIaGhoeHh4iIiIuLi5KSkpSUlJaWlp2dnaGhoaOjo6SkpKWlpaenp6ioqKqqqqurq6ysrLCwsLGxsbS0tLa2tri4uLm5ub29vb6+vsDAwMHBwcLCwsXFxcjIyMnJyc3Nzc7OztPT09TU1NXV1dfX19nZ2dra2tvb29zc3N7e3uDg4OHh4eLi4uPj4+fn5+np6ezs7O7u7vDw8PHx8fLy8vPz8/X19fb29vj4+Pn5+fz8/P39/f7+/v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBAABACwAAAAAMgAyAIcAAAAA/wADAwMHBwcREREVFRUqKiotLS0wMDA4ODg9PT1ERERJSUlLS0tQUFBSUlJVVVVXV1daWlpfX19jY2NmZmZpaWlsbGxtbW1zc3N7e3t/f3+BgYGCgoKEhISGhoaHh4eIiIiLi4uSkpKUlJSWlpadnZ2hoaGjo6OkpKSlpaWnp6eoqKiqqqqrq6usrKywsLCxsbG0tLS2tra4uLi5ubm9vb2+vr7AwMDBwcHCwsLFxcXIyMjJycnNzc3Ozs7T09PU1NTV1dXX19fZ2dna2trb29vc3Nze3t7g4ODh4eHi4uLj4+Pn5+fp6ens7Ozu7u7w8PDx8fHy8vLz8/P19fX29vb4+Pj5+fn8/Pz9/f3+/v7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8I/wCzcBFIcKDBgggPKkzIcCEXLlq4bIEokeLEiBcrYrTIcaNHjRobinQ4sqRCkBlTdtR44MBKlR9TmjQJQMBMkgZfdpwSMSYAACgpRtHpcSYSFUIa1mz448UQnAWDfmzSooUVmD9XVnnBwglMlDdvvMjhcOlCHit23CSqcUrVJiizpnTC4sXQmB1vZvmxwgYWhWYLznjRA+rJryqvxGhxxGNLjkVcwMCCN6ZeLkNevDCcRYYKJJfZptyCQwdiijl0CDxdlLPryw2lymY9WzTs17ijVq69mzbM28Bd8x7u23bu46F7i16uXEvw5ziJM5duGbl1k9OLN5cKvfvh7OC3b0jxTv6h+PDUy3unzl67RPXXc56fnz4+/PbofcOHnr9/5f3x4UeffvYVqJuACP5m4IIJ+gfWgusN6KCCAN7WoITVVXjchBxqERAAIfkEBQQAAQAsDQADACAAEAAACKcAAwgcSDDAAwcFEypcSNDAAYYQA2DZstCAAYZOKCqM8uNJxYcKa3DYsVBKECBYFFpU+MTDhiIMkQxBohJkwRYaUkDEEiQIlYQrCyLZ0MFJRCdAkgC1OZBEBxgRJRIBAqXgwYI8NoCwEjWAkyFDoorQ4KOrQCRLoqbQuZCKR7NdqzD5MaQKXIhZmAwBIqTJ3YVYogQZ8oMJ178Kk/A1YhfxQiRHjBYMCAAh+QQFBQABACwNAAMAIAAQAAAInQADCBxIMECGDAUTKlxI8EEEhhADcGEI4QFDJQy5ZJmo0OFCFBFkLNzCRQvHghEgKHQi4cEPhhuzdHyYUMQDDxC5kNSSsGLCIA4x5oxZ0GNBDBFKRAx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AABACwDAAMAFwAiAAAItQADCBxIsKDBGjQMKlyo4sXCgUIetmDxMAAJABsWrnD4UAaAAUkUumhRMcACAQ4UNiwpRAAAGwYnlgyAAQACgxtnPiEAoERBhDMDjBBAoCINHw8ZNHjI5EGEDUyCFtSyIoJVE1KkEnwCIsIDCjK0EgSSAQIED2IHYqkxQUTat3Djyp1b0UbDjXdhBqUxcWTfhHQDCx5MuCIXLVy2vOWShTEXsVsOJz6stbHlx1ojI1b8tvHbgAAAIfkEBQQAAQAsAwADABcAFwAACJQAAwgcSLCgwRIkDCpcqIHDwoFHHm7Y8DCACgMJFWroUBGHgQNMFE6sGGDCAQsaHVY8csAAD4MjSX4w8MDgRpIBoCQwsKIgQpwBUBxIULEHkYcUUC580tDEE6AGbXSYKKMKVIJSUnDQIGIHl6sQS0w8AZagjxAsyqpdy7at24pJfgwBMkQukCRQjQQBIgTIXiFGoAYEACH5BAUFAAEALAMAAwAXABcAAAiVAAMIHEiwoMEMGQwqXPggwsKBTLQshPDgYYAaD1owdPjQB4QIThRGgGAxwIYIIBQ2LMlkJBCDFEsGOPEgA5aCK0tKmQChRkGEMgPIiDDhoRYjTR56CPGwiooXN6oENQikhYsWP65MJXglx4sVMoZsJdikRosWOMYSRPJih9q3cOPKnWuRSxa7eO9O3cJFCxe+frdMDQgAIfkEBQUAAQAsBQADACAAEAAACKYAAwgcSLAgwQcODCpcyNDAAYYQAzhpaIDhFYY+NOBY6HAhkyETFRLZ0CGKQgMVDV4RAoQKQxMdUpx8aJAJECYQnWzYcMQgSoNVgAy5CHGGhhI+aRIkMgRnxCohNvQoiLDgEyFDskQUuINDiK1Hfpgc+ETKQi0nVGxNkkSrwCw/hiBxu7XuFidAhARpgqWu3yxIhgApEtLvVipIgARBYthvlKaNFQYEADs=";function Gt(t){let e,r;return{c(){e=C("img"),Ae(e.src,r=Yt)||I(e,"src",r),I(e,"alt","spinner")},m(n,i){h(n,e,i)},p:T,i:T,o:T,d(n){n&&g(e)}}}class Ht extends k{constructor(e){super(),N(this,e,null,Gt,y,{})}}function Kt(t){P(t,"svelte-4wmtg7",".rcb-modal-loader.svelte-4wmtg7{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center}")}function jt(t){let e,r,n;return r=new Ht({}),{c(){e=C("div"),B(r.$$.fragment),I(e,"class","rcb-modal-loader svelte-4wmtg7")},m(i,l){h(i,e,l),w(r,e,null),n=!0},p:T,i(i){n||(u(r.$$.fragment,i),n=!0)},o(i){A(r.$$.fragment,i),n=!1},d(i){i&&g(e),b(r)}}}class Re extends k{constructor(e){super(),N(this,e,null,jt,y,{},Kt)}}function Jt(t){let e;return{c(){e=C("div"),e.innerHTML="<p>error</p>"},m(r,n){h(r,e,n)},p:T,i:T,o:T,d(r){r&&g(e)}}}class $t extends k{constructor(e){super(),N(this,e,null,Jt,y,{})}}function xt(t){P(t,"svelte-igat39","button.svelte-igat39{border:none;border-radius:3.5rem;font-size:1rem;cursor:pointer;height:3.5rem;color:black;background-color:#dfdfdf}button.intent-primary.svelte-igat39{background-color:#000;color:white;font-size:1rem}")}function Vt(t){let e,r,n,i,l;const o=t[3].default,s=H(o,t,t[2],null);return{c(){e=C("button"),s&&s.c(),I(e,"class",r=re(`intent-${t[0]}`)+" svelte-igat39"),e.disabled=t[1]},m(c,f){h(c,e,f),s&&s.m(e,null),n=!0,i||(l=me(e,"click",t[4]),i=!0)},p(c,[f]){s&&s.p&&(!n||f&4)&&j(s,o,c,c[2],n?K(o,c[2],f,null):J(c[2]),null),(!n||f&1&&r!==(r=re(`intent-${c[0]}`)+" svelte-igat39"))&&I(e,"class",r),(!n||f&2)&&(e.disabled=c[1])},i(c){n||(u(s,c),n=!0)},o(c){A(s,c),n=!1},d(c){c&&g(e),s&&s.d(c),i=!1,l()}}}function qt(t,e,r){let{$$slots:n={},$$scope:i}=e,{intent:l="primary"}=e,{disabled:o=!1}=e;function s(c){It.call(this,t,c)}return t.$$set=c=>{"intent"in c&&r(0,l=c.intent),"disabled"in c&&r(1,o=c.disabled),"$$scope"in c&&r(2,i=c.$$scope)},[l,o,i,n,s]}class he extends k{constructor(e){super(),N(this,e,qt,Vt,y,{intent:0,disabled:1},xt)}}function Wt(t){P(t,"svelte-1f9z0o8","footer.svelte-1f9z0o8{display:flex;flex-direction:column}")}function zt(t){let e,r;const n=t[1].default,i=H(n,t,t[0],null);return{c(){e=C("footer"),i&&i.c(),I(e,"class","rcb-modal-footer svelte-1f9z0o8")},m(l,o){h(l,e,o),i&&i.m(e,null),r=!0},p(l,[o]){i&&i.p&&(!r||o&1)&&j(i,n,l,l[0],r?K(n,l[0],o,null):J(l[0]),null)},i(l){r||(u(i,l),r=!0)},o(l){A(i,l),r=!1},d(l){l&&g(e),i&&i.d(l)}}}function Xt(t,e,r){let{$$slots:n={},$$scope:i}=e;return t.$$set=l=>{"$$scope"in l&&r(0,i=l.$$scope)},[i,n]}class Te extends k{constructor(e){super(),N(this,e,Xt,zt,y,{},Wt)}}const Zt="data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%200%20124%20124'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='62'%20cy='62'%20r='62'%20fill='%23576CDB'/%3e%3crect%20x='44.1116'%20y='56'%20width='27.5'%20height='11'%20transform='rotate(45%2044.1116%2056)'%20fill='white'/%3e%3crect%20x='79.1133'%20y='44.334'%20width='11'%20height='44'%20transform='rotate(45%2079.1133%2044.334)'%20fill='white'/%3e%3c/svg%3e";function en(t){P(t,"svelte-7khg4b","img.svelte-7khg4b{width:7.75rem;height:7.75rem;margin:0 auto}")}function tn(t){let e,r;return{c(){e=C("img"),Ae(e.src,r=Zt)||I(e,"src",r),I(e,"alt","icon"),I(e,"class","rcb-ui-asset-icon svelte-7khg4b")},m(n,i){h(n,e,i)},p:T,i:T,o:T,d(n){n&&g(e)}}}class nn extends k{constructor(e){super(),N(this,e,null,tn,y,{},en)}}function rn(t){P(t,"svelte-18njhoa",'.column.svelte-18njhoa{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--gap, "0.5rem")}')}function ln(t){let e,r,n;const i=t[2].default,l=H(i,t,t[1],null);return{c(){e=C("div"),l&&l.c(),I(e,"class","column svelte-18njhoa"),I(e,"style",r=`--gap:${t[0]};`)},m(o,s){h(o,e,s),l&&l.m(e,null),n=!0},p(o,[s]){l&&l.p&&(!n||s&2)&&j(l,i,o,o[1],n?K(i,o[1],s,null):J(o[1]),null),(!n||s&1&&r!==(r=`--gap:${o[0]};`))&&I(e,"style",r)},i(o){n||(u(l,o),n=!0)},o(o){A(l,o),n=!1},d(o){o&&g(e),l&&l.d(o)}}}function on(t,e,r){let{$$slots:n={},$$scope:i}=e,{gutter:l="0.5rem"}=e;return t.$$set=o=>{"gutter"in o&&r(0,l=o.gutter),"$$scope"in o&&r(1,i=o.$$scope)},[l,i,n]}class _e extends k{constructor(e){super(),N(this,e,on,ln,y,{gutter:0},rn)}}function sn(t){P(t,"svelte-1lcsna9",".rcb-modal-success.svelte-1lcsna9{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-1lcsna9{font-size:24px}.subtitle.svelte-1lcsna9{font-size:16px}")}function cn(t){let e,r,n;return{c(){e=C("span"),e.textContent="Purchase Successful",r=U(),n=C("span"),n.textContent="Your plan is now active.",I(e,"class","title svelte-1lcsna9"),I(n,"class","subtitle svelte-1lcsna9")},m(i,l){h(i,e,l),h(i,r,l),h(i,n,l)},p:T,d(i){i&&(g(e),g(r),g(n))}}}function fn(t){let e,r,n,i;return e=new nn({}),n=new _e({props:{gutter:"1rem",$$slots:{default:[cn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),r=U(),B(n.$$.fragment)},m(l,o){w(e,l,o),h(l,r,o),w(n,l,o),i=!0},p(l,o){const s={};o&2&&(s.$$scope={dirty:o,ctx:l}),n.$set(s)},i(l){i||(u(e.$$.fragment,l),u(n.$$.fragment,l),i=!0)},o(l){A(e.$$.fragment,l),A(n.$$.fragment,l),i=!1},d(l){l&&g(r),b(e,l),b(n,l)}}}function un(t){let e,r,n;return r=new _e({props:{gutter:"1rem",$$slots:{default:[fn]},$$scope:{ctx:t}}}),{c(){e=C("div"),B(r.$$.fragment),I(e,"class","rcb-modal-success svelte-1lcsna9")},m(i,l){h(i,e,l),w(r,e,null),n=!0},p(i,l){const o={};l&2&&(o.$$scope={dirty:l,ctx:i}),r.$set(o)},i(i){n||(u(r.$$.fragment,i),n=!0)},o(i){A(r.$$.fragment,i),n=!1},d(i){i&&g(e),b(r)}}}function an(t){let e;return{c(){e=L("Go back to app")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function An(t){let e,r;return e=new he({props:{intent:"secondary",$$slots:{default:[an]},$$scope:{ctx:t}}}),e.$on("click",function(){ue(t[0])&&t[0].apply(this,arguments)}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){t=n;const l={};i&2&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function mn(t){let e,r,n,i;return e=new ee({props:{$$slots:{default:[un]},$$scope:{ctx:t}}}),n=new Te({props:{$$slots:{default:[An]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),r=U(),B(n.$$.fragment)},m(l,o){w(e,l,o),h(l,r,o),w(n,l,o),i=!0},p(l,o){const s={};o&2&&(s.$$scope={dirty:o,ctx:l}),e.$set(s);const c={};o&3&&(c.$$scope={dirty:o,ctx:l}),n.$set(c)},i(l){i||(u(e.$$.fragment,l),u(n.$$.fragment,l),i=!0)},o(l){A(e.$$.fragment,l),A(n.$$.fragment,l),i=!1},d(l){l&&g(r),b(e,l),b(n,l)}}}function dn(t){let e,r;return e=new _e({props:{gutter:"2rem",$$slots:{default:[mn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,[i]){const l={};i&3&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function En(t,e,r){let{onContinue:n}=e;return t.$$set=i=>{"onContinue"in i&&r(0,n=i.onContinue)},[n]}class gn extends k{constructor(e){super(),N(this,e,En,dn,y,{onContinue:0},sn)}}function hn(t,e,r,n,i={}){const l=r.create(e,i);return l.mount(t),l.on("change",o=>n("change",o)),l.on("ready",o=>n("ready",o)),l.on("focus",o=>n("focus",o)),l.on("blur",o=>n("blur",o)),l.on("escape",o=>n("escape",o)),l.on("click",o=>n("click",o)),l.on("loaderror",o=>n("loaderror",o)),l.on("loaderstart",o=>n("loaderstart",o)),l.on("networkschange",o=>n("networkschange",o)),l}const _n=typeof window>"u";function pn(t){if(!_n)return t.registerAppInfo({name:"svelte-stripe-js",url:"https://svelte-stripe-js.vercel.app"})}function In(t){let e;return{c(){e=C("div")},m(r,n){h(r,e,n),t[6](e)},p:T,i:T,o:T,d(r){r&&g(e),t[6](null)}}}function wn(t,e,r){let n,i;const l=ht(),{elements:o}=pt("stripe");let{options:s=void 0}=e;we(()=>(n=hn(i,"payment",o,l,s),()=>n.destroy()));function c(){n.blur()}function f(){n.clear()}function a(){n.destroy()}function m(){n.focus()}function p(E){Ee[E?"unshift":"push"](()=>{i=E,r(0,i)})}return t.$$set=E=>{"options"in E&&r(1,s=E.options)},[i,s,c,f,a,m,p]}class bn extends k{constructor(e){super(),N(this,e,wn,In,y,{options:1,blur:2,clear:3,destroy:4,focus:5})}get blur(){return this.$$.ctx[2]}get clear(){return this.$$.ctx[3]}get destroy(){return this.$$.ctx[4]}get focus(){return this.$$.ctx[5]}}function Ge(t){let e;const r=t[15].default,n=H(r,t,t[14],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&16384)&&j(n,r,i,i[14],e?K(r,i[14],l,null):J(i[14]),null)},i(i){e||(u(n,i),e=!0)},o(i){A(n,i),e=!1},d(i){n&&n.d(i)}}}function Bn(t){let e,r,n=t[1]&&t[0]&&Ge(t);return{c(){n&&n.c(),e=W()},m(i,l){n&&n.m(i,l),h(i,e,l),r=!0},p(i,[l]){i[1]&&i[0]?n?(n.p(i,l),l&3&&u(n,1)):(n=Ge(i),n.c(),u(n,1),n.m(e.parentNode,e)):n&&(F(),A(n,1,1,()=>{n=null}),S())},i(i){r||(u(n),r=!0)},o(i){A(n),r=!1},d(i){i&&g(e),n&&n.d(i)}}}function Qn(t,e,r){let n,{$$slots:i={},$$scope:l}=e,{stripe:o}=e,{mode:s=void 0}=e,{theme:c="stripe"}=e,{variables:f={}}=e,{rules:a={}}=e,{labels:m="above"}=e,{loader:p="auto"}=e,{fonts:E=[]}=e,{locale:D="auto"}=e,{currency:_=void 0}=e,{amount:d=void 0}=e,{clientSecret:Q=void 0}=e,{elements:O=null}=e;return t.$$set=R=>{"stripe"in R&&r(1,o=R.stripe),"mode"in R&&r(2,s=R.mode),"theme"in R&&r(3,c=R.theme),"variables"in R&&r(4,f=R.variables),"rules"in R&&r(5,a=R.rules),"labels"in R&&r(6,m=R.labels),"loader"in R&&r(7,p=R.loader),"fonts"in R&&r(8,E=R.fonts),"locale"in R&&r(9,D=R.locale),"currency"in R&&r(10,_=R.currency),"amount"in R&&r(11,d=R.amount),"clientSecret"in R&&r(12,Q=R.clientSecret),"elements"in R&&r(0,O=R.elements),"$$scope"in R&&r(14,l=R.$$scope)},t.$$.update=()=>{t.$$.dirty&120&&r(13,n={theme:c,variables:f,rules:a,labels:m}),t.$$.dirty&16263&&o&&!O&&(r(0,O=o.elements({mode:s,currency:_,amount:d,appearance:n,clientSecret:Q,fonts:E,loader:p,locale:D})),pn(o),_t("stripe",{stripe:o,elements:O})),t.$$.dirty&8705&&O&&O.update({appearance:n,locale:D})},[O,o,s,c,f,a,m,p,E,D,_,d,Q,n,l,i]}class Cn extends k{constructor(e){super(),N(this,e,Qn,Bn,y,{stripe:1,mode:2,theme:3,variables:4,rules:5,labels:6,loader:7,fonts:8,locale:9,currency:10,amount:11,clientSecret:12,elements:0})}}var He="https://js.stripe.com/v3",Dn=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Ke="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Rn=function(){for(var e=document.querySelectorAll('script[src^="'.concat(He,'"]')),r=0;r<e.length;r++){var n=e[r];if(Dn.test(n.src))return n}return null},je=function(e){var r=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(He).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},Tn=function(e,r){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"2.3.0",startTime:r})},se=null,pe=null,Ie=null,Mn=function(e){return function(){e(new Error("Failed to load Stripe.js"))}},yn=function(e,r){return function(){window.Stripe?e(window.Stripe):r(new Error("Stripe.js not available"))}},Nn=function(e){return se!==null?se:(se=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&e&&console.warn(Ke),window.Stripe){r(window.Stripe);return}try{var i=Rn();if(i&&e)console.warn(Ke);else if(!i)i=je(e);else if(i&&Ie!==null&&pe!==null){var l;i.removeEventListener("load",Ie),i.removeEventListener("error",pe),(l=i.parentNode)===null||l===void 0||l.removeChild(i),i=je(e)}Ie=yn(r,n),pe=Mn(n),i.addEventListener("load",Ie),i.addEventListener("error",pe)}catch(o){n(o);return}}),se.catch(function(r){return se=null,Promise.reject(r)}))},kn=function(e,r,n){if(e===null)return null;var i=e.apply(void 0,r);return Tn(i,n),i},ce,Je=!1,$e=function(){return ce||(ce=Nn(null).catch(function(e){return ce=null,Promise.reject(e)}),ce)};Promise.resolve().then(function(){return $e()}).catch(function(t){Je||console.warn(t)});var On=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];Je=!0;var i=Date.now();return $e().then(function(l){return kn(l,r,i)})};const Un=t=>{var e;return{nextAction:t.next_action,data:{clientSecret:((e=t.data)==null?void 0:e.client_secret)??void 0}}};function vn(t){P(t,"svelte-1fwwzeb",".rcb-stripe-elements-container.svelte-1fwwzeb{width:100%;margin-bottom:1rem}")}function Pn(t){let e,r;return e=new Re({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p:T,i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Ln(t){let e,r,n,i,l,o;function s(f){t[10](f)}let c={stripe:t[2],clientSecret:t[4],loader:"always",$$slots:{default:[Jn]},$$scope:{ctx:t}};return t[1]!==void 0&&(c.elements=t[1]),r=new Cn({props:c}),Ee.push(()=>Dt(r,"elements",s)),{c(){e=C("form"),B(r.$$.fragment)},m(f,a){h(f,e,a),w(r,e,null),i=!0,l||(o=me(e,"submit",ve(t[5])),l=!0)},p(f,a){const m={};a&4&&(m.stripe=f[2]),a&4105&&(m.$$scope={dirty:a,ctx:f}),!n&&a&2&&(n=!0,m.elements=f[1],Bt(()=>n=!1)),r.$set(m)},i(f){i||(u(r.$$.fragment,f),i=!0)},o(f){A(r.$$.fragment,f),i=!1},d(f){f&&g(e),b(r),l=!1,o()}}}function Fn(t){let e,r,n;return r=new bn({}),{c(){e=C("div"),B(r.$$.fragment),I(e,"class","rcb-stripe-elements-container svelte-1fwwzeb")},m(i,l){h(i,e,l),w(r,e,null),n=!0},p:T,i(i){n||(u(r.$$.fragment,i),n=!0)},o(i){A(r.$$.fragment,i),n=!1},d(i){i&&g(e),b(r)}}}function Sn(t){let e;return{c(){e=L("Pay")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function Yn(t){let e;return{c(){e=L("Processing...")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function Gn(t){let e;function r(l,o){return l[3]?Yn:Sn}let n=r(t),i=n(t);return{c(){i.c(),e=W()},m(l,o){i.m(l,o),h(l,e,o)},p(l,o){n!==(n=r(l))&&(i.d(1),i=n(l),i&&(i.c(),i.m(e.parentNode,e)))},d(l){l&&g(e),i.d(l)}}}function Hn(t){let e;return{c(){e=L("Close")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function Kn(t){let e,r,n,i;return e=new he({props:{disabled:t[3],$$slots:{default:[Gn]},$$scope:{ctx:t}}}),n=new he({props:{disabled:t[3],intent:"secondary",$$slots:{default:[Hn]},$$scope:{ctx:t}}}),n.$on("click",function(){ue(t[0])&&t[0].apply(this,arguments)}),{c(){B(e.$$.fragment),r=U(),B(n.$$.fragment)},m(l,o){w(e,l,o),h(l,r,o),w(n,l,o),i=!0},p(l,o){t=l;const s={};o&8&&(s.disabled=t[3]),o&4104&&(s.$$scope={dirty:o,ctx:t}),e.$set(s);const c={};o&8&&(c.disabled=t[3]),o&4096&&(c.$$scope={dirty:o,ctx:t}),n.$set(c)},i(l){i||(u(e.$$.fragment,l),u(n.$$.fragment,l),i=!0)},o(l){A(e.$$.fragment,l),A(n.$$.fragment,l),i=!1},d(l){l&&g(r),b(e,l),b(n,l)}}}function jn(t){let e,r;return e=new _e({props:{$$slots:{default:[Kn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&4105&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Jn(t){let e,r,n,i;return e=new ee({props:{$$slots:{default:[Fn]},$$scope:{ctx:t}}}),n=new Te({props:{$$slots:{default:[jn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),r=U(),B(n.$$.fragment)},m(l,o){w(e,l,o),h(l,r,o),w(n,l,o),i=!0},p(l,o){const s={};o&4096&&(s.$$scope={dirty:o,ctx:l}),e.$set(s);const c={};o&4105&&(c.$$scope={dirty:o,ctx:l}),n.$set(c)},i(l){i||(u(e.$$.fragment,l),u(n.$$.fragment,l),i=!0)},o(l){A(e.$$.fragment,l),A(n.$$.fragment,l),i=!1},d(l){l&&g(r),b(e,l),b(n,l)}}}function $n(t){let e,r,n,i;const l=[Ln,Pn],o=[];function s(c,f){return c[2]&&c[4]?0:1}return r=s(t),n=o[r]=l[r](t),{c(){e=C("div"),n.c()},m(c,f){h(c,e,f),o[r].m(e,null),i=!0},p(c,[f]){let a=r;r=s(c),r===a?o[r].p(c,f):(F(),A(o[a],1,1,()=>{o[a]=null}),S(),n=o[r],n?n.p(c,f):(n=o[r]=l[r](c),n.c()),u(n,1),n.m(e,null))},i(c){i||(u(n),i=!0)},o(c){A(n),i=!1},d(c){c&&g(e),o[r].d()}}}function xn(t,e,r){let{onClose:n}=e,{onContinue:i}=e,{onError:l}=e,{purchases:o}=e,{paymentInfoCollectionMetadata:s}=e;const c=s.data.clientSecret;let f=null,a,m=!1,p;we(async()=>{var O;const _=(O=o==null?void 0:o._PAYMENT_PROVIDER_SETTINGS)==null?void 0:O.stripe;if(!_)throw new Error("Stripe settings not found");const d=_.publishableKey,Q=_.accountId;if(!d||!Q)throw new Error("Stripe publishable key or account ID not found");r(2,f=await On(d,{stripeAccount:Q}))});const E=async()=>{if(m||!f||!p)return;r(3,m=!0);const _=await f.confirmSetup({elements:p,redirect:"if_required"});_.error?(r(3,m=!1),l(_.error)):i()};function D(_){a=_,r(1,a)}return t.$$set=_=>{"onClose"in _&&r(0,n=_.onClose),"onContinue"in _&&r(6,i=_.onContinue),"onError"in _&&r(7,l=_.onError),"purchases"in _&&r(8,o=_.purchases),"paymentInfoCollectionMetadata"in _&&r(9,s=_.paymentInfoCollectionMetadata)},t.$$.update=()=>{t.$$.dirty&2&&a&&a._elements.length>0&&(p=a)},[n,a,f,m,c,E,i,l,o,s,D]}class Vn extends k{constructor(e){super(),N(this,e,xn,$n,y,{onClose:0,onContinue:6,onError:7,purchases:8,paymentInfoCollectionMetadata:9},vn)}}function qn(t){P(t,"svelte-1xardyz",".form-container.svelte-1xardyz{display:flex;flex-direction:column;width:100%}.form-label.svelte-1xardyz{margin-top:0.5rem;margin-bottom:0.5rem;display:block}.form-input.svelte-1xardyz{margin-bottom:1rem}.title.svelte-1xardyz{font-size:1.5rem;margin:0;margin-bottom:0.5rem}input.svelte-1xardyz{width:94%;padding:0.5rem;border:1px solid #ccc;border-radius:0.25rem}")}function Wn(t){let e;return{c(){e=C("span"),e.textContent="User authentication",I(e,"class","title svelte-1xardyz")},m(r,n){h(r,e,n)},p:T,d(r){r&&g(e)}}}function zn(t){let e,r,n,i,l,o,s;return{c(){e=C("div"),r=C("div"),r.innerHTML='<label for="email">E-mail</label>',n=U(),i=C("div"),l=C("input"),I(r,"class","form-label svelte-1xardyz"),I(l,"name","email"),I(l,"placeholder","john@appleseed.com"),I(l,"class","svelte-1xardyz"),I(i,"class","form-input svelte-1xardyz"),I(e,"class","form-container svelte-1xardyz")},m(c,f){h(c,e,f),M(e,r),M(e,n),M(e,i),M(i,l),Pe(l,t[0]),o||(s=me(l,"input",t[6]),o=!0)},p(c,f){f&1&&l.value!==c[0]&&Pe(l,c[0])},d(c){c&&g(e),o=!1,s()}}}function Xn(t){let e;return{c(){e=L("Continue")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function Zn(t){let e,r;return e=new he({props:{$$slots:{default:[Xn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&128&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function er(t){let e,r,n,i,l,o,s,c,f,a;return n=new ee({props:{$$slots:{default:[Wn]},$$scope:{ctx:t}}}),l=new ee({props:{$$slots:{default:[zn]},$$scope:{ctx:t}}}),s=new Te({props:{$$slots:{default:[Zn]},$$scope:{ctx:t}}}),{c(){e=C("div"),r=C("form"),B(n.$$.fragment),i=U(),B(l.$$.fragment),o=U(),B(s.$$.fragment)},m(m,p){h(m,e,p),M(e,r),w(n,r,null),M(r,i),w(l,r,null),M(r,o),w(s,r,null),c=!0,f||(a=me(r,"submit",ve(t[1])),f=!0)},p(m,[p]){const E={};p&128&&(E.$$scope={dirty:p,ctx:m}),n.$set(E);const D={};p&129&&(D.$$scope={dirty:p,ctx:m}),l.$set(D);const _={};p&128&&(_.$$scope={dirty:p,ctx:m}),s.$set(_)},i(m){c||(u(n.$$.fragment,m),u(l.$$.fragment,m),u(s.$$.fragment,m),c=!0)},o(m){A(n.$$.fragment,m),A(l.$$.fragment,m),A(s.$$.fragment,m),c=!1},d(m){m&&g(e),b(n),b(l),b(s),f=!1,a()}}}function tr(t,e,r){let n,{onClose:i}=e,{onContinue:l}=e,{onError:o}=e,{purchases:s}=e;const c=async()=>{l({email:n})};function f(){n=this.value,r(0,n)}return t.$$set=a=>{"onClose"in a&&r(2,i=a.onClose),"onContinue"in a&&r(3,l=a.onContinue),"onError"in a&&r(4,o=a.onError),"purchases"in a&&r(5,s=a.purchases)},r(0,n=""),[n,c,i,l,o,s,f]}class nr extends k{constructor(e){super(),N(this,e,tr,er,y,{onClose:2,onContinue:3,onError:4,purchases:5},qn)}}const rr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAIAAAC1nk4lAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAADygAwAEAAAAAQAAADwAAAAAeOWEXwAAAAlwSFlzAAALEwAACxMBAJqcGAAAABxpRE9UAAAAAgAAAAAAAAAeAAAAKAAAAB4AAAAeAAAMHoAQFJEAAAvqSURBVGgFrJcJVBRHGse/GtB4JMFsgkfUGCWisPEAxQCiURHkEsREzWEeHpv78sVNjLcElRif0Zg8o0lU3CgKcgzDMYh4ZI0RIypH8I4RORwZmIsZnJme7tqvumd6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g8XPvLuP0RX3UumRA8ovwRIJkSoGdr3VcFygT9J8lLfJA9MH/3fZROVdb7Skot7BwIMECLYtdK06H9vwMdvPcFUwRTKquTKyweUKa3RQEU4nJox+AJURhuZ3+GSbjB8yQUOmRihYnhehVMyq4/BS1xh2oAw6T/JKE29uu1X1XBuTDluUws4PAW2/tg8s6GtMoyK15lpAd2LW7c3k9McGzbSR5lo/C0CjTiPwplJawiKcQh8LBZAnWWwgPKg2GG08HPEZeOPciDml2m/wPd1bAYpTHszwAAAABJRU5ErkJggg==";function ir(t){P(t,"svelte-f7u0k9",".rcb-app-icon.svelte-f7u0k9{width:2.5rem;height:2.5rem;border-radius:0.75rem;box-shadow:0px 1px 10px 0px rgba(0, 0, 0, 0.1);margin-right:1rem}")}function lr(t){let e,r;return{c(){e=C("img"),Ae(e.src,r=rr)||I(e,"src",r),I(e,"alt","app icon"),I(e,"class","rcb-app-icon svelte-f7u0k9")},m(n,i){h(n,e,i)},p:T,i:T,o:T,d(n){n&&g(e)}}}class or extends k{constructor(e){super(),N(this,e,null,lr,y,{},ir)}}const sr="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip0_344_3390)'%3e%3cpath%20d='M7%2018C5.9%2018%205.01%2018.9%205.01%2020C5.01%2021.1%205.9%2022%207%2022C8.1%2022%209%2021.1%209%2020C9%2018.9%208.1%2018%207%2018ZM1%202V4H3L6.6%2011.59L5.25%2014.04C5.09%2014.32%205%2014.65%205%2015C5%2016.1%205.9%2017%207%2017H19V15H7.42C7.28%2015%207.17%2014.89%207.17%2014.75L7.2%2014.63L8.1%2013H15.55C16.3%2013%2016.96%2012.59%2017.3%2011.97L20.88%205.48C20.96%205.34%2021%205.17%2021%205C21%204.45%2020.55%204%2020%204H5.21L4.27%202H1ZM17%2018C15.9%2018%2015.01%2018.9%2015.01%2020C15.01%2021.1%2015.9%2022%2017%2022C18.1%2022%2019%2021.1%2019%2020C19%2018.9%2018.1%2018%2017%2018Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_344_3390'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function cr(t){let e,r;return{c(){e=C("img"),Ae(e.src,r=sr)||I(e,"src",r),I(e,"alt","icon"),I(e,"class","rcb-ui-asset-icon")},m(n,i){h(n,e,i)},p:T,i:T,o:T,d(n){n&&g(e)}}}class fr extends k{constructor(e){super(),N(this,e,null,cr,y,{})}}function ur(t){P(t,"svelte-fcqjlc",".app-title.svelte-fcqjlc{font-weight:500;margin:0.5rem 0;font-size:1rem}.rcb-header-layout.svelte-fcqjlc{display:flex;justify-content:space-between;align-items:center;width:100%}.rcb-header-layout__business-info.svelte-fcqjlc{display:flex;align-items:center}")}function ar(t){let e,r,n,i,l,o,s,c,f;return n=new or({}),c=new fr({}),{c(){e=C("div"),r=C("div"),B(n.$$.fragment),i=U(),l=C("span"),o=L(t[0]),s=U(),B(c.$$.fragment),I(l,"class","app-title svelte-fcqjlc"),I(r,"class","rcb-header-layout__business-info svelte-fcqjlc"),I(e,"class","rcb-header-layout svelte-fcqjlc")},m(a,m){h(a,e,m),M(e,r),w(n,r,null),M(r,i),M(r,l),M(l,o),M(e,s),w(c,e,null),f=!0},p(a,m){(!f||m&1)&&ie(o,a[0])},i(a){f||(u(n.$$.fragment,a),u(c.$$.fragment,a),f=!0)},o(a){A(n.$$.fragment,a),A(c.$$.fragment,a),f=!1},d(a){a&&g(e),b(n),b(c)}}}function Ar(t){let e,r;return e=new ee({props:{as:"header",$$slots:{default:[ar]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,[i]){const l={};i&3&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function mr(t,e,r){let{title:n=""}=e;return t.$$set=i=>{"title"in i&&r(0,n=i.title)},[n]}class dr extends k{constructor(e){super(),N(this,e,mr,Ar,y,{title:0},ur)}}function Er(t){P(t,"svelte-17dhulw",".rcb-modal-backdrop.svelte-17dhulw{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(40, 40, 40, 0.75);display:flex;flex-direction:column;justify-content:space-around}")}function gr(t){let e,r;const n=t[1].default,i=H(n,t,t[0],null);return{c(){e=C("div"),i&&i.c(),I(e,"class","rcb-modal-backdrop svelte-17dhulw")},m(l,o){h(l,e,o),i&&i.m(e,null),r=!0},p(l,[o]){i&&i.p&&(!r||o&1)&&j(i,n,l,l[0],r?K(n,l[0],o,null):J(l[0]),null)},i(l){r||(u(i,l),r=!0)},o(l){A(i,l),r=!1},d(l){l&&g(e),i&&i.d(l)}}}function hr(t,e,r){let{$$slots:n={},$$scope:i}=e;return t.$$set=l=>{"$$scope"in l&&r(0,i=l.$$scope)},[i,n]}class _r extends k{constructor(e){super(),N(this,e,hr,gr,y,{},Er)}}function pr(t){P(t,"svelte-m6kocx",".rcb-modal-main.svelte-m6kocx{box-sizing:border-box;border-radius:0.5rem;background-color:#fff;color:black;max-width:40rem;min-width:30rem;overflow-y:auto;padding:2.5rem}.rcb-modal-dark.svelte-m6kocx{background-color:#000;color:#fff;max-width:30rem;min-width:20rem}@media screen and (max-width: 60rem){.rcb-modal-main.svelte-m6kocx,.rcb-modal-dark.svelte-m6kocx{max-width:40rem;min-width:90vw}}")}function Ir(t){let e,r,n;const i=t[2].default,l=H(i,t,t[1],null);return{c(){e=C("main"),l&&l.c(),I(e,"class",r=re(`rcb-modal-main ${t[0]?"rcb-modal-dark":""}`)+" svelte-m6kocx")},m(o,s){h(o,e,s),l&&l.m(e,null),n=!0},p(o,[s]){l&&l.p&&(!n||s&2)&&j(l,i,o,o[1],n?K(i,o[1],s,null):J(o[1]),null),(!n||s&1&&r!==(r=re(`rcb-modal-main ${o[0]?"rcb-modal-dark":""}`)+" svelte-m6kocx"))&&I(e,"class",r)},i(o){n||(u(l,o),n=!0)},o(o){A(l,o),n=!1},d(o){o&&g(e),l&&l.d(o)}}}function wr(t,e,r){let{$$slots:n={},$$scope:i}=e,{dark:l=!1}=e;return t.$$set=o=>{"dark"in o&&r(0,l=o.dark),"$$scope"in o&&r(1,i=o.$$scope)},[l,i,n]}class br extends k{constructor(e){super(),N(this,e,wr,Ir,y,{dark:0},pr)}}function Br(t){let e;const r=t[1].default,n=H(r,t,t[2],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&4)&&j(n,r,i,i[2],e?K(r,i[2],l,null):J(i[2]),null)},i(i){e||(u(n,i),e=!0)},o(i){A(n,i),e=!1},d(i){n&&n.d(i)}}}function Qr(t){let e,r;return e=new _r({props:{$$slots:{default:[Cr]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Cr(t){let e;const r=t[1].default,n=H(r,t,t[2],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&4)&&j(n,r,i,i[2],e?K(r,i[2],l,null):J(i[2]),null)},i(i){e||(u(n,i),e=!0)},o(i){A(n,i),e=!1},d(i){n&&n.d(i)}}}function Dr(t){let e,r,n,i;const l=[Qr,Br],o=[];function s(c,f){return c[0]?0:1}return e=s(t),r=o[e]=l[e](t),{c(){r.c(),n=W()},m(c,f){o[e].m(c,f),h(c,n,f),i=!0},p(c,[f]){let a=e;e=s(c),e===a?o[e].p(c,f):(F(),A(o[a],1,1,()=>{o[a]=null}),S(),r=o[e],r?r.p(c,f):(r=o[e]=l[e](c),r.c()),u(r,1),r.m(n.parentNode,n))},i(c){i||(u(r),i=!0)},o(c){A(r),i=!1},d(c){c&&g(n),o[e].d(c)}}}function Rr(t,e,r){let{$$slots:n={},$$scope:i}=e,{condition:l=!1}=e;return t.$$set=o=>{"condition"in o&&r(0,l=o.condition),"$$scope"in o&&r(2,i=o.$$scope)},[l,n,i]}class Tr extends k{constructor(e){super(),N(this,e,Rr,Dr,y,{condition:0})}}function xe(t){let e,r;return e=new dr({props:{title:t[0]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&1&&(l.title=n[0]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Mr(t){let e,r,n=t[0]&&xe(t);const i=t[2].default,l=H(i,t,t[3],null);return{c(){n&&n.c(),e=U(),l&&l.c()},m(o,s){n&&n.m(o,s),h(o,e,s),l&&l.m(o,s),r=!0},p(o,s){o[0]?n?(n.p(o,s),s&1&&u(n,1)):(n=xe(o),n.c(),u(n,1),n.m(e.parentNode,e)):n&&(F(),A(n,1,1,()=>{n=null}),S()),l&&l.p&&(!r||s&8)&&j(l,i,o,o[3],r?K(i,o[3],s,null):J(o[3]),null)},i(o){r||(u(n),u(l,o),r=!0)},o(o){A(n),A(l,o),r=!1},d(o){o&&g(e),n&&n.d(o),l&&l.d(o)}}}function yr(t){let e,r;return e=new br({props:{dark:t[1],$$slots:{default:[Mr]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,[i]){const l={};i&2&&(l.dark=n[1]),i&9&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Nr(t,e,r){let{$$slots:n={},$$scope:i}=e,{title:l=""}=e,{dark:o=!1}=e;return t.$$set=s=>{"title"in s&&r(0,l=s.title),"dark"in s&&r(1,o=s.dark),"$$scope"in s&&r(3,i=s.$$scope)},[l,o,n,i]}class Ve extends k{constructor(e){super(),N(this,e,Nr,yr,y,{title:0,dark:1})}}var $;(function(t){t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.EARLY_HINTS=103]="EARLY_HINTS",t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.RESET_CONTENT=205]="RESET_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.MULTI_STATUS=207]="MULTI_STATUS",t[t.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.USE_PROXY=305]="USE_PROXY",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",t[t.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.CONFLICT=409]="CONFLICT",t[t.GONE=410]="GONE",t[t.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",t[t.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",t[t.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",t[t.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",t[t.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",t[t.IM_A_TEAPOT=418]="IM_A_TEAPOT",t[t.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",t[t.METHOD_FAILURE=420]="METHOD_FAILURE",t[t.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",t[t.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",t[t.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",t[t.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",t[t.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",t[t.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})($||($={}));class te extends Error{constructor(e,r){super(r),this.statusCode=e}}class kr extends te{constructor(){super($.INTERNAL_SERVER_ERROR,"An unknown error occurred.")}}class Or extends te{}class Ur extends te{}class vr extends te{}class Pr extends te{}const fe="https://api.revenuecat.com",Me="rcbilling/v1";async function Lr(t,e,r,n){const i=await fetch(`${fe}/${Me}/subscribe`,{method:"POST",headers:{Authorization:`Bearer ${t._API_KEY}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({app_user_id:e,product_id:r,email:n})});if(i.status===$.BAD_REQUEST)throw new Or(i.status);if(i.status===$.TOO_MANY_REQUESTS)throw new Pr(i.status);if(i.status===$.CONFLICT)throw new Ur(i.status);if(i.status===$.INTERNAL_SERVER_ERROR)throw new vr(i.status);if(i.status===$.OK||i.status===$.CREATED){const l=await i.json();return Un(l)}throw new kr}function Fr(t){P(t,"svelte-1xwsiii",`.rcb-ui-container.svelte-1xwsiii{color-scheme:none;font-family:"PP Object Sans",
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
sans-serif}.rcb-ui-layout.svelte-1xwsiii{display:flex;justify-content:center;align-items:flex-start}.rcb-ui-aside.svelte-1xwsiii{margin-right:1rem}@media screen and (max-width: 60rem){.rcb-ui-layout.svelte-1xwsiii{flex-direction:column;align-items:center;justify-content:flex-end;height:100%}.rcb-ui-aside.svelte-1xwsiii{margin-right:0;margin-bottom:1rem}}`)}function qe(t){let e,r,n,i=t[1].isSandbox(),l;r=new Ve({props:{dark:!0,title:"OpenScratches, Inc.",$$slots:{default:[Sr]},$$scope:{ctx:t}}});let o=i&&ze();return{c(){e=C("div"),B(r.$$.fragment),n=U(),o&&o.c(),I(e,"class","rcb-ui-aside svelte-1xwsiii")},m(s,c){h(s,e,c),w(r,e,null),M(e,n),o&&o.m(e,null),l=!0},p(s,c){const f={};c&65540&&(f.$$scope={dirty:c,ctx:s}),r.$set(f),c&2&&(i=s[1].isSandbox()),i?o?c&2&&u(o,1):(o=ze(),o.c(),u(o,1),o.m(e,null)):o&&(F(),A(o,1,1,()=>{o=null}),S())},i(s){l||(u(r.$$.fragment,s),u(o),l=!0)},o(s){A(r.$$.fragment,s),A(o),l=!1},d(s){s&&g(e),b(r),o&&o.d()}}}function We(t){let e,r;return e=new Ye({props:{productDetails:t[2],onContinue:t[7],onClose:t[6]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.productDetails=n[2]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Sr(t){let e,r,n=t[2]&&We(t);return{c(){n&&n.c(),e=W()},m(i,l){n&&n.m(i,l),h(i,e,l),r=!0},p(i,l){i[2]?n?(n.p(i,l),l&4&&u(n,1)):(n=We(i),n.c(),u(n,1),n.m(e.parentNode,e)):n&&(F(),A(n,1,1,()=>{n=null}),S())},i(i){r||(u(n),r=!0)},o(i){A(n),r=!1},d(i){i&&g(e),n&&n.d(i)}}}function ze(t){let e,r;return e=new Nt({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Xe(t){let e,r;return e=new Ye({props:{productDetails:t[2],onContinue:t[7],onClose:t[6]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.productDetails=n[2]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Ze(t){let e,r;return e=new Re({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function et(t){let e,r;return e=new nr({props:{purchases:t[1],onContinue:t[7],onClose:t[6],onError:t[8]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&2&&(l.purchases=n[1]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function tt(t){let e,r;return e=new Vn({props:{purchases:t[1],paymentInfoCollectionMetadata:t[3],onContinue:t[7],onClose:t[6],onError:t[8]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&2&&(l.purchases=n[1]),i&8&&(l.paymentInfoCollectionMetadata=n[3]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function nt(t){let e,r;return e=new Re({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function rt(t){let e,r;return e=new $t({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function it(t){let e,r;return e=new gn({props:{onContinue:t[7]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p:T,i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Yr(t){let e,r,n,i,l,o,s,c,f=t[4]==="present-offer"&&t[2]&&Xe(t),a=t[4]==="present-offer"&&!t[2]&&Ze(),m=t[4]==="needs-auth-info"&&et(t),p=t[4]==="needs-payment-info"&&t[3]&&tt(t),E=t[4]==="loading"&&nt(),D=t[4]==="error"&&rt(),_=t[4]==="success"&&it(t);return{c(){f&&f.c(),e=U(),a&&a.c(),r=U(),m&&m.c(),n=U(),p&&p.c(),i=U(),E&&E.c(),l=U(),D&&D.c(),o=U(),_&&_.c(),s=W()},m(d,Q){f&&f.m(d,Q),h(d,e,Q),a&&a.m(d,Q),h(d,r,Q),m&&m.m(d,Q),h(d,n,Q),p&&p.m(d,Q),h(d,i,Q),E&&E.m(d,Q),h(d,l,Q),D&&D.m(d,Q),h(d,o,Q),_&&_.m(d,Q),h(d,s,Q),c=!0},p(d,Q){d[4]==="present-offer"&&d[2]?f?(f.p(d,Q),Q&20&&u(f,1)):(f=Xe(d),f.c(),u(f,1),f.m(e.parentNode,e)):f&&(F(),A(f,1,1,()=>{f=null}),S()),d[4]==="present-offer"&&!d[2]?a?Q&20&&u(a,1):(a=Ze(),a.c(),u(a,1),a.m(r.parentNode,r)):a&&(F(),A(a,1,1,()=>{a=null}),S()),d[4]==="needs-auth-info"?m?(m.p(d,Q),Q&16&&u(m,1)):(m=et(d),m.c(),u(m,1),m.m(n.parentNode,n)):m&&(F(),A(m,1,1,()=>{m=null}),S()),d[4]==="needs-payment-info"&&d[3]?p?(p.p(d,Q),Q&24&&u(p,1)):(p=tt(d),p.c(),u(p,1),p.m(i.parentNode,i)):p&&(F(),A(p,1,1,()=>{p=null}),S()),d[4]==="loading"?E?Q&16&&u(E,1):(E=nt(),E.c(),u(E,1),E.m(l.parentNode,l)):E&&(F(),A(E,1,1,()=>{E=null}),S()),d[4]==="error"?D?Q&16&&u(D,1):(D=rt(),D.c(),u(D,1),D.m(o.parentNode,o)):D&&(F(),A(D,1,1,()=>{D=null}),S()),d[4]==="success"?_?(_.p(d,Q),Q&16&&u(_,1)):(_=it(d),_.c(),u(_,1),_.m(s.parentNode,s)):_&&(F(),A(_,1,1,()=>{_=null}),S())},i(d){c||(u(f),u(a),u(m),u(p),u(E),u(D),u(_),c=!0)},o(d){A(f),A(a),A(m),A(p),A(E),A(D),A(_),c=!1},d(d){d&&(g(e),g(r),g(n),g(i),g(l),g(o),g(s)),f&&f.d(d),a&&a.d(d),m&&m.d(d),p&&p.d(d),E&&E.d(d),D&&D.d(d),_&&_.d(d)}}}function Gr(t){let e,r=t[5].includes(t[4]),n,i,l,o=r&&qe(t);return i=new Ve({props:{$$slots:{default:[Yr]},$$scope:{ctx:t}}}),{c(){e=C("div"),o&&o.c(),n=U(),B(i.$$.fragment),I(e,"class","rcb-ui-layout svelte-1xwsiii")},m(s,c){h(s,e,c),o&&o.m(e,null),M(e,n),w(i,e,null),l=!0},p(s,c){c&16&&(r=s[5].includes(s[4])),r?o?(o.p(s,c),c&16&&u(o,1)):(o=qe(s),o.c(),u(o,1),o.m(e,n)):o&&(F(),A(o,1,1,()=>{o=null}),S());const f={};c&65566&&(f.$$scope={dirty:c,ctx:s}),i.$set(f)},i(s){l||(u(o),u(i.$$.fragment,s),l=!0)},o(s){A(o),A(i.$$.fragment,s),l=!1},d(s){s&&g(e),o&&o.d(),b(i)}}}function Hr(t){let e,r,n;return r=new Tr({props:{condition:t[0],$$slots:{default:[Gr]},$$scope:{ctx:t}}}),{c(){e=C("div"),B(r.$$.fragment),I(e,"class","rcb-ui-container svelte-1xwsiii")},m(i,l){h(i,e,l),w(r,e,null),n=!0},p(i,[l]){const o={};l&1&&(o.condition=i[0]),l&65566&&(o.$$scope={dirty:l,ctx:i}),r.$set(o)},i(i){n||(u(r.$$.fragment,i),n=!0)},o(i){A(r.$$.fragment,i),n=!1},d(i){i&&g(e),b(r)}}}function Kr(t,e,r){var R;let{asModal:n=!0}=e,{customerEmail:i}=e,{appUserId:l}=e,{rcPackage:o}=e,{onFinished:s}=e,{onClose:c}=e,{purchases:f}=e,a=null,m=null;const p=((R=o.rcBillingProduct)==null?void 0:R.id)??null;let E="present-offer";const D=["present-offer","needs-auth-info","needs-payment-info","loading"];we(async()=>{if(r(2,a=o.rcBillingProduct),E==="present-offer"){i?d():r(4,E="needs-auth-info");return}});const _=()=>{c()},d=()=>{if(p===null){r(4,E="error");return}else r(4,E="loading");Lr(f,l,p,i).then(v=>{if(v.nextAction==="collect_payment_info"){r(4,E="needs-payment-info"),r(3,m=v);return}r(4,E="success")}).catch(()=>{r(4,E="error")})},Q=v=>{if(E==="needs-auth-info"){v&&r(9,i=v.email),d();return}if(E==="needs-payment-info"){r(4,E="success");return}if(E==="success"||E==="error"){s();return}r(4,E="success")},O=()=>{r(4,E="error")};return t.$$set=v=>{"asModal"in v&&r(0,n=v.asModal),"customerEmail"in v&&r(9,i=v.customerEmail),"appUserId"in v&&r(10,l=v.appUserId),"rcPackage"in v&&r(11,o=v.rcPackage),"onFinished"in v&&r(12,s=v.onFinished),"onClose"in v&&r(13,c=v.onClose),"purchases"in v&&r(1,f=v.purchases)},[n,f,a,m,E,D,_,Q,O,i,l,o,s,c]}class jr extends k{constructor(e){super(),N(this,e,Kr,Hr,y,{asModal:0,customerEmail:9,appUserId:10,rcPackage:11,onFinished:12,onClose:13,purchases:1},Fr)}}function Jr(t){return new Date(t.expires_date)>new Date}function $r(t,e){return{identifier:t,isActive:Jr(e),originalPurchaseDate:new Date(e.purchase_date),expirationDate:new Date(e.expires_date),productIdentifier:e.product_identifier}}function xr(t){const e={},r={};for(const n in t){const i=$r(n,t[n]);e[n]=i,i.isActive&&(r[n]=i)}return{all:e,active:r}}function Vr(t){return t==null?null:new Date(t)}function qr(t){return{entitlements:xr(t.subscriber.entitlements),managementURL:t.subscriber.management_url,requestDate:new Date(t.request_date),firstSeenDate:new Date(t.subscriber.first_seen),originalPurchaseDate:Vr(t.subscriber.original_purchase_date)}}function Wr(t,e,r,n=10){return new Promise((l,o)=>{const s=(c=1)=>t.isEntitledTo(e,r).then(f=>{if(c>n)return l(!1);if(f)return l(!0);setTimeout(()=>s(c+1),1e3)}).catch(o);s()})}const ye="0.0.8";class zr{constructor(e,r){q(this,"_API_KEY",null);q(this,"_APP_USER_ID",null);q(this,"_PAYMENT_PROVIDER_SETTINGS",null);q(this,"toOfferings",(e,r)=>{const n=e.offerings.find(s=>s.identifier===e.current_offering_id)??null,i={};r.product_details.forEach(s=>{i[s.identifier]=s});const l=n==null?null:Ne(n,i),o={};return e.offerings.forEach(s=>{const c=Ne(s,i);c!=null&&(o[s.identifier]=c)}),Object.keys(o).length==0&&console.debug("Empty offerings. Please make sure you've configured offerings correctly in the RevenueCat dashboard and that the products are properly configured."),{all:o,current:l}});var n,i;this._API_KEY=e,this._PAYMENT_PROVIDER_SETTINGS=r,(!this._PAYMENT_PROVIDER_SETTINGS.stripe||!((n=this._PAYMENT_PROVIDER_SETTINGS.stripe)!=null&&n.accountId)||!((i=this._PAYMENT_PROVIDER_SETTINGS.stripe)!=null&&i.publishableKey))&&console.error("Project was build without the stripe payment provider settings set")}async getOfferings(e){const n=await(await fetch(`${fe}/v1/subscribers/${e}/offerings`,{headers:{Authorization:`Bearer ${this._API_KEY}`,"Content-Type":"application/json",Accept:"application/json","X-Platform":"web","X-Version":ye}})).json(),i=n.offerings.flatMap(s=>s.packages).map(s=>s.platform_product_identifier),o=await(await fetch(`${fe}/${Me}/subscribers/${e}/products?id=${i.join("&id=")}`,{headers:{Authorization:`Bearer ${this._API_KEY}`,"Content-Type":"application/json",Accept:"application/json","X-Platform":"web","X-Version":ye}})).json();return this.logMissingProductIds(i,o.product_details),this.toOfferings(n,o)}async isEntitledTo(e,r){const n=await fetch(`${fe}/${Me}/entitlements/${e}`,{headers:{Authorization:`Bearer ${this._API_KEY}`,"Content-Type":"application/json",Accept:"application/json"}});return n.status===404?!1:(await n.json()).entitlements.map(s=>s.lookup_key).includes(r)}purchasePackage(e,r,n,{customerEmail:i,htmlTarget:l}={}){let o=l??document.getElementById("rcb-ui-root");if(o===null){const f=document.createElement("div");f.className="rcb-ui-root",document.body.appendChild(f),o=f}if(o===null)throw new Error("Could not generate a mount point for the billing widget");const s=o,c=!l;return new Promise(f=>{new jr({target:s,props:{appUserId:e,rcPackage:r,customerEmail:i,onFinished:async()=>{const a=await Wr(this,e,n);f(a),s.innerHTML=""},onClose:()=>{f(!1),s.innerHTML=""},purchases:this,asModal:c}})})}async getCustomerInfo(e){const r=await fetch(`${fe}/v1/subscribers/${e}`,{headers:{Authorization:`Bearer ${this._API_KEY}`,"Content-Type":"application/json",Accept:"application/json","X-Platform":"web","X-Version":ye}}),n=r.status;if(n>=400)throw new te(n,await r.text());const i=await r.json();return qr(i)}logMissingProductIds(e,r){const n={};r.forEach(l=>n[l.identifier]=l);const i=[];e.forEach(l=>{n[l]===void 0&&i.push(l)}),i.length>0&&console.log("Could not find product data for product ids: ",i,". Please check that your product configuration is correct.")}isSandbox(){return this._API_KEY?this._API_KEY.startsWith("rcb_sb_"):!1}}G.Purchases=zr,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(Y,K){typeof exports=="object"&&typeof module<"u"?K(exports):typeof define=="function"&&define.amd?define(["exports"],K):(Y=typeof globalThis<"u"?globalThis:Y||self,K(Y.Purchases={}))})(this,function(Y){"use strict";var ol=Object.defineProperty;var cl=(Y,K,W)=>K in Y?ol(Y,K,{enumerable:!0,configurable:!0,writable:!0,value:W}):Y[K]=W;var T=(Y,K,W)=>(cl(Y,typeof K!="symbol"?K+"":K,W),W);function K(t){return t!=null}var W=(t=>(t.Unknown="unknown",t.Custom="custom",t.Lifetime="$rc_lifetime",t.Annual="$rc_annual",t.SixMonth="$rc_six_month",t.ThreeMonth="$rc_three_month",t.TwoMonth="$rc_two_month",t.Monthly="$rc_monthly",t.Weekly="$rc_weekly",t))(W||{});const Qt=(t,e)=>({identifier:t.identifier,displayName:t.title,currentPrice:t.current_price,normalPeriodDuration:t.normal_period_duration,presentedOfferingIdentifier:e}),vt=(t,e,r)=>{const n=r[e.platform_product_identifier];return n===void 0?null:{identifier:e.identifier,rcBillingProduct:Qt(n,t),packageType:Mt(e.identifier)}},Ge=(t,e)=>{const r=t.packages.map(i=>vt(t.identifier,i,e)).filter(K),n={};for(const i of r)i!=null&&(n[i.identifier]=i);return r.length==0?null:{identifier:t.identifier,serverDescription:t.description,metadata:t.metadata,packagesById:n,availablePackages:r,lifetimePackage:n.$rc_lifetime??null,annualPackage:n.$rc_annual??null,sixMonthPackage:n.$rc_six_month??null,threeMonthPackage:n.$rc_three_month??null,twoMonthPackage:n.$rc_two_month??null,monthlyPackage:n.$rc_monthly??null,weeklyPackage:n.$rc_weekly??null}};function Mt(t){switch(t){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 t.startsWith("$rc_")?"unknown":"custom"}}function y(){}function Pt(t,e){for(const r in e)t[r]=e[r];return t}function Ye(t){return t()}function He(){return Object.create(null)}function ae(t){t.forEach(Ye)}function ne(t){return typeof t=="function"}function R(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Ie;function q(t,e){return t===e?!0:(Ie||(Ie=document.createElement("a")),Ie.href=e,t===Ie.href)}function Ke(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function Tt(t,e){const r=Ke(t.srcset),n=Ke(e||"");return n.length===r.length&&n.every(([i,l],s)=>l===r[s][1]&&(q(r[s][0],i)||q(i,r[s][0])))}function Nt(t){return Object.keys(t).length===0}function j(t,e,r,n){if(t){const i=je(t,e,r,n);return t[0](i)}}function je(t,e,r,n){return t[1]&&n?Pt(r.ctx.slice(),t[1](n(e))):r.ctx}function J(t,e,r,n){if(t[2]&&n){const i=t[2](n(r));if(e.dirty===void 0)return i;if(typeof i=="object"){const l=[],s=Math.max(e.dirty.length,i.length);for(let o=0;o<s;o+=1)l[o]=e.dirty[o]|i[o];return l}return e.dirty|i}return e.dirty}function x(t,e,r,n,i,l){if(i){const s=je(e,r,n,l);t.p(s,i)}}function V(t){if(t.ctx.length>32){const e=[],r=t.ctx.length/32;for(let n=0;n<r;n++)e[n]=-1;return e}return-1}function ue(t){return t??""}function v(t,e){t.appendChild(e)}function O(t,e,r){const n=Rt(t);if(!n.getElementById(e)){const i=$("style");i.id=e,i.textContent=r,Ct(n,i)}}function Rt(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Ct(t,e){return v(t.head||t,e),e.sheet}function A(t,e,r){t.insertBefore(e,r||null)}function m(t){t.parentNode&&t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function L(t){return document.createTextNode(t)}function P(){return L(" ")}function Z(){return L("")}function fe(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function Je(t){return function(e){return e.preventDefault(),t.call(this,e)}}function h(t,e,r){r==null?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}const Ut=["width","height"];function Ot(t,e){const r=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:r[n]&&r[n].set&&Ut.indexOf(n)===-1?t[n]=e[n]:h(t,n,e[n])}function St(t,e){Object.keys(e).forEach(r=>{Lt(t,r,e[r])})}function Lt(t,e,r){const n=e.toLowerCase();n in t?t[n]=typeof t[n]=="boolean"&&r===""?!0:r:e in t?t[e]=typeof t[e]=="boolean"&&r===""?!0:r:h(t,e,r)}function Ft(t){return/-/.test(t)?St:Ot}function Gt(t){return Array.from(t.childNodes)}function re(t,e){e=""+e,t.data!==e&&(t.data=e)}function xe(t,e){t.value=e??""}function Yt(t,e,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:r,cancelable:n})}let de;function me(t){de=t}function we(){if(!de)throw new Error("Function called outside component initialization");return de}function be(t){we().$$.on_mount.push(t)}function Ht(){const t=we();return(e,r,{cancelable:n=!1}={})=>{const i=t.$$.callbacks[e];if(i){const l=Yt(e,r,{cancelable:n});return i.slice().forEach(s=>{s.call(t,l)}),!l.defaultPrevented}return!0}}function Kt(t,e){return we().$$.context.set(t,e),e}function jt(t){return we().$$.context.get(t)}function Ve(t,e){const r=t.$$.callbacks[e.type];r&&r.slice().forEach(n=>n.call(this,e))}const ie=[],$e=[];let le=[];const Ce=[],Jt=Promise.resolve();let Ue=!1;function xt(){Ue||(Ue=!0,Jt.then(qe))}function Oe(t){le.push(t)}function Vt(t){Ce.push(t)}const Se=new Set;let se=0;function qe(){if(se!==0)return;const t=de;do{try{for(;se<ie.length;){const e=ie[se];se++,me(e),qt(e.$$)}}catch(e){throw ie.length=0,se=0,e}for(me(null),ie.length=0,se=0;$e.length;)$e.pop()();for(let e=0;e<le.length;e+=1){const r=le[e];Se.has(r)||(Se.add(r),r())}le.length=0}while(ie.length);for(;Ce.length;)Ce.pop()();Ue=!1,Se.clear(),me(t)}function qt(t){if(t.fragment!==null){t.update(),ae(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Oe)}}function Wt(t){const e=[],r=[];le.forEach(n=>t.indexOf(n)===-1?e.push(n):r.push(n)),r.forEach(n=>n()),le=e}const ke=new Set;let ee;function F(){ee={r:0,c:[],p:ee}}function G(){ee.r||ae(ee.c),ee=ee.p}function a(t,e){t&&t.i&&(ke.delete(t),t.i(e))}function f(t,e,r,n){if(t&&t.o){if(ke.has(t))return;ke.add(t),ee.c.push(()=>{ke.delete(t),n&&(r&&t.d(1),n())}),t.o(e)}else n&&n()}function zt(t,e,r){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=r,r(t.$$.ctx[n]))}function b(t){t&&t.c()}function E(t,e,r){const{fragment:n,after_update:i}=t.$$;n&&n.m(e,r),Oe(()=>{const l=t.$$.on_mount.map(Ye).filter(ne);t.$$.on_destroy?t.$$.on_destroy.push(...l):ae(l),t.$$.on_mount=[]}),i.forEach(Oe)}function I(t,e){const r=t.$$;r.fragment!==null&&(Wt(r.after_update),ae(r.on_destroy),r.fragment&&r.fragment.d(e),r.on_destroy=r.fragment=null,r.ctx=[])}function Xt(t,e){t.$$.dirty[0]===-1&&(ie.push(t),xt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function C(t,e,r,n,i,l,s=null,o=[-1]){const c=de;me(t);const u=t.$$={fragment:null,ctx:[],props:l,update:y,not_equal:i,bound:He(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:He(),dirty:o,skip_bound:!1,root:e.target||c.$$.root};s&&s(u.root);let _=!1;if(u.ctx=r?r(t,e.props||{},(g,k,...B)=>{const w=B.length?B[0]:k;return u.ctx&&i(u.ctx[g],u.ctx[g]=w)&&(!u.skip_bound&&u.bound[g]&&u.bound[g](w),_&&Xt(t,g)),k}):[],u.update(),_=!0,ae(u.before_update),u.fragment=n?n(u.ctx):!1,e.target){if(e.hydrate){const g=Gt(e.target);u.fragment&&u.fragment.l(g),g.forEach(m)}else u.fragment&&u.fragment.c();e.intro&&a(t.$$.fragment),E(t,e.target,e.anchor),qe()}me(c)}class U{constructor(){T(this,"$$");T(this,"$$set")}$destroy(){I(this,1),this.$destroy=y}$on(e,r){if(!ne(r))return y;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(r),()=>{const i=n.indexOf(r);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Nt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Zt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Zt);function en(t){O(t,"svelte-8uc6s0","aside.svelte-8uc6s0{color:yellowgreen;font-weight:bold;text-transform:uppercase;padding:0.5rem 0;width:100%;font-size:0.75rem;border-radius:0.5rem}")}function tn(t){let e;return{c(){e=$("aside"),e.innerHTML="<span>Sandbox Mode</span>",h(e,"class","svelte-8uc6s0")},m(r,n){A(r,e,n)},p:y,i:y,o:y,d(r){r&&m(e)}}}class nn extends U{constructor(e){super(),C(this,e,null,tn,R,{},en)}}function rn(t){O(t,"svelte-ujomz3",".rcb-modal-section.svelte-ujomz3{padding:0.5rem 0rem;display:flex}.rcb-modal-section.svelte-ujomz3:last-of-type{padding:0}")}function Le(t){let e,r;const n=t[2].default,i=j(n,t,t[1],null);return{c(){e=$(t[0]),i&&i.c(),Ft(t[0])(e,{class:ue("rcb-modal-section")+" svelte-ujomz3"})},m(l,s){A(l,e,s),i&&i.m(e,null),r=!0},p(l,s){i&&i.p&&(!r||s&2)&&x(i,n,l,l[1],r?J(n,l[1],s,null):V(l[1]),null)},i(l){r||(a(i,l),r=!0)},o(l){f(i,l),r=!1},d(l){l&&m(e),i&&i.d(l)}}}function ln(t){let e=t[0],r,n,i=t[0]&&Le(t);return{c(){i&&i.c(),r=Z()},m(l,s){i&&i.m(l,s),A(l,r,s),n=!0},p(l,[s]){l[0]?e?R(e,l[0])?(i.d(1),i=Le(l),e=l[0],i.c(),i.m(r.parentNode,r)):i.p(l,s):(i=Le(l),e=l[0],i.c(),i.m(r.parentNode,r)):e&&(i.d(1),i=null,e=l[0])},i(l){n||(a(i,l),n=!0)},o(l){f(i,l),n=!1},d(l){l&&m(r),i&&i.d(l)}}}function sn(t,e,r){let{$$slots:n={},$$scope:i}=e,{as:l="section"}=e;return t.$$set=s=>{"as"in s&&r(0,l=s.as),"$$scope"in s&&r(1,i=s.$$scope)},[l,i,n]}class z extends U{constructor(e){super(),C(this,e,sn,ln,R,{as:0},rn)}}const on={Y:"year",M:"month",W:"week",D:"day",H:"hour"},We=(t,e)=>{const r=t/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:e}).format(r)},ze=t=>{const e=t.slice(-1);return e==="D"?"daily":`${on[e]}ly`};function cn(t){O(t,"svelte-1oa6nu8",".rcb-pricing-info.svelte-1oa6nu8{display:flex;flex-direction:column;height:10rem;justify-content:flex-end}.rcb-product-price.svelte-1oa6nu8{font-size:1.5rem}.rcb-product-duration.svelte-1oa6nu8{opacity:0.6}")}function an(t){let e,r,n=t[0].displayName+"",i,l,s,o=t[0].currentPrice.currency+"",c,u=" ",_,g=We(t[0].currentPrice.amount,t[0].currentPrice.currency)+"",k,B,w,D,M=ze(t[0].normalPeriodDuration)+"",N;return{c(){e=$("div"),r=$("span"),i=L(n),l=P(),s=$("span"),c=L(o),_=L(u),k=L(g),B=P(),w=$("span"),D=L("Billed "),N=L(M),h(s,"class","rcb-product-price svelte-1oa6nu8"),h(w,"class","rcb-product-duration svelte-1oa6nu8"),h(e,"class","rcb-pricing-info svelte-1oa6nu8")},m(d,p){A(d,e,p),v(e,r),v(r,i),v(e,l),v(e,s),v(s,c),v(s,_),v(s,k),v(e,B),v(e,w),v(w,D),v(w,N)},p(d,p){p&1&&n!==(n=d[0].displayName+"")&&re(i,n),p&1&&o!==(o=d[0].currentPrice.currency+"")&&re(c,o),p&1&&g!==(g=We(d[0].currentPrice.amount,d[0].currentPrice.currency)+"")&&re(k,g),p&1&&M!==(M=ze(d[0].normalPeriodDuration)+"")&&re(N,M)},d(d){d&&m(e)}}}function un(t){let e,r;return e=new z({props:{$$slots:{default:[an]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,[i]){const l={};i&3&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function fn(t,e,r){let{productDetails:n}=e;return t.$$set=i=>{"productDetails"in i&&r(0,n=i.productDetails)},[n]}class Xe extends U{constructor(e){super(),C(this,e,fn,un,R,{productDetails:0},cn)}}const dn="data:image/gif;base64,R0lGODlhMgAyAPcBAAAAAAD/AAMDAwcHBxERERUVFSoqKi0tLTAwMDg4OD09PURERElJSUtLS1BQUFJSUlVVVVdXV1paWl9fX2NjY2ZmZmlpaWxsbG1tbXNzc3t7e39/f4GBgYKCgoSEhIaGhoeHh4iIiIuLi5KSkpSUlJaWlp2dnaGhoaOjo6SkpKWlpaenp6ioqKqqqqurq6ysrLCwsLGxsbS0tLa2tri4uLm5ub29vb6+vsDAwMHBwcLCwsXFxcjIyMnJyc3Nzc7OztPT09TU1NXV1dfX19nZ2dra2tvb29zc3N7e3uDg4OHh4eLi4uPj4+fn5+np6ezs7O7u7vDw8PHx8fLy8vPz8/X19fb29vj4+Pn5+fz8/P39/f7+/v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBAABACwAAAAAMgAyAIcAAAAA/wADAwMHBwcREREVFRUqKiotLS0wMDA4ODg9PT1ERERJSUlLS0tQUFBSUlJVVVVXV1daWlpfX19jY2NmZmZpaWlsbGxtbW1zc3N7e3t/f3+BgYGCgoKEhISGhoaHh4eIiIiLi4uSkpKUlJSWlpadnZ2hoaGjo6OkpKSlpaWnp6eoqKiqqqqrq6usrKywsLCxsbG0tLS2tra4uLi5ubm9vb2+vr7AwMDBwcHCwsLFxcXIyMjJycnNzc3Ozs7T09PU1NTV1dXX19fZ2dna2trb29vc3Nze3t7g4ODh4eHi4uLj4+Pn5+fp6ens7Ozu7u7w8PDx8fHy8vLz8/P19fX29vb4+Pj5+fn8/Pz9/f3+/v7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8I/wCzcBFIcKDBgggPKkzIcCEXLlq4bIEokeLEiBcrYrTIcaNHjRobinQ4sqRCkBlTdtR44MBKlR9TmjQJQMBMkgZfdpwSMSYAACgpRtHpcSYSFUIa1mz448UQnAWDfmzSooUVmD9XVnnBwglMlDdvvMjhcOlCHit23CSqcUrVJiizpnTC4sXQmB1vZvmxwgYWhWYLznjRA+r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qpdy7at24pJfgwBMkQukCRQjQQBIgTIXiFGoAYEACH5BAUFAAEALAMAAwAXABcAAAiVAAMIHEiwoMEMGQwqXPggwsKBTLQshPDgYYAaD1owdPjQB4QIThRGgGAxwIYIIBQ2LMlkJBCDFEsGOPEgA5aCK0tKmQChRkGEMgPIiDDhoRYjTR56CPGwiooXN6oENQikhYsWP65MJXglx4sVMoZsJdikRosWOMYSRPJih9q3cOPKnWuRSxa7eO9O3cJFCxe+frdMDQgAIfkEBQUAAQAsBQADACAAEAAACKYAAwgcSLAgwQcODCpcyNDAAYYQAzhpaIDhFYY+NOBY6HAhkyETFRLZ0CGKQgMVDV4RAoQKQxMdUpx8aJAJECYQnWzYcMQgSoNVgAy5CHGGhhI+aRIkMgRnxCohNvQoiLDgEyFDskQUuINDiK1Hfpgc+ETKQi0nVGxNkkSrwCw/hiBxu7XuFidAhARpgqWu3yxIhgApEtLvVipIgARBYthvlKaNFQYEADs=";function mn(t){let e,r;return{c(){e=$("img"),q(e.src,r=dn)||h(e,"src",r),h(e,"alt","spinner")},m(n,i){A(n,e,i)},p:y,i:y,o:y,d(n){n&&m(e)}}}class gn extends U{constructor(e){super(),C(this,e,null,mn,R,{})}}function An(t){O(t,"svelte-4wmtg7",".rcb-modal-loader.svelte-4wmtg7{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center}")}function _n(t){let e,r,n;return r=new gn({}),{c(){e=$("div"),b(r.$$.fragment),h(e,"class","rcb-modal-loader svelte-4wmtg7")},m(i,l){A(i,e,l),E(r,e,null),n=!0},p:y,i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&m(e),I(r)}}}class Be extends U{constructor(e){super(),C(this,e,null,_n,R,{},An)}}var ge=(t=>(t.Started="started",t.InProgress="in_progress",t.Succeeded="succeeded",t.Failed="failed",t))(ge||{}),ye=(t=>(t[t.SetupIntentCreationFailed=1]="SetupIntentCreationFailed",t[t.PaymentMethodCreationFailed=2]="PaymentMethodCreationFailed",t[t.PaymentChargeFailed=3]="PaymentChargeFailed",t))(ye||{}),S=(t=>(t[t.ErrorSettingUpPurchase=0]="ErrorSettingUpPurchase",t[t.ErrorChargingPayment=1]="ErrorChargingPayment",t[t.UnknownError=2]="UnknownError",t[t.NetworkError=3]="NetworkError",t[t.StripeError=4]="StripeError",t[t.MissingEmailError=5]="MissingEmailError",t))(S||{});class H extends Error{constructor(e,r,n){super(r),this.errorCode=e,this.underlyingErrorMessage=n}}class pn{constructor(e,r=10){T(this,"operationSessionId",null);T(this,"backend");T(this,"maxNumberAttempts");T(this,"waitMSBetweenAttempts",1e3);this.backend=e,this.maxNumberAttempts=r}async startPurchase(e,r,n){const i=await this.backend.postSubscribe(e,r,n);return this.operationSessionId=i.operation_session_id,i}async pollCurrentPurchaseForCompletion(){const e=this.operationSessionId;if(!e)throw new H(0,"No purchase in progress");return new Promise((r,n)=>{const i=(l=1)=>{if(l>this.maxNumberAttempts){this.clearPurchaseInProgress(),n(new H(2,"Max attempts reached trying to get successful purchase status"));return}this.backend.getCheckoutStatus(e).then(s=>{switch(s.operation.status){case ge.Started:case ge.InProgress:setTimeout(()=>i(l+1),this.waitMSBetweenAttempts);break;case ge.Succeeded:this.clearPurchaseInProgress(),r();return;case ge.Failed:this.clearPurchaseInProgress(),this.handlePaymentError(s.operation.error,n)}}).catch(s=>{n(new H(3,s.message))})};i()})}clearPurchaseInProgress(){this.operationSessionId=null}handlePaymentError(e,r){if(e==null){r(new H(2,"Got an error status but error field is empty."));return}switch(e.code){case ye.SetupIntentCreationFailed:r(new H(0,"Setup intent creation failed"));return;case ye.PaymentMethodCreationFailed:r(new H(0,"Payment method creation failed"));return;case ye.PaymentChargeFailed:r(new H(1,"Payment charge failed"));return}}}function hn(t){O(t,"svelte-igat39","button.svelte-igat39{border:none;border-radius:3.5rem;font-size:1rem;cursor:pointer;height:3.5rem;color:black;background-color:#dfdfdf}button.intent-primary.svelte-igat39{background-color:#000;color:white;font-size:1rem}")}function En(t){let e,r,n,i,l;const s=t[3].default,o=j(s,t,t[2],null);return{c(){e=$("button"),o&&o.c(),h(e,"class",r=ue(`intent-${t[0]}`)+" svelte-igat39"),e.disabled=t[1]},m(c,u){A(c,e,u),o&&o.m(e,null),n=!0,i||(l=fe(e,"click",t[4]),i=!0)},p(c,[u]){o&&o.p&&(!n||u&4)&&x(o,s,c,c[2],n?J(s,c[2],u,null):V(c[2]),null),(!n||u&1&&r!==(r=ue(`intent-${c[0]}`)+" svelte-igat39"))&&h(e,"class",r),(!n||u&2)&&(e.disabled=c[1])},i(c){n||(a(o,c),n=!0)},o(c){f(o,c),n=!1},d(c){c&&m(e),o&&o.d(c),i=!1,l()}}}function In(t,e,r){let{$$slots:n={},$$scope:i}=e,{intent:l="primary"}=e,{disabled:s=!1}=e;function o(c){Ve.call(this,t,c)}return t.$$set=c=>{"intent"in c&&r(0,l=c.intent),"disabled"in c&&r(1,s=c.disabled),"$$scope"in c&&r(2,i=c.$$scope)},[l,s,i,n,o]}class Ae extends U{constructor(e){super(),C(this,e,In,En,R,{intent:0,disabled:1},hn)}}function wn(t){O(t,"svelte-1f9z0o8","footer.svelte-1f9z0o8{display:flex;flex-direction:column}")}function bn(t){let e,r;const n=t[1].default,i=j(n,t,t[0],null);return{c(){e=$("footer"),i&&i.c(),h(e,"class","rcb-modal-footer svelte-1f9z0o8")},m(l,s){A(l,e,s),i&&i.m(e,null),r=!0},p(l,[s]){i&&i.p&&(!r||s&1)&&x(i,n,l,l[0],r?J(n,l[0],s,null):V(l[0]),null)},i(l){r||(a(i,l),r=!0)},o(l){f(i,l),r=!1},d(l){l&&m(e),i&&i.d(l)}}}function $n(t,e,r){let{$$slots:n={},$$scope:i}=e;return t.$$set=l=>{"$$scope"in l&&r(0,i=l.$$scope)},[i,n]}class De extends U{constructor(e){super(),C(this,e,$n,bn,R,{},wn)}}const kn="data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%200%20124%20124'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='62'%20cy='62'%20r='62'%20fill='%23767676'/%3e%3cpath%20d='M87.6668%2041.504L82.4968%2036.334L62.0002%2056.8307L41.5035%2036.334L36.3335%2041.504L56.8302%2062.0006L36.3335%2082.4973L41.5035%2087.6673L62.0002%2067.1706L82.4968%2087.6673L87.6668%2082.4973L67.1702%2062.0006L87.6668%2041.504Z'%20fill='white'/%3e%3c/svg%3e";function Bn(t){O(t,"svelte-7khg4b","img.svelte-7khg4b{width:7.75rem;height:7.75rem;margin:0 auto}")}function yn(t){let e,r;return{c(){e=$("img"),q(e.src,r=kn)||h(e,"src",r),h(e,"alt","icon"),h(e,"class","rcb-ui-asset-icon svelte-7khg4b")},m(n,i){A(n,e,i)},p:y,i:y,o:y,d(n){n&&m(e)}}}class Dn extends U{constructor(e){super(),C(this,e,null,yn,R,{},Bn)}}function Qn(t){O(t,"svelte-18njhoa",'.column.svelte-18njhoa{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--gap, "0.5rem")}')}function vn(t){let e,r,n;const i=t[2].default,l=j(i,t,t[1],null);return{c(){e=$("div"),l&&l.c(),h(e,"class","column svelte-18njhoa"),h(e,"style",r=`--gap:${t[0]};`)},m(s,o){A(s,e,o),l&&l.m(e,null),n=!0},p(s,[o]){l&&l.p&&(!n||o&2)&&x(l,i,s,s[1],n?J(i,s[1],o,null):V(s[1]),null),(!n||o&1&&r!==(r=`--gap:${s[0]};`))&&h(e,"style",r)},i(s){n||(a(l,s),n=!0)},o(s){f(l,s),n=!1},d(s){s&&m(e),l&&l.d(s)}}}function Mn(t,e,r){let{$$slots:n={},$$scope:i}=e,{gutter:l="0.5rem"}=e;return t.$$set=s=>{"gutter"in s&&r(0,l=s.gutter),"$$scope"in s&&r(1,i=s.$$scope)},[l,i,n]}class te extends U{constructor(e){super(),C(this,e,Mn,vn,R,{gutter:0},Qn)}}const Pn="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='mdi_close'%3e%3cpath%20id='Vector'%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='%23767676'/%3e%3c/g%3e%3c/svg%3e";function Tn(t){O(t,"svelte-r1ujja",".close-button.svelte-r1ujja{border:none;cursor:pointer;background-color:transparent}")}function Nn(t){let e,r,n,i,l;return{c(){e=$("button"),r=$("img"),q(r.src,n=Pn)||h(r,"src",n),h(r,"alt","close"),h(e,"class","close-button svelte-r1ujja"),e.disabled=t[0]},m(s,o){A(s,e,o),v(e,r),i||(l=fe(e,"click",t[1]),i=!0)},p(s,[o]){o&1&&(e.disabled=s[0])},i:y,o:y,d(s){s&&m(e),i=!1,l()}}}function Rn(t,e,r){let{disabled:n=!1}=e;function i(l){Ve.call(this,t,l)}return t.$$set=l=>{"disabled"in l&&r(0,n=l.disabled)},[n,i]}class Cn extends U{constructor(e){super(),C(this,e,Rn,Nn,R,{disabled:0},Tn)}}function Un(t){O(t,"svelte-10u48yl",".rcb-app-icon.svelte-10u48yl{width:2.5rem;height:2.5rem;border-radius:0.75rem;box-shadow:0px 1px 10px 0px rgba(0, 0, 0, 0.1);margin-right:1rem}.rcb-app-icon-picture-container.svelte-10u48yl{height:2.5rem}.rcb-app-icon.loading.svelte-10u48yl{background-color:gray}")}function On(t){let e;return{c(){e=$("div"),h(e,"class","rcb-app-icon loading svelte-10u48yl")},m(r,n){A(r,e,n)},p:y,d(r){r&&m(e)}}}function Sn(t){let e,r,n,i,l,s;return{c(){e=$("picture"),r=$("source"),i=P(),l=$("img"),h(r,"type","image/webp"),Tt(r,n=t[1])||h(r,"srcset",n),h(l,"class","rcb-app-icon svelte-10u48yl"),q(l.src,s=t[0])||h(l,"src",s),h(l,"alt","App icon"),h(e,"class","rcb-app-icon-picture-container svelte-10u48yl")},m(o,c){A(o,e,c),v(e,r),v(e,i),v(e,l)},p(o,c){c&2&&n!==(n=o[1])&&h(r,"srcset",n),c&1&&!q(l.src,s=o[0])&&h(l,"src",s)},d(o){o&&m(e)}}}function Ln(t){let e;function r(l,s){return l[0]!==null?Sn:On}let n=r(t),i=n(t);return{c(){i.c(),e=Z()},m(l,s){i.m(l,s),A(l,e,s)},p(l,[s]){n===(n=r(l))&&i?i.p(l,s):(i.d(1),i=n(l),i&&(i.c(),i.m(e.parentNode,e)))},i:y,o:y,d(l){l&&m(e),i.d(l)}}}function Fn(t,e,r){let{src:n=null}=e,{srcWebp:i=null}=e;return t.$$set=l=>{"src"in l&&r(0,n=l.src),"srcWebp"in l&&r(1,i=l.srcWebp)},[n,i]}class Ze extends U{constructor(e){super(),C(this,e,Fn,Ln,R,{src:0,srcWebp:1},Un)}}const Qe=t=>`https://da08ctfrofx1b.cloudfront.net/${t}`;function Gn(t){O(t,"svelte-1tdgim9",".app-title.svelte-1tdgim9{font-weight:500;margin:0.5rem 0;font-size:1rem}.rcb-header-layout__business-info.svelte-1tdgim9{display:flex;align-items:center}")}function Yn(t){let e,r;return e=new Ze({}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p:y,i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function Hn(t){let e,r,n=t[0].seller_company_name+"",i,l,s=t[0].app_icon_webp!==null&&t[0].app_icon!==null&&et(t);return{c(){s&&s.c(),e=P(),r=$("span"),i=L(n),h(r,"class","app-title svelte-1tdgim9")},m(o,c){s&&s.m(o,c),A(o,e,c),A(o,r,c),v(r,i),l=!0},p(o,c){o[0].app_icon_webp!==null&&o[0].app_icon!==null?s?(s.p(o,c),c&1&&a(s,1)):(s=et(o),s.c(),a(s,1),s.m(e.parentNode,e)):s&&(F(),f(s,1,1,()=>{s=null}),G()),(!l||c&1)&&n!==(n=o[0].seller_company_name+"")&&re(i,n)},i(o){l||(a(s),l=!0)},o(o){f(s),l=!1},d(o){o&&(m(e),m(r)),s&&s.d(o)}}}function et(t){let e,r;return e=new Ze({props:{src:Qe(t[0].app_icon),srcWebp:Qe(t[0].app_icon_webp)}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){const l={};i&1&&(l.src=Qe(n[0].app_icon)),i&1&&(l.srcWebp=Qe(n[0].app_icon_webp)),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function Kn(t){let e,r,n,i;const l=[Hn,Yn],s=[];function o(c,u){return c[0]!==null?0:1}return r=o(t),n=s[r]=l[r](t),{c(){e=$("div"),n.c(),h(e,"class","rcb-header-layout__business-info svelte-1tdgim9")},m(c,u){A(c,e,u),s[r].m(e,null),i=!0},p(c,[u]){let _=r;r=o(c),r===_?s[r].p(c,u):(F(),f(s[_],1,1,()=>{s[_]=null}),G(),n=s[r],n?n.p(c,u):(n=s[r]=l[r](c),n.c()),a(n,1),n.m(e,null))},i(c){i||(a(n),i=!0)},o(c){f(n),i=!1},d(c){c&&m(e),s[r].d()}}}function jn(t,e,r){let{brandingInfo:n=null}=e;return t.$$set=i=>{"brandingInfo"in i&&r(0,n=i.brandingInfo)},[n]}class tt extends U{constructor(e){super(),C(this,e,jn,Kn,R,{brandingInfo:0},Gn)}}function Jn(t){O(t,"svelte-j03lz1",".rcb-post-purchase-header-layout.svelte-j03lz1{display:flex;justify-content:space-between;align-items:center;width:100%}")}function xn(t){let e,r,n,i,l;return r=new tt({props:{brandingInfo:t[0]}}),i=new Cn({}),i.$on("click",function(){ne(t[1])&&t[1].apply(this,arguments)}),{c(){e=$("div"),b(r.$$.fragment),n=P(),b(i.$$.fragment),h(e,"class","rcb-post-purchase-header-layout svelte-j03lz1")},m(s,o){A(s,e,o),E(r,e,null),v(e,n),E(i,e,null),l=!0},p(s,o){t=s;const c={};o&1&&(c.brandingInfo=t[0]),r.$set(c)},i(s){l||(a(r.$$.fragment,s),a(i.$$.fragment,s),l=!0)},o(s){f(r.$$.fragment,s),f(i.$$.fragment,s),l=!1},d(s){s&&m(e),I(r),I(i)}}}function Vn(t){let e,r;return e=new z({props:{as:"header",$$slots:{default:[xn]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,[i]){const l={};i&7&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function qn(t,e,r){let{brandingInfo:n=null}=e,{onClose:i}=e;return t.$$set=l=>{"brandingInfo"in l&&r(0,n=l.brandingInfo),"onClose"in l&&r(1,i=l.onClose)},[n,i]}class nt extends U{constructor(e){super(),C(this,e,qn,Vn,R,{brandingInfo:0,onClose:1},Jn)}}function Wn(t){O(t,"svelte-ahi052",".rcb-modal-error.svelte-ahi052{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-ahi052{font-size:24px}.subtitle.svelte-ahi052{font-size:16px}")}function rt(t){let e,r,n,i,l;return{c(){e=L("If this error persists, please contact "),r=$("a"),n=L(t[1]),l=L("."),h(r,"href",i="mailto:"+t[1])},m(s,o){A(s,e,o),A(s,r,o),v(r,n),A(s,l,o)},p(s,o){o&2&&re(n,s[1]),o&2&&i!==(i="mailto:"+s[1])&&h(r,"href",i)},d(s){s&&(m(e),m(r),m(l))}}}function zn(t){let e,r,n,i=t[3]()+"",l,s,o=t[1]&&rt(t);return{c(){e=$("span"),e.textContent="Something went wrong.",r=P(),n=$("span"),l=L(i),s=P(),o&&o.c(),h(e,"class","title svelte-ahi052"),h(n,"class","subtitle svelte-ahi052")},m(c,u){A(c,e,u),A(c,r,u),A(c,n,u),v(n,l),v(n,s),o&&o.m(n,null)},p(c,u){c[1]?o?o.p(c,u):(o=rt(c),o.c(),o.m(n,null)):o&&(o.d(1),o=null)},d(c){c&&(m(e),m(r),m(n)),o&&o.d()}}}function Xn(t){let e,r,n,i;return e=new Dn({}),n=new te({props:{gutter:"1rem",$$slots:{default:[zn]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment),r=P(),b(n.$$.fragment)},m(l,s){E(e,l,s),A(l,r,s),E(n,l,s),i=!0},p(l,s){const o={};s&34&&(o.$$scope={dirty:s,ctx:l}),n.$set(o)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&m(r),I(e,l),I(n,l)}}}function Zn(t){let e,r,n;return r=new te({props:{gutter:"1rem",$$slots:{default:[Xn]},$$scope:{ctx:t}}}),{c(){e=$("div"),b(r.$$.fragment),h(e,"class","rcb-modal-error svelte-ahi052")},m(i,l){A(i,e,l),E(r,e,null),n=!0},p(i,l){const s={};l&34&&(s.$$scope={dirty:l,ctx:i}),r.$set(s)},i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&m(e),I(r)}}}function er(t){let e;return{c(){e=L("Go back to app")},m(r,n){A(r,e,n)},d(r){r&&m(e)}}}function tr(t){let e,r;return e=new Ae({props:{$$slots:{default:[er]},$$scope:{ctx:t}}}),e.$on("click",function(){ne(t[2])&&t[2].apply(this,arguments)}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){t=n;const l={};i&32&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function nr(t){let e,r,n,i,l,s;return e=new nt({props:{brandingInfo:t[0],onClose:t[2]}}),n=new z({props:{$$slots:{default:[Zn]},$$scope:{ctx:t}}}),l=new De({props:{$$slots:{default:[tr]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment),r=P(),b(n.$$.fragment),i=P(),b(l.$$.fragment)},m(o,c){E(e,o,c),A(o,r,c),E(n,o,c),A(o,i,c),E(l,o,c),s=!0},p(o,c){const u={};c&1&&(u.brandingInfo=o[0]),c&4&&(u.onClose=o[2]),e.$set(u);const _={};c&34&&(_.$$scope={dirty:c,ctx:o}),n.$set(_);const g={};c&36&&(g.$$scope={dirty:c,ctx:o}),l.$set(g)},i(o){s||(a(e.$$.fragment,o),a(n.$$.fragment,o),a(l.$$.fragment,o),s=!0)},o(o){f(e.$$.fragment,o),f(n.$$.fragment,o),f(l.$$.fragment,o),s=!1},d(o){o&&(m(r),m(i)),I(e,o),I(n,o),I(l,o)}}}function rr(t){let e,r;return e=new te({props:{gutter:"2rem",$$slots:{default:[nr]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,[i]){const l={};i&39&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function ir(t,e,r){let{brandingInfo:n=null}=e,{lastError:i}=e,{supportEmail:l=null}=e,{onContinue:s}=e;be(()=>{console.debug(`Displayed error: ${S[i.errorCode]}. Message: ${i.message??"None"}. Underlying error: ${i.underlyingErrorMessage??"None"}`)});function o(){switch(i.errorCode){case S.UnknownError:return"An unknown error occurred.";case S.ErrorSettingUpPurchase:return"Purchase not started due to an error.";case S.ErrorChargingPayment:return"Payment failed.";case S.NetworkError:return"Network error. Please check your internet connection.";case S.StripeError:return i.message;case S.MissingEmailError:return"Email is required to complete the purchase."}return i.message}return t.$$set=c=>{"brandingInfo"in c&&r(0,n=c.brandingInfo),"lastError"in c&&r(4,i=c.lastError),"supportEmail"in c&&r(1,l=c.supportEmail),"onContinue"in c&&r(2,s=c.onContinue)},[n,l,s,o,i]}class lr extends U{constructor(e){super(),C(this,e,ir,rr,R,{brandingInfo:0,lastError:4,supportEmail:1,onContinue:2},Wn)}}const sr="data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%200%20124%20124'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='62'%20cy='62'%20r='62'%20fill='%23576CDB'/%3e%3crect%20x='44.1116'%20y='56'%20width='27.5'%20height='11'%20transform='rotate(45%2044.1116%2056)'%20fill='white'/%3e%3crect%20x='79.1133'%20y='44.334'%20width='11'%20height='44'%20transform='rotate(45%2079.1133%2044.334)'%20fill='white'/%3e%3c/svg%3e";function or(t){O(t,"svelte-7khg4b","img.svelte-7khg4b{width:7.75rem;height:7.75rem;margin:0 auto}")}function cr(t){let e,r;return{c(){e=$("img"),q(e.src,r=sr)||h(e,"src",r),h(e,"alt","icon"),h(e,"class","rcb-ui-asset-icon svelte-7khg4b")},m(n,i){A(n,e,i)},p:y,i:y,o:y,d(n){n&&m(e)}}}class ar extends U{constructor(e){super(),C(this,e,null,cr,R,{},or)}}function ur(t){O(t,"svelte-1lcsna9",".rcb-modal-success.svelte-1lcsna9{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-1lcsna9{font-size:24px}.subtitle.svelte-1lcsna9{font-size:16px}")}function fr(t){let e,r,n;return{c(){e=$("span"),e.textContent="Purchase Successful",r=P(),n=$("span"),n.textContent="Your plan is now active.",h(e,"class","title svelte-1lcsna9"),h(n,"class","subtitle svelte-1lcsna9")},m(i,l){A(i,e,l),A(i,r,l),A(i,n,l)},p:y,d(i){i&&(m(e),m(r),m(n))}}}function dr(t){let e,r,n,i;return e=new ar({}),n=new te({props:{gutter:"1rem",$$slots:{default:[fr]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment),r=P(),b(n.$$.fragment)},m(l,s){E(e,l,s),A(l,r,s),E(n,l,s),i=!0},p(l,s){const o={};s&4&&(o.$$scope={dirty:s,ctx:l}),n.$set(o)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&m(r),I(e,l),I(n,l)}}}function mr(t){let e,r,n;return r=new te({props:{gutter:"1rem",$$slots:{default:[dr]},$$scope:{ctx:t}}}),{c(){e=$("div"),b(r.$$.fragment),h(e,"class","rcb-modal-success svelte-1lcsna9")},m(i,l){A(i,e,l),E(r,e,null),n=!0},p(i,l){const s={};l&4&&(s.$$scope={dirty:l,ctx:i}),r.$set(s)},i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&m(e),I(r)}}}function gr(t){let e;return{c(){e=L("Go back to app")},m(r,n){A(r,e,n)},d(r){r&&m(e)}}}function Ar(t){let e,r;return e=new Ae({props:{$$slots:{default:[gr]},$$scope:{ctx:t}}}),e.$on("click",function(){ne(t[1])&&t[1].apply(this,arguments)}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){t=n;const l={};i&4&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function _r(t){let e,r,n,i,l,s;return e=new nt({props:{brandingInfo:t[0],onClose:t[1]}}),n=new z({props:{$$slots:{default:[mr]},$$scope:{ctx:t}}}),l=new De({props:{$$slots:{default:[Ar]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment),r=P(),b(n.$$.fragment),i=P(),b(l.$$.fragment)},m(o,c){E(e,o,c),A(o,r,c),E(n,o,c),A(o,i,c),E(l,o,c),s=!0},p(o,c){const u={};c&1&&(u.brandingInfo=o[0]),c&2&&(u.onClose=o[1]),e.$set(u);const _={};c&4&&(_.$$scope={dirty:c,ctx:o}),n.$set(_);const g={};c&6&&(g.$$scope={dirty:c,ctx:o}),l.$set(g)},i(o){s||(a(e.$$.fragment,o),a(n.$$.fragment,o),a(l.$$.fragment,o),s=!0)},o(o){f(e.$$.fragment,o),f(n.$$.fragment,o),f(l.$$.fragment,o),s=!1},d(o){o&&(m(r),m(i)),I(e,o),I(n,o),I(l,o)}}}function pr(t){let e,r;return e=new te({props:{gutter:"2rem",$$slots:{default:[_r]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,[i]){const l={};i&7&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function hr(t,e,r){let{brandingInfo:n=null}=e,{onContinue:i}=e;return t.$$set=l=>{"brandingInfo"in l&&r(0,n=l.brandingInfo),"onContinue"in l&&r(1,i=l.onContinue)},[n,i]}class Er extends U{constructor(e){super(),C(this,e,hr,pr,R,{brandingInfo:0,onContinue:1},ur)}}function Ir(t,e,r,n,i={}){const l=r.create(e,i);return l.mount(t),l.on("change",s=>n("change",s)),l.on("ready",s=>n("ready",s)),l.on("focus",s=>n("focus",s)),l.on("blur",s=>n("blur",s)),l.on("escape",s=>n("escape",s)),l.on("click",s=>n("click",s)),l.on("loaderror",s=>n("loaderror",s)),l.on("loaderstart",s=>n("loaderstart",s)),l.on("networkschange",s=>n("networkschange",s)),l}const wr=typeof window>"u";function br(t){if(!wr)return t.registerAppInfo({name:"svelte-stripe-js",url:"https://svelte-stripe-js.vercel.app"})}function $r(t){let e;return{c(){e=$("div")},m(r,n){A(r,e,n),t[6](e)},p:y,i:y,o:y,d(r){r&&m(e),t[6](null)}}}function kr(t,e,r){let n,i;const l=Ht(),{elements:s}=jt("stripe");let{options:o=void 0}=e;be(()=>(n=Ir(i,"payment",s,l,o),()=>n.destroy()));function c(){n.blur()}function u(){n.clear()}function _(){n.destroy()}function g(){n.focus()}function k(B){$e[B?"unshift":"push"](()=>{i=B,r(0,i)})}return t.$$set=B=>{"options"in B&&r(1,o=B.options)},[i,o,c,u,_,g,k]}class Br extends U{constructor(e){super(),C(this,e,kr,$r,R,{options:1,blur:2,clear:3,destroy:4,focus:5})}get blur(){return this.$$.ctx[2]}get clear(){return this.$$.ctx[3]}get destroy(){return this.$$.ctx[4]}get focus(){return this.$$.ctx[5]}}function it(t){let e;const r=t[15].default,n=j(r,t,t[14],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&16384)&&x(n,r,i,i[14],e?J(r,i[14],l,null):V(i[14]),null)},i(i){e||(a(n,i),e=!0)},o(i){f(n,i),e=!1},d(i){n&&n.d(i)}}}function yr(t){let e,r,n=t[1]&&t[0]&&it(t);return{c(){n&&n.c(),e=Z()},m(i,l){n&&n.m(i,l),A(i,e,l),r=!0},p(i,[l]){i[1]&&i[0]?n?(n.p(i,l),l&3&&a(n,1)):(n=it(i),n.c(),a(n,1),n.m(e.parentNode,e)):n&&(F(),f(n,1,1,()=>{n=null}),G())},i(i){r||(a(n),r=!0)},o(i){f(n),r=!1},d(i){i&&m(e),n&&n.d(i)}}}function Dr(t,e,r){let n,{$$slots:i={},$$scope:l}=e,{stripe:s}=e,{mode:o=void 0}=e,{theme:c="stripe"}=e,{variables:u={}}=e,{rules:_={}}=e,{labels:g="above"}=e,{loader:k="auto"}=e,{fonts:B=[]}=e,{locale:w="auto"}=e,{currency:D=void 0}=e,{amount:M=void 0}=e,{clientSecret:N=void 0}=e,{elements:d=null}=e;return t.$$set=p=>{"stripe"in p&&r(1,s=p.stripe),"mode"in p&&r(2,o=p.mode),"theme"in p&&r(3,c=p.theme),"variables"in p&&r(4,u=p.variables),"rules"in p&&r(5,_=p.rules),"labels"in p&&r(6,g=p.labels),"loader"in p&&r(7,k=p.loader),"fonts"in p&&r(8,B=p.fonts),"locale"in p&&r(9,w=p.locale),"currency"in p&&r(10,D=p.currency),"amount"in p&&r(11,M=p.amount),"clientSecret"in p&&r(12,N=p.clientSecret),"elements"in p&&r(0,d=p.elements),"$$scope"in p&&r(14,l=p.$$scope)},t.$$.update=()=>{t.$$.dirty&120&&r(13,n={theme:c,variables:u,rules:_,labels:g}),t.$$.dirty&16263&&s&&!d&&(r(0,d=s.elements({mode:o,currency:D,amount:M,appearance:n,clientSecret:N,fonts:B,loader:k,locale:w})),br(s),Kt("stripe",{stripe:s,elements:d})),t.$$.dirty&8705&&d&&d.update({appearance:n,locale:w})},[d,s,o,c,u,_,g,k,B,w,D,M,N,n,l,i]}class Qr extends U{constructor(e){super(),C(this,e,Dr,yr,R,{stripe:1,mode:2,theme:3,variables:4,rules:5,labels:6,loader:7,fonts:8,locale:9,currency:10,amount:11,clientSecret:12,elements:0})}}var lt="https://js.stripe.com/v3",vr=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,st="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Mr=function(){for(var e=document.querySelectorAll('script[src^="'.concat(lt,'"]')),r=0;r<e.length;r++){var n=e[r];if(vr.test(n.src))return n}return null},ot=function(e){var r=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(lt).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},Pr=function(e,r){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"2.3.0",startTime:r})},_e=null,ve=null,Me=null,Tr=function(e){return function(){e(new Error("Failed to load Stripe.js"))}},Nr=function(e,r){return function(){window.Stripe?e(window.Stripe):r(new Error("Stripe.js not available"))}},Rr=function(e){return _e!==null?_e:(_e=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&e&&console.warn(st),window.Stripe){r(window.Stripe);return}try{var i=Mr();if(i&&e)console.warn(st);else if(!i)i=ot(e);else if(i&&Me!==null&&ve!==null){var l;i.removeEventListener("load",Me),i.removeEventListener("error",ve),(l=i.parentNode)===null||l===void 0||l.removeChild(i),i=ot(e)}Me=Nr(r,n),ve=Tr(n),i.addEventListener("load",Me),i.addEventListener("error",ve)}catch(s){n(s);return}}),_e.catch(function(r){return _e=null,Promise.reject(r)}))},Cr=function(e,r,n){if(e===null)return null;var i=e.apply(void 0,r);return Pr(i,n),i},pe,ct=!1,at=function(){return pe||(pe=Rr(null).catch(function(e){return pe=null,Promise.reject(e)}),pe)};Promise.resolve().then(function(){return at()}).catch(function(t){ct||console.warn(t)});var Ur=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];ct=!0;var i=Date.now();return at().then(function(l){return Cr(l,r,i)})};function Or(t){O(t,"svelte-1fwwzeb",".rcb-stripe-elements-container.svelte-1fwwzeb{width:100%;margin-bottom:1rem}")}function Sr(t){let e,r;return e=new Be({}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p:y,i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function Lr(t){let e,r,n,i,l,s;function o(u){t[9](u)}let c={stripe:t[2],clientSecret:t[4],loader:"always",$$slots:{default:[xr]},$$scope:{ctx:t}};return t[1]!==void 0&&(c.elements=t[1]),r=new Qr({props:c}),$e.push(()=>zt(r,"elements",o)),{c(){e=$("form"),b(r.$$.fragment)},m(u,_){A(u,e,_),E(r,e,null),i=!0,l||(s=fe(e,"submit",Je(t[5])),l=!0)},p(u,_){const g={};_&4&&(g.stripe=u[2]),_&2057&&(g.$$scope={dirty:_,ctx:u}),!n&&_&2&&(n=!0,g.elements=u[1],Vt(()=>n=!1)),r.$set(g)},i(u){i||(a(r.$$.fragment,u),i=!0)},o(u){f(r.$$.fragment,u),i=!1},d(u){u&&m(e),I(r),l=!1,s()}}}function Fr(t){let e,r,n;return r=new Br({}),{c(){e=$("div"),b(r.$$.fragment),h(e,"class","rcb-stripe-elements-container svelte-1fwwzeb")},m(i,l){A(i,e,l),E(r,e,null),n=!0},p:y,i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&m(e),I(r)}}}function Gr(t){let e;return{c(){e=L("Pay")},m(r,n){A(r,e,n)},d(r){r&&m(e)}}}function Yr(t){let e;return{c(){e=L("Processing...")},m(r,n){A(r,e,n)},d(r){r&&m(e)}}}function Hr(t){let e;function r(l,s){return l[3]?Yr:Gr}let n=r(t),i=n(t);return{c(){i.c(),e=Z()},m(l,s){i.m(l,s),A(l,e,s)},p(l,s){n!==(n=r(l))&&(i.d(1),i=n(l),i&&(i.c(),i.m(e.parentNode,e)))},d(l){l&&m(e),i.d(l)}}}function Kr(t){let e;return{c(){e=L("Close")},m(r,n){A(r,e,n)},d(r){r&&m(e)}}}function jr(t){let e,r,n,i;return e=new Ae({props:{disabled:t[3],$$slots:{default:[Hr]},$$scope:{ctx:t}}}),n=new Ae({props:{disabled:t[3],intent:"secondary",$$slots:{default:[Kr]},$$scope:{ctx:t}}}),n.$on("click",function(){ne(t[0])&&t[0].apply(this,arguments)}),{c(){b(e.$$.fragment),r=P(),b(n.$$.fragment)},m(l,s){E(e,l,s),A(l,r,s),E(n,l,s),i=!0},p(l,s){t=l;const o={};s&8&&(o.disabled=t[3]),s&2056&&(o.$$scope={dirty:s,ctx:t}),e.$set(o);const c={};s&8&&(c.disabled=t[3]),s&2048&&(c.$$scope={dirty:s,ctx:t}),n.$set(c)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&m(r),I(e,l),I(n,l)}}}function Jr(t){let e,r;return e=new te({props:{$$slots:{default:[jr]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){const l={};i&2057&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function xr(t){let e,r,n,i;return e=new z({props:{$$slots:{default:[Fr]},$$scope:{ctx:t}}}),n=new De({props:{$$slots:{default:[Jr]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment),r=P(),b(n.$$.fragment)},m(l,s){E(e,l,s),A(l,r,s),E(n,l,s),i=!0},p(l,s){const o={};s&2048&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const c={};s&2057&&(c.$$scope={dirty:s,ctx:l}),n.$set(c)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&m(r),I(e,l),I(n,l)}}}function Vr(t){let e,r,n,i;const l=[Lr,Sr],s=[];function o(c,u){return c[2]&&c[4]?0:1}return r=o(t),n=s[r]=l[r](t),{c(){e=$("div"),n.c()},m(c,u){A(c,e,u),s[r].m(e,null),i=!0},p(c,[u]){let _=r;r=o(c),r===_?s[r].p(c,u):(F(),f(s[_],1,1,()=>{s[_]=null}),G(),n=s[r],n?n.p(c,u):(n=s[r]=l[r](c),n.c()),a(n,1),n.m(e,null))},i(c){i||(a(n),i=!0)},o(c){f(n),i=!1},d(c){c&&m(e),s[r].d()}}}function qr(t,e,r){let{onClose:n}=e,{onContinue:i}=e,{onError:l}=e,{paymentInfoCollectionMetadata:s}=e;const o=s.data.client_secret;let c=null,u,_=!1,g;be(async()=>{const w=s.data.publishable_api_key,D=s.data.stripe_account_id;if(!w||!D)throw new Error("Stripe publishable key or account ID not found");r(2,c=await Ur(w,{stripeAccount:D}))});const k=async()=>{if(_||!c||!g)return;r(3,_=!0);const w=await c.confirmSetup({elements:g,redirect:"if_required"});w.error?(r(3,_=!1),l(new H(S.StripeError,w.error.message))):i()};function B(w){u=w,r(1,u)}return t.$$set=w=>{"onClose"in w&&r(0,n=w.onClose),"onContinue"in w&&r(6,i=w.onContinue),"onError"in w&&r(7,l=w.onError),"paymentInfoCollectionMetadata"in w&&r(8,s=w.paymentInfoCollectionMetadata)},t.$$.update=()=>{t.$$.dirty&2&&u&&u._elements.length>0&&(g=u)},[n,u,c,_,o,k,i,l,s,B]}class Wr extends U{constructor(e){super(),C(this,e,qr,Vr,R,{onClose:0,onContinue:6,onError:7,paymentInfoCollectionMetadata:8},Or)}}function zr(t){O(t,"svelte-1xardyz",".form-container.svelte-1xardyz{display:flex;flex-direction:column;width:100%}.form-label.svelte-1xardyz{margin-top:0.5rem;margin-bottom:0.5rem;display:block}.form-input.svelte-1xardyz{margin-bottom:1rem}.title.svelte-1xardyz{font-size:1.5rem;margin:0;margin-bottom:0.5rem}input.svelte-1xardyz{width:94%;padding:0.5rem;border:1px solid #ccc;border-radius:0.25rem}")}function Xr(t){let e;return{c(){e=$("span"),e.textContent="User authentication",h(e,"class","title svelte-1xardyz")},m(r,n){A(r,e,n)},p:y,d(r){r&&m(e)}}}function Zr(t){let e,r,n,i,l,s,o;return{c(){e=$("div"),r=$("div"),r.innerHTML='<label for="email">E-mail</label>',n=P(),i=$("div"),l=$("input"),h(r,"class","form-label svelte-1xardyz"),h(l,"name","email"),h(l,"placeholder","john@appleseed.com"),h(l,"class","svelte-1xardyz"),h(i,"class","form-input svelte-1xardyz"),h(e,"class","form-container svelte-1xardyz")},m(c,u){A(c,e,u),v(e,r),v(e,n),v(e,i),v(i,l),xe(l,t[0]),s||(o=fe(l,"input",t[3]),s=!0)},p(c,u){u&1&&l.value!==c[0]&&xe(l,c[0])},d(c){c&&m(e),s=!1,o()}}}function ei(t){let e;return{c(){e=L("Continue")},m(r,n){A(r,e,n)},d(r){r&&m(e)}}}function ti(t){let e,r;return e=new Ae({props:{$$slots:{default:[ei]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){const l={};i&16&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function ni(t){let e,r,n,i,l,s,o,c,u,_;return n=new z({props:{$$slots:{default:[Xr]},$$scope:{ctx:t}}}),l=new z({props:{$$slots:{default:[Zr]},$$scope:{ctx:t}}}),o=new De({props:{$$slots:{default:[ti]},$$scope:{ctx:t}}}),{c(){e=$("div"),r=$("form"),b(n.$$.fragment),i=P(),b(l.$$.fragment),s=P(),b(o.$$.fragment)},m(g,k){A(g,e,k),v(e,r),E(n,r,null),v(r,i),E(l,r,null),v(r,s),E(o,r,null),c=!0,u||(_=fe(r,"submit",Je(t[1])),u=!0)},p(g,[k]){const B={};k&16&&(B.$$scope={dirty:k,ctx:g}),n.$set(B);const w={};k&17&&(w.$$scope={dirty:k,ctx:g}),l.$set(w);const D={};k&16&&(D.$$scope={dirty:k,ctx:g}),o.$set(D)},i(g){c||(a(n.$$.fragment,g),a(l.$$.fragment,g),a(o.$$.fragment,g),c=!0)},o(g){f(n.$$.fragment,g),f(l.$$.fragment,g),f(o.$$.fragment,g),c=!1},d(g){g&&m(e),I(n),I(l),I(o),u=!1,_()}}}function ri(t,e,r){let n,{onContinue:i}=e;const l=async()=>{i({email:n})};function s(){n=this.value,r(0,n)}return t.$$set=o=>{"onContinue"in o&&r(2,i=o.onContinue)},r(0,n=""),[n,l,i,s]}class ii extends U{constructor(e){super(),C(this,e,ri,ni,R,{onContinue:2},zr)}}const li="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip0_344_3390)'%3e%3cpath%20d='M7%2018C5.9%2018%205.01%2018.9%205.01%2020C5.01%2021.1%205.9%2022%207%2022C8.1%2022%209%2021.1%209%2020C9%2018.9%208.1%2018%207%2018ZM1%202V4H3L6.6%2011.59L5.25%2014.04C5.09%2014.32%205%2014.65%205%2015C5%2016.1%205.9%2017%207%2017H19V15H7.42C7.28%2015%207.17%2014.89%207.17%2014.75L7.2%2014.63L8.1%2013H15.55C16.3%2013%2016.96%2012.59%2017.3%2011.97L20.88%205.48C20.96%205.34%2021%205.17%2021%205C21%204.45%2020.55%204%2020%204H5.21L4.27%202H1ZM17%2018C15.9%2018%2015.01%2018.9%2015.01%2020C15.01%2021.1%2015.9%2022%2017%2022C18.1%2022%2019%2021.1%2019%2020C19%2018.9%2018.1%2018%2017%2018Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_344_3390'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function si(t){let e,r;return{c(){e=$("img"),q(e.src,r=li)||h(e,"src",r),h(e,"alt","icon"),h(e,"class","rcb-ui-asset-icon")},m(n,i){A(n,e,i)},p:y,i:y,o:y,d(n){n&&m(e)}}}class oi extends U{constructor(e){super(),C(this,e,null,si,R,{})}}function ci(t){O(t,"svelte-1ggdgso",".rcb-header-layout.svelte-1ggdgso{display:flex;justify-content:space-between;align-items:center;width:100%}")}function ai(t){let e,r,n,i,l;return r=new tt({props:{brandingInfo:t[0]}}),i=new oi({}),{c(){e=$("div"),b(r.$$.fragment),n=P(),b(i.$$.fragment),h(e,"class","rcb-header-layout svelte-1ggdgso")},m(s,o){A(s,e,o),E(r,e,null),v(e,n),E(i,e,null),l=!0},p(s,o){const c={};o&1&&(c.brandingInfo=s[0]),r.$set(c)},i(s){l||(a(r.$$.fragment,s),a(i.$$.fragment,s),l=!0)},o(s){f(r.$$.fragment,s),f(i.$$.fragment,s),l=!1},d(s){s&&m(e),I(r),I(i)}}}function ui(t){let e,r;return e=new z({props:{as:"header",$$slots:{default:[ai]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,[i]){const l={};i&3&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function fi(t,e,r){let{brandingInfo:n=null}=e;return t.$$set=i=>{"brandingInfo"in i&&r(0,n=i.brandingInfo)},[n]}class di extends U{constructor(e){super(),C(this,e,fi,ui,R,{brandingInfo:0},ci)}}function mi(t){O(t,"svelte-17dhulw",".rcb-modal-backdrop.svelte-17dhulw{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(40, 40, 40, 0.75);display:flex;flex-direction:column;justify-content:space-around}")}function gi(t){let e,r;const n=t[1].default,i=j(n,t,t[0],null);return{c(){e=$("div"),i&&i.c(),h(e,"class","rcb-modal-backdrop svelte-17dhulw")},m(l,s){A(l,e,s),i&&i.m(e,null),r=!0},p(l,[s]){i&&i.p&&(!r||s&1)&&x(i,n,l,l[0],r?J(n,l[0],s,null):V(l[0]),null)},i(l){r||(a(i,l),r=!0)},o(l){f(i,l),r=!1},d(l){l&&m(e),i&&i.d(l)}}}function Ai(t,e,r){let{$$slots:n={},$$scope:i}=e;return t.$$set=l=>{"$$scope"in l&&r(0,i=l.$$scope)},[i,n]}class _i extends U{constructor(e){super(),C(this,e,Ai,gi,R,{},mi)}}function pi(t){O(t,"svelte-m6kocx",".rcb-modal-main.svelte-m6kocx{box-sizing:border-box;border-radius:0.5rem;background-color:#fff;color:black;max-width:40rem;min-width:30rem;overflow-y:auto;padding:2.5rem}.rcb-modal-dark.svelte-m6kocx{background-color:#000;color:#fff;max-width:30rem;min-width:20rem}@media screen and (max-width: 60rem){.rcb-modal-main.svelte-m6kocx,.rcb-modal-dark.svelte-m6kocx{max-width:40rem;min-width:90vw}}")}function hi(t){let e,r,n;const i=t[2].default,l=j(i,t,t[1],null);return{c(){e=$("main"),l&&l.c(),h(e,"class",r=ue(`rcb-modal-main ${t[0]?"rcb-modal-dark":""}`)+" svelte-m6kocx")},m(s,o){A(s,e,o),l&&l.m(e,null),n=!0},p(s,[o]){l&&l.p&&(!n||o&2)&&x(l,i,s,s[1],n?J(i,s[1],o,null):V(s[1]),null),(!n||o&1&&r!==(r=ue(`rcb-modal-main ${s[0]?"rcb-modal-dark":""}`)+" svelte-m6kocx"))&&h(e,"class",r)},i(s){n||(a(l,s),n=!0)},o(s){f(l,s),n=!1},d(s){s&&m(e),l&&l.d(s)}}}function Ei(t,e,r){let{$$slots:n={},$$scope:i}=e,{dark:l=!1}=e;return t.$$set=s=>{"dark"in s&&r(0,l=s.dark),"$$scope"in s&&r(1,i=s.$$scope)},[l,i,n]}class Ii extends U{constructor(e){super(),C(this,e,Ei,hi,R,{dark:0},pi)}}function wi(t){let e;const r=t[1].default,n=j(r,t,t[2],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&4)&&x(n,r,i,i[2],e?J(r,i[2],l,null):V(i[2]),null)},i(i){e||(a(n,i),e=!0)},o(i){f(n,i),e=!1},d(i){n&&n.d(i)}}}function bi(t){let e,r;return e=new _i({props:{$$slots:{default:[$i]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function $i(t){let e;const r=t[1].default,n=j(r,t,t[2],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&4)&&x(n,r,i,i[2],e?J(r,i[2],l,null):V(i[2]),null)},i(i){e||(a(n,i),e=!0)},o(i){f(n,i),e=!1},d(i){n&&n.d(i)}}}function ki(t){let e,r,n,i;const l=[bi,wi],s=[];function o(c,u){return c[0]?0:1}return e=o(t),r=s[e]=l[e](t),{c(){r.c(),n=Z()},m(c,u){s[e].m(c,u),A(c,n,u),i=!0},p(c,[u]){let _=e;e=o(c),e===_?s[e].p(c,u):(F(),f(s[_],1,1,()=>{s[_]=null}),G(),r=s[e],r?r.p(c,u):(r=s[e]=l[e](c),r.c()),a(r,1),r.m(n.parentNode,n))},i(c){i||(a(r),i=!0)},o(c){f(r),i=!1},d(c){c&&m(n),s[e].d(c)}}}function Bi(t,e,r){let{$$slots:n={},$$scope:i}=e,{condition:l=!1}=e;return t.$$set=s=>{"condition"in s&&r(0,l=s.condition),"$$scope"in s&&r(2,i=s.$$scope)},[l,n,i]}class yi extends U{constructor(e){super(),C(this,e,Bi,ki,R,{condition:0})}}function ut(t){let e,r;return e=new di({props:{brandingInfo:t[2]}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.brandingInfo=n[2]),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function Di(t){let e,r,n=t[1]&&ut(t);const i=t[3].default,l=j(i,t,t[4],null);return{c(){n&&n.c(),e=P(),l&&l.c()},m(s,o){n&&n.m(s,o),A(s,e,o),l&&l.m(s,o),r=!0},p(s,o){s[1]?n?(n.p(s,o),o&2&&a(n,1)):(n=ut(s),n.c(),a(n,1),n.m(e.parentNode,e)):n&&(F(),f(n,1,1,()=>{n=null}),G()),l&&l.p&&(!r||o&16)&&x(l,i,s,s[4],r?J(i,s[4],o,null):V(s[4]),null)},i(s){r||(a(n),a(l,s),r=!0)},o(s){f(n),f(l,s),r=!1},d(s){s&&m(e),n&&n.d(s),l&&l.d(s)}}}function Qi(t){let e,r;return e=new Ii({props:{dark:t[0],$$slots:{default:[Di]},$$scope:{ctx:t}}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,[i]){const l={};i&1&&(l.dark=n[0]),i&22&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function vi(t,e,r){let{$$slots:n={},$$scope:i}=e,{dark:l=!1}=e,{showHeader:s=!1}=e,{brandingInfo:o=null}=e;return t.$$set=c=>{"dark"in c&&r(0,l=c.dark),"showHeader"in c&&r(1,s=c.showHeader),"brandingInfo"in c&&r(2,o=c.brandingInfo),"$$scope"in c&&r(4,i=c.$$scope)},[l,s,o,n,i]}class ft extends U{constructor(e){super(),C(this,e,vi,Qi,R,{dark:0,showHeader:1,brandingInfo:2})}}var he=(t=>(t[t.UnknownError=0]="UnknownError",t[t.UserCancelledError=1]="UserCancelledError",t[t.StoreProblemError=2]="StoreProblemError",t[t.PurchaseNotAllowedError=3]="PurchaseNotAllowedError",t[t.PurchaseInvalidError=4]="PurchaseInvalidError",t[t.ProductNotAvailableForPurchaseError=5]="ProductNotAvailableForPurchaseError",t[t.ProductAlreadyPurchasedError=6]="ProductAlreadyPurchasedError",t[t.ReceiptAlreadyInUseError=7]="ReceiptAlreadyInUseError",t[t.InvalidReceiptError=8]="InvalidReceiptError",t[t.MissingReceiptFileError=9]="MissingReceiptFileError",t[t.NetworkError=10]="NetworkError",t[t.InvalidCredentialsError=11]="InvalidCredentialsError",t[t.UnexpectedBackendResponseError=12]="UnexpectedBackendResponseError",t[t.InvalidAppUserIdError=14]="InvalidAppUserIdError",t[t.OperationAlreadyInProgressError=15]="OperationAlreadyInProgressError",t[t.UnknownBackendError=16]="UnknownBackendError",t[t.InvalidAppleSubscriptionKeyError=17]="InvalidAppleSubscriptionKeyError",t[t.IneligibleError=18]="IneligibleError",t[t.InsufficientPermissionsError=19]="InsufficientPermissionsError",t[t.PaymentPendingError=20]="PaymentPendingError",t[t.InvalidSubscriberAttributesError=21]="InvalidSubscriberAttributesError",t[t.LogOutWithAnonymousUserError=22]="LogOutWithAnonymousUserError",t[t.ConfigurationError=23]="ConfigurationError",t[t.UnsupportedError=24]="UnsupportedError",t[t.EmptySubscriberAttributesError=25]="EmptySubscriberAttributesError",t[t.CustomerInfoError=28]="CustomerInfoError",t[t.SignatureVerificationError=36]="SignatureVerificationError",t))(he||{});class Pe{static getPublicMessage(e){switch(e){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.";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."}}static getErrorCodeForBackendErrorCode(e){switch(e){case 7101:return 2;case 7102:return 7;case 7103:return 8;case 7107:case 7224:case 7225:return 11;case 7105:case 7106:return 4;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}}static convertCodeToBackendErrorCode(e){return e in dt?e:null}static convertPurchaseFlowErrorCodeToErrorCode(e){switch(e){case S.ErrorSettingUpPurchase:return 2;case S.ErrorChargingPayment:return 20;case S.NetworkError:return 10;case S.MissingEmailError:return 4;case S.StripeError:return 2;case S.UnknownError:return 0}}}var dt=(t=>(t[t.BackendInvalidPlatform=7e3]="BackendInvalidPlatform",t[t.BackendStoreProblem=7101]="BackendStoreProblem",t[t.BackendCannotTransferPurchase=7102]="BackendCannotTransferPurchase",t[t.BackendInvalidReceiptToken=7103]="BackendInvalidReceiptToken",t[t.BackendInvalidAppStoreSharedSecret=7104]="BackendInvalidAppStoreSharedSecret",t[t.BackendInvalidPaymentModeOrIntroPriceNotProvided=7105]="BackendInvalidPaymentModeOrIntroPriceNotProvided",t[t.BackendProductIdForGoogleReceiptNotProvided=7106]="BackendProductIdForGoogleReceiptNotProvided",t[t.BackendInvalidPlayStoreCredentials=7107]="BackendInvalidPlayStoreCredentials",t[t.BackendInternalServerError=7110]="BackendInternalServerError",t[t.BackendEmptyAppUserId=7220]="BackendEmptyAppUserId",t[t.BackendInvalidAuthToken=7224]="BackendInvalidAuthToken",t[t.BackendInvalidAPIKey=7225]="BackendInvalidAPIKey",t[t.BackendBadRequest=7226]="BackendBadRequest",t[t.BackendPlayStoreQuotaExceeded=7229]="BackendPlayStoreQuotaExceeded",t[t.BackendPlayStoreInvalidPackageName=7230]="BackendPlayStoreInvalidPackageName",t[t.BackendPlayStoreGenericError=7231]="BackendPlayStoreGenericError",t[t.BackendUserIneligibleForPromoOffer=7232]="BackendUserIneligibleForPromoOffer",t[t.BackendInvalidAppleSubscriptionKey=7234]="BackendInvalidAppleSubscriptionKey",t[t.BackendInvalidSubscriberAttributes=7263]="BackendInvalidSubscriberAttributes",t[t.BackendInvalidSubscriberAttributesBody=7264]="BackendInvalidSubscriberAttributesBody",t[t.BackendProductIDsMalformed=7662]="BackendProductIDsMalformed",t))(dt||{});class X extends Error{constructor(r,n,i){super(n);T(this,"toString",()=>`PurchasesError(code: ${he[this.errorCode]}, message: ${this.message})`);this.errorCode=r,this.underlyingErrorMessage=i}static getForBackendError(r,n){const i=Pe.getErrorCodeForBackendErrorCode(r);return new X(i,Pe.getPublicMessage(i),n)}static getForPurchasesFlowError(r){return new X(Pe.convertPurchaseFlowErrorCodeToErrorCode(r.errorCode),r.message,r.underlyingErrorMessage)}}const Mi="0.0.10",oe="https://api.revenuecat.com";var Te;(function(t){t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.EARLY_HINTS=103]="EARLY_HINTS",t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.RESET_CONTENT=205]="RESET_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.MULTI_STATUS=207]="MULTI_STATUS",t[t.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.USE_PROXY=305]="USE_PROXY",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",t[t.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.CONFLICT=409]="CONFLICT",t[t.GONE=410]="GONE",t[t.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",t[t.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",t[t.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",t[t.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",t[t.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",t[t.IM_A_TEAPOT=418]="IM_A_TEAPOT",t[t.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",t[t.METHOD_FAILURE=420]="METHOD_FAILURE",t[t.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",t[t.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",t[t.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",t[t.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",t[t.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",t[t.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(Te||(Te={}));function mt(t){return t?t.startsWith("rcb_sb_"):!1}async function ce(t,e,r,n){const i=await fetch(t.url(),{method:t.method,headers:Ni(e,n),body:Ti(r)});return await Pi(i,t),await i.json()}async function Pi(t,e){const r=t.status;if(r>=Te.INTERNAL_SERVER_ERROR)Fe(e,r,await t.text());else if(r>=Te.BAD_REQUEST){const n=await t.json(),i=n?JSON.stringify(n):null,l=n==null?void 0:n.code,s=n==null?void 0:n.message;if(l!=null){const o=Pe.convertCodeToBackendErrorCode(l);if(o==null)Fe(e,r,i);else throw X.getForBackendError(o,s)}else Fe(e,r,i)}}function Fe(t,e,r){throw new X(he.UnknownBackendError,`Unknown backend error. Request: ${t.name}. Status code: ${e}. Body: ${r}.`)}function Ti(t){return t==null?null:JSON.stringify(t)}function Ni(t,e){let r={Authorization:`Bearer ${t}`,"Content-Type":"application/json",Accept:"application/json","X-Platform":"web","X-Version":Mi,"X-Is-Sandbox":`${mt(t)}`};return e!=null&&(r={...r,...e}),r}const gt="/v1/subscribers",Ne="/rcbilling/v1";class Ri{constructor(e){T(this,"appUserId");T(this,"method","GET");T(this,"name","getOfferings");this.appUserId=e}url(){return`${oe}${gt}/${this.appUserId}/offerings`}}class Ci{constructor(){T(this,"method","POST");T(this,"name","subscribe")}url(){return`${oe}${Ne}/subscribe`}}class Ui{constructor(e,r){T(this,"method","GET");T(this,"name","getProducts");T(this,"appUserId");T(this,"productIds");this.appUserId=e,this.productIds=r}url(){return`${oe}${Ne}/subscribers/${this.appUserId}/products?id=${this.productIds.join("&id=")}`}}class Oi{constructor(e){T(this,"method","GET");T(this,"name","getCustomerInfo");T(this,"appUserId");this.appUserId=e}url(){return`${oe}${gt}/${this.appUserId}`}}class Si{constructor(){T(this,"method","GET");T(this,"name","getBrandingInfo")}url(){return`${oe}${Ne}/branding`}}class Li{constructor(e){T(this,"method","GET");T(this,"name","getCheckoutStatus");T(this,"operationSessionId");this.operationSessionId=e}url(){return`${oe}${Ne}/checkout/${this.operationSessionId}`}}class Fi{constructor(e){T(this,"API_KEY");this.API_KEY=e}async getOfferings(e){return await ce(new Ri(e),this.API_KEY)}async getCustomerInfo(e){return await ce(new Oi(e),this.API_KEY)}async getProducts(e,r){return await ce(new Ui(e,r),this.API_KEY)}async getBrandingInfo(){return await ce(new Si,this.API_KEY)}async postSubscribe(e,r,n){return await ce(new Ci,this.API_KEY,{app_user_id:e,product_id:r,email:n})}async getCheckoutStatus(e){return await ce(new Li(e),this.API_KEY)}}function Gi(t){O(t,"svelte-ofxzf4",`.rcb-ui-container.svelte-ofxzf4{color-scheme:none;font-family:"PP Object Sans",
|
|
2
|
+
-apple-system,
|
|
3
|
+
BlinkMacSystemFont,
|
|
4
|
+
avenir next,
|
|
5
|
+
avenir,
|
|
6
|
+
segoe ui,
|
|
7
|
+
helvetica neue,
|
|
8
|
+
helvetica,
|
|
9
|
+
Cantarell,
|
|
10
|
+
Ubuntu,
|
|
11
|
+
roboto,
|
|
12
|
+
noto,
|
|
13
|
+
arial,
|
|
14
|
+
sans-serif}.rcb-ui-layout.svelte-ofxzf4{display:flex;justify-content:center;align-items:flex-start}.rcb-ui-aside.svelte-ofxzf4{margin-right:1rem}@media screen and (max-width: 60rem){.rcb-ui-layout.svelte-ofxzf4{flex-direction:column;align-items:center;justify-content:flex-end;height:100%}.rcb-ui-aside.svelte-ofxzf4{margin-right:0;margin-bottom:1rem}}`)}function At(t){let e,r,n,i=t[1].isSandbox(),l;r=new ft({props:{dark:!0,showHeader:!0,brandingInfo:t[3],$$slots:{default:[Yi]},$$scope:{ctx:t}}});let s=i&&pt();return{c(){e=$("div"),b(r.$$.fragment),n=P(),s&&s.c(),h(e,"class","rcb-ui-aside svelte-ofxzf4")},m(o,c){A(o,e,c),E(r,e,null),v(e,n),s&&s.m(e,null),l=!0},p(o,c){const u={};c&8&&(u.brandingInfo=o[3]),c&4194308&&(u.$$scope={dirty:c,ctx:o}),r.$set(u),c&2&&(i=o[1].isSandbox()),i?s?c&2&&a(s,1):(s=pt(),s.c(),a(s,1),s.m(e,null)):s&&(F(),f(s,1,1,()=>{s=null}),G())},i(o){l||(a(r.$$.fragment,o),a(s),l=!0)},o(o){f(r.$$.fragment,o),f(s),l=!1},d(o){o&&m(e),I(r),s&&s.d()}}}function _t(t){let e,r;return e=new Xe({props:{productDetails:t[2]}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.productDetails=n[2]),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function Yi(t){let e,r,n=t[2]&&_t(t);return{c(){n&&n.c(),e=Z()},m(i,l){n&&n.m(i,l),A(i,e,l),r=!0},p(i,l){i[2]?n?(n.p(i,l),l&4&&a(n,1)):(n=_t(i),n.c(),a(n,1),n.m(e.parentNode,e)):n&&(F(),f(n,1,1,()=>{n=null}),G())},i(i){r||(a(n),r=!0)},o(i){f(n),r=!1},d(i){i&&m(e),n&&n.d(i)}}}function pt(t){let e,r;return e=new nn({}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function ht(t){let e,r;return e=new Xe({props:{productDetails:t[2]}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.productDetails=n[2]),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function Et(t){let e,r;return e=new Be({}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function It(t){let e,r;return e=new Be({}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function wt(t){let e,r;return e=new ii({props:{onContinue:t[9]}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p:y,i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function bt(t){let e,r;return e=new Wr({props:{paymentInfoCollectionMetadata:t[4],onContinue:t[9],onClose:t[8],onError:t[10]}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){const l={};i&16&&(l.paymentInfoCollectionMetadata=n[4]),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function $t(t){let e,r;return e=new Be({}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function kt(t){var n;let e,r;return e=new lr({props:{brandingInfo:t[3],lastError:t[5]??new H(S.UnknownError,"Unknown error without state set."),supportEmail:(n=t[3])==null?void 0:n.seller_company_support_email,onContinue:t[11]}}),{c(){b(e.$$.fragment)},m(i,l){E(e,i,l),r=!0},p(i,l){var o;const s={};l&8&&(s.brandingInfo=i[3]),l&32&&(s.lastError=i[5]??new H(S.UnknownError,"Unknown error without state set.")),l&8&&(s.supportEmail=(o=i[3])==null?void 0:o.seller_company_support_email),e.$set(s)},i(i){r||(a(e.$$.fragment,i),r=!0)},o(i){f(e.$$.fragment,i),r=!1},d(i){I(e,i)}}}function Bt(t){let e,r;return e=new Er({props:{brandingInfo:t[3],onContinue:t[9]}}),{c(){b(e.$$.fragment)},m(n,i){E(e,n,i),r=!0},p(n,i){const l={};i&8&&(l.brandingInfo=n[3]),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){I(e,n)}}}function Hi(t){let e,r,n,i,l,s,o,c,u,_=t[6]==="present-offer"&&t[2]&&ht(t),g=t[6]==="present-offer"&&!t[2]&&Et(),k=t[6]==="polling-purchase-status"&&It(),B=t[6]==="needs-auth-info"&&wt(t),w=t[6]==="needs-payment-info"&&t[4]&&bt(t),D=t[6]==="loading"&&$t(),M=t[6]==="error"&&kt(t),N=t[6]==="success"&&Bt(t);return{c(){_&&_.c(),e=P(),g&&g.c(),r=P(),k&&k.c(),n=P(),B&&B.c(),i=P(),w&&w.c(),l=P(),D&&D.c(),s=P(),M&&M.c(),o=P(),N&&N.c(),c=Z()},m(d,p){_&&_.m(d,p),A(d,e,p),g&&g.m(d,p),A(d,r,p),k&&k.m(d,p),A(d,n,p),B&&B.m(d,p),A(d,i,p),w&&w.m(d,p),A(d,l,p),D&&D.m(d,p),A(d,s,p),M&&M.m(d,p),A(d,o,p),N&&N.m(d,p),A(d,c,p),u=!0},p(d,p){d[6]==="present-offer"&&d[2]?_?(_.p(d,p),p&68&&a(_,1)):(_=ht(d),_.c(),a(_,1),_.m(e.parentNode,e)):_&&(F(),f(_,1,1,()=>{_=null}),G()),d[6]==="present-offer"&&!d[2]?g?p&68&&a(g,1):(g=Et(),g.c(),a(g,1),g.m(r.parentNode,r)):g&&(F(),f(g,1,1,()=>{g=null}),G()),d[6]==="polling-purchase-status"?k?p&64&&a(k,1):(k=It(),k.c(),a(k,1),k.m(n.parentNode,n)):k&&(F(),f(k,1,1,()=>{k=null}),G()),d[6]==="needs-auth-info"?B?(B.p(d,p),p&64&&a(B,1)):(B=wt(d),B.c(),a(B,1),B.m(i.parentNode,i)):B&&(F(),f(B,1,1,()=>{B=null}),G()),d[6]==="needs-payment-info"&&d[4]?w?(w.p(d,p),p&80&&a(w,1)):(w=bt(d),w.c(),a(w,1),w.m(l.parentNode,l)):w&&(F(),f(w,1,1,()=>{w=null}),G()),d[6]==="loading"?D?p&64&&a(D,1):(D=$t(),D.c(),a(D,1),D.m(s.parentNode,s)):D&&(F(),f(D,1,1,()=>{D=null}),G()),d[6]==="error"?M?(M.p(d,p),p&64&&a(M,1)):(M=kt(d),M.c(),a(M,1),M.m(o.parentNode,o)):M&&(F(),f(M,1,1,()=>{M=null}),G()),d[6]==="success"?N?(N.p(d,p),p&64&&a(N,1)):(N=Bt(d),N.c(),a(N,1),N.m(c.parentNode,c)):N&&(F(),f(N,1,1,()=>{N=null}),G())},i(d){u||(a(_),a(g),a(k),a(B),a(w),a(D),a(M),a(N),u=!0)},o(d){f(_),f(g),f(k),f(B),f(w),f(D),f(M),f(N),u=!1},d(d){d&&(m(e),m(r),m(n),m(i),m(l),m(s),m(o),m(c)),_&&_.d(d),g&&g.d(d),k&&k.d(d),B&&B.d(d),w&&w.d(d),D&&D.d(d),M&&M.d(d),N&&N.d(d)}}}function Ki(t){let e,r=t[7].includes(t[6]),n,i,l,s=r&&At(t);return i=new ft({props:{$$slots:{default:[Hi]},$$scope:{ctx:t}}}),{c(){e=$("div"),s&&s.c(),n=P(),b(i.$$.fragment),h(e,"class","rcb-ui-layout svelte-ofxzf4")},m(o,c){A(o,e,c),s&&s.m(e,null),v(e,n),E(i,e,null),l=!0},p(o,c){c&64&&(r=o[7].includes(o[6])),r?s?(s.p(o,c),c&64&&a(s,1)):(s=At(o),s.c(),a(s,1),s.m(e,n)):s&&(F(),f(s,1,1,()=>{s=null}),G());const u={};c&4194428&&(u.$$scope={dirty:c,ctx:o}),i.$set(u)},i(o){l||(a(s),a(i.$$.fragment,o),l=!0)},o(o){f(s),f(i.$$.fragment,o),l=!1},d(o){o&&m(e),s&&s.d(),I(i)}}}function ji(t){let e,r,n;return r=new yi({props:{condition:t[0],$$slots:{default:[Ki]},$$scope:{ctx:t}}}),{c(){e=$("div"),b(r.$$.fragment),h(e,"class","rcb-ui-container svelte-ofxzf4")},m(i,l){A(i,e,l),E(r,e,null),n=!0},p(i,[l]){const s={};l&1&&(s.condition=i[0]),l&4194430&&(s.$$scope={dirty:l,ctx:i}),r.$set(s)},i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&m(e),I(r)}}}function Ji(t,e,r){var Dt;let{asModal:n=!0}=e,{customerEmail:i}=e,{appUserId:l}=e,{rcPackage:s}=e,{onFinished:o}=e,{onError:c}=e,{onClose:u}=e,{purchases:_}=e,{backend:g}=e,{purchaseOperationHelper:k}=e,B=null,w=null,D=null,M=null;const N=((Dt=s.rcBillingProduct)==null?void 0:Dt.identifier)??null;let d="present-offer";const p=["present-offer","needs-auth-info","needs-payment-info","loading"];be(async()=>{if(r(2,B=s.rcBillingProduct),r(3,w=await g.getBrandingInfo()),d==="present-offer"){i?yt():r(6,d="needs-auth-info");return}});const rl=()=>{u()},yt=()=>{if(N===null){Ee(new H(S.ErrorSettingUpPurchase,"Product ID was not set before purchase."));return}else r(6,d="loading");if(!i){Ee(new H(S.MissingEmailError));return}k.startPurchase(l,N,i).then(Q=>{if(Q.next_action==="collect_payment_info"){r(6,d="needs-payment-info"),r(4,D=Q);return}if(Q.next_action==="completed"){r(6,d="success");return}}).catch(Q=>{Ee(new H(S.ErrorSettingUpPurchase,Q.message,Q.underlyingErrorMessage))})},il=Q=>{if(d==="needs-auth-info"){Q&&r(12,i=Q.email),yt();return}if(d==="needs-payment-info"){r(6,d="polling-purchase-status"),k.pollCurrentPurchaseForCompletion().then(()=>{r(6,d="success")}).catch(sl=>{Ee(sl)});return}if(d==="success"||d==="error"){o();return}r(6,d="success")},Ee=Q=>{r(5,M=Q),r(6,d="error")},ll=()=>{c(M??new H(S.UnknownError,"Unknown error without state set."))};return t.$$set=Q=>{"asModal"in Q&&r(0,n=Q.asModal),"customerEmail"in Q&&r(12,i=Q.customerEmail),"appUserId"in Q&&r(13,l=Q.appUserId),"rcPackage"in Q&&r(14,s=Q.rcPackage),"onFinished"in Q&&r(15,o=Q.onFinished),"onError"in Q&&r(16,c=Q.onError),"onClose"in Q&&r(17,u=Q.onClose),"purchases"in Q&&r(1,_=Q.purchases),"backend"in Q&&r(18,g=Q.backend),"purchaseOperationHelper"in Q&&r(19,k=Q.purchaseOperationHelper)},[n,_,B,w,D,M,d,p,rl,il,Ee,ll,i,l,s,o,c,u,g,k]}class xi extends U{constructor(e){super(),C(this,e,Ji,ji,R,{asModal:0,customerEmail:12,appUserId:13,rcPackage:14,onFinished:15,onError:16,onClose:17,purchases:1,backend:18,purchaseOperationHelper:19},Gi)}}function Vi(t){return t.expires_date==null?!0:new Date(t.expires_date)>new Date}function qi(t,e,r){return{identifier:t,isActive:Vi(e),willRenew:Xi(e,r),store:(r==null?void 0:r.store)??"unknown",originalPurchaseDate:new Date(e.purchase_date),expirationDate:Re(e.expires_date),productIdentifier:e.product_identifier,unsubscribeDetectedAt:Re(r==null?void 0:r.unsubscribe_detected_at),billingIssueDetectedAt:Re(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 Wi(t,e){const r={},n={};for(const i in t){const l=e[i]??null,s=qi(i,t[i],l);r[i]=s,s.isActive&&(n[i]=s)}return{all:r,active:n}}function Re(t){return t==null?null:new Date(t)}function zi(t){const e=el(t),r=t.subscriber;return{entitlements:Wi(r.entitlements,r.subscriptions),allExpirationDatesByProduct:e,allPurchaseDatesByProduct:Zi(t),activeSubscriptions:tl(e),managementURL:r.management_url,requestDate:new Date(t.request_date),firstSeenDate:new Date(r.first_seen),originalPurchaseDate:Re(r.original_purchase_date),originalAppUserId:t.subscriber.original_app_user_id}}function Xi(t,e){if(e==null)return!1;const r=e.store=="promotional",n=t.expires_date==null,i=e.unsubscribe_detected_at!=null,l=e.billing_issues_detected_at!=null;return!(r||n||i||l)}function Zi(t){const e={};for(const r in t.subscriber.subscriptions){const n=t.subscriber.subscriptions[r];e[r]=new Date(n.purchase_date)}return e}function el(t){const e={};for(const r in t.subscriber.subscriptions){const n=t.subscriber.subscriptions[r];n.expires_date==null?e[r]=null:e[r]=new Date(n.expires_date)}return e}function tl(t){const e=new Set,r=new Date;for(const n in t){const i=t[n];(i==null||i>r)&&e.add(n)}return e}class nl{constructor(e){T(this,"_API_KEY");T(this,"backend");T(this,"purchaseOperationHelper");T(this,"toOfferings",(e,r)=>{const n=e.offerings.find(o=>o.identifier===e.current_offering_id)??null,i={};r.product_details.forEach(o=>{i[o.identifier]=o});const l=n==null?null:Ge(n,i),s={};return e.offerings.forEach(o=>{const c=Ge(o,i);c!=null&&(s[o.identifier]=c)}),Object.keys(s).length==0&&console.debug("Empty offerings. Please make sure you've configured offerings correctly in the RevenueCat dashboard and that the products are properly configured."),{all:s,current:l}});this._API_KEY=e,this.backend=new Fi(this._API_KEY),this.purchaseOperationHelper=new pn(this.backend)}async getOfferings(e){const r=await this.backend.getOfferings(e),n=r.offerings.flatMap(l=>l.packages).map(l=>l.platform_product_identifier),i=await this.backend.getProducts(e,n);return this.logMissingProductIds(n,i.product_details),this.toOfferings(r,i)}async isEntitledTo(e,r){const n=await this.getCustomerInfo(e);return r in n.entitlements.active}purchasePackage(e,r,n,i){let l=i??document.getElementById("rcb-ui-root");if(l===null){const c=document.createElement("div");c.className="rcb-ui-root",document.body.appendChild(c),l=c}if(l===null)throw new Error("Could not generate a mount point for the billing widget");const s=l,o=!i;return new Promise((c,u)=>{new xi({target:s,props:{appUserId:e,rcPackage:r,customerEmail:n,onFinished:async()=>{s.innerHTML="",c({customerInfo:await this.getCustomerInfo(e)})},onClose:()=>{s.innerHTML="",u(new X(he.UserCancelledError))},onError:_=>{s.innerHTML="",u(X.getForPurchasesFlowError(_))},purchases:this,backend:this.backend,purchaseOperationHelper:this.purchaseOperationHelper,asModal:o}})})}async getCustomerInfo(e){const r=await this.backend.getCustomerInfo(e);return zi(r)}logMissingProductIds(e,r){const n={};r.forEach(l=>n[l.identifier]=l);const i=[];e.forEach(l=>{n[l]===void 0&&i.push(l)}),i.length>0&&console.debug("Could not find product data for product ids: ",i,". Please check that your product configuration is correct.")}isSandbox(){return mt(this._API_KEY)}}Y.ErrorCode=he,Y.PackageType=W,Y.Purchases=nl,Y.PurchasesError=X,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
aside.svelte-8uc6s0{color:#9acd32;font-weight:700;text-transform:uppercase;padding:.5rem 0;width:100%;font-size:.75rem;border-radius:.5rem}.rcb-modal-section.svelte-ujomz3{padding:.5rem 0rem;display:flex}.rcb-modal-section.svelte-ujomz3:last-of-type{padding:0}.rcb-pricing-info.svelte-1oa6nu8{display:flex;flex-direction:column;height:10rem;justify-content:flex-end}.rcb-product-price.svelte-1oa6nu8{font-size:1.5rem}.rcb-product-duration.svelte-1oa6nu8{opacity:.6}.rcb-modal-loader.svelte-4wmtg7{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center}button.svelte-igat39{border:none;border-radius:3.5rem;font-size:1rem;cursor:pointer;height:3.5rem;color:#000;background-color:#dfdfdf}button.intent-primary.svelte-igat39{background-color:#000;color:#fff;font-size:1rem}footer.svelte-1f9z0o8{display:flex;flex-direction:column}
|
|
1
|
+
aside.svelte-8uc6s0{color:#9acd32;font-weight:700;text-transform:uppercase;padding:.5rem 0;width:100%;font-size:.75rem;border-radius:.5rem}.rcb-modal-section.svelte-ujomz3{padding:.5rem 0rem;display:flex}.rcb-modal-section.svelte-ujomz3:last-of-type{padding:0}.rcb-pricing-info.svelte-1oa6nu8{display:flex;flex-direction:column;height:10rem;justify-content:flex-end}.rcb-product-price.svelte-1oa6nu8{font-size:1.5rem}.rcb-product-duration.svelte-1oa6nu8{opacity:.6}.rcb-modal-loader.svelte-4wmtg7{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center}button.svelte-igat39{border:none;border-radius:3.5rem;font-size:1rem;cursor:pointer;height:3.5rem;color:#000;background-color:#dfdfdf}button.intent-primary.svelte-igat39{background-color:#000;color:#fff;font-size:1rem}footer.svelte-1f9z0o8{display:flex;flex-direction:column}.column.svelte-18njhoa{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--gap, "0.5rem")}.close-button.svelte-r1ujja{border:none;cursor:pointer;background-color:transparent}.rcb-app-icon.svelte-10u48yl{width:2.5rem;height:2.5rem;border-radius:.75rem;box-shadow:0 1px 10px #0000001a;margin-right:1rem}.rcb-app-icon-picture-container.svelte-10u48yl{height:2.5rem}.rcb-app-icon.loading.svelte-10u48yl{background-color:gray}.app-title.svelte-1tdgim9{font-weight:500;margin:.5rem 0;font-size:1rem}.rcb-header-layout__business-info.svelte-1tdgim9{display:flex;align-items:center}.rcb-post-purchase-header-layout.svelte-j03lz1{display:flex;justify-content:space-between;align-items:center;width:100%}.rcb-modal-error.svelte-ahi052{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-ahi052{font-size:24px}.subtitle.svelte-ahi052{font-size:16px}img.svelte-7khg4b{width:7.75rem;height:7.75rem;margin:0 auto}.rcb-modal-success.svelte-1lcsna9{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-1lcsna9{font-size:24px}.subtitle.svelte-1lcsna9{font-size:16px}.rcb-stripe-elements-container.svelte-1fwwzeb{width:100%;margin-bottom:1rem}.form-container.svelte-1xardyz{display:flex;flex-direction:column;width:100%}.form-label.svelte-1xardyz{margin-top:.5rem;margin-bottom:.5rem;display:block}.form-input.svelte-1xardyz{margin-bottom:1rem}.title.svelte-1xardyz{font-size:1.5rem;margin:0;margin-bottom:.5rem}input.svelte-1xardyz{width:94%;padding:.5rem;border:1px solid #ccc;border-radius:.25rem}.rcb-header-layout.svelte-1ggdgso{display:flex;justify-content:space-between;align-items:center;width:100%}.rcb-modal-backdrop.svelte-17dhulw{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#282828bf;display:flex;flex-direction:column;justify-content:space-around}.rcb-modal-main.svelte-m6kocx{box-sizing:border-box;border-radius:.5rem;background-color:#fff;color:#000;max-width:40rem;min-width:30rem;overflow-y:auto;padding:2.5rem}.rcb-modal-dark.svelte-m6kocx{background-color:#000;color:#fff;max-width:30rem;min-width:20rem}@media screen and (max-width: 60rem){.rcb-modal-main.svelte-m6kocx,.rcb-modal-dark.svelte-m6kocx{max-width:40rem;min-width:90vw}}.rcb-ui-container.svelte-ofxzf4{color-scheme:none;font-family:PP Object Sans,-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif}.rcb-ui-layout.svelte-ofxzf4{display:flex;justify-content:center;align-items:flex-start}.rcb-ui-aside.svelte-ofxzf4{margin-right:1rem}@media screen and (max-width: 60rem){.rcb-ui-layout.svelte-ofxzf4{flex-direction:column;align-items:center;justify-content:flex-end;height:100%}.rcb-ui-aside.svelte-ofxzf4{margin-right:0;margin-bottom:1rem}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.40.1"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenuecat/purchases-js",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -28,12 +28,18 @@
|
|
|
28
28
|
"lint": "eslint . --ext .ts",
|
|
29
29
|
"format": "eslint . --ext .ts --fix",
|
|
30
30
|
"test": "vitest",
|
|
31
|
+
"test:typeCheck": "tsc --project tsconfig.test.json",
|
|
31
32
|
"prettier": "prettier --write .",
|
|
32
33
|
"prettier:ci": "prettier --check .",
|
|
34
|
+
"svelte-check": "svelte-check",
|
|
33
35
|
"storybook": "storybook dev -p 6006",
|
|
34
|
-
"build-storybook": "storybook build"
|
|
36
|
+
"build-storybook": "storybook build",
|
|
37
|
+
"extract-api": "api-extractor run --local --verbose",
|
|
38
|
+
"generate-docs": "api-documenter markdown --input-folder api-report --output-folder docs"
|
|
35
39
|
},
|
|
36
40
|
"devDependencies": {
|
|
41
|
+
"@microsoft/api-documenter": "^7.23.23",
|
|
42
|
+
"@microsoft/api-extractor": "^7.40.1",
|
|
37
43
|
"@storybook/addon-essentials": "^7.5.3",
|
|
38
44
|
"@storybook/addon-interactions": "^7.5.3",
|
|
39
45
|
"@storybook/addon-links": "^7.5.3",
|
|
@@ -59,6 +65,7 @@
|
|
|
59
65
|
"react-dom": "^18.2.0",
|
|
60
66
|
"storybook": "^7.5.3",
|
|
61
67
|
"svelte": "^4.2.7",
|
|
68
|
+
"svelte-check": "^3.6.3",
|
|
62
69
|
"svelte-stripe": "^1.1.2",
|
|
63
70
|
"typescript": "^5.2.2",
|
|
64
71
|
"vite": "^5.0.0",
|