1import{j as e}from"./vendor-ui-ihy8RoKU.js";import{r as c,L as j,k as ee}from"./vendor-react-B2ng-oX_.js";import{i as E,a as P,b as v,s as te,c as B,h as ae,d as R,j as M,k as re,B as se,e as oe,f as ne,l as ie,m as le}from"./imageMetadata-Bw8IbZAF.js";import{I as de,B as V,u as ce,aX as me,aY as ue}from"./index-CU5O_Ncp.js";import{A as pe}from"./AirbnbFeeCalculator-BxOjFezj.js";import{u as ge,t as xe,z as T}from"./zod-BfQC0u6_.js";import{s as he}from"./feedbackService-DcsmwmUu.js";import{a as fe}from"./appLinks-D1oqDR5R.js";import be from"./NotFound-BjGVE0Ak.js";import{M as U,r as H,a as F,b as O}from"./vendor-blog-BTnqw0Xk.js";import"./vendor-charts-ByiLzC1b.js";function je({sections:a}){const[t,n]=c.useState(null);if(c.useEffect(()=>{if(a.length===0)return;const o=a.map(i=>document.getElementById(i.id)).filter(i=>i!==null);if(o.length===0)return;const d=new IntersectionObserver(i=>{const m=i.filter(x=>x.isIntersecting);if(m.length===0)return;const g=m.reduce((x,y)=>x.boundingClientRect.top<y.boundingClientRect.top?x:y);n(g.target.id)},{rootMargin:"-96px 0px -68% 0px",threshold:0});return o.forEach(i=>d.observe(i)),()=>d.disconnect()},[a]),a.length<2)return null;const l=a.map((o,d)=>{if(E(o.title))return null;const i=a.slice(0,d+1).filter(m=>!E(m.title)).length;return String(i).padStart(2,"0")}),s=(o,d)=>{o.preventDefault();const i=document.getElementById(d);i&&(i.scrollIntoView({behavior:"smooth",block:"start"}),window.history.replaceState(null,"",`#${d}`),n(d))};return e.jsx("aside",{className:"absolute right-full top-0 hidden h-full xl:block",children:e.jsxs("nav",{"aria-label":"Contenido del artÃculo",className:"sticky top-28 mr-20 w-48 2xl:mr-24 2xl:w-52",children:[e.jsx("p",{className:"mb-3 font-mono text-[0.625rem] uppercase tracking-[0.2em] text-muted-foreground/70",children:"En esta nota"}),e.jsx("ol",{className:"border-l border-border",children:a.map((o,d)=>e.jsx("li",{children:e.jsxs("a",{href:`#${o.id}`,onClick:i=>s(i,o.id),className:`-ml-px flex gap-2 border-l-2 py-1.5 pl-3 font-mono text-xs leading-snug transition-colors ${t===o.id?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[e.jsx("span",{className:"tabular-nums opacity-50",children:l[d]??"·"}),e.jsx("span",{className:"text-pretty",children:o.title})]})},o.id))})]})})}const ye=T.object({email:T.string().min(1,"Dejanos tu email").email("Email inválido")});function Ne({location:a,onSuccess:t}){const[n,l]=c.useState(!1),[s,o]=c.useState(!1),{register:d,handleSubmit:i,formState:{errors:m,isSubmitting:g}}=ge({resolver:xe(ye),defaultValues:{email:""}}),x=async({email:y})=>{o(!1);const k=y.trim();try{await he({name:"",email:k,type:"other",message:a?`newsletter:${a}`:"newsletter",source:"newsletter"}),l(!0),t?.(k)}catch{o(!0)}};return e.jsxs("aside",{className:"mt-16 rounded-lg border border-border bg-muted/30 p-6 sm:p-8",children:[e.jsx("p",{className:"font-mono text-[0.6875rem] uppercase tracking-[0.2em] text-muted-foreground",children:"Newsletter"}),n?e.jsx("p",{className:"mt-3 max-w-[34rem] font-serif text-2xl leading-snug text-foreground",children:"¡Listo! Te vas a enterar de las próximas notas."}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-3 max-w-[34rem] font-serif text-2xl leading-snug text-foreground",children:"Una nota nueva cada tanto. Sin spam."}),e.jsx("p",{className:"mt-2 max-w-[34rem] text-sm leading-relaxed text-muted-foreground",children:"Novedades del blog y del producto para operar tu alquiler temporal con menos vueltas. Te podés dar de baja cuando quieras."}),e.jsxs("form",{onSubmit:i(x),noValidate:!0,className:"mt-5 flex flex-col gap-3 sm:flex-row sm:items-start",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(de,{type:"email",inputMode:"email",autoComplete:"email",placeholder:"[email protected]","aria-label":"Tu email","aria-invalid":m.email?"true":"false",...d("email")}),(m.email||s)&&e.jsx("p",{className:"mt-1.5 text-xs text-destructive",children:m.email?.message??"No pudimos guardarte. Probá de nuevo en un momento."})]}),e.jsx(V,{type:"submit",loading:g,className:"sm:px-6",children:g?"Enviandoâ¦":"Suscribirme"})]})]})]})}const z="font-mono text-[0.625rem] uppercase tracking-[0.2em] text-muted-foreground
1/70 transition-colors group-hover:text-primary",D="mt-2 font-serif text-lg font-semibold leading-snug text-foreground transition-colors group-hover:text-primary";function we({adjacent:a,onSelect:t}){const{newer:n,older:l}=a;return!n&&!l?null:e.jsxs("nav",{"aria-label":"Más notas del blog",className:"mt-16 grid grid-cols-2 gap-6 border-t border-border pt-8",children:[n?e.jsxs(j,{to:`/blog/${n.metadata.slug}`,onClick:()=>t?.(n.metadata.slug,"newer"),className:"group flex flex-col",children:[e.jsx("span",{className:z,children:"â Nota más reciente"}),e.jsx("span",{className:D,children:n.metadata.title})]}):e.jsx("span",{}),l?e.jsxs(j,{to:`/blog/${l.metadata.slug}`,onClick:()=>t?.(l.metadata.slug,"older"),className:"group flex flex-col items-end text-right",children:[e.jsx("span",{className:z,children:"Nota más antigua â"}),e.jsx("span",{className:D,children:l.metadata.title})]}):e.jsx("span",{})]})}function ve({posts:a,onSelect:t}){return a.length===0?null:e.jsxs("section",{className:"mt-20","aria-labelledby":"related-posts-title",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-4 border-b border-foreground
1/15 pb-3",children:[e.jsx("h2",{id:"related-posts-title",className:"font-mono text-[0.6875rem] uppercase tracking-[0.2em] text-muted-foreground",children:"Seguà leyendo"}),e.jsx(j,{to:"/blog",className:"font-mono text-[0.6875rem] uppercase tracking-[0.16em] text-muted-foreground transition-colors hover:text-foreground",children:"Ver todo"})]}),e.jsx("ol",{className:"divide-y divide-border",children:a.map((n,l)=>{const{metadata:s}=n,o=s.tags?.[0];return e.jsx("li",{children:e.jsxs(j,{to:`/blog/${s.slug}`,onClick:()=>t?.(s.slug),className:"group flex items-start gap-4 py-5 sm:gap-6",children:[e.jsx("span",{"aria-hidden":"true",className:"mt-1 font-mono text-xs tabular-nums text-muted-foreground/70 transition-colors group-hover:text-primary",children:String(l+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"font-serif text-xl font-semibold leading-snug text-foreground decoration-primary/40 underline-offset-4 group-hover:underline",children:s.title}),e.jsxs("p",{className:"mt-1.5 font-mono text-[0.6875rem] uppercase tracking-[0.14em] text-muted-foreground",children:[o?`${o} · `:"",P(n.content)," min"]})]}),s.image&&e.jsx("img",{src:s.image,alt:"",width:v(s.image)?.width,height:v(s.image)?.height,loading:"lazy",decoding:"async",fetchPriority:"low",className:"hidden h-14 w-20 shrink-0 rounded-sm object-cover grayscale transition duration-300 group-hover:grayscale-0 sm:block"})]})},s.slug)})})]})}const C="font-mono text-[0.6875rem] uppercase tracking-[0.16em] text-muted-foreground transition-colors hover:text-foreground";function ke({title:a}){const[t,n]=c.useState(!1),l=typeof window<"u"?window.location.href:"",s=`${a} ${l}`,o=`https://twitter.com/intent/tweet?text=${encodeURIComponent(a)}&url=${encodeURIComponent(l)}`,d=`https://wa.me/?text=${encodeURIComponent(s)}`,i=async()=>{try{await navigator.clipboard.writeText(l),n(!0),window.setTimeout(()=>n(!1),2e3)}catch{}},m=e.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground/40",children:"·"});return e.jsxs("div",{className:"mt-16 flex flex-wrap items-center gap-x-3 gap-y-2 border-t border-border pt-6",children:[e.jsx("span",{className:"font-mono text-[0.625rem] uppercase tracking-[0.2em] text-muted-foreground/70",children:"Compartir"}),e.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:C,children:"X"}),m,e.jsx("a",{href:d,...fe(),className:C,children:"WhatsApp"}),m,e.jsx("button",{type:"button",onClick:i,className:C,children:t?"¡Copiado!":"Copiar link"})]})}function G(a){return a.type==="text"?a.value??"":(a.children??[]).map(G).join("")}function J(){return a=>{const t=new Set;let n=0;const l=s=>{if(s.tagName==="h2"){const o=G(s),d=te(o)||"seccion";let i=d;for(let m=2;t.has(i);m+=1)i=`${d}-${m}`;t.add(i),s.properties={...s.properties??{},id:i},E(o)||(n+=1,s.children=[{type:"element",tagName:"span",properties:{className:["section-index"],"aria-hidden":"true"},children:[{type:"text",value:String(n).padStart(2,"0")}]},...s.children??[]])}(s.children??[]).forEach(l)};return l(a),a}}const W="nueva-comision-airbnb-155-recalcular-precios-neto",Se={Santiago:"Más de diez años administrando alquileres temporarios en Argentina. Fundador de yoHost, donde ordena reservas, gastos y rentabilidad multi-moneda de su propia cartera y la de otros anfitriones."},Ce=()=>{const[a,t]=c.useState(0);return c.useEffect(()=>{let n=0;const l=()=>{n=0;const o=document.documentElement.scrollHeight-window.innerHeight;t(o>0?Math.min(1,window.scrollY/o):0)},s=()=>{n===0&&(n=window.requestAnimationFrame(l))};return l(),window.addEventListener("scroll",s,{passive:!0}),window.addEventListener("resize",s,{passive:!0}),()=>{n!==0&&window.cancelAnimationFrame(n),window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[]),e.jsx("div",{className:"fixed inset-x-0 top-0 z-[60] h-0.5 bg-transparent","aria-hidden":"true",children:e.jsx("div",{className:"h-full origin-left bg-primary transition-transform duration-100 ease-out",style:{transform:`scaleX(${a})`}})})},Te=()=>{const{slug:a}=ee(),[t,n]=c.useState(void 0),[l,s]=c.useState([]),[o,d]=c.useState({}),[i,m]=c.useState(!0),{track:g}=ce();c.useEffect(()=>{(async()=>
1{if(a)try{const p=await ne(),h=p.find(f=>f.metadata.slug===a);n(h),s(h?ie(h,p,3):[]),d(h?le(h,p):{})}catch(p){console.error("Error loading post:",p)}finally{m(!1)}})()},[a]),c.useEffect(()=>{t&&g("blog_post_view",{slug:t.metadata.slug,title:t.metadata.title})},[t,g]),c.useEffect(()=>{if(!t)return;const r="https://yohost.app",p=`${r}/blog/${t.metadata.slug}`,h=t.metadata.image?`${r}${t.metadata.image}`:`${r}${me}`;ue({title:`${t.metadata.title} | yoHost.`,socialTitle:t.metadata.title,description:t.metadata.description??"",canonical:p,image:h,type:"article",robots:"index, follow"});const f=document.querySelector("#blogpost-ld-json")??document.createElement("script");f.type="application/ld+json",f.id="blogpost-ld-json",f.textContent=JSON.stringify({"@context":"https://schema.org","@type":"BlogPosting",headline:t.metadata.title,description:t.metadata.description??"",datePublished:t.metadata.date,dateModified:t.metadata.updated??t.metadata.date,author:{"@type":"Person",name:t.metadata.author??"Santiago",url:`${r}/sobre`},wordCount:ae(t.content),timeRequired:`PT${P(t.content)}M`,keywords:(t.metadata.tags??[]).join(", "),articleSection:B(R(t))?.label??"Alquiler temporal",publisher:{"@type":"Organization",name:"yoHost.",url:r,logo:{"@type":"ImageObject",url:`${r}/logo.png`}},image:[h],mainEntityOfPage:{"@type":"WebPage","@id":p},url:p,inLanguage:"es-AR"}),document.head.appendChild(f);const w=document.querySelector("#blog-breadcrumb-ld-json")??document.createElement("script");w.type="application/ld+json",w.id="blog-breadcrumb-ld-json",w.textContent=JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:r},{"@type":"ListItem",position:2,name:"Blog",item:`${r}/blog`},{"@type":"ListItem",position:3,name:t.metadata.title,item:p}]}),document.head.appendChild(w);const N=document.querySelector('link[rel="alternate"][type="text/markdown"]')??document.createElement("link");N.rel="alternate",N.type="text/markdown",N.href=`/blog/posts/${t.metadata.slug}.md`,N.title=`Markdown version: ${t.metadata.title}`,document.head.appendChild(N);const I=M(t.metadata.faq);let b=null;return I.length>0&&(b=document.querySelector("#blog-faq-ld-json")??document.createElement("script"),b.type="application/ld+json",b.id="blog-faq-ld-json",b.textContent=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:I.map(L=>
1({"@type":"Question",name:L.q,acceptedAnswer:{"@type":"Answer",text:L.a}}))}),document.head.appendChild(b)),()=>{f.parentNode===document.head&&document.head.removeChild(f),w.parentNode===document.head&&document.head.removeChild(w),N.parentNode===document.head&&document.head.removeChild(N),b&&b.parentNode===document.head&&document.head.removeChild(b)}},[t]);const x=c.useMemo(()=>re(t?.content??""),[t]),y=c.useMemo(()=>M(t?.metadata.faq),[t]),[k,$]=c.useMemo(()=>{const r=t?.content??"";if(t?.metadata.slug!==W)return[r,""];const p=r.search(/\n## /);return p===-1?[r,""]:[r.slice(0,p),r.slice(p)]},[t]);if(i)return e.jsx("div",{className:"blog-paper min-h-screen bg-background",children:e.jsx("div",{className:"container mx-auto max-w-[46rem] px-5 pt-36",children:e.jsxs("div",{className:"animate-pulse space-y-5",children:[e.jsx("div",{className:"h-3 w-24 rounded bg-muted"}),e.jsx("div",{className:"h-12 w-11/12 rounded bg-muted"}),e.jsx("div",{className:"h-12 w-2/3 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-1/2 rounded bg-muted"}),e.jsx("div",{className:"mt-10 h-80 rounded-lg bg-muted"})]})})});if(!t)return e.jsx(be,{});const{metadata:u}=t,[Q,X,K]=u.date.split("-").map(Number),Y=new Date(Q,X-1,K).toLocaleDateString("es-AR",{year:"numeric",month:"long",day:"numeric"}),Z=P(t.content),_=u.image?v(u.image):void 0,q=Se[u.author],A={img:r=>e.jsx("img",{...r,width:v(r.src)?.width,height:v(r.src)?.height,loading:"lazy",decoding:"async",fetchPriority:"low"}),a:r=>e.jsx("a",{...r,target:r.href?.startsWith("http")?"_blank":void 0,rel:r.href?.startsWith("http")?"noopener noreferrer":void 0})},S=B(R(t));return e.jsxs("div",{className:"blog-paper min-h-screen bg-background",children:[e.jsx(Ce,{}),e.jsx(se,{showBlogLink:!0,showBackButton:!0}),e.jsxs("article",{className:"animate-[fadeInUp_0.5s_cubic-bezier(0.23,1,0.32,1)_both]",children:[e.jsxs("header",{className:"container mx-auto max-w-[46rem] px-5 pt-28 md:pt-36",children:[e.jsx(j,{to:"/blog",className:"font-mono text-[0.6875rem] uppercase tracking-[0.2em] text-muted-foreground transition-colors hover:text-foreground",children:"â Blog"}),S&&e.jsx(j,{to:`/blog?tema=${S.key}`,className:"mt-6 block font-mono text-[0.6875rem] uppercase tracking-[0.2em] text-primary transition-colors hover:text-primary/75",children:S.label}),e.jsx("h1",{className:"mt-3 font-serif text-[2.125rem] font-semibold leading-[1.08] tracking-[-0.015em] text-foreground sm:text-[2.5rem] sm:leading-[1.06] md:text-[3.5rem]",children:u.title}),e.jsx("p",{className:"mt-5 max-w-[42rem] text-lg leading-relaxed text-muted-foreground md:text-xl",children:u.description}),e.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-x-3 gap-y-1 border-t border-border pt-4 font-mono text-[0.6875rem] uppercase tracking-[0.16em] text-muted-foreground",children:[e.jsx("span",{className:"text-foreground",children:u.author}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("time",{dateTime:u.date,children:Y}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsxs("span",{children:[Z," min de lectura"]})]})]}),u.image&&e.jsx("div",{className:"container mx-auto mt-10 max-w-[64rem] px-5 md:mt-14",children:e.jsx("img",{src:u.image,alt:u.title,width:_?.width,height:_?.height,loading:"eager",decoding:"async",fetchPriority:"high",className:"aspect-[16/9] w-full rounded-lg object-cover md:aspect-[16/7]"})}),e.jsxs("div",{className:"relative mx-auto w-full max-w-[44rem] px-5 pb-24",children:[e.jsx(je,{sections:x}),e.jsx("div",{className:"blog-article blog-article--lead mt-12 md:mt-16",children:e.jsx(U,{remarkPlugins:[O],rehypePlugins:[H,F,J],components:A,children:k})}),u.slug===W&&e.jsx(pe,{}),$&&e.jsx("div",{className:"blog-article",children:e.jsx(U,{remarkPlugins:[O],rehypePlugins:[H,F,J],components:A,children:$})}),y.length>0&&e.jsxs("section",{className:"mt-20 border-t border-foreground
1/15 pt-8","aria-labelledby":"faq-title",children:[e.jsx("h2",{id:"faq-title",className:"font-mono text-[0.6875rem] uppercase tracking-[0.2em] text-muted-foreground",children:"Preguntas frecuentes"}),e.jsx("dl",{className:"mt-6 divide-y divide-border",children:y.map(r=>e.jsxs("div",{className:"py-5",children:[e.jsx("dt",{className:"font-serif text-xl font-semibold leading-snug text-foreground",children:r.q}),e.jsx("dd",{className:"mt-2 font-serif text-[1.0625rem] leading-relaxed text-foreground/75",children:r.a})]},r.q))})]}),e.jsx(ke,{title:u.title}),q&&e.jsxs("aside",{className:"mt-14 border-t border-border pt-8",children:[e.jsx("p",{className:"font-mono text-[0.625rem] uppercase tracking-[0.2em] text-muted-foreground/70",children:"Quién escribe"}),e.jsx("p",{className:"mt-3 font-serif text-xl font-semibold text-foreground",children:u.author}),e.jsx("p",{className:"mt-2 max-w-[34rem] text-sm leading-relaxed text-muted-foreground",children:q}),e.jsx(j,{to:"/sobre",className:"mt-4 inline-block font-mono text-[0.6875rem] uppercase tracking-[0.16em] text-muted-foreground transition-colors hover:text-foreground",children:"Sobre yoHost â"})]}),e.jsx(ve,{posts:l,onSelect:r=>g("related_post_click",{from_slug:u.slug,to_slug:r})}),e.jsx(we,{adjacent:o,onSelect:(r,p)=>g("post_nav_click",{from_slug:u.slug,to_slug:r,direction:p})}
1),e.jsxs("aside",{className:"mt-20 border-t border-foreground/15 pt-8",children:[e.jsx("p",{className:"font-mono text-[0.6875rem] uppercase tracking-[0.2em] text-muted-foreground",children:"yoHost."}),e.jsx("p",{className:"mt-3 max-w-[34rem] font-serif text-2xl leading-snug text-foreground",children:"Poné en práctica lo que acabás de leer."}),e.jsx("p",{className:"mt-3 max-w-[34rem] text-sm leading-relaxed text-muted-foreground",children:"Reservas de Airbnb, Booking y directas en un solo calendario, tus números reales por propiedad, qué hay que hacer hoy, la agenda del equipo y un bot de WhatsApp. Tus datos, tu negocio âno el de la plataforma."}),e.jsx("div",{className:"mt-6",children:e.jsx(j,{to:"/signup",onClick:()=>g("signup_click",{location:"blog_post_footer"}),children:e.jsx(V,{className:"px-6 py-5 text-base",children:"Comenzar gratis"})})})]}),e.jsx(Ne,{location:"blog_post_footer",onSuccess:()=>g("newsletter_signup",{location:"blog_post_footer"})})]})]}),e.jsx(oe,{})]})};export{Te 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.