1import{r as m,c1 as $,ao as Y,Y as J,c0 as K,S as Q,c as Z,d as ee,aj as te,c2 as se,j as e,an as oe}from"./index-DuYcMUNu.js";const g=768,b=520;function z(){if(typeof window>"u")return!1;const o=window.navigator.userAgent||"";return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Windows Phone/i.test(o)?!0:window.navigator.maxTouchPoints>1&&/Macintosh/i.test(o)}function T(o){return o<b?"phone":o<g?"tablet":"desktop"}function ne(){const[o,v]=m.useState(()=>{const t=typeof window>"u"?0:window.innerWidth,s=typeof window>"u"?0:window.innerHeight,u=z(),h=T(t);return{width:t,height:s,isMobileBrowser:u,isDesktopBrowser:!u,viewportBucket:h,isDesktopWidth:t>=g,isTabletWidth:t>=b&&t<g,isPhoneWidth:t<b}});return m.useEffect(()=>{if(typeof window>"u")return;const t=()=>{const s=window.innerWidth,u=window.innerHeight,h=z(),n=T(s);v({width:s,height:u,isMobileBrowser:h,isDesktopBrowser:!h,viewportBucket:n,isDesktopWidth:s>=g,isTabletWidth:s>=b&&s<g,isPhoneWidth:s<b})};return t(),window.addEventListener("resize",t),window.addEventListener("orientationchange",t),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t)}},[]),o}function de(){const o=!!$("/content/smartmeals2"),{getSiteContentLocationGroupsForSlug:v}=Y(),{isLLRewards:t}=J(),{getStoreApp:s}=K(),{isUserLoggedIn:u}=Q(),{getShopper:h}=Z(),n=m.useRef(null),[H,y]=m.useState(0),[D,p]=m.useState(0),{width:q,isMobileBrowser:S,isTabletWidth:O,isPhoneWidth:V}=ne(),_=s(),r="FALSE"?.toLocaleLowerCase()=="true",f=v(o?"smartmeals2":"smartmeals"),k=h()?.Cards.length>0?h()?.Cards[0]:null,C=u(),j=C&&t()&&k!=null,F=ee(),U=te();let R=null,N="";C&&f!==void 0&&f!=null?N=se(f?.siteContent?.content,k?.Number,_?.store_num):(console.log("SETTING2"),R=""),m.useEffect(()=>{(async()=>{setTimeout(()=>{if(n!=null&&n.current)try{n.current.contentDocument?.location.reload()}catch(d){console.log("Could not access iframe content due to cross-origin restrictions:",d);const A=n.current.src;n.current.src=A}},500)})()},[q,S]);const w=f!=null,M=O||V,x=!r&&M,E=w&&j&&(x&&S||r&&M),B=w&&j&&(!r&&!M||x&&!S),P=w&&x,W=w&&r&&j;m.useEffect(()=>{const i=["smartmeals-hide-header","smartmeals-hide-footer","smartmeals-hide-addtoany"];return i.forEach(d=>document.body.classList.remove(d)),W&&document.body.classList.add("smartmeals-hide-header"),P&&(document.body.classList.add("smartmeals-hide-footer"),document.body.classList.add("smartmeals-hide-addtoany")),()=>{i.forEach(d=>document.body.classList.remove(d))}},[P,W]),m.useEffect(()=>{if(!E){y(0),p(0);return}const i="smartmeals-fullscreen-active";document.body.classList.add(i);const d=document.body.style.overflow;if(document.body.style.overflow="hidden",r){y(0);const c=document.querySelector("footer.mobile-footer"),a=()=>{if(c){const X=c.getBoundingClientRect().height;p(Math.max(0,Math.ceil(X)))}else p(0)};requestAnimationFrame(()=>{requestAnimationFrame(a)});const l=c?new ResizeObserver(a):null;return c&&l&&l.observe(c),window.addEventListener("resize",a),()=>{document.body.classList.remove(i),document.body.style.overflow=d,l?.disconnect(),window.removeEventListener("resize",a),p(0)}}p(0);const A=()=>{const a=document.querySelector("#mobileHeader .navbar"),l=window.getComputedStyle(a);return l.display==="none"||l.visibility==="hidden"||a.getBoundingClientRect().height===0?0:a.getBoundingClientRect().height},L=()=>{y(Math.max(0,A()))};requestAnimationFrame(()=>{requestAnimationFrame(L)});const I=new ResizeObserver(L);return["#topHeader","#mobileHeader .mobile_top_navbar","#pageContainer > header","#root header"].forEach(c=>{document.querySelectorAll(c).forEach(l=>I.observe(l))}),window.addEventListener("resize",L),()=>{document.body.classList.remove(i),document.body.style.overflow=d,I?.disconnect(),window.removeEventListener("resize",L),y(0)}},[E,r]);const G=i=>{i.preventDefault(),F(oe(U))};return console.log("SMART MEALS LOADED"),console.log(R),console.log(`DIV: ${document.getElementById("breeze-iframe")?document.getElementById("breeze-iframe").getHTML():"undefinnnnnnned"}`),e.jsxs(e.Fragment,{children:[e.jsx("meta",{name:"referrer",content:"unsafe-url"}),e.jsx("style",{children:` 2 body.smartmeals-hide-header #pageContainer > header, 3 body.smartmeals-hide-header #root header, 4 body.smartmeals-hide-header #topHeader { 5 display: none !important; 6 } 7 body.smartmeals-hide-footer footer { 8 display: none !important; 9 } 10 body.smartmeals-hide-footer .site-footer { 11 display: none !important; 12 } 13 body.smartmeals-hide-addtoany #social-share-sidebar { 14 display: none !important; 15 } 16 .smartmeals-fullscreen { 17 position: fixed; 18 left: 0; 19 right: 0; 20 bottom: 0; 21 width: 100%; 22 max-width: 100vw; 23 z-index: 900; 24 margin: 0; 25 padding: 0; 26 background: #fff; 27 box-sizing: border-box; 28 } 29 .smartmeals-fullscreen iframe { 30 display: block; 31 width: 100%; 32 height: 100%; 33 border: none; 34 margin: 0; 35 padding: 0; 36 box-sizing: border-box; 37 } 38 `}),w?j?E?e.jsx(e.Fragment,{children:e.jsx("div",{className:"smartmeals-fullscreen","aria-label":"Smart Meals",style:{to
38p:r?0:H,bottom:r?D:0},children:e.jsx("iframe",{src:N,title:"Smart Meals",id:"breeze-iframe",width:"100%",height:"100%",ref:n})})}):e.jsxs("div",{className:"row mx-0 mx-lg-5 mt-2 mt-md-5",children:[e.jsxs("div",{className:"col-md-12 content-main",children:[e.jsx("main",{role:"main",children:e.jsxs("div",{className:"col-xs-12 contentwrapper",style:{paddingInline:r||x&&!S?"0px":"15px"},children:[e.jsx("h1",{className:"text-theme-header",children:f?.siteContent?.title}),e.jsx("style",{children:` 39 .smartmeals-iframe-wrap-desktop { 40 width: 100%; 41 max-width: 100%; 42 } 43 .smartmeals-iframe-wrap-desktop iframe { 44 display: block; 45 width: 100%; 46 max-width: 100%; 47 border: none; 48 box-sizing: border-box; 49 min-height: 70vh; 50 } 51 .smartmeals-iframe-wrap-desktop.fixed-height iframe { 52 height: 1155px; 53 min-height: 1155px; 54 } 55 `}),e.jsx("div",{className:`smartmeals-iframe-wrap-desktop ${B?"fixed-height":""}`,children:e.jsx("iframe",{src:N,title:"Smart Meals",id:"breeze-iframe",width:"100%",height:B?1155:"100%",ref:n})}),e.jsx("hr",{className:"dotted"})]})}),e.jsx("div",{className:"clearfix"})]}),e.jsx("div",{className:"clearfix"})]}):e.jsxs("div",{className:"row mx-0 mx-lg-5 mt-2 mt-md-5",children:[e.jsxs("div",{className:"col-md-12 content-main",children:[e.jsx("main",{role:"main",children:e.jsxs("div",{className:"col-xs-12 contentwrapper",children:[e.jsxs("div",{className:"text-center",style:{height:"100vh",display:"block"},children:[e.jsx("h1",{}),e.jsx("h3",{className:"text-center-important text-theme-header",children:"Please Sign in with your Loyalty Account"}),e.jsxs("p",{className:"text-center",children:["To access SmartMeals, you need to be signed in with your loyalty account. Please ",e.jsx("a",{href:"#",className:"link-theme",onClick:G,children:"sign in"})," or ",e.jsx("a",{href:"#",className:"link-theme",onClick:()=>F("/register"),children:"create an account"})," to continue."]}),e.jsx("img",{src:x?"/images/smartmeals-signin-mobile.png":"/images/smartmeals-signin.png",alt:"SmartMeals Sign In",style:{width:"auto",height:"90%",maxWidth:"100%",paddingTop:"20px",objectFit:"contain",objectPosition:"top"}})]}),e.jsx("hr",{className:"dotted"})]})}),e.jsx("div",{className:"clearfix"})]}),e.jsx("div",{className:"clearfix"})]}):e.jsxs("div",{className:"row mx-0 mx-lg-5 mt-2 mt-md-5",children:[e.jsxs("div",{className:"col-md-12 content-main",children:[e.jsx("main",{role:"main",children:e.jsx("div",{className:"col-xs-12 contentwrapper",children:e.jsx("hr",{className:"dotted"})})}),e.jsx("div",{className:"clearfix"})]}),e.jsx("div",{className:"clearfix"})]})]})}export{de 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.