Files
kaiser-natron/dist/assets/KaiserhacksPage-Csq0whaA.js
2026-05-26 13:26:36 -05:00

1 line
4.3 KiB
JavaScript

import{B as e,C as t,G as n,S as r,c as i,ft as a,i as o,j as s,l as c,m as l,o as u,r as d,s as f,u as p,x as m}from"./runtime-core.esm-bundler-DTXUv7Wx.js";import{s as h,t as g}from"./runtime-dom.esm-bundler-CXLmyuFK.js";import{o as _}from"./vue-router-Cyqru1db.js";import{t as v}from"./IconButton-DXYRXEop.js";import{t as y}from"./i18n-BPHBAYJ6.js";import{r as b}from"./products-BqW5PUnm.js";import{c as x,d as S,f as C,p as w,u as T}from"./api-Dmuwbd_X.js";import{n as E,t as D}from"./kaiserhacks-BdBDSw0q.js";import{t as O}from"./Navbar-DzWL8tVE.js";import{t as k}from"./CartDrawer-B5-Oi-Om.js";import{t as A}from"./Footer-BgNIDT7a.js";import{t as j}from"./Kaiserhacks-DMjGIVx-.js";var M=[`aria-label`],N={class:`relative my-auto flex max-h-[calc(100svh-2rem)] w-full max-w-[min(430px,calc(100vw-2rem))] flex-col overflow-hidden rounded-md bg-paper shadow-lg sm:max-h-[calc(100svh-3rem)] sm:max-w-[min(430px,calc(100vw-3rem))]`},P={class:`absolute right-3 top-3 z-10`},F={class:`relative aspect-[9/16] h-[min(62svh,640px)] max-h-[calc(100svh-14rem)] min-h-0 w-full shrink overflow-hidden bg-ink`},I=[`poster`],L=[`src`],ee={class:`shrink-0 p-5`},R={class:`eyebrow mb-2`},z={class:`font-display text-2xl font-normal leading-tight text-ink`},B={class:`mt-2 text-sm leading-relaxed text-muted`},V={__name:`KaiserhacksPage`,setup(V){let{t:H}=y(),U=w(),W=_(),G=e(!1),K=e(null),q=e(null),J=[{key:`nav.shop`,href:`/shop`},{key:`nav.bundles`,href:`/#bundles`},{key:`nav.revitalization`,href:`/#revitalize`},{key:`nav.about`,href:`/#about`},{key:`nav.kaiserhacks`,href:`/kaiserhacks`}],Y=[],X=u(()=>E(D,H)),Z=u(()=>({categories:H(`kaiserhacks.labels.categories`),categoryNav:H(`kaiserhacks.labels.categoryNav`),openVideo:H(`kaiserhacks.labels.openVideo`),community:H(`kaiserhacks.labels.community`),handoffNote:H(`kaiserhacks.labels.handoffNote`)})),Q=null;function $(){let e=q.value,t=e&&(e.$el||e);if(!t||typeof window>`u`)return;let n=Math.round(t.getBoundingClientRect().height);document.documentElement.style.setProperty(`--nav-h`,`${n}px`)}function te(){G.value=!1,W.push(`/checkout`)}async function ne(e){await x(e.id,1),G.value=!0}function re(e){e?.video?.src&&(K.value=e)}async function ie({productId:e,quantity:t}){await C(e,t)}async function ae(e){await S(e)}return r(()=>{if(T(),$(),typeof ResizeObserver<`u`&&q.value){let e=q.value.$el||q.value;Q=new ResizeObserver($),Q.observe(e)}window.addEventListener(`resize`,$)}),m(()=>{Q&&Q.disconnect(),typeof window<`u`&&window.removeEventListener(`resize`,$)}),(e,r)=>(t(),p(d,null,[l(O,{ref_key:`navRef`,ref:q,variant:`brand`,layout:`standard`,items:J,"secondary-items":Y,"cart-count":n(U).count,products:n(b),onCart:r[0]||=e=>G.value=!0,onSearch:ne},null,8,[`cart-count`,`products`]),l(j,{eyebrow:X.value.eyebrow,headline:X.value.headline,sub:X.value.sub,categories:X.value.categories,"instagram-href":X.value.instagramHref,labels:Z.value,onSelect:re},null,8,[`eyebrow`,`headline`,`sub`,`categories`,`instagram-href`,`labels`]),l(A),(t(),i(o,{to:`body`},[l(g,{"enter-active-class":`transition duration-slow ease-out`,"enter-from-class":`opacity-0`,"enter-to-class":`opacity-100`,"leave-active-class":`transition duration-base ease-out`,"leave-from-class":`opacity-100`,"leave-to-class":`opacity-0`},{default:s(()=>[K.value?(t(),p(`div`,{key:0,class:`fixed inset-0 z-50 flex items-center justify-center overflow-y-auto bg-ink/70 p-4 sm:p-6`,role:`dialog`,"aria-modal":`true`,"aria-label":K.value.title,onClick:r[2]||=h(e=>K.value=null,[`self`])},[f(`div`,N,[f(`div`,P,[l(v,{icon:`close`,variant:`float`,size:`sm`,"aria-label":n(H)(`menu.close`),onClick:r[1]||=e=>K.value=null},null,8,[`aria-label`])]),f(`div`,F,[(t(),p(`video`,{key:K.value.id,class:`absolute inset-0 h-full w-full bg-ink object-contain`,poster:K.value.video?.poster,controls:``,autoplay:``,playsinline:``},[f(`source`,{src:K.value.video.src,type:`video/mp4`},null,8,L)],8,I))]),f(`div`,ee,[f(`p`,R,a(n(H)(`nav.kaiserhacks`)),1),f(`h2`,z,a(K.value.title),1),f(`p`,B,a(K.value.description),1)])])],8,M)):c(``,!0)]),_:1})])),r[4]||=f(`div`,{"aria-hidden":`true`,class:`min-[1100px]:hidden bg-cream`,style:{height:`calc(100px + env(safe-area-inset-bottom))`}},null,-1),l(k,{modelValue:G.value,"onUpdate:modelValue":r[3]||=e=>G.value=e,items:n(U).items,subtotal:n(U).subtotal,count:n(U).count,onUpdateQuantity:ie,onRemove:ae,onCheckout:te},null,8,[`modelValue`,`items`,`subtotal`,`count`])],64))}};export{V as default};