PageSourceSearch

https://snappyit.ai/assets/index-sTtar84i.js

js snappyit.ai collected 2026-09-24 09:51:50 UTC 9,734 bytes, 1 lines download raw bytes

1import{D as e,u as a,E as s,j as t,I as l,J as o,P as r,r as c,c as i,K as n,a7 as u,O as p,F as d,a1 as m,$ as v,a0 as f,a3 as y,o as b,V as k,W as h,Y as g,M as _}from"./vue-vendor-Bw9FB4GB.js";import{_ as w,H as x,G as P,c as $,J as I,d as S,K as F,t as C,E as j}from"./index-CsrWnaU6.js";import{u as E}from"./useDevice-CG4K0oq9.js";import{l as M}from"./index-BQlCnue0.js";import{u as B}from"./i18n-BHrxWlsI.js";import"./auth0-1J-6ldl2.js";import"./utils-C7MzJQS2.js";const D={key:0,class:"flex-row items-center section_4"},R={class:"ml-8 font text"},O={key:1,class:"flex-row items-center section_4-mobile"},T={class:"ml-8-mobile font-mobile text-mobile"},q=w({__name:"error",props:{message:{type:String,default:"We are unable to authenticate your payment method. Please choose a different payment"}},setup(c){const{isPC:i}=E();return(n,u)=>{const p=P;return a(i)?(s(),e("div",D,[t(p,{class:"image_3",color:"#ff5b5e"},{default:o(()=>[t(a(x))]),_:1}),l("span",R,r(c.message),1)])):(s(),e("div",O,[t(p,{class:"image_3-mobile",color:"#ff5b5e"},{default:o(()=>[t(a(x))]),_:1}),l("span",T,r(c.message),1)]))}}},[["__scopeId","data-v-a1fcbacc"]]),A={class:"flex-col shrink-0 self-start group"},J={class:"flex-col justify-start group_1"},W={class:"flex-row items-center row-gap-sm"},K=["src"],L={class:"flex-col group_2"},U={class:"plan-title"},V={class:"flex-row items-baseline line-row"},z={class:"text_4"},G={class:"font_2"},H={class:"flex-row items-baseline line-row"},N={class:"font text_5"},Y={class:"font_2"},X={class:"flex-row items-center group_3 line-row"},Z={class:"font_2 text_7"},Q={class:"text_6"},ee={class:"flex-col group_4"},ae=["src"],se={class:"font"},te={class:"font_3 desc"},le=w({__name:"info",props:{planInfo:{type:Object,default:()=>({})}},setup(o,{expose:f}){const y=v(),{t:b}=B(),k=o,h=c({loading:!0,loadingClass:"loadingClass",class:"my-item"}),g=i(()=>k.planInfo.oldPrice&&k.planInfo.price?(parseFloat(k.planInfo.oldPrice.replace("$",""))-parseFloat(k.planInfo.price.replace("$",""))).toFixed(1):"0.0"),_=i(()=>[{icon:$("Snappyit-13"),title:b("checkout.order.cancelAnytimeTitle"),description:b("checkout.order.cancelAnytimeDesc")},{icon:$("Snappyit-14"),title:b("checkout.order.fairTitle"),description:b("checkout.order.fairDesc")},{icon:$("Snappyit-15"),title:b("checkout.order.securePaymentsTitle"),description:b("checkout.order.securePaymentsDesc")}]),w=i(()=>"Pack"===k.planInfo.title?b("checkout.order.creditsPack"):b("checkout.order.subscription")),x=i(()=>"Pack"===k.planInfo.title?b("checkout.order.credits",{credits:k.planInfo.credits}):b("checkout.order.creditsPerMonth",{credits:k.planInfo.credits})),P=()=>{y.push("/pricing")};return f({hideSkeleton:()=>{h.value.loading=!1}}),(c,i)=>{const v=u("skeleton-item"),f=u("skeleton");return n((s(),e("div",A,[l("div",J,[l("div",W,[n(t(a(I),{class:"arrow-icon",onClick:P},null,512),[[v]]),n(l("img",{class:"image_3",src:c.$cdn("logo-icon")}
1,null,8,K),[[v]])])]),l("div",L,[n((s(),e("h2",U,[p(r(w.value),1)])),[[v]]),l("div",V,[n((s(),e("span",z,[p(r(x.value),1)])),[[v]]),n((s(),e("span",G,[p(r(o.planInfo.oldPrice),1)])),[[v]])]),l("div",H,[n((s(),e("span",N,[p(r(c.$t("checkout.order.discount")),1)])),[[v]]),n((s(),e("span",Y,[p("-$"+r(g.value),1)])),[[v]])]),l("div",X,[n((s(),e("span",Z,[p(r(c.$t("checkout.order.total")),1)])),[[v]]),n((s(),e("span",Q,[p(r(o.planInfo.price),1)])),[[v]])])]),l("div",ee,[(s(!0),e(d,null,m(_.value,(a,t)=>(s(),e("div",{key:t,class:"feature-grid"},[n(l("img",{class:"image_5",src:a.icon},null,8,ae),[[v]]),n((s(),e("span",se,[p(r(a.title)+" :",1)])),[[v]]),n((s(),e("span",te,[p(r(a.description),1)])),[[v]])]))),128))])])),[[f,h.value,void 0,{animated:!0}]])}}},[["__scopeId","data-v-b99703b1"]]),oe={key:0,class:"checkout-container"},re={class:"subscription-info"},ce={class:"payment-form"},ie={class:"error-alert"},ne={class:"form-title"},ue={class:"form-group"},pe=["disabled"],de={key:0},me={key:1},ve={class:"terms"},fe={class:"powered-by"},ye={href:"https://stripe.com",target:"_blank",rel:"noopener"},be={key:1,class:"checkout-container-mobile"},ke={class:"card-wrapper-mobile"},he={class:"payment-form-mobile"},ge={class:"error-alert-mobile"},_e={class:"form-title-mobile"},we={class:"form-group-mobile"},xe=["disabled"],Pe={key:0},$e={key:1,style:{display:"flex","align-items":"center","justify-content":"center",gap:"1.9324vw"}},Ie={class:"terms-mobile"},Se={class:"powered-by-mobile"},Fe={href:"https://stripe.com",target:"_blank",rel:"noopener"},Ce={class:"price-bar-content-mobile"},je={key:0,class:"price-details-mobile"},Ee={class:"price-detail-item-mobile"},Me={class:"detail-label-mobile"},Be={class:"detail-value-mobile"},De={class:"price-detail-item-mobile second-item-mobile"},Re={class:"detail-label-mobile"},Oe={class:"detail-value-mobile"},Te={class:"price-left-mobile"},qe={class:"price-label-mobile"},Ae={class:"price-value-mobile"},Je=w({__name:"index",setup(o){const{isPC:n}=E(),{t:u}=B(),d=f(),m=v(),w=i(()=>S()),x=d.query.clientSecret,P=JSON.parse(d.query.planInfo),$=(d.query.subscriptionId,c("")),I=c(!1),D=c(!1),R=c(null),O=c(null),T=c(null),A=c(null);c(!1);const J=c(null),W=c(!1),K=i(()=>P.oldPrice&&P.price?(parseFloat(P.oldPrice.replace("$",""))-parseFloat(P.price.replace("$",""))).toFixed(1):"0.0"),L=()=>{W.value=!W.value};y(()=>{J.value&&(clearInterval(J.value),J.value=null)}),b(async()=>{try{R.value=await M("pk_live_51SJ7vmB2SdYRbjiHVi8FVE1uioccazDnPGXI6FaEmvRbaWd6xe41NuO9TuDnRky1sKzOqR7FcgcWsU6cvEx5MZn600x9I61ogl"),O.value=R.value.elements({clientSecret:x,appearance:{theme:"stripe",variables:{colorPrimary:"#4F4
16E5",colorBackground:"#ffffff",colorText:"#1a1a1a",colorDanger:"#DC2626",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',spacingUnit:"4px",borderRadius:"8px"}}});const e=O.value.create("payment",{layout:{type:"accordion",defaultCollapsed:!1,radios:!0,spacedAccordionItems:!1}});e.mount(T.value),e.on("ready",()=>{D.value=!0,A.value&&A.value.hideSkeleton()}),e.on("change",e=>{e.error&&($.value=e.error.message)})}catch(e){console.error("Failed to load Stripe:",e),$.value=u("checkout.error.defaultMessage")}});const U=async()=>{if(D.value){I.value=!0,$.value="";try{if(!x)throw new Error(u("checkout.error.defaultMessage"));if(!R.value||!O.value)throw new Error(u("checkout.error.defaultMessage"));const{error:e,paymentIntent:a}=await R.value.confirmPayment({elements:O.value,confirmParams:{return_url:`${window.location.origin}/pricing`},redirect:"if_required"});e?($.value=e.message,console.error("Payment error:",e)):a&&"succeeded"===a.status&&(F(w.value,"purchase_v2"),C("subscription",{level:P.title.toLowerCase(),price:P.price}),j.success("Pack"===P.title?u("checkout.toast.purchaseSuccess"):u("checkout.toast.subscriptionSuccess")),await new Promise(e=>setTimeout(e,1e3)),m.push("/pricing"))}catch(e){console.error("Payment error:",e),$.value=e.message||u("checkout.error.defaultMessage")}finally{I.value=!1}}};return(o,c)=>a(n)?(s(),e("div",oe,[l("div",re,[t(le,{planInfo:a(P),ref_key:"orderCardRef",ref:A},null,8,["planInfo"])]),l("div",ce,[l("div",ie,[""!==$.value?(s(),k(q,{key:0,message:$.value},null,8,["message"])):h("",!0)]),l("h2",ne,r(o.$t("checkout.payment.title")),1),l("form",{onSubmit:g(U,["prevent"])},[l("div",ue,[l("div",{ref_key:"paymentElement",ref:T,class:"payment-element"},null,512)]),l("button",{type:"submit",class:_(["submit-btn",{loading:I.value}]),disabled:I.value||!D.value},[I.value?(s(),e("span",me,[c[0]||(c[0]=l("svg",{class:"spinner",width:"20",height:"20",viewBox:"0 0 24 24"},[l("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none",opacity:"0.25"}),l("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor","stroke-width":"4",fill:"none","stroke-linecap":"round"})],-1)),p(" "+r(o.$t("checkout.payment.processing")),1)])):(s(),e("span",de,r(o.$t("checkout.payment.subscribe")),1))],10,pe),l("p",ve,r(o.$t("checkout.payment.terms")),1),l("p",fe,[p(r(o.$t("checkout.payment.poweredByPrefix")),1),l("a",ye,r(o.$t("checkout.payment.poweredByLink")),1)])],32)])])):(s(),e("div",be,[l("div",ke,[l("div",he,[l("div",ge,[""!==$.value?(s(),k(q,{key:0,message:$.value},null,8,["message"])):h("",!0)]),l("h2",_e,r(o.$t("checkout.payment.title")),1),l("form",{onSubmit:g(U,["prevent"])},[l("div",we,[l("div",{ref_key:"paymentElement",ref:T,class:"payment-element-mobile"},null,512)]),l("button",{type:"submit",class:_(["submit-btn-mobile",{loading:I.value}]),disabled:I.value||!D.value},[I.value?(s(),e("span",$e,[c[1]||(c[1]=l("svg",{class:"spinner-mobile",width:"20",height:"20",viewBox:"0 0 24 24"},[l("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none",opacity:"0.25"}),l("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor","stroke-width":"4",fill:"none","stroke-linecap":"round"})],-1)),p(" "+r(o.$t("checkout.payment.processing")),1)])):(s(),e("span",Pe,r(o.$t("checkout.payment.subscribe")),1))],10,xe),l("p",Ie,r(o.$t("checkout.payment.terms")),1),l("p",Se,[p(r(o.$t("checkout.payment.poweredByPrefix")),1),l("a",Fe,r(o.$t("checkout.payment.poweredByLink")),1)])],32)])]),l("div",{class:_(["bottom-price-bar-mobile",{expanded:W.value}])},[l("div",Ce,[W.value?(s(),e("div",je,[l("div",Ee,[l("span",Me,r(o.$t("checkout.order.credits",{credits:a(P).credits})),1),l("span",Be,r(a(P).oldPrice),1)]),l("div",De,[l("span",Re,r(o.$t("checkout.order.discount")),1),l("span",Oe,"-$"+r(K.value),1)])])):h("",!0),l("div",{class:"price-title-mobile",onClick:L},[l("div",Te,[l("span",qe,r(o.$t("checkout.payment.total")),1),l("img",{class:_(["price-arrow-mobile",{rotated:W.value}]),src:"/assets/downArrow.png",alt:""},null,2)]),l("span",Ae,r(a(P).price),1)])])],2)]))}},[["__scopeId","data-v-b2c92e42"]]);export{Je as default};

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.