1import{C as re,_ as oe,a as le}from"./D_wjjgoj.js";import{_ as ie}from"./DG-h44ws.js";import{p as Y,q as K,r as V,c as ne,b as Q,t as W,v as J,d as X,f as O,P as Z,k as de,w as ce,x as ue,y as ve,z as pe,A as me,_ as fe,B as ge,e as ee}from"./BHw1e3Z5.js";import{d as p,m as C,l as H,A as U,J as v,M as u,P as D,N as e,O as S,R as I,u as m,a6 as E,a1 as te,Q as he,Y as se,X as L,Z as q}from"./NzCnRFWS.js";import{_ as be}from"./CCergAdg.js";import{_ as xe}from"./CIyx1CTx.js";const we="travelbot",ye=()=>{const x=p(!1),n=p(null),g=p([]),f=p([]),r=p(!1),l=p(null),i=p([]),y=()=>(x.value="getDigitalGoodsService"in window,x.value),w=async()=>{var a;if(!y())return l.value="Digital Goods API is not available in this context",!1;r.value=!0,l.value=null;try{const o=await((a=window.getDigitalGoodsService)==null?void 0:a.call(window,"https://play.google.com/billing"));if(!o)throw new Error("getDigitalGoodsService not available");return n.value=o,!0}catch(o){return console.error("Failed to initialize Digital Goods Service:",o),l.value=o instanceof Error?o.message:"Failed to initialize Digital Goods Service",l.value.includes("not available")&&(l.value="Google Play billing is not available. Please ensure you are using the app from Google Play Store."),!1}finally{r.value=!1}},T=a=>{const o=new Set;if(o.add(a),a.includes(":")){const[d,b]=a.split(":");o.add(d),!b.includes("monthly")&&!b.includes("yearly")&&(o.add(`${d}:monthly`),o.add(`${d}:yearly`),o.add(`${d}:annual`))}else if(a==="travelbot"&&(o.add("travelbot"),o.add("travelbot:travelbot")),a==="travelbot-yearly"&&o.add("travelbot:travelbot-yearly"),o.add(`${a}:${a}`),o.add(`${a}:monthly`),o.add(`${a}:yearly`),o.add(`${a}:annual`),a.includes("-")){const[d,b]=a.split("-");o.add(`${d}:${b}`),o.add(`${d}:${d}-${b}`)}return Array.from(o)},_=async a=>{if(!n.value)return l.value="Service not initialized",[];r.value=!0,l.value=null;try{const o=Array.from(new Set(a.flatMap(b=>T(b))));i.value=o;const d=await n.value.getDetails(o);return g.value=d,d}catch(o){return console.error("Failed to get product details:",o),l.value=o instanceof Error?o.message:"Failed to get product details",[]}finally{r.value=!1}},$=async()=>{if(!n.value)return l.value="Service not initialized",[];r.value=!0,l.value=null;try{const a=await n.value.listPurchases();return f.value=a,a}catch(a){return console.error("Failed to list purchases:",a),l.value=a instanceof Error?a.message:"Failed to list purchases",[]}finally{r.value=!1}},R=async a=>{var o;if(!n.value)return l.value="Service not initialized",{success:!1,error:"Service not initialized"};r.value=!0,l.value=null;try{i.value=[a];const d=await n.value.getDetails([a]);(!d||d.length===0)&&(console.warn(`[DigitalGoods] Product not found for SKU: ${a}`),console.warn("[DigitalGoods] This may indicate incorrect SKU format or product not configured in Play Console"));const M=await new PaymentRequest([{supportedMethods:"https://play.google.com/billing",data:{sku:a}}],{total:{label:"Total",amount:{currency:"USD",value:"0"}}}).show(),{purchaseToken:c}=M.details;if(!c)throw await M.complete("fail"),new Error("No purchase token received");const t=await $fetch("/api/verify-subscription",{method:"POST",body:{purchaseToken:c}}),s=(o=[...t.lineItems||[]].sort((z,G)=>{var A,j;const N=((A=Y(z.expiryTime))==null?void 0:A.getTime())||0;return(((j=Y(G.expiryTime))==null?void 0:j.getTime())||0)-N})[0])==null?void 0:o.expiryTime;if(!K(t.subscriptionState,s).isEntitled)return await M.complete("fail"),{success:!1,error:`Subscription is not active. State: ${t.subscriptionState||"unknown"}`};await M.complete("success");try{await $()}catch(z){console.warn("[DigitalGoods] listUserPurchases failed:",z)}return{success:!0,purchaseToken:c,details:t}}catch(d){let b="";d instanceof Error?d.name==="AbortError"||d.message.includes("RESULT_CANCELED")?b="Purchase cancelled by user":d.message.includes("sku")?b=`Invalid SKU format or product not found: ${a}. Please check Play Console configuration.`:b=`${d.name}: ${d.message}`:b=typeof d=="string"?d:"Purchase failed";const M=i.value.length?` | sku=${i.value.join(",")}`:"";return l.value=`${b}${M}`,console.error("[DigitalGoods] purchaseItem error:",l.value),console.error("[DigitalGoods] Full error details:",d),{success:!1,error:l.value}}finally{r.value=!1}},h=async a=>{if(!n.value)return l.value="Service not initialized",!1;r.value=!0,l.value=null;try{return await n.value.consume(a),await $(),!0}catch(o){return console.error("Failed to consume purchase:",o),l.value=o instanceof Error?o.message:"Failed to consume purchase",!1}finally{r.value=!1}};return{isAvailable:C(()=>x.value),service:C(()=>n.value),products:C(()=>g.value),purchases:C(()=>f.value),loading:C(()=>r.value),error:C(()=>l.value),lastQueriedSkus:C(()=>
1i.value),checkAvailability:y,initializeService:w,getProductDetails:_,listUserPurchases:$,purchaseItem:R,consumePurchase:h}},_e={class:"relative"},ke={key:0,class:"mb-6"},Se={class:"bg-green-500/10 border border-green-500/20 rounded-xl p-6 shadow-lg"},Pe={class:"flex items-start"},$e={class:"flex-1"},Ce={class:"text-green-200 mb-3"},Te={key:0,class:"mb-3"},Ie=["href"],Me={key:1},Ee={class:"grid md:grid-cols-2 gap-6 max-w-4xl mx-auto"},De={class:"bg-gradient-to-br from-primary/20 to-accent/20 rounded-xl p-6 border border-primary/30 relative"},ze={class:"text-3xl font-bold mb-4"},Ae={class:"space-y-2 mb-6"},Le={class:"flex items-center text-sm"},Be=["disabled"],Re={key:0,class:"flex items-center justify-center"},Ne={key:1},Oe={key:0,class:"mt-6 p-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-300 text-sm max-w-2xl mx-auto"},Ge=H({__name:"GoogleSubscription",setup(x){const{success:n,error:g,info:f}=V(),r=ye(),l=C(()=>{if(!w.value.expiryDate)return 0;const c=new Date(w.value.expiryDate),t=new Date,s=c.getTime()-t.getTime();return Math.ceil(s/(1e3*3600*24))}),i=C(()=>K(y.value,w.value.expiryDate).isEntitled),y=p(null),w=p({startDate:"",expiryDate:"",productId:"",latestOrderId:"",regionCode:"",acknowledgementState:"",isTestPurchase:!1}),T=p(!1),_=ne(),$=Q(),{refreshSubscriptionState:R}=W(),h=X(),a=C(()=>J(h.public.pro));async function o(){var c;if((c=$.value)!=null&&c.id){T.value=!0;try{const{data:t}=await _.from("profiles").select("purchase_token, subscription_status, subscription_end_date").eq("id",$.value.id).single();if(!(t!=null&&t.purchase_token)){y.value=null,d();return}const s=await $fetch("/api/billing/google-confirm-purchase",{method:"POST",body:{purchaseToken:t.purchase_token}});b({kind:"androidpublisher#subscriptionPurchaseV2",startTime:s.startTime||"",regionCode:"",subscriptionState:s.subscriptionState||"",latestOrderId:s.latestOrderId||"",acknowledgementState:s.acknowledgementState||"",testPurchase:s.isTestPurchase?{}:null,lineItems:[{productId:s.productId||"",expiryTime:s.expiryTime||t.subscription_end_date||""}]})}catch(t){console.error("Error during checkSubscription:",t),g(t instanceof Error?t.message:"Failed to verify subscription status"),y.value=null,d()}finally{T.value=!1}}}function d(){w.value={startDate:"",expiryDate:"",productId:"",latestOrderId:"",regionCode:"",acknowledgementState:"",isTestPurchase:!1}}function b(c){y.value=c.subscriptionState;const t=c.lineItems[0],s=c.startTime?new Date(c.startTime):null,P=t!=null&&t.expiryTime?new Date(t.expiryTime):null;w.value={startDate:s&&!Number.isNaN(s.getTime())?s.toISOString():"",expiryDate:P&&!Number.isNaN(P.getTime())?P.toISOString():"",productId:(t==null?void 0:t.productId)||"",latestOrderId:c.latestOrderId,regionCode:c.regionCode,acknowledgementState:c.acknowledgementState,isTestPurchase:!!c.testPurchase}}async function M(c){var t;T.value=!0;try{if(!("getDigitalGoodsService"in window))throw new Error("Digital Goods API not available. Please ensure you are using the app from Google Play Store.");if(!r.service.value&&(f("Initializing Google Play billing..."),!await r.initializeService())){const A=r.error.value||"Failed to initialize Digital Goods Service";throw console.error("Service initialization failed:",A),new Error(A)}const s=await r.listUserPurchases();let P;c==="travelbot:travelbot-yearly"||(P=["travelbot",c,"travelbot:travelbot","travelbot:monthly"]);let z=c,G=!1;for(const k of P){const A=await r.getProductDetails([k]);if(A&&A.length>0){z=k,G=!0;break}}G||(console.warn(`No product details found for any SKU variant. Will try with original: ${c}`),console.warn("Tested SKUs:",P),console.warn("This might fail, but PaymentRequest may still work if the SKU is valid in Play Console")),f("Opening Google Play purchase dialog...");const N=await r.purchaseItem(z);if(N.success&&N.purchaseToken){const k=await $fetch("/api/billing/google-confirm-purchase",{method:"POST",body:{purchaseToken:N.purchaseToken}});b({kind:"androidpublisher#subscriptionPurchaseV2",startTime:k.startTime||"",regionCode:"",subscriptionState:k.subscriptionState||"",latestOrderId:k.latestOrderId||"",acknowledgementState:k.acknowledgementState||"",testPurchase:k.isTestPurchase?{}:null,lineItems:[{productId:k.productId||"",expiryTime:k.expiryTime||""}]}),k.isEntitled?(n("Subscription activated successfully!"),(t=$.value)!=null&&t.id&&(await R($.value.id)||f("Your subscription is active, but the app could not refresh automatically. Reload the app to see your new limits."))):f("Your purchase is processing. Return to this billing screen shortly to activate your Pro access.")}
1else{const k=N.error||"Purchase was not successful";throw console.error("Purchase failed with error:",k),new Error(k)}}catch(s){console.error("Error during makePurchase:",s);const P=s instanceof Error?s.message:"Purchase failed. Please try again.";g(P)}finally{T.value=!1,await o()}}return U(async()=>{if(r.checkAvailability())if(await r.initializeService()&&r.service.value){const s=await r.listUserPurchases();for(const P of s);}else console.warn("Digital Goods Service could not be initialized:",r.error.value);else console.warn("Digital Goods API is not available in this context");await o()}),(c,t)=>(u(),v("div",_e,[i.value?(u(),v("div",ke,[e("div",Se,[e("div",Pe,[t[4]||(t[4]=e("div",{class:"text-green-400 mr-4 mt-1"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),e("div",$e,[t[3]||(t[3]=e("h3",{class:"text-lg font-bold text-green-300 mb-2"}," Google Play Subscription Active ",-1)),e("p",Ce," Your subscription is active. "+S(l.value)+" days left. ",1),w.value.isTestPurchase?(u(),v("div",Te,t[1]||(t[1]=[e("span",{class:"inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-yellow-500/20 text-yellow-300 border border-yellow-500/30"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-3 w-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),I(" Test Purchase ")],-1)]))):D("",!0),e("a",{href:`https://play.google.com/store/account/subscriptions?sku=${m(we)}&package=me.travelbot.www`,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center px-4 py-2 bg-primary text-white rounded-lg font-medium hover:bg-primary/80 transition-all shadow-md"},t[2]||(t[2]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1),I(" Manage Subscription ")]),8,Ie)])])])])):D("",!0),i.value?D("",!0):(u(),v("div",Me,[e("div",Ee,[e("div",De,[t[9]||(t[9]=e("div",{class:"absolute -top-3 left-1/2 transform -translate-x-1/2"},[e("span",{class:"bg-gradient-to-r from-primary to-accent text-white text-xs font-bold px-3 py-1 rounded-full"}," RECOMMENDED ")],-1)),t[10]||(t[10]=e("h3",{class:"text-lg font-bold mb-2"}," Pro ",-1)),e("div",ze,[I(S(m(O)(m(Z)))+" ",1),t[5]||(t[5]=e("span",{class:"text-base font-normal text-gray-400"},"/month",-1))]),e("ul",Ae,[e("li",Le,[t[6]||(t[6]=e("svg",{class:"h-4 w-4 text-green-500 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})],-1)),I(" "+S(a.value)+" tokens daily ",1)]),t[7]||(t[7]=E('<li class="flex items-center text-sm"><svg class="h-4 w-4 text-green-500 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> Advanced trip planning </li><li class="flex items-center text-sm"><svg class="h-4 w-4 text-green-500 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> Priority support </li>',2))]),e("button",{class:"w-full py-3 px-4 bg-gradient-to-r from-primary to-accent text-white rounded-lg font-medium hover:opacity-90 transition-all transform hover:scale-105 disabled:opacity-50 disabled:cursor-not-allowed disabled:transform-none",disabled:T.value,onClick:t[0]||(t[0]=s=>M("travelbot"))},[T.value?(u(),v("span",Re,t[8]||(t[8]=[e("svg",{class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),I(" Processing... ")]))):(u(),v("span",Ne," Upgrade to Pro "))],8,Be)]),t[11]||(t[11]=E('<div class="bg-base-200/50 rounded-xl p-6 border border-gray-700"><h3 class="text-lg font-bold mb-2"> Free </h3><div class="text-3xl font-bold mb-4"> $0<span class="text-base font-normal text-gray-400">/month</span></div><ul class="space-y-2 mb-6"><li class="flex items-center text-sm"><svg class="h-4 w-4 text-green-500 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> 15,000 tokens daily </li><li class="flex items-center text-sm"><svg class="h-4 w-4 text-green-500 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> Basic trip planning </li><li class="flex items-center text-sm text-gray-400"><svg class="h-4 w-4 text-gray-600 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg> Advanced features </li></ul><button class="w-full py-2 px-4 bg-gray-700 text-gray-300 rounded-lg font-medium cursor-not-allowed" disabled> Current Plan </button></div>',1))]),m(r).error.value?(u(),v("div",Oe,[t[12]||(t[12]=e("div",{class:"font-bold mb-2"}," Error: ",-1)),e("div",null,S(m(r).error.value),1)])):D("",!0)]))]))}});let F=null,B={isServerSide:!1,hasWebkit:!1,hasMessageHandlers:!1,availableHandlers:[],requiredHandlers:[],missingHandlers:[],isAvailable:!1};async function ae(){var f;if(F)return F;if(typeof window>"u")return B={...B,isServerSide:!0,error:"Running in server-side environment"},null;const x=(f=window.webkit)==null?void 0:f.messageHandlers,n=["iap-products-request","iap-purchase-request","iap-transactions-request","iap-subscription-request"];return B={isServerSide:!1,hasWebkit:!!window.webkit,hasMessageHandlers:!!x,availableHandlers:x?Object.keys(x):[],requiredHandlers:n,missingHandlers:n.filter(r=>!x||!(r in x)),isAvailable:!1},x?n.every(r=>r in x)?(B.isAvailable=!0,F={fetchProducts:r=>new Promise(l=>{var i;(i=x["iap-products-request"])==null||i.postMessage(r),l()}),purchaseProduct:(r,l)=>new Promise(i=>{var w;const y=JSON.stringify({productID:r,quantity:l});(w=x["iap-purchase-request"])==null||w.postMessage(y),i()}),fetchTransactions:()=>new Promise(r=>{var l;(l=x["iap-transactions-request"])==null||l.postMessage("request"),r()}),fetchSubscriptionStatus:()=>new Promise(r=>{var l;(l=x["iap-subscription-request"])==null||l.postMessage("request"),r()})},F):(B.error=`Missing handlers: ${B.missingHandlers.join(", ")}`,null):(B.error="WebKit message handlers not found. Not running in native iOS app.",null)}const Fe={class:"relative mx-auto"},He={key:0,class:"text-center py-12"},Ue={key:1,class:"text-center py-12"},je={key:2,class:"mb-6"},Ye={key:3,class:"text-center py-12",role:"alert"},qe={class:"bg-yellow-500/10 border border-yellow-500/20 rounded-xl p-8 shadow-lg"},Ke={class:"text-yellow-200"},Ve="proplan",Qe=H({__name:"IAP",setup(x){const n=p(null),g=p(!1),f=p(!1),r=p(!1),l=p(null);let i=null;async function y(){try{if(i=await ae(),!i){l.value=B.error||"StoreKit not available. Please use the iOS app.",g.value=!1;return}await w()}catch(h){l.value=h instanceof Error?h.message:"In-app purchases require the iOS app",g.value=!1}}async function w(){if(i){g.value=!0;
1try{await i.fetchProducts([Ve]),await i.fetchSubscriptionStatus()}catch(h){l.value=h instanceof Error?h.message:"Failed to fetch subscription details"}finally{g.value=!1}}}async function T(h){if(i){f.value=!0;try{await i.purchaseProduct(h,1)}catch(a){console.error("Purchase error:",a)}finally{f.value=!1}}}function _(h){const a=h.detail;if(Array.isArray(a)&&a.length>0){const o=a[0];n.value={id:o.id,name:o.name,description:o.description,price:o.price,priceFormatted:o.priceFormatted,currencyCode:o.currencyCode}}else console.error("No valid subscription product found")}function $(h){h.detail}async function R(h){try{const a=h.detail;if(a.transactionId||a.originalTransactionId)try{const o=await $fetch("/api/billing/apple-validate-subscription",{method:"POST",body:{transactionId:a.transactionId??null,originalTransactionId:a.originalTransactionId??null}});r.value=o.isSubscribed,r.value&&(n.value=null)}catch(o){console.error("Subscription validation failed:",o),r.value=!1}else r.value=a.isSubscribed===!0?r.value:!1}catch(a){console.error("Error handling subscription status:",a)}finally{g.value=!1}}return U(async()=>{await y(),window.addEventListener("iap-products-result",_),window.addEventListener("iap-purchase-result",$),window.addEventListener("iap-subscription-status",R)}),te(()=>{window.removeEventListener("iap-products-result",_),window.removeEventListener("iap-purchase-result",$),window.removeEventListener("iap-subscription-status",R)}),(h,a)=>{const o=be,d=xe;return u(),he(d,null,{default:se(()=>[e("div",Fe,[g.value?(u(),v("div",He,a[0]||(a[0]=[e("div",{class:"bg-base-200/70 backdrop-blur-sm rounded-xl p-8 shadow-lg border border-white/5"},[e("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),e("p",{class:"text-gray-300"}," Loading subscription details... ")],-1)]))):r.value?(u(),v("div",Ue,a[1]||(a[1]=[e("div",{class:"bg-green-500/10 border border-green-500/20 rounded-xl p-8 shadow-lg"},[e("div",{class:"text-green-400 mb-4"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-12 w-12 mx-auto",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})])]),e("h3",{class:"text-xl font-bold text-green-300 mb-2"}," TravelBot Pro Active "),e("p",{class:"text-green-200 mb-4"}," You are subscribed to TravelBot Pro! "),e("p",{class:"text-green-200"}," Enjoy all the premium features. ")],-1)]))):n.value?(u(),v("div",je,[L(o,{"purchase-subscription":T,"is-ios":!0,price:n.value.price},null,8,["price"]),a[2]||(a[2]=e("div",{class:"mt-6 text-center"},[e("p",{class:"text-gray-400 text-sm"},[I(" By purchasing the subscription you agree to Apple's "),e("a",{class:"text-primary hover:text-primary/80 underline",href:"https://www.apple.com/legal/internet-services/itunes/dev/stdeula/",target:"_blank",rel:"noopener noreferrer"}," Terms of Use "),I(". ")])],-1))])):!g.value&&!n.value?(u(),v("div",Ye,[e("div",qe,[a[3]||(a[3]=e("div",{class:"text-yellow-400 mb-4"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-12 w-12 mx-auto",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),a[4]||(a[4]=e("h3",{class:"text-xl font-bold text-yellow-300 mb-2"}," No subscription available ",-1)),e("p",Ke,S(l.value||"There are currently no subscription plans available."),1)])])):D("",!0)])]),_:1})}}}),We={class:"relative"},Je={key:0,class:"text-center py-12"},Xe={key:1,class:"text-center py-12"},Ze={class:"bg-red-500/10 border border-red-500/20 rounded-xl p-8 shadow-lg"},et={class:"text-red-300 font-medium"},tt={key:2,class:"text-center py-12"},st={class:"bg-green-500/10 border border-green-500/20 rounded-xl p-8 shadow-lg"},at={key:0,class:"text-sm text-gray-400"},rt={key:3,class:"relative"},ot={class:"flex justify-center mb-12"},lt={class:"bg-base-200 p-1 rounded-lg shadow-lg border border-white/10"},it={class:"flex"},nt={class:"absolute -top-2 -right-2 bg-accent text-white text-xs px-2 py-1 rounded-full"},dt={class:"grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-4xl mx-auto"},ct={class:"bg-gradient-to-b from-primary/20 to-primary/5 rounded-xl p-8 shadow-xl border-2 border-primary relative transform scale-105"},ut={class:"text-center"},vt={class:"mb-6"},pt={class:"text-5xl font-bold text-white"},mt={class:"text-gray-300"}
1,ft={key:0,class:"text-sm text-accent font-medium mt-1"},gt={key:1,class:"text-xs text-gray-400 mt-1"},ht={class:"space-y-3 mb-8 text-left"},bt={class:"flex items-center text-gray-200"},xt={class:"bg-base-200 rounded-xl p-8 shadow-lg border border-white/5 relative"},wt={class:"text-center"},yt={class:"space-y-3 mb-8 text-left"},_t={class:"flex items-center text-gray-300"},kt=H({__name:"FastSpring",setup(x){const n=Q(),{refreshSubscriptionState:g}=W(),f=X(),r=V(),l=p(!0),i=p(null),y=p(!1),w=p(""),T=p(""),_=p("monthly"),$=C(()=>J(f.public.pro)),R=C(()=>{const t=f.public.free;return t>=1e3?(t/1e3).toLocaleString()+",000":new Intl.NumberFormat("en-US").format(t)}),h={src:"https://sbl.onfastspring.com/sbl/1.0.1/fastspring-builder.min.js",id:"fsc-api","data-storefront":"travelbot.onfastspring.com/popup-travelbot","data-popup-closed":"handlePopupClosed",defer:!0},a=C(()=>{var t,s;return{reset:!0,products:[{path:_.value==="monthly"?"travelbot-pro":"travelbot-pro-yearly",quantity:1}],tags:{userId:((t=n.value)==null?void 0:t.id)||""},...(s=n.value)!=null&&s.email?{paymentContact:{email:n.value.email}}:{}}}),o=async t=>{t&&t.id?(r.info("Payment received. Updating your subscription status..."),await c()):r.info("Checkout closed")};de({script:[h]});const d=()=>{var t;if(!((t=n.value)!=null&&t.id)){r.error("Please sign in before subscribing.");return}typeof window.fastspring<"u"?(window.fastspring.builder.push(a.value),window.fastspring.builder.checkout()):(console.error("FastSpring script not loaded"),r.error("Payment checkout is still loading. Please try again in a moment."))},b=async()=>{l.value=!0,i.value=null;try{const t=await $fetch("/api/fastspring/get-order-id");return T.value=(t==null?void 0:t.fs_reference)||"",y.value=ge(t==null?void 0:t.subscription_status,t==null?void 0:t.subscription_end_date),y.value}catch(t){return console.error("Error fetching user profile:",t),i.value="Failed to fetch user profile",!1}finally{l.value=!1}},M=t=>new Promise(s=>setTimeout(s,t)),c=async()=>{var t;for(let s=0;s<8;s++)if(s>0&&await M(2e3),await b()){r.success("Subscription activated successfully."),(t=n.value)!=null&&t.id&&(await g(n.value.id)||r.info("Your subscription is active, but the app could not refresh automatically. Reload the page to see your new limits."));return}r.info("Your payment is processing. Refresh this page in a moment if the status has not updated yet.")};return U(async()=>{window.handlePopupClosed=o,await b()}),te(()=>{window.handlePopupClosed===o&&delete window.handlePopupClosed}),(t,s)=>{const P=fe;return u(),v("div",We,[l.value?(u(),v("div",Je,s[2]||(s[2]=[e("div",{class:"bg-base-200/70 backdrop-blur-sm rounded-xl p-8 shadow-lg border border-white/5"},[e("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),e("p",{class:"text-gray-300"}," Loading subscription status... ")],-1)]))):i.value?(u(),v("div",Xe,[e("div",Ze,[s[3]||(s[3]=e("div",{class:"text-red-400 mb-4"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-12 w-12 mx-auto",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),e("p",et," Error: "+S(i.value),1)])])):y.value?(u(),v("div",tt,[e("div",st,[s[4]||(s[4]=E('<div class="text-green-400 mb-4" data-v-769344a6><svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12 mx-auto" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-769344a6><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" data-v-769344a6></path></svg></div><h3 class="text-xl font-bold text-green-300 mb-2" data-v-769344a6> Active Subscription </h3><p class="text-green-200 mb-4" data-v-769344a6> You are currently subscribed. Thank you for your support! </p>',3)),w.value?(u(),v("p",at," Subscription ID: "+S(w.value),1)):D("",!0)])])):(u(),v("div",rt,[s[17]||(s[17]=e("div",{class:"text-center mb-8"},[e("h2",{class:"text-3xl md:text-4xl font-bold mb-4"},[e("span",{class:"animate-gradient-text bg-gradient-to-r from-primary via-[#10b981] to-accent bg-clip-text text-transparent inline-block pb-1"}," Choose Your Plan ")]),e("p",{class:"text-xl text-gray-300 max-w-2xl mx-auto leading-relaxed mb-6"}," Experience seamless travel planning with TravelBot Pro ")],-1)),e("div",ot,[e("div",lt,[e("div",it,[e("button",{class:q([_.value==="monthly"?"bg-primary text-white shadow-md":"text-gray-400 hover:text-white","px-6 py-2 rounded-md font-medium transition-all duration-200"]),onClick:s[0]||(s[0]=z=>_.value="monthly")}," Monthly ",2),e("button",{class:q([_.value==="yearly"?"bg-primary text-white shadow-md":"text-gray-400 hover:text-white","px-6 py-2 rounded-md font-medium transition-all duration-200 relative"]),onClick:s[1]||(s[1]=z=>_.value="yearly")}
1,[s[5]||(s[5]=I(" Yearly ")),e("span",nt,"Save "+S(m(ce))+"%",1)],2)])])]),e("div",dt,[e("div",ct,[s[12]||(s[12]=e("div",{class:"absolute -top-3 left-1/2 transform -translate-x-1/2 z-10"},[e("span",{class:"bg-primary text-white px-4 py-1 rounded-full text-sm font-medium shadow-lg"},"Recommended")],-1)),e("div",ut,[s[9]||(s[9]=e("h3",{class:"text-2xl font-bold text-white mb-2"}," Pro Plan ",-1)),s[10]||(s[10]=e("p",{class:"text-gray-300 mb-6"}," Higher-limit travel planning ",-1)),e("div",vt,[e("span",pt,S(_.value==="monthly"?m(O)(m(Z)):m(O)(m(ue))),1),e("span",mt," /"+S(_.value==="monthly"?"month":"year"),1),_.value==="yearly"?(u(),v("div",ft," Only "+S(m(O)(m(ve)))+"/month ",1)):D("",!0),_.value==="yearly"?(u(),v("div",gt,[e("s",null,S(m(O)(m(pe)))+"/year",1),I(" Save "+S(m(O)(m(me))),1)])):D("",!0)]),e("ul",ht,[e("li",bt,[s[6]||(s[6]=e("svg",{class:"h-5 w-5 text-primary mr-3 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)),e("strong",null,S($.value),1),s[7]||(s[7]=I(" tokens daily "))]),s[8]||(s[8]=E('<li class="flex items-center text-gray-200" data-v-769344a6><svg class="h-5 w-5 text-primary mr-3 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-769344a6><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" data-v-769344a6></path></svg> Real-time travel data </li><li class="flex items-center text-gray-200" data-v-769344a6><svg class="h-5 w-5 text-primary mr-3 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-769344a6><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" data-v-769344a6></path></svg> Image uploads & analysis </li><li class="flex items-center text-gray-200" data-v-769344a6><svg class="h-5 w-5 text-primary mr-3 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-769344a6><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" data-v-769344a6></path></svg> Priority support </li><li class="flex items-center text-gray-200" data-v-769344a6><svg class="h-5 w-5 text-primary mr-3 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-769344a6><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" data-v-769344a6></path></svg> 5000+ destinations database </li>',4))]),e("button",{class:"w-full py-3 px-4 bg-primary text-white rounded-lg font-medium hover:bg-primary/80 transition-all transform hover:scale-105 shadow-lg",onClick:d}," Subscribe Now "),s[11]||(s[11]=e("p",{class:"mt-4 text-xs text-gray-400"}," Cancel anytime ⢠30-day money-back guarantee ",-1))])]),e("div",xt,[e("div",wt,[s[16]||(s[16]=E('<h3 class="text-xl font-bold text-white mb-2" data-v-769344a6> Free Plan </h3><p class="text-gray-400 mb-6" data-v-769344a6> Try TravelBot </p><div class="mb-6" data-v-769344a6><span class="text-4xl font-bold text-white" data-v-769344a6>$0</span><span class="text-gray-400" data-v-769344a6>/forever</span></div>',3)),e("ul",yt,[e("li",_t,[s[13]||(s[13]=e("svg",{class:"h-5 w-5 text-yellow-500 mr-3 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)),I(" "+S(R.value)+" tokens per day ",1)]),s[14]||(s[14]=E('<li class="flex items-center text-gray-400" data-v-769344a6><svg class="h-5 w-5 text-gray-500 mr-3 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-769344a6><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" data-v-769344a6></path></svg><span class="line-through" data-v-769344a6>Image uploads</span></li><li class="flex items-center text-gray-400" data-v-769344a6><svg class="h-5 w-5 text-gray-500 mr-3 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-769344a6><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" data-v-769344a6></path></svg><span class="line-through" data-v-769344a6>Priority support</span></li><li class="flex items-center text-gray-300" data-v-769344a6><svg class="h-5 w-5 text-yellow-500 mr-3 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-769344a6><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" data-v-769344a6></path></svg> Community support </li>',3))]),L(P,{to:"/chat/new",class:"w-full py-3 px-4 bg-base-300 text-white rounded-lg font-medium hover:bg-base-100 transition-colors inline-block text-center"},{default:se(()=>s[15]||(s[15]=[I(" Continue with Free ")])),_:1})])])]),s[18]||(s[18]=E('<div class="text-center mt-12" data-v-769344a6><div class="flex flex-wrap justify-center items-center gap-6 text-gray-400 text-sm" data-v-769344a6><div class="flex items-center" data-v-769344a6><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1 text-green-500" viewB
1ox="0 0 20 20" fill="currentColor" data-v-769344a6><path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd" data-v-769344a6></path></svg> SSL Encrypted </div><div class="flex items-center" data-v-769344a6><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1 text-green-500" viewBox="0 0 20 20" fill="currentColor" data-v-769344a6><path d="M4 4a2 2 0 00-2 2v1h16V6a2 2 0 00-2-2H4z" data-v-769344a6></path><path fill-rule="evenodd" d="M18 9H2v5a2 2 0 002 2h12a2 2 0 002-2V9zM4 13a1 1 0 011-1h1a1 1 0 110 2H5a1 1 0 01-1-1zm5-1a1 1 0 100 2h1a1 1 0 100-2H9z" clip-rule="evenodd" data-v-769344a6></path></svg> Secure Payments </div><div class="flex items-center" data-v-769344a6><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1 text-green-500" viewBox="0 0 20 20" fill="currentColor" data-v-769344a6><path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" data-v-769344a6></path></svg> Cancel Anytime </div></div></div>',1))]))])}}}),St=ee(kt,[["__scopeId","data-v-769344a6"]]),Pt={class:"min-h-screen flex flex-col relative"},$t={class:"relative z-0 flex h-full w-full overflow-hidden"},Ct={class:"relative flex h-full max-w-full flex-1 flex-col overflow-hidden"},Tt={class:"relative h-full w-full flex-1 overflow-auto transition-width"},It={class:"flex h-full flex-col focus-visible:outline-0"},Mt={class:"flex-1 overflow-hidden"},Et={class:"relative h-full"},Dt={class:"h-full overflow-y-auto w-full px-4 sm:px-6 lg:px-8"},zt={class:"flex flex-col text-sm pb-9"},At={class:"py-6 relative"},Lt={class:"container mx-auto px-4"},Bt={class:"max-w-4xl mx-auto"},Rt={class:"bg-base-200/70 backdrop-blur-sm rounded-xl shadow-xl border border-white/5 overflow-hidden"},Nt={class:"p-8"},Ot={key:0},Gt={key:1},Ft={key:2},Ht={key:0,class:"mt-6 space-y-3"},Ut={key:0,class:"p-4 bg-orange-500/10 border border-orange-500/30 rounded-lg"},jt={class:"flex items-start"},Yt={class:"flex-1"},qt={class:"text-orange-200 text-sm"},Kt=H({__name:"billing",setup(x){const n=p(!1),g=p(!1),f=p(null),r=p(null);return U(async()=>{if("getDigitalGoodsService"in window)try{await window.getDigitalGoodsService("https://play.google.com/billing")&&(n.value=!0)}catch(l){const i=l instanceof Error?l.message:String(l);f.value=i,n.value=!1}else f.value="Digital Goods API not available in this browser context";try{await ae()?g.value=!0:(r.value=B.error||"StoreKit not available",g.value=!1)}catch(l){const i=l instanceof Error?l.message:String(l);r.value=i,g.value=!1}}),(l,i)=>{const y=oe,w=ie;return u(),v("div",Pt,[i[5]||(i[5]=E('<div class="absolute inset-0 overflow-hidden -z-10" data-v-49a7bc14><div class="absolute inset-0 bg-gradient-to-br from-base-300 via-base-100 to-base-300 opacity-90" data-v-49a7bc14></div><div class="absolute inset-0 bg-pattern opacity-4" data-v-49a7bc14></div><div class="absolute top-1/4 left-1/4 h-96 w-96 rounded-full bg-primary/8 blur-3xl" data-v-49a7bc14></div><div class="absolute bottom-1/4 right-1/3 h-80 w-80 rounded-full bg-accent/8 blur-3xl" data-v-49a7bc14></div></div>',1)),e("div",$t,[L(re),e("div",Ct,[L(y),e("main",Tt,[e("div",It,[e("div",Mt,[e("div",Et,[e("div",Dt,[e("div",zt,[L(le),i[3]||(i[3]=E('<section class="pt-12 pb-8 relative" data-v-49a7bc14><div class="container mx-auto px-4 text-center relative" data-v-49a7bc14><h1 class="text-4xl md:text-5xl font-bold mb-6 leading-tight" data-v-49a7bc14><span class="animate-gradient-text bg-gradient-to-r from-primary via-[#10b981] to-accent bg-clip-text text-transparent inline-block pb-1" data-v-49a7bc14> Manage Your </span><br data-v-49a7bc14><span class="text-white" data-v-49a7bc14>Subscription</span></h1><div class="flex justify-center mb-8" data-v-49a7bc14><div class="flex items-center space-x-2 bg-green-600/20 border border-green-600/30 rounded-lg px-4 py-2" data-v-49a7bc14><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-green-500" viewBox="0 0 20 20" fill="currentColor" data-v-49a7bc14><path fill-rule="evenodd" d="M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" data-v-49a7bc14></path></svg><span class="text-green-400 text-sm font-medium" data-v-49a7bc14>Secure payments & instant updates</span></div></div></div></section>',1)),e("section",At,[e("div",Lt,[e("div",Bt,[e("div",Rt,[e("div",Nt,[m(n)?(u(),v("div",Ot,[L(Ge)])):m(g)?(u(),v("div",Gt,[L(Qe)])):(u(),v("div",Ft,[L(St),m(f)||m(r)?(u(),v("div",Ht,[m(f)&&!m(r)?(u(),v("div",Ut,[e("div",jt,[i[2]||(i[2]=e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-orange-400 mr-3 mt-0.5 flex-shrink-0",viewBox:"0 0 20 20",fill:"currentColor"},[e("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)),e("div",Yt,[i[0]||(i[0]=e("div",{class:"font-semibold text-orange-300 mb-1"}," Google Play Billing Not Available ",-1)),e("div",qt,S(m(f)),1),i[1]||(i[1]=e("div",{class:"text-orange-200/70 text-xs mt-2"}," Using web payment method instead. For Google Play billing, please use the Android app. ",-1))])])])):D("",!0)])):D("",!0)]))])])])])]),i[4]||(i[4]=E('<section class="py-8 relative" data-v-49a7bc14><div class="container mx-auto px-4" data-v-49a7bc14><div class="max-w-2xl mx-auto text-center" data-v-49a7bc14><div class="bg-base-300/50 rounded-lg p-6 border border-gray-600/30 backdrop-blur-sm" data-v-49a7bc14><h3 class="text-lg font-medium text-gray-300 mb-3" data-v-49a7bc14> Need Help? </h3><p class="text-gray-400 mb-4" data-v-49a7bc14> Contact our support team if you have any questions about your subscription or billing. </p><div class="flex flex-col sm:flex-row gap-3 justify-center" data-v-49a7bc14><a href="/contact" class="btn btn-ghost border border-gray-500 hover:border-gray-400 hover:bg-gray-700/50 text-gray-300" data-v-49a7bc14> Contact Support </a><a href="/refund" class="btn btn-ghost border border-gray-500 hover:border-gray-400 hover:bg-gray-700/50 text-gray-300" data-v-49a7bc14> Refund Policy </a></div></div></div></div></section>',1))])])])])])])])]),L(w)])}}}),es=ee(Kt,[["__scopeId","data-v-49a7bc14"]]);export{es 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.