1import{n as e,o as t,t as n}from"./compiler-runtime-CxJlRefv.js";import{t as r}from"./link-Cr0ReKW9.js";import{t as i}from"./jsx-runtime-BtYHw8OE.js";import{t as a}from"./useMutation-DBzv6aT9.js";import{t as o}from"./clsx-CjueKrWZ.js";import{t as s}from"./useTranslation-BGFFv2D7.js";import{t as c}from"./createLucideIcon-DdCAXDWJ.js";import{t as l}from"./check-C5xbuCo1.js";import{t as u}from"./circle-alert-KFeAy1aH.js";import{t as d}from"./external-link-BIwOwnix.js";import{t as f}from"./x-DQKM0TiX.js";import{i as p,t as m}from"./src-Menhjtdi.js";import{i as h,t as g}from"./dist-CXeOHZvm.js";import{t as _}from"./use-client-store-CXMj6hcB.js";import{n as v,t as y}from"./dialog-DbTFw4ID.js";import{t as b}from"./modal-DPzerwxw.js";import{t as x}from"./form-CHN_sNn7.js";import{t as S}from"./close-DHUk1jbq.js";import{t as C}from"./button-xXmUckzW.js";import{n as w}from"./dist-Dq8V9qTt.js";import{t as T}from"./use-permissions-C3wUlGKJ.js";var E=o(`flex items-center gap-1.5 px-3 py-2`,`text-primary text-sm font-medium whitespace-nowrap`,`transition-[color,opacity] duration-100`,`hover:opacity-60`,`focus:outline-none focus-visible:underline focus-visible:underline-offset-4`),D=o(`text-secondary font-mono text-xs tracking-[0.18em] uppercase`),O=c(`alarm-clock`,[[`circle`,{cx:`12`,cy:`13`,r:`8`,key:`3y4lt7`}],[`path`,{d:`M12 9v4l2 2`,key:`1c63tq`}],[`path`,{d:`M5 3 2 6`,key:`18tl5t`}],[`path`,{d:`m22 6-3-3`,key:`1opdir`}],[`path`,{d:`M6.38 18.7 4 21`,key:`17xu3x`}],[`path`,{d:`M17.64 18.67 20 21`,key:`kv2oe2`}]]),k=n(),A=i();function j(e){let t=(0,k.c)(7),{visible:n,onAuthenticated:r,onDismiss:i,continueTo:a}=e,o;t[0]!==a||t[1]!==r||t[2]!==i?(o=(0,A.jsx)(x,{onSuccess:r,onClose:i,continueTo:a}),t[0]=a,t[1]=r,t[2]=i,t[3]=o):o=t[3];let s;return t[4]!==o||t[5]!==n?(s=(0,A.jsx)(b,{visible:n,onCancel:M,fullscreenOnMobile:!0,className:`flex flex-col justify-center sm:w-110`,children:o}),t[4]=o,t[5]=n,t[6]=s):s=t[6],s}function M(){}function N(e){let t=(0,k.c)(25),{item:n,onClose:r}=e,{t:i}=s(),a=n!==null,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,A.jsx)(`div`,{className:`absolute inset-0 bg-black/85 backdrop-blur-sm`,"aria-hidden":!0}),t[0]=o):o=t[0];let c;t[1]===n?c=t[2]:(c=n&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`img`,{src:n.src,alt:n.alt??``,className:`max-h-[82vh] max-w-[92vw] rounded-md object-contain shadow-[0_24px_60px_-15px_rgba(0,0,0,0.6)]`}),(n.caption||n.meta)&&(0,A.jsxs)(`div`,{className:`text-center`,children:[n.caption&&(0,A.jsx)(`div`,{className:`font-mono text-xs tracking-[0.18em] text-white/85 uppercase`,children:n.caption}),n.meta&&(0,A.jsx)(`div`,{className:`mt-1 text-xs text-white/55`,children:n.meta})]})]}),t[1]=n,t[2]=c);let l;t[3]!==n||t[4]!==i?(l=n?.src&&(0,A.jsx)(`a`,{href:n.src,target:`_blank`,rel:`noreferrer`,className:`text-white/85 hover:text-white inline-flex size-9 items-center justify-center rounded-full bg-black/50 backdrop-blur-sm transition-colors`,title:i(`media.openOriginal`),"aria-label":i(`media.openOriginal`),children:(0,A.jsx)(d,{className:`size-4`})}),t[3]=n,t[4]=i,t[5]=l):l=t[5];let u;t[6]===i?u=t[7]:(u=i(`button.close`),t[6]=i,t[7]=u);let p;t[8]===i?p=t[9]:(p=i(`media.closeImage`),t[8]=i,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,A.jsx)(f,{className:`size-5`}),t[10]=m):m=t[10];let h;t[11]!==r||t[12]!==u||t[13]!==p?(h=(0,A.jsx)(`button`,{type:`button`,onClick:r,className:`text-white/85 hover:text-white inline-flex size-9 items-center justify-center rounded-full bg-black/50 backdrop-blur-sm transition-colors`,title:u,"aria-label":p,children:m}),t[11]=r,t[12]=u,t[13]=p,t[14]=h):h=t[14];let g;t[15]!==l||t[16]!==h?(g=(0,A.jsxs)(`div`,{className:`absolute top-2 right-2 flex gap-2`,children:[l,h]}),t[15]=l,t[16]=h,t[17]=g):g=t[17];let _;t[18]!==c||t[19]!==g?(_=(0,A.jsxs)(v,{className:`relative flex max-h-[92vh] max-w-[92vw] flex-col items-center gap-3 outline-none`,children:[c,g]}),t[18]=c,t[19]=g,t[20]=_):_=t[20];let b;return t[21]!==r||t[22]!==a||t[23]!==_?(b=(0,A.jsxs)(y,{transition:!0,open:a,onClose:r,className:`fixed inset-0 z-50 flex items-center justify-center transition duration-200 ease-out data-closed:opacity-0`,children:[o,_]}),t[21]=r,t[22]=a,t[23]=_,t[24]=b):b=t[24],b}var P={id:`login_for_credit`,name:`Login for Credit`};function F(){let e=(0,k.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={promotion_id:P.id,promotion_name:P.name,creative_slot:`modal`,creative_name:`v1_login_for_credit`},e[0]=t):t=e[0];let n=g(`view_promotion`,t),r;return e[1]===n?r=e[2]:(r=(0,A.jsx)(`div`,{ref:n}),e[1]=n,e[2]=r),r}function I(e){let t=(0,k.c)(59),{visible:n,onCancel:r,onLogin:i}=e,{t:a}=s(),o,c,l,d,f,p,m,g,_,v,y,x;if(t[0]!==r||t[1]!==i||t[2]!==a||t[3]!==n){let e=a(`loginForCredit.features`,{returnObjects:!0}),s;t[16]===i?s=t[17]:(s=()=>{h(`select_promotion`,{promotion_id:P.id,promotion_name:P.name}),i()},t[16]=i,t[17]=s),c=s,o=b,p=n,m=R,g=`relative w-full max-w-100 shrink-0 px-6 pt-12 pb-6`,t[18]===n?_=t[19]:(_=n&&(0,A.jsx)(F,{}),t[18]=n,t[19]=_),t[20]===r?v=t[21]:(v=(0,A.jsx)(S,{size:`sm`,className:`absolute top-3 right-3`,onClick:r}),t[20]=r,t[21]=v),t[22]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,A.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,A.jsx)(`div`,{className:`bg-accent-500/10 flex size-12 items-center justify-center rounded-xl`,children:(0,A.jsx)(O,{className:`text-accent-500 size-5`})})}),t[22]=y):y=t[22];let C;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,A.jsx)(u,{size:16,className:`shrink-0 text-red-500`}),t[23]=C):C=t[23];let w;t[24]===a?w=t[25]:(w=a(`loginForCredit.badge`),t[24]=a,t[25]=w),t[26]===w?x=t[27]:(x=(0,A.jsx)(`div`,{className:`mt-4 flex items-center justify-center`,children:(0,A.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-full bg-red-50 py-2 pr-3 pl-2`,children:[C,(0,A.jsx)(`span`,{className:`text-xs font-semibold tracking-wide text-red-500`,children:w})]})}),t[26]=w,t[27]=x);let T;t[28]===a?T=t[29]:(T=a(`loginForCredit.title`),t[28]=a,t[29]=T);let E;t[30]===T?E=t[31]:(E=(0,A.jsx)(`h2`,{className:`text-primary text-center text-2xl font-semibold`,children:T}),t[30]=T,t[31]=E);let D;t[32]===a?D=t[33]:(D=a(`loginForCredit.description`),t[32]=a,t[33]=D);let k;t[34]===D?k=t[35]:(k=(0,A.jsx)(`p`,{className:`text-secondary text-md mt-2 text-center`,children:D}),t[34]=D,t[35]=k),t[36]!==E||t[37]!==k?(d=(0,A.jsxs)(`div`,{className:`mt-3 flex flex-col items-center`,children:[E,k]}),t[36]=E,t[37]=k,t[38]=d):d=t[38],l=`bg-accent-500/5 mt-6 flex flex-col gap-3 rounded-xl px-5 py-4`,f=e.map(L),t[0]=r,t[1]=i,t[2]=a,t[3]=n,t[4]=o,t[5]=c,t[6]=l,t[7]=d,t[8]=f,t[9]=p,t[10]=m,t[11]=g,t[12]=_,t[13]=v,t[14]=y,t[15]=x}else o=t[4],c=t[5],l=t[6],d=t[7],f=t[8],p=t[9],m=t[10],g=t[11],_=t[12],v=t[13],y=t[14],x=t[15];let w;t[39]!==l||t[40]!==f?(w=(0,A.jsx)(`div`,{className:l,children:f}),t[39]=l,t[40]=f,t[41]=w):w=t[41];let T;t[42]===a?T=t[43]:(T=a(`loginForCredit.button`),t[42]=a,t[43]=T);let E;t[44]!==c||t[45]!==T?(E=(0,A.jsx)(C,{size:`lg`,variant:`accent`,className:`mt-6 w-full font-semibold`,onClick:c,children:T}),t[44]=c,t[45]=T,t[46]=E):E=t[46];let D;return t[47]!==o||t[48]!==d||t[49]!==w||t[50]!==E||t[51]!==p||t[52]!==m||t[53]!==g||t[54]!==_||t[55]!==v||t[56]!==y||t[57]!==x?(D=(0,A.jsxs)(o,{visible:p,onCancel:m,className:g,children:[_,v,y,x,d,w,E]}),t[47]=o,t[48]=d,t[49]=w,t[50]=E,t[51]=p,t[52]=m,t[53]=g,t[54]=_,t[55]=v,t[56]=y,t[57]=x,t[58]=D):D=t[58],D}function L(e){return(0,A.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,A.jsx)(`div`,{className:`bg-accent-400 size-5 rounded-full p-1`,children:(0,A.jsx)(l,{size:12,className:`text-white`,strokeWidth:3})}),(0,A.jsx)(`span`,{className:`text-primary text-sm font-medium`,children:e})]},e)}function R(){}var ee={credits:4,ctaHref:`/sign-in`},z=[{id:`dropin`,no:`01`,pricing:{monthly:{price:28,credits:15,productId:`ai.vestaro.subscription.monthly.dropin`},yearly:{price:280,credits:180,productId:`ai.vestaro.subscription.yearly.dropin`}}},{id:`pass`,no:`02`,popular:!0,pricing:{monthly:{price:58,credits:50,productId:`ai.vestaro.subscription.monthly.pass`},yearly:{price:580,credits:600,productId:`ai.vestaro.subscription.yearly.pass`}}},{id:`member`,no:`03`,pricing:{monthly:{price:128,credits:150,productId:`ai.vestaro.subscription.monthly.member`},yearly:{price:1280,credits:1800,productId:`ai.vestaro.subscription.yearly.member`}}}],te={id:`brokerage`,no:`04`};function B(){let e=(0,k.c)(7),{t}=s(`studio`),n=J(),r;e[0]===n?r=e[1]:(r=async e=>{let{productId:t}=e;await n.requestAuth({continueTo:`/payment/continue/${t}`});let r=(await m.checkout.createSession({productId:t,successUrl:`${window.location.origin}/payment/success?session_id={CHECKOUT_SESSION_ID}`,cancelUrl:window.location.href})).url;if(!r)throw Error(`Checkout URL missing`);window.location.href=r},e[0]=n,e[1]=r);let i;e[2]===t?i=e[3]:(i=e=>{e instanceof oe||w.error(t(`toast.checkoutFailed`))},e[2]=t,e[3]=i);let o;return e[4]!==r||e[5]!==i?(o={mutationFn:r,onError:i},e[4]=r,e[5]=i,e[6]=o):o=e[6],a(o)}var V=t(e(),1);function ne(e){let t=(0,k.c)(49),{visible:n,promotion:i,onCancel:a}=e,{t:o}=s(`pricing`),[c,l]=(0,V.useState)(`monthly`),{plan:u}=T(),d=B(),f=i?.id,p;t[0]!==u||t[1]!==f?(p=H(f,u),t[0]=u,t[1]=f,t[2]=p):p=t[2];let m=p,h=d.isPending?d.variables?.productId:null,g;t[3]===a?g=t[4]:(g=(0,A.jsx)(S,{className:`absolute top-4 right-4`,onClick:a}),t[3]=a,t[4]=g);let _;t[5]===o?_=t[6]:(_=o(`modal.upgradeEyebrow`),t[5]=o,t[6]=_);let v;t[7]===_?v=t[8]:(v=(0,A.jsx)(`p`,{className:D,children:_}),t[7]=_,t[8]=v);let y;t[9]===o?y=t[10]:(y=o(`modal.title`),t[9]=o,t[10]=y);let x;t[11]===y?x=t[12]:(x=(0,A.jsx)(`h2`,{className:`text-primary mt-2 font-serif text-3xl italic`,children:y}),t[11]=y,t[12]=x);let C;t[13]!==v||t[14]!==x?(C=(0,A.jsxs)(`div`,{children:[v,x]}),t[13]=v,t[14]=x,t[15]=C):C=t[15];let w;t[16]===c?w=t[17]:(w=(0,A.jsx)(W,{value:c,onChange:l}),t[16]=c,t[17]=w);let E;t[18]!==C||t[19]!==w?(E=(0,A.jsxs)(`div`,{className:`mb-8 flex items-end justify-between`,children:[C,w]}),t[18]=C,t[19]=w,t[20]=E):E=t[20];let O;
1t[21]!==h||t[22]!==d||t[23]!==c||t[24]!==m?(O=z.map(e=>(0,A.jsx)(ie,{tier:e,interval:c,highlighted:m===re(e.id),busy:h===e.pricing[c].productId,onChoose:()=>d.mutate({productId:e.pricing[c].productId})},e.id)),t[21]=h,t[22]=d,t[23]=c,t[24]=m,t[25]=O):O=t[25];let j;t[26]===O?j=t[27]:(j=(0,A.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-3`,children:O}),t[26]=O,t[27]=j);let M;t[28]===o?M=t[29]:(M=o(`modal.lookingForApi`),t[28]=o,t[29]=M);let N;t[30]===M?N=t[31]:(N=(0,A.jsx)(`p`,{className:`text-secondary text-sm`,children:M}),t[30]=M,t[31]=N);let P;t[32]===o?P=t[33]:(P=o(`modal.viewAllPlans`),t[32]=o,t[33]=P);let F;t[34]!==a||t[35]!==P?(F=(0,A.jsx)(r,{to:`/plans`,onClick:a,className:`text-primary text-sm underline decoration-dotted underline-offset-2 hover:opacity-80`,children:P}),t[34]=a,t[35]=P,t[36]=F):F=t[36];let I;t[37]!==N||t[38]!==F?(I=(0,A.jsxs)(`div`,{className:`border-border mt-8 flex items-center justify-between border-t pt-6`,children:[N,F]}),t[37]=N,t[38]=F,t[39]=I):I=t[39];let L;t[40]!==E||t[41]!==j||t[42]!==I||t[43]!==g?(L=(0,A.jsxs)(`div`,{className:`relative px-6 pt-10 pb-8 md:px-10 md:pt-12 md:pb-10`,children:[g,E,j,I]}),t[40]=E,t[41]=j,t[42]=I,t[43]=g,t[44]=L):L=t[44];let R;return t[45]!==a||t[46]!==L||t[47]!==n?(R=(0,A.jsx)(b,{visible:n,onCancel:a,className:`w-full max-w-5xl`,fullScreenOnTablet:!0,children:L}),t[45]=a,t[46]=L,t[47]=n,t[48]=R):R=t[48],R}function re(e){return e===`dropin`?p.DROP_IN:e===`pass`?p.PASS:p.MEMBER}function H(e,t){return e?.includes(`download`)||e?.includes(`watermark`)?p.DROP_IN:e?.includes(`restage`)||e?.includes(`edit`)?p.PASS:e?.includes(`team`)||e?.includes(`api`)?p.MEMBER:t===null||t===p.DROP_IN?p.PASS:(p.PASS,p.MEMBER)}function ie(e){let t=(0,k.c)(63),{tier:n,interval:r,highlighted:i,busy:a,onChoose:c}=e,{t:l}=s(`pricing`),u=n.pricing[r],d;t[0]!==u.price||t[1]!==r?(d=r===`yearly`?Math.round(u.price/12):u.price,t[0]=u.price,t[1]=r,t[2]=d):d=t[2];let f=d,p;t[3]!==r||t[4]!==l?(p=l(r===`yearly`?`modal.cadenceYearly`:`modal.cadenceMonthly`),t[3]=r,t[4]=l,t[5]=p):p=t[5];let m=p,h;t[6]!==u.credits||t[7]!==r||t[8]!==l?(h=l(r===`yearly`?`modal.rendersPerYear`:`modal.rendersPerMonth`,{count:u.credits}),t[6]=u.credits,t[7]=r,t[8]=l,t[9]=h):h=t[9];let g=h,_,v,y,b,x,S;if(t[10]!==m||t[11]!==f||t[12]!==i||t[13]!==g||t[14]!==l||t[15]!==n.id){let e=l(`tiers.${n.id}`,{returnObjects:!0}),{name:r,who:a}=e;_=r;let s=e.bullets.slice(0,4),c=i?`border-accent bg-accent/5`:`border-border`;
1t[22]===c?b=t[23]:(b=o(`flex h-full flex-col gap-4 rounded-2xl border p-5`,c),t[22]=c,t[23]=b);let u;t[24]!==i||t[25]!==l?(u=i&&(0,A.jsx)(`span`,{className:`text-accent text-xs font-medium uppercase tracking-wider`,children:l(`modal.recommended`)}),t[24]=i,t[25]=l,t[26]=u):u=t[26],x=(0,A.jsxs)(`header`,{children:[(0,A.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,A.jsx)(`h3`,{className:`text-primary font-serif text-xl italic`,children:_}),u]}),(0,A.jsx)(`p`,{className:`text-secondary mt-1 text-xs`,children:a})]});let d;t[27]===l?d=t[28]:(d=l(`modal.usd`),t[27]=l,t[28]=d);let p;t[29]===d?p=t[30]:(p=(0,A.jsx)(`span`,{className:`text-secondary ml-1.5 align-baseline font-mono text-xs uppercase`,children:d}),t[29]=d,t[30]=p);let h;t[31]!==f||t[32]!==p?(h=(0,A.jsxs)(`p`,{className:`text-primary font-serif text-3xl leading-none italic`,children:[`$`,f,p]}),t[31]=f,t[32]=p,t[33]=h):h=t[33];let C;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(C=o(D,`mt-1.5`),t[34]=C):C=t[34];let w;t[35]===m?w=t[36]:(w=(0,A.jsx)(`p`,{className:C,children:m}),t[35]=m,t[36]=w);let T;t[37]===g?T=t[38]:(T=(0,A.jsx)(`p`,{className:`text-secondary mt-2 text-xs`,children:g}),t[37]=g,t[38]=T),t[39]!==h||t[40]!==w||t[41]!==T?(S=(0,A.jsxs)(`div`,{children:[h,w,T]}),t[39]=h,t[40]=w,t[41]=T,t[42]=S):S=t[42],v=`text-ink space-y-1 text-xs`,y=s.map(U),t[10]=m,t[11]=f,t[12]=i,t[13]=g,t[14]=l,t[15]=n.id,t[16]=_,t[17]=v,t[18]=y,t[19]=b,t[20]=x,t[21]=S}else _=t[16],v=t[17],y=t[18],b=t[19],x=t[20],S=t[21];let C;t[43]!==v||t[44]!==y?(C=(0,A.jsx)(`ul`,{className:v,children:y}),t[43]=v,t[44]=y,t[45]=C):C=t[45];let w=i?`bg-ink text-primary-reverse`:`border-border text-primary border hover:opacity-80`,T;t[46]===w?T=t[47]:(T=o(`mt-auto rounded-full px-4 py-2 text-sm font-medium transition-opacity duration-200 disabled:opacity-50`,w),t[46]=w,t[47]=T);let E;t[48]!==a||t[49]!==_||t[50]!==l?(E=a?l(`modal.opening`):l(`modal.choose`,{name:_}),t[48]=a,t[49]=_,t[50]=l,t[51]=E):E=t[51];let O;t[52]!==a||t[53]!==c||t[54]!==T||t[55]!==E?(O=(0,A.jsx)(`button`,{type:`button`,disabled:a,onClick:c,className:T,children:E}),t[52]=a,t[53]=c,t[54]=T,t[55]=E,t[56]=O):O=t[56];let j;return t[57]!==O||t[58]!==b||t[59]!==x||t[60]!==S||t[61]!==C?(j=(0,A.jsxs)(`article`,{className:b,children:[x,S,C,O]}),t[57]=O,t[58]=b,t[59]=x,t[60]=S,t[61]=C,t[62]=j):j=t[62],j}function U(e){return(0,A.jsxs)(`li`,{className:`flex gap-1.5`,children:[(0,A.jsx)(`span`,{className:`text-secondary`,children:`·`}),(0,A.jsx)(`span`,{children:e})]},e)}function W(e){let t=(0,k.c)(5),{value:n,onChange:r}=e,{t:i}=s(`pricing`),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[`monthly`,`yearly`],t[0]=a):a=t[0];let c;return t[1]!==r||t[2]!==i||t[3]!==n?(c=(0,A.jsx)(`div`,{className:`border-border inline-flex items-center rounded-full border p-1`,children:a.map(e=>(0,A.jsx)(`button`,{type:`button`,onClick:()=>r(e),className:o(`rounded-full px-3.5 py-1 text-xs font-medium transition-colors duration-200`,n===e?`bg-ink text-primary-reverse`:`text-secondary hover:text-primary`),children:i(e===`monthly`?`modal.intervalMonthly`:`modal.intervalYearly`)},e))}),t[1]=r,t[2]=i,t[3]=n,t[4]=c):c=t[4],c}var G=[{productId:`ai.vestaro.credit.15`,credits:15,caption:`Quick top-up`,blurb:`Cover a single listing in one go.`},{productId:`ai.vestaro.credit.50`,credits:50,caption:`A few listings`,blurb:`Standard refill for a working week.`,featured:!0},{productId:`ai.vestaro.credit.500`,credits:500,caption:`Volume`,blurb:`For a busy month or a team push.`},{productId:`ai.vestaro.credit.1000`,credits:1e3,caption:`Studio`,blurb:`For photographers running batch workloads.`}];function ae(e){let t=(0,k.c)(23),{visible:n,onCancel:r}=e,i=B(),a=_(K),o=i.isPending?i.variables?.productId:null,s;t[0]===r?s=t[1]:(s=(0,A.jsx)(S,{className:`absolute top-4 right-4`,onClick:r}),t[0]=r,t[1]=s);let c,l,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,A.jsx)(`p`,{className:D,children:`Top up credits`}),l=(0,A.jsx)(`h2`,{className:`text-primary mt-2 font-serif text-3xl italic`,children:`You're out of credits.`}),u=(0,A.jsx)(`p`,{className:`text-secondary mt-3 text-md`,children:`Pick a pack to keep going. Top-up credits never expire, and your plan credits roll over every cycle while your subscription is active.`}),t[2]=c,t[3]=l,t[4]=u):(c=t[2],l=t[3],u=t[4]);let d;t[5]===a?d=t[6]:(d=typeof a==`number`&&(0,A.jsxs)(`p`,{className:`text-secondary mt-2 text-sm italic`,children:[`Current balance · `,a,` `,a===1?`credit`:`credits`]}),t[5]=a,t[6]=d);let f;t[7]===d?f=t[8]:(f=(0,A.jsxs)(`div`,{className:`max-w-xl`,children:[c,l,u,d]}),t[7]=d,t[8]=f);let p;t[9]!==o||t[10]!==i?(p=G.map(e=>(0,A.jsx)(q,{pack:e,busy:o===e.productId,disabled:i.isPending&&o!==e.productId,onChoose:()=>i.mutate({productId:e.productId})},e.productId)),t[9]=o,t[10]=i,t[11]=p):p=t[11];let m;t[12]===p?m=t[13]:(m=(0,A.jsx)(`div`,{className:`mt-8 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4`,children:p}),t[12]=p,t[13]=m);let h;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,A.jsx)(`p`,{className:`text-secondary mt-6 text-xs italic`,children:`Billed once via Stripe. Final price is shown on the checkout page.`}),t[14]=h):h=t[14];let g;t[15]!==s||t[16]!==f||t[17]!==m?(g=(0,A.jsxs)(`div`,{className:`relative px-6 pt-10 pb-8 md:px-10 md:pt-12 md:pb-10`,children:[s,f,m,h]}),t[15]=s,t[16]=f,t[17]=m,t[18]=g):g=t[18];let v;return t[19]!==r||t[20]!==g||t[21]!==n?(v=(0,A.jsx)(b,{visible:n,onCancel:r,className:`w-full max-w-4xl`,fullScreenOnTablet:!0,children:g}),t[19]=r,t[20]=g,t[21]=n,t[22]=v):v=t[22],v}function K(e){return e.balance?.balance}function q(e){let t=(0,k.c)(30),{pack:n,busy:r,disabled:i,onChoose:a}=e,s=n.featured?`border-accent bg-accent/5`:`border-border`,c;
1t[0]===s?c=t[1]:(c=o(`flex h-full flex-col gap-4 rounded-2xl border p-5`,s),t[0]=s,t[1]=c);let l;t[2]===n.caption?l=t[3]:(l=(0,A.jsx)(`h3`,{className:`text-primary font-serif text-xl italic`,children:n.caption}),t[2]=n.caption,t[3]=l);let u;t[4]===n.featured?u=t[5]:(u=n.featured&&(0,A.jsx)(`span`,{className:`text-accent font-mono text-xs tracking-[0.18em] uppercase`,children:`Popular`}),t[4]=n.featured,t[5]=u);let d;t[6]!==l||t[7]!==u?(d=(0,A.jsxs)(`header`,{className:`flex items-baseline justify-between`,children:[l,u]}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,A.jsx)(`span`,{className:`text-secondary ml-1.5 align-baseline font-mono text-xs uppercase`,children:`credits`}),t[9]=f):f=t[9];let p;t[10]===n.credits?p=t[11]:(p=(0,A.jsxs)(`p`,{className:`text-primary font-serif text-4xl leading-none italic`,children:[n.credits,f]}),t[10]=n.credits,t[11]=p);let m;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,A.jsx)(`p`,{className:o(D,`mt-1.5`),children:`Never expires`}),t[12]=m):m=t[12];let h;t[13]===p?h=t[14]:(h=(0,A.jsxs)(`div`,{children:[p,m]}),t[13]=p,t[14]=h);let g;t[15]===n.blurb?g=t[16]:(g=(0,A.jsx)(`p`,{className:`text-ink text-xs`,children:n.blurb}),t[15]=n.blurb,t[16]=g);let _=r||i,v=n.featured?`bg-ink text-primary-reverse`:`border-border text-primary border hover:opacity-80`,y;t[17]===v?y=t[18]:(y=o(`mt-auto rounded-full px-4 py-2 text-sm font-medium transition-opacity duration-200 disabled:opacity-50`,v),t[17]=v,t[18]=y);let b=r?`Openingâ¦`:`Buy`,x;t[19]!==a||t[20]!==_||t[21]!==y||t[22]!==b?(x=(0,A.jsx)(`button`,{type:`button`,disabled:_,onClick:a,className:y,children:b}),t[19]=a,t[20]=_,t[21]=y,t[22]=b,t[23]=x):x=t[23];let S;return t[24]!==g||t[25]!==x||t[26]!==c||t[27]!==d||t[28]!==h?(S=(0,A.jsxs)(`article`,{className:c,children:[d,h,g,x]}),t[24]=g,t[25]=x,t[26]=c,t[27]=d,t[28]=h,t[29]=S):S=t[29],S}var oe=class extends Error{code=`LOGIN_CANCELLED`;constructor(){super(`LOGIN_CANCELLED`),this.name=`AuthCancelledError`}},se=(0,V.createContext)(void 0);function J(){let e=(0,V.useContext)(se);if(!e)throw Error(`useModal must be used within a GlobalModalProvider`);return e}function ce(e){let t=(0,k.c)(48),{children:n}=e,[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(!1),[l,u]=(0,V.useState)(void 0),[d,f]=(0,V.useState)(null),p=(0,V.useRef)(null),m=_(pe),h=_(fe),g=_(de),v=_(ue),y=_(le),b=!!g&&!v,x=b&&y!==`FREE`,S=b&&y===`FREE`,C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>{let t=p.current;p.current=null,t&&(e===`resolve`?t.resolve():t.reject(new oe))},t[0]=C):C=t[0];let w=C,T,E,D,O;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>c(!0),E=()=>{w(`resolve`),c(!1)},D=e=>{let t=_.getState();if(t.user&&!t.isAnonymous)return Promise.resolve();if(e?.continueTo&&u(e.continueTo),p.current)return p.current.promise;let n,r,i=new Promise((e,t)=>{n=e,r=t});return p.current={promise:i,resolve:n,reject:r},c(!0),i},O=e=>{o(e??null),i(!0)},t[1]=T,t[2]=E,t[3]=D,t[4]=O):(T=t[1],E=t[2],D=t[3],O=t[4]);let M,P;t[5]===h?(M=t[6],P=t[7]):(M=()=>h(!0),P=()=>h(!1),t[5]=h,t[6]=M,t[7]=P);let F,L;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>f(e),L=()=>f(null),t[8]=F,t[9]=L):(F=t[8],L=t[9]);let R;t[10]!==M||t[11]!==P?(R={showAuth:T,hideAuth:E,requestAuth:D,showPricingTable:O,showTopup:M,hideTopup:P,showLightbox:F,hideLightbox:L},t[10]=M,t[11]=P,t[12]=R):R=t[12];let ee=R,z;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>{i(!1),o(null)},t[13]=z):z=t[13];let te=z,B;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(B=()=>{w(`resolve`),c(!1),u(void 0)},t[14]=B):B=t[14];let re=B,H;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>{w(`reject`),c(!1),u(void 0)},t[15]=H):H=t[15];let ie=H,U=r||m&&S,W;t[16]===h?W=t[17]:(W=()=>{te(),h(!1)},t[16]=h,t[17]=W);let G;t[18]!==a||t[19]!==U||t[20]!==W?(G=(0,A.jsx)(ne,{visible:U,promotion:a,onCancel:W}),t[18]=a,t[19]=U,t[20]=W,t[21]=G):G=t[21];let K=m&&x,q;t[22]===h?q=t[23]:(q=()=>h(!1),t[22]=h,t[23]=q);let J;t[24]!==K||t[25]!==q?(J=(0,A.jsx)(ae,{visible:K,onCancel:q}),t[24]=K,t[25]=q,t[26]=J):J=t[26];let ce=m&&!b,Y,X;t[27]===h?(Y=t[28],X=t[29]):(Y=()=>h(!1),X=()=>{h(!1),c(!0)},t[27]=h,t[28]=Y,t[29]=X);let Z;t[30]!==ce||t[31]!==Y||t[32]!==X?(Z=(0,A.jsx)(I,{visible:ce,onCancel:Y,onLogin:X}),t[30]=ce,t[31]=Y,t[32]=X,t[33]=Z):Z=t[33];let Q;t[34]!==s||t[35]!==l?(Q=(0,A.jsx)(j,{visible:s,continueTo:l,onAuthenticated:re,onDismiss:ie}),t[34]=s,t[35]=l,t[36]=Q):Q=t[36];let me;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(me=()=>f(null),t[37]=me):me=t[37];let $;t[38]===d?$=t[39]:($=(0,A.jsx)(N,{item:d,onClose:me}),t[38]=d,t[39]=$);let he;return t[40]!==n||t[41]!==G||t[42]!==J||t[43]!==Z||t[44]!==Q||t[45]!==$||t[46]!==ee?(he=(0,A.jsxs)(se,{value:ee,children:[n,G,J,Z,Q,$]}),t[40]=n,t[41]=G,t[42]=J,t[43]=Z,t[44]=Q,t[45]=$,t[46]=ee,t[47]=he):he=t[47],he}function le(e){return e.permission?.tier??`FREE`}function ue(e){return e.isAnonymous}function de(e){return e.user}function fe(e){return e.setTopupOpen}function pe(e){return e.topupOpen}export{te as a,E as c,B as i,D as l,ce as n,ee as o,J as r,z as s,oe as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.