PageSourceSearch

https://store.villacreek.com/assets/product-detail-v2-CrwBM17O.js

js villacreek.com collected 2026-10-03 21:41:57 UTC 27,334 bytes, 4 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7680e986-f529-5504-b836-6a8a3dbc2121")}catch(e){}}();
3(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`10598714e174bf0a729243e945712fc0f279887d`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`3e27beca-aed2-4a58-8b5f-e5ecead15bea`,e._sentryDebugIdIdentifier=`sentry-dbid-3e27beca-aed2-4a58-8b5f-e5ecead15bea`)}catch{}})();import{r as e}from"./chunk-CGskIDkR.js";import{t}from"./react-DMp1iRRw.js";import{t as n}from"./jsx-runtime-C5gMzgs6.js";import{t as r}from"./cn-DkYPm3c-.js";import{t as i}from"./arrow-left-CkvdOCDd.js";import{t as a}from"./check-BF2JVNq4.js";import{t as o}from"./fv2-controls-GAIL57HN.js";import{a as s,i as c,n as l}from"./storefront-shell-v2-D_S_FUn5.js";import{t as ee}from"./shield-check-DK1U0964.js";import{t as te}from"./truck-Cd1ypc31.js";import{t as u}from"./assert-never-DySKl8_4.js";import{t as d}from"./fv2-button-BhugzEuE.js";import{t as f}from"./fv2-card-BecrpZw0.js";import{a as p,i as m,r as h,t as g}from"./copy-text-DAomag72.js";import{t as _}from"./fv2-product-image-3FuwWhPQ.js";import{t as v}from"./fv2-qty-stepper-CMo3viov.js";import{t as y}from"./storefront-bundle-copy-B_2dl8m6.js";import{c as ne,d as b,i as re,n as x,r as ie,t as S,u as C}from"./storefront-bundle-model-BnpjbCrk.js";import{n as w}from"./storefront-v2-format-BHndfA35.js";import{t as T}from"./digital-product-indicator-qQIRBNMK.js";import{f as E}from"./fv2-summary-BheEDO-m.js";var D=e=>e.catalogPriceCents+e.chosen.reduce((e,t)=>e+t.units*t.upchargeCents,0)+e.modifierDeltasCents.reduce((e,t)=>e+t,0),O=b,k=(e,t)=>e[t]??0,A=(e,t)=>e.candidates.reduce((e,n)=>e+k(t,n.id),0),j=(e,t)=>{switch(e.type){case`pending`:return{type:`checking`};case`failed`:return{type:`unread`};case`settled`:return e.candidateStock[t]??{type:`unbounded`};default:return u(e)}},M=e=>{switch(e.type){case`checking`:case`unread`:case`unbounded`:case`low`:return null;case`sold-out`:return`sold-out`;case`withdrawn`:return`withdrawn`;default:return u(e)}},ae=(e,t)=>{let n=j(e,t);switch(n.type){case`checking`:return{message:O.choice.checkingStock,tone:`pending`};case`unread`:case`unbounded`:return null;case`low`:return{message:O.choice.onlyNLeft(n.remaining),tone:`warning`};case`sold-out`:return{message:O.choice.soldOut,tone:`error`};case`withdrawn`:return{message:O.choice.withdrawn,tone:`error`};default:return u(n)}},oe=e=>e.type===`settled`&&e.verdict.type===`low-by-group`?O.choice.lowByGroup(e.verdict.remaining,e.verdict.groupName):null,N=e=>e.candidateCap===1,se=e=>N(e)?O.choice.distinctPicks(e.min,e.max,e.candidates.length):O.choice.unitCount(e.min,e.max),ce=(e,t)=>{let n=A(e,t);return{text:n>e.min&&e.max>e.min?O.choice.progressBeyondMin(n,e.max):O.choice.progress(n,e.min),satisfied:n>=e.min&&n<=e.max}},P=(e,t)=>{switch(t.type){case`checking`:case`unread`:case`unbounded`:return null;case`low`:return Math.floor(t.remaining/e.quantityPerUnit);case`sold-out`:case`withdrawn`:return 0;default:return u(t)}},F=(e,t,n,r)=>{let i=j(r,n.id);if(M(i)!==null)return 0;let a=k(t,n.id),o=e.max-A(e,t),s=a+Math.max(0,o),c=e.candidateCap===null?s:Math.min(e.candidateCap,s),l=P(n,i);return l===null?c:Math.min(c,l)},I=(e,t,n,r,i)=>{let a=e.candidates.find(e=>e.id===n);if(a===void 0)return t;let o=r<=k(t,n)?Math.max(0,r):Math.min(r,F(e,t,a,i)),s=Object.fromEntries(Object.entries(t).filter(([e])=>e!==n));return o===0?s:{...s,[n]:o}},L=e=>e.min>=1,R=e=>e.max===1,z=(e,t)=>e.modifiers.map(e=>e.id).filter(e=>t.includes(e)),B=(e,t,n)=>t.includes(n.id)||R(e)||z(e,t).length<e.max,le=(e,t,n)=>{if(t.includes(n))return R(e)&&L(e)?t:t.filter(e=>e!==n);let r=e.modifiers.find(e=>e.id===n);if(r===void 0)return t;if(R(e)){let r=new Set(z(e,t));return[...t.filter(e=>!r.has(e)),n]}return B(e,t,r)?[...t,n]:t},ue=e=>O.modifier.instruction(e.min,e.max),V=(e,t,n,r)=>{let i=M(r);switch(i){case`sold-out`:return O.choice.soldOutRefused(t.name,e.name);case`withdrawn`:return O.choice.withdrawnRefused(t.name,e.name);case null:{let i=P(t,r);return i!==null&&n>
3i?O.choice.stockShortRefused(t.name,e.name,i):null}default:return u(i)}},H=(e,t,n)=>{let r=new Set(e.flatMap(e=>e.candidates.map(e=>e.id)));if(Object.entries(t).some(([e,t])=>t>0&&!r.has(e)))return{type:`blocked`,reason:O.choice.staleChoiceRefused,tone:`error`};for(let r of e){for(let e of r.candidates){let i=k(t,e.id);if(i===0)continue;if(r.candidateCap!==null&&i>r.candidateCap)return{type:`blocked`,reason:O.choice.overCapRefused(e.name,r.name,r.candidateCap),tone:`error`};let a=V(r,e,i,j(n,e.id));if(a!==null)return{type:`blocked`,reason:a,tone:`error`}}let e=A(r,t);if(e>r.max)return{type:`blocked`,reason:O.choice.overMaximumRefused(r.name,r.max),tone:`error`};if(e<r.min)return{type:`blocked`,reason:O.choice.chooseMore(r.min-e,r.name),tone:`info`}}return{type:`ready`}},U=(e,t)=>{let n=new Set(e.flatMap(e=>e.modifiers.map(e=>e.id)));if(t.some(e=>!n.has(e)))return{type:`blocked`,reason:O.modifier.staleModifierRefused,tone:`error`};for(let n of e){let e=z(n,t).length;if(e>n.max)return{type:`blocked`,reason:O.modifier.overMaximumRefused(n.name,n.max),tone:`error`};if(e<n.min)return{type:`blocked`,reason:O.modifier.chooseRequired(n.name,n.min-e),tone:`info`}}return{type:`ready`}},de=(e,t,n)=>{switch(t.type){case`pending`:return{type:`blocked`,reason:y.pdp.checkingAvailability,tone:`info`};case`failed`:return{type:`blocked`,reason:y.pdp.availabilityUnavailable,tone:`error`};case`settled`:switch(t.verdict.type){case`available`:case`low-by-group`:return H(e,n,t);case`limited-by-group`:return{type:`blocked`,reason:O.choice.limitedByGroup(t.verdict.groupName),tone:`error`};case`sold-out`:return{type:`blocked`,reason:y.pdp.soldOut,tone:`error`};default:return u(t.verdict)}default:return u(t)}},W=(e,t,n)=>{switch(e.type){case`single`:case`bundle`:return{type:`ready`};case`configurable-bundle`:return de(e.groups,e.availability,t);case`modifiable`:return U(e.modifierGroups,n);default:return u(e)}},fe=(e,t,n,r)=>{switch(t.type){case`single`:case`bundle`:return D({catalogPriceCents:e,chosen:[],modifierDeltasCents:[]});case`configurable-bundle`:return D({catalogPriceCents:e,chosen:t.groups.flatMap(e=>e.candidates.map(e=>({units:k(n,e.id),upchargeCents:e.upchargeCents}))),modifierDeltasCents:[]});case`modifiable`:return D({catalogPriceCents:e,chosen:[],modifierDeltasCents:t.modifierGroups.flatMap(e=>e.modifiers.filter(e=>r.includes(e.id)).map(e=>e.deltaCents))});default:return u(t)}},G=n(),K=b,q={pending:`pg:text-[var(--text-secondary)]`,warning:`pg:text-warning-foreground`,error:`pg:text-error-foreground`};function J({candidate:e,availability:t}){let n=ae(t,e.id);return(0,G.jsxs)(`span`,{className:`pg:flex pg:min-w-0 pg:flex-col pg:gap-0.5`,children:[(0,G.jsxs)(`span`,{className:`pg:text-sm pg:text-[var(--text)]`,children:[(0,G.jsx)(g,{copy:p(`product.name`,e.name)}),e.formatLabel===null?null:(0,G.jsx)(g,{copy:p(`product.variationName`,e.formatLabel),className:`pg:ml-1.5 pg:text-[var(--text-secondary)]`}),e.quantityPerUnit===1?null:(0,G.jsx)(`span`,{className:`pg:ml-1.5 pg:text-[var(--text-secondary)]`,children:y.pdp.componentQuantity(e.quantityPerUnit)})]}),(0,G.jsxs)(`span`,{className:`pg:flex pg:flex-wrap pg:gap-x-3 pg:text-xs`,children:[e.upchargeCents===0?null:(0,G.jsx)(`span`,{className:`pg:text-[var(--text-secondary)]`,children:K.choice.upcharge(w(e.upchargeCents))}),n===null?null:(0,G.jsx)(`span`,{className:r(`pg:font-medium`,q[n.tone]),children:n.message})]})]})}var Y=`pg:flex pg:items-center pg:justify-between pg:gap-4 pg:rounded-[var(--radius)] pg:border-[length:var(--border-width)] pg:border-solid pg:px-4 pg:py-3`;function pe({group:e,candidate:t,availability:n,chosenUnits:i,onChosenUnitsChange:a}){let s=k(i,t.id)>0,c=F(e,i,t,n),l=!s&&c===0;return(0,G.jsxs)(`label`,{className:r(Y,`pg:cursor-pointer pg:has-[:disabled]:cursor-not-allowed pg:has-[:disabled]:opacity-60`,s?`pg:border-[var(--accent)] pg:bg-[color-mix(in_srgb,var(--accent)_8%,var(--surface))]`:`pg:border-[var(--border)] pg:bg-[var(--surface)]`),children:[(0,G.jsx)(J,{candidate:t,availability:n}),(0,G.jsx)(`input`,{type:`checkbox`,checked:s,disabled:l,onChange:()=>a?.(I(e,i,t.id,s?0:1,n)),className:r(`pg:h-5 pg:w-5 pg:shrink-0`,o)})]})}function me({group:e,candidate:t,availability:n,chosenUnits:i,onChosenUnitsChange:a}){let o=k(i,t.id);return(0,G.jsxs)(`div`,{className:r(Y,o>0?`pg:border-[var(--accent)] pg:bg-[color-mix(in_srgb,var(--accent)_8%,var(--surface))]`:`pg:border-[var(--border)] pg:bg-[var(--surface)]`),children:[(0,G.jsx)(J,{candidate:t,availability:n}),(0,G.jsx)(v,{purchase:o,wishlist:0,purchaseLimit:F(e,i,t,n),wishlistLimit:0,onChange:r=>a?.(I(e,i,t.id,r.purchase,n)),label:K.choice.candidateQuantityLabel(t.name),removeLabel:K.choice.removeOneLabel(t.name),addLabel:K.choice.addOneLabel(t.name)})]})}function he({group:e,availability:t,chosenUnits:n,onChosenUnitsChange:i}){let o=ce(e,n),s=N(e);return(0,G.jsxs)(`fieldset`,{className:`pg:m-0 pg:min-w-0 pg:border-0 pg:p-0`,"data-testid":`choice-group-${e.id}`,children:[(0,G.jsx)(`legend`,{className:`pg:flex pg:w-full pg:flex-wrap pg:items-baseline pg:justify-between pg:gap-x-4 pg:gap-y-1 pg:p-0`,children:(0,G.jsxs)(`span`,{children:[(0,G.jsx)(g,{copy:p(`product.choiceGroupName`,e.name),className:`pg:text-sm pg:font-semibold pg:text-[var(--text)]`}),(0,G.jsx)(`span`,{className:`pg:ml-2 pg:text-xs pg:text-[var(--text-secondary)]`,children:se(e)})]})}),(0,G.jsxs)(`p`,{role:`status`,className:r(`pg:mt-1 pg:flex pg:items-center pg:gap-1.5 pg:text-xs pg:font-medium`,o.satisfied?`pg:text-[var(--text)]`:`pg:text-[var(--text-secondary)]`),children:[o.satisfied?(0,G.jsx)(a,{size:14,"aria-hidden":`true`}):null,o.text]}),(0,G.jsx)(`div`,{className:`pg:mt-3 pg:grid pg:gap-2`,children:e.candidates.map(r=>s?(0,G.jsx)(pe,{group:e,candidate:r,availability:t,chosenUnits:n,onChosenUnitsChange:i},r.id):(0,G.jsx)(me,{group:e,candidate:r,availability:t,chosenUnits:n,onChosenUnitsChange:i},r.id))})]})}function ge({groups:e,availability:t,chosenUnits:n,onChosenUnitsChange:i}){let a=oe(t);return(0,G.jsxs)(`section`,{className:`pg:mt-7 pg:space-y-6 pg:border-t-[length:var(--border-width)] pg:border-solid pg:border-[var(--border)] pg:pt-5`,"data-testid":`storefront-choice-groups`,"aria-busy":t.type===`pending`,children:[a===null?null:(0,G.jsx)(`p`,{role:`status`,"data-testid":`storefront-choice-low-alert`,className:r(`pg:text-sm pg:font-medium`,q.warning),children:a}),e.map(e=>(0,G.jsx)(he,{group:e,availability:t,chosenUnits:n,onChosenUnitsChange:i},e.id))]})}var X=b;function _e({group:e,chosenModifierIds:t,onChosenModifierIdsChange:n}){let i=L(e),a=R(e)&&i?`radio`:`checkbox`;return(0,G.jsxs)(`fieldset`,{className:`pg:m-0 pg:min-w-0 pg:border-0 pg:p-0`,"data-testid":`modifier-group-${e.id}`,children:[(0,G.jsxs)(`legend`,{className:`pg:p-0`,children:[(0,G.jsx)(g,{copy:p(`product.modifierGroupName`,e.name),className:`pg:text-sm pg:font-semibold pg:text-[var(--text)]`}),(0,G.jsxs)(`span`,{className:`pg:ml-2 pg:text-xs pg:text-[var(--text-secondary)]`,children:[i?X.modifier.required:X.modifier.optional,` · `,ue(e)]})]}),(0,G.jsx)(`div`,{className:`pg:mt-3 pg:grid pg:gap-2`,children:e.modifiers.map(i=>{let s=t.includes(i.id);return(0,G.jsxs)(`label`,{className:r(`pg:flex pg:items-center pg:justify-between pg:gap-4 pg:rounded-[var(--radius)] pg:border-[length:var(--border-width)] pg:border-solid pg:px-4 pg:py-3 pg:text-sm pg:cursor-pointer pg:has-[:disabled]:cursor-not-allowed pg:has-[:disabled]:opacity-60`,s?`pg:border-[var(--accent)] pg:bg-[color-mix(in_srgb,var(--accent)_8%,var(--surface))]`:`pg:border-[var(--border)] pg:bg-[var(--surface)]`),children:[(0,G.jsxs)(`span`,{className:`pg:flex pg:items-center pg:gap-3`,children:[(0,G.jsx)(`input`,{type:a,name:e.id,checked:s,disabled:!B(e,t,i),onChange:()=>n?.(le(e,t,i.id)),className:r(`pg:h-5 pg:w-5 pg:shrink-0`,o)}),(0,G.jsx)(g,{copy:p(`product.modifierLabel`,i.label),className:`pg:text-[var(--text)]`})]}),i.deltaCents===0?null:(0,G.jsx)(`span`,{className:`pg:shrink-0 pg:text-[var(--text-secondary)]`,children:X.modifier.delta(w(i.deltaCents))})]},i.id)})})]})}function ve({groups:e,chosenModifierIds:t,onChosenModifierIdsChange:n}){return(0,G.jsx)(`section`,{className:`pg:mt-7 pg:space-y-6 pg:border-t-[length:var(--border-width)] pg:border-solid pg:border-[var(--border)] pg:pt-5`,"data-testid":`storefront-modifier-groups`,children:e.map(e=>(0,G.jsx)(_e,{group:e,chosenModifierIds:t,onChosenModifierIdsChange:n},e.id))})}var Z=e(t(),1),ye={},be=[];function xe({product:e,chosenUnits:t,chosenModifierIds:n,onChosenUnitsChange:r,onChosenModifierIdsChange:i}){let{composition:a}=e;switch(a.type){case`single`:case`bundle`:return null;case`configurable-bundle`:return(0,G.jsx)(ge,{groups:a.groups,availability:a.availability,chosenUnits:t,onChosenUnitsChange:r});case`modifiable`:return(0,G.jsx)(ve,{groups:a.modifierGroups,chosenModifierIds:n,onChosenModifierIdsChange:i});default:return u(a)}}var Se={info:`pg:text-[var(--text-secondary)]`,error:`pg:font-medium pg:text-error-foreground`};function Ce(){return(0,G.jsxs)(`div`,{className:`pg:mx-auto pg:grid pg:max-w-[1280px] pg:gap-10 pg:px-[clamp(16px,5vw,56px)] pg:py-10 pg:lg:grid-cols-2 pg:lg:py-16`,children:[(0,G.jsx)(l,{children:(0,G.jsx)(`div`,{className:`pg:aspect-[4/5]`})}),(0,G.jsxs)(`div`,{className:`pg:space-y-6 pg:py-4`,children:[(0,G.jsx)(l,{children:(0,G.jsx)(`div`,{className:`pg:h-4 pg:w-1/3`})}),(0,G.jsx)(l,{children:(0,G.jsx)(`div`,{className:`pg:h-16 pg:w-4/5`})}),(0,G.jsx)(l,{children:(0,G.jsx)(`div`,{className:`pg:h-5 pg:w-1/4`})}),(0,G.jsx)(l,{children:(0,G.jsx)(`div`,{className:`pg:h-24 pg:w-full`})})]})]})}function Q({title:e,message:t,onRetry:n}){return(0,G.jsxs)(`div`,{className:`pg:mx-auto pg:flex pg:min-h-[560px] pg:max-w-3xl pg:flex-col pg:items-center pg:justify-center pg:px-6 pg:text-center`,children:[(0,G.jsx)(`h1`,{className:`pg:[font-family:var(--font-display)] pg:text-[clamp(42px,7vw,72px)] pg:leading-none pg:text-[var(--text)]`,children:e}),(0,G.jsx)(`p`,{className:`pg:mt-5 pg:max-w-md pg:text-sm pg:leading-6 pg:text-[var(--text-secondary)]`,children:t}),n?(0,G.jsx)(d,{onClick:n,className:`pg:mt-7`,children:`Try again`}):null]})}function we({product:e}){return(0,G.jsx)(`div`,{className:`pg:relative pg:aspect-[4/5] pg:overflow-hidden pg:rounded-[var(--radius)] pg:border-[length:var(--border-width)] pg:border-solid pg:border-[var(--border)] pg:bg-[var(--surface)]`,children:e.imageUrl?(0,G.jsx)(_,{src:e.imageUrl,alt:``,fallback:(0,G.jsx)(s,{})}):(0,G.jsx)(s,{})})}function $({id:e,html:t,className:n}){let r=p(e,t);return(0,G.jsx)(`div`,{"data-copy-source":r.id,"data-copy-kind":r.kind,className:n,dangerouslySetInnerHTML:{__html:t}})}function Te({product:e}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`p`,{className:`pg:flex pg:flex-wrap pg:items-center pg:gap-x-2 pg:text-[11px] pg:font-semibold pg:tracking-[1.5px] pg:text-[var(--accent)]`,children:[e.vintage?(0,G.jsx)(g,{copy:m(`storefront.productVintage`,String(e.vintage))}):null,e.vintage&&e.varietal?(0,G.jsx)(`span`,{children:`·`}):null,e.varietal?(0,G.jsx)(g,{copy:p(`product.varietal`,e.varietal)}):null]}),(0,G.jsx)(g,{copy:p(`product.name`,e.name),as:`h1`,className:`pg:mt-3 pg:text-balance pg:[font-family:var(--font-display)] pg:text-[clamp(36px,4vw,56px)] pg:font-normal pg:leading-[1.06] pg:text-[var(--text)]`}),e.ava?(0,G.jsx)(g,{copy:p(`product.ava`,e.ava),as:`p`,className:`pg:mt-3 pg:text-sm pg:text-[var(--text-muted)]`}
3):null,e.shortDescription?(0,G.jsx)(g,{copy:p(`product.shortDescription`,e.shortDescription),as:`p`,className:`pg:mt-6 pg:max-w-xl pg:text-base pg:leading-7 pg:text-[var(--text-secondary)]`}):null,e.isDigital?(0,G.jsx)(T,{className:`pg:mt-3 pg:block`}):null]})}function Ee({product:e,selectedVariationId:t,onVariationChange:n}){return e.variations.length<=1?null:(0,G.jsxs)(`fieldset`,{className:`pg:mt-7`,children:[(0,G.jsx)(`legend`,{className:`pg:mb-3 pg:text-xs pg:font-semibold pg:text-[var(--text-secondary)]`,children:e.variationChoice===`format`?`Format`:`Options`}),(0,G.jsx)(`div`,{className:`pg:flex pg:flex-wrap pg:gap-2`,children:e.variations.map(e=>{let i=e.id===t;return(0,G.jsxs)(`button`,{type:`button`,disabled:!e.available,onClick:()=>n?.(e.id),"aria-pressed":i,className:r(`pg:flex pg:min-w-[148px] pg:items-center pg:justify-between pg:gap-3 pg:rounded-[var(--radius)] pg:border-[length:var(--border-width)] pg:border-solid pg:px-4 pg:py-3 pg:text-left pg:text-sm pg:cursor-pointer pg:disabled:cursor-not-allowed pg:disabled:opacity-50`,i?`pg:border-[var(--accent)] pg:bg-[color-mix(in_srgb,var(--accent)_8%,var(--surface))]`:`pg:border-[var(--border)] pg:bg-[var(--surface)]`,o),children:[(0,G.jsxs)(`span`,{children:[e.name===null?null:(0,G.jsx)(g,{copy:p(`product.variationName`,e.name)}),(0,G.jsx)(g,{copy:m(`storefront.productPrice`,w(e.priceCents)),className:`pg:mt-1 pg:block pg:text-xs pg:text-[var(--text-muted)]`})]}),i?(0,G.jsx)(a,{size:16,"aria-hidden":`true`}):null]},e.id)})})]})}function De({variation:e}){let t=w(e.priceCents),n=e.compareAtPriceCents===null?null:w(e.compareAtPriceCents),r=`pg:text-2xl pg:font-semibold pg:text-[var(--text)]`;return n===null?(0,G.jsx)(`p`,{className:`pg:mt-6`,children:(0,G.jsx)(g,{copy:m(`storefront.productPrice`,t),className:r})}):(0,G.jsxs)(`p`,{className:`pg:mt-6`,children:[(0,G.jsxs)(`span`,{"aria-hidden":`true`,className:`pg:flex pg:flex-wrap pg:items-baseline pg:gap-3`,children:[(0,G.jsx)(g,{copy:m(`storefront.productPrice`,t),className:r}),(0,G.jsx)(g,{copy:m(`storefront.productCompareAtPrice`,n),as:`s`,className:`pg:text-base pg:text-[var(--text-muted)] pg:line-through`})]}),(0,G.jsx)(`span`,{className:`pg:sr-only`,children:E(n,t)})]})}function Oe({components:e}){return e.length===0?null:(0,G.jsxs)(`section`,{className:`pg:mt-7 pg:border-t-[length:var(--border-width)] pg:border-solid pg:border-[var(--border)] pg:pt-5`,children:[(0,G.jsx)(`h2`,{className:`pg:text-sm pg:font-semibold pg:text-[var(--text)]`,children:y.pdp.includesHeading}),(0,G.jsx)(`ul`,{className:`pg:mt-3 pg:space-y-2 pg:text-sm pg:text-[var(--text-secondary)]`,children:e.map(e=>(0,G.jsxs)(`li`,{className:`pg:flex pg:items-baseline pg:justify-between pg:gap-4`,children:[(0,G.jsxs)(`span`,{className:`pg:min-w-0`,children:[(0,G.jsx)(g,{copy:p(`product.name`,e.name)}),e.formatLabel===null?null:(0,G.jsx)(g,{copy:p(`product.variationName`,e.formatLabel),className:`pg:ml-1.5 pg:text-[var(--text-secondary)]`})]}),e.quantity===1?null:(0,G.jsxs)(`span`,{className:`pg:shrink-0 pg:text-[var(--text-secondary)]`,children:[(0,G.jsx)(`span`,{className:`pg:sr-only`,children:y.pdp.componentQuantityLabel(e.quantity)}),(0,G.jsx)(`span`,{"aria-hidden":`true`,children:y.pdp.componentQuantity(e.quantity)})]})]},e.id))})]})}var ke={warning:`pg:text-warning-foreground`,error:`pg:text-error-foreground`};function Ae({product:e}){let t=x(e.composition);if(t===null)return null;let n=S(t);return n.message===null?null:(0,G.jsx)(`p`,{role:`status`,className:`pg:mt-4`,"data-testid":`storefront-bundle-availability`,children:(0,G.jsx)(g,{copy:m(`storefront.bundleAvailability`,n.message),className:r(`pg:text-sm pg:font-medium`,ke[n.tone])})})}var je={wine:`storefront.productEditorialEyebrowWine`,set:`storefront.productEditorialEyebrowSet`,product:`storefront.productEditorialEyebrowProduct`};function Me({product:e}){let t=C(e);return(0,G.jsxs)(`div`,{children:[e.descriptionHtml?(0,G.jsxs)(`section`,{children:[(0,G.jsx)(g,{copy:h(je[t]),as:`p`,className:`pg:text-[11px] pg:font-bold pg:tracking-[1.7px] pg:text-[var(--accent)]`}),(0,G.jsx)($,{id:`product.description`,html:e.descriptionHtml,className:`pg:mt-3 pg:max-w-3xl pg:text-lg pg:leading-8 pg:text-[var(--text)]`})]}):null,e.tastingNotesHtml?(0,G.jsxs)(`section`,{className:`pg:mt-8 pg:border-t-[length:var(--border-width)] pg:border-solid pg:border-[var(--border)] pg:pt-6`,children:[(0,G.jsx)(`h2`,{className:`pg:text-sm pg:font-semibold pg:text-[var(--text)]`,children:`Tasting notes`}),(0,G.jsx)($,{id:`product.tastingNotes`,html:e.tastingNotesHtml,className:`pg:mt-3 pg:text-sm pg:leading-6 pg:text-[var(--text-secondary)]`})]}):null,e.fermentationNotesHtml?(0,G.jsxs)(`section`,{className:`pg:mt-8 pg:border-t-[length:var(--border-width)] pg:border-solid pg:border-[var(--border)] pg:pt-6`,children:[(0,G.jsx)(`h2`,{className:`pg:text-sm pg:font-semibold pg:text-[var(--text)]`,children:`Fermentation notes`}),(0,G.jsx)($,{id:`product.description`,html:e.fermentationNotesHtml,className:`pg:mt-3 pg:text-sm pg:leading-6 pg:text-[var(--text-secondary)]`})]}):null]})}function Ne({product:e}){let t=[[`Vintage`,e.vintage?String(e.vintage):null],[`Varietal`,e.varietal],[`AVA`,e.ava],[`Viney
3ard`,e.vineyard],[`Alcohol`,e.abv]].filter(e=>e[1]!==null);return t.length===0&&e.foodPairings.length===0?null:(0,G.jsxs)(`aside`,{className:r(f,`pg:self-start`),children:[(0,G.jsx)(`h2`,{className:`pg:text-sm pg:font-semibold pg:text-[var(--text)]`,children:`Details`}),(0,G.jsx)(`dl`,{className:`pg:mt-4 pg:divide-y pg:divide-[var(--border)] pg:text-sm`,children:t.map(([e,t])=>(0,G.jsxs)(`div`,{className:`pg:flex pg:justify-between pg:gap-4 pg:py-3 pg:first:pt-0 pg:last:pb-0`,children:[(0,G.jsx)(`dt`,{className:`pg:text-[var(--text-muted)]`,children:e}),(0,G.jsx)(`dd`,{className:`pg:text-right pg:font-medium pg:text-[var(--text)]`,children:t})]},e))}),e.foodPairings.length>0?(0,G.jsxs)(`div`,{className:`pg:mt-6 pg:border-t-[length:var(--border-width)] pg:border-solid pg:border-[var(--border)] pg:pt-5`,children:[(0,G.jsx)(`h3`,{className:`pg:text-sm pg:font-semibold pg:text-[var(--text)]`,children:`Pairings`}),(0,G.jsx)(`ul`,{className:`pg:mt-3 pg:list-disc pg:space-y-2 pg:pl-4 pg:text-sm pg:text-[var(--text-secondary)]`,children:e.foodPairings.map(e=>(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`span`,{className:`pg:font-medium pg:text-[var(--text)]`,children:e.title}),e.description?(0,G.jsx)(`span`,{className:`pg:mt-0.5 pg:block`,children:e.description}):null]},e.title))})]}):null]})}function Pe({product:e,selectedVariationId:t,quantity:n=1,cartCount:a,actionState:s={type:`idle`},onBack:l,onVariationChange:u,onQuantityChange:f,onAddToCart:p,chosenUnits:m=ye,onChosenUnitsChange:_,chosenModifierIds:y=be,onChosenModifierIdsChange:b}){let x=e.variations.find(e=>e.id===t)??e.variations[0],S=x===void 0?void 0:{...x,priceCents:fe(x.priceCents,e.composition,m,y)},C=W(e.composition,m,y),w=(0,Z.useId)(),T=e.availability===`available`&&S?.available&&ne(e.composition),E=e.availability===`wishlist`,D=ie(e.composition),O=s.type===`pending`||s.type===`reconciling`,k=O||s.type===`rejected`||C.type===`blocked`||n<1||!T&&!E,A=s.type===`pending`?E?`Sending request…`:`Adding to cart…`:s.type===`reconciling`||D?`Checking availability…`:T?`Add to cart`:E?`Request this wine`:e.availability===`on_premise`?`Available in the tasting room`:`Currently unavailable`;return(0,G.jsxs)(c,{activeNav:`shop`,cartCount:a,children:[(0,G.jsx)(`div`,{className:`pg:mx-auto pg:max-w-[1280px] pg:px-[clamp(16px,5vw,56px)] pg:pt-6 pg:lg:pt-8`,children:(0,G.jsxs)(`button`,{type:`button`,onClick:l,className:r(`pg:inline-flex pg:items-center pg:gap-2 pg:bg-transparent pg:p-0 pg:text-xs pg:font-semibold pg:text-[var(--text-secondary)] pg:cursor-pointer`,o),children:[(0,G.jsx)(i,{size:15,"aria-hidden":`true`}),(0,G.jsx)(g,{copy:h(`storefront.productBackLink`)})]})}),(0,G.jsxs)(`section`,{className:`pg:mx-auto pg:grid pg:max-w-[1280px] pg:gap-10 pg:px-[clamp(16px,5vw,56px)] pg:py-8 pg:lg:grid-cols-[minmax(0,1.05fr)_minmax(400px,.95fr)] pg:lg:gap-16 pg:lg:py-12`,children:[(0,G.jsx)(we,{product:e}),(0,G.jsxs)(`div`,{className:`pg:flex pg:flex-col pg:justify-center`,children:[(0,G.jsx)(Te,{product:e}),S?(0,G.jsx)(De,{variation:S}):null,(0,G.jsx)(Ee,{product:e,selectedVariationId:S?.id,onVariationChange:u}),(0,G.jsx)(xe,{product:e,chosenUnits:m,chosenModifierIds:y,onChosenUnitsChange:_,onChosenModifierIdsChange:b}),(0,G.jsx)(Oe,{components:re(e.composition)}),(0,G.jsx)(Ae,{product:e}),(0,G.jsxs)(`div`,{className:`pg:mt-7 pg:flex pg:flex-col pg:gap-3 pg:sm:flex-row`,children:[(0,G.jsx)(`div`,{className:`pg:self-start`,children:(0,G.jsx)(v,{purchase:E?0:n,wishlist:E?n:0,size:`purchase-
3action`,purchaseLimit:T?e.quantityLimit:0,wishlistLimit:E?e.quantityLimit:0,purchaseDisabled:!T,onChange:e=>f?.(e.purchase+e.wishlist),label:`Quantity for ${e.name}`,removeLabel:`Remove one ${e.name}`,addLabel:`Add one ${e.name}`,requestLabel:`Request one ${e.name}`})}),(0,G.jsx)(d,{onClick:p,disabled:k,"aria-busy":O||void 0,"aria-describedby":C.type===`blocked`?w:void 0,className:`pg:min-h-11 pg:flex-1`,children:A})]}),C.type===`blocked`?(0,G.jsx)(`p`,{id:w,role:`status`,"data-testid":`storefront-configuration-gate`,className:r(`pg:mt-3 pg:text-sm`,Se[C.tone]),children:C.reason}):null,s.type===`reconciling`?(0,G.jsx)(`p`,{role:`status`,className:`pg:mt-3 pg:text-sm pg:text-[var(--text-secondary)]`,children:`Confirming the latest inventory and purchase eligibility.`}):null,s.type===`rejected`?(0,G.jsx)(`p`,{role:`alert`,className:`pg:mt-3 pg:text-sm pg:font-medium pg:text-[var(--error)]`,children:s.message}):null,(0,G.jsxs)(`div`,{className:`pg:mt-7 pg:grid pg:gap-3 pg:border-t-[length:var(--border-width)] pg:border-solid pg:border-[var(--border)] pg:pt-5 pg:text-xs pg:text-[var(--text-secondary)] pg:sm:grid-cols-2`,children:[(0,G.jsxs)(`div`,{className:`pg:flex pg:items-center pg:gap-2`,children:[(0,G.jsx)(te,{size:16,className:`pg:text-[var(--accent)]`,"aria-hidden":`true`}),`Shipping calculated at checkout`]}),(0,G.jsxs)(`div`,{className:`pg:flex pg:items-center pg:gap-2`,children:[(0,G.jsx)(ee,{size:16,className:`pg:text-[var(--accent)]`,"aria-hidden":`true`}),`Adult signature required`]})]})]})]}),(0,G.jsx)(`section`,{className:`pg:border-t-[length:var(--border-width)] pg:border-solid pg:border-[var(--border)] pg:bg-[var(--surface)]`,children:(0,G.jsxs)(`div`,{className:`pg:mx-auto pg:grid pg:max-w-[1280px] pg:gap-8 pg:px-[clamp(16px,5vw,56px)] pg:py-12 pg:lg:grid-cols-[1.4fr_.6fr] pg:lg:py-16`,children:[(0,G.jsx)(Me,{product:e}),(0,G.jsx)(Ne,{product:e})]})})]})}function Fe(e){let{state:t,cartCount:n}=e;return t.type===`loading`?(0,G.jsx)(c,{activeNav:`shop`,cartCount:n,children:(0,G.jsx)(Ce,{})}):t.type===`not-found`?(0,G.jsx)(c,{activeNav:`shop`,cartCount:n,children:(0,G.jsx)(Q,{title:h(`storefront.productNotFoundTitle`).text,message:`This product may no longer be published. Return to the current collection.`})}):t.type===`error`?(0,G.jsx)(c,{activeNav:`shop`,cartCount:n,children:(0,G.jsx)(Q,{title:`Product could not be loaded`,message:t.message,onRetry:e.onRetry})}):(0,G.jsx)(Pe,{product:t.product,selectedVariationId:e.selectedVariationId,quantity:e.quantity,cartCount:n,actionState:e.actionState,onBack:e.onBack,onVariationChange:e.onVariationChange,onQuantityChange:e.onQuantityChange,onAddToCart:e.onAddToCart,chosenUnits:e.chosenUnits,onChosenUnitsChange:e.onChosenUnitsChange,chosenModifierIds:e.chosenModifierIds,onChosenModifierIdsChange:e.onChosenModifierIdsChange})}export{W as n,Fe as t};
4//# debugId=7680e986-f529-5504-b836-6a8a3dbc2121

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.