PageSourceSearch

https://trystan.net/assets/Reviews-C7iSiFih.js

js trystan.net collected 2026-09-26 06:22:17 UTC 24,669 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`3fb85819`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`dead1e76-ded7-45dd-adcc-03c00692de04`,e._sentryDebugIdIdentifier=`sentry-dbid-dead1e76-ded7-45dd-adcc-03c00692de04`)}catch{}})();import{s as e,t}from"./react-BxJ5vIog.js";import{_ as n,d as r,h as i,m as a}from"./src-jTF5SSYo.js";import{Yt as o,r as s}from"./persist-state-keys-DIv83xll.js";import{t as c}from"./jsx-runtime-_Lj106d5.js";import{i as l}from"./useAppFrom-BYhw6TDB.js";import{t as u}from"./compiler-runtime-BQBjb8-F.js";import{S as d,c as f,i as p}from"./useFetch-BoJLT2pS.js";import{t as m}from"./useMe-D7pJMmC1.js";import{r as h}from"./usePublicAccount-4Hkf4pUp.js";import{t as g}from"./bundle-mjs-fSrAgIZu.js";import{n as _}from"./empty-value-tNtL9maR.js";import{i as v}from"./DatePicker-g-kEfdpb.js";import{t as y}from"./Tooltip-Diwjx-rU.js";import{n as b,t as x}from"./Reply-yTE0wkn7.js";import{c as S}from"./string-DBNuY2qi.js";import{t as C}from"./cjs-Cq0NLgp1.js";import{t as w}from"./PrimaryButton-DvGW5Paf.js";import{n as T}from"./useTempCredentials-D9gfGESC.js";import{t as E}from"./useToggle-Cxz1Ljmu.js";import{r as D}from"./image-CILLplR7.js";import{t as O}from"./useActiveTemplate-IvwlaF54.js";import{t as k}from"./useCustomColor-BBzOQ_7R.js";import{t as A}from"./ModalFooter-CjBX0ARr.js";import{n as j}from"./Flex-BPn86gu4.js";import{t as M}from"./H2-J97gvs0l.js";import{t as ee}from"./NoteText-_TG_9Y4v.js";import{n as N,t as P}from"./Avatar-BWFm0bPv.js";import{r as F,t as te}from"./Dialog-Cqv8WVCs.js";import{t as I}from"./useDate-CDG0xbF6.js";import{n as L}from"./useFileUploader-BhyjotjS.js";import{t as R}from"./User-BaULmwsy.js";import{t as z}from"./useObjectUrl-Dvw4KMaX.js";var B=u(),V=e(C(),1),H={attentiveness:{desc:`How respectable, attentive, and competent was your service?`,title:`Professionalism`},communication:{desc:`Were you able to freely communicate and have your questions answered?`,title:`Communication`},overallValue:{desc:`How would you rate the overall experience and value?`,title:`Overall Value`},processingTime:{desc:`Was your service provided on time?`,title:`Timing`},quality:{desc:`Did the quality match your expectations?`,title:`Quality`}},U=e(t(),1),W=c(),ne=e=>{let t=(0,B.c)(43),{avatar:n,className:r,onError:i,onSetAvatarUrl:a,userDetails:s}=e,c=r===void 0?``:r,l=(0,U.useRef)(null),u=k(),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=f(`bloom_token`),t[0]=p):p=t[0];
1let m=p,{getStorageToken:h}=T(),g;t[1]===a?g=t[2]:(g=function(e){e&&a(e.path)},t[1]=a,t[2]=g);let v=g,b;t[3]!==v||t[4]!==s?(b={destination:`review-avatar`,enabled:!1,onComplete:v,userDetails:s},t[3]=v,t[4]=s,t[5]=b):b=t[5];let{abort:x,processing:S,selectFiles:C}=L(b),E=S===void 0?_:S,O;t[6]===E?O=t[7]:(O=E.slice(-1),t[6]=E,t[7]=O);let[A]=O,j=z(A?.file),M;t[8]!==x||t[9]!==a?(M=function(){x(),a(``)},t[8]=x,t[9]=a,t[10]=M):M=t[10];let ee=M,F;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(F=function(e){e.preventDefault(),l.current?.click()},t[11]=F):F=t[11];let te=F,I;t[12]!==h||t[13]!==i||t[14]!==C||t[15]!==s.email?(I=async function(e){let[t]=e.target.files||[];if(l.current&&(l.current.value=``),!m){if(!s.email){i(`Please, provide your email`);return}let e=await h({email:s.email});if(e.status===d.ERROR){i(o(e));return}}t&&D(t)&&C([t]),l.current&&(l.current.value=``)},t[12]=h,t[13]=i,t[14]=C,t[15]=s.email,t[16]=I):I=t[16];let V=I,H=j||n,ne=!!A,G;t[17]!==H||t[18]!==s.firstName||t[19]!==s.lastName?(G=H?(0,W.jsx)(P,{"data-testid":`avatar`,initials:`${s.firstName||``} || ${s.lastName||``}`,size:N.LARGE,src:H}):(0,W.jsx)(`div`,{className:`border-mid-grey text-grey relative h-20 w-20 rounded-full border border-dashed`,children:(0,W.jsx)(R,{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2`})}),t[17]=H,t[18]=s.firstName,t[19]=s.lastName,t[20]=G):G=t[20];let K;t[21]===V?K=t[22]:(K=(0,W.jsx)(`input`,{className:`sr-only`,name:`file`,onChange:e=>void V(e),ref:l,type:`file`}),t[21]=V,t[22]=K);let q=!!s.email,re;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(re={placement:`top`},t[23]=re):re=t[23];let ie;t[24]!==u||t[25]!==ne?(ie=(0,W.jsx)(w,{color:u,"data-testid":`upload-button`,disabled:ne,onClick:te,variant:`custom`,children:`Upload`}),t[24]=u,t[25]=ne,t[26]=ie):ie=t[26];let ae;t[27]!==q||t[28]!==ie?(ae=(0,W.jsx)(y,{closeDelay:0,content:`Please add an email before uploading an avatar`,disabled:q,openDelay:100,positioning:re,children:ie}),t[27]=q,t[28]=ie,t[29]=ae):ae=t[29];let oe;t[30]!==H||t[31]!==ee?(oe=H?(0,W.jsx)(w,{"data-testid":`remove-button`,onClick:ee,variant:`secondary`,children:`Remove`}):null,t[30]=H,t[31]=ee,t[32]=oe):oe=t[32];let se;t[33]!==K||t[34]!==ae||t[35]!==oe?(se=(0,W.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[K,ae,oe]}),t[33]=K,t[34]=ae,t[35]=oe,t[36]=se):se=t[36];let ce;t[37]!==se||t[38]!==G?(ce=(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[G,se]}),t[37]=se,t[38]=G,t[39]=ce):ce=t[39];let le;return t[40]!==c||t[41]!==ce?(le=(0,W.jsx)(`div`,{className:c,children:ce}),t[40]=c,t[41]=ce,t[42]=le):le=t[42],le},G=a().min(1,`Rating should be from 1 to 5`).max(5,`Rating should be from 1 to 5`),K=i({accountId:n().optional(),clientDetails:i({avatar:n(),email:r(),firstName:n().nonempty(),lastName:n().nonempty()}),comment:n().min(3,`The comment must be at least 3 characters.`).max(65e3,`The comment should not be more then 65000 characters.`),headline:n().min(3,`The headline must be at least 3 characters.`).max(255,`The headline should not be more than 255 characters.`),location:n(),stars:i({attentiveness:G,communication:G,overallValue:G,processingTime:G,quality:G})}),q=e=>{let t=(0,B.c)(51),{onClose:n,open:r}=e,{data:i}=h(),{showErrorMessage:a,showErrorMessageFromResponse:o}=s(),{me:c}=m(),u=!!c,{post:f,status:_}=p(),v;t[0]===c?v=t[1]:(v=(0,V.default)({avatar:``,email:``,firstName:``,lastName:``,primaryAddress:{city:``,state:``}},c||{}),t[0]=c,t[1]=v);let y=v,[x,S]=E(),{setTrue:C}=S,T=k(),D=y.primaryAddress?.city&&y.primaryAddress?.state?`${y.primaryAddress.city} ${y.primaryAddress.state}`:``,O=y.avatar||``,ee=y.email||``,N=y.firstName||``,P=y.lastName||``,I;t[2]!==O||t[3]!==ee||t[4]!==N||t[5]!==P?(I={avatar:O,email:ee,firstName:N,lastName:P},t[2]=O,t[3]=ee,t[4]=N,t[5]=P,t[6]=I):I=t[6];let L;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(L={attentiveness:0,communication:0,overallValue:0,processingTime:0,quality:0},t[7]=L):L=t[7];let R;t[8]!==D||t[9]!==I?(R={clientDetails:I,comment:``,headline:``,location:D,stars:L},t[8]=D,t[9]=I,t[10]=R):R=t[10];let z;t[11]!==f||t[12]!==i?.id||t[13]!==C||t[14]!==o?(z=e=>{let{value:t}=e,n=K.parse({...t,accountId:i?.id});f(`/api/reviews`,n).then(e=>{e.status===d.SUCCESS&&C(),e.status===d.ERROR&&o(e)})},t[11]=f,t[12]=i?.id,t[13]=C,t[14]=o,t[15]=z):z=t[15];let U;t[16]!==R||t[17]!==z?(U={defaultValues:R,onSubmit:z},t[16]=R,t[17]=z,t[18]=U):U=t[18];let G=l(U,K),q;t[19]===G?q=t[20]:(q=function(e){e.preventDefault(),G.handleSubmit()},t[19]=G,t[20]=q);let J=q,ue;t[21]===a?ue=t[22]:(ue=function(e){a(e)},t[21]=a,t[22]=ue);let Y=ue,X;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(X=[`overallValue`,`quality`,`attentiveness`,`processingTime`,`communication`],t[23]=X):X=t[23];let de=X,fe=`${i?.user.firstName||``} ${i?.user.lastName||``}`,Z;t[24]===fe?Z=t[25]:(Z=fe.trim(),t[24]=fe,t[25]=Z);let pe=Z,Q=x?F.SMALL:F.LARGE,me=x?`p-12`:``,he;t[26]===me?he=t[27]:(he=g(`rounded-t border-t-5`,me),t[26]=me,t[27]=he);let ge;t[28]===T?ge=t[29]:(ge={borderColor:T},t[28]=T,t[29]=ge);let _e;t[30]!==T||t[31]!==G.AppField||t[32]!==G.Field||t[33]!==G.Subscribe||t[34]!==J||t[35]!==Y||t[36]!==u||t[37]!==x||t[38]!==n||t[39]!==pe||t[40]!==_?
1(_e=x?(0,W.jsxs)(j,{className:`items-start p-6 md:p-12`,children:[(0,W.jsx)(`h1`,{className:`font-accent text-2xl`,children:`Review Submitted`}),(0,W.jsx)(`p`,{children:`Thank you for taking the time to review my work. I trust we will continue to work together in the future.`}),(0,W.jsx)(w,{"data-testid":`home-button`,onClick:n,children:`Home`})]}):(0,W.jsxs)(`form`,{onSubmit:J,children:[(0,W.jsxs)(j,{className:`border-regular border-b p-6 md:p-12`,children:[(0,W.jsx)(`h1`,{className:`font-accent text-2xl`,children:`Leave a Review`}),(0,W.jsxs)(`p`,{className:`max-w-4xl`,children:[`All local businesses depend on credible reviews from their clients, please take a moment to let others know about your experience with `,pe]})]}),(0,W.jsxs)(`section`,{className:`p-6 md:p-12`,children:[(0,W.jsx)(M,{children:`Rate each category`}),(0,W.jsxs)(`div`,{className:`mt-6 flex flex-col gap-6 md:flex-row`,children:[(0,W.jsx)(j,{className:`flex-1`,children:de.slice(0,3).map(e=>(0,W.jsx)(G.Field,{name:`stars.${e}`,children:t=>(0,W.jsxs)(j,{className:`gap-2`,children:[(0,W.jsx)(`h4`,{className:`font-medium`,children:H[e].title}),(0,W.jsx)(`p`,{children:H[e].desc}),(0,W.jsx)(b,{onValueChange:e=>t.handleChange(e.value),showAdditionText:!0,value:t.state.value||void 0})]})},e))}),(0,W.jsx)(j,{className:`flex-1`,children:de.slice(3,5).map(e=>(0,W.jsx)(G.Field,{name:`stars.${e}`,children:t=>(0,W.jsxs)(j,{className:`gap-2`,children:[(0,W.jsx)(`h4`,{className:`font-medium`,children:H[e].title}),(0,W.jsx)(`p`,{children:H[e].desc}),(0,W.jsx)(b,{onValueChange:e=>t.handleChange(e.value),showAdditionText:!0,value:t.state.value||void 0})]})},e))})]})]}),(0,W.jsxs)(j,{as:`section`,className:`px-6 pb-6 md:px-12 md:pb-12`,children:[(0,W.jsx)(M,{children:`Write your review`}),(0,W.jsx)(G.AppField,{name:`headline`,children:re}),(0,W.jsx)(G.AppField,{name:`comment`,children:ie})]}),u?null:(0,W.jsxs)(`section`,{className:`flex flex-col gap-6 px-6 pb-6 md:flex-row md:px-12 md:pb-12`,children:[(0,W.jsxs)(j,{className:`flex-1`,children:[(0,W.jsx)(M,{children:`Please briefly introduce yourself`}),(0,W.jsx)(G.AppField,{name:`clientDetails.firstName`,children:ae}),(0,W.jsx)(G.AppField,{name:`clientDetails.lastName`,children:oe}),(0,W.jsx)(G.AppField,{name:`location`,children:se}),(0,W.jsx)(G.AppField,{name:`clientDetails.email`,children:ce})]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(M,{children:`Avatar (optional)`}),(0,W.jsx)(G.Subscribe,{selector:le,children:e=>{let[t,n,r]=e,i=t===void 0?``:t,a=n===void 0?``:n,o=r===void 0?``:r;return(0,W.jsx)(G.Field,{name:`clientDetails.avatar`,children:e=>(0,W.jsx)(ne,{avatar:e.state.value,className:`mt-6`,onError:Y,onSetAvatarUrl:e.handleChange,userDetails:{email:i,firstName:a,lastName:o}})})}})]})]}),(0,W.jsxs)(A,{className:`px-6 pb-6 md:px-12 md:pb-12`,children:[(0,W.jsx)(w,{color:T,"data-testid":`submit-button`,loading:_===d.PENDING,type:`submit`,variant:`custom`,children:`Submit`}),(0,W.jsx)(w,{"data-testid":`cancel-button`,onClick:n,variant:`secondary`,children:`Cancel`})]})]}),t[30]=T,t[31]=G.AppField,t[32]=G.Field,t[33]=G.Subscribe,t[34]=J,t[35]=Y,t[36]=u,t[37]=x,t[38]=n,t[39]=pe,t[40]=_,t[41]=_e):_e=t[41];let $;t[42]!==he||t[43]!==ge||t[44]!==_e?($=(0,W.jsx)(`div`,{className:he,style:ge,children:_e}),t[42]=he,t[43]=ge,t[44]=_e,t[45]=$):$=t[45];let ve;return t[46]!==n||t[47]!==r||t[48]!==Q||t[49]!==$?(ve=(0,W.jsx)(te,{className:`p-0`,"data-testid":`leave-review-dialog`,onClose:n,open:r,size:Q,children:$}),t[46]=n,t[47]=r,t[48]=Q,t[49]=$,t[50]=ve):ve=t[50],ve};function re(e){return(0,W.jsx)(e.Input,{"data-testid":`headline-input`,placeholder:`Enter Headline`})}function ie(e){return(0,W.jsx)(e.Textarea,{"data-testid":`comment-input`,placeholder:`Describe your experience`})}function ae(e){return(0,W.jsx)(e.Input,{"data-testid":`first-name-input`,placeholder:`First Name`})}function oe(e){return(0,W.jsx)(e.Input,{"data-testid":`last-name-input`,placeholder:`Last Name`})}function se(e){return(0,W.jsx)(e.Input,{"data-testid":`location-input`,placeholder:`Location`})}function ce(e){return(0,W.jsx)(e.Input,{"data-testid":`email-input`,placeholder:`Email`,type:`email`})}function le(e){return[e.values.clientDetails.email,e.values.clientDetails.firstName,e.values.clientDetails.lastName]}var J={container:`_container_liecd_1`,label:`_label_liecd_11`,bar:`_bar_liecd_12`,figure:`_figure_liecd_13`,percentage:`_percentage_liecd_58`,minimalistTemplate:`_minimalistTemplate_liecd_66`},ue=e=>{let t=(0,B.c)(16),{label:n,total:r,value:i}=e,a=k(),o=O(),s=r?i/r*100:0,c=o===`minimalist`?J.minimalistTemplate:``,l;t[0]===c?l=t[1]:(l=g(J.container,c),t[0]=c,t[1]=l);let u;t[2]===n?u=t[3]:(u=(0,W.jsxs)(`span`,{className:J.label,children:[n,` Star`]}),t[2]=n,t[3]=u);let d=`${s}%`,f;t[4]!==a||t[5]!==d?(f=(0,W.jsx)(`div`,{className:J.bar,children:(0,W.jsx)(`div`,{className:J.percentage,style:{backgroundColor:a,width:d}})}),t[4]=a,t[5]=d,t[6]=f):f=t[6];let p;t[7]===s?p=t[8]:(p=s.toFixed(0),t[7]=s,t[8]=p);let m;t[9]===p?m=t[10]:(m=(0,W.jsxs)(`span`,{className:J.figure,children:[p,`%`]}),t[9]=p,t[10]=m);let h;return t[11]!==l||t[12]!==u||t[13]!==f||t[14]!==m?(h=(0,W.jsxs)(`div`,{className:l,children:[u,f,m]}
1),t[11]=l,t[12]=u,t[13]=f,t[14]=m,t[15]=h):h=t[15],h},Y={container:`_container_prs4z_1`,emptyState:`_emptyState_prs4z_5`,emptyStateContent:`_emptyStateContent_prs4z_12`,button:`_button_prs4z_24`,minimalistTemplate:`_minimalistTemplate_prs4z_56`,gridlines:`_gridlines_prs4z_82`,gridline:`_gridline_prs4z_82`,items:`_items_prs4z_114`},X=[5,4,3,2,1],de=e=>{let t=(0,B.c)(20),{activeTemplate:n,isEmpty:r,items:i,onLeaveReviewClick:a,photographerName:o}=e,s;t[0]===i?s=t[1]:(s=X.reduce((e,t)=>e+i[t],0),t[0]=i,t[1]=s);let c=s;if(r){let e=n===`minimalist`?Y.minimalistTemplate:``,r;t[2]===e?r=t[3]:(r=g(Y.emptyState,e),t[2]=e,t[3]=r);let i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,W.jsx)(`br`,{}),t[4]=i):i=t[4];let s;t[5]===a?s=t[6]:(s=(0,W.jsx)(`span`,{className:Y.button,onClick:a,role:`button`,tabIndex:0,children:`Click here`}),t[5]=a,t[6]=s);let c;t[7]===o?c=t[8]:(c=S(o),t[7]=o,t[8]=c);let l;t[9]===c?l=t[10]:(l=(0,W.jsx)(`span`,{dangerouslySetInnerHTML:{__html:c}}),t[9]=c,t[10]=l);let u;t[11]!==s||t[12]!==l?(u=(0,W.jsxs)(`div`,{className:Y.emptyStateContent,children:[`No reviews to show.`,i,s,` `,`to leave a review for`,` `,l]}),t[11]=s,t[12]=l,t[13]=u):u=t[13];let d;return t[14]!==r||t[15]!==u?(d=(0,W.jsx)(`div`,{className:r,children:u}),t[14]=r,t[15]=u,t[16]=d):d=t[16],d}let l;return t[17]!==i||t[18]!==c?(l=X.length?(0,W.jsxs)(`div`,{className:Y.container,children:[(0,W.jsx)(`div`,{className:Y.gridlines,children:X.map(fe)}),(0,W.jsx)(`div`,{className:Y.items,children:X.map(e=>(0,W.jsx)(ue,{label:String(e),total:c,value:i[e]},e))})]}):null,t[17]=i,t[18]=c,t[19]=l):l=t[19],l};function fe(e){return(0,W.jsx)(`div`,{className:Y.gridline},e)}var Z={container:`_container_m87hp_3`,smallSize:`_smallSize_m87hp_9`,chart:`_chart_m87hp_13`,select:`_select_m87hp_42`,tab:`_tab_m87hp_47`,isActive:`_isActive_m87hp_67`,tabs:`_tabs_m87hp_85`,minimalistTemplate:`_minimalistTemplate_m87hp_89`},pe=e=>{let{className:t,isEmpty:n,isSmall:r,onChange:i,onLeaveReviewClick:a,photographerName:o}=e,s=k(),c=O(),[l,u]=(0,U.useState)(Object.keys(H)[0]);function d(e,t){u(t),i(t)}let f=e.charts||{},p=Object.keys(f);return(0,W.jsxs)(`div`,{className:g(Z.container,r&&Z.smallSize,t,c===`minimalist`?Z.minimalistTemplate:``),children:[(0,W.jsx)(v,{className:Z.select,"data-testid":`bar-chart-group-select`,items:p.map(e=>({label:H[e].title,value:e})),markerColor:s,name:l||``,onChange:d,value:l||``}),(0,W.jsx)(`div`,{className:Z.tabs,children:p.map(e=>{let{title:t}=H[e];return(0,W.jsx)(`div`,{className:g(Z.tab,e===l?Z.isActive:``),onClick:d.bind(void 0,``,e),role:`button`,tabIndex:0,children:t},t)})}),(0,W.jsx)(`div`,{className:Z.chart,children:f[l]?(0,W.jsx)(de,{activeTemplate:c,isEmpty:!!n,items:f[l],onLeaveReviewClick:a,photographerName:o}):null})]})},Q={comment:`_comment_1qefx_1`,user:`_user_1qefx_18`,avatar:`_avatar_1qefx_22`,name:`_name_1qefx_36`,location:`_location_1qefx_37`,minimalist:`_minimalist_1qefx_51`,body:`_body_1qefx_58`,lead:`_lead_1qefx_65`,title:`_title_1qefx_73`,date:`_date_1qefx_74`,reply:`_reply_1qefx_95`,replyIcon:`_replyIcon_1qefx_106`},me=e=>{let t=(0,B.c)(20),{reply:n}=e,{formatTz:r}=I(),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,W.jsx)(x,{className:Q.replyIcon}),t[0]=i):i=t[0];let a=`Response from: ${n.clientDetails.firstName} ${n.clientDetails.lastName}`,o;t[1]===a?o=t[2]:(o=S(a),t[1]=a,t[2]=o);let s;t[3]===o?s=t[4]:(s=(0,W.jsx)(`span`,{className:Q.title,dangerouslySetInnerHTML:{__html:o}}),t[3]=o,t[4]=s);let c;t[5]!==r||t[6]!==n.repliedAt?(c=r({date:n.repliedAt,format:`MMMM d, yyyy`}),t[5]=r,t[6]=n.repliedAt,t[7]=c):c=t[7];let l;t[8]===c?l=t[9]:(l=(0,W.jsx)(`span`,{className:Q.date,children:c}),t[8]=c,t[9]=l);let u;t[10]!==s||t[11]!==l?(u=(0,W.jsxs)(`div`,{className:Q.lead,children:[s,l]}),t[10]=s,t[11]=l,t[12]=u):u=t[12];let d;t[13]===n.reply?d=t[14]:(d=S(n.reply),t[13]=n.reply,t[14]=d);let f;t[15]===d?f=t[16]:(f=(0,W.jsx)(`div`,{className:Q.body,dangerouslySetInnerHTML:{__html:d}}),t[15]=d,t[16]=f);let p;return t[17]!==u||t[18]!==f?(p=(0,W.jsxs)(`div`,{className:Q.reply,children:[i,u,f]}),t[17]=u,t[18]=f,t[19]=p):p=t[19],p},he=e=>{let t=(0,B.c)(18),{location:n,user:r}=e,{firstName:i,lastName:a}=r,o=O()===`minimalist`?Q.minimalist:``,s;t[0]===o?s=t[1]:(s=g(Q.user,o),t[0]=o,t[1]=s);let c=`${r.firstName} ${r.lastName}`,l;t[2]!==c||t[3]!==r.avatar?(l=(0,W.jsx)(P,{className:Q.avatar,"data-testid":`avatar`,initials:c,size:N.MEDIUM,src:r.avatar}),t[2]=c,t[3]=r.avatar,t[4]=l):l=t[4];let u;t[5]===a?u=t[6]:(u=a.slice(0,1),t[5]=a,t[6]=u);let d=`${i} ${u}.`,f;t[7]===d?f=t[8]:(f=S(d),t[7]=d,t[8]=f);let p;t[9]===f?p=t[10]:(p=(0,W.jsx)(`span`,{className:Q.name,dangerouslySetInnerHTML:{__html:f}}),t[9]=f,t[10]=p);let m;t[11]===n?m=t[12]:(m=(0,W.jsx)(`span`,{className:Q.location,children:n}),t[11]=n,t[12]=m);let h;return t[13]!==s||t[14]!==l||t[15]!==p||t[16]!==m?(h=(0,W.jsxs)(`div`,{className:s,children:[l,p,m]}
1),t[13]=s,t[14]=l,t[15]=p,t[16]=m,t[17]=h):h=t[17],h},ge=e=>{let t=(0,B.c)(39),{average:n,clientDetails:r,comment:i,createdAt:a,headline:o,location:s,repliedAt:c,reply:l,user:u}=e,{formatTz:d}=I(),f;t[0]!==u.firstName||t[1]!==u.lastName?(f={firstName:u.firstName,lastName:u.lastName},t[0]=u.firstName,t[1]=u.lastName,t[2]=f):f=t[2];let p;t[3]!==c||t[4]!==l||t[5]!==f?(p={clientDetails:f,repliedAt:c,reply:l},t[3]=c,t[4]=l,t[5]=f,t[6]=p):p=t[6];let m=p,h;t[7]!==r||t[8]!==s?(h=(0,W.jsx)(he,{location:s,user:r}),t[7]=r,t[8]=s,t[9]=h):h=t[9];let g=parseFloat(n),_;t[10]===g?_=t[11]:(_=(0,W.jsx)(b,{allowHalf:!0,value:g}),t[10]=g,t[11]=_);let v;t[12]===o?v=t[13]:(v=S(o),t[12]=o,t[13]=v);let y;t[14]===v?y=t[15]:(y=(0,W.jsx)(`span`,{className:Q.title,dangerouslySetInnerHTML:{__html:v}}),t[14]=v,t[15]=y);let x;t[16]!==a||t[17]!==d?(x=d({date:a,format:`MMMM d, yyyy`}),t[16]=a,t[17]=d,t[18]=x):x=t[18];let C;t[19]===x?C=t[20]:(C=(0,W.jsx)(`span`,{className:Q.date,children:x}),t[19]=x,t[20]=C);let w;t[21]!==y||t[22]!==C?(w=(0,W.jsxs)(`div`,{className:Q.lead,children:[y,C]}),t[21]=y,t[22]=C,t[23]=w):w=t[23];let T;t[24]===i?T=t[25]:(T=S(i),t[24]=i,t[25]=T);let E;t[26]===T?E=t[27]:(E=(0,W.jsx)(`div`,{className:Q.body,dangerouslySetInnerHTML:{__html:T}}),t[26]=T,t[27]=E);let D;t[28]!==l||t[29]!==m?(D=l?(0,W.jsx)(me,{reply:m}):null,t[28]=l,t[29]=m,t[30]=D):D=t[30];let O;t[31]!==E||t[32]!==D||t[33]!==_||t[34]!==w?(O=(0,W.jsxs)(`div`,{className:Q.content,children:[_,w,E,D]}),t[31]=E,t[32]=D,t[33]=_,t[34]=w,t[35]=O):O=t[35];let k;return t[36]!==O||t[37]!==h?(k=(0,W.jsxs)(`div`,{className:Q.comment,children:[h,O]}),t[36]=O,t[37]=h,t[38]=k):k=t[38],k},_e=e=>{let t=(0,B.c)(10),{className:n,comments:r,user:i}=e,a;t[0]===n?a=t[1]:(a=g(Q.comments,n),t[0]=n,t[1]=a);let o;if(t[2]!==r||t[3]!==i){let e;t[5]===i?e=t[6]:(e=e=>(0,U.createElement)(ge,{...e,key:e.id,user:i}),t[5]=i,t[6]=e),o=r.map(e),t[2]=r,t[3]=i,t[4]=o}else o=t[4];let s;return t[7]!==a||t[8]!==o?(s=(0,W.jsx)(`div`,{className:a,children:o}),t[7]=a,t[8]=o,t[9]=s):s=t[9],s},$={content:`_content_d5ij6_1`,minimalistTemplate:`_minimalistTemplate_d5ij6_1`,description:`_description_d5ij6_5`,semibold:`_semibold_d5ij6_9`,nordicAirTemplate:`_nordicAirTemplate_d5ij6_12`,comments:`_comments_d5ij6_23`,commentsButtons:`_commentsButtons_d5ij6_26`,chart:`_chart_d5ij6_33`,smallChart:`_smallChart_d5ij6_34`,noComments:`_noComments_d5ij6_38`,expandButton:`_expandButton_d5ij6_45`,hideButton:`_hideButton_d5ij6_46`,hiddenButton:`_hiddenButton_d5ij6_65`,loadButton:`_loadButton_d5ij6_68`,ratingWidget:`_ratingWidget_d5ij6_74`,verticalSplitTemplate:`_verticalSplitTemplate_d5ij6_78`,wrapper:`_wrapper_d5ij6_86`},ve=e=>{let t=(0,B.c)(63),{children:n,className:r,isCommentsShown:i,onCommentsHide:a,onCommentsShow:o,onLeaveReviewClick:s,photographer:c,publicAccount:l}=e,u=r===void 0?``:r,d=c===void 0?null:c,f=O(),p=k(),[m,h]=(0,U.useState)(`overallValue`),[_,v]=(0,U.useState)(10),y;t[0]!==_||t[1]!==l?(y=e=>{if(e.preventDefault(),l){let{reviews:e}=l;e[_]&&v(_+10)}},t[0]=_,t[1]=l,t[2]=y):y=t[2];let x=y;if(l){let{homepageName:e,user:r}=l,{firstName:c,lastName:v}=r,y;t[3]===l.reviewSummary?y=t[4]:(y=l.reviewSummary||{average:`0`,breakdown:{attentiveness:{1:0,2:0,3:0,4:0,5:0},communication:{1:0,2:0,3:0,4:0,5:0},overallValue:{1:0,2:0,3:0,4:0,5:0},processingTime:{1:0,2:0,3:0,4:0,5:0},quality:{1:0,2:0,3:0,4:0,5:0}},reviewCount:0},t[3]=l.reviewSummary,t[4]=y);let C=y,w=e||`${c} ${v}`,T=w;C.reviewCount>0&&(T+=` has ${C.reviewCount} reviews`);let E;if(t[5]!==f||t[6]!==m||t[7]!==n||t[8]!==u||t[9]!==_||t[10]!==p||t[11]!==x||t[12]!==T||t[13]!==i||t[14]!==a||t[15]!==o||t[16]!==s||t[17]!==d||t[18]!==w||t[19]!==l.reviews||t[20]!==l.user||t[21]!==C.average||t[22]!==C.breakdown||t[23]!==C.reviewCount){let e=[...l.reviews].sort(ye),r=i?$.expanded:``,c=e.length===0?$.noComments:``,v=f===`minimalist`?$.minimalistTemplate:``,y=f===`vertical-split`?$.verticalSplitTemplate:``,D=f===`nordic-air`?$.nordicAirTemplate:``,O;t[25]!==u||t[26]!==D||t[27]!==r||t[28]!==c||t[29]!==v||t[30]!==y?(O=g($.content,r,c,v,y,D,u),t[25]=u,t[26]=D,t[27]=r,t[28]=c,t[29]=v,t[30]=y,t[31]=O):O=t[31];let k=parseFloat(C.average||`5`)||5,A;t[32]===k?A=t[33]:(A=(0,W.jsx)(b,{allowHalf:!0,className:`pt-0.5`,defaultValue:k,disabled:!0}),t[32]=k,t[33]=A);let M=parseFloat(C.average||`5`)===1?``:`s`,N;t[34]!==C.average||t[35]!==M?(N=(0,W.jsxs)(ee,{children:[`(`,C.average,` out of 5 star`,M,`)`]}),t[34]=C.average,t[35]=M,t[36]=N):N=t[36];let P;t[37]!==A||t[38]!==N?(P=(0,W.jsxs)(j,{className:`gap-0`,children:[A,N]}),t[37]=A,t[38]=N,t[39]=P):P=t[39];let F;t[40]!==n||t[41]!==P?(F=(0,W.jsxs)(`section`,{className:`flex items-center justify-between gap-6`,children:[P,n]}),t[40]=n,t[41]=P,t[42]=F):F=t[42];let te;t[43]!==T||t[44]!==d?(te=d&&(0,W.jsx)(`h1`,{dangerouslySetInnerHTML:{__html:S(T)}}),t[43]=T,t[44]=d,t[45]=te):te=t[45];let I=H[m]?.title,L;t[46]===I?L=t[47]:(L=(0,W.jsx)(`span`,{className:$.semibold,children:I}),t[46]=I,t[47]=L);let R=H[m]?.desc,z;t[48]!==L||t[49]!==R?(z=(0,W.jsxs)(`p`,{className:$.description,children:[L,` -`,` `,R]}),t[48]=L,t[49]=R,t[50]=z):z=t[50];let B=C.reviewCount===0,V;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>h(e),t[51]=V):V=t[51];let U;t[52]!==s||t[53]!==w||t[54]!==C.breakdown||t[55]!==B?(U=(0,W.jsx)(pe,{charts:C.breakdown,className:$.chart,isEmpty:B,onChange:V,onLeaveReviewClick:s,photographerName:w}),t[52]=s,t[53]=w,t[54]=C.breakdown,t[55]=B,t[56]=U):U=t[56];let ne=C.reviewCount===0,G;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(G=e=>h(e),t[57]=G):G=t[57];let K;
1t[58]!==s||t[59]!==w||t[60]!==C.breakdown||t[61]!==ne?(K=(0,W.jsx)(`div`,{children:(0,W.jsx)(pe,{charts:C.breakdown,className:$.smallChart,isEmpty:ne,isSmall:!0,onChange:G,onLeaveReviewClick:s,photographerName:w})}),t[58]=s,t[59]=w,t[60]=C.breakdown,t[61]=ne,t[62]=K):K=t[62],E=(0,W.jsxs)(`section`,{className:O,children:[F,te,z,U,K,e.length>0&&(0,W.jsxs)(`button`,{className:g($.expandButton,i?$.hiddenButton:``),onClick:o,children:[`Expand Comments`,(0,W.jsx)(`i`,{style:{borderColor:p}})]}),e.length>0&&i?(0,W.jsxs)(`div`,{className:$.comments,children:[(0,W.jsx)(_e,{comments:e.slice(0,_),user:l.user}),(0,W.jsxs)(`div`,{className:$.commentsButtons,children:[(0,W.jsxs)(`button`,{className:$.hideButton,onClick:a,children:[`Hide Comments`,(0,W.jsx)(`i`,{style:{borderColor:p}})]}),e[_]?(0,W.jsx)(`button`,{className:$.loadButton,onClick:x,children:`Load More`}):null]})]}):null]}),t[5]=f,t[6]=m,t[7]=n,t[8]=u,t[9]=_,t[10]=p,t[11]=x,t[12]=T,t[13]=i,t[14]=a,t[15]=o,t[16]=s,t[17]=d,t[18]=w,t[19]=l.reviews,t[20]=l.user,t[21]=C.average,t[22]=C.breakdown,t[23]=C.reviewCount,t[24]=E}else E=t[24];return E}return null};function ye(e,t){return new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}export{q as n,ve as t};
2//# sourceMappingURL=Reviews-C7iSiFih.js.map

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.