PageSourceSearch

https://www.chefatyourservice.com/_next/static/chunks/ReviewCollector.06e97825fb9eecec.js

js chefatyourservice.com collected 2026-10-05 07:03:07 UTC 16,424 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2532],{5688:(e,t,n)=>{n.r(t),n.d(t,{default:()=>x});var l=n(6029),r=n(55729),o=n(86859),i=n(25425),a=n(71024),s=n.n(a),c=n(21425),u=n(21168),d=n(56874),h=n(12224);function g(e){let{layout:t,slug:n,token:o=null,pageMeta:i}=e,a=function(e){let{slug:t,token:n=null,pageMeta:l,layout:o}=e,{config:i}=(0,r.useContext)(c.QO),a=n??null,s=l.businessName||"Business",u=(0,r.useMemo)(()=>({businessName:s,googlePlaceId:l.googlePlaceId??null,isPublicAccessEnabled:!1!==l.isPublicAccessEnabled,contactName:l.contactName??null,contactEmail:l.contactEmail??null,contactPhone:l.contactPhone??null,suggestedReviewText:l.suggestedReviewText??null,logoDisplayUrl:l.logoDisplayUrl??null,errorType:l.errorType,accentColor:(0,d.jw)({siteSecondaryColor:i.colors?.secondary??l.brandColor??null,slug:t,businessName:s})}),[l,i.colors?.secondary,t,s]),g=(0,h.$)({slug:t,resolvedToken:a,isPublicAccessEnabled:u.isPublicAccessEnabled,hasKnownContactMethod:!!(u.contactEmail?.trim()||u.contactPhone?.trim()),suggestedReviewText:u.suggestedReviewText,layout:o});return{resolvedToken:a,baseLoading:!1,...u,...g}}({slug:n,token:o,pageMeta:i,layout:t});return(0,l.jsx)(u.A,{layout:t,hideWhenNotPublic:"embedded"===t&&!1===i.isPublicAccessEnabled,...a})}let b=s()(()=>n.e(1492).then(n.bind(n,1492)),{loadableGenerated:{webpack:()=>[1492]},ssr:!1});function p(e){let{layout:t,slug:n,token:o=null,pageMeta:i}=e,{isPreview:a}=(0,r.useContext)(c.QO);return a||null==i?(0,l.jsx)(b,{layout:t,slug:n,token:o}):(0,l.jsx)(g,{layout:t,slug:n,token:o,pageMeta:i})}function x(e){let{title:t,subtitle:n,backgroundColor:a,reviewLinkSlug:s}=e,c="string"==typeof s?s.trim():"",{getReviewCollectorBySlug:u,getPageMetaBySlug:d}=(0,r.useContext)(i.Ht);if(!c)return null;let h=d(c),g=u(c);return h&&!h.isPublicAccessEnabled||g&&!g.isPublicAccessEnabled?null:(0,l.jsx)(o.A,{title:t,subtitle:n,backgroundColor:a,children:(0,l.jsx)(p,{layout:"embedded",slug:c,pageMeta:h??void 0})})}},7124:(e,t,n)=>{function l(e){if("string"!=typeof e)return null;3===(e=e.replace(/^#/,"")).length&&(e=e.split("").map(e=>e+e).join(""));let t=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function r(e,t){let n="0",l="0",r="0";return e?.length===4?(n=`0x${e[1]}${e[1]}`,l=`0x${e[2]}${e[2]}`,r=`0x${e[3]}${e[3]}`):e?.length===7&&(n=`0x${e[1]}${e[2]}`,l=`0x${e[3]}${e[4]}`,r=`0x${e[5]}${e[6]}`),`rgba(${+n},${+l},${+r},${t})`}function o(e){let t=l(e);return t?function(e){let t=e.r/255,n=e.g/255,l=e.b/255,r=Math.max(t,n,l),o=Math.min(t,n,l),i=0,a=0,s=(r+o)/2;if(r!==o){let e=r-o;switch(a=s>.5?e/(2-r-o):e/(r+o),r){case t:i=(n-l)/e+6*(n<l);break;case n:i=(l-t)/e+2;break;case l:i=(t-n)/e+4}i/=6}return{h:Math.round(360*i),s:Math.round(100*a),l:Math.round(100*s)}}(t):null}function i(e){let{h:t,s:n,l}=e,r=l/100,o=n/100*(1-Math.abs(2*r-1)),i=t/60,a=o*(1-Math.abs(i%2-1)),s=0,c=0,u=0;i>=0&&i<1?(s=o,c=a,u=0):i>=1&&i<2?(s=a,c=o,u=0):i>=2&&i<3?(s=0,c=o,u=a):i>=3&&i<4?(s=0,c=a,u=o):i>=4&&i<5?(s=a,c=0,u=o):i>=5&&i<6&&(s=o,c=0,u=a);let d=r-o/2,h=Math.round((s+d)*255),g=Math.round((c+d)*255),b=Math.round((u+d)*255),p=e=>{let t=e.toString(16);return 1===t.length?`0${t}`:t};return`#${p(h)}${p(g)}${p(b)}`}n.d(t,{E2:()=>l,Sf:()=>i,g8:()=>o,j5:()=>r})},12224:(e,t,n)=>{n.d(t,{$:()=>a});var l=n(55729),r=n(25425),o=n(69937),i=n(33730);function a(e){let{slug:t,resolvedToken:n,isPublicAccessEnabled:a,hasKnownContactMethod:s,suggestedReviewText:c,layout:u}=e,{getReviewCollectorPublicApiUrl:d}=(0,l.useContext)(r.Ht),h=`bizwise:reviewCollectorCompletion:${t}:${n?`token:${n}`:"public"}`,g=!n&&a||!!n&&!s,b=(0,l.useCallback)(e=>"standalone"===u?(0,i.I)(!1,t,e,n,"standalone"):d(t,e,n),[u,t,n,d]),[p,x]=(0,l.useState)("choose"),[f,m]=(0,l.useState)(null),[v,w]=(0,l.useState)(null),[y,j]=(0,l.useState)(null),[k,A]=(0,l.useState)(!1),[C,$]=(0,l.useState)(()=>c??"");(0,l.useEffect)(()=>{x(function(e){try{let t=window.localStorage.getItem(e);if("positive"===t)return"positive_thanks";if("negative"===t)return"negative_thanks"}catch{}return"choose"}(h))},[h]),(0,l.useEffect)(()=>{$(c??"")},[c]);let S=(0,l.useCallback)(async()=>{let e=C.trim();if(e)try{await navigator.clipboard.writeText(e),A(!0),setTimeout(()=>A(!1),2e3)}catch{j("Could not copy to clipboard")}},[C]),P=(0,l.useCallback)(async()=>{j(null),w("positive");try{let e=await fetch(b("positive"),{method:"POST"}),t=await e.json();if(!e.ok){j(t.message||"Something went wrong"),w(null);return}if(t.googleReviewUrl){m(t.googleReviewUrl),x("positive_thanks");try{window.localStorage.setItem(h,"positive")}catch{}}else j("No review link returned")}catch{j("Network error. Please try again.")}finally{w(null)}},[h,b]),E=(0,l.useCallback)(async e=>{if(j(null),!n&&!a)return void j("To send private feedback, open this page from the link in your review request email.");let t=e.feedbackText.trim(),l=e.contactEmail?.trim()??"",r=e.contactPhone?.trim()??"",i=e.contactName?.trim()??"";if(!t)return void j("Please describe what happened.");if(!(!g||l||r))return void j("Please enter an email address or phone number so the business can follow up.");if(g&&l&&!(0,o.B9)(l))return void j("Please enter a valid email address.");
1if(g&&r&&!o.x2.test(r))return void j("Please enter a valid phone number.");let s=!n&&a;w("negative");try{let e=await fetch(b("negative"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedbackText:t,...s&&i?{contactName:i}:{},...l?{contactEmail:l}:{},...r?{contactPhone:r}:{}})}),n=await e.json();if(!e.ok){j(n.message||"Could not send feedback"),w(null);return}x("negative_thanks");try{window.localStorage.setItem(h,"negative")}catch{}}catch{j("Network error. Please try again.")}finally{w(null)}},[h,g,n,a,b]);return{flow:p,setFlow:x,googleReviewUrl:f,requiresSubmittedContact:g,pendingAction:v,err:y,setErr:j,copyDone:k,editedSuggestedReviewText:C,setEditedSuggestedReviewText:$,onCopySuggested:S,onPositive:P,onSubmitNegative:E}}},21168:(e,t,n)=>{n.d(t,{A:()=>E});var l=n(6029),r=n(55729),o=n(71024),i=n.n(o),a=n(90798),s=n(63892),c=n(88375),u=n(90923),d=n(56188),h=n(17745),g=n(32559),b=n(62512);function p(e){let{greeting:t,accentColor:n,isPublicAccessEnabled:r,resolvedToken:o,pendingAction:i,onPositive:c,onStartNegative:p,err:x}=e;return(0,l.jsxs)(h.A,{spacing:2.5,children:[(0,l.jsxs)(g.A,{variant:"body1",color:"text.secondary",sx:{textAlign:"center",lineHeight:1.65,fontSize:"1.05rem"},children:[(0,l.jsx)(a.A,{component:"span",sx:{fontWeight:600,color:"text.primary"},children:t})," ","How was your experience with us?"]}),r||o?(0,l.jsxs)(h.A,{spacing:1.5,children:["positive"===i?(0,l.jsx)(s.A,{"aria-label":"Preparing your review link",sx:{height:3,borderRadius:1,bgcolor:(0,b.X4)(n,.12),"& .MuiLinearProgress-bar":{borderRadius:1,bgcolor:n}}}):null,(0,l.jsx)(d.A,{variant:"contained",color:"success",size:"large",fullWidth:!0,loading:"positive"===i,loadingPosition:"start",disabled:!r&&!o,onClick:c,sx:{py:1.35,fontWeight:700,fontSize:"1rem",boxShadow:e=>e.shadows[4]},children:"positive"===i?"Opening Google review…":"It was great!"}),(0,l.jsx)(u.A,{variant:"outlined",color:"warning",size:"large",fullWidth:!0,disabled:null!==i,onClick:p,sx:{py:1.2,fontWeight:600,color:e=>(0,b.e$)(e.palette.warning.main,.25)},children:"I had an issue"}),"positive"===i?(0,l.jsx)(g.A,{variant:"caption",color:"text.secondary",sx:{textAlign:"center",display:"block"},children:"One moment while we prepare your review link."}):null]}):(0,l.jsxs)(a.A,{sx:{bgcolor:(0,b.X4)("#64748b",.08),border:`1px solid ${(0,b.X4)("#64748b",.2)}`,borderRadius:1,p:2,textAlign:"center"},children:[(0,l.jsx)(g.A,{color:"text.secondary",variant:"body2",sx:{fontWeight:500},children:"Reviews by invitation only"}),(0,l.jsx)(g.A,{color:"text.secondary",variant:"body2",sx:{mt:.75},children:"Use the personal link from your review request email or text message."})]}),x?(0,l.jsx)(g.A,{color:"error",variant:"body2",sx:{textAlign:"center"},children:x}):null]})}var x=n(72319),f=n(64552),m=n(95143),v=n(1089),w=n(30003);function y(e){let{accentColor:t,businessName:n,logoUrl:o,eyebrow:i,titleVariant:s,children:c}=e,[u,d]=(0,r.useState)(!1);(0,r.useEffect)(()=>{d(!1)},[o]);let h=function(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length>=2?`${t[0][0]}${t[1][0]}`.toUpperCase():1===t.length&&t[0].length>=2?t[0].slice(0,2).toUpperCase():1===t.length?t[0][0].toUpperCase():""}(n||""),p=!!(n&&h),x=!!(o&&!u),y=(0,w.rp)(t,["#111111","#ffffff"]);return(0,l.jsxs)(a.A,{sx:{width:"100%",maxWidth:540,mx:"auto",bgcolor:"#ffffff",borderRadius:2,boxShadow:"0 4px 24px rgba(15, 23, 42, 0.08)",borderTop:`4px solid ${t}`,p:{xs:2.5,sm:"h1"===s?3.75:3}},children:[(0,l.jsx)(g.A,{variant:"overline",sx:{display:"block",textAlign:"center",letterSpacing:1.2,color:"text.secondary",fontWeight:600,mb:1.5},children:i}),(0,l.jsxs)(a.A,{sx:{textAlign:"center",mb:2},children:[(0,l.jsx)(f.A,{src:x&&o?o:void 0,alt:"",imgProps:{onError:()=>d(!0)},sx:{width:76,height:76,mx:"auto",mb:1.75,bgcolor:t,color:y,fontSize:"1.4rem",fontWeight:700,boxShadow:`0 6px 20px ${(0,b.X4)(t,.35)}`},"aria-hidden":!p&&!x,children:!x&&p?h:x?null:(0,l.jsx)(v.A,{sx:{fontSize:40,color:y}})}),n?(0,l.jsx)(g.A,{component:s,variant:"h5",sx:{fontWeight:700,color:"text.primary",lineHeight:1.25,letterSpacing:"-0.02em"},children:n}):null]}),(0,l.jsx)(m.A,{sx:{mb:2.5,borderColor:(0,b.X4)("#64748b",.2)}}),(0,l.jsx)(a.A,{sx:{"& .MuiOutlinedInput-root":{bgcolor:"#ffffff",boxShadow:"none !important",border:`1px solid ${(0,b.X4)("#64748b",.4)} !important`,"&:hover":{borderColor:`${(0,b.X4)("#64748b",.55)} !important`},"&:focus-within":{borderColor:`${t} !important`}}},children:c})]})}function j(){return(0,l.jsx)(a.A,{sx:{py:2},children:(0,l.jsx)(s.A,{})})}let k=i()(()=>n.e(88243).then(n.bind(n,88243)),{loadableGenerated:{webpack:()=>[88243]},loading:()=>(0,l.jsx)(j,{})}),A=i()(()=>n.e(83521).then(n.bind(n,83521)),{loadableGenerated:{webpack:()=>[83521]},loading:()=>(0,l.jsx)(j,{})}),C=i()(()=>n.e(40124).then(n.bind(n,40124)),{loadableGenerated:{webpack:()=>[40124]},loading:()=>(0,l.jsx)(j,{})}),$=i()(()=>Promise.all([n.e(32182),n.e(94054),n.e(10918),n.e(1682),n.e(15701),n.e(48482),n.e(80783)]).then(n.bind(n,47058)),{loadableGenerated:{webpack:()=>[47058]},loading:()=>(0,l.jsx)(j,{})}),S=i()(()=>Promise.all([n.e(32182),n.e(94054),n.e(10918),n.e(1682),n.e(15701),n.e(48482),n.e(18508)]).then(n.bind(n,60055)),{loadableGenerated:{webpack:()=>[60055]},loading:()=>(0,l.jsx)(j,{})}),P=i()(()=>n.e(29746).then(n.bind(n,29746)),{loadableGenerated:{webpack:()=>[29746]},loading:()=>(0,l.jsx)(j,{})});function E(e){let{layout:t,hideWhenNotPublic:n,resolvedToken:o,businessName:i,googlePlaceId:a,isPublicAccessEnabled:s,contactName:u,suggestedReviewText:d,logoDisplayUrl:h,errorType:g,flow:b,setFlow:f,googleReviewUrl:m,requiresSubmittedContact:v,pendingAction:w,err:E,setErr:M,c
1opyDone:N,editedSuggestedReviewText:T,setEditedSuggestedReviewText:R,accentColor:_,onCopySuggested:I,onPositive:U,onSubmitNegative:O}=e,W="standalone"===t?"h1":"h2";if("embedded"===t&&!o&&!s||n)return null;if("not_found"===g)return(0,l.jsx)(x.A,{layout:t,accentColor:c.p,children:(0,l.jsx)(y,{titleVariant:W,accentColor:c.p,businessName:null,logoUrl:null,eyebrow:"Review",children:(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(j,{}),children:(0,l.jsx)(A,{})})})});if("not_public"===g)return"embedded"===t?null:(0,l.jsx)(x.A,{layout:t,accentColor:c.p,children:(0,l.jsx)(y,{titleVariant:W,accentColor:c.p,businessName:null,logoUrl:null,eyebrow:"Review",children:(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(j,{}),children:(0,l.jsx)(C,{})})})});if("link_expired"===g&&"positive_thanks"!==b&&"negative_thanks"!==b)return(0,l.jsx)(x.A,{layout:t,accentColor:_,children:(0,l.jsx)(y,{titleVariant:W,accentColor:_,businessName:i||null,logoUrl:h??null,eyebrow:"Review",children:(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(j,{}),children:(0,l.jsx)(k,{businessName:i})})})});let G=u?`Hi ${u}`:"Hello";return(0,l.jsx)(x.A,{layout:t,accentColor:_,children:(0,l.jsxs)(y,{titleVariant:W,accentColor:_,businessName:i,logoUrl:h??null,eyebrow:"Google review",children:["choose"===b&&(0,l.jsx)(p,{greeting:G,accentColor:_,isPublicAccessEnabled:s,resolvedToken:o,pendingAction:w,onPositive:U,onStartNegative:()=>{f("negative_form"),M(null)},err:E}),"positive_thanks"===b&&(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(j,{}),children:(0,l.jsx)($,{businessName:i,googleReviewUrl:m,googlePlaceId:a,suggestedReviewText:d,editedSuggestedReviewText:T,onEditedSuggestedReviewTextChange:R,onCopySuggested:I,copyDone:N})}),"negative_form"===b&&(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(j,{}),children:(0,l.jsx)(S,{accentColor:_,resolvedToken:o,isPublicAccessEnabled:s,requiresSubmittedContact:v,pendingAction:w,err:E,onBack:()=>f("choose"),onSubmitNegative:O})}),"negative_thanks"===b&&(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(j,{}),children:(0,l.jsx)(P,{businessName:i,onShareMoreFeedback:o?void 0:()=>{f("negative_form"),M(null)}})})]})})}},30003:(e,t,n)=>{n.d(t,{B_:()=>h,CT:()=>u,Od:()=>s,bJ:()=>a,nn:()=>c,rp:()=>d});var l=n(76568),r=n(49449),o=n(7124);function i(e,t,n){let l=[e,t,n].map(e=>(e/=255)<=.03928?e/12.92:((e+.055)/1.055)**2.4);return .2126*l[0]+.7152*l[1]+.0722*l[2]}function a(e,t){let n=(0,o.E2)(e),l=(0,o.E2)(t);if(!n||!l)return null;let r=i(n.r,n.g,n.b),a=i(l.r,l.g,l.b);return(Math.max(r,a)+.05)/(Math.min(r,a)+.05)}let s=4;function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,l=a(e,t);return!!(l&&l>n)}function u(e,t){let n=(0,r.n)(t.map(t=>a(e,t))),l=Math.max(...n);return t[n.indexOf(l)]||t[0]}function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s;return t.find(t=>(a(e,t)||0)>n)||u(e,t)}function h(e,t){let n=t;return(t?.startsWith("rgb")&&(n=(0,l.Ob)(t)),!n||c(e.palette.text.primary,n))?e.palette.text.primary:e.palette.text.secondary}},49449:(e,t,n)=>{n.d(t,{n:()=>l});let l=e=>e.filter(e=>null!=e&&""!==e&&0!==e&&!1!==e)},56874:(e,t,n)=>{n.d(t,{P4:()=>a,jw:()=>s});var l=n(7652),r=n(88375);let o=/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;function i(e){return!!e&&!!e.trim()&&o.test(e.trim())}function a(e){if(null==e)return null;let t="string"==typeof e?e.trim():"";return t&&(0,l.Ay)(t,!0)||null}function s(e){var t;let n=function(e){if("string"!=typeof e||!e.trim())return null;let t=e.trim();return i(t)?t:null}(e.siteSecondaryColor);return n?n:i((t={brandColor:null,slug:e.slug,businessName:e.businessName}).brandColor)?t.brandColor.trim():t.businessName||t.slug?(0,r.k)(`${t.slug}|${t.businessName}`):r.p}},72319:(e,t,n)=>{n.d(t,{A:()=>a});var l=n(6029),r=n(55729),o=n(90798),i=n(62512);function a(e){let{layout:t,accentColor:n,children:a}=e,s=(0,r.useMemo)(()=>({boxSizing:"border-box",width:"100%",minHeight:"100vh","@supports (min-height: 100dvh)":{minHeight:"100dvh"},py:{xs:2,sm:5},px:2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:`linear-gradient(165deg, ${(0,i.X4)(n,.16)} 0%, #f1f5f9 42%, #e2e8f0 100%)`}),[n]);return"standalone"===t?(0,l.jsx)(o.A,{sx:s,children:a}):a}},76568:(e,t,n)=>{n.d(t,{Ob:()=>o,rP:()=>r});let l=["rgb","rgba","hsl","hsla","color"];function r(e){let t,n;if("string"!=typeof e)return e;if("#"===e.charAt(0))return r(function(e){let t=e.slice(1),n=RegExp(`.{1,${t.length>=6?2:1}}`,"g"),l=t.match(n);return l&&1===l[0].length&&(l=l.map(e=>e+e)),l?`rgb${4===l.length?"a":""}(${l.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let o=e.indexOf("("),i=e.substring(0,o);if(!l.some(e=>e===i))throw Error(`Unsupported \`${e}\` color. The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`);if("color"===i){if(n=(t=e.substring(o+1,e.length-1).split(" ")).shift(),4===t.length&&"/"===t[3].charAt(0)&&(t[3]=t[3].slice(1)),!n||!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(n))throw Error(`Unsupported \`${n}\` color space.`)}else t=e.substring(o+1,e.length-1).split(",");return{type:i,values:t.map(e=>parseFloat(e)),colorSpace:n}}function o(e){if(e.startsWith("#"))return e;let{values:t}=r(e);return`#${t.map((e,t)=>
1(e=>{let t=e.toString(16);return 1===t.length?`0${t}`:t})(3===t?Math.round(255*e):e)).join("")}`}},88375:(e,t,n)=>{n.d(t,{k:()=>r,p:()=>l});let l="#2563eb";function r(e){let t=0;for(let n=0;n<e.length;n+=1)t=(Math.imul(31,t)+e.charCodeAt(n))%36e4;let n=200+Math.abs(t)%56;return`hsl(${n}, 62%, 44%)`}}}]);

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.