PageSourceSearch

https://cdn2.prose.com/build/client/assets/header-shell-D0tpcPz-.js

js prose.com collected 2026-09-24 17:14:49 UTC 8,637 bytes, 88 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]="e84cfaa0-d404-5e0e-9145-a3ebf3081561")}catch(e){}}();
3import{j as e}from"./jsx-runtime-Cn2GOWFH.js";import{L as H,d as P,m as b,b as x,v as J}from"./chunk-KS7C4IRE-ChMKT8oh.js";import{b as S,t as l,T as _,e as Q,f as U}from"./index-C_H4mcmd.js";import{a as A}from"./hooks-CoLMfikU.js";import{m as R}from"./media-CKXDFeO2.js";import{b as y}from"./products-InNk0YVD.js";import{c as X}from"./consultationProductsCategories-Dbt0oUBf.js";import{S as Z,b as ee}from"./pmsTrackingProperties-BtoBlhWn.js";import{l as L,u as te,j as $,i as N}from"./Spacer-CW9och5L.js";import{B as ne}from"./BasicModal-D3YXQoxl.js";import{g as k}from"./Image-BXz5imAm.js";import{a as oe,s as ae,h as se}from"./routes-DJluQJ4i.js";import{h as re}from"./a11y-BwO3uMq_.js";import{u as E}from"./usePagePromotions-DsptILdd.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"[email protected]"}}catch{}})();const j=S("absolute block h-0 w-0 indent-[-1000000px]","focus:top-0 focus:z-[1101] focus:h-auto focus:w-auto focus:bg-neutral-100 focus:px-8 focus:indent-0 focus:leading-[32px] focus:text-neutral-900"),ie=({showFooterLink:n=!1})=>e.jsxs("ul",{className:"m-0 list-none p-0",id:"skip-to-portal",children:[e.jsx("li",{children:e.jsx("a",{className:j,href:"#maincontent",children:"Skip to main content"})}),n&&e.jsx("li",{children:e.jsx("a",{className:j,href:"#footer",children:"Skip to footer"})}),e.jsx("li",{children:e.jsx(H,{className:j,to:"/accessibility",children:"Page"})})]}),ce=[y.HAIRCARE,y.SKINCARE,y.ACCESSORIES],le=()=>{const{pathname:n}=P(),t=b("/checkout/:category/*",n)?.params;if(!(!t?.category||!ce.includes(t.category)))return t.category},de=()=>{const{pathname:n}=P(),t=b("/consultation/:category/*",n)?.params;return!t?.category||!X.includes(t.category)?y.AGNOSTIC:t.category},ue=k(ne)`
4  position: relative;
5
6  width: 100%;
7  margin-top: auto;
8  padding: 56px 35px;
9
10  text-align: center;
11
12  background-color: ${({backgroundColor:n})=>n};
13
14  ${L.breakpoints.up("sm")} {
15    width: auto;
16    min-width: 400px;
17    margin-bottom: -24px;
18  }
19
20  ${L.breakpoints.up("md")} {
21    max-width: 450px;
22    padding: 70px 35px;
23    border-top-left-radius: 20px;
24    border-top-right-radius: 20px;
25  }
26`,pe=k.button`
27  cursor: pointer;
28
29  position: absolute;
30  top: 28px;
31  right: 28px;
32
33  display: flex;
34  align-items: center;
35  justify-content: center;
36
37  width: 24px;
38  height: 24px;
39  margin-top: -4px;
40  padding: 0;
41  border: none;
42
43  appearance: none;
44  background: none;
45`,he=({isOpen:n=!1,onClose:t,content:a,dataFrom:d,testPrefix:i,backgroundColor:s=l.colors.tertiary[200],htmlContent:o})=>{const{isMobile:c}=te();return e.jsxs(ue,{backgroundColor:s,dataFrom:d,hideClose:!0,isFullWidth:c,isOpen:n,onClose:t,zIndexValue:1501,children:[e.jsx(pe,{"data-testid":`${i}-modal-close`,id:"bottom-modal-close-button",onClick:t,children:e.jsx(Z,{height:"13",width:"13"})}),e.jsx(_,{"aria-label":typeof a?.title=="string"?a.title:void 0,as:"h2",dangerouslySetInnerHTML:o?.title?{__html:o?.title}:void 0,"data-testid":`${i}-modal-title`,id:n?"modal-title":"",variant:"label1medium",children:a?.title}),e.jsx($,{axis:"vertical",size:16}),e.jsx(_,{dangerouslySetInnerHTML:o?.description?{__html:o?.description}:void 0,"data-testid":`${i}-modal-description`,id:n?"modal-description":"",variant:"body3regular",children:a?.description}),(a?.conditions||o?.conditions)&&e.jsxs(e.Fragment,{children:[e.jsx($,{axis:"vertical",size:16}),e.jsx(_,{dangerouslySetInnerHTML:o?.conditions?{__html:o?.conditions}:void 0,"data-testid":`${i}-modal-conditions`,id:n?"modal-conditions":"",variant:"body5regular",children:a?.conditions})]})]})},I=k.div`
46  z-index: ${l.zIndex.appBar};
47
48  display: flex;
49  align-items: center;
50  justify-content: center;
51
52  width: 100%;
53  height: ${l.env.bannerHeight};
54
55  color: var(--dd-banner-color, ${l.colors.neutral[100]});
56  text-align: center;
57
58  background-color: var(--dd-banner-bg-color, unset);
59
60  transition: background 0.3s ease;
61
62  & em {
63    font-style: normal;
64    text-decoration: underline;
65  }
66
67  ${R("md")} {
68    justify-content: center;
69    padding-left: unset;
70  }
71
72  &[data-has-link] {
73    ${R("sm")} {
74      justify-content: space-between;
75      padding-left: ${l.spacing[20]};
76    }
77  }
78
79  &[data-is-underlined] {
80    cursor: pointer;
81    text-decoration: underline;
82  }
83`,me=k(H)`
84  width: 100%;
85  color: ${l.colors.neutral[100]};
86`,M="/products/custom-hair-supplements",F={general:{type:"banner_general",includePaths:[]},"checkout-form":{type:"banner_checkout_form",includePaths:["/checkout/:category/:step"],excludePaths:["/checkout/accessories/*"]},homepage:{type:"banner_homepage",includePaths:["/"]},cart:{type:"banner_cart",includePaths:["/checkout/:category"],excludePaths:["/checkout/success-interstitial","/checkout/success","/checkout/accessories","/checkout/accessories/*"]},"checkout-success":{type:"banner_success_page",includePaths:["/checkout/success-interstitial","/checkout/success"]},consultation:{type:"banner_consultation",includePaths:["/consultation/:category"],excludePaths:["/consultation/category","/consultation/accept-terms"]},supplements:{type:"banner_supplements",includePaths:[M]},haircare:{type:"banner_upper_funnel",includePaths:se,excludePaths:[M]},skincare:{type:"banner_upper_funnel",includePaths:[...ae]},"agnostic-page":{type:"banner_agnostic_page",includePaths:oe}},ge=n=>{const t=Object.entries(F),[a]=t.find(([d,i])=>i.includePaths.some(s=>b({path:s}
86,n))&&!i.excludePaths?.some(s=>b({path:s},n)))??["general",""];return a};let z;const fe=({children:n,event:t})=>{const a=A();return x.useEffect(()=>{t&&t!==z&&(a(N("Banner Displayed - Data Driven",{bannerType:t})),z=t)},[]),n},ye=()=>{const[n,t]=x.useState(!1),a=A(),{pathname:d}=P(),[i]=J(),s=le(),o=ge(d),c=de(),h=c==="haircare"||c==="skincare",u=h?"banner_consultation":F[o].type,w=u==="banner_success_page"?i.get("order-pubkey"):void 0,p=w?{order:w}:u==="banner_cart"&&(s==="haircare"||s==="skincare")?{categorization:{category:s}}:u==="banner_upper_funnel"&&(o==="haircare"||o==="skincare")?{categorization:{category:o}}:h?{categorization:{category:c}}:void 0,{data:v,isLoading:D,isFetching:O}=E(),{data:C,isLoading:V,isFetching:W,isSuccess:G,error:K}=E(p?{promotionTypes:[u],context:p}:void 0),Y=V||!!p&&D,T=p?C:v,q=!(T!=null&&Object.prototype.hasOwnProperty.call(T,u))&&(p?W:O);if(Y||q)return e.jsx(I,{"data-testid":"loading-banner",style:{"--dd-banner-bg-color":l.colors.neutral[100]}});if(!G||K)return null;const m=(p?C:v)?.[u]??v?.banner_general;if(!m)return null;const r=m.configuration_display,g=m.configuration_display.link,f=r["bottom-modal"],B=()=>{r.event&&a(N("Banner Click",ee({event:r.event,"gwp-type":r["gwp-type"]})))};return e.jsxs(e.Fragment,{children:[f&&e.jsx(he,{backgroundColor:l.colors.tertiary[200],dataFrom:"membership-modal",htmlContent:{title:f.title,description:f.description,conditions:f.disclaimer},isOpen:n,onClose:()=>t(!1)}),e.jsx(fe,{event:m.configuration_display.event,children:e.jsx(I,{"aria-label":r["aria-label"],className:`${Q()} ${U.body5regular}`,"data-click":r["data-click"],"data-from":r["data-from"],"data-has-link":g?.url?"":void 0,"data-is-underlined":r["is-underlined"]||r["bottom-modal"]?"":void 0,"data-testid":"site-wide-banner",onClick:g?.url?void 0:()=>{B(),t(!0)},onKeyPress:re(()=>t(!0)),role:"button",style:{"--dd-banner-color":r.color,"--dd-banner-bg-color":r["background-color"]},tabIndex:0,children:g?.url?e.jsx(me,{dangerouslySetInnerHTML:{__html:r.text??""},onClick:B,to:g.url}):e.jsx("p",{dangerouslySetInnerHTML:{__html:r.text??""}})})})]})},be=S("top-0 left-0 z-(--z-index-app-bar) w-full","has-[.menu-open]:fixed has-[.menu-open]:inset-0 has-[.menu-open]:flex has-[.menu-open]:h-svh has-[.menu-open]:flex-col"),Ie=({banner:n=!1,children:t,showFooterLink:a=!1,sticky:d})=>{const i=x.useRef(null);return x.useEffect(()=>{const s=i.current;if(!s)return;const o=document.documentElement,c=()=>o.style.setProperty("--sticky-header-height",`${s.offsetHeight}px`);c();const h=new ResizeObserver(c);return h.observe(s),()=>{h.disconnect(),o.style.removeProperty("--sticky-header-height")}},[]),e.jsxs("header",{className:S(be,d===!1?"relative":"sticky"),ref:i,children:[e.jsx(ie,{showFooterLink:a}),n&&e.jsx(ye,{}),t]})};export{he as B,Ie as H,de as a,le as u};
87
88//# debugId=e84cfaa0-d404-5e0e-9145-a3ebf3081561

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.