1import{bA as Z,r as l,bB as n,g as j,s as M,c as J,bC as Q,n as E,K as y,j as i,G as z,H as ee,m as te,aV as se,_ as U,Z as K,o as C,T as D,d as O,bD as ne,B as S,W as P,V as q,bE as re,h as ae,$ as oe,Y as ie,N as ce,bF as R,bj as ue}from"./index-Cilng2yx.js";import{G as me,a as A,b as de}from"./index-LQe-jyiV.js";var L={},V;function le(){if(V)return L;V=1,L.match=c,L.parse=u;var e=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,t=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,s=/^(?:(min|max)-)?(.+)/,r=/(em|rem|px|cm|mm|in|pt|pc)?$/,o=/(dpi|dpcm|dppx)?$/;function c(p,a){return u(p).some(function(d){var h=d.inverse,w=d.type==="all"||a.type===d.type;if(w&&h||!(w||h))return!1;var I=d.expressions.every(function(H){var _=H.feature,W=H.modifier,f=H.value,g=a[_];if(!g)return!1;switch(_){case"orientation":case"scan":return g.toLowerCase()===f.toLowerCase();case"width":case"height":case"device-width":case"device-height":f=v(f),g=v(g);break;case"resolution":f=m(f),g=m(g);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":f=b(f),g=b(g);break;case"grid":case"color":case"color-index":case"monochrome":f=parseInt(f,10)||1,g=parseInt(g,10)||0;break}switch(W){case"min":return g>=f;case"max":return g<=f;default:return g===f}});return I&&!h||!I&&h})}function u(p){return p.split(",").map(function(a){a=a.trim();var d=a.match(e),h=d[1],w=d[2],I=d[3]||"",H={};return H.inverse=!!h&&h.toLowerCase()==="not",H.type=w?w.toLowerCase():"all",I=I.match(/\([^\)]+\)/g)||[],H.expressions=I.map(function(_){var W=_.match(t),f=W[1].toLowerCase().match(s);return{modifier:f[1],feature:f[2],value:W[2]}}),H})}function b(p){var a=Number(p),d;return a||(d=p.match(/^(\d+)\s*\/\s*(\d+)$/),a=d[1]/d[2]),a}function m(p){var a=parseFloat(p),d=String(p).match(o)[1];switch(d){case"dpcm":return a/2.54;case"dppx":return a*96;default:return a}}function v(p){var a=parseFloat(p),d=String(p).match(r)[1];switch(d){case"em":return a*16;case"rem":return a*16;case"cm":return a*96/2.54;case"mm":return a*96/2.54/10;case"in":return a*96;case"pt":return a*72;case"pc":return a*72/12;default:return a}}return L}var T,B;function he(){if(B)return T;B=1;var e=le().match,t=typeof window<"u"?window.matchMedia:null;function s(o,c,u){var b=this,m;t&&!u&&(m=t.call(window,o)),m?(this.matches=m.matches,this.media=m.media,m.addListener(a)):(this.matches=e(o,c),this.media=o),this.addListener=v,this.removeListener=p,this.dispose=d;function v(h){m&&m.addListener(h)}function p(h){m&&m.removeListener(h)}function a(h){b.matches=h.matches,b.media=h.media}function d(){m&&m.removeListener(a)}}function r(o,c,u){return new s(o,c,u)}return T=r,T}var pe=he();const fe=Z(pe);var xe=/[A-Z]/g,ge=/^ms-/,k={};function be(e){return"-"+e.toLowerCase()}function F(e){if(k.hasOwnProperty(e))return k[e];var t=e.replace(xe,be);return k[e]=ge.test(t)?"-"+t:t}function ye(e,t){if(e===t)return!0;if(!e||!t)return!1;const s=Object.keys(e),r=Object.keys(t),o=s.length;if(r.length!==o)return!1;for(let c=0;c<o;c++){const u=s[c];if(e[u]!==t[u]||!Object.prototype.hasOwnProperty.call(t,u))return!1}return!0}const x=n.oneOfType([n.string,n.number]),X={all:n.bool,grid:n.bool,aural:n.bool,braille:n.bool,handheld:n.bool,print:n.bool,projection:n.bool,screen:n.bool,tty:n.bool,tv:n.bool,embossed:n.bool},we={orientation:n.oneOf(["portrait","landscape"]),scan:n.oneOf(["progressive","interlace"]),aspectRatio:n.string,deviceAspectRatio:n.string,height:x,deviceHeight:x,width:x,deviceWidth:x,color:n.bool,colorIndex:n.bool,monochrome:n.bool,resolution:x,type:Object.keys(X)},{type:Ge,...ve}=we,He={minAspectRatio:n.string,maxAspectRatio:n.string,minDeviceAspectRatio:n.string,maxDeviceAspectRatio:n.string,minHeight:x,maxHeight:x,minDeviceHeight:x,maxDeviceHeight:x,minWidth:x,maxWidth:x,minDeviceWidth:x,maxDeviceWidth:x,minColor:n.number,maxColor:n.number,minColorIndex:n.number,maxColorIndex:n.number,minMonochrome:n.number,maxMonochrome:n.number,minResolution:x,maxResolution:x,...ve},Ie={...X,...He};var Ee={all:Ie};const Ce=e=>`not ${e}`,Me=(e,t)=>{const s=F(e);return typeof t=="number"&&(t=`${t}px`),t===!0?s:t===!1?Ce(s):`(${s}: ${t})`},_e=e=>e.join(" and "),We=e=>{const t=[];return Object.keys(Ee.all).forEach(s=>{const r=e[s];r!=null&&t.push(Me(s,r))}),_e(t)},Le=l.createContext(void 0),je=e=>e.query||We(e),N=e=>e?Object.keys(e).reduce((s,r)=>(s[F(r)]=e[r],s),{}):void 0,Y=()=>{const e=l.useRef(!1);return l.useEffect(()=>{e.current=!0},[]),e.current},Re=e=>{const t=l.useContext(Le),s=()=>N(e)||N(t),[r,o]=l.useState(s);return l.useEffect(()=>{const c=s();ye(r,c)||o(c)},[e,t]),r},Te=e=>{const t=()=>je(e),[s,r]=l.useState(t);return l.useEffect(()=>{const o=t();s!==o&&r(o)},[e]),s},ke=(e,t)=>{const s=()=>fe(e,t||{},!!t),[r,o]=l.useState(s),c=Y();return l.useEffect(()=>{if(c){const u=s();return o(u),()=>{u&&u.dispose()}}},[e,t]),r},De=e=>{const[t,s]=l.useState(e.matches);return l.useEffect(()=>{const r=o=>{s(o.matches)};
1return e.addListener(r),s(e.matches),()=>{e.removeListener(r)}},[e]),t},Oe=(e,t,s)=>{const r=Re(t),o=Te(e);if(!o)throw new Error("Invalid or missing MediaQuery!");const c=ke(o,r),u=De(c);return Y(),l.useEffect(()=>{},[u]),l.useEffect(()=>()=>{c&&c.dispose()},[]),u},Se=j.div.withConfig({componentId:"sc-10b33ho-0"})(["","{"," padding-top:50px;&:last-child{padding-bottom:50px;}}"],M,J),$="/earn/how-it-works",Pe=j.section.withConfig({componentId:"sc-10b33ho-1"})(["text-align:center;","{margin:0 auto;object-fit:contain;object-position:center;}"],Q),qe=j.span.withConfig({componentId:"sc-10b33ho-2"})(["display:block;span{display:block;}h3{margin-top:30px;}&& > div{min-width:unset;}@media (min-width:","){display:flex;justify-content:space-between;> div{flex-basis:calc(100% / 3);}}"],e=>e.theme.breakpoints.desktop),Ae=j.section.withConfig({componentId:"sc-10b33ho-3"})(["text-align:center;"]),Ve=()=>{const e=E(y.PageHomeBrowseRestaurantsButtonLabel);return i.jsx(Ae,{children:i.jsx(z,{as:se,to:te.SEARCH,"data-testid":"browse_restaurants__button",buttonVariant:ee.Tertiary,children:e})})},Be=()=>{const e=l.useContext(U),t=l.useContext(K),s=E(y.PageHomeHIWTitle),r=E(y.PageHomeHIW1Title),o=E(y.PageHomeHIW2Title),c=E(y.PageHomeHIW3Title),u=C(y.PageHomeHIW1Description),b=C(y.PageHomeHIW2Description),m=C(y.PageHomeHIW3Description),v=C(y.PageHomeHIWLearnMoreLabel),p=e.navbar?.nav_links?.some(h=>h.fields.url===$),a=[r,o,c],d=[u,b,m];return i.jsxs(Pe,{"data-testid":"how_it_works__wrapper",children:[i.jsx(D,{as:"h2",titleVariant:O.Lg,children:s}),i.jsx(qe,{"data-testid":"how_it_works__columns_wrapper",children:t?.home.howItWorksIcons.map((h,w)=>i.jsxs(M,{paddingTop:"md",paddingX:"lg",children:[i.jsx(Q,{"aria-hidden":"true",src:h,height:"75px",width:"75px"}),i.jsxs("h3",{children:[i.jsx(D,{as:"span",titleVariant:O.Sm,children:a[w]}),i.jsx(ne,{children:" "}),i.jsx(S,{as:"span",bodyTextVariant:q.XL,weight:P.A,children:i.jsx(re,{html:d[w]})})]})]},`how_it_works__${w}`))}),p&&i.jsx(S,{bodyTextVariant:q.XL,weight:P.A,children:i.jsx(ae,{"data-testid":"HIW-learn-more",href:$,children:v})})]})},G=({content:e})=>e?e({}):i.jsx(i.Fragment,{}),Qe=()=>{const{member:e}=l.useContext(oe),{partner:t}=l.useContext(ie),s=l.useContext(K),r=l.useContext(U),o=C(y.PageHomeDocumentTitle);ce(o);const c=Oe({query:`(max-width: ${s?.breakpoints.tablet})`}),u=t.copyStates.findIndex(m=>m({member:e})),b=r[R]&&r[R].length&&r[R].find(m=>m.user_states.some(v=>v.index===u));return i.jsxs(Se,{children:[b&&b?.banner?i.jsx(ue,{banner:b?.banner,bannerText:b?.banner_text}):null,i.jsx(M,{children:i.jsx(Be,{})}),i.jsx(G,{content:t.homePageBanner}),i.jsx(M,{children:i.jsx(Ve,{})}),i.jsx(M,{children:i.jsx(me,{id:de.HOME,mode:c?A.MOBILE:A.DESKTOP})}),i.jsx(G,{content:t.homePageBanner2})]})};export{Qe 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.