1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7807],{5196:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},17580:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},17751:(e,t,s)=>{s.d(t,{default:()=>q});var a=s(95155),r=s(75149),i=s(12115),n=s(86424),l=s(90802),o=s(41541),c=s(32911);function d(e=new URLSearchParams(window.location.search)){return{acquisition_flow_id:e.get("acquisition_flow_id")||(0,l.Ay)(),pricing_ref:e.get("ref")?.slice(0,160)||null,pricing_surface:"/pricing"===window.location.pathname?"pricing_page":"homepage_pricing",...(0,o.Qr)(e)}}function m(e){let t;try{t=crypto.randomUUID()}catch{}let s={...e,checkout_attempt_id:t};return(0,n.trackPostHogEvent)(l.nN.PRICING_PURCHASE_CLICKED,s),{id:t,properties:s}}function x(e,t){(0,n.trackPostHogEvent)(l.nN.CHECKOUT_AUTH_RESULT,{...e.properties,outcome:t})}function p(e,t,s){(0,n.trackPostHogEvent)(l.nN.CHECKOUT_REQUEST_FAILED,{...e.properties,error_type:t,http_status:s})}async function h(e,t,s){let a,r,i=Date.now();(0,n.trackPostHogEvent)(l.nN.CHECKOUT_REQUEST_STARTED,s.properties);try{a=await fetch(e,t)}catch(e){throw p(s,"network_error"),e}try{r=await a.json()}catch(e){throw p(s,"invalid_response",a.status),e}return a.ok?"string"==typeof r?.url&&r.url?(0,n.trackPostHogEvent)(l.nN.CHECKOUT_SESSION_READY,{...s.properties,http_status:a.status,request_duration_ms:Date.now()-i,checkout_session_id:"string"==typeof r.checkoutSessionId?r.checkoutSessionId:void 0}):p(s,"missing_checkout_url",a.status):p(s,r?.portal?"subscription_conflict":"http_error",a.status),{response:a,data:r}}function u(e,t){(0,n.trackPostHogEvent)(l.nN.CHECKOUT_REDIRECT_STARTED,{...e.properties,checkout_session_id:t})}function f(e,t,s){(0,i.useEffect)(()=>{let a=e.current;if(!a||!s||"undefined"==typeof IntersectionObserver)return;let r=new IntersectionObserver(e=>{for(let s of e){if(!s.isIntersecting||s.intersectionRatio<.1)continue;let e=s.target.dataset.pricingOffer;e&&t.split(",").includes(e)&&((0,n.trackPostHogEvent)(l.nN.PRICING_OFFERS_VIEWED,{...d(),offers:e}),r.unobserve(s.target))}},{threshold:.1});return a.querySelectorAll("[data-pricing-offer]").forEach(e=>r.observe(e)),()=>r.disconnect()},[s,t,e])}var g=s(95422),b=s(71539),y=s(75525);let v=(0,s(19946).A)("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);var w=s(5196),j=s(24357),N=s(14186),k=s(17580),S=s(54861),_=s(51154),A=s(81284),C=s(53904),E=s(84386),I=s(46412),P=s(97168),R=s(48151),F=s(56671),G=s(6874),V=s.n(G),U=s(55660);function T({showHeading:e=!0,simplified:t=!1,active:s=!0}){let{user:r}=(0,R.A)(),n=(0,i.useRef)(!1),c=(0,i.useRef)(null);f(c,U.RI.map(e=>`pack_${e.size}`).join(","),s);let{creditInfo:g}=(0,E.I)(),[y,v]=(0,i.useState)(null),[j,N]=(0,i.useState)(null),[k,S]=(0,i.useState)(null);(0,i.useEffect)(()=>{S((0,I.JY)())},[]);let C=(0,i.useMemo)(()=>!!g&&(0,I.av)(g.hasOnlyFreeCredits,k),[g,k]),G=U.RI;(0,i.useEffect)(()=>{let e=e=>{let t=e.target;t.closest("button")||t.closest("a")||N(null)};if(j)return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[j]),(0,i.useEffect)(()=>{if(r){let e=sessionStorage.getItem("pendingCreditPack");e&&["10","25","50"].includes(e)&&(sessionStorage.removeItem("pendingCreditPack"),setTimeout(()=>{T(e,"auto_resume")},500))}},[r]);let T=async(e,t="user")=>{if(n.current)return;n.current=!0;let s=new URLSearchParams(window.location.search),a=(0,l.hT)(s.get("acquisition_flow_id"))||(0,l.Ay)(),i=s.get("ref")||void 0,c=s.get("returnUrl")||void 0,f=m({...d(s),checkout_type:"credit_pack",checkout_selection:e,trigger:t}),g="request",b=()=>{sessionStorage.setItem("pendingCreditPack",e);let t=`${window.location.pathname}${window.location.search}`;window.location.href=`/login?returnUrl=${encodeURIComponent(t)}&intent=purchase_pack_${e}`};try{if(x(f,r?"authenticated":"login_required"),!r){g="login_redirect",b();return}v(e);let{response:t,data:n}=await h("/api/purchase-credits",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({packSize:e,userId:r.id,referral:window.Rewardful?.referral,acquisitionFlowId:a,attribution:(0,l.Cn)(),pricingRef:i,returnUrl:c,selectedResult:(0,o.Qr)(s),checkoutAttemptId:f.id})},f);if(!t.ok){if(n?.requiresAuth){x(f,"login_required"),g="login_redirect",b();return}throw Error(n?.error||"Failed to create checkout session")}if("string"!=typeof n?.url||!n.url)throw Error("Failed to start checkout. Please try again.");g="redirect",u(f,n.checkoutSessionId),window.location.href=n.url}catch(e){("login_redirect"===g||"redirect"===g)&&p(f,`${g}_error`),F.toast.error(e.message||"Failed to start checkout")}finally{n.current=!1,v(null)}};return(0,a.jsxs)("div",{ref:c,className:"w-full",children:[e&&(0,a.jsxs)("div",{className:"text-center mb-2",children:[(0,a.jsx)("h2",{className:"text-3xl font-bold text-gray-900 mb-1",children:t?"One-Time Credit Packs":"Credit Packs"}),(0,a.jsx)("p",{className:"text-gray-600 text-sm",children:t?"Pay once, use forever ⢠No subscription required ⢠Credits never expire":"For AI SVG & icon generation ⢠One-time purchase ⢠Never expire"})]}),(0,a.jsx)("div",{className:`grid ${1===G.length?"grid-cols-1 max-w-md":2===G.length?"grid-cols-1 md:grid-cols-2 max-w-4xl":"grid-cols-1 md:grid-cols-3 max-w-6xl"} gap-6 mx-auto pt-2`,children:G.map((e,s)=>(0,a.jsx)("div",{"data-pricing-offer":`pack_${e.size}`,className:"relative bg-white rounded-2xl flex flex-col h-full border border-gray-200 shadow-lg hover:shadow-xl transition-shadow",children:(0,a.jsxs)("div",{className:"px-6 pt-6 flex flex-col flex-1",children:[(0,a.jsxs)("div",{className:"text-center mb-4",children:[(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsxs)("h3",{className:"text-3xl font-bold text-gray-900 inline-flex items-center gap-0.5",children:[e.credits," Credits",(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("button",{type:"button","aria-label":`How ${e.credits} credits can be used`,"aria-expanded":j===e.size,className:"inline-flex items-center justify-center cursor-pointer",onClick:t=>{t.preventDefault(),t.stopPropagation(),N(j===e.size?null:e.size)},children:(0,a.jsx)(A.A,{className:"w-4 h-4 text-gray-400 hover:text-gray-600 transition-colors"})}),j===e.size&&(0,a.jsxs)("div",{className:`absolute bottom-full left-1/2 -translate-x-1/2 mb-1 bg-gray-900 text-white text-xs rounded z-50 ${t?"px-2.5 py-2 min-w-56":"px-2 py-1 max-w-48"}`,children:[(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 translate-y-full w-0 h-0 border-l-[4px] border-l-transparent border-r-[4px] border-r-transparent border-t-[4px] border-t-gray-900"}),t?(0,a.jsxs)("div",{className:"whitespace-normal text-left space-y-1.5",children:[(0,a.jsx)("div",{className:"font-medium text-orange-300",children:"Credit costs per generation:"}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{children:"Classic model:"}),(0,a.jsx)("span",{className:"font-medium",children:"2 credits"})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsxs)("span",{children:["Ultra model ",(0,a.jsx)("span",{className:"text-orange-300",children:"(best)"}),":"]}),(0,a.jsx)("span",{className:"font-medium",children:"4 credits"})]})]}):(0,a.jsxs)("div",{className:"whitespace-normal text-left",children:[e.icons," ",(0,a.jsx)(V(),{href:"/ai-icon-generator",className:"underline hover:text-[#FF7043] transition-colors",onClick:e=>e.stopPropagation(),children:"icons"}
1)," ","or ",e.designs," SVGs"]})]})]})]})}),(0,a.jsx)("div",{className:"text-center mb-3",children:(0,a.jsx)("div",{className:"text-[10px] font-semibold text-gray-500 uppercase tracking-wider",children:"Instant access ⢠Credits never expire ⢠One-time payment"})}),(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("div",{className:"flex items-baseline justify-center mb-1",children:(0,a.jsxs)("span",{className:"text-4xl font-bold text-gray-900",children:["$",e.displayPrice]})}),(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsxs)("span",{className:"text-sm text-gray-500",children:[e.unitPrice," per credit"]})})]})]}),(0,a.jsxs)(P.$,{className:"w-full h-10 text-sm font-semibold bg-gray-900 hover:bg-gray-800 text-white",onClick:()=>T(e.size),disabled:null!==y,children:[y===e.size?(0,a.jsx)(_.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,a.jsx)(b.A,{className:"mr-2 h-3.5 w-3.5"}),"Get ",e.credits," Credits Now"]}),(0,a.jsxs)("ul",{className:"space-y-2.5 mt-4 pb-6 flex-1",children:[(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-sm text-gray-700",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mt-0.5 text-gray-900",strokeWidth:3}),(0,a.jsx)("span",{children:t?"Generate production-ready AI SVGs from text prompts and images":"Professional SVG Generator: Create AI SVGs from text prompts, optional visual references, or prompt-guided refinements"})]}),(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-sm text-gray-700",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mt-0.5 text-gray-900",strokeWidth:3}),(0,a.jsx)("span",{children:t?"AI Editor included for prompt-based restyles and variations":"AI SVG Maker & Editor included for prompt-based restyles and variations"})]}),C&&(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-sm text-gray-700",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mt-0.5 text-gray-900",strokeWidth:3}),(0,a.jsx)("span",{children:"Access to Ultra model for better prompt accuracy"})]}),(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-sm text-gray-700",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mt-0.5 text-gray-900",strokeWidth:3}),(0,a.jsx)("span",{children:"Unlimited downloads & exports"})]}),t&&!1,(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-sm text-gray-700",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mt-0.5 text-gray-900",strokeWidth:3}),(0,a.jsx)("span",{children:"Commercial usage rights included"})]}),(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-sm text-gray-700",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mt-0.5 text-gray-900",strokeWidth:3}),(0,a.jsx)("span",{children:"Designs saved for 7 days"})]}),(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-sm text-gray-700",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 mt-0.5 text-gray-900",strokeWidth:3}),(0,a.jsx)("span",{children:t?"World's #1 AI for production-ready SVGs":"Built for production-ready SVG exports"})]})]})]})},`${e.size}-${s}`))})]})}var O=s(35695),$=s(14503),L=s(33168),M=s(99840),z=s(24026);let D=[{src:"/pricing/text-to-svg-ai.webp",alt:"AI text to SVG creating isometric creative workspace illustration",title:"Text Prompt to SVG",description:"Describe the subject, colors and style you want. SVG AI creates an editable SVG that you can refine and download with paid export access."},{src:"/pricing/image-to-svg-example.webp",alt:"AI converting portrait photo with tropical flowers into vector SVG illustration",title:"Image Upload to AI-Optimized SVG",description:"Use a logo, sketch or product photo as a reference for a new SVG. Guide its style and composition, then review the result before using it."},{src:"/pricing/image-plus-text-to-svg-ai.webp",alt:"AI creating modern crowned lion logo from sketch using text prompt",title:"Image Upload + Text Prompt to AI SVG",description:"Combine an optional image upload with a short text prompt like 'modern logo' or 'add crown' to guide the AI as it transforms your source into an on-brand SVG illustration."},{src:"/pricing/ai-edit-example.webp",alt:"AI SVG editor adding butterflies to tropical floral portrait illustration",title:"AI SVG Editor with Text Prompts",description:"Refine a generated design with prompts such as 'add butterflies,' 'brighten the palette,' or 'thicken outlines.' Compare each new version with the original before choosing your final design."}];function H({className:e,isLandingPage:t=!1}){return(0,a.jsxs)("section",{className:(0,z.cn)("max-w-6xl mx-auto",e),children:[(0,a.jsx)("h2",{className:"text-3xl font-bold text-center mb-3 text-gray-900",children:"What's Included"}),(0,a.jsx)("p",{className:"text-sm text-gray-600 text-center mb-10 max-w-3xl mx-auto",children:t?"Create SVG logos, icons, illustrations, text graphics, and reusable vector assets from prompts, optional references, and follow-up edits.":"Create SVGs from text, images, or both, then refine your generated designs with follow-up prompts. Download your chosen version for your project with paid export access."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-10",children:(t?[{src:"/pricing/text-to-svg-ai.webp",alt:"AI text to SVG creating isometric creative workspace illustration",title:"Prompt-Based SVG Creation",description:"Write a detailed prompt and SVG AI creates an editable SVG graphic you can refine and download after generation."},{src:"/pricing/image-to-svg-example.webp",alt:"Optional reference image guiding a tropical floral SVG illustration",title:"Optional Reference Image",description:"Add a sketch, brand sample, or visual reference to guide the style, subject, or composition of the SVG you create from a prompt."},{src:"/pricing/image-plus-text-to-svg-ai.webp",alt:"Optional sketch reference guiding a modern crowned lion SVG logo prompt",title:"Text and Reference Guidance",description:"Combine a reference with a short prompt like 'modern logo' or 'add crown' to guide the AI toward an on-brand
1SVG illustration."},{src:"/pricing/ai-edit-example.webp",alt:"AI SVG editor adding butterflies to tropical floral portrait illustration",title:"Refine With Text Prompts",description:"Refine a generated design with prompts such as 'add butterflies,' 'brighten the palette,' or 'thicken outlines.' Compare each new version with the original before choosing your final design."}]:D).map(e=>(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-gray-200 shadow-md p-4 sm:p-6 flex flex-col h-full",children:[(0,a.jsx)("h3",{className:"text-lg sm:text-xl font-semibold text-gray-900 mb-3",children:e.title}),(0,a.jsx)("div",{className:"mb-5 sm:mb-6 relative aspect-square overflow-hidden rounded-3xl bg-gray-100 shadow-md",children:(0,a.jsx)("img",{src:e.src,alt:e.alt,title:e.title,className:"absolute inset-0 w-full h-full object-cover",loading:"lazy"})}),(0,a.jsx)("p",{className:"text-sm sm:text-base text-gray-600 leading-relaxed flex-1",children:e.description})]},e.title))})]})}function W(e,t){let s;return null==e||e<=0?t:(s=e>=1e5?1e4*Math.floor(e/1e4):e>=1e4?5e3*Math.floor(e/5e3):e>=1e3?100*Math.floor(e/100):e>=100?10*Math.floor(e/10):e,`${s.toLocaleString("en-US")}+`)}function q({showHeader:e=!0,showPromo:t=!1,simplified:s=!1,showWhatsIncluded:R=!0,showCancelAnytime:F=!1,stats:G}){let z=W(G?.totalUsers,""),D=W(G?.weeklySvgs,""),q=parseInt("2",10),B=(0,i.useRef)(!1),J=(0,i.useRef)(null),[K,Y]=(0,i.useState)(null),[Q,Z]=(0,i.useState)(!1),[X,ee]=(0,i.useState)(!1),[et,es]=(0,i.useState)("packs"==="monthly".toLowerCase()?"packs":"monthly");f(J,"starter,pro","monthly"===et);let ea=e=>{(0,n.trackPostHogEvent)(l.nN.PRICING_TAB_SELECTED,{...d(),previous_tab:et,selected_tab:e}),es(e)},[er,ei]=(0,i.useState)(null),[en,el]=(0,i.useState)(!1),[eo,ec]=(0,i.useState)(null),[ed,em]=(0,i.useState)(!0),ex=(0,O.useRouter)(),ep=(0,L.i7)(),{creditInfo:eh}=(0,E.I)(),[eu,ef]=(0,i.useState)(null);(0,i.useEffect)(()=>{ef((0,I.JY)())},[]),(0,i.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=(0,l.hT)(e.get("acquisition_flow_id"))||(0,l.Ay)(),s=e.get("ref")||"",a=(0,c.O)(e.get("checkout_attempt_id"));a&&("true"===e.get("canceled")||"true"===e.get("cancelled"))&&(0,n.trackPostHogEvent)(l.nN.CHECKOUT_CANCEL_RETURNED,{...d(e),checkout_attempt_id:a}),(s.includes("download")||s.includes("locked")||s.includes("paid-download"))&&(0,n.trackPostHogEvent)(l.nN.PRICING_VIEWED_FROM_DASHBOARD_DOWNLOAD,{acquisition_flow_id:t,...(0,o.Qr)(e),pricing_ref:s,return_url:e.get("returnUrl")||null})},[]);let eg=(0,i.useMemo)(()=>!!eh&&(0,I.av)(eh.hasOnlyFreeCredits,eu),[eh,eu]);(0,i.useEffect)(()=>{em(!1)},[t]),(0,i.useEffect)(()=>{let e=e=>{let t=e.target;t.closest("button")||t.closest("a")||ei(null)};if(er)return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[er]);let eb=s&&!1,ey=s?{starter:[{text:"100 credits monthly",hasTooltip:!0,credits:100,designs:50,icons:100,boldNumber:!0,highlight:!0},{text:"Generate production-ready AI SVGs from text prompts and images"},{text:"AI Editor included for prompt-based restyles and variations"},...eg?[{text:"Access to Ultra model for better prompt accuracy"}]:[],{text:"Unlimited downloads & exports"},{text:"Commercial usage rights included"},...eb?[{text:"Watermark-free SVG downloads"}]:[],{text:"Designs saved for 7 days"},{text:"World's #1 AI for production-ready SVGs"},{text:"Email support included"}],pro:[{text:"350 credits monthly",hasTooltip:!0,credits:350,designs:175,icons:350,boldNumber:!0,highlight:!0},{text:"Generate production-ready AI SVGs from text prompts and images"},{text:"AI Editor included for prompt-based restyles and variations"},...eg?[{text:"Access to Ultra model for better prompt accuracy"}]:[],{text:"Unlimited downloads & exports"},{text:"Commercial usage rights included"},...eb?[{text:"Watermark-free SVG downloads"}]:[],{text:"Designs saved for 30 days"},{text:"World's #1 AI for production-ready SVGs"},{text:"Priority support included"}]}:{starter:[{text:"100 credits monthly",hasTooltip:!0,credits:100,designs:50,icons:100,boldNumber:!0,highlight:!0},{text:"Create SVGs from text prompts or optional visual references"},{text:"Refine designs with prompt-based AI edits"},{text:"Unlimited SVG downloads"},{text:"Commercial usage rights included"},{text:"Designs saved for 7 days"},{text:"Clean editable SVG files"},{text:"Email support included"}],pro:[{text:"350 credits monthly",hasTooltip:!0,credits:350,designs:175,icons:350,boldNumber:!0,highlight:!0},{text:"Create SVGs from text prompts or optional visual references"},{text:"Refine designs with prompt-based AI edits"},{text:"Unlimited SVG downloads"},{text:"Commercial usage rights included"},{text:"Designs saved for 30 days"},{text:"Clean editable SVG files"},{text:"Priority support included"}]},ev={name:"Starter",price:{monthly:19,annual:13.99},billing:{monthly:"month",annual:"mo"},yearlyPrice:168,description:"",features:ey.starter,cta:s?"Upgrade Now â":"Continue and Generate â",highlighted:!1,tier:"starter"},ew={name:"Pro",price:{monthly:39,annual:29.99},billing:{monthly:"month",annual:"mo"},yearlyPrice:360,description:"",features:ey.pro,cta:s?"Upgrade Now â":"Continue and Generate â",highlighted:!0,tier:"pro"},ej=async e=>{if("packs"===et||B.current)return;if(!e)return void ex.push("/dashboard");B.current=!0,Y(e);let t=new URLSearchParams(window.location.search),s=(0,l.hT)(t.get("acquisition_flow_id"))||(0,l.Ay)(),a=t.get("ref")||void 0,r=t.get("returnUrl")||void 0,i=m({...d(t),checkout_type:"subscription",checkout_selection:e,checkout_interval:"monthly"}),n="auth";try{let{data:{user:c},error:d}=await ep.auth.getUser();if(x(i,c?"authenticated":d&&"AuthSessionMissingError"!==d.name?"error":"login_required"),!c){n="login_redirect";let t=`${window.location.pathname}${window.location.search}`;ex.push(`/login?returnUrl=${encodeURIComponent(t)}&plan=${e}`);return}n="request";let{response:m,data:p}=await h("/api/create-checkout-session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tier:e,interval:"monthly",referral:window.Rewardful?.referral,acquisitionFlowId:s,attribution:(0,l.Cn)(),pricingRef:a,returnUrl:r,selectedResult:(0,o.Qr)(t),checkoutAttemptId:i.id})},i);if(!m.ok){if(p?.portal)return void ee(!0);(0,$.toast)({title:"Checkout Error",description:p?.error||`Failed to create checkout session (Status: ${m.status})`,variant:"destructive"});return}if("string"!=typeof p?.url||!p.url)throw Error("No checkout URL returned");n="redirect",u(i,p.checkoutSessionId),window.location.href=p.url}catch{"auth"===n&&(x(i,"error"),p(i,"auth_lookup_error")),("login_redirect"===n||"redirect"===n)&&p(i,`${n}_error`),(0,$.toast)({title:"Error",description:"Failed to start subscription process. Please try again.",variant:"destructive"})}finally{B.current=!1,Y(null)}},eN=async()=>{Z(!0);try{let e=await fetch("/api/create-portal-session",{method:"POST"}),t=await e.json();if(!e.ok)throw Error(t.error||"Failed to open billing portal");if(t.url){window.location.href=t.url;return}throw Error("No portal URL returned")}catch(e){(0,$.toast)({title:"Error",description:e instanceof Error?e.message:"Failed to open billing portal. Please try again.",variant:"destructive"}),Z(!1)}};return(0,a.jsxs)("div",{id:"pricing",className:"space-y-4",children:[e&&(0,a.jsx)("div",{className:"text-center",children:(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsxs)("h2",{className:"text-3xl md:text-4xl font-bold text-slate-900 mb-2",children:["Choose Your ",(0,a.jsx)("span",{className:"bg-gradient-to-r from-[#FF7043] to-[#FFA726] bg-clip-text text-transparent",children:"Plan"})]}),!s&&(0,a.jsx)("p",{className:"text-base text-gray-600 max-w-2xl mx-auto mb-2",children:"Use SVG AI for prompt-based SVG generation, optional visual references, and AI editing tools that help you refine and export designs."}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-4 sm:gap-6 text-xs sm:text-sm text-gray-600",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3.5 h-3.5 text-[#FF7043]",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11 4a1 1 0 10-2 0v4a1 1 0 102 0V7zm-3 1a1 1 0 10-2 0v3a1 1 0 102 0V8zM8 9a1 1 0 00-2 0v2a1 1 0 102 0V9z",clipRule:"evenodd"})}),(0,a.jsx)("span",{children:z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"font-semibold text-gray-900",children:z})," registered users"]}):"A workspace for your SVG projects"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(b.A,{className:"w-3.5 h-3.5 text-[#FF7043]"}),(0,a.jsx)("span",{children:"Refine with AI edits"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(y.A,{className:"w-3.5 h-3.5 text-blue-600"}),(0,a.jsx)("span",{children:D?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"font-semibold text-gray-900",children:D})," SVGs this week"]}):"Save and reuse designs"})]})]}),(0,a.jsx)("p",{className:"mt-2 text-[11px] leading-4 text-gray-500",children:"Registered user and weekly SVG counts are refreshed from SVG AI usage records."})]})}),(0,a.jsx)(r.M,{surface:"pricing"}),(0,a.jsx)("div",{className:"flex justify-center mb-3",children:(0,a.jsxs)("div",{className:"relative bg-gray-100 p-1 rounded-xl inline-flex",children:[(0,a.jsx)("button",{onClick:()=>ea("monthly"),className:`relative px-5 sm:px-7 py-2 rounded-lg text-sm font-semibold transition-all duration-200 ${"monthly"===et?"text-gray-900 bg-white shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Monthly",s&&
1(0,a.jsx)("span",{className:"bg-green-100 text-green-700 text-[10px] px-2 py-0.5 rounded font-bold",children:"BEST VALUE"})]})}),(0,a.jsx)("button",{onClick:()=>ea("packs"),className:`relative px-5 sm:px-7 py-2 rounded-lg text-sm font-semibold transition-all duration-200 ${"packs"===et?"text-gray-900 bg-white shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[1===U.RI.length?"One-Time Pack":"One-Time Packs","packs"!==et&&!1]})})]})}),t&&eo?.available&&eo.percentOff>0&&"monthly"===et&&eo.appliesMonthly&&(0,a.jsx)("div",{className:"max-w-[720px] mx-auto mb-6",children:(0,a.jsxs)("div",{className:`relative bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 rounded-xl shadow-2xl border border-slate-700/50 ${null!==eo.remainingRedemptions&&eo.remainingRedemptions<=5?"pt-3":""}`,children:[null!==eo.remainingRedemptions&&eo.remainingRedemptions<=5&&(0,a.jsx)("div",{className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-gradient-to-r from-red-600 to-red-700 text-white text-[10px] sm:text-[11px] font-extrabold px-3 sm:px-4 py-1 sm:py-1.5 rounded-full shadow-xl z-10 animate-pulse border-2 border-red-400 whitespace-nowrap",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"text-yellow-300",children:"â¡"}),"ONLY ",eo.remainingRedemptions," LEFT"]})}),(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-orange-500/5 via-transparent to-pink-500/5 rounded-xl pointer-events-none"}),(0,a.jsxs)("div",{className:"relative px-4 sm:px-5 py-3 sm:py-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,a.jsxs)("button",{onClick:()=>{eo?.code&&(navigator.clipboard.writeText(eo.code),el(!0),(0,$.toast)({title:"â
Code copied!",description:`Apply ${eo.code} at Stripe checkout for ${eo.percentOff}% off`}),setTimeout(()=>el(!1),3e3))},className:"group flex items-center gap-1.5 bg-slate-800/80 backdrop-blur-sm rounded-lg px-3 py-1.5 border border-slate-600/30 shadow-lg hover:bg-slate-700/80 hover:border-orange-500/50 transition-all cursor-pointer",children:[(0,a.jsx)(v,{className:"h-3.5 w-3.5 text-orange-400 group-hover:scale-110 transition-transform"}),(0,a.jsx)("span",{className:"text-xs sm:text-sm font-mono font-bold text-white tracking-wider",children:eo.code}),en?(0,a.jsx)(w.A,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(j.A,{className:"h-3 w-3 text-slate-400 group-hover:text-orange-400 transition-colors"})]})}),(0,a.jsx)("div",{className:"text-center mb-3",children:(0,a.jsx)("p",{className:"text-[10px] sm:text-xs text-slate-400",children:en?"â
Copied! Apply at checkout":"Click to copy ⢠Apply at checkout"})}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsxs)("div",{className:"inline-block relative",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-orange-500 to-pink-600 blur-lg opacity-40"}),(0,a.jsxs)("div",{className:"relative text-4xl sm:text-5xl font-black bg-gradient-to-r from-orange-400 to-pink-500 bg-clip-text text-transparent leading-none",children:[eo.percentOff,"%"]})]}),(0,a.jsx)("div",{className:"text-sm sm:text-base font-bold text-slate-200 tracking-wide",children:"OFF"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 justify-center mb-2",children:[(0,a.jsx)("div",{className:"h-px w-8 bg-gradient-to-r from-transparent to-slate-600"}),(0,a.jsx)("div",{className:"h-1 w-1 rounded-full bg-orange-400"}),(0,a.jsx)("div",{className:"h-px w-8 bg-gradient-to-l from-transparent to-slate-600"})]}),(0,a.jsx)("div",{className:"text-xs sm:text-sm font-semibold text-slate-300 mb-2",children:eo.exactPlans.length>0?eo.exactPlans.map((e,t)=>(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"text-white",children:e.tier.charAt(0).toUpperCase()+e.tier.slice(1)})," ",(0,a.jsx)("span",{className:"text-slate-400",children:e.interval.charAt(0).toUpperCase()+e.interval.slice(1)}),t<eo.exactPlans.length-1&&(0,a.jsx)("span",{className:"text-slate-500 mx-1",children:"â¢"})]},t)):(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"text-white",children:"All"})," ",(0,a.jsx)("span",{className:"text-slate-400",children:"Monthly Plans"})]})}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5 bg-slate-800/60 backdrop-blur-sm rounded-full px-3 py-1.5 border border-slate-600/40",children:[(0,a.jsx)(N.A,{className:"h-3 w-3 text-orange-400"}),(0,a.jsxs)("span",{className:"text-[10px] sm:text-xs font-semibold text-slate-200",children:["forever"===eo.duration&&"Forever discount","once"===eo.duration&&"First month discount","repeating"===eo.duration&&"Recurring discount"]})]}),"first_time"===eo.appliesTo&&(0,a.jsx)("div",{className:"mt-1.5",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[9px] sm:text-[10px] text-slate-400 bg-slate-800/40 rounded-full px-2.5 py-1 border border-slate-700/30",children:[(0,a.jsx)(k.A,{className:"h-2.5 w-2.5"}),"New customers only"]})})]})]})]})}),(0,a.jsxs)("div",{className:"flex flex-row items-center justify-center gap-3 sm:gap-4 text-xs sm:text-sm my-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 font-medium text-gray-700",children:[(0,a.jsx)(b.A,{className:"w-4 h-4 text-gray-700"}),"Instant access"]}),(0,a.jsx)("div",{className:"text-gray-400",children:"â¢"}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 font-medium text-gray-700",children:[(0,a.jsx)(y.A,{className:"w-4 h-4 text-gray-700"}
1),"Secure checkout"]}),F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"text-gray-400",children:"â¢"}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 font-medium text-gray-700",children:[(0,a.jsx)(S.A,{className:"w-4 h-4 text-gray-700"}),"Cancel anytime"]})]})]}),(s||"packs"===et)&&(0,a.jsx)("div",{className:`max-w-6xl mx-auto pb-20${s&&"packs"!==et?" hidden":""}`,"aria-hidden":s?"packs"!==et:void 0,children:(0,a.jsx)(T,{showHeading:!1,simplified:s,active:"packs"===et})}),(s||"packs"!==et)&&(0,a.jsx)("div",{ref:J,className:`grid gap-6 grid-cols-1 md:grid-cols-2 max-w-4xl mx-auto pt-6 pb-12${s&&"packs"===et?" hidden":""}`,"aria-hidden":s?"packs"===et:void 0,children:[ev,ew].map((e,t)=>{let r=e.price.monthly;return(0,a.jsxs)("div",{"data-pricing-offer":e.tier,className:`group relative rounded-2xl transition-all duration-300 ${e.highlighted?"bg-white border-[#FF7043] border-2 p-8 shadow-smooth scale-[1.02] z-10":"bg-white border border-slate-200 p-8 shadow-sm hover:border-slate-300 hover:shadow-smooth"} flex flex-col h-full`,children:["monthly"===et&&"Starter"===e.name&&(0,a.jsx)("div",{className:"absolute -top-2.5 left-1/2 -translate-x-1/2 z-10",children:(0,a.jsx)("div",{className:"bg-green-700 text-white text-[10px] font-extrabold px-3 py-1 rounded-full shadow-md uppercase tracking-wide",children:"MOST POPULAR"})}),"monthly"===et&&"Pro"===e.name&&(0,a.jsx)("div",{className:"absolute -top-2.5 left-1/2 -translate-x-1/2 z-10",children:(0,a.jsx)("div",{className:"bg-gradient-to-r from-[#FF7043] to-[#FFA726] text-white text-[10px] font-extrabold px-3 py-1 rounded-full shadow-md uppercase tracking-wide",children:"BEST VALUE"})}),(0,a.jsx)("div",{className:"text-center mb-4",children:(0,a.jsx)("h3",{className:"text-2xl font-bold text-slate-900",children:e.name})}),(0,a.jsxs)("div",{className:"text-center mb-4",children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-center",children:[(0,a.jsxs)("span",{className:"text-5xl font-bold text-slate-900",children:["$",s?Math.round(r):r.toFixed(2)]}),(0,a.jsx)("span",{className:"text-base text-slate-600 font-normal ml-1",children:"/mo"})]}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsxs)("span",{className:"text-sm text-gray-500",children:["$",(r/e.features[0].credits).toFixed(2)," per credit"]})})]}),(0,a.jsx)("div",{className:"mb-5",children:(0,a.jsx)("button",{disabled:null!==K,className:`w-full rounded-lg font-bold transition-all py-3.5 text-base relative ${e.highlighted?"bg-gradient-to-r from-[#FF7043] to-[#FFA726] hover:from-[#FF5722] hover:to-[#FF7043] text-white shadow-md hover:shadow-lg":"bg-slate-900 hover:bg-slate-800 text-white"} ${null!==K&&"opacity-50 cursor-not-allowed"}`,onClick:()=>ej(e.tier),children:K===e.tier?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)(_.A,{className:"h-5 w-5 animate-spin"}),"Loading..."]}):e.cta})}),(0,a.jsxs)("ul",{className:"space-y-3 mb-6 flex-1",children:[(0,a.jsxs)("li",{className:`flex ${s?"items-center":"items-start"} gap-2.5 text-base text-gray-900`,children:[(0,a.jsx)(w.A,{className:`w-5 h-5 flex-shrink-0 ${s?"":"mt-0.5"} ${e.highlighted?"text-[#FF7043]":"text-gray-900"}`,strokeWidth:2.5}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"font-bold flex items-center gap-1",children:[e.features[0].credits," credits monthly",(0,a.jsxs)("div",{className:"relative inline-block",children:[(0,a.jsx)("button",{type:"button",className:"inline-flex items-center justify-center cursor-pointer","aria-label":`How ${e.name} plan credits can be used`,"aria-expanded":er===`plan-${e.tier}`,onClick:t=>{t.preventDefault(),t.stopPropagation(),ei(er===`plan-${e.tier}`?null:`plan-${e.tier}`)},children:(0,a.jsx)(A.A,{className:"w-4 h-4 text-gray-400 hover:text-gray-600 transition-colors"})}),er===`plan-${e.tier}`&&(0,a.jsxs)("div",{className:`absolute bottom-full left-1/2 -translate-x-1/2 mb-1 bg-gray-900 text-white text-xs rounded z-50 ${s?"px-2.5 py-2 min-w-56":"px-2 py-1 max-w-48"}`,children:[(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 translate-y-full w-0 h-0 border-l-[4px] border-l-transparent border-r-[4px] border-r-transparent border-t-[4px] border-t-gray-900"}),s?(0,a.jsxs)("div",{className:"whitespace-normal text-left space-y-1.5",children:[(0,a.jsx)("div",{className:"font-medium text-orange-300",children:"Credit costs per generation:"}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{children:"Classic model:"}),(0,a.jsx)("span",{className:"font-medium",children:"2 credits"})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsxs)("span",{children:["Ultra model ",(0,a.jsx)("span",{className:"text-orange-300",children:"(best)"}),":"]}),(0,a.jsx)("span",{className:"font-medium",children:"4 credits"})]})]}):(0,a.jsxs)("div",{className:"whitespace-normal text-left",children:[e.features[0].icons," ",(0,a.jsx)(V(),{href:"/ai-icon-generator",className:"underline hover:text-[#FF7043] transition-colors",onClick:e=>e.stopPropagation(),children:"icons"})," ","or ",e.features[0].designs," SVGs"]})]})]})]}),!s&&(0,a.jsxs)("div",{className:"space-y-0.5 text-sm text-gray-500",children:[(0,a.jsx)("div",{children:"Credit use depends on your selected generation option."}),q>0&&(0,a.jsx)("div",{children:"Sign up to get starter credits."})]})]})]}),e.features.slice(1).map((t,s)=>(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-base text-gray-900",children:[(0,a.jsx)(w.A,{className:`w-5 h-5 flex-shrink-0 mt-0.5 ${e.highlighted?"text-[#FF7043]":"text-gray-900"}`,strokeWidth:2.5}),(0,a.jsx)("span",{children:t.text})]},s))]})]},`${e.name}-${et}-${t}`)})}),s&&R&&(0,a.jsx)(H,{className:"mt-40 lg:mt-48"}),!s&&(0,a.jsxs)("div",{className:"mt-16 mb-8",children:[(0,a.jsx)("h3",{className:"text-2xl font-bold text-center mb-8",children:(0,a.jsx)("span",{className:"text-slate-900",children:"What makes our SVGs different?"})}),(0,a.jsxs)("div",{className:"grid md:grid-cols-3 gap-8 max-w-5xl mx-auto",children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-[#FF7043] to-[#FFA726] flex items-center justify-center mx-auto mb-4",children:(0,a.jsx)(w.A,{className:"w-8 h-8 text-white",strokeWidth:3})}),(0,a.jsx)("h4",{className:"font-bold text-lg text-slate-900 mb-2",children:"Real Vector Paths"}),(0,a.jsx)("p",{className:"text-slate-600 text-sm",children:"SVG files with editable vector paths you can inspect and refine"})]}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-[#FFA726] to-[#FFB74D] flex items-center justify-center mx-auto mb-4",children:(0,a.jsx)(w.A,{className:"w-8 h-8 text-white",strokeWidth:3})}),(0,a.jsx)("h4",{className:"font-bold text-lg text-slate-900 mb-2",children:"Plain-language prompts"}),(0,a.jsx)("p",{className:"text-slate-600 text-sm",children:"Describe the subject, style and details you want"})]}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-green-500 flex items-center justify-center mx-auto mb-4",children:(0,a.jsx)(w.A,{className:"w-8 h-8 text-white",strokeWidth:3})}),(0,a.jsx)("h4",{className:"font-bold text-lg text-slate-900 mb-2",children:"For Your Workflow"}),(0,a.jsx)("p",{className:"text-slate-600 text-sm",children:"Download an SVG and check it in your website, app or design tool"})]})]}),(0,a.jsxs)("div",{className:"text-center mt-8",children:[(0,a.jsx)("p",{className:"text-gray-600 mb-2",children:"Need a custom plan for your enterprise?"}),(0,a.jsxs)("p",{className:"text-sm text-gray-500",children:["Email us at: ",(0,a.jsx)(g.default,{})]})]})]}),(0,a.jsx)(M.lG,{open:X,onOpenChange:ee,children:(0,a.jsxs)(M.Cf,{className:"sm:max-w-[420px] max-sm:fixed max-sm:bottom-0 max-sm:left-0 max-sm:right-0 max-sm:top-auto max-sm:w-full max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-2xl max-sm:max-h-[85dvh] max-sm:pb-[max(1rem,env(safe-area-inset-bottom))] max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=open]:slide-in-from-left-0 max-sm:data-[state=closed]:slide-out-to-left-0 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100",children:[(0,a.jsxs)(M.c7,{children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-orange-50 flex items-center justify-center mb-2",children:(0,a.jsx)(C.A,{className:"h-5 w-5 text-[#FF7043]"})}),(0,a.jsx)(M.L3,{className:"text-lg",children:"Change plans"}),(0,a.jsx)(M.rr,{className:"text-sm text-gray-500",children:"To switch plans or renew credits, first cancel your current plan in Stripe. Click below to open Stripe."})]}
1),(0,a.jsx)("div",{className:"space-y-4 mt-2",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(P.$,{className:"w-full h-12 sm:h-10 bg-[#FF7043] hover:bg-[#F4511E] text-white text-sm",onClick:eN,disabled:Q,children:Q?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Opening Stripe..."]}):"Manage subscription"}),(0,a.jsx)(P.$,{variant:"ghost",className:"w-full h-10 text-sm text-gray-500",onClick:()=>ee(!1),children:"Stay on pricing"})]})})]})})]})}},24357:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},32911:(e,t,s)=>{s.d(t,{O:()=>r});let a=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function r(e){return"string"==typeof e&&a.test(e)?e:void 0}},32919:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},35695:(e,t,s)=>{var a=s(18999);s.o(a,"useParams")&&s.d(t,{useParams:function(){return a.useParams}}),s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},41541:(e,t,s)=>{s.d(t,{Qr:()=>n,fV:()=>l});let a=["selected_model","selected_design_id","selected_variation_id","experiment_id","experiment_variant"],r=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function i(e){if(!e||"object"!=typeof e||Array.isArray(e))return{};let t={};for(let s of a){let a=e[s];"string"==typeof a&&"experiment_id"!==s&&"experiment_variant"!==s&&("selected_model"===s?["classic","ultra","old-ultra"].includes(a):r.test(a))&&(t[s]=a)}return"one_free_export_v1"===e.experiment_id&&["control","treatment"].includes(String(e.experiment_variant))&&(t.experiment_id="one_free_export_v1",t.experiment_variant=String(e.experiment_variant)),t}function n(e){return i(Object.fromEntries(a.map(t=>[t,e.get(t)])))}function l(e){return i({selected_model:e?.model,selected_design_id:e?.designId,selected_variation_id:e?.variationId,experiment_id:e?.experimentId,experiment_variant:e?.experimentVariant})}},46412:(e,t,s)=>{s.d(t,{JY:()=>l,av:()=>c,hq:()=>o,jy:()=>n,uR:()=>i});var a=s(87358);let r=new Set(["US","CA","GB","DE","FR","NL","BE","CH","AT","IE","LU","NO","SE","DK","FI","IS","ES","IT","PL","CZ","HU","RO","LT","GR","IL","AE","ZA","SG","JP","KR","HK","AU","NZ","BR"]);function i(e){return!e||r.has(e.toUpperCase())}function n(e){let t="false";if(void 0!==t&&"false"===t.toLowerCase())return!1;if(i(e)){let e="false";return void 0===e||"false"!==e.toLowerCase()}let s=a.env.NEXT_PUBLIC_SHARE_BONUS_TIER2_ENABLED;return void 0===s||""===s||"false"!==s.toLowerCase()&&"0"!==s}function l(){if("undefined"==typeof document)return null;let e=document.cookie.split("; ").find(e=>e.startsWith("svgai_country="));return e&&e.split("=")[1]?.toUpperCase()||null}function o(e){return i(e)?"allow_then_redirect":"allow_then_redirect"}function c(e,t){return!!e&&!i(t)&&!0}},51154:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},53311:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},53904:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},54416:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},54861:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},71539:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},75149:(e,t,s)=>{s.d(t,{M:()=>l});var a=s(95155),r=s(12115),i=s(32911);let n=[["expected_free","I expected it to be free"],["price_or_subscription","Too expensive / didnât want a subscription"],["payment_method_unavailable","I couldnât use the available payment methods"],["payment_problem","Payment failed or the form didnât work"],["not_ready","Just comparing / not ready"],["other","Something else"]];function l({surface:e}){let[t,s]=(0,r.useState)(null),[l,o]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1),[m,x]=(0,r.useState)(!1),[p,h]=(0,r.useState)("");if((0,r.useEffect)(()=>{let t=!0,a=new URLSearchParams(window.location.search),r=(0,i.O)(a.get("checkout_attempt_id")),n=!!(r&&("true"===a.get("canceled")||"true"===a.get("cancelled")));if("pricing"===e&&(!n||"/pricing"!==window.location.pathname))return;let l=n?`?attemptId=${r}&returned=1`:"";return(async()=>{try{let e=await fetch(`/api/checkout-feedback${l}`,{cache:"no-store"}),a=await e.json();if(!t||!a.candidate?.attemptId)return;let r=await fetch("/api/checkout-feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"claim",attemptId:a.candidate.attemptId,returned:n})}),i=await r.json();t&&i.claimed&&s(a.candidate.attemptId)}catch{}})(),()=>{t=!1}},[e]),!t)return null;let u=async e=>{if(!l){o(!0),x(!1);try{if(!(await fetch("/api/checkout-feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"answer",attemptId:t,reason:e})})).ok)throw Error("feedback_unavailable");d(!0)}catch{x(!0)}finally{o(!1)}}};return(0,a.jsxs)("section",{"aria-label":"Optional checkout feedback",className:"mx-auto my-4 max-w-2xl rounded-xl border border-slate-200 bg-white p-4 text-left text-slate-900 shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsx)("p",{className:"font-semibold",children:c?"Thanks for your feedback.":"What stopped you from completing your purchase?"}),(0,a.jsx)("button",{type:"button",onClick:()=>s(null),className:"shrink-0 rounded px-2 py-1 text-sm text-slate-600 hover:bg-slate-100",children:c?"Close":"Skip"})]}),!c&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:"Optional â choose the main reason."}),(0,a.jsxs)("form",{className:"mt-3 flex flex-col gap-2 sm:flex-row",onSubmit:e=>{e.preventDefault(),p&&u(p)},children:[(0,a.jsxs)("select",{"aria-label":"Main reason for leaving checkout",value:p,onChange:e=>h(e.target.value),disabled:l,className:"min-h-11 min-w-0 flex-1 rounded-lg border border-slate-300 bg-white px-3 text-sm",children:[(0,a.jsx)("option",{value:"",disabled:!0,children:"Choose a reason"}),n.map(([e,t])=>(0,a.jsx)("option",{value:e,children:t},e))]}),(0,a.jsx)("button",{type:"submit",disabled:!p||l,className:"min-h-11 rounded-lg bg-slate-900 px-4 py-2 text-sm text-white disabled:opacity-50",children:l?"Savingâ¦":"Send feedback"})]}),m&&(0,a.jsx)("p",{role:"alert",className:"mt-2 text-sm text-red-700",children:"Couldnât save your answer. Please try again."})]})]})}},81284:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(19946).A)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},95422:(e,t,s)=>{s.d(t,{default:()=>r});var a=s(95155);function r({email:e="[email protected]",className:t="text-gray-700",children:s}){return(0,a.jsx)("span",{className:t,children:s||e})}},99840:(e,t,s)=>{s.d(t,{Cf:()=>x,Es:()=>h,HM:()=>d,L3:()=>u,LC:()=>m,ZJ:()=>c,c7:()=>p,lG:()=>o,rr:()=>f});var a=s(95155),r=s(12115),i=s(15452),n=s(54416),l=s(24026);let o=i.bL;i.l9;let c=i.ZL,d=i.bm,m=r.forwardRef(({className:e,...t},s)=>(0,a.jsx)(i.hJ,{ref:s,className:(0,l.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));m.displayName=i.hJ.displayName;let x=r.forwardRef(({className:e,children:t,...s},r)=>(0,a.jsxs)(c,{children:[(0,a.jsx)(m,{}),(0,a.jsxs)(i.UC,{ref:r,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-4 sm:p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg max-h-[calc(100vh-2rem)] overflow-y-auto",e),...s,children:[t,(0,a.jsxs)(i.bm,{className:"absolute right-2 top-2 sm:right-4 sm:top-4 roun
1ded-md opacity-70 ring-offset-background transition-all hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground p-1.5 hover:bg-gray-100",children:[(0,a.jsx)(n.A,{className:"h-4 w-4 sm:h-5 sm:w-5"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));x.displayName=i.UC.displayName;let p=({className:e,...t})=>(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});p.displayName="DialogHeader";let h=({className:e,...t})=>(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});h.displayName="DialogFooter";let u=r.forwardRef(({className:e,...t},s)=>(0,a.jsx)(i.hE,{ref:s,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));u.displayName=i.hE.displayName;let f=r.forwardRef(({className:e,...t},s)=>(0,a.jsx)(i.VY,{ref:s,className:(0,l.cn)("text-sm text-muted-foreground",e),...t}));f.displayName=i.VY.displayName}}]);
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.