1import{B as I,aU as O,a7 as Y,aS as G,G as H,n as v,o as r,p as b,P as L,Q as S,m as p,a8 as W,h as U,D,Y as q,T as K,d as m,t as u,v as X,k as $,u as J,e,K as g,f as k,l as P,F as A,r as Q,g as C,U as B,O as Z,j as _,a5 as ee,aV as T,aW as te,aX as se}from"#entry";import{_ as ae}from"./DtxMtNyo.js";import{A as ne}from"./H6WxckKn.js";var oe=I({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(n){const i=n,s=O(),{forwardRef:a,currentElement:t}=Y();return s.contentId||=G(void 0,"reka-dialog-content"),H(()=>{s.triggerElement.value=t.value}),(l,f)=>(r(),v(p(W),S(i,{ref:p(a),type:l.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":p(s).open.value||!1,"aria-controls":p(s).open.value?p(s).contentId:void 0,"data-state":p(s).open.value?"open":"closed",onClick:p(s).onOpenToggle}),{default:b(()=>[L(l.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),re=oe;/** 2 * @license lucide-vue-next v0.542.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const F=U("gem",[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]]);/** 7 * @license lucide-vue-next v0.542.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const le=U("hand-coins",[["path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17",key:"geh8rc"}],["path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"1fto5m"}],["path",{d:"m2 16 6 6",key:"1pfhp9"}],["circle",{cx:"16",cy:"9",r:"2.9",key:"1n0dlu"}],["circle",{cx:"6",cy:"5",r:"3",key:"151irh"}]]);/** 12 * @license lucide-vue-next v0.542.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const ie=U("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/** 17 * @license lucide-vue-next v0.542.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const ce=U("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),ue=I({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(n){const i=n;return(s,a)=>(r(),v(p(re),S({"data-slot":"dialog-trigger"},i),{default:b(()=>[L(s.$slots,"default")]),_:3},16))}}),de={class:"tabular-nums transition-all duration-300"},pe={__name:"AnimatedNumber",props:{value:{type:Number,required:!0},duration:{type:Number,default:200}},setup(n){const i=n,s=D(i.value);let a=null;return q(()=>i.value,t=>{a&&cancelAnimationFrame(a);const l=performance.now(),f=s.value,x=t,h=w=>{const j=w-l,M=Math.min(j/i.duration,1);s.value=Math.round(f+(x-f)*M),M<1?a=requestAnimationFrame(h):s.value=x};a=requestAnimationFrame(h)}),K(()=>{a&&cancelAnimationFrame(a)}),(t,l)=>(r(),m("span",de,u(p(s)),1))}},me=X("/img/beanie-upgrade.webm"),ge={class:"flex flex-col sm:flex-row p-2"},fe={class:"group relative sm:w-2/5 w-auto sm:min-h-128 sm:min-h-auto py-3 px-2 flex flex-col justify-between"},ye={class:"bg-violet-200/20 rounded-xl px-3 py-4 pt-8 m-3"},_e={class:"text-md font-mono text-center text-violet-600/60"},ve={class:"space-y-3 mb-3 py-4 px-4"},xe={class:"text-gray-800/30"},he={class:"text-violet-500/30 bg-violet-500/5 text-xs rounded px-1.5 py-0.5 ml-auto"},be={key:0,class:"text-gray-700 text-xs ml-2"},ke={class:"sr-only"},we={class:"mb-3 mt-auto"},$e={class:"flex space-x-2 mb-1 justify-between w-full rounded-lg px-2"},Ae={class:"flex flex-row items-center gap-1 p-1"},Ce={class:"flex items-center space-x-1"}
21,De={class:"text-3xl font-bold text-violet-800 bg-violet-200/40 rounded-lg px-2.5 py-1.5 -ml-2 -mt-1"},Me={class:"text-gray-600 text-xs break-all"},Pe={class:"flex flex-col items-center space-x-3 gap-2 pt-2 w-32"},Te={key:2},Ie={class:"text-violet-600 text-center my-4 text-sm"},Ue="8wMeYJekC42WdDWbII",je=I({__name:"PricingCard",props:{title:{default:""},leftTitle:{default:""},features:{default:()=>[]},soonFeatures:{default:()=>[]},buttonText:{default:""},monthlyPrice:{default:12},yearlyPrice:{default:79},embed:{type:Boolean,default:!1}},setup(n){const i=$(()=>_().isLoggedIn),s=$(()=>_().user?.plan==="premium"),a=n,t=D(!0),{t:l}=J(),f=D([{title:l("pricing.features.fullAccess"),description:l("pricing.featuresDescription.fullAccess"),icon:F},{title:l("pricing.features.fairValueAccess"),description:l("pricing.featuresDescription.fairValueAccess"),icon:le},{title:l("pricing.features.requestReview"),description:l("pricing.featuresDescription.requestReview"),icon:ie},{title:l("pricing.features.community"),description:l("pricing.featuresDescription.community"),icon:ce,soon:!0}]),x=$(()=>{const o=a.monthlyPrice,c=a.yearlyPrice,y=o*12-c;return Math.round(y/(o*12)*100)}),h=()=>{t.value=!t.value},w={premium:{monthly:"https://buy.stripe.com/3cI14o5sTeAe42p5j7fAc00",yearly:"https://buy.stripe.com/cNi28saNdcs62YlfXLfAc01"}},j=$(()=>{const o=_(),c=o.user?.email,y=o.user?._id;return`https://billing.stripe.com/p/login/${Ue}?prefilled_email=${c}&client_reference_id=${y}`}),M=$(()=>_().user?.plan);function E(){const o=_(),c=o.user?._id,y=o.user?.email;return M.value!=="free"?j.value:`${w.premium[t.value?"yearly":"monthly"]}?client_reference_id=${c}&locked_prefilled_email=${y}`}function R(o){try{if(typeof T=="function"){const c=_();T("upgrade",{props:{plan:"premium",period:o?"yearly":"monthly",userId:c.user?._id,currentUrl:window?.location?.href,referrer:document?.referrer}})}}catch(c){console.error("Error tracking upgrade:",c)}}const V=()=>{console.log("Upgrading to: premium",t?"yearly":"monthly"),R(t.value),ee(E(),{external:!0})};return(o,c)=>{const y=pe,N=Z,z=ae;return r(),m("div",{class:g(["rounded-3xl overflow-hidden",n.embed?"bg-gray-50":"bg-transparent"])},[e("div",ge,[e("div",fe,[e("div",{class:g(["absolute inset-0 transition-all duration-100 ease-in-out z-3 rounded-2xl",n.embed?"bg-violet-700/5":"bg-transparent"])},null,2),e("div",ye,[k(p(F),{class:"w-5 h-5 text-violet-400 mx-auto -mt-10 mb-2"}),e("h2",_e,u(n.leftTitle),1)]),c[0]||(c[0]=e("div",{class:"flex flex-col items-center justify-center relative z-10 mt-auto"},[e("video",{src:me,class:"w-full h-auto max-w-54",autoplay:"",loop:"",muted:"",playsinline:""})],-1))]),e("div",{class:g(["sm:w-3/5 w-full px-5 py-3 flex flex-col",n.embed?"bg-transparent":"rounded-3xl pt-4 bg-gray-50"])},[e("div",{class:g(["flex items-center space-x-2",n.embed?"mt-4":"mt-1 text-center"])},[e("h2",{class:g(["font-semibold",n.embed?"text-black text-2xl mx-auto sm:mx-0 mb-4 sm:mb-0":"text-violet-600 text-xl my-1"])},u(n.title),3)],2),e("div",ve,[(r(!0),m(A,null,Q(f.value,d=>(r(),m("div",{key:d.title,class:g(d.soon?"flex items-center space-x-3 text-gray-950/40":"flex items-center space-x-3 text-gray-950")},[d.soon?(r(),m(A,{key:0},[e("span",xe,[d.icon?(r(),v(B(d.icon),{key:0,class:"inline w-5 h-5 text-gray-400/40 mr-2"})):P("",!0),C(" "+u(d.title),1)]),e("span",he,u(o.$t("pricing.soon")),1)],64)):(r(),m(A,{key:1},[e("span",null,[d.icon?(r(),v(B(d.icon),{key:0,class:"inline w-5 h-5 text-violet-600 mr-2"})):P("",!0),C(" "+u(d.title),1)]),d.description?(r(),m("span",be,[e("span",ke,u(d.description),1)])):P("",!0)],64))],2))),128))]),e("div",we,[e("div",$e,[e("div",Ae,[e("div",Ce,[e("span",De,[c[1]||(c[1]=C(" $",-1)),k(y,{value:t.value?n.yearlyPrice:n.monthlyPrice},null,8,["value"])])]),e("span",Me,[t.value?(r(),m(A,{key:0},[C(u(o.$t("pricing.perYear")),1)],64)):(r(),m(A,{key:1},[C(u(o.$t("pricing.perMonth")),1)],64))])]),e("div",Pe,[e("button",{onClick:h,class:g(["group relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer self-end",t.value?"bg-violet-700 hover:bg-violet-800":"bg-gray-600/30 hover:bg-gray-600/40"])},[e("span",{class:g(["inline-block h-4 w-4 transform rounded-full bg-white transition-transform",t.value?"translate-x-6":"translate-x-1"])},null,2)],2),e("div",{class:g(["text-sm px-2 py-1 font-medium self-end rounded-lg",t.value?"text-violet-600 bg-violet-500/10":"text-gray-500/30 bg-gray-500/5"])},u(x.value)+"% "+u(o.$t("pricing.off")),3)])])]),i.value&&!s.value?(r(),v(N,{key:0,onClick:V,class:"group w-full bg-violet-600 text-white hover:bg-violet-500 text-lg py-6 rounded-lg transition-all mt-auto cursor-pointer"},{default:b(()=>[e("div",null,u(o.$t("pricing.subscribeNow",{plan:"Premium"})),1),k(p(ne),{class:"w-4 h-4 group-hover:translate-x-1 transition-all duration-200 ease-in-out"})]),_:1})):!i.value&&!s.value?(r(),v(z,{key:1,size:"full"})):i.value&&s.value?(r(),m("div",Te,[e("p",Ie,u(o.$t("pricing.alreadySubscribed")),1)])):P("",!0)],2)])],2)}}}),Le=Object.assign(je,{__name:"PricingCard"}),Ne=I({__name:"UpgradeModal",setup(n){const i=D(!1),s=D(!1);return q(i,a=>{if(!(!a||s.value))try{if(typeof T=="function"){const t=_();T("showUpgrade",{props:{userId:t.user?._id,currentUrl:window?.location?.href,referrer:document?.referrer}}),s.value=!0}}catch(t){console.error("[UpgradeModal] Error tracking showUpgrade:",t)}}),(a,t)=>{const l=ue,f=Le,x=te,h=se;return r(),v(h,{open:i.value,"onUpdate:open":t[0]||(t[0]=w=>i.value=w)},{default:b(()=>[k(l,null,{default:b(()=>[L(a.$slots,"default")]),_:3}),k(x,{class:"max-w-6xl sm:min-w-[600px] h-full sm:h-auto p-0 bg-transparent roun
21ded-3xl overflow-hidden border-0"},{default:b(()=>[k(f,{title:a.$t("upgradeModal.title"),"left-title":a.$t("upgradeModal.leftTitle"),embed:!0},null,8,["title","left-title"])]),_:1})]),_:3},8,["open"])}}}),qe=Object.assign(Ne,{__name:"UpgradeModal"});export{re as D,F as G,le as H,ie as S,Le as _,pe as a,qe as b};
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.