"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[33],{197:(e,n,t)=>{t.d(n,{a:()=>y});var o=t(0),a=t(3),i=t(27),l=t(4),s=t(101),r=t(170),d=t(102),c=t(71);function u({groupColorsByOptionName:e=!1,newColorSectionName:n,coreColorSectionName:t,sizeGuideCodeBasedFlag:u=!1,defaultSizeGuideOptionName:p="",product:v,selectedVariant:m,setSelectedVariantId:U,compact:f=!1,productApp:S,groupContext:O="hero"}){var b;const g=null==S?void 0:S.product.value,h=null==S?void 0:S.selectedVariant.value,{getOptionNameForColor:K,getHexForOptionColor:x}=(0,l.d)((e=>({getOptionNameForColor:e.getOptionNameForColor,getHexForOptionColor:e.getHexForOptionColor}))),C=null!=v?v:g,j=null!=m?m:h,E=(0,d.a)(j,null==C?void 0:C.options),N=null!=U?U:e=>{e&&S&&S.setSelectedVariantId({variantId:e})},y=(0,r.b)({product:C,newColorSectionName:n,coreColorSectionName:t,clearanceColors:null===(b=null==S?void 0:S.product.value)||void 0===b?void 0:b.clearanceColors,getOptionNameForColor:e?K:()=>{}});if(!C||!y)return(0,o.jsx)(a.Fragment,{});const z="sizeGuide"in C?C.sizeGuide:void 0;return(0,o.jsxs)("div",{class:i.a.container,children:[E,y.map((e=>{var n;return(0,o.jsx)(s.a,{product:C,option:e,getHexForOptionColor:x,selectedVariant:j,findProductVariantWithOption:e=>{var n,t,o,a;return null!==(o=null===(t=null==S?void 0:(n=S.findProductVariantWithOption).value)||void 0===t?void 0:t.call(n,e,C,j))&&void 0!==o?o:(0,c.a)({option:e,variants:C.variants,currentOptions:null!==(a=null==j?void 0:j.selectedOptions)&&void 0!==a?a:{},fallbackVariant:j})},setSelectedVariantId:N,sizeGuide:z,sizeGuideCodeBasedFlag:u,defaultSizeGuideOptionName:p,compact:f,productApp:S,groupContext:O,syncUrlOnSelect:"hero"===O},`${C.handle}-${null!==(n=e.optionName)&&void 0!==n?n:e.name}`)}))]})}var p=t(1),v=t(65),m=t(2),U=t(142);let f=0;function S(e,n){const t=O[`${e} (${n})`];if(!t)return e;for(const e of t.split(" / "))if(e.includes("US"))return e.split(" (")[0];return e}const O={"DD (US)":"DD (US,UK) / E (EU)","E (US)":"DD (US,UK) / E (EU)","DD (UK)":"DD (US,UK) / E (EU)","E (EU)":"DD (US,UK) / E (EU)","DDD (US)":"DDD (US) / E (UK) / F (EU)","F (US)":"DDD (US) / E (UK) / F (EU)","E (UK)":"DDD (US) / E (UK) / F (EU)","F (EU)":"DDD (US) / E (UK) / F (EU)","G (US)":"G (US,EU) / F (UK)","G (EU)":"G (US,EU) / F (UK)","F (UK)":"G (US,EU) / F (UK)","H (US)":"H (US,EU) / FF (UK)","FF (US)":"H (US,EU) / FF (UK)","H (EU)":"H (US,EU) / FF (UK)","FF (UK)":"H (US,EU) / FF (UK)","I (US)":"I (US,EU) / G (UK)","I (EU)":"I (US,EU) / G (UK)","G (UK)":"I (US,EU) / G (UK)","J (US)":"J (US,EU) / GG (UK)","GG (US)":"J (US,EU) / GG (UK)","J (EU)":"J (US,EU) / GG (UK)","GG (UK)":"J (US,EU) / GG (UK)","K (US)":"K (US,EU) / H (UK)","K (EU)":"K (US,EU) / H (UK)","H (UK)":"K (US,EU) / H (UK)","L (US)":"L (US,EU) / HH (UK)","L (EU)":"L (US,EU) / HH (UK)","HH (UK)":"L (US,EU) / HH (UK)","M (US)":"M (US,EU) / J (UK)","M (EU)":"M (US,EU) / J (UK)","J (UK)":"M (US,EU) / J (UK)","N (US)":"N (US,EU) / JJ (UK)","N (EU)":"N (US,EU) / JJ (UK)","JJ (UK)":"N (US,EU) / JJ (UK)","O (US)":"O (US,EU) / K (UK)","O (EU)":"O (US,EU) / K (UK)","K (UK)":"O (US,EU) / K (UK)","P (US)":"P (US,EU) / KK (UK)","KK (US)":"P (US,EU) / KK (UK)","P (EU)":"P (US,EU) / KK (UK)","KK (UK)":"P (US,EU) / KK (UK)","Q (US)":"Q (US,EU) / L (UK)","Q (EU)":"Q (US,EU) / L (UK)","L (UK)":"Q (US,EU) / L (UK)","R (US)":"R (US, EU)/LL (UK)","R (EU)":"R (US, EU)/LL (UK)","LL (UK)":"R (US, EU)/LL (UK)"};function b({option:e,displayedOptions:n,fieldsetName:t,placeholder:i,isUnselectedSize:s,isVariantUnavailable:r}){var d,c,u,O,b,h;const K=(0,l.d)((e=>e.device)),[x,C]=(0,p.useState)(!1),j=n.find((e=>e.isSelected)),E=null==j?void 0:j.value,N=r||j&&!j.availableForSale&&!s,y=null!==(d=null!=i?i:e.optionName)&&void 0!==d?d:e.name,z=s?y:null!=E?E:y,F=e.sizing,w=e.name.toLowerCase().includes("cup"),V=!!F&&"US"!==F&&w,k=(0,p.useMemo)((()=>n.map((e=>({id:e.value,textValue:e.value,optionRef:e})))),[n]),D=e=>{var n;e.setSelectedVariantId(null===(n=e.variant)||void 0===n?void 0:n.variantId)},I=(0,p.useRef)(null),G=(0,p.useRef)(null),L=(0,p.useRef)(null),P=function(e){const{items:n,selectedKey:t,defaultSelectedKey:o,onSelectionChange:a,isOpen:i,defaultOpen:l=!1,onOpenChange:s,disabledKeys:r=new Set}=e,[d,c]=(0,p.useState)(l),u=null!=i?i:d,[v,m]=(0,p.useState)(null!=o?o:null),U=null!=t?t:v,[f,S]=(0,p.useState)(null),[O,b]=(0,p.useState)(null),g=(0,p.useMemo)((()=>n.filter((e=>!e.disabled&&!r.has(e.id)))),[n,r]),h=(0,p.useCallback)((e=>{void 0===i&&c(e),null==s||s(e),e||S(null)}),[i,s]),K=(0,p.useCallback)((e=>{void 0===t&&m(e),null==a||a(e)}),[t,a]),x=(0,p.useCallback)((e=>{S(e)}),[]),C=(0,p.useCallback)((()=>{h(!1),b(null)}),[h]),j=(0,p.useCallback)(((e=null)=>{0!==n.length&&(b(e),h(!0),U&&g.some((e=>e.id===U))?S(U):"first"===e&&g.length>0?S(g[0].id):"last"===e&&g.length>0&&S(g[g.length-1].id))}),[n.length,g,U,h]),E=(0,p.useCallback)(((e=null)=>{u?C():j(e)}),[u,j,C]),N=(0,p.useCallback)((()=>{g.length>0&&S(g[0].id)}),[g]),y=(0,p.useCallback)((()=>{g.length>0&&S(g[g.length-1].id)}),[g]),z=(0,p.useCallback)((()=>{if(0===g.length)return;const e=(f?g.findIndex((e=>e.id===f)):-1)+1;S(e{if(0===g.length)return;const e=(f?g.findIndex((e=>e.id===f)):g.length)-1;S(e>=0?g[e].id:g[g.length-1].id)}),[g,f]),w=(0,p.useMemo)((()=>{var e;return null!==(e=n.find((e=>e.id===U)))&&void 0!==e?e:null}),[n,U]);return{isOpen:u,selectedKey:U,focusedKey:f,focusStrategy:O,items:n,selectedItem:w,open:j,close:C,toggle:E,setSelectedKey:K,setFocusedKey:x,focusFirst:N,focusLast:y,focusNext:z,focusPrevious:F}}({items:k,selectedKey:s?null:null!=E?E:null,onSelectionChange:e=>{if(null==e)return;const n=k.find((n=>n.id===e));n&&D(n.optionRef)}}),{triggerProps:H,valueProps:$,listBoxProps:B,getOptionProps:M}=function(e,n){const{triggerRef:t,popoverRef:o,listBoxRef:a,isDisabled:i=!1,"aria-label":l,"aria-labelledby":s}=e,r=(0,p.useMemo)((()=>"select-"+ ++f),[]),d=`${r}-label`,c=`${r}-trigger`,u=`${r}-value`,v=`${r}-listbox`,m=e=>`${r}-option-${e}`,U=(0,p.useRef)(""),S=(0,p.useRef)(null),O=(0,p.useCallback)((e=>{U.current+=e.toLowerCase(),S.current&&clearTimeout(S.current),S.current=setTimeout((()=>{U.current=""}),500);const t=U.current,o=n.items.filter((e=>!e.disabled)).find((e=>e.textValue.toLowerCase().startsWith(t)));o&&(n.isOpen?n.setFocusedKey(o.id):n.setSelectedKey(o.id))}),[n]),b=(0,p.useCallback)((e=>{var o,a;if(!i)switch(e.key){case"ArrowDown":e.preventDefault(),n.isOpen?n.focusNext():n.open("first");break;case"ArrowUp":e.preventDefault(),n.isOpen?n.focusPrevious():n.open("last");break;case"Home":n.isOpen&&(e.preventDefault(),n.focusFirst());break;case"End":n.isOpen&&(e.preventDefault(),n.focusLast());break;case"Enter":case" ":e.preventDefault(),n.isOpen?null!=n.focusedKey&&(n.setSelectedKey(n.focusedKey),n.close(),null===(o=t.current)||void 0===o||o.focus()):n.open();break;case"Escape":n.isOpen&&(e.preventDefault(),e.stopPropagation(),n.close(),null===(a=t.current)||void 0===a||a.focus());break;case"Tab":n.isOpen&&n.close();break;default:1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey||!/\S/.test(e.key)||O(e.key)}}),[i,n,t,O]),g=(0,p.useCallback)((e=>{var o;i||(e.preventDefault(),n.toggle(),null===(o=t.current)||void 0===o||o.focus())}),[i,n,t]),h=(0,p.useCallback)((e=>{var t;const a=e.relatedTarget;a&&(null===(t=o.current)||void 0===t?void 0:t.contains(a))||n.isOpen&&n.close()}),[n,o]);(0,p.useEffect)((()=>{if(!n.isOpen)return;const e=e=>{var a,i;const l=e.target;(null===(a=t.current)||void 0===a?void 0:a.contains(l))||(null===(i=o.current)||void 0===i?void 0:i.contains(l))||n.close()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[n.isOpen,n,t,o]),(0,p.useEffect)((()=>{if(n.focusedKey&&a.current){const e=a.current.querySelector(`[data-key="${CSS.escape(n.focusedKey)}"]`);null==e||e.scrollIntoView({block:"nearest"})}}),[n.focusedKey,a]),(0,p.useEffect)((()=>()=>{S.current&&clearTimeout(S.current)}),[]);const K=n.focusedKey?m(n.focusedKey):void 0;return{labelProps:{id:d,htmlFor:c},triggerProps:{id:c,role:"combobox","aria-haspopup":"listbox","aria-expanded":n.isOpen,"aria-controls":n.isOpen?v:void 0,"aria-activedescendant":K,"aria-labelledby":null!=s?s:l?`${c} ${u}`:`${d} ${u}`,"aria-label":l,disabled:i,tabIndex:0,onClick:g,onKeyDown:b,onBlur:h},valueProps:{id:u},listBoxProps:{id:v,role:"listbox","aria-labelledby":null!=s?s:d,tabIndex:-1},getOptionProps:(e,o)=>({id:m(e.id),role:"option","aria-selected":e.id===n.selectedKey,"aria-disabled":e.disabled||void 0,"data-focused":e.id===n.focusedKey,"data-key":e.id,onClick:o=>{var a;e.disabled||(o.preventDefault(),n.setSelectedKey(e.id),n.close(),null===(a=t.current)||void 0===a||a.focus())},onMouseEnter:()=>{e.disabled||n.setFocusedKey(e.id)},onMouseDown:e=>{e.preventDefault()}})}}({triggerRef:I,popoverRef:G,listBoxRef:L},P),R=e=>V?(0,o.jsxs)(a.Fragment,{children:[(0,o.jsx)("span",{children:e.value}),(0,o.jsx)("span",{className:v.a.usEquivalent,children:S(e.value,F)})]}):e.value,A=e=>[v.a.dropdownOption,V?v.a.dropdownOptionRow:"",e.isSelected&&!s?v.a.dropdownOptionSelected:"",e.availableForSale?"":v.a.dropdownOptionUnavailable].filter(Boolean).join(" ");return(0,o.jsxs)(a.Fragment,{children:[(0,o.jsxs)("div",{className:v.a.dropdownContainerDesktop,children:[(0,o.jsxs)("button",Object.assign({},H,{ref:I,type:"button",className:[v.a.dropdownTrigger,!E||s?v.a.placeholder:"",N?v.a.dropdownTriggerUnavailable:""].filter(Boolean).join(" "),children:[(0,o.jsx)("span",Object.assign({},$,{className:v.a.dropdownTriggerText,children:z})),(0,o.jsx)(g,{className:P.isOpen?v.a.chevronUp:""})]})),P.isOpen&&(0,o.jsxs)("div",{ref:G,className:v.a.dropdownPanel,children:[V&&(0,o.jsxs)("div",{className:v.a.dropdownColumnHeader,children:[(0,o.jsx)("span",{children:F}),(0,o.jsx)("span",{children:"US"})]}),(0,o.jsx)("ul",Object.assign({},B,{ref:L,className:v.a.dropdownOptions,children:k.map(((e,n)=>{const t=e.optionRef,o=M(e,n);return(0,a.createElement)("li",Object.assign({},o,{key:e.id,className:A(t)}),R(t))}))}))]}),(0,o.jsx)("input",{type:"hidden",name:t,value:null!==(u=null===(c=null==j?void 0:j.variant)||void 0===c?void 0:c.variantId)&&void 0!==u?u:""})]}),(0,o.jsxs)("div",{className:v.a.dropdownContainerMobile,children:[(0,o.jsxs)("button",{type:"button",className:[v.a.dropdownTrigger,!E||s?v.a.placeholder:"",N?v.a.dropdownTriggerUnavailable:""].filter(Boolean).join(" "),onClick:()=>{"desktop"!==K&&C(!x)},"aria-haspopup":"listbox","aria-expanded":x,children:[(0,o.jsx)("span",{className:v.a.dropdownTriggerText,children:z}),(0,o.jsx)(g,{className:x?v.a.chevronUp:""})]}),(0,o.jsx)(U.a,{isOpen:x,onClose:()=>C(!1),title:`Select ${null!==(O=e.optionName)&&void 0!==O?O:e.name}`,children:(0,o.jsxs)("div",{className:v.a.dropdownOptions,children:[V&&(0,o.jsxs)("div",{className:v.a.dropdownColumnHeader,children:[(0,o.jsx)("span",{children:F}),(0,o.jsx)("span",{children:"US"})]}),n.map((e=>(0,o.jsx)("button",{type:"button",className:A(e),onClick:()=>(e=>{D(e),"stayOpen"!==(0,m.getAssignment)(`${K}_sizeDropdownSelect`)&&C(!1)})(e),role:"option","aria-selected":e.isSelected&&!s,children:R(e)},e.value)))]})}),(0,o.jsx)("input",{type:"hidden",name:t,value:null!==(h=null===(b=null==j?void 0:j.variant)||void 0===b?void 0:b.variantId)&&void 0!==h?h:""})]})]})}function g({className:e}){return(0,o.jsx)("svg",{className:[v.a.chevronIcon,e].filter(Boolean).join(" "),width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M1 1L5 5L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var h=t(212),K=t(28);function x({product:e,sizeOptions:n,selectedVariant:t,setSelectedVariantId:a,sizeGuide:i,sizeGuideCodeBasedData:l,sizeGuideId:s,combinedSizeOptions:r,productApp:d}){var c;const u=r&&r.length>0&&r.every((e=>n.some((n=>n.name.toLowerCase()===e.toLowerCase())))),p=null===(c=n.find((e=>e.sizing)))||void 0===c?void 0:c.sizing,m=!!p&&"US"!==p;return(0,o.jsxs)("fieldset",{className:v.a.sizeSection,children:[(0,o.jsxs)("legend",{className:v.a.visuallyHidden,children:[e.title," Size Selection"]}),(0,o.jsxs)("div",{className:v.a.sizeHeader,children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{className:v.a.sizeLabel,children:"Size"}),m&&(0,o.jsxs)("span",{className:v.a.sizingSubtext,children:["This product is sold in ",p," sizes"]})]}),(0,o.jsx)(h.a,{sizeGuide:i,sizeGuideCodeBasedData:l,sizeGuideId:s})]}),(0,o.jsx)("div",{className:v.a.sizeDropdowns,children:u?(0,o.jsx)(j,{product:e,combinedOptionNames:r,sizeOptions:n,selectedVariant:t,setSelectedVariantId:a,productApp:d}):n.map(((i,l)=>(0,o.jsx)(C,{product:e,option:i,selectedVariant:t,precedingOptions:n.slice(0,l),allOtherOptions:n.filter(((e,n)=>n!==l)),setSelectedVariantId:a,productApp:d},i.name)))})]})}function C({product:e,option:n,selectedVariant:t,precedingOptions:i,allOtherOptions:l,setSelectedVariantId:s,productApp:r}){var d,c,u,v;const m=r?(e,n)=>{var t;if(n){const o=null===(t=n.mappedSizes)||void 0===t?void 0:t[e],a=1===(null==o?void 0:o.length)?o[0]:n.selectedOptions[e];r.selectOption({optionName:e,value:a})}}:void 0,U=null!==(d=null==r?void 0:r.selectedOptions.value)&&void 0!==d?d:{},f=null!==(c=null==r?void 0:r.defaultUnselected.value)&&void 0!==c&&c,S=(0,K.a)(r,t,n.name),O=null!==(u=null==t?void 0:t.selectedOptions[n.name])&&void 0!==u?u:null===(v=null==t?void 0:t.displayOptions)||void 0===v?void 0:v[n.name],g=(0,p.useMemo)((()=>{const e={};for(const n of i){const o=null==t?void 0:t.selectedOptions[n.name];o&&(e[n.name]=o)}return e}),[i,null==t?void 0:t.selectedOptions]),h=(0,p.useMemo)((()=>{const e={};for(const n of l){const o=null==t?void 0:t.selectedOptions[n.name];o&&(e[n.name]=o)}return e}),[l,null==t?void 0:t.selectedOptions]),x=null==t?void 0:t.selectedOptions.Color,C=(0,p.useMemo)((()=>{const e={};for(const n of l){const o=null==t?void 0:t.selectedOptions[n.name];o&&(f&&void 0===U[n.name]||(e[n.name]=o))}return e}),[l,null==t?void 0:t.selectedOptions,f,U]),j=(0,p.useMemo)((()=>n.values.map((t=>{var o;const a=e.variants.find((e=>{if(e.selectedOptions[n.name]!==t)return!1;if(e.oos)return!1;for(const[n,t]of Object.entries(g))if(e.selectedOptions[n]!==t)return!1;return!0})),i=x?e.variants.find((e=>{if(e.selectedOptions[n.name]!==t)return!1;if(e.oos)return!1;for(const[n,t]of Object.entries(C))if(e.selectedOptions[n]!==t)return!1;return e.selectedOptions.Color===x})):a,l=e.variants.find((e=>{if(e.selectedOptions[n.name]!==t)return!1;for(const[n,t]of Object.entries(h))if(e.selectedOptions[n]!==t)return!1;return!x||e.selectedOptions.Color===x})),r=e.variants.find((e=>{if(e.selectedOptions[n.name]!==t)return!1;for(const[n,t]of Object.entries(h))if(e.selectedOptions[n]!==t)return!1;return!0})),d=null!==(o=null!=l?l:r)&&void 0!==o?o:a;return{value:t,variant:d,isSelected:O===t&&!S,matchesSelectedValue:O===t,availableForSale:!!i,setSelectedVariantId:e=>{null==m||m(n.name,d),l?s(l.variantId):r?s(r.variantId):a?s(a.variantId):d&&s(d.variantId)}}}))),[n.values,n.name,e.variants,O,g,h,C,x,S,m,s]),E=(0,p.useMemo)((()=>!(S||!x||!O||e.variants.some((e=>{if(e.selectedOptions[n.name]!==O)return!1;if(e.oos)return!1;for(const[n,t]of Object.entries(C))if(e.selectedOptions[n]!==t)return!1;return e.selectedOptions.Color===x})))),[S,x,O,e.variants,n.name,C]);if(0===j.length)return(0,o.jsx)(a.Fragment,{});const N=`${e.handle}-${n.name}`.replaceAll(" ","-");return(0,o.jsx)(b,{displayedOptions:j,option:n,fieldsetName:N,isUnselectedSize:S,isVariantUnavailable:E})}function j({product:e,combinedOptionNames:n,sizeOptions:t,selectedVariant:i,setSelectedVariantId:l,productApp:s}){var r;const d=s?(e,n)=>{var t;if(n){const o=null===(t=n.mappedSizes)||void 0===t?void 0:t[e],a=1===(null==o?void 0:o.length)?o[0]:n.selectedOptions[e];s.selectOption({optionName:e,value:a})}}:void 0,c=(0,K.a)(s,i),u=(0,p.useMemo)((()=>n.map((e=>t.find((n=>n.name.toLowerCase()===e.toLowerCase())))).filter((e=>!!e))),[n,t]),v=null===(r=u.find((e=>e.sizing)))||void 0===r?void 0:r.sizing,m=!!v&&"US"!==v,U=(0,p.useMemo)((()=>u.map((e=>{var n;return null!==(n=null==i?void 0:i.selectedOptions[e.name])&&void 0!==n?n:""})).join("")),[u,null==i?void 0:i.selectedOptions]),f=null==i?void 0:i.selectedOptions.Color,O=(0,p.useMemo)((()=>{const n=new Map;for(const t of e.variants){const e={};let o="";for(const n of u){const a=t.selectedOptions[n.name];a&&(e[n.name]=a,o+=a)}Object.keys(e).length===u.length&&(n.get(o)||t.unavailable||n.set(o,{combinedValue:o,optionValues:e,variant:t,availableForSale:!t.oos}))}const t=Array.from(n.values());return t.sort(((e,n)=>{for(const t of u){const o=t.values.indexOf(e.optionValues[t.name]),a=t.values.indexOf(n.optionValues[t.name]);if(o!==a)return o-a}return 0})),t.map((n=>{const t=U===n.combinedValue&&!c;let o=n.variant,a=n.availableForSale;if(f){const t=e.variants.find((e=>{for(const[t,o]of Object.entries(n.optionValues))if(e.selectedOptions[t]!==o)return!1;return e.selectedOptions.Color===f}));t?(o=t,a=!t.oos):a=!1}let i=n.combinedValue;if(m&&v){const e=u.map((e=>{const t=n.optionValues[e.name];return e.name.toLowerCase().includes("cup")?S(t,v):t})).join("");e!==n.combinedValue&&(i=`${n.combinedValue} (${e} US)`)}return{value:i,variant:o,isSelected:t,matchesSelectedValue:U===n.combinedValue,availableForSale:a,setSelectedVariantId:()=>{for(const e of Object.keys(n.optionValues))null==d||d(e,o);l(o.variantId)}}}))}),[e.variants,u,U,c,f,d,l]),g=(0,p.useMemo)((()=>{if(c||!f||!U)return!1;const e=O.find((e=>e.isSelected));return!!e&&!e.availableForSale}),[c,f,U,O]);if(0===O.length)return(0,o.jsx)(a.Fragment,{});const h={name:"Size",values:O.map((e=>e.value))},x=`${e.handle}-combined-size`.replaceAll(" ","-");return(0,o.jsx)(b,{displayedOptions:O,option:h,fieldsetName:x,isUnselectedSize:c,isVariantUnavailable:g})}function E({groupColorsByOptionName:e=!1,newColorSectionName:n,coreColorSectionName:t,sizeGuideCodeBasedFlag:u=!1,defaultSizeGuideOptionName:v="",combinedSizeOptions:m,product:U,selectedVariant:f,setSelectedVariantId:S,compact:O=!1,productApp:b,groupContext:g="hero"}){var h;const K=null==b?void 0:b.product.value,C=null==b?void 0:b.selectedVariant.value,{getOptionNameForColor:j,getHexForOptionColor:E}=(0,l.d)((e=>({getOptionNameForColor:e.getOptionNameForColor,getHexForOptionColor:e.getHexForOptionColor}))),N=null!=U?U:K,y=null!=f?f:C,z=(0,d.a)(y,null==N?void 0:N.options),F=null==b?void 0:b.findProductVariantWithOption.value,w=null!=F?F:(e,n,t)=>{var o,a,i,l;return(0,c.a)({option:e,variants:null!==(a=null===(o=null!=n?n:N)||void 0===o?void 0:o.variants)&&void 0!==a?a:[],currentOptions:null!==(l=null===(i=null!=t?t:y)||void 0===i?void 0:i.selectedOptions)&&void 0!==l?l:{},fallbackVariant:null!=t?t:y})},V=null!=S?S:e=>{e&&b&&b.setSelectedVariantId({variantId:e})},k=(0,r.b)({product:N,newColorSectionName:n,coreColorSectionName:t,clearanceColors:null===(h=null==b?void 0:b.product.value)||void 0===h?void 0:h.clearanceColors,getOptionNameForColor:e?j:()=>{}}),{sizeOptions:D,nonSizeOptions:I}=(0,p.useMemo)((()=>k?{sizeOptions:k.filter((e=>e.name.toLowerCase().includes("size"))),nonSizeOptions:k.filter((e=>!e.name.toLowerCase().includes("size")))}:{sizeOptions:[],nonSizeOptions:[]}),[k]);if(!N||!k)return(0,o.jsx)(a.Fragment,{});const G="sizeGuide"in N?N.sizeGuide:void 0,L=u?N.sizeGuideCodeBasedData:void 0;return(0,o.jsxs)("div",{className:i.a.container,children:[z,D.length>0&&(0,o.jsx)(x,{product:N,sizeOptions:D,selectedVariant:y,findProductVariantWithOption:e=>w(e,N,y),setSelectedVariantId:V,sizeGuide:G,sizeGuideCodeBasedData:L,sizeGuideId:N.sizeGuideId,compact:O,combinedSizeOptions:m,productApp:b}),I.map((e=>{var n;return(0,o.jsx)(s.a,{product:N,option:e,getHexForOptionColor:E,selectedVariant:y,findProductVariantWithOption:e=>w(e,N,y),setSelectedVariantId:V,compact:O,productApp:b,groupContext:g,syncUrlOnSelect:"hero"===g},`${N.handle}-${null!==(n=e.optionName)&&void 0!==n?n:e.name}`)}))]})}var N=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a{t.d(n,{a:()=>l,b:()=>s});var o=t(1),a=t(89);function i(e,n,{announcePreorder:t=!0}={}){var o,a,i;if(!e)return null;const l=null!==(o=e.selectedOptions)&&void 0!==o?o:{},s=null!==(a=e.displayOptions)&&void 0!==a?a:{},r=(null!==(i=null==n?void 0:n.map((e=>e.name)))&&void 0!==i?i:Object.keys(l)).map((e=>[e,s[e]||l[e]])).filter((([,e])=>null!=e&&""!==e)).map((([e,n])=>`${e} ${n}`));if(0===r.length)return null;const d=e.oos?t&&e.preorderVariant?", pre-order":", sold out":"";return`${r.join(", ")} selected${d}`}function l(e,n,t={}){const{announce:l,AnnouncerPortal:s}=(0,a.a)(),r=(0,o.useRef)(!1),d=null==e?void 0:e.variantId;return(0,o.useEffect)((()=>{if(!r.current){if(void 0===d)return;return void(r.current=!0)}const o=i(e,n,t);o&&l(o)}),[d]),s}function s(e,n={}){const{announce:t,AnnouncerPortal:o}=(0,a.a)();return{AnnouncerPortal:o,announceVariant:function(o){const a=i(o,e,n);a&&t(a)}}}},142:(e,n,t)=>{t.d(n,{a:()=>d});var o=t(0),a=t(1),i=t(11),l=t(51),s=t(32),r=t(37);function d({isOpen:e,onClose:n,children:t,title:d,showTitle:c=!1,size:u="default"}){const[p,v]=(0,a.useState)(!1),m=(0,a.useRef)(null),U=(0,a.useRef)(!1);(0,r.a)(e);const f=(0,a.useCallback)((()=>{U.current=!0,v(!0)}),[]),S=(0,a.useCallback)((e=>{U.current&&e.target===m.current&&(U.current=!1,v(!1),n())}),[n]),O=(0,a.useCallback)((()=>{f()}),[f]);return(0,o.jsx)(s.a,{isOpen:e,onEscape:f,children:(0,o.jsxs)("div",{className:i.a.modalOverlayBottomSheet,"aria-hidden":!e,children:[(0,o.jsx)("div",{className:i.a.modalBackground,onClick:O,role:"presentation"}),(0,o.jsxs)("div",{ref:m,"data-animate":!0,role:"dialog","aria-modal":!0,tabIndex:-1,"aria-label":d,className:[i.a.modalBottomSheet,p?i.a.closing:"","large"===u?i.a.large:""].join(" "),onAnimationEnd:S,children:[c?(0,o.jsxs)("div",{className:i.a.bottomSheetHeader,children:[(0,o.jsx)("h2",{className:i.a.bottomSheetTitle,children:d}),(0,o.jsx)("button",{className:i.a.bottomSheetCloseBtn,onClick:f,"aria-label":"Close dialog",children:(0,o.jsx)(l.a,{size:"16px",iconClass:i.a.closeIconSVG})})]}):(0,o.jsx)("button",{className:i.a.bottomSheetCloseBtnFloating,onClick:f,"aria-label":"Close dialog",children:(0,o.jsx)(l.a,{size:"20px",iconClass:i.a.closeIconSVG})}),(0,o.jsx)("div",{className:i.a.bottomSheetContent,children:t})]})]})})}},89:(e,n,t)=>{t.d(n,{a:()=>l});var o=t(0),a=t(1),i=t(14);function l(){const e=(0,a.useRef)(null);return{announce:(0,a.useCallback)((n=>{const t=e.current;t&&(t.textContent="",setTimeout((()=>{t.textContent=n}),100))}),[]),AnnouncerPortal:"undefined"==typeof document?null:(0,i.createPortal)((0,o.jsx)("div",{ref:e,"aria-live":"polite","aria-atomic":"true",role:"status",className:"visually-hidden"}),document.body)}}}}]);