1import{u as q,r as c,a as A,w as i,b as N,c as B,d as x,e as d,f as D,g as R,h as E,_ as F,n as I,o as k,i as P}from"./FTaPbxLM.js";const S={key:0,class:"flex flex-1 flex-col"},O={__name:"preview",async setup(V){var _,f,m,g,h,w,C;let e,t;const{locale:v}=q(),u=c("pending"),a=c(null),p=c(null),L=A(),{id:r,culture:M}=L.query;if(!r)handleError("404",{statusCode:404,statusMessage:"Preview not found"},{customMessage:"No id provided"});else{const{data:o,status:y,error:s}=([e,t]=i(()=>E("/api/umbraco/get/id",{query:{id:[`${r}`]},headers:{preview:!0,"Accept-Language":M||v}},"$tFHCRoqQ1c")),e=await e,t(),e);if(u.value=y.value,s.value)if(((_=s.value)==null?void 0:_.statusCode)===400)handleError("404",{statusCode:404,statusMessage:"Preview not found"},{customMessage:"No valid id provided"});else if(((f=s.value)==null?void 0:f.statusCode)===404){const{data:$,status:b,error:n}=([e,t]=i(()=>E("/api/umbraco/get",{query:{slug:"404"},headers:{"Accept-Language":v}},"$A-OcXL16MI")),e=await e,t(),e);u.value=b.value,n.value&&(console.error("Error fetching 404 page",n.value),handleError("404",n.value)),a.value=$.value||null,p.value=((m=a.value)==null?void 0:m.properties)||null}else handleError(r,s.value);else((g=o.value)==null?void 0:g.status)==="redirect"?([e,t]=i(()=>I(o.value.location,{})),await e,t()):(a.value=((h=o.value)==null?void 0:h[0])||null,p.value=((C=(w=a.value)==null?void 0:w[0])==null?void 0:C.properties)||null);const l=N("routeData");l.value=a.value}return(o,y)=>{const s=P,l=F;return d(a)?(k(),B("div",S,[d(u)!=="success"?(k(),D(s,{key:0})):x("",!0),R(l,{component:d(a)},null,8,["component"])])):x("",!0)}}};export{O 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.