PageSourceSearch

https://books.preventivevet.com/_nuxt/CC-Kmiwb.js

js preventivevet.com collected 2026-10-02 03:44:18 UTC 7,045 bytes, 1 lines download raw bytes

1import{_ as j}from"./ChxR8eJ-.js";import{u as q,a as G,_ as U,b as F,c as M,d as O}from"./BCYfwVb1.js";import{_ as V}from"./Dk6TFOik.js";import{e as z,R as c,u as Y,Q as H,n as J,s as Q,h as _,k as W,j as X,q as Z,c as g,f as o,o as n,b as E,a as s,x as k,d as S,F as K,w as ee,v as l,T as te,l as f,X as h,y as oe}from"#entry";import{d as se}from"./9Sj_QenJ.js";import{a as y}from"./BOHFVp-w.js";import"./DKtf60Sy.js";import"./ChlQ0tEb.js";import"./BCZNzs2J.js";const ne=""+new URL("completeBundleIPad-1200x709.C1s0vJPZ.webp",import.meta.url).href,ae={key:0,class:"min-h-screen flex flex-col items-center justify-center gap-4"},re={key:1,class:"grid grid-rows-[auto_minmax(0,1fr)] overflow-hidden bg-white h-dvh"},ie={class:"bg-white px-4 py-4 shadow"},ce={class:"mx-auto max-w-7xl"},le={key:0},ue=["src","alt","width","height"],de={class:"mt-4 text-center text-xs text-gray-500 italic sm:text-sm"},me={class:"relative min-h-0 overflow-y-auto px-4"},pe={class:"mx-auto mt-6 rounded-2xl bg-gray-100 p-4 shadow sm:max-w-md sm:w-full"},we={key:2,class:"min-h-screen flex flex-col items-center justify-center gap-4"},Ae=z({__name:"client-landing-page",setup(ge){se({name:c.subscriptionClaim}),Y({title:"Claim Your Subscription",meta:[{name:"robots",content:"noindex, nofollow"},{name:"googlebot",content:"noindex, nofollow"}]});const i=H(),u=q(),v=J(),{email:A,isAuthenticated:B}=Q(v),P=_(!0),a=_(null),t=_("signup"),I=W().public.apiBase,R=X();async function b(){try{if(!A.value)throw new Error("Email is not available");if(!a.value)throw new Error("Subscription data is not available");t.value="addToAccount",u.clearAll(),u.setRedemptionCode(a.value.bookCode),u.setAccountEmail(A.value),await u.redeemCode(),await Promise.all([u.addPurchaseToAccount(),y(3e3)]),await $()}catch(d){f.error("Error adding subscription purchase to account",d),i.setSystemAlert({type:"error",title:"Error Adding Books to Account",message:"There was an error adding the books to your account. Please refresh the page and try again. If the problem persists, contact support at [email protected] for assistance.",show:!0,confirmLabel:"Retry",confirmCallback:()=>{i.systemAlert.show=!1,setTimeout(()=>{b()},300)},dismissLabel:"Reload Page",dismissCallback:()=>{window.location.reload()}})}}async function L(){t.value="passwordResetSuccess",await y(3e3),t.value="signin"}async function $(){t.value="completeSuccess",u.clearAll(),B.value?(await Promise.all([v.loadUserContent(),v.logSignIn(),await y(3e3)]),R.replace({name:c.accountLibrary})):(await y(3e3),R.replace({name:c.signin}))}async function C(){try{const d=window.location.search,m=new URLSearchParams(d).get("id");if(!m)throw i.setSystemAlert({type:"error",title:"Invalid Link",message:"No subscription ID provided in the link. Please check the link you were provided with and try again, or contact support for assistance.",show:!0,confirmLabel:"Okay",confirmCallback:()=>{h({name:c.home})}}),new Error("No subscription ID provided");const p=await fetch(`${I}/digitalEducation/account/${m}`,{method:"GET",headers:{Accept:"application/json"}});if(!p.ok){const x=await oe(p);throw new Error(x)}const r=await p.json();if(f.debug("Retrieved subscription data: ",r),!r.subscription)throw i.setSystemAlert({type:"error",title:"Subscription Not Found",message:"No subscription found for the provided ID. Please check the link you were provided with and try again, or contact support for assistance.",show:!0,confirmLabel:"Okay",confirmCallback:()=>{h({name:c.home})}}),new Error(`No subscription found for the provided ID: ${m}`);if(r.subscription.expiry&&new Date(r.subscription.expiry)<new Date)throw i.setSystemAlert({type:"error",title:"Subscription Expired",message:`This subscription has expired, please contact ${r.subscription.name} for assistance.`,show:!0,confirmLabel:"Okay",confirmCallback:()=>{h({name:c.home})}}),new Error(`This subscription has expired, please contact ${r.subscription.name} for assistance.`);a.value=r.subscription}catch(d){i.systemAlert.show||(f.debug("Handle this"),i.setSystemAlert({type:"error",title:"Error Retrieving Subscription",message:"There was an error retrieving your subscription details. Please check the link you were provided with and try again, or contact support for assistance.",show:!0,confirmLabel:"Retry",confirmCallback:()=>{i.systemAlert.show=!1,setTimeout(()=>{C()},300)}
1,dismissLabel:"Cancel",dismissCallback:()=>{h({name:c.home})}})),f.error(d)}finally{P.value=!1}}return Z(()=>{C()}),(d,e)=>{const m=j,p=G,r=U,x=F,N=M,T=V,D=O;return o(P)?(n(),g("div",ae,[E(m,{class:"size-24"}),e[6]||(e[6]=s("span",{class:"animate-pulse text-xl font-medium"},"Loading...",-1))])):o(a)?(n(),g("div",re,[s("div",ie,[s("div",ce,[o(a).logo?(n(),g("div",le,[s("img",{src:o(a).logo.src,alt:o(a).logo.alt,width:o(a).logo.width,height:o(a).logo.height,class:"mx-auto my-8 h-24 object-contain"},null,8,ue)])):k("",!0),s("p",de,[e[9]||(e[9]=S(" We care about your pet, so we’ve partnered with ",-1)),e[10]||(e[10]=s("a",{href:"https://www.preventivevet.com/",rel:"noopener noreferrer",target:"_blank",class:"text-link"},"Preventive Vet",-1)),o(a).organizationType==="IBPSA"?(n(),g(K,{key:0},[e[7]||(e[7]=S(" and ",-1)),e[8]||(e[8]=s("a",{href:"https://ibpsa.com/for-consumers/",rel:"noopener noreferrer",target:"_blank",class:"text-link"},"IBPSA",-1))],64)):k("",!0),e[11]||(e[11]=S(" to offer you helpful, life-saving resources. ",-1))])])]),s("div",me,[e[12]||(e[12]=s("div",{class:"mx-auto max-w-4xl w-full py-8 text-center text-balance"},[s("h1",{class:"text-2xl font-bold"}," Access Your Books "),s("p",{class:"mt-2 text-sm xxs:text-base"}," You need to create an account or sign in to an existing account to access your book(s). You can then view it online or download a generated PDF copy. ")],-1)),e[13]||(e[13]=s("img",{src:ne,alt:"Digital Books Bundle Cover",width:"1200",height:"709",class:"mx-auto my-6 max-w-xs w-full"},null,-1)),s("div",pe,[E(te,{mode:"out-in","enter-active-class":"ease-out duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-300","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:ee(()=>[o(t)==="signup"?(n(),l(p,{key:0,onGoToSignIn:e[0]||(e[0]=w=>t.value="signin"),onSignupComplete:b})):o(t)==="signin"?(n(),l(r,{key:1,onGoToSignUp:e[1]||(e[1]=w=>t.value="signup"),onGoToPasswordReset:e[2]||(e[2]=w=>t.value="requestPasswordReset"),onSigninComplete:b})):o(t)==="requestPasswordReset"?(n(),l(x,{key:2,onGoToSignIn:e[3]||(e[3]=w=>t.value="signin"),onGoToSignUp:e[4]||(e[4]=w=>t.value="signup"),onRequestPasswordResetComplete:e[5]||(e[5]=w=>t.value="resetPassword")})):o(t)==="resetPassword"?(n(),l(N,{key:3,onOnPasswordResetSuccess:L})):o(t)==="passwordResetSuccess"?(n(),l(T,{key:4,title:"Password Reset",message:"Finalizing Changes..."})):o(t)==="addToAccount"?(n(),l(D,{key:5})):o(t)==="completeSuccess"?(n(),l(T,{key:6,title:"Order Claimed",message:"Redirecting to account..."})):k("",!0)]),_:1})])])])):(n(),g("div",we))}}});export{Ae 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.