1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7613],{277:(e,t,i)=>{"use strict";i.d(t,{HeaderLinksProvider:()=>p,c:()=>g});var r=i(95155),n=i(12115),s=i(39318),a=i(40341),l=i(58056),o=i(73630),c=i(87899),d=i(85016),u=i(72202),h=i(90461);let x=(0,n.createContext)({hasHighlightedJoinButton:!0,hasPremiumLink:!1,mainLinks:[],dropdownLinks:[],mobileMenuLinks:[[]]}),{Provider:m}=x,p=({hasExploreLink:e=!1,hasHighlightedJoinButton:t=!0,children:i})=>{let{mainLinks:x,dropdownLinks:p,mobileMenuLinks:g,hasPremiumLink:b}=(({hasExploreLink:e=!1})=>{let t=(0,s.usePathname)()||"/",i=(0,a.c)("header.links"),r=(0,a.c)("header.pills"),{unreadCount:x}=(0,o.U)(),{user:m,userMode:{pageMode:p}}=(0,d.useHeaderContext)(),g=(0,l.Ym)(),[b,j]=(0,n.useState)([]),[f,_]=(0,n.useState)([]),[v,w]=(0,n.useState)([[]]),y=m?.businesses?.data?.[0],C=y?.proProfiles?.data?.[0],k=(0,h.Oh)(C),A=(e,r)=>{let{labelKey:n,notificationNumber:s,subPages:a,dataTest:l}=r;return{index:e.index,href:e.getUrl(),dataTest:l,obfuscated:r.obfuscated,label:i(n),notificationNumber:Number(s)||null,pill:r.pill,isActive:!!e.defaultUrl&&t===e.defaultUrl||!!t&&e.getUrl()===t||e.index===c.Cp.index&&t===c.YY.getPathName()||e.index===c.Uv.index&&t===c.wB.getPathName()||!!a?.length&&a.some(e=>e.getPathName()===t)}},S=()=>{if(p===u.b.GUEST)return[...e?[A(c.Hd,{labelKey:"explorer"})]:[],A(c.dO,{labelKey:"pro_signup",dataTest:"sign_up_button",obfuscated:!0}),A(c.io,{labelKey:"signup",obfuscated:!0}),A(c.VV,{labelKey:"login",dataTest:"login_button",obfuscated:!0})];if(p===u.b.CUSTOMER||p===u.b.PRO_AS_CUSTOMER)return[A(c.r0,{labelKey:"user_dashboard"}),A(c.Cp,{labelKey:"user_messenger",notificationNumber:x})];let{appointments:t=0,bookings:i=0}=C?.meta?.notificationsNb||{};return p===u.b.PRO&&C?[A(c.Uv,{labelKey:"pro_messenger",notificationNumber:x}),A(c.MD,{labelKey:"pro_leads",notificationNumber:C.meta?.notificationsNb?.leads}),A(c.vW,{labelKey:"calendar",notificationNumber:i+t}),A(c.Fq,{labelKey:"pro_services",subPages:[c.Zh,c.b2]}),A(c.Fw,{labelKey:"pro_dashboard"})]:[]};return(0,n.useEffect)(()=>{j(S()),_((()=>{if(p===u.b.GUEST)return[...S()];if(p===u.b.CUSTOMER||p===u.b.PRO_AS_CUSTOMER)return[A(c.AF,{labelKey:"pro_setting"})];if(p===u.b.PRO)return[A(c.KR,{labelKey:"payment_history"}),A(c.YK,{labelKey:"pro_setting"}),{index:"helpCenterLink",href:`https://starofservice.zendesk.com/hc/${["fr","it","es","de","pt","pt-BR"].includes(g)?g.toLowerCase():"en-us"}`,label:i("help_center"),isExternal:!0},...k?[A(c.gO,{labelKey:"pro_premium"})]:[]];return[]})()),w(p===u.b.GUEST?[[...S()]]:(p===u.b.CUSTOMER||p===u.b.PRO_AS_CUSTOMER)&&m?[[...S(),A(c.AF,{labelKey:"pro_setting"})],[A(c.qm,{labelKey:"hire_pro"})]]:p===u.b.PRO?[[...S()]]:[[]])},[m,p,x]),{dropdownLinks:f,mainLinks:b,mobileMenuLinks:v,hasPremiumLink:k}})({hasExploreLink:e});return(0,r.jsx)(m,{value:{mainLinks:x,dropdownLinks:p,mobileMenuLinks:g,hasHighlightedJoinButton:t,hasPremiumLink:b},children:i})},g=()=>(0,n.useContext)(x)},2497:(e,t,i)=>{"use strict";i.d(t,{J9:()=>l,JI:()=>o,Y4:()=>c,rC:()=>d});var r=i(87899),n=i(15981),s=i(72795),a=i(72202);let l=e=>n.Ks.some(t=>t.getPathName()===e),o=e=>[a.b.PRO,a.b.PRO_AS_CUSTOMER].includes(e)?"pro":[a.b.CUSTOMER].includes(e)?"customer":"guest",c=(e,t)=>{if([a.b.CUSTOMER,a.b.PRO_AS_CUSTOMER].includes(t)){if(e===r.qm.index)return s.dWK;if(e===r.r0.index)return s.bFS;if(e===r.Cp.index)return s.L49;if(e===r.AF.index)return s.O1l;if(e===r.yG.index)return s.JOH;if("switchToPro"===e)return s.pIm}if([a.b.PRO].includes(t)&&"switchToCustomer"===e)return s.mNH},d=e=>[r.Uv.getPathName(),r.wB.getPathName(),r.Cp.getPathName(),r.YY.getPathName()].includes(e)},2892:(e,t,i)=>{"use strict";i.d(t,{A:()=>y});var r=i(95155),n=i(12115),s=i(9457),a=i(45508),l=i(44763),o=i(72795),c=i(2961),d=i.n(c),u=i(38248),h=i(24071),x=i(40341),m=i(94425),p=i(39318);let g=({heroTitle:e,heroSubtitle:t,link:i,ctaText:n,isFullScreen:l,commonTrackingParams:c,onClick:u})=>{let x=(0,s.tl)(),m=(0,a.useResponsiveValue)({mobile:!0,tablet:!1})||!1;return(0,r.jsx)("div",{className:d()("h-full flex flex-col justify-center items-center"),children:(0,r.jsxs)(h.Stack,{spacing:["$75","$0"],children:[(0,r.jsx)(h.Text,{align:"center",size:"xsmall",weight:"semibold",color:"inherit",transform:"uppercase",children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_campaign-subtitle",children:e})}),(0,r.jsx)(h.Heading,{align:"center",color:"inherit",level:l?"1":m?"5":"3",children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_campaign-title",children:t})}),(i||u)&&l&&!m&&(0,r.jsx)(h.Inset,{top:"$300",children:(0,r.jsx)(h.Button,{variant:"primary",onClick:()=>
1{i&&(window.location.href=i),x(o.auo,c),u&&u()},size:"medium",fullWidth:!0,data:{cy:"CI_marketingAnnouncement_ctaClick"},children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_cta-text",children:n})})})]})})},b=({isVertical:e,variant:t,ctaText:i,plainHeader:l,heroTitle:c,heroSubtitle:u,detailsTitle:b,detailsText:j,link:f,onLinkClick:_,onClick:v,onCloseClick:w,commonTrackingParams:y,disableCollapse:C,color:k})=>{let A=(0,p.usePathname)(),[S,T]=(0,n.useState)(C),N=(0,a.useResponsiveValue)({mobile:!0,tablet:!1})||!1,P=(0,x.c)(),z=(0,s.tl)();return(0,r.jsxs)(r.Fragment,{children:[w&&(0,r.jsx)(h.Stack,{alignment:"end",children:(0,r.jsx)(h.Bleed,{horizontal:["$300","$200"],top:"$100",bottom:"$100",children:(0,r.jsx)(h.TextLinkButton,{noUnderline:!0,onClick:w,children:(0,r.jsx)("span",{className:"opacity-[0.8]",children:(0,r.jsx)(m.Close,{size:"xsmall",color:"gray5"})})})})}),(0,r.jsx)("div",{className:"lg:max-w-[960px] lg:mx-auto",children:(0,r.jsx)(h.Inset,{left:"$0",children:(0,r.jsxs)(h.Columns,{spacing:e?"$200":"$400",alignH:"center",alignV:"center",collapseBelow:"sm"!==t?"tablet":"wide",children:[(0,r.jsx)(h.Column,{width:"fluid",children:(0,r.jsx)(h.TextLink,{noUnderline:!0,color:"inherit",href:f||"",onClick:_,children:(0,r.jsx)("div",{className:d()("align-center items-center justify-center",{"mx-auto":"lg"===t,"max-w-[640px]":l,"max-w-[940px]":!l}),children:(0,r.jsxs)(h.Stack,{alignment:"center",justification:"center",spacing:l?"$100":"$300",orientation:l||"sm"===t||N?"vertical":"horizontal",children:[c&&u&&(0,r.jsx)(g,{heroTitle:c,heroSubtitle:u,link:f,onClick:v,ctaText:i,isFullScreen:"fullScreen"===t,commonTrackingParams:y}),e&&(j||b)&&(0,r.jsx)(()=>(0,r.jsxs)("div",{className:d()("overflow-hidden transition-all duration-500 h-auto flex flex-col z-10 CI_marketingAnnouncement"),children:[S&&(0,r.jsx)(h.Inset,{bottom:"$100",children:(0,r.jsxs)(h.Stack,{spacing:"$400",children:[(0,r.jsxs)(h.Stack,{spacing:"$75",children:[(0,r.jsx)(h.Text,{align:"center",size:"regular",weight:"semibold",color:"inherit",children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_title",children:b})}),j&&(0,r.jsx)(h.Text,{align:e?"center":"start",size:"small",weight:"semibold",color:"inherit",children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_description",children:j})})]}),(f&&f!==A||v)&&i&&(0,r.jsx)(h.Column,{width:"content",children:(0,r.jsx)("div",{className:d()(N&&"w-full"),children:(0,r.jsx)(h.ButtonLink,{href:f||"",variant:"white"===k||"fullScreen"===t?"primary":"onColor",onClick:()=>{z(o.auo,y),v&&v()},size:"small",fullWidth:!0,data:{cy:"CI_marketingAnnouncement_ctaClick"},children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_cta-text",children:i})})})})]})}),!S&&(j||b)&&(0,r.jsxs)(h.Stack,{spacing:"$75",children:[!u&&"fullScreen"===t&&(0,r.jsx)(h.Text,{align:"center",size:"regular",weight:"semibold",color:"inherit",children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_title",className:"text-center",children:b})}),(0,r.jsx)(h.TextLinkButton,{onClick:()=>{T(!S),z(o.oO4,y)},data:{cy:"CI_marketingAnnouncement_learnMore"},children:(0,r.jsx)(h.Cluster,{alignH:"center",children:(0,r.jsxs)(h.Text,{color:"white"===k?"dark":"white",weight:"semibold",size:"small",children:[P("common.ui_actions.view_more")," ",(0,r.jsx)(m.ChevronDown,{isInline:!0})]})})})]})]}),{}),!e&&(j||b)&&u&&(0,r.jsx)(h.Divider,{}),!e&&(j||b)?(0,r.jsx)("div",{className:"flex w-full justify-center flex-col",children:(0,r.jsxs)(h.Stack,{alignment:"sm"===t||N||!u&&"lg"===t?"center":"start",spacing:"fullScreen"===t?"$100":"$0",children:[b&&(0,r.jsx)(h.Text,{align:b?"start":"center",weight:"semibold",size:"fullScreen"===t?"xlarge":"regular",color:"inherit",children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_title",children:b})}),j&&(0,r.jsx)(h.Text,{align:"start",size:"fullScreen"===t?"regular":"small",weight:"semibold",color:"inherit",children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_description",children:j})})]})}):null]})})})}),f&&f!==A&&i&&!e&&"fullScreen"!==t&&(0,r.jsx)(h.Column,{width:"content",children:(0,r.jsx)("div",{className:"w-full md:w-auto",children:(0,r.jsx)(h.ButtonLink,{variant:"white"===k?"primary":"onColor",href:f||"",onClick:()=>{z(o.auo,y),v&&v()},size:"medium",fullWidth:!0,data:{cy:"CI_marketingAnnouncement_ctaClick"},children:(0,r.jsx)("span",{id:"marketing-banner_subscription-required_cta-text",children:i})})})})]})})})]})},j=({color:e})=>(0,r.jsxs)("svg",{width:"100%",height:"160",viewBox:"0 0 800 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",children:[(0,r.jsx)("path",{opacity:"0.5",d:"M599.345 1.98742C674.225 5.91223 745.38 15.6409 800 29.5507V188.115H0V86.2968C35.9
1108 73.1335 75.4885 60.9463 116.664 50.3597C268.531 11.3143 442.349 -6.24146 599.345 1.98742Z",fill:e}),(0,r.jsx)("path",{d:"M800 52.4895C724.832 48.3717 646.537 48.7506 568.662 53.8376C394.561 65.2102 222.12 100.345 174.312 147.144C161.181 159.998 157.414 173.734 160.624 188H800V52.4895Z",fill:e})]}),f=({color:e})=>(0,r.jsxs)("svg",{width:"489",height:"247",viewBox:"0 0 489 247",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M218.835 0C225.932 9.10889 232.895 18.6481 239.727 28.3666C277.123 81.5798 310.607 140.066 289.631 186.865C279.101 210.361 254.787 230.916 223.519 247H0V0H218.835Z",fill:e}),(0,r.jsx)("path",{opacity:"0.5",d:"M174.23 0C166.487 5.09851 158.561 10.1884 150.437 15.1437C135.951 23.965 120.85 32.3556 106.046 40.5809C58.1098 67.2152 13.2929 92.1162 2.58737 124.293C-10.4751 163.552 27.4497 213.419 81.9399 247H429.87C454.166 232.309 472.774 214.627 481.631 194.865C502.607 148.066 469.123 89.5798 431.727 36.3666C422.865 23.76 413.782 11.4551 404.474 0H174.23Z",fill:e})]}),_=({color:e})=>(0,r.jsxs)("svg",{width:"467",height:"272",viewBox:"0 0 467 272",f
1ill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",d:"M219.265 31.4276C204.752 41.2186 189.602 51.4395 173.692 61.1442C159.206 69.9655 144.104 78.3561 129.3 86.5814C81.3643 113.216 36.5474 138.117 25.8419 170.293C23.6695 176.823 20.8746 183.956 17.9288 191.474C8.02107 216.761 -3.58977 246.396 1.05525 272H467V99.927C463.084 94.0258 459.056 88.1652 454.981 82.3672C432.024 49.7111 407.59 19.0785 381.572 0H268.389C252.773 8.82202 236.467 19.8229 219.265 31.4276Z",fill:e}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M335.487 0C327.743 5.09851 319.817 10.1884 311.694 15.1437C297.207 23.965 282.106 32.3556 267.302 40.5809C219.366 67.2152 174.549 92.1162 163.844 124.293C149.832 166.406 194.49 220.727 255.332 254.056C267.916 260.95 281.205 266.938 295.045 272H467V0H335.487Z",fill:e})]}),v=({isHorizontal:e,variant:t,color:i})=>{let n=(0,a.useResponsiveValue)({mobile:!1,tablet:!1,desktop:!0})||!1;return(0,r.jsx)(r.Fragment,{children:e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:d()("absolute h-full flex items-center","lg"===t&&n?"left-0":"right-[70%]"),children:(0,r.jsx)(f,{color:i})}),(0,r.jsx)("div",{className:d()("absolute h-full flex items-center","lg"===t&&n?"right-0":"left-[60%]"),children:(0,r.jsx)(_,{color:i})})]}):(0,r.jsx)("div",{className:"absolute left-0 w-full h-full flex items-end",children:(0,r.jsx)(j,{color:i})})})},w={white:{bg:"bg-white-0",bubble:l.MF.blue2,text:"text-gray-10"},indigo:{bg:"bg-indigo-8",bubble:l.MF.indigo9,text:"text-white-0"},black:{bg:"bg-gray-10",bubble:l.MF.gray9,text:"text-white-0"},teal:{bg:"bg-teal-7",bubble:l.MF.teal9,text:"text-white-0"},cyan:{bg:"bg-cyan-6",bubble:l.MF.cyan8,text:"text-white-0"},red:{bg:"bg-red-7",bubble:l.MF.red6,text:"text-white-0"},yellow:{bg:"bg-[#e4f95f]",bubble:l.MF.yellow3,text:"text-gray-10"},blue:{bg:"bg-blue-8",bubble:l.MF.blue7,text:"text-white-0"},pink:{bg:"bg-pink-7",bubble:l.MF.pink8,text:"text-white-0"},orange:{bubble:"#ffad16",bg:"bg-[#ffd416]",text:"text-gray-10"}},y=({campaignId:e="",color:t="white",buttonColor:i="white",plainHeader:l=!1,fullWidth:c=!1,variant:x="md",heroTitle:m,heroSubtitle:p,detailsTitle:g,detailsText:j,ctaText:f,link:_,disableCollapse:y=!1,isDisplayed:C=!0,onClose:k,onLinkClick:A,maxCloseStatePersist:S=0})=>{let T=`marketing-banner-closed-${e}`,[N,P]=(0,n.useState)((0,u.zM)(T)||!1),z=(0,a.useResponsiveValue)({mobile:!0,tablet:!1})||"sm"===x,M=(0,s.tl)(),E={campaign:e};(0,n.useEffect)(()=>{M(o.WXe,E)},[]);let $=w[t]||w.indigo,I=()=>{P(!0),S&&(0,u.w6)(T,!0,1e3*S),k&&k()};return(0,r.jsx)(r.Fragment,{children:"fullScreen"!==x?(0,r.jsxs)("div",{className:d()("relative px-12 md:px-24 overflow-hidden transition-all duration-500",$.bg,$.text,"white"===t?"border-solid border-1 border-blue-1":"",!c&&"rounded-8",{"h-0 py-0":N,"h-auto py-8 md:py-16":!N}),children:[(0,r.jsx)(v,{isHorizontal:!z,color:$.bubble,variant:x}),(0,r.jsx)(b,{isVertical:z,variant:x,ctaText:f,onClick:A,plainHeader:l,heroTitle:m,heroSubtitle:p,detailsTitle:g,detailsText:j,link:_,commonTrackingParams:E,disableCollapse:y,color:"indigo"===i?"indigo":"white",onCloseClick:y?void 0:I,onLinkClick:()=>{M(o.auo,E),A&&A()}})]}):(0,r.jsx)(h.ModalDialog,{title:"",onClose:I,open:C,size:"fullscreen",children:(0,r.jsx)("div",{className:"flex items-center w-full h-[calc(100vh-60px)] justify-center p-16",children:(0,r.jsx)(b,{isVertical:z,variant:x,ctaText:f,onClick:A,plainHeader:l,heroTitle:m,heroSubtitle:p,detailsTitle:g,detailsText:j,link:_,commonTrackingParams:E,disableCollapse:y,color:"indigo"===t?"indigo":"white",onLinkClick:()=>{M(o.auo,E),A&&A()}})})})})}},9408:(e,t,i)=>{"use strict";i.d(t,{$P:()=>p,Gq:()=>d,KU:()=>a,Lu:()=>u,RT:()=>b,Sl:()=>l,Ww:()=>m,ci:()=>c,eo:()=>x,le:()=>h,p1:()=>g,rR:()=>o});var r=i(36428);i(87899);var n=i(53542),s=i(80297);let a=(e,t)=>{let{id:i="",conversation:r}=e,{deliveredMessages:n={},readMessages:s={},failedMessages:a={}}=t;if(!i)return"sent";let l=i.startsWith("conversation:"),o=void 0!==a[i],c=(e.deliveredTo?.length??0)>0||n[i]===r.id,d=(e.readBy?.length??0)>0||s[i]===r.id;return o?"error":l?"created":d?"read":c?"delivered":"sent"},l=(e,t)=>
1{let i,{id:r,lastMessage:n}=e,{failedMessages:s={},quote:l}=t,o=!!Object.keys(s).find(e=>s[e].conversation.id===r);return n?i=o?"error":a(n,t):l?.description&&(i=l.seenAt?"read":"delivered"),i},o=e=>(0,n.isTextMessage)(e)||(0,n.isAttachmentMessage)(e)||(0,n.isEventMessage)(e),c=e=>(0,n.isTextMessage)(e)||(0,n.isAttachmentMessage)(e),d=e=>(0,n.isEventMessage)(e),u=e=>{let t=!!e.caption&&/(\.jpg|\.jpeg|\.bmp|\.gif|\.png)$/i.exec(e.caption);return e.thumbnailUrl&&t},h=e=>{let t={bookingId:"",orderId:"",role:""};try{let i=JSON.parse(e);t.bookingId=i.bookingId||i.booking_id,t.orderId=i.order_id,t.role=i.role}catch{}return t},x=e=>{let t={};try{t=JSON.parse(e)}catch{}return t},m=e=>!!x(e.customData).product,p=e=>{let{type:t,eventData:i,t:n,isShort:a=!1,role:l,clientName:o,proName:c,clientPhoneNumber:d,bookingRequests:u=[]}=e,x=h(i);if("turbo_message_sent"===t&&"pro"===l)return a?n("messenger.events.turbo_message_sent.pro.short",{client_name:o}):n("messenger.events.turbo_message_sent.pro.full.item1",{name:o,phone_number:d||""});if("quote_viewed"===t&&"pro"===l)return n("messenger.events.quote_viewed.pro.full",{client_name:o});if("customer_saw_pro_phone"===t&&"pro"===l)return n("messenger.events.customer_saw_pros_phone.pro.full",{client_name:o});if("pro_hired"===t)return"pro"===l?n("messenger.events.pro_hired.pro.full",{client_name:o}):n("messenger.events.pro_hired.client.full",{pro_name:c});if("hired_another_pro"===t&&"pro"===l)return n("messenger.events.hired_another_pro.full",{client_name:o});if("cancel_from_client"===t&&"pro"===l)return n("messenger.events.cancel_from_client.full",{client_name:o});if("client_left_review"===t)return"pro"===l?n("messenger.events.client_left_review.pro.full",{name:o}):n("messenger.events.client_left_review.client.full",{name:c});if("pro_saw_customer_phone"===t&&"pro"===l)return n("messenger.events.pro_phone_checked.full");if("recieved_direct_request"===t&&"pro"===l)return n(a?"messenger.events.recieved_direct_request.short":"messenger.events.recieved_direct_request.full",{client_name:o});let m=((e,t)=>{let{bookingId:i}=e||{};if(!i||!t.length)return"";let r=t.find(e=>e.id===i);return r||""})(x,u),p=m?(e=>{if(!e)return"";let t=new Date(e.bookingDate);return(0,r.A)(t,"dd MMM yyyy, HH:mm")})(m):"",g=m?m.service.data.name:"",b=a?()=>"":s.k;if("pro_has_booked"===t||"booking_created"===t)return"pro"===l?a?n("messenger.events.pro_has_booked.pro.short",{client_name:o,service_name:g}):p?n.rich("messenger.events.pro_has_booked.pro.full",{client_name:o,service_name:g,time:p,strong:b}):"":a?n("messenger.events.pro_has_booked.client.short"):p?n.rich("messenger.events.pro_has_booked.client.full",{pro_name:c,service_name:g,time:p,strong:b}):"";if("booking_accepted"===t)return"pro"===l?a?n("messenger.events.booking_accepted.pro.short",{client_name:o}):n.rich("messenger.events.booking_accepted.pro.full",{client_name:o,booking_date:p,strong:b}):n.rich("messenger.events.booking_accepted.client.full",{pro_name:c,service_name:g,time:p,strong:b});if("booking_cancelled_by_customer"===t)return"pro"===l?a?n.rich("messenger.events.booking_cancelled_by_customer.pro.short",{client_name:o}):n.rich("messenger.events.booking_cancelled_by_customer.pro.full",{client_name:o,booking_date:p,strong:b}):n.rich("messenger.events.booking_cancelled_by_customer.client.full",{booking_date:p,strong:b});if("booking_cancelled_by_pro"===t)return"pro"===l?a?n.rich("messenger.events.booking_canelled_by_pro.pro.short",{client_name:o}):n.rich("messenger.events.booking_canelled_by_pro.pro.full",{client_name:o,booking_date:p,strong:b}):n.rich("messenger.events.booking_canelled_by_pro.client.full",{booking_date:p,pro_name:c,strong:b});if("order_created"===t){if("pro"===l)return n("messenger.events.order_created.pro.full",{customer_name:o});if("customer"===l)return n("messenger.events.order_created.client.full",{pro_name:c})}if("order_accepted"===t){if("pro"===l)return n("messenger.events.order_accepted.pro.full",{customer_name:o});if("customer"===l)return n("messenger.events.order_accepted.client.full",{pro_name:c})}if("order_rejected"===t){if("pro"===l)return n("messenger.events.order_rejected.pro.full",{customer_name:o});if("customer"===l)return n("messenger.events.order_rejected.client.full",{pro_name:c}
1)}if("order_cancelled"===t){if("pro"===l)return n("messenger.events.order_cancelled.pro.full",{customer_name:o});if("customer"===l)return n("messenger.events.order_cancelled.client.full",{pro_name:c})}if("order_completed"===t){if("pro"===x.role){if("pro"===l)return n("messenger.events.order_completed_pro.pro.full",{customer_name:o});if("customer"===l)return n("messenger.events.order_completed_pro.client.full",{pro_name:c})}if("client"===x.role){if("pro"===l)return n("messenger.events.order_completed_client.pro.full",{customer_name:o});if("customer"===l)return n("messenger.events.order_completed_client.client.full",{pro_name:c})}}return null},g=e=>e.isPaid,b=(e,t)=>{if(t){if("customer"===e&&!1===t.isAcceptedByPro)return"declined";if("pro"===e&&!g(t))return"accept_decline"}return"form"}},11414:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>h,bH:()=>d});var r,n=i(12115),s=i(39318),a=i(38248),l=i(57765),o=i(93135),c=i(15981),d=((r={}).GUEST="guest",r.CUSTOMER="customer",r.PRO="pro",r.PRO_AS_CUSTOMER="pro_as_customer",r);let u="userMode",h=()=>{let e=(0,n.useRef)(""),{user:t}=(0,o.A)(),i=(0,s.usePathname)()||"/",[r,d]=(0,n.useState)("guest"),h=e.current,x=e=>!!(e.defaultUrl&&i===e.defaultUrl||i&&e.getUrl()===i),m=()=>c.UV.some(e=>x(e)),p=()=>c.Hb.some(e=>x(e));return(0,n.useEffect)(()=>{let i=(0,a.zM)(u);i&&(e.current=i),d((e=>{let{mode:i}=e;return t?(0,l.xJ)(t)?m()?"pro_as_customer":p()?"pro":"customer"===i?"pro_as_customer":"pro":"customer":"guest"})({mode:h}))},[t]),{userMode:h,pageMode:r,realPageMode:m()?"customer":p()?"pro":"guest",setUserMode:e=>{(0,a.w6)(u,e)}}}},11902:(e,t,i)=>{"use strict";i(12115),i(57274),i(53542)},12128:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(95155);let n=({name:e})=>{let t=/(?:\.([^.]+))?$/.exec(e),i=t?.length?t[0]:e.split(".")[1],[n]=e.split(i||"");return(0,r.jsxs)("div",{className:"flex min-w-[0px]",children:[(0,r.jsx)("span",{className:"truncate",children:n}),(0,r.jsx)("span",{className:"flex-shrink-0",children:i})]})}},13044:(e,t,i)=>{"use strict";i.d(t,{A:()=>l,y:()=>a});var r=i(95155),n=i(77862),s=i(40341);let a=({value:e,currency:t,maximumFractionDigits:i=0,minimumFractionDigits:r=0,formatter:n,...s})=>n.number(e,{style:"currency",currency:t,maximumFractionDigits:i,minimumFractionDigits:r,...s}),l=({value:e,predefinedCurrency:t,maximumFractionDigits:i=0,minimumFractionDigits:l=0,...o})=>{let c=(0,s.k)(),{currency:d}=(0,n.L)();return(0,r.jsx)("span",{"data-price-amount":Math.round(100*e)/100,"data-price-currency-iso":t||d,children:a({value:e,currency:t||d,formatter:c,maximumFractionDigits:i,minimumFractionDigits:l,...o})})}},15574:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});let r={src:"https://cdn-vercel.prod.starofservice.com/41393c5b/_next/static/media/favicon.08c057c6.ico",height:48,width:48,blurWidth:0,blurHeight:0}},15981:(e,t,i)=>{"use strict";i.d(t,{Hb:()=>a,Ks:()=>n,UV:()=>s});var r=i(87899);let n=[r.dO,r.fh,r.q_,r.XP,r.Au],s=[r.r0,r.Cp,r.YY,r.nq,r._N,r.Bg,r._e,r.Um],a=[r.VB,r.re,r.Fq,r.Zh,r.k5,r.f7,r.af,r.xU,r.b2,r.l8,r.WB,r.MD,r.Uv,r.wB,r.Fw,r.vW,r.YK]},19469:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});let r={src:"https://cdn-vercel.prod.starofservice.com/41393c5b/_next/static/media/favicon-16x16.ad9a47d8.png",height:16,width:16,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAG1BMVEVJh/dKiPpEg/h8qPqIsPtpm/mYu/uuyfxZkfmDBrwEAAAAAXRSTlPLTFDDXgAAAAlwSFlzAAALEwAACxMBAJqcGAAAADJJREFUeJwdi0EOADAIg0qrbv9/8eJOEBIksI2WqVwETFVbGzz15dQ0cp8EIxIbdlugBxbEAJtqQp5JAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},20433:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var r=i(12115),n=i(69421);let s=(e=!0)=>{let t=(0,n.A)(),i=window.Chargebee,[s,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{t&&i&&e&&(window.Chargebee.init({site:"starofservice-eu",iframeOnly:!0,enableGTMTracking:!0,publishableKey:"live_hZZRhESfcd8ArqGJfG8z8yFFMYCOfmcu5s"}),a(!0))})()},[t,i]),s}},21734:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});let r={include:"pro_profile,customer,service,pro_profile.user,pro_service_package",fields:{pro_service_package:"can_work_remotely",user:"id,full_name,short_name,phone_number,first_name,picture_url,has_avatar",service:"id,name",customer:["phone_number"],pro_profile:"id,user,starting_year,average_rating,
1nb_reviews,reviews,presentation,phone_number,name,slug,premium_account_enabled,media_gallery,business","pro_profile.user":"full_name,short_name,phone_number",booking_request:"id,pro_profile,created_at,customer,service,pro_service_package,booking_address"},meta:{booking_request:"conversation_id"}},n={include:"pro_profile,pro_profile.user,customer_profile,customer_profile.user,request,request.customer,medias,request.service,pro_profile.business,pro_profile.reviews,pro_profile.media_gallery,pro_profile.media_gallery.medias",fields:{quote:"id,description,medias,created_at,seen_at,is_phone_requested,is_accepted_by_pro,pricing_type,fixed_rate,price_range,is_paid,price_min,price_max,hourly_rate,pro_profile,customer_profile,service,request",request:"id,service,address,details,customer",service:"name",user:"id,first_name,full_name,short_name,picture_url,has_avatar,phone_number",customer:["phone_number"],pro_profile:"id,user,starting_year,average_rating,nb_reviews,name,slug,reviews,media_gallery,presentation,phone_number,business,premium_account_enabled",cutomer_profile:"id,user",business:"company_name",service_configuration:"can_work_remotely",review:"review_message,full_name,note,created_at,id",media_gallery:"medias"},meta:{pro_profile:"is_top_pro,identity_verified",quote:"conversation_id,is_remote_work,remote_work_eligibility,pro_phone_preview,customer_phone_preview,customer_phone,message_client_eligibility,is_bookable,description_masked",request:"nb_quotes,details_with_masking,details_masked_data",user:"phone_sms_verification_status"}},s={include:"reviews,pro_service_packages,media_gallery.medias,business",fields:{pro_profile:"id,name,reviews,pro_service_packages,media_gallery.medias,medias,media_gallery,business",review:"id,review_message,full_name,note,created_at",pro_service_package:"id",business:"company_name"},meta:{pro_profile:"is_top_pro,identity_verified"}},a={proProfile:e=>[{url:`/pro_profiles/${e}`,params:s}],bookingRequest:e=>[{url:`/booking_requests/${e}`,params:r}],conversation:e=>["conversation",e],messages:e=>["messages",e],userMeta:["user-meta"],quote:e=>[{url:`/quotes/${e}`,params:n}]}},25544:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>a,SA:()=>s});var r=i(77862);let n=e=>![""].includes(e),s=e=>"QuickConnect",a=()=>{let{countryCode:e}=(0,r.L)();return{isPayPerLeadEnabled:n(e),automationModes:n(e)?["auto_purchase"]:[]}}},27044:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>d,Dd:()=>o,lC:()=>c});var r=i(95155),n=i(3077),s=i.n(n),a=i(44763);let l={white:"white",black:a.MF.gray10,brand:a.MF.primary,partner:a.MF.indigo8},o=({color:e="brand",size:t=30,...i})=>(0,r.jsx)("svg",{...i,width:5.6*t,height:t,viewBox:"0 0 168 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsxs)("g",{children:[(0,r.jsx)("g",{children:(0,r.jsx)("path",{id:"Starrocket",fillRule:"evenodd",clipRule:"evenodd",d:"M27.5611 15.2223C26.9498 15.6809 24.4561 15.8712 22.6443 15.95C23.1562 14.906 23.5992 13.895 23.9271 13.0285C24.195 12.3211 24.4375 11.6575 24.659 11.0307C26.5215 12.9057 28.1135 14.8079 27.5611 15.2223ZM17.1896 21.0835C15.972 20.8572 14.7456 14.8182 14.7456 14.8182C14.7456 14.8182 8.58993 14.0555 8.20481 12.9473C7.86101 11.9579 13.8611 7.95912 16.4688 6.56883C21.7967 3.72848 24.1276 2.6294 24.7024 3.16383C25.2771 3.69783 24.4812 6.51826 22.302 12.2851C21.2355 15.1077 18.3726 21.3031 17.1896 21.0835ZM13.2602 2.33562C13.6765 2.09455 14.8202 2.76805 16.7613 4.25005C16.3047 4.48533 15.8289 4.73562 15.3291 5.00412C14.6678 5.36005 13.9187 5.80812 13.1415 6.31405C12.8414 3.89476 12.8437 2.5769 13.2602 2.33562ZM25.3478 8.98448C26.9248 4.02355 26.7635 2.14426 26.12 1.54362C25.4653 0.932689 23.5922 0.975761 18.8221 3.22983C14.6835 0.130404 12.8837 -0.296025 12.1256 0.147761C11.3706 0.590261 10.8365 2.37376 11.4015 7.51233C8.45216 9.6584 5.7052 12.2727 6.23446 13.5918C7.00895 15.5228 13.0205 16.6227 13.0205 16.6227C13.0205 16.6227 14.7042 22.7043 16.6381 23.3009C16.8342 23.3613 17.0508 23.3412 17.2821 23.2578C19.3012 22.876 22.0521 17.5925 22.0521 17.5925C22.0521 17.5925 28.2088 17.8285 29.3591 16.1255C30.158 14.9431 27.8818 11.7323 25.3478 8.98448ZM10.0524 21.6297C9.54183 22.1697 3.6151 27.7122 3.26283 27.9976C2.98601 28.2222 2.62378 28.265 2.38109 28.0075C2.1384 27.7501 2.19732 27.376 2.38427 27.0655C2.54217 26.8023 7.70607 20.2553 8.21646 19.7157C8.72707 19.1759 9.55179 19.1669 10.0588 19.6953C10.5656 20.224 10.5628 21.0901 10.0524 21.6297ZM6.80335 18.2705C5.59265 19.8061 1.87939 24.9751 1.11041 26.0114C0.339735 27.0498 0.207262 28.4277 1.0979 29.3356C1.98876 30.244 3.34803 30.128 4.33596 29.2998C5.46887 28.3505 10.059 24.3608 11.4626 23.0206C12.8104 21.7334 12.767 19.5305 11.4802 18.2187C10.1936 16.907 7.95936 16.8042 6.80335 18.2705Z",fill:l[e]})}),(0,r.jsx)("g",{children:(0,r.jsx)("path",{id:"StarOfService",fillRule:"evenodd",clipRule:"evenodd",d:"M159.421 16.7235C159.8 15.22 160.934 14.3987 162.367 14.3987C163.869 14.3987 164.82 15.3241 165.153 16.7235H159.421ZM162.23 11.9928C159.043 11.9928 156.648 14.3985 156.648 17.938C156.648 21.5467 159.169 23.906 162.505 23.906C164.751 23.906 166.356 22.981 167.33 21.7202L165.496 20.1355C164.912 20.8757 163.972 21.5003 162.642 21.5003C160.957 21.5003 159.72 20.5055 159.376 18.8634H167.72C167.755 18.655 167.789 18.2156 167.789 17.8109V17.8107C167.789 14.4447 165.611 11.9928 162.23 11.9928ZM151.522 21.5C149.505 21.5 148.118 20.0661 148.118 17.938C148.118 15.8329 149.482 14.3985 151.51 14.3985C152.76 14.3985 153.746 14.9305 154.399 15.7058L156.187 14.1441C155.041 12.7217 153.161 11.9928 151.373 11.9928C147.9 11.9928 145.447 14.4219 145.447 17.961C145.447 21.5 147.912 23.906 151.281 23.906C153.494 23.906 155.247 23.004 156.233 21.8705L154.422 20.2513C153.814 20.9336 152.794 21.5 151.522 21.5ZM143.315 6.92655C142.318 6.92655 141.538 7.72462 141.538 8.68469C141.538 9.65604 142.318 10.4428 143.315 10.4428C144.278 10.4428 145.08 9.65604 145.08 8.68469C145.08 7.72462 144.278 6.92655 143.315 6.92655ZM14
11.986 23.721H144.61V12.1665H141.986V23.721ZM135.198 20.4016H135.152L132.16 12.1663H129.352L133.914 23.721H136.424L140.963 12.1663H138.132L135.198 20.4016ZM128.218 11.9928C126.82 11.9928 125.548 12.6753 124.653 13.901H124.619V12.1661H121.994V23.721H124.619V18.2384C124.619 16.3648 125.754 14.919 127.748 14.919C127.932 14.919 128.241 14.9303 128.539 14.9535V12.0041C128.448 11.9924 128.333 11.9924 128.218 11.9924V11.9928ZM112.751 16.7235C113.129 15.22 114.264 14.3987 115.697 14.3987H115.697C117.198 14.3987 118.15 15.3241 118.483 16.7235H112.751ZM115.559 11.9928C112.373 11.9928 109.977 14.3985 109.977 17.938C109.977 21.5467 112.499 23.906 115.834 23.906C118.081 23.906 119.685 22.981 120.66 21.7202L118.826 20.1355C118.241 20.8757 117.301 21.5003 115.972 21.5003C114.287 21.5003 113.049 20.5055 112.705 18.8634H121.05C121.084 18.655 121.118 18.2156 121.118 17.8109V17.8107C121.118 14.4447 118.941 11.9928 115.559 11.9928ZM103.779 13.7043C101.762 12.9177 100.639 12.4901 100.661 11.2639C100.684 10.0145 101.704 9.29756 102.988 9.29756C104.134 9.29756 105.464 9.87595 106.828 11.021L108.513 8.77708C106.828 7.43532 104.96 6.69515 102.988 6.70643C100.111 6.71814 97.7271 8.76537 97.7271 11.4142C97.7271 14.4792 100.237 15.6242 102.759 16.5264C104.868 17.2783 105.98 17.7524 105.98 19.2099C105.98 20.4591 105.04 21.2686 103.206 21.2686C101.785 21.2686 100.146 20.5285 98.9305 19.0479L97.1424 21.2686C98.8961 23.0845 101.062 23.9055 103.194 23.9055L103.195 23.906C105.854 23.906 108.938 22.3447 108.938 18.8749C108.938 15.6247 106.634 14.8266 103.779 13.7043ZM94.9807 8.54611C95.4734 8.54611 96.1269 8.76602 96.895 9.13599L97.4795 6.89207C96.872 6.51038 95.8861 6.09399 94.6026 6.09399C92.3557 6.09399 91.1409 7.47045 91.1409 10.0499V12.1663H89.8571V14.4219H91.1409V23.721H93.7657V14.4219H96.5854V12.1663H93.7657V10.3387C93.7657 9.07809 94.1898 8.54611 94.9807 8.54611ZM81.117 21.2339V21.2342C77.8617 21.2342 75.6265 18.5973 75.6265 15.3007C75.6265 12.0156 77.8617 9.37867 81.117 9.37867C84.2003 9.37867 86.5729 11.8538 86.5729 15.3005C86.5729 18.7471 84.2003 21.2339 81.117 21.2339ZM81.117 6.70686C76.108 6.70686 72.6805 10.3619 72.6805 15.3007C72.6805 20.2513 76.108 23.906 81.117 23.906C85.9312 23.906 89.5188 20.4363 89.5188 15.3007C89.5188 10.1655 85.9312 6.70686 81.117 6.70686ZM71.3755 11.9928C69.9771 11.9928 68.7047 12.6753 67.8104 13.901H67.7763V12.1661H65.1515V23.721H67.7763V18.2384C67.7763 16.3648 68.9111 14.919 70.9053 14.919C71.0889 14.919 71.3983 14.9303 71.6964 14.9535V12.0041C71.6046 11.9924 71.49 11.9924 71.3755 11.9924V11.9928ZM58.2893 21.5003C56.3522 21.5003 54.9996 20.0546 54.9996 18.0074C54.9996 15.7867 56.4668 14.3987 58.3009 14.3987C60.1806 14.3987 61.5443 15.9599 61.5443 18.0074C61.5443 20.1008 60.066 21.5003 58.2893 21.5003ZM61.4416 13.5545H61.3954C60.5357 12.525 59.3095 11.9928 57.8535 11.9928C54.7015 11.9928 52.3289 14.5028 52.3289 17.9959C52.3289 21.5699 54.7015 23.906 57.8768 23.906C59.4585 23.906 60.6849 23.2816 61.5218 22.1715H61.5559V23.7212H64.0663V12.1663H61.4416V13.5545ZM49.8002 21.4311C49.0667 21.4311 48.6996 21.003 48.6996 19.8232V14.4219H52.0698V12.1663H48.6996V8.03734L46.075 8.32621V12.1663H44.6766V14.4219H46.075V20.0661C46.075 22.6455 47.3014 23.906 49.2731 23.906C50.7744 23.906 51.4965 23.5939 52.1842 23.2239L51.4965 20.9336C50.889 21.2574 50.2471 21.4311 49.8002 21.4311ZM39.6369 13.7043C37.6197 12.9177 36.496 12.4901 36.519 11.2639C36.542 10.0145 37.5621 9.29756 38.8458 9.29756C39.9921 9.29756 41.3216 9.87595 42.6858 11.021L44.3705 8.77708C42.6858 7.43532 40.8173 6.69515 38.8456 6.70643C35.9685 6.71814 33.5845 8.76537 33.5845 11.4142C33.5845 14.4792 36.0947 15.6242 38.6165 16.5264C40.7255 17.2783 41.8373 17.7524 41.8373 19.2099C41.8373 20.4591 40.8975 21.2686 39.0636 21.2686C37.642 21.2686 36.0031 20.5285 34.7881 19.0479L33 21.2686C34.7537 23.0845 36.9199 23.9055 39.052 23.9055L39.0524 23.906C41.7118 23.906 44.7949 22.3447 44.7949 18.8749C44.7949 15.6247 42.4913 14.8266 39.6369 13.7043Z",fill:l[e]})})]})}),c=({href:e,linkProps:t={},color:i="brand",size:n=31,...a})=>(0,r.jsx)(s(),{href:e,...t,prefetch:!1,children:(0,r.jsx)(o,{color:i,size:n,...a})}),d=({color:e="brand",size:t=31,...i})=>(0,r.jsx)("svg",{...i,width:t,height:t,viewBox:"0 0 31 31",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.9597 16.1925C27.3484 16.6511 24.8547 16.8414 23.0429 16.9203C23.5548 15.8763 23.9978 14.8653 24.3257 13.9987C24.5936 13.2913 24.8361 12.6277 25.0575 12.0009C26.92 13.8759 28.512 15.7781 27.9597 16.1925ZM17.5882 22.0537C16.3705 21.8274 15.1441 15.7884 15.1441 15.7884C15.1441 15.7884 8.98849 15.0258 8.60336 13.9175C8.25957 12.9281 14.2596 8.92933 16.8673 7.53905C22.1953 4.69869 24.5262 3.59962 25.101 4.13405C25.6756 4.66805 24.8797 7.48848 22.7006 13.2553C21.634 16.0779 18.7711 22.2733 17.5882 22.0537ZM13.6587 3.30583C14.075 3.06476 15.2187 3.73826 17.1598 5.22026C16.7033 5.45555 16.2274 5.70583 15.7276 5.97433C15.0663 6.33026 14.3173 6.77833 13.54 7.28426C13.2399 4.86498 13.2422 3.54712 13.6587 3.30583ZM25.7464 9.95469C27.3234 4.99376 27.1621 3.11448 26.5186 2.51383C25.8638 1.9029 23.9908 1.94598 19.2207 4.20005C15.082 1.10062 13.2823 0.67419 12.5241 1.11798C11.7691 1.56048 11.235 3.34398 11.8001 8.48255C8.85072 10.6286 6.10376 13.2429 6.63302 14.562C7.40751 16.493 13.419 17.5929 13.419 17.5929C13.419 17.5929 15.1028 23.6745 17.0367 24.2711C17.2328 24.3315 17.4494 24.3114 17.6806 24.228C19.6997 23.8462 22.4507 18.5628 22.4507 18.5628C22.4507 18.5628 28.6074 18.7987 29.7577 17.0958C30.5565 15.9133 28.2803 12.7025 25.7464 9.95469ZM10.451 22.5999C9.94039 23.1399 4.01366 28.6824 3.66139 28.9678C3.38457 29.1924 3.02234 29.2353 2.77965 28.9777C2.53696 28.7203 2.59588 28.3462 2.78283 28.0357C2.94073 27.7725 8.10463 21.2255 8.61502 20.6859C9.12563 20.1461 9.95035 20.1371 10.4573 20.6655C10.9641 21.1942 10.9614 22.0603 10.451 22.5999ZM7.20191 19.2408C5.99121 20.7763 2.27795 25.9453 1.50897 26.9816C0.738294 28.02 0.605821 29.3979 1.49646 30.3058C2.38732 31.2142 3.74
1659 31.0983 4.73452 30.27C5.86743 29.3208 10.4576 25.331 11.8611 23.9908C13.209 22.7036 13.1655 20.5008 11.8787 19.1889C10.5922 17.8773 8.35792 17.7744 7.20191 19.2408Z",fill:l[e]})})},27305:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});let r={src:"https://cdn-vercel.prod.starofservice.com/41393c5b/_next/static/media/favicon-32x32.7a6a8252.png",height:32,width:32,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAHlBMVEVKhvhKh/dKh/lDgvhMi/18qfuHsPurx/yUuPxpnPnDUMZgAAAAAnRSTlPGxpk02nUAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA1SURBVHicHcjJDcAwEMNAmdIe7r/hwHlxQClg5yi4uhIB032tN7z9Y3Yv8p0qjKiyIToxrx8jzAD63rFH7wAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},31541:(e,t,i)=>{"use strict";i.d(t,{rx:()=>r});let r=e=>["XAF","XOF","JPY","KRW","CLP","VND","PYG","XPF","MGA"].includes(e)},34117:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var r=i(95155),n=i(2961),s=i.n(n),a=i(24071),l=i(57884),o=i(85016),c=i(277);let d=({obfuscated:e,href:t,dataTest:i,children:n})=>e?(0,r.jsx)(a.Button,{data:{cy:i||""},variant:"primary",size:"small",onClick:()=>{window.location.href=t},children:n}):(0,r.jsx)(a.ButtonLink,{data:{cy:i||""},href:t,variant:"primary",size:"small",children:n}),u=({obfuscated:e,href:t,dataTest:i,onClick:n,children:s})=>e?(0,r.jsx)(l.default,{href:t,onClick:n,dataCy:i||"",children:s}):(0,r.jsx)(a.TextLink,{href:t,onClick:n,noUnderline:!0,data:{cy:i||""},children:s}),h=({hasItemBorder:e,color:t="dark"})=>{let{handleLinkClick:i}=(0,o.useHeaderContext)(),{mainLinks:n,hasHighlightedJoinButton:l}=(0,c.c)();return(0,r.jsx)("ul",{className:"flex items-center m-0 px-[3px] space-x-8 h-full header_mainNavigation",children:n.map(n=>{let{index:o,href:c,label:h,notificationNumber:x,isActive:m,dataTest:p,pill:g,obfuscated:b}=n;return(0,r.jsx)("li",{"data-cy":`header_mainNavigation_${o}`,className:s()("group flex items-center h-full border-solid border-0",{"border-b-[4px] pt-1":e&&!1,"border-b-0":!e,"border-b-primary":m,"border-b-transparent":!m}),children:"proSignUpRoute"===o&&l?(0,r.jsx)(d,{obfuscated:b,href:c,dataTest:p,children:h}):(0,r.jsx)(u,{obfuscated:b,href:c,dataTest:p,onClick:()=>i(o),children:(0,r.jsx)("div",{className:s()("ring-primary border-1 border-solid py-[10px] px-[18px] rounded-[16px] transition-all ease-in-out duration-200 active:border-primary hover:ring-2",{"ring-1 bg-blue-0 hover:bg-blue-0 border-0 border-solid border-blue-3 hover:border-primary active:ring-2":m,"ring-0 border-white-0 bg-white-0 active:border-primary hover:bg-blue-0 active:ring-2":!m}),children:(0,r.jsxs)(a.Stack,{orientation:"horizontal",spacing:"$75",alignment:"center",children:[(0,r.jsx)(a.Text,{weight:m?"semibold":"normal",color:t,size:"small",children:h}),Number(x)>0&&(0,r.jsx)(a.Badge,{data:{cy:`header_mainNavigation_${o}_badge`},count:Number(x),overflowCount:99}),!x&&g&&(0,r.jsx)("span",{className:"inline-block bg-indigo-8 group-hover:bg-indigo-9 text-[8px] mt-[-8px] group-hover:mt-[-10px] ml-[2px] py-[2px] px-[6px] rounded-[8px] text-white-0 shadow-300 group-hover:shadow-100 transition-all duration-200",children:g})]})})})},c)})})}},36232:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var r=i(74818),n=i(61515);let s=()=>{let e=(0,r.m)();return(0,n.Ay)(e)}},38190:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(9457),n=i(93135),s=i(72795);let a=()=>{let{user:e}=(0,n.A)(),t=(0,r.tl)();return{openCheckout:async({hostedPageUrl:i,planId:r,planType:n,periodUnit:a,amount:l,onSuccess:o,onError:c,onClose:d,onLoaded:u})=>{let h=window.Chargebee.getInstance();if(!h)return;let x={user_id:e?.id,professional_id:e?.id,plan_id:r,plan_type:n,hosted_page:i,period:a,amount:l};h.openCheckout({hostedPage:()=>new Promise(e=>{e({url:i})}),success:()=>{h.status="success",o&&o(),t(s.oQG,x)},close:()=>{t(s.Nis,{...x,is_successful:"success"===h.status}),t(s.VQ4,x),d&&d(h.status)},error:e=>{h.status="error",t(s.xVh,{...x,error:e}),c&&c(Error(e))},loaded:()=>{t(s.GXM,x),u&&u()},step:e=>{t(`Chargebee Popup: ${e}`,x)}})},closeAll:async()=>{let e=window.Chargebee.getInstance();e&&e.closeAll()}}}},38697:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(95155),n=i(2961),s=i.n(n);function a({label:e,hoverParent:t}){return(0,r.jsxs)("div",{className:"inline-flex items-start gap-[8px]",children:[(0,r.jsx)("span",{children:e}),(0,r.jsx)("span",{className:s()(["relative","bg-indigo-8 text-white-0","text-[8px]","py-[2px] px-[6px]","top-[-2px]","rounded-[8px] shadow-300 transition-all duration-200"],t&&["group-hover:bg-indigo-9","group-hover:shadow-100","group-hover:top-[-3px]"]),children:"New"})]})}},41327:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});let r={src:"https://cdn-vercel.prod.starofservice.com/41393c5b/_next/static/media/favicon-dot-32x32.28427ddc.png",height:32,width:32,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAPFBMVEWEr/2Pg7+NvP+Juv/Ka3b/YkQ6hP9Khvj+aUuUu/30ZE5BhPpLh/hDg/h6qPtMiv6ryP1HiP5rnfmWufwM4s5OAAAADHRSTlP8gL29eprcxvf4qvQwC6L6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAPUlEQVR4nBXGSQ6AMBAEsQaygapnEvL/vyJ8snqSrYxHiXXWMQRMHbUIh3xf7c/cO1J+pwKjFWFDqi8D2T9Z7AK6UV9VtwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},55970:(e,t,i)=>{"use strict";i.d(t,{A:()=>
1o});var r=i(57274),n=i(12115),s=i(16523),a=i(9408),l=i(79732);let o=({onMessage:e})=>{let t=(0,s.Z)(),{wsMercuryClient:i}=(0,r.M)();(0,n.useEffect)(()=>{if(!t||!i)return()=>{};let r=i.subscription({newMessage:l.V}).subscribe({next:i=>{let r=i.newMessage;r&&r.sender?.apiId!==t.id&&(0,a.rR)(r)&&e(r)}});return()=>{r?.unsubscribe?.()}},[t,i,e])}},57271:(e,t,i)=>{"use strict";i(12115),i(57274),i(53542)},57613:(e,t,i)=>{"use strict";let r;i.d(t,{default:()=>ip});var n=i(95155),s=i(12115),a=i(39318),l=i(2961),o=i.n(l),c=i(277),d=i(85016),u=i(72202),h=i(2497),x=i(24071),m=i(72795),p=i(9457),g=i(94425),b=i(10940),j=i(73653);let f={apiKey:"AIzaSyADuoC3z8MG-LzOMZfSnWjygZNcu1PoJkk",authDomain:"starofservice-web-prod.firebaseapp.com",projectId:"starofservice-web-prod",storageBucket:"starofservice-web-prod.appspot.com",messagingSenderId:"28672521240",appId:"1:28672521240:web:e0c88e2fbc07ba88e9bf6d"},_=null,v=()=>(void 0===navigator.serviceWorker||r||(r=(0,b.Wp)(f),_=(0,j.dG)(r)),{messaging:_,getToken:j.gf,onMessage:j.xD});var w=i(38248),y=i(19487),C=i(36232);let k=async()=>!!navigator.brave&&navigator.brave.isBrave(),A="notificationsRegistered",S=async()=>{if("Notification"in window&&"default"===Notification.permission)return Notification.requestPermission()},T=async()=>{if("Notification"in window)return Notification.permission};var N=i(40341);function P({title:e,children:t,buttonOnClick:i,buttonLabel:r,buttonWorking:s=!1,footNote:a}){return(0,n.jsx)(x.Bleed,{top:"$100",bottom:"$300",children:(0,n.jsxs)(x.Stack,{spacing:"$500",children:[(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)(x.Heading,{level:"3",align:"center",children:e}),t]}),(0,n.jsxs)(x.Stack,{spacing:"$300",children:[i&&r&&(0,n.jsx)(x.Button,{onClick:i,working:s,size:"large",children:r}),a&&(0,n.jsx)(x.Text,{size:"xsmall",align:"center",children:a})]})]})})}function z(){let e=(0,N.c)("pwa_modal.advantages.push_notifications"),t={bold:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})},i=[["\uD83D\uDCE9",e.rich("real_time",t)],["\uD83D\uDE80",e.rich("reactiveness",t)],["âï¸",e.rich("visibility",t)]];return(0,n.jsx)(x.Card,{backgroundColor:"gray",children:(0,n.jsx)(x.Stack,{spacing:"$100",children:i.map(e=>(0,n.jsxs)(x.Columns,{spacing:"$300",children:[(0,n.jsx)(x.Column,{width:"content",children:e[0]}),(0,n.jsx)(x.Column,{children:(0,n.jsx)(x.Text,{children:e[1]})})]}))})})}function M(){let e=(0,N.c)("pwa_modal.status.notifications_denied");return(0,n.jsxs)(P,{title:e("title"),footNote:e("footnote"),children:[e.rich("text",{br:()=>(0,n.jsx)("br",{})}),(0,n.jsx)(z,{})]})}function E(){let e=(0,N.c)("pwa_modal.status.notifications_not_supported");return(0,n.jsx)(P,{title:e("title"),footNote:e("footnote"),children:e.rich("text",{ul:e=>(0,n.jsx)(x.Card,{backgroundColor:"gray",children:(0,n.jsx)(x.BulletList,{size:"small",children:e})}),li:e=>(0,n.jsx)(x.BulletItem,{children:e}),bold:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e}),br:()=>(0,n.jsx)("br",{})})})}function $({grantingInProgress:e,pwaInstalled:t,onEnableNotificationsClick:i}){let r=(0,N.c)("pwa_modal.status.notifications_not_enabled");return(0,n.jsxs)(P,{title:r("title"),footNote:r("footnote"),buttonOnClick:i,buttonLabel:r("button_label"),buttonWorking:e,children:[(0,n.jsx)(x.Text,{children:r(t?"pwa_installed_text":"pwa_not_installed_text")}),(0,n.jsx)(z,{})]})}function I(){let e=(0,N.c)("pwa_modal.advantages.pwa"),t={bold:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})},i=[["\uD83D\uDCE9",e.rich("real_time",t)],["\uD83D\uDE80",e.rich("reactiveness",t)],["\uD83D\uDCF2",e.rich("visibility",t)]];return(0,n.jsx)(x.Card,{backgroundColor:"gray",children:(0,n.jsx)(x.Stack,{spacing:"$100",children:i.map(e=>(0,n.jsxs)(x.Columns,{spacing:"$300",children:[(0,n.jsx)(x.Column,{width:"content",children:e[0]}),(0,n.jsx)(x.Column,{children:(0,n.jsx)(x.Text,{children:e[1]})})]}))})})}function R({pwaInstalled:e,pwaAvailable:t,onPWAInstallClick:i}){let r=(0,N.c)("pwa_modal.status.notifications_enabled");return e?(0,n.jsxs)(P,{title:r("title_pwa_installed"),footNote:r("footnote_pwa_installed"),children:[r.rich("pwa_installed_text",{br:()=>(0,n.jsx)("br",{})}),(0,n.jsx)(I,{})]}):t?(0,n.jsxs)(P,{title:r("title_pwa_available"),footNote:r("footnote_pwa_available"),buttonOnClick:i,buttonLabel:r("button_label_pwa_available"),children:[r.rich("pwa_available_text",{br:()=>(0,n.jsx)("br",{})}),(0,n.jsx)(I,{}),r.rich("instructions_pwa",{bold:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e}),ol:e=>(0,n.jsx)("ol",{className:"list-decimal pl-24 pr-8",children:e}),li:e=>(0,n.jsx)("li",{className:"pl-8",children:e})})]}):(0,n.jsxs)(P,{title:r("title_pwa_not_available"),footNote:r("footnote_pwa_not_available"),children:[r.rich("pwa_not_available_text",{br:()=>(0,n.jsx)("br",{})}),(0,n.jsx)(I,{})]})}function U({onPWAInstallClick:e}){let t=(0,N.c)("pwa_modal.status.notifications_not_enabled_pwa_required");return(0,n.jsxs)(P,{title:t("title"),buttonOnClick:e,buttonLabel:t
1("button_label"),children:[t.rich("text",{br:()=>(0,n.jsx)("br",{})}),t.rich("instructions_pwa",{bold:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e}),ol:e=>(0,n.jsx)("ol",{className:"list-decimal pl-24 pr-8",children:e}),li:e=>(0,n.jsx)("li",{className:"pl-8",children:e})}),(0,n.jsx)(z,{})]})}var L=i(98778);function D({isOpen:e,setIsOpen:t}){let i=(0,p.tl)(),r=(0,s.useRef)(null),[a,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let e=window.promptEvent,t=setInterval(()=>{window.promptEvent!==e&&(e=window.promptEvent,l(window.promptEvent))},100);return()=>{clearInterval(t)}},[]),(0,s.useEffect)(()=>{r.current&&r.current?.showDialog(e)},[e,r]),(0,n.jsx)(n.Fragment,{children:e&&(0,n.jsx)(L.A,{ref:r,name:"StarOfService",icon:"/all/apple-touch-icon-180x180.png",manifest:"/all/manifest.json",externalPromptEvent:a,onPWAInstallPromptEvent:()=>{i(m.mLu)},onPwaInstallSuccessEvent:()=>{i(m.GDY)},onPwaUserChoiceResultEvent:e=>{e?.detail?.message==="accepted"&&t(!1),e?.detail?.message==="dismissed"&&t(!1)}})})}function B({showAll:e=!1}){let t=(0,p.tl)(),i=(0,a.useSearchParams)(),r=!!i.get("pwa"),l=!!i.get("testing"),[o,c]=(0,s.useState)(r),[d,u]=(0,s.useState)(!1),[h,b]=(0,s.useState)(e||l);(0,s.useEffect)(()=>{c(r)},[r]),(0,s.useEffect)(()=>{b(e||l)},[l,e]),(0,s.useEffect)(()=>{o&&t(m.Vdk)},[o,t]);let{status:j,handleRequestPermission:f}=(()=>{var e,t;let i,r=(0,p.tl)(),{isEligible:n,reason:a}=(()=>{let[e,t]=(0,s.useState)(!1),[i,r]=(0,s.useState)(null);return(0,s.useEffect)(()=>{(async()=>{let e=/iPad|iPhone|iPod/.test(navigator.userAgent),i=/Android/.test(navigator.userAgent),n=window.matchMedia("(display-mode: standalone)").matches||navigator.standalone||document.referrer.includes("android-app://"),s=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),a=/Firefox/.test(navigator.userAgent),l=/Chrome/.test(navigator.userAgent)&&!/Edg/.test(navigator.userAgent)&&!/Opera|OPR/.test(navigator.userAgent),o=/Edg/.test(navigator.userAgent),c=/Opera|OPR/.test(navigator.userAgent),d=await k();"Notification"in window&&"serviceWorker"in navigator?e?n?(t(!0),r(null)):(t(!1),r("pwa_installation_required")):i||s||a||l||o||c?(t(!0),r(null)):d?(t(!0),r("privacy_settings_required")):(t(!1),r("not_supported")):(t(!1),e?r("pwa_installation_required"):r("service_workers_not_supported"))})()},[]),{isEligible:e,reason:i}}
1)(),[l,o]=(0,s.useState)(),[c,d]=(0,s.useState)(void 0),u=(i=(0,C.A)(),(0,y.useMutation)({mutationFn:e=>i.post("/me/notification_tokens",{data:{type:"notification_token",attributes:{token:e}}})})),h=(0,s.useCallback)(async(e,t)=>{try{let i=await t(e,{vapidKey:"BK0KpGjlZcfvYGhyafFg5IGf_iZl9vTB_GfmbTd5AD_vplbbJSLtUnihXqZw-GDsVygpy-Kuqp-hzFiDSSjeEKw"});i&&(o(!0),(0,w.zM)(A)||(u.mutate(i),(0,w.w6)(A,!0,60)),r(m.Ipc))}catch(e){console.error("An error occurred while retrieving token. ",e)}},[r]),x=async()=>{try{r(m.N3Y),await S(),d(Notification.permission)}catch(e){console.error("An error occurred while requesting notification permission:",e)}};return(0,s.useEffect)(()=>{if("granted"===c){let{messaging:e,getToken:t}=v();e&&h(e,t)}},[c,h]),(0,s.useEffect)(()=>{v(),T().then(e=>{d(e)})},[]),(0,s.useEffect)(()=>{void 0!==c&&r(m.Xtj,{is_push_eligible:n,is_registed:l,ineligibility_reason:a,permission:c})},[c]),{handleRequestPermission:x,status:(e=l||!1,t=n||!1,e?"GRANTED":e||"denied"!==c?void 0===e&&"granted"===c?"GRANTING":e||!t||c&&"default"!==c?t||"pwa_installation_required"!==a?!t&&["service_workers_not_supported","not_supported"].includes(a||"")?"NOT_SUPPORTED":"DENIED":"PWA_INSTALL_REQUIRED":"DEFAULT":"DENIED")}})(),{isInstalled:_,canInstall:N}=(()=>{let[e,t]=(0,s.useState)(!1),[i,r]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=e=>{e.preventDefault(),r(!0)},i=()=>{t(!0),r(!1)};return window.matchMedia("(display-mode: standalone)").matches?t(!0):t(!1),window.addEventListener("beforeinstallprompt",e),window.addEventListener("appinstalled",i),()=>{window.removeEventListener("beforeinstallprompt",e),window.removeEventListener("appinstalled",i)}},[]),{isInstalled:e,canInstall:i}})(),P=(0,a.useSearchParams)(),z=(0,a.useRouter)(),I=()=>{let e,t;c(!1),e=new URLSearchParams(P.toString()),["pwa","texting"].forEach(t=>{e.delete(t)}),t=e.toString()?`?${e.toString()}`:"",z.replace(`${window.location.pathname}${t}`)},L=()=>{u(!0)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(D,{isOpen:d,setIsOpen:u}),(0,n.jsxs)(x.ModalDialog,{open:o&&!d,title:"",onClose:I,size:"fluid",headerContent:void 0,hideCloseIcon:!0,children:[(0,n.jsx)(x.Bleed,{top:"$300",right:["$0","$200"],children:(0,n.jsx)(x.Stack,{alignment:"end",children:(0,n.jsx)(x.TextLinkButton,{onClick:I,color:"secondary",children:(0,n.jsx)(g.Close,{color:"gray5"})})})}),h&&(0,n.jsxs)(x.Stack,{dividers:!0,spacing:"$600",children:[(0,n.jsxs)("div",{children:["NotificationsNotEnabled",(0,n.jsx)($,{grantingInProgress:"GRANTING"===j,pwaInstalled:_,onEnableNotificationsClick:f})]}),(0,n.jsxs)("div",{children:["NotificationsEnabled pwaInstalled=false pwaAvailable=true",(0,n.jsx)(R,{pwaInstalled:!1,pwaAvailable:!0,onPWAInstallClick:L})]}),(0,n.jsxs)("div",{children:["NotificationsEnabled pwaInstalled=true pwaAvailable=false",(0,n.jsx)(R,{pwaInstalled:!0,pwaAvailable:!1,onPWAInstallClick:L})]}),(0,n.jsxs)("div",{children:["NotificationsEnabled pwaInstalled=false pwaAvailable=false",(0,n.jsx)(R,{pwaInstalled:!1,pwaAvailable:!1,onPWAInstallClick:L})]}),(0,n.jsxs)("div",{children:["NotificationsNotEnabledPWARequired",(0,n.jsx)(U,{onPWAInstallClick:L})]}),(0,n.jsxs)("div",{children:["NotificationsDenied",(0,n.jsx)(M,{})]}),(0,n.jsxs)("div",{children:["NotificationsNotSupported",(0,n.jsx)(E,{})]})]}),(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:"DEFAULT"===j||"GRANTING"===j,children:(0,n.jsx)($,{grantingInProgress:"GRANTING"===j,pwaInstalled:_,onEnableNotificationsClick:f})}),(0,n.jsx)(x.Case,{when:"GRANTED"===j,children:(0,n.jsx)(R,{pwaInstalled:_,pwaAvailable:N,onPWAInstallClick:L})}),(0,n.jsx)(x.Case,{when:"PWA_INSTALL_REQUIRED"===j,children:(0,n.jsx)(U,{onPWAInstallClick:L})}),(0,n.jsx)(x.Case,{when:"DENIED"===j,children:(0,n.jsx)(M,{})}),(0,n.jsx)(x.Else,{children:(0,n.jsx)(E,{})})]})]})]})}var F=i(3077),H=i.n(F),V=i(27044),O=i(23927),q=i(87899);let W=({isMenuOpen:e=!1,hasNotifications:t=!1,hasNotificationIcon:i,onLogoClick:r,children:s})=>{let{innerClassName:a,isExpandedHeader:l,userMode:{pageMode:c}}=(0,d.useHeaderContext)(),h=[u.b.PRO_AS_CUSTOMER,u.b.CUSTOMER].includes(c)?q.r0.getUrl():q.qm.getUrl();return(0,n.jsx)("div",{className:o()("transition-height duration-150 ease-in-header h-[60px]",{"md:h-[69px]":!l,"md:h-[102px]":l}),children:(0,n.jsxs)("div",{className:o()("flex h-full w-full items-stretch justify-between px-0 md:px-8",a),children:[(0,n.jsx)("div",{className:"md:hidden p-16 pr-0 CI_Header_Logo_mobile",onClick:r,role:"button",tabIndex:0,children:(0,n.jsxs)("span",{className:o()("relative flex items-center","header_brandingCell__mobile"),children:[(0,n.jsx)("span",{className:"flex items-center",children:i&&!e?(0,n.jsx)(O.Ex,{dot:!0,
1children:(0,n.jsx)(V.Ay,{})}):(0,n.jsx)(V.Ay,{})}),t&&(0,n.jsx)("div",{className:"absolute left-[48px] top-[13px] h-[6px] w-[6px] rounded-full bg-red-5"})]})}),(0,n.jsx)("div",{className:"hidden md:block pl-16 p-0 md:mt-[-4px] CI_Header_Logo_desktop",children:(0,n.jsx)(H(),{href:h||q.qm.getUrl(),className:o()("relative flex h-full items-center","header_brandingCell__desktop"),prefetch:!1,children:(0,n.jsxs)("span",{className:"flex items-center",children:[(0,n.jsx)(V.Ay,{className:"lg:hidden"}),(0,n.jsx)(V.Dd,{className:"hidden lg:block"})]})})}),(0,n.jsx)("div",{className:o()("md:ml-[12px] lg:ml-[22px] flex min-w-0 flex-1 items-center"),children:s})]})})};var K=i(38697),G=i(90461);function Y({url:e,label:t,index:i,onClick:r}){return(0,n.jsx)("div",{"data-cy":`header_mobileMenu_${i}`,onClick:r||void 0,tabIndex:0,role:"button",children:e?(0,n.jsx)(x.TextLink,{href:e,noUnderline:!0,children:(0,n.jsx)("div",{className:"w-full py-8 px-[16px] block cursor-pointer",children:(0,n.jsxs)(x.Text,{children:[" ",t]})})}):(0,n.jsx)("div",{className:"w-full py-8 px-[16px] block cursor-pointer",children:(0,n.jsxs)(x.Text,{children:[" ",t]})})})}function Z({links:e,hasLimitReached:t}){let{handleLinkClick:i}=(0,d.useHeaderContext)();return(0,n.jsx)(n.Fragment,{children:e.map(e=>{let{index:r,href:s,label:a,notificationNumber:l,pill:c}=e,d=t&&r===q.YK.index;return(0,n.jsx)("div",{className:o()("py-8 px-[16px]",`header_mobileMenu_${r}`,{"text-primary":r===q.qm.index}),children:(0,n.jsx)(x.Text,{color:"inherit",children:(0,n.jsx)(x.TextLink,{href:s,onClick:()=>i(r),noUnderline:!0,children:(0,n.jsxs)(x.Stack,{orientation:"horizontal",spacing:"$75",alignment:"center",children:[(0,n.jsx)(x.Text,{size:"regular",children:a}),d&&(0,n.jsx)("div",{className:"inline-flex pl-8",children:(0,n.jsx)(g.Info,{size:"medium",color:"red7"})}),l&&(0,n.jsx)(x.Badge,{count:l,overflowCount:99,data:{cy:`header_mainNavigation_${r}_badge`}}),!l&&c&&(0,n.jsx)("span",{className:"inline-block bg-indigo-8 group-hover:bg-indigo-9 text-[8px] mt-[-8px] group-hover:mt-[-10px] ml-[2px] py-[2px] px-[6px] rounded-[8px] text-white-0 shadow-300 group-hover:shadow-100 transition-all duration-200",children:c})]})})})},s)})})}var J=i(60371),Q=i(60037);let X={default:{borderColor:"border-gray-1",borderHoverColor:"hover:border-primary",ringColor:"hover:ring-primary",backgroundColor:"bg-white"},promotional:{borderColor:"border-indigo-3",borderHoverColor:"hover:border-indigo-5",ringColor:"hover:ring-indigo-5",backgroundColor:"bg-indigo-1"},warning:{borderColor:"border-orange-4",borderHoverColor:"hover-border-orange-5",ringColor:"hover:ring-orange-5",backgroundColor:"bg-orange-0"},error:{borderColor:"border-red-4",borderHoverColor:"hover:border-red-5",ringColor:"hover:ring-red-5",backgroundColor:"bg-red-0"}},ee=({id:e,href:t,onClick:i,children:r})=>t?(0,n.jsx)(x.TextLink,{id:e,href:t,noUnderline:!0,onClick:i,children:r}):(0,n.jsx)("div",{role:"button",tabIndex:0,onClick:i,className:"w-full",children:r}),et=({type:e,children:t})=>(0,n.jsx)("div",{className:o()("cursor-pointer w-full block grid",X[e].backgroundColor),children:(0,n.jsx)(x.Inset,{horizontal:"$75",vertical:"$200",children:t})}),ei=({children:e,type:t})=>(0,n.jsx)("div",{className:o()("w-min-[200px] h-[44px] cursor-pointer h-full w-full rounded-8 border-1 border-solid overflow-hidden hover:ring-2 transition-all ease-in-out duration-150",X[t].borderColor,X[t].borderHoverColor,X[t].backgroundColor,X[t].ringColor),children:e}),er=({fullWidth:e,children:t,type:i})=>e?(0,n.jsx)(et,{type:i,children:t}):(0,n.jsx)(ei,{type:i,children:t}),en=({href:e,onClick:t,centerView:i,leftView:r,rightView:s,type:a,fullWidth:l})=>(0,n.jsx)("div",{className:o()("bg-white-0 z-[10] flex w-full",{"rounded-0":l,"rounded-8":!l}),children:(0,n.jsx)(ee,{href:e,onClick:t,id:"header-subscription-badge",children:(0,n.jsx)(er,{type:a,fullWidth:l,children:(0,n.jsxs)(x.Inset,{vertical:"$50",horizontal:"$100",...r?{left:"$200"}:{},children:[(0,n.jsxs)(x.Columns,{spacing:"$100",alignV:"center",children:[(0,n.jsx)(x.Column,{children:i}),s&&(0,n.jsx)(x.Column,{width:"content",children:(0,n.jsx)(x.Inset,{spacing:"$50",children:s})})]}),r&&(0,n.jsx)(x.Bleed,{bottom:"$75",horizontal:l?"$0":"$400",children:r})]})})})}),es=({title:e,bulletPoints:t})=>(0,n.jsxs)(x.Stack,{spacing:"$75",children:[(0,n.jsx)(x.Heading,{level:"5",children:e}),t.length>0&&(0,n.jsx)(x.BulletList,{size:"small",children:t.map(e=>(0,n.jsx)(x.BulletItem,{children:(0,n.jsx)(x.Text,{size:"small",children:e})},e))})]}),ea=({showLimits:e=!0,limit:t,count:i,children:r,onClose:s,open:a=!1})=>{let l=(0,N.c)("header.subscription_badge.base.modal");return(0,n.jsx)(x.ModalDialog,{title:"",open:a,onClose:s,children:(0,n.jsx)(x.Bleed,{horizontal:["$0","$300"],children:(0,n.jsxs)(x.Stack,{spacing:"$400",children:[(0,n.jsx)(x.Bleed,{horizontal:["$300","$400"],top:"$600",children:r}),t>0&&(0,n.jsxs)(x.Stack,{spacing:"$300",children:[e&&(0,n.jsx)(x.Stack,{spacing:"$75",children:(0,n.jsx)(x.Text,{size:"small",children:l("text",{limit:t,count:i})})}),(0,n.jsx)(es,{title:l("title"),bulletPoints:[l("counted_as_interaction.1"),l("counted_as_interaction.2"),l("counted_as_interaction.3")]}),(0,n.jsx)(es,{title:l("not_counted_as_interaction.title"),bulletPoints:[l("not_counted_as_interaction.1"),l("not_counted_as_interaction.2"),l("not_counted_as_interaction.3")]})]})]})})})}
1,el=({limit:e,count:t,open:i,onClose:r,renewalDate:s,monthlyRenewalDate:a,selectedOfferPeriodUnit:l,planName:o})=>{let c=(0,N.c)("header.subscription_badge.active"),d=(0,N.k)();return(0,n.jsx)(ea,{open:i,onClose:r,limit:e,count:t,children:(0,n.jsx)("div",{className:"bg-teal-0 text-teal-8 border-0 border-b-1 border-solid border-teal-1",children:(0,n.jsx)(x.Inset,{horizontal:["$300","$400"],vertical:"$300",children:(0,n.jsxs)(x.Stack,{spacing:"$50",children:[(0,n.jsx)(x.Heading,{color:"inherit",level:"5",children:(0,n.jsx)("span",{className:"text-teal-9 p-[0px] m-[0px]",children:c("modal.title",{planName:o})})}),s&&(0,n.jsx)(n.Fragment,{children:a&&"year"===l?(0,n.jsx)(x.Text,{size:"small",children:c("modal.subtitle_yearly",{month_renew_date:d.dateTime(new Date(a),{month:"long"}),year_renew_date:d.dateTime(new Date(s),{year:"numeric"})})}):(0,n.jsx)(x.Text,{size:"small",children:c("modal.subtitle",{date:d.dateTime(new Date(s),{dateStyle:"medium"})})})})]})})})})},eo=e=>{let t=(0,p.tl)();return{trackBadgeShow:(i,r)=>{t(m.tCB,{badge_type:e,used:i,limit:r})},trackBadgeClick:(i,r)=>{t(m.CIS,{badge_type:e,used:i,limit:r})}}},ec=({count:e,limit:t,unlimited:i,renewalDate:r,monthlyRenewalDate:a,selectedOfferPeriodUnit:l,planName:o,fullWidth:c})=>{let d=(0,N.c)("header.subscription_badge.limits_reached"),[u,h]=(0,s.useState)(!1),{trackBadgeShow:m,trackBadgeClick:p}=eo("subscription_active");(0,s.useEffect)(()=>{i||m(e,t)},[m,e,t,i]);let b=i||!t||Number.isNaN(e/t)?0:Math.min(100,100*e/t);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(el,{open:u,onClose:()=>{h(!1)},renewalDate:r,monthlyRenewalDate:a,selectedOfferPeriodUnit:l,planName:o,limit:t,count:e}),(0,n.jsx)(en,{type:"default",onClick:()=>{p(e,t),h(!0)},fullWidth:c,centerView:(0,n.jsxs)("div",{className:"flex items-center gap-[10px]",children:[i&&(0,n.jsx)("span",{className:"inline-flex items-center justify-center rounded-full flex-shrink-0",style:{width:28,height:28,backgroundColor:"#F3F0FF",color:"#6D4AFF",fontSize:18,lineHeight:1,fontFamily:"Axiforma-Bold, sans-serif"},"aria-hidden":"true",children:"â"}),(0,n.jsxs)(x.Stack,{spacing:"$0",children:[(0,n.jsx)(x.Text,{size:c?"small":"xsmall",color:"dark",truncateAfter:1,children:d(i?"title_unlimited":"title")}),(0,n.jsx)(x.Bleed,{top:"$75",children:(0,n.jsx)(x.Text,{size:c?"regular":"xsmall",weight:"bold",truncateAfter:1,color:i?"positive":void 0,children:i?d("subtitle_unlimited"):d("subtitle",{limit:t,count:e})})})]})]}),leftView:i?null:(0,n.jsx)(x.Progress,{value:b}),rightView:i?void 0:(0,n.jsx)(g.Tip,{color:"gray5",size:"medium"})})]})},ed=({count:e,limit:t,open:i,planName:r,onClose:s,renewalDate:a})=>{let l=(0,N.c)("header.subscription_badge"),o=(0,N.k)();return(0,n.jsx)(ea,{count:e,limit:t,open:i,onClose:s,children:(0,n.jsx)("div",{className:"bg-orange-0 text-orange-8 border-0 border-b-1 border-solid border-orange-1",children:(0,n.jsx)(x.Inset,{horizontal:["$300","$400"],vertical:"$300",children:(0,n.jsxs)(x.Stack,{dividers:!0,spacing:"$300",children:[(0,n.jsxs)(x.Stack,{spacing:"$50",children:[(0,n.jsx)(x.Heading,{color:"inherit",level:"5",children:(0,n.jsx)("span",{className:"text-orange-9 p-[0px] m-[0px]",children:l("active.modal.title",{planName:r})})}),(0,n.jsx)(x.Text,{size:"small",children:l("active.modal.subtitle",{date:a?o.dateTime(new Date(a),{dateStyle:"medium"}):""})})]}),(0,n.jsxs)(x.Columns,{spacing:"$100",children:[(0,n.jsx)(x.Column,{width:"content",children:(0,n.jsx)(g.Warning,{color:"orange9",size:"medium"})}),(0,n.jsx)(x.Column,{children:(0,n.jsxs)(x.Stack,{spacing:"$200",children:[(0,n.jsx)(x.Text,{size:"small",children:l("limits_reached.modal.text",{limit:t,count:e})}),(0,n.jsx)(x.Cluster,{children:(0,n.jsx)(x.ButtonLink,{variant:"secondary",size:"small",href:q.Xo.getUrl(),children:l("limits_reached.modal.button",{limit:t,count:e})})})]})})]})]})})})})},eu=({count:e,limit:t,planName:i,renewalDate:r,fullWidth:a})=>{let l=(0,N.c)("header.subscription_badge.limits_reached"),[o,c]=(0,s.useState)(!1),{trackBadgeShow:d,trackBadgeClick:u}=eo("subscription_active_limits_reached");return(0,s.useEffect)(()=>{d(e,t)},[d,e,t]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ed,{count:e,limit:t,renewalDate:r,planName:i,open:o,onClose:()=>{c(!1)}}),(0,n.jsx)(en,{type:"warning",onClick:()=>{u(e,t),c(!0)},fullWidth:a,centerView:(0,n.jsxs)(x.Stack,{spacing:"$0",children:[(0,n.jsx)(x.Text,{size:a?"regular":"xsmall",color:"dark",truncateAfter:1,children:l("title")}),(0,n.jsx)(x.Bleed,{top:"$75",children:(0,n.jsx)(x.Text,{size:a?"small":"xsmall",weight:"bold",truncateAfter:1,children:l("subtitle",{limit:t,count:e})})})]}
1),leftView:(0,n.jsx)(x.Progress,{value:100,color:"rating"}),rightView:(0,n.jsx)(g.Warning,{color:"orange5",size:"medium"})})]})};var eh=i(60794),ex=i(20433),em=i(38190),ep=i(74818),eg=i(57765),eb=i(12348);let ej=({limit:e,count:t,subscriptionId:i,subscriptionPricingId:r,subscriptionPlanType:a,subscriptionMode:l,planName:o,open:c,onClose:d})=>{var u;let h,g=(0,N.c)("header.subscription_badge.issue.modal"),[b,j]=(0,s.useState)(!1),f=(0,em.A)(),_=(0,ep.m)(),v=(u="subscription_issue",h=(0,p.tl)(),(0,s.useCallback)(e=>{h(m.ChX,{badge_type:u,...e})},[u,h])),w="PaymentIssue"===l?"collectDuePayments":"reactivate",y=async()=>{v({reactivation_type:w}),j(!0);let e=await (0,eg.O2)(w,_,{subscriptionId:i});"collectDuePayments"===w&&e?window.open(e).focus():e&&f.openCheckout({planId:r,planType:a,hostedPageUrl:e,onClose:e=>{"success"===e?(d(),window.location.reload()):j(!1)},onError:e=>{(0,eb.A)(e,["/","/index.js","handlePlanClick"])}})};return(0,n.jsx)(ea,{open:c&&!b,onClose:d,limit:e,count:t,children:(0,n.jsx)("div",{className:"bg-red-0 text-red-9 border-0 border-b-1 border-solid border-red-1",children:(0,n.jsx)(x.Inset,{horizontal:["$300","$400"],vertical:"$300",children:(0,n.jsxs)(x.Stack,{spacing:"$200",children:[(0,n.jsxs)(x.Stack,{spacing:"$50",children:[(0,n.jsx)(x.Heading,{color:"inherit",level:"5",children:(0,n.jsx)("span",{className:"text-red-9 p-[0px] m-[0px]",children:g("title",{planName:o})})}),(0,n.jsx)(x.Text,{size:"small",color:"inherit",children:g("subtitle")})]}),(0,n.jsx)(x.Cluster,{children:(0,n.jsx)(x.Button,{variant:"secondary",size:"small",onClick:y,children:g("button")})})]})})})})},ef=({count:e,limit:t,subscriptionId:i,subscriptionPricingId:r,subscriptionPlanType:a,subscriptionMode:l,planName:o,fullWidth:c})=>{(0,ex.A)();let d=(0,N.c)("header.subscription_badge.issue"),[u,h]=(0,s.useState)(!1),{trackBadgeShow:m,trackBadgeClick:p}=eo("subscription_issue");return(0,s.useEffect)(()=>{m(e,t)},[m,e,t]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eh.A,{}),(0,n.jsx)(ej,{count:e,limit:t,subscriptionId:i,subscriptionPricingId:r,subscriptionPlanType:a,subscriptionMode:l,planName:o,open:u,onClose:()=>{h(!1)}}),(0,n.jsx)(en,{type:"error",onClick:()=>{p(e,t),h(!0)},fullWidth:c,centerView:(0,n.jsxs)(x.Stack,{spacing:"$0",children:[(0,n.jsx)("span",{className:"text-red-9",children:(0,n.jsx)(x.Text,{size:c?"regular":"xsmall",truncateAfter:1,color:"inherit",weight:"bold",children:d("title")})}),(0,n.jsx)("span",{className:"text-red-7",children:(0,n.jsx)(x.Text,{size:c?"small":"xsmall",truncateAfter:1,color:"inherit",children:d("subtitle")})})]}),rightView:(0,n.jsx)(g.Warning,{color:"red5",size:"medium"})})]})};var e_=i(71254),ev="/index.js";
1let ew=({limit:e,count:t,open:i,onClose:r,renewalDate:a,offers:l})=>{let o=(0,N.c)("header.subscription_badge.free_interactions_limits_reached.modal"),c=(0,N.c)("common.ui_actions"),d=(0,N.k)(),u=(0,ep.m)(),h=(0,em.A)(),[m,p]=(0,s.useState)(!1),[b,j]=(0,s.useState)(!1),f=l?.[0],_=f?.subscriptionPricingList?.[0],v=async()=>{p(!0);try{let e=await (0,eg.O2)("checkoutExisting",u,{subscriptionPricingId:_.id});p(!1),j(!0),h.openCheckout({hostedPageUrl:e,planId:f.id,planType:f.type,periodUnit:_.periodUnit,onClose:e=>{"success"===e?(r(),window.location.reload()):(j(!1),p(!1))},onError:e=>{(0,eb.A)(e,["/",ev,"handlePlanClick"])}})}catch(e){x.sonner.error(e.message),(0,eb.A)(e,["/",ev,"handlePlanClick"])}finally{p(!1)}};return(0,n.jsx)(ea,{open:i&&!b,onClose:r,limit:e,count:t,showLimits:!1,children:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:!l||0===l.length,children:(0,n.jsx)(x.Inset,{top:"$500",children:(0,n.jsx)(x.Stack,{alignment:"center",children:(0,n.jsx)(x.Loader,{size:"large",color:"primary"})})})}),(0,n.jsx)(x.Case,{when:l.length>0,children:(0,n.jsx)("div",{className:"bg-orange-0 text-orange-8 border-0 border-b-1 border-solid border-orange-1",children:(0,n.jsx)(x.Inset,{horizontal:["$300","$400"],vertical:"$300",children:(0,n.jsxs)(x.Stack,{spacing:"$300",dividers:!0,children:[(0,n.jsxs)(x.Stack,{spacing:"$50",children:[(0,n.jsx)(x.Heading,{color:"inherit",level:"5",children:(0,n.jsx)("span",{className:"text-orange-9 p-[0px] m-[0px]",children:o("title")})}),(0,n.jsx)(x.Text,{size:"small",children:o("quantity",{limit:e})}),a&&(0,n.jsx)(x.Text,{size:"small",children:o("renewing_date",{date:a?d.dateTime(new Date(a),{dateStyle:"medium"}):""})})]}),(0,n.jsxs)(x.Columns,{spacing:"$100",children:[(0,n.jsx)(x.Column,{width:"content",children:(0,n.jsx)(g.Warning,{color:"orange9",size:"medium"})}),(0,n.jsx)(x.Column,{children:(0,n.jsxs)(x.Stack,{spacing:"$200",children:[(0,n.jsx)(x.Text,{size:"small",children:o.rich("text",{limit:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})}),(0,n.jsxs)(x.Cluster,{alignV:"center",spacing:"$300",collapseBelow:"tablet",children:[(0,n.jsx)(x.Button,{variant:"secondary",size:"small",onClick:v,working:m,children:o("button")}),(0,n.jsx)(x.Text,{weight:"bold",size:"small",children:(0,n.jsx)(x.TextLink,{href:q.Xo.getUrl(),children:c("learn_more")})})]})]})})]})]})})})})]})})},ey=({count:e,limit:t,renewalDate:i,fullWidth:r})=>{let a=(0,N.c)("header.subscription_badge.limits_reached"),{offers:l}=(0,e_.A)(),[o,c]=(0,s.useState)(!1),{trackBadgeShow:d,trackBadgeClick:u}=eo("free_interactions_active");return(0,s.useEffect)(()=>{d(e,t)},[d,e,t]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ew,{open:o,onClose:()=>{c(!1)},renewalDate:i,limit:t,count:e,offers:l}),(0,n.jsx)(en,{type:"warning",onClick:()=>{u(e,t),c(!0)},fullWidth:r,centerView:(0,n.jsxs)(x.Stack,{spacing:"$0",children:[(0,n.jsx)(x.Text,{size:"xsmall",color:"dark",truncateAfter:1,children:a("title")}),(0,n.jsx)(x.Bleed,{top:"$75",children:(0,n.jsx)(x.Text,{size:r?"small":"xsmall",weight:"bold",truncateAfter:1,children:a("subtitle",{limit:t,count:e})})})]}),leftView:(0,n.jsx)(x.Progress,{value:100,color:"rating"}),rightView:(0,n.jsx)(x.Icons.Warning,{color:"orange5",size:"medium"})})]})},eC=()=>{let e=(0,N.c)("header.subscription_badge.get_full_advantage"),t=(0,N.c)("common.ui_actions");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Heading,{level:"4",children:e("title")}),(0,n.jsx)(x.Text,{size:"small",children:e("text")}),(0,n.jsx)("div",{children:(0,n.jsx)(x.ButtonLink,{fullWidth:!1,size:"small",href:q.Xo.getUrl(),children:t("learn_more")})})]})}
1,ek=({limit:e,count:t,open:i,onClose:r,renewalDate:s,offers:a})=>{let l=(0,N.k)(),o=(0,N.c)("header.subscription_badge.free_interactions_active.modal");return(0,n.jsx)(ea,{open:i,onClose:r,limit:e,count:t,showLimits:!1,children:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:!a||0===a.length,children:(0,n.jsx)(x.Inset,{top:"$500",children:(0,n.jsx)(x.Stack,{alignment:"center",children:(0,n.jsx)(x.Loader,{size:"large",color:"primary"})})})}),(0,n.jsxs)(x.Case,{when:a.length>0,children:[(0,n.jsx)("div",{className:"bg-gray-0 text-gray-8 border-0 border-b-1 border-solid border-gray-1",children:(0,n.jsx)(x.Inset,{horizontal:["$300","$400"],vertical:"$300",children:(0,n.jsxs)(x.Stack,{spacing:"$50",children:[(0,n.jsx)(x.Heading,{color:"inherit",level:"5",children:(0,n.jsx)("span",{className:"text-gray-9 p-[0px] m-[0px]",children:o("title")})}),(0,n.jsx)(x.Text,{size:"small",children:o("quantity",{limit:e})}),s&&(0,n.jsx)(x.Text,{size:"small",children:o("renewing_date",{date:s?l.dateTime(new Date(s),{dateStyle:"medium"}):""})})]})})}),(0,n.jsx)(x.Divider,{}),(0,n.jsx)(x.Inset,{horizontal:["$300","$400"],vertical:"$300",children:(0,n.jsx)(x.Stack,{spacing:"$200",children:(0,n.jsx)(eC,{})})}),(0,n.jsx)(x.Inset,{horizontal:"$300",children:(0,n.jsx)(x.Divider,{})})]})]})})},eA=({count:e,limit:t,renewalDate:i,fullWidth:r})=>{let a=(0,N.c)("header.subscription_badge.limits_reached"),{offers:l}=(0,e_.A)(),[o,c]=(0,s.useState)(!1),{trackBadgeShow:d,trackBadgeClick:u}=eo("free_interactions_active");return(0,s.useEffect)(()=>{d(e,t)},[d,e,t]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ek,{open:o,onClose:()=>{c(!1)},renewalDate:i,limit:t,count:e,offers:l}),(0,n.jsx)(en,{type:"default",onClick:()=>{u(e,t),c(!0)},fullWidth:r,centerView:(0,n.jsxs)(x.Stack,{spacing:"$0",children:[(0,n.jsx)(x.Text,{size:r?"small":"xsmall",color:"dark",truncateAfter:1,children:a("title")}),(0,n.jsx)(x.Bleed,{top:"$75",children:(0,n.jsx)(x.Text,{size:r?"regular":"xsmall",weight:"bold",truncateAfter:1,children:a("subtitle",{limit:t,count:e})})})]}),leftView:(0,n.jsx)(x.Progress,{value:100*e/t}),rightView:(0,n.jsx)(g.Tip,{color:"gray5",size:"medium"})})]})};var eS=i(31541),eT=i(13044),eN=i(77862),eP=i(26165),ez=i(80179),eM=i(40181),eE=i(48869);let e$={fields:{wallet:"balance,autorecharge_enabled,autorecharge_threshold,autorecharge_target,autorecharge_bonus_amount,autorecharge_bonus_percent,autorecharge_val
1idation_status"},meta:{wallet:"autorecharge_options"}},eI=(e=!0)=>(0,eM.useQuery)({queryKey:[{url:"/wallet",params:{fields:{wallet:"id"},meta:{wallet:"hosted_page_payment_method"}}}],select:({data:e})=>e.meta.hostedPagePaymentMethod,enabled:e});function eR({title:e,subtitle:t,color:i="default"}){return(0,n.jsx)(x.Bleed,{space:["$300","$600"],bottom:"$0",top:["$600","$600"],children:(0,n.jsx)("div",{className:o()("bg-gray-0 border-0 border-y-1 border-solid py-16",{"bg-gray-0 border-gray-1":"default"===i,"text-green-9":"success"===i,"bg-indigo-1 border-indigo-7 mt-1":"incentive"===i,"bg-red-1 border-red-2 mt-1":"error"===i}),children:(0,n.jsx)(x.Inset,{horizontal:["$300","$600"],children:(0,n.jsxs)(x.Stack,{spacing:"$50",children:[(0,n.jsx)(x.Text,{weight:"bold",size:"regular",children:e}),(0,n.jsx)(x.Text,{size:"small",children:t})]})})})})}function eU(){let e=(0,N.c)("header.wallet_badge.modal_errors.pending"),t=e=>(0,n.jsx)(x.Text,{weight:"bold",children:e});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eR,{color:"error",title:e("title"),subtitle:e("subtitle")}),(0,n.jsxs)(x.Stack,{spacing:"$200",children:[(0,n.jsx)(x.Text,{size:"small",children:e.rich("text_1",{bold:t})}),(0,n.jsx)(x.Text,{size:"small",children:e.rich("text_2",{bold:t})})]}),(0,n.jsx)(x.Divider,{}),(0,n.jsxs)(x.Stack,{spacing:"$200",children:[(0,n.jsx)(x.Heading,{level:"5",children:e("benefits_title")}),(0,n.jsxs)(x.BulletList,{icon:g.Close,color:"negative",size:"small",children:[(0,n.jsx)(x.BulletItem,{children:(0,n.jsx)(x.Text,{size:"small",children:e.rich("benefits.item_1",{bold:t})})}),(0,n.jsx)(x.BulletItem,{children:(0,n.jsx)(x.Text,{size:"small",children:e.rich("benefits.item_2",{bold:t})})})]})]})]})}function eL(){let e=(0,N.c)("header.wallet_badge.modal_errors.pending"),t=e=>(0,n.jsx)(x.Text,{weight:"bold",children:e});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eR,{color:"error",title:e("title"),subtitle:e("subtitle")}),(0,n.jsxs)(x.Stack,{spacing:"$200",children:[(0,n.jsx)(x.Text,{size:"small",children:e.rich("text_1",{bold:t})}),(0,n.jsx)(x.Text,{size:"small",children:e.rich("text_2",{bold:t})})]}),(0,n.jsx)(x.Divider,{}),(0,n.jsxs)(x.Stack,{spacing:"$200",children:[(0,n.jsx)(x.Heading,{level:"5",children:e("benefits_title")}),(0,n.jsxs)(x.BulletList,{icon:g.Close,color:"negative",size:"small",children:[(0,n.jsx)(x.BulletItem,{children:(0,n.jsx)(x.Text,{size:"small",children:e.rich("benefits.item_1",{bold:t})})}),(0,n.jsx)(x.BulletItem,{children:(0,n.jsx)(x.Text,{size:"small",children:e.rich("benefits.item_2",{bold:t})})})]})]})]})}function eD(){let e=(0,N.c)("header.wallet_badge.modal_errors.success");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.Heading,{level:"3",children:e("title")}),(0,n.jsx)(x.Text,{children:e("text")})]})}let eB=(e=!0)=>(0,eM.useQuery)({queryKey:[{url:"/wallet",params:{fields:{wallet:"id"},meta:{wallet:"hosted_page_initial_payment"}}}],select:({data:e})=>e.meta.hostedPageInitialPayment,enabled:e});function eF({open:e,onClose:t,wallet:i}
1){let r=(0,a.useRouter)(),[l,o]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),[u,h]=(0,s.useState)(!1),m=(0,em.A)(),p=(0,N.c)("common.ui_actions"),g=(0,N.c)("header.wallet_badge.modal_errors"),{data:b}=eI(e),{data:j}=eB(e),{data:f=i,refetch:_}=((e=!0)=>(0,eM.useQuery)({queryKey:[{url:"/wallet",params:e$}],select:({data:e})=>e,enabled:e}))(e),v=async()=>{b&&(o(!0),b&&m&&(h&&(d(!0),h(!0)),m.openCheckout({hostedPageUrl:b,onClose:async()=>{h&&(h(!1),r.refresh(),o(!1))}})))},w=async()=>{j&&(o(!0),j&&m&&(h&&(d(!0),h(!0)),m.openCheckout({hostedPageUrl:j,onClose:async()=>{h&&(h(!1),o(!1))}})))};return(0,s.useEffect)(()=>{if(c&&"pending_payment_method"===f.autorechargeValidationStatus){let e=setInterval(async()=>{let{data:t}=await _();t&&"valid"===t.autorechargeValidationStatus&&(m.closeAll(),h(!1),o(!1),clearInterval(e))},3e3);return()=>clearInterval(e)}return()=>{}},[_,c]),(0,s.useEffect)(()=>{if(e){let e=setInterval(async()=>{await _()},3e3);return()=>{clearInterval(e)}}return()=>{}},[e]),(0,n.jsx)(x.ModalDialog,{open:e&&!u,onClose:()=>t(f),title:"",footerContent:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:"pending_initial_payment"===f.autorechargeValidationStatus,children:(0,n.jsx)(x.Stack,{spacing:"$75",alignment:"center",children:(0,n.jsx)(x.Button,{fullWidth:!0,onClick:w,working:l||u,disabled:!j,children:g("cta.reactivate")})})}),(0,n.jsx)(x.Case,{when:"pending_payment_method"===f.autorechargeValidationStatus,children:(0,n.jsx)(x.Stack,{spacing:"$75",alignment:"center",children:(0,n.jsx)(x.Button,{fullWidth:!0,onClick:v,working:l||u,disabled:!b,children:g("cta.add_payment_method")})})}),(0,n.jsx)(x.Else,{children:(0,n.jsx)(x.Stack,{spacing:"$75",alignment:"center",children:(0,n.jsx)(x.Button,{fullWidth:!0,onClick:()=>t(f),children:p("close")})})})]}),children:(0,n.jsx)(x.Stack,{spacing:"$400",children:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:"pending_initial_payment"===f.autorechargeValidationStatus,children:(0,n.jsx)(eU,{})}),(0,n.jsx)(x.Case,{when:"pending_payment_method"===f.autorechargeValidationStatus,children:(0,n.jsx)(eL,{})}),(0,n.jsx)(x.Else,{children:(0,n.jsx)(eD,{})})]})})})}var eH=i(6259),eV=i(80297);function eO({wallet:e,open:t,onClose:i}){let{currency:r}=(0,eN.L)(),s=(0,N.k)(),a=(0,eS.rx)(r)?1:100,l=2*!(0,eS.rx)(r),o=(0,N.c)("header.wallet_badge.modal_enabled"),c=e=>(0,n.jsx)(x.Text,{weight:"bold",children:e}),d=e=>(0,eT.y)({value:e,currency:r,formatter:s,maximumFractionDigits:l,minimumFractionDigits:l}),u=d((e.autorechargeThreshold||0)/a),h=d((e.autorechargeTarget||0)/a);return(0,n.jsxs)(x.ModalDialog,{open:t,onClose:i,title:o("title"),children:[(0,n.jsx)(x.Text,{size:"small",children:o.rich("description",{brTag:eV.v})}),(0,n.jsx)(x.Card,{backgroundColor:"teal",borderColor:"teal",eyebrow:o("advantages.title"),children:(0,n.jsxs)(x.BulletList,{icon:eH.J,color:"positive",children:[(0,n.jsx)(x.BulletItem,{children:o.rich("advantages.credits",{bold:c,amount:u})}),(0,n.jsx)(x.BulletItem,{children:o.rich("advantages.visibility",{bold:c})})]})}),(0,n.jsx)(x.Card,{children:(0,n.jsx)(x.Text,{align:"center",size:"small",children:o.rich("summary",{bold:c,target:h,threshold:u})})})]})}function eq({wallet:e,open:t,onClose:i}){let r,{currency:a}=(0,eN.L)(),l=(0,N.k)(),o=(0,em.A)(),[c,d]=(0,s.useState)(!1),[u,h]=(0,s.useState)(!1),[m,p]=(0,s.useState)(e),g=(0,eS.rx)(a)?1:100,b=2*!(0,eS.rx)(a),j=m.meta.autorechargeOptions[0],f=(0,N.c)("header.wallet_badge.modal_disabled"),_=e=>(0,n.jsx)(x.Text,{weight:"bold",children:e}),v=e=>(0,eT.y)({value:e,currency:a,formatter:l,maximumFractionDigits:b,minimumFractionDigits:b}),w=(r=(({onSuccess:e}={})=>{let t=(0,C.A)(),i=(0,y.useMutation)({mutationFn:e=>t.patch("/wallet",{data:{id:e.id,type:"wallet",attributes:(0,eE.decamelizeKeys)({...e,autorechargeEnabled:!0})}},{params:e$}),onSuccess:({data:t})=>e?e(t.data):{}});return async e=>{let{data:t}=await i.mutateAsync(e);return t.data}})(),async()=>await r({id:m.id,autorechargeThreshold:j.threshold,autorechargeTarget:j.target,autorechargeBonusAmount:j.bonusAmount,autorechargeBonusPercent:j.bonusPercent})),{refetch:k}=eI("pending_payment_method"===m.autorechargeValidationStatus&&t),{refetch:A}=eB("pending_initial_payment"===m.autorechargeValidationStatus&&t),S=v((j.threshold||0)/g),T=v((j.target||0)/g),P=v((j.bonusAmount||(j.bonusPercent||0)*(j.target||0)/100||0)/g),z=async()=>{h(!0);let e=await w();if("valid"===e.autorechargeValidationStatus){h(!1),i(e);return}if("pending_initial_payment"===e.autorechargeValidationStatus){let{data:e}=await A();d(!0),o.openCheckout({hostedPageUrl:e,onClose:async()=>{let e=await w();p(e),"valid"===e.autorechargeValidationStatus&&i(e),h(!1),d(!1)}})}else if("pending_payment_method"===e.autorechargeValidationStatus){let{data:e}=await k();d(!0),o.openCheckout({hostedPageUrl:e,onClose:async()=>{let e=await w();p(e),"valid"===e.autorechargeValidationStatus&&i(e),h(!1),d(!1)}})}};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(x.ModalDialog,{open:t&&!c,onClose:i,title:"",footerContent:(0,n.jsxs)(x.Stack,{spacing:"$75",alignment:"center",children:[(0,n.jsx)(x.Button,{fullWidth:!0,onClick:z,working:u,children:f("cta")}),(0,n.jsx)(x.Text,{size:"xsmall",color:"subdued",children:f("vat_notice")})]}),children:(0,n.jsxs)(x.Stack,{spacing:"$400",children:[(0,n.jsx)(eR,{title:f("title"),subtitle:f("subtitle"),color:"incentive"}),(0,n.jsxs)(x.Stack,{spacing:"$100",children:[(0,n.jsx)(x.Text,{size:"small",children:f("intro")}),(0,n.jsxs)(x.BulletList,{size:"small",children:[(0,n.jsx)(x.BulletItem,{size:"large",children:(0,n.jsx)(x.Text,{size:"small",children:f.rich("bullets.clarity",{bold:_})})}),(0,n.jsx)(x.BulletItem,{size:"large",children:(0,n.jsx)(x.Text,{size:"small",children:f.rich("bullets.advantages",{bold:_})})})]})]}),(0,n.jsx)(x.Card,{backgroundColor:"teal",borderColor:"teal",eyebrow:f("why_title"),children:(0,n.jsxs)(x.BulletList,{icon:eH.J,color:"positive",size:"small",children:[(0,n.jsx)(x.BulletItem,{size:"large",children:(0,n.jsx)(x.Text,{size:"small",children:f.rich("why_bullets.visibility",{bold:_})})}),(0,n.jsx)(x.BulletItem,{size:"large",children:(0,n.jsx)(x.Text,{size:"small",children:f.rich("why_bullets.credits",{bold:_,amount:P})})})]})}),(0,n.jsx)(x.Card,{children:(0,n.jsx)(x.Text,{align:"center",size:"small",children:f.rich("summary",{bold:_,target:T,threshold:S})})})]})})})}let eW={enabled:{borderColor:"border-primary",borderHoverColor:"hover:border-primary",ringColor:"hover:ring-primary",backgroundColor:"bg-white",icon:(0,n.jsx)("div",{className:"relative top-[-2px]",children:(0,n.jsx)(eP.R,{color:"gray5"})})},disabled:{borderColor:"border-indigo-7 text-indigo-7",borderHoverColor:"hover:border-indigo-7",ringColor:"hover:ring-indigo-7",backgroundColor:"bg-indigo-1",icon:(0,n.jsx)(n.Fragment,{children:"\uD83C\uDF81"})},errors:{borderColor:"border-red-5",borderHoverColor:"hover:border-red-5",ringColor:"hover:ring-red-6",backgroundColor:"bg-red-0",icon:(0,n.jsx)(ez.N,{color:"red5",size:"medium"})}};function eK({wallet:e,variant:t="desktop",onBeforeOpen:i}
1){let[r,a]=(0,s.useState)(e),[l,c]=(0,s.useState)(!1),{currency:d}=(0,eN.L)(),u=(0,N.c)("header.wallet_badge"),h=r.autorechargeEnabled?"valid"===r.autorechargeValidationStatus?"enabled":"errors":"disabled",m=r.balance/((0,eS.rx)(d)?1:100),p=2*!(0,eS.rx)(d),g={enabled:u("status.enabled"),disabled:u("status.disabled"),errors:u("status.suspended")}[h],b=(0,n.jsxs)(n.Fragment,{children:["errors"===h&&(0,n.jsx)(eF,{open:l,onClose:e=>{a(e),c(!1)},wallet:r}),"enabled"===h&&(0,n.jsx)(eO,{open:l,onClose:e=>{e&&a(e),c(!1)},wallet:r}),"disabled"===h&&(0,n.jsx)(eq,{open:l,onClose:e=>{e&&a(e),c(!1)},wallet:r})]});return"mobile"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:o()("w-full py-16 px-[16px] cursor-pointer border-solid border-0 border-b-2 bg-blue-0",{"border-indigo-5":"disabled"===h,"border-red-5":"errors"===h,"border-blue-3":"enabled"===h}),onClick:()=>{i?.(),c(!0)},tabIndex:0,role:"button",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(x.Text,{children:u("credits_label")}),(0,n.jsx)("div",{className:o()("text-[11px] font-bold mt-1",{enabled:"text-primary",disabled:"text-indigo-7",errors:"text-red-5"}[h]),children:g})]}),(0,n.jsxs)("div",{className:"flex items-center gap-4 whitespace-nowrap",children:[(0,n.jsx)(x.Text,{weight:"bold",children:(0,n.jsx)(eT.A,{value:m,minimumFractionDigits:p,maximumFractionDigits:p})}),eW[h].icon&&(0,n.jsx)("span",{className:"inline-flex items-center [&>div]:static [&>div]:top-auto",children:eW[h].icon})]})]})}),b]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.TextLinkButton,{onClick:()=>c(!0),noUnderline:!0,color:"secondary",children:(0,n.jsxs)("div",{className:o()("whitespace-nowrap px-8 py-4 cursor-pointer rounded-8 border-1 border-solid hover:ring-2 transition-all ease-in-out duration-150 hover:shadow-300",eW[h].borderColor,eW[h].borderHoverColor,eW[h].backgroundColor,eW[h].ringColor),children:[(0,n.jsxs)("div",{className:"flex items-center gap-[6px]",children:[(0,n.jsx)(x.Text,{size:"xsmall",children:u("credits_label")}),(0,n.jsx)(x.Text,{weight:"bold",size:"small",children:(0,n.jsx)(eT.A,{value:m,minimumFractionDigits:p,maximumFractionDigits:p})}),eW[h].icon&&(0,n.jsx)("span",{className:"inline-flex items-center [&>div]:static [&>div]:top-auto",children:eW[h].icon})]}),(0,n.jsxs)("span",{className:"text-[10px]",children:["enabled"===h&&(0,n.jsx)(x.Text,{color:"primary",weight:"bold",children:u("status.enabled")}),"disabled"===h&&(0,n.jsx)(x.Text,{weight:"bold",color:"inherit",children:u("status.disabled")}),"errors"===h&&(0,n.jsx)(x.Text,{color:"negative",weight:"bold",children:u("status.suspended")})]})]})}),b]})}let eG=({user:e,fullWidth:t=!1,variant:i="desktop",onBeforeOpen:r})=>{let s=(0,N.c)(),a=e?(0,G.h)(e):void 0,l=e?(0,G.aD)(e):void 0,o=e?.businesses.data?.[0],c=o?.wallet.data,d=(0,G.wZ)(e),u=a?.usedInteractions||0,h=a?.maxInteractions||0,x=0===h||a?.subscriptionPlan.data.isInteractionLimited===!1,m=u>=h&&!x,p=a?.nextBillingAt||null,g=a?.meta?.nextRefreshAt,b=["PaymentIssue","Expired"].includes(l||""),j=a?.subscriptionPlan?.data.subscriptionPricingList.data[0],f=j?j.periodUnit:void 0,_=a?.subscriptionPlan.data.type?s((0,Q.MQ)(a?.subscriptionPlan.data.type)):"";return(0,n.jsxs)(J.YG,{children:[(0,n.jsx)(J.di,{when:"NoSubscription"===l&&null==d,children:(0,n.jsx)(eK,{wallet:c,variant:i,onBeforeOpen:r})}),(0,n.jsx)(J.di,{when:"NoSubscription"===l&&!!(d&&d.remaining),children:(0,n.jsx)(eA,{count:(d?.max||0)-(d?.remaining||0),limit:d?.max||0,renewalDate:d?.nextRenewal||null,fullWidth:t})}),(0,n.jsx)(J.di,{when:"NoSubscription"===l&&!!(d&&0===d.remaining),children:(0,n.jsx)(ey,{count:(d?.max||0)-(d?.remaining||0),limit:d?.max||0,renewalDate:d?.nextRenewal||null,fullWidth:t})}),(0,n.jsx)(J.di,{when:"SubscriptionActive"===l&&!m&&!b,children:(0,n.jsx)(ec,{count:u,limit:h,unlimited:x,renewalDate:p,monthlyRenewalDate:g,selectedOfferPeriodUnit:f,planName:_,fullWidth:t})}),(0,n.jsx)(J.di,{when:"SubscriptionActive"===l&&m&&!b,children:(0,n.jsx)(eu,{count:u,limit:h,renewalDate:p,planName:_,fullWidth:t})}),(0,n.jsx)(J.di,{when:b,children:(0,n.jsx)(ef,{count:u,limit:h,subscriptionId:a?.id||"",subscriptionPlanType:a?.subscriptionPlan.data.type,subscriptionPricingId:a?.subscriptionPlan?.data.subscriptionPricingList.data[0].id||"",planName:_,subscriptionMode:l||"SubscriptionActive",fullWidth:t})})]})};var eY=i(58056),eZ=i(38228),eJ=i(9116);let eQ=({pro:e,truncate:t=0,size:i="regular"})=>{let{name:r,meta:{identityVerified:s}}=e,a=(0,N.c)("common.badges.verified");return(0,n.jsxs)(eZ.BJ,{orientation:"horizontal",alignment:"center",spacing:"$100",children:[(0,n.jsx)(O.EY,{truncateAfter:t,weight:"bold",children:r}),s&&(0,n.jsx)(x.Tooltip,{placement:"top",align:"center",content:a("tooltip"),children:(0,n.jsx)(eJ.o,{color:"blue7",size:"large"===i?"xlarge":"large"})})]})};var eX=i(63292);let e0=(e,t)=>e.replace(RegExp(`^${t}.`),""),e1=({hasBg:e=!1,user:t})=>{let i="header.plans_tag.renewal",r="pricing_page.card",s=(0,N.c)(i),a=(0,N.c)(r),l=(0,eY.Ym)(),{userMode:{pageMode:c}}=(0,d.useHeaderContext)(),h=t?(0,G.h)(t):void 0,x=h?.subscriptionPlan.data,m=t?.businesses.data?.[0]?.proProfiles.data?.[0],p=m?.averageRating||0,g=h?Math.max(0,Math.floor((new Date(h.expiresAt).getTime()-Date.now())/864e5)):void 0;return(0,n.jsx)("div",{className:o()("border-solid border-0 border-b-1 border-gray-1 flex",{"bg-gray-0":e}),children:(0,n.jsx)(eZ.Yy,{horizontal:"$300",vertical:"$200",children:(0,n.jsxs)(eZ.e,{spacing:"$200",alignV:"center",alignH:"center",children:[(0,n.jsx)(eZ.VP,{width:"content",children:(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)(O.eu,{shape:"round",imageUrl:t?.hasAvatar?t?.pictureUrl:"",size:"medium",premium:m?.premiumAccountEnabled})})}),(0,n.jsxs)(eZ.VP,{width:"fluid",children:[(0,n.jsx)(O.DZ,{level:"5",as:"span",children:(0,n.jsx)(eQ,{pro:{name:t?.firstName,meta:{identityVerified:m?.meta?.identityVerified}}})}),c===u.b.PRO&&(0,n.jsxs)(n.Fragment,{children:[x&&!!(g&&g>0)&&!!g&&!!(0,Q.OS)(x?.type)&&(0,n.jsx)("div",{className:"py-2",children:(0,n.jsx)(O.m_,{content:s(e0((0,eX.C)(i,g||0,l),i),{number:g||0}),children:(0,n.jsx)(O.vw,{color:"teal",label:a(e0((0,Q.MQ)(x?.type),r))})})}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(O.GW,{rating:Math.round(p)}),"\xa0",(0,n.jsx)("div",{className:"ml-1 text-14 text-gray-10 header_userRating",children:p.toFixed(1)}),"\xa0",(0,n.jsxs)("div",{className:"ml-1 text-14 text-gray-8 header_userReviews",children:["(",m?.nbReviews||0,")"]})]})]}),[u.b.PRO_AS_CUSTOMER,u.b.CUSTOMER].includes(c)&&(0,n.jsx)("div",{className:"text-14 text-gray-8 break-all",children:t?.emailAddress})]})]})})})},e2=({user:e,links:t,onClose:i})=>{let r=(0,a.useRouter)(),l=(0,a.usePathname)(),o=(0,a.useSearchParams)(),{handleLinkClick:c,userMode:{pageMode:h}}=(0,d.useHeaderContext)(),m=(0,N.c)("header.links"),p=(0,N.c)("pro_settings_page.navigation"),b=!!(e&&(0,G.AG)(e)),j=e?.businesses.data?.[0]?.proProfiles.data?.[0];return(0,n.jsxs)("div",{className:"h-full flex flex-col",children:[(0,n.jsx)("div",{className:"h-[61
1px] flex-shrink-0 pr-24 w-full border-solid border-0 border-b-1 border-gray-1 flex justify-end items-center",children:(0,n.jsx)("div",{className:"cursor-pointer text-gray-7 hover:text-gray-9",tabIndex:0,role:"button",onClick:()=>i(),children:(0,n.jsx)(g.Close,{color:"inherit",size:"medium"})})}),j&&(0,n.jsx)(e1,{hasBg:!0,user:e}),j&&h===u.b.PRO&&(0,n.jsx)("div",{className:"flex",children:(0,n.jsx)(eG,{fullWidth:!0,user:e})}),(0,n.jsxs)("div",{className:"flex flex-grow flex-col py-[8px] space-y-[4px] overflow-scroll",children:[t.map((e,i)=>(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(Z,{links:e,hasLimitReached:b}),i!==t.length-1&&(0,n.jsx)(x.Divider,{},"divider")]},e.join("_"))),(0,n.jsx)("div",{className:"flex-grow",children:"\xa0"}),h===u.b.PRO&&(0,n.jsx)(Y,{url:q.r0.getUrl(),label:m("switch_to_customer"),index:q.r0.index,onClick:()=>{c("switchToCustomer")}}),h===u.b.PRO_AS_CUSTOMER&&(0,n.jsx)(Y,{url:q.MD.getUrl({params:{filter:""}}),label:m("switch_to_pro"),index:q.MD.index,onClick:()=>{c("switchToPro")}}),h!==u.b.GUEST&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y,{url:q.YK.getUrl(),label:p("account_settings"),index:q.Y0.index}),(0,n.jsx)("div",{className:"group",children:(0,n.jsx)(Y,{label:(0,n.jsx)(K.A,{label:m("notifications"),hoverParent:!0}),index:"",onClick:()=>r.push(`${l}?${o}&pwa=true`)})}),h===u.b.PRO&&(0,n.jsx)("div",{className:"group",children:(0,n.jsx)(Y,{url:q.Y0.getUrl(),label:(0,n.jsx)(K.A,{label:p("widgets"),hoverParent:!0}),index:q.Y0.index})}),(0,n.jsx)(Y,{label:m("logout"),index:q.yG.index,url:q.yG.getUrl()})]})]})]})};function e5({user:e}){let{dropdown:{isMobileMenuOpen:t,setIsMobileMenuOpen:i}}=(0,d.useHeaderContext)(),r=(0,s.useRef)(null),{mobileMenuLinks:a}=(0,c.c)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:o()("fixed inset-0 z-[100] h-full w-full bg-[rgba(60,63,69,0.64)] transition-[visibility,opacity] duration-200 ease-in-out",{"visible opacity-100":t,"opacity-0 invisible":!t})}),(0,n.jsx)("aside",{ref:r,className:o()("fixed top-0 bottom-0 z-[200] h-full w-full max-w-[320px] overflow-y-scroll bg-white-0 transition-all duration-200 ease-in-out",{"right-0 opacity-100":t,"right-[-100%] opacity-0":!t}),children:(0,n.jsx)(e2,{links:a,onClose:()=>i(!1),user:e})})]})}var e3=i(21211),e4=i.n(e3),e9=i(21550),e8=i(6574),e6=i(32683),e7=i(55970),te=i(21734),tt=i(9408),ti=i(62550),tr=i(93135),tn=i(19874),ts=i(12128),ta=i(83016);let tl=({role:e,body:t,attachments:i,unreadMessages:r,conversation:s,onClick:a,onNameClick:l})=>{let o="pro_messenger.conversation",c="messenger.notifications",d=(0,N.c)(o),u=(0,N.c)(c),h=(0,eY.Ym)(),{user:x,proProfile:m}=s,p=(0,ta.B)(e,s.id),b=!!i?.edges.length,j=i?.edges.filter(e=>e.node.thumbnailUrl).map(e=>e.node),f=i?.edges.filter(e=>!e.node.thumbnailUrl).map(e=>e.node),_=j&&!!j.length,v=f&&!!f.length,w="customer"===e?{hasAvatar:m.data.hasAvatar,pictureUrl:m.data.pictureUrl,shortName:m.data.name}:x.data,y=(e,t)=>d(e0((0,eX.C)(e?"pro_messenger.conversation.images":"pro_messenger.conversation.files",t,h),o),{count:t});return(0,n.jsxs)(eZ.e,{spacing:"$100",alignV:"start",children:[(0,n.jsx)(eZ.VP,{width:"content",children:(0,n.jsx)(ti.Yq,{href:p,noUnderline:!0,onClick:()=>a(p),children:(0,n.jsx)(O.eu,{shape:"customer"===e?"square":"round",size:"medium",imageUrl:w?.hasAvatar?w.pictureUrl:void 0})})}),(0,n.jsxs)(eZ.VP,{width:"fluid",children:[(0,n.jsxs)(eZ.e,{alignV:"center",children:[(0,n.jsx)(eZ.VP,{width:"fluid",children:(0,n.jsx)(ti.Yq,{href:p,noUnderline:!0,onClick:()=>a(p),children:(0,n.jsx)(O.DZ,{level:"6",weight:"weak",truncate:!0,children:w.shortName})})}),(0,n.jsx)(eZ.VP,{width:"content",children:(0,n.jsx)(tn.K0,{variant:"secondary",ghost:!0,icon:g.Close,onClick:l,size:"small"})})]}),(0,n.jsxs)("a",{href:p,className:"flex flex-col min-w-[1px] space-y-8 flex-grow pr-16",onClick:()=>a(p),children:[t&&!b&&(0,n.jsx)(O.EY,{size:"small",truncateAfter:r>1?1:2,children:t}),b&&(0,n.jsx)("div",{className:"flex items-center space-x-4 min-w-[1px]",children:(0,n.jsxs)("div",{className:"flex-grow flex items-center space-x-4 min-w-[1px] text-gray-9 text-14",children:[_&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.Image,{size:"small"}),(0,n.jsx)("span",{children:y(!0,j?.length)})]}),!_&&v&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.File,{size:"small"}),f?.length>1?(0,n.jsx)("span",{children:y(!1,f?.length)}):(0,n.jsx)(ts.A,{name:f[0].caption||""})]})]})}),r>1&&(0,n.jsx)(eZ.d2,{children:(0,n.jsx)(O.vw,{color:"gray",label:u(e0((0,eX.C)("messenger.notifications.unread_messages",r-1,h),c),{count:r-1}),weight:"strong"})})]})]})]})},to=(0,s.memo)(()=>{let e="messenger.notifications",t=(0,N.c)(e),i=(0,eY.Ym)(),r=(0,e8.useQueryClient)(),a=(0,p.tl)(),{user:l}=(0,tr.A)(),{userMode:{pageMode:c}}=(0,d.useHeaderContext)(),h=c===u.b.PRO?"pro":"customer",[x,g]=(0,s.use
1State)(!1),[b,j]=(0,s.useState)(null),[f,_]=(0,s.useState)([]),v=(0,s.useRef)({value:null}),{conversationsData:w,getUserData:k}=(e=>{let{role:t}=e,i=(0,C.A)(),[r,n]=(0,s.useState)({}),a=(0,y.useMutation)({mutationFn:e=>i.get(`/conversations/${e}`,{params:{filter:{role:t},include:"user,pro_profile",fields:{conversation:"user,pro_profile",pro_profile:"picture_url,has_avatar,name",user:"id,full_name,short_name,phone_number,first_name,picture_url,has_avatar"}}}),onSuccess:e=>{let t=e.data.data;n({...r,[t.id]:t})}}),l=async e=>{r[e]||await a.mutateAsync(e)};return{conversationsData:r,getUserData:l}})({role:h}),A=(0,s.useMemo)(()=>f.reduce((e,t)=>{let i=t.sender?.apiId,r={...e};return r[i]||(r[i]=0),r[i]+=1,{...r}},{}),[f.length]),[S]=(0,e6.default)("/all/messageSound.mp3",{volume:.5});if((0,e7.A)({onMessage:async e=>{(0,tt.ci)(e)&&(j(e),g(!0),r.invalidateQueries({queryKey:te.A.userMeta}))}}),(0,s.useEffect)(()=>{b&&(async()=>{await k(b.conversation.apiId),_([...f,b]),S();v.current.value&&clearTimeout(v.current.value),v.current.value=setTimeout(()=>{_([]),v.current.value=null,g(!1)},7e4)})()},[b]),!f.length)return null;let T=f[f.length-1],P=Object.keys(A).length,{sender:z,conversation:M}=T,E=A[z.apiId],$=w[M.apiId];return $?(0,n.jsxs)(e9.Kq,{swipeDirection:"up",children:[(0,n.jsx)(e9.Root,{open:x,className:o()("fixed right-4 z-[1000] w-[360px] rounded-8 border border-gray-1 bg-white-0","shadow-[2px_2px_4px_rgba(20,28,30,0.12)]","data-[state=open]:animate-[fade-in-down-default_0.2s_cubic-bezier(0.42,0,0.58,1)_both]","data-[state=closed]:animate-[fade-out-up-default_0.2s_cubic-bezier(0.42,0,0.58,1)_both]"),children:(0,n.jsxs)(e9.VY,{children:[(0,n.jsx)(eZ.Yy,{spacing:"$200",right:"$0",children:(0,n.jsx)(tl,{role:h,conversation:$,body:T.body,attachments:T.attachments,unreadMessages:E,onClick:e=>{a(m.XTe,{user_id:l?.id,user_type:h,redirect_to:e})},onNameClick:()=>g(!1)})}),P>1&&(0,n.jsx)("div",{className:"jsx-3cc6c774c7fa594 absolute right-1/2 top-[calc(100%+4px)] w-[232px] translate-x-1/2 rounded-8 border border-gray-1 bg-white-0 px-3 py-2 shadow-[2px_2px_4px_rgba(20,28,30,0.12)]",children:(0,n.jsx)(ti.Yq,{href:c===u.b.PRO?q.Uv.getUrl():q.Cp.getUrl(),color:"inherit",noUnderline:!0,children:(0,n.jsx)(O.EY,{as:"div",size:"xsmall",weight:"semibold",children:t(e0((0,eX.C)("messenger.notifications.unread_users",P-1,i),e),{count:P-1})})})})]})}),(0,n.jsx)(e9.Viewport,{className:"fixed right-4 top-0 z-[999] flex flex-col gap-4 outline-none"}),(0,n.jsx)(e4(),{id:"3cc6c774c7fa594",children:"@keyframes fade-in-down-default{0%{opacity:0;top:0}100%{opacity:1;top:76px}}@keyframes fade-out-up-default{0%{opacity:1;top:76px}100%{opacity:0;top:0}}"})]}):null});var tc=i(49554);let td=o()("absolute left-0 top-0 h-full w-full rounded-2","bg-[linear-gradient(90deg,rgba(190,190,190,0.2)_25%,rgba(129,129,129,0.24)_37%,rgba(190,190,190,0.2)_63%)]","bg-[length:400%_100%] animate-skeleton"),tu=({label:e})=>(0,n.jsxs)("div",{className:"relative h-[15px] overflow-hidden",children:[(0,n.jsx)("div",{className:td}),(0,n.jsx)("div",{className:"leading-[0] text-14 opacity-0",children:e})]}),th=()=>(0,n.jsx)("header",{className:"relative border-b border-gray-1 bg-white-0",children:(0,n.jsx)(W,{hasNotificationIcon:!1,children:(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(eZ.Yy,{left:"$200",right:"$50",children:(0,n.jsxs)(eZ.e,{alignV:"center",children:[(0,n.jsx)(eZ.VP,{width:"fluid",children:(0,n.jsxs)(eZ.BJ,{spacing:"$600",orientation:"horizontal",children:[(0,n.jsx)(eZ.BS,{on:["no","yes"],children:["1","2","3"].map(e=>(0,n.jsx)(tu,{label:"loading..."},e))}),(0,n.jsx)(eZ.BS,{on:["yes","no"],children:(0,n.jsx)(tc.aw,{rows:1,width:"120px",size:"xsmall",active:!0})})]})}),(0,n.jsx)(eZ.VP,{width:"content",children:(0,n.jsx)(tc.er,{width:"72px",size:"small",active:!0})})]})})})})});var tx=i(73630),tm=i(15574),tp=i(19469),tg=i(27305),tb=i(88876),tj=i(82747),tf=i(41327);function t_(){let{unreadCount:e}=(0,tx.U)(),t=!!e;return(0,s.useEffect)(()=>{document?.querySelector('link[rel="icon"][type="image/x-icon"]')?.setAttribute("href",t?tb.A.src:tm.default.src),document?.querySelector('link[rel="icon"][sizes="16x16"]')?.setAttribute("href",t?tj.A.src:tp.default.src),document?.querySelector('link[rel="icon"][sizes="32x32"]')?.setAttribute("href",t?tf.A.src:tg.default.src)},[t]),null}var tv=i(34117),tw=i(60644);let ty=({url:e,label:t,index:i,onClick:r})=>(0,n.jsx)("div",{className:"flex flex-col hover:bg-gray-0 bg-white-0 text-14",children:e?(0,n.jsx)(x.TextLink,{noUnderline:!0,href:e,onClick:r||void 0,children:(0,n.jsx)("div",{className:"py-8 px-16 text-gray-9",children:t})}):(0,n.jsx)(x.TextLinkButton,{noUnderline:!0,onClick:r||void 0,children:(0,n.jsx)("div",{className:"py-8 px-16 text-gray-9",children:t})})},i),tC=({user:e})=>{let t=(0,a.usePathname)(),i=(0,a.useSearchParams)(),{push:r}=(0,a.useRouter)(),{dropdown:s,userMode:{pageMode:l},handleLinkClick:h}=(0,d.useHeaderContext)(),{dropdownLinks:m}=(0,c.c)(),p=(0,N.c)("header"),b=(0,N.c)("pro_settings_page.navigation"),{handleDropdownOpen:j,isDropdownOpen:f,dropdownMenuRef
1:_}=s,v=e?.businesses.data?.[0]?.proProfiles.data?.[0],w=!!e&&(0,G.Vw)(e);return(0,n.jsxs)("div",{className:o()("header_userMenu flex cursor-pointer select-none items-center px-12 py-8","relative rounded-8 border border-gray-1 border-solid transition-shadow duration-150 ease-in-header",{"bg-gray-2 shadow-300 hover:shadow-300":f,"bg-white-0 shadow-none hover:shadow-300":!f}),ref:_,role:"button",tabIndex:0,onClick:()=>j(),children:[(0,n.jsxs)(x.Stack,{spacing:"$100",orientation:"horizontal",alignment:"center",children:[(0,n.jsx)(x.Visible,{on:["no","yes"],children:(0,n.jsx)(g.Menu,{size:"small"})}),e?(0,n.jsxs)("div",{className:"w-[30px] text-center justify-center align-center flex md:w-auto cursor-pointer",children:[(0,n.jsx)(x.Avatar,{shape:"round",imageUrl:e.hasAvatar?e.pictureUrl:"",size:"xsmall",premium:v?.premiumAccountEnabled}),w&&(0,n.jsx)("div",{className:"inline-block pl-8",children:(0,n.jsx)(g.Info,{size:"medium",color:"red7",isInline:!0})})]}):(0,n.jsx)("div",{children:(0,n.jsx)(x.Avatar,{shape:"round",size:"small"})})]}),(0,n.jsxs)("div",{className:o()("absolute right-0 top-[50px] z-25 w-[262px] rounded-8 border border-gray-1 bg-white-0 shadow-400 transition-all duration-150 ease-in-out z-[100]",{"visible translate-y-0 opacity-100":f,"invisible -translate-y-2 opacity-0":!f}),children:[v&&e&&l===u.b.PRO&&v?.meta?.productsEnabled&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e1,{user:e}),(0,n.jsx)(x.Inset,{horizontal:"$300",vertical:"$300",children:(0,n.jsxs)(x.Columns,{children:[(0,n.jsx)(x.Column,{width:"fluid",children:(0,n.jsx)(x.Text,{size:"small",children:p("balance")})}),(0,n.jsx)(x.Column,{width:"content",children:(0,n.jsx)(x.Text,{weight:"semibold",children:(0,n.jsx)(eT.A,{value:v.meta?.availableBalance||0})})})]})}),(0,n.jsx)(x.Divider,{})]}),l===u.b.PRO&&e&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"px-8 py-8",children:(0,n.jsx)(tw.A,{user:e,menuMode:!0})}),(0,n.jsx)(x.Divider,{})]}),(0,n.jsxs)("div",{className:"list-none space-y-4 px-0 py-8",children:[m.map(e=>{let{index:t,href:i,isActive:r,isExternal:s,label:a}=e,l=w&&e.index===q.YK.index,c=t===q.gO.index;return(0,n.jsx)(x.TextLink,{href:i,target:s?"_blank":void 0,onClick:()=>h(t),noUnderline:!0,children:(0,n.jsxs)("div",{className:o()("cursor-pointer select-none text-14 transition-colors hover:bg-gray-0 px-16 block py-8",`header_dropdownItem_${t}`),children:[c&&(0,n.jsx)(V.Ay,{className:"mr-2 h-4 w-4"}),(0,n.jsx)(x.Text,{weight:r?"bold":"normal",color:c?"primary":"dark",children:a}),l&&(0,n.jsx)("div",{className:"inline-block pl-8",children:(0,n.jsx)(g.Info,{size:"medium",color:"red7",isInline:!0})})]})},i)}),(0,n.jsx)(x.Divider,{},"divider"),l===u.b.PRO&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ty,{url:q.r0.getUrl(),label:p("links.switch_to_customer"),index:q.r0.index,onClick:()=>{h("switchToCustomer")}}),(0,n.jsx)(x.Divider,{},"divider")]}),l===u.b.PRO_AS_CUSTOMER&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ty,{url:q.MD.getUrl({params:{filter:""}}),label:p("links.switch_to_pro"),index:q.MD.index,onClick:()=>{h("switchToPro")}}),(0,n.jsx)(x.Divider,{},"divider")]}),l!==u.b.GUEST&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"group",children:(0,n.jsx)(ty,{label:(0,n.jsx)(K.A,{label:p("links.notifications"),hoverParent:!0}),index:"",onClick:()=>r(`${t}?${i.getAll("").join("&")||""}&pwa=true`)})}),l===u.b.PRO&&(0,n.jsx)("div",{className:"group",children:(0,n.jsx)(ty,{url:q.Y0.getUrl(),label:(0,n.jsx)(K.A,{label:b("widgets"),hoverParent:!0}),index:q.Y0.index})}),(0,n.jsx)(ty,{url:q.yG.getUrl(),label:p("links.logout"),index:q.yG.index,onClick:()=>{h(q.yG.index)}})]})]})]})]})},tk=({isMobile:e})=>{let t=(0,N.c)("header.links"),{user:i}=(0,tr.A)(),r=(0,p.tl)(),{unreadCount:s}=(0,tx.U)(),a=q.Cp.getUrl(),l=()=>{r(m.T2C,{user_id:i?.id})};return e?(0,n.jsx)(ti.Yq,{href:a,color:"inherit",noUnderline:!0,onClick:l,children:(0,n.jsxs)(eZ.BJ,{orientation:"horizontal",spacing:"$100",alignment:"center",children:[t("user_inbox"),(0,n.jsx)(O.Ex,{count:s,overflowCount:99})]})}):(0,n.jsx)(ti.vx,{href:a,variant:"secondary",ghost:!0,size:"small",onClick:l,children:(0,n.jsx)(O.Ex,{count:s,overflowCount:99,children:(0,n.jsx)(g.Messages,{size:"medium"})})})};function tA({user:e}){let t=(0,N.c)("header.links"),{extraContent:i,extraContentClassNames:r,handleLinkClick:s}=(0,d.useHeaderContext)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("nav",{className:"hidden h-full flex-shrink-0 overflow-x-hidden md:flex",children:(0,n.jsx)(tv.A,{hasItemBorder:!0})}),(0,n.jsx)("div",{className:o()("flex h-full min-w-0 flex-1",r),children:i}),(0,n.jsx)("div",{className:"hidden md:block",children:(0,n.jsx)(x.ButtonLink,{href:q.qm.getUrl(),variant:"secondary",data:{cy:"header_hireProLink"},onClick:()=>s(q.qm.index),children:t("hire_pro")})}),(0,n.jsx)("div",{className:"block md:hidden",children:(0,n.jsx)(tk,{})}),(0,n.jsx)("div",{children:(0,n.jsx)(tC,{user:e})}),(0,n.jsx)(t_,{})]})}function tS(){let{extraContent:e,extraContentClassNames:t}=(0,d.useHeaderContext)(),i=(0,a.usePathname)()||"/",r=(0,h.J9)(i);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:o()("flex h-full min-w-0 flex-1",t),children:e}),!r&&(0,n.jsx)("nav",{className:"hidden h-full flex-shrink-0 overflow-x-hidden md:flex",children:(0,n.jsx)(tv.A,{hasItemBorder:!0})}),(0,n.jsx)("div",{className:"block md:hidden",children:(0,n.jsx)(tC,{user:null})})]})}let tT={borderColor:"border-primary",borderHoverColor:"hover:border-primary",ringColor:"hover:ring-primary",backgroundColor:"bg-white",icon:(0,n.jsx)("div",{className:"relative top-[-2px]",children:(0,n.jsx)(eP.R,{color:"gray5"})})};function tN({wallet:e}
1){let t=(0,N.c)(""),[i,r]=(0,s.useState)(!1),{currency:a}=(0,eN.L)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.TextLinkButton,{onClick:()=>r(!0),noUnderline:!0,color:"secondary",children:(0,n.jsxs)("div",{className:o()("flex items-center gap-[6px] whitespace-nowrap px-8 py-[10px] cursor-pointer rounded-8 border-1 border-solid hover:ring-2 transition-all ease-in-out duration-150 shadow-100 hover:shadow-300",tT.borderColor,tT.borderHoverColor,tT.backgroundColor,tT.ringColor),children:[(0,n.jsx)(x.Text,{size:"xsmall",children:t("header.wallet_badge.credits_label")}),(0,n.jsx)(x.Text,{weight:"bold",size:"small",children:(0,n.jsx)(eT.A,{value:e.balance/((0,eS.rx)(a)?1:100),minimumFractionDigits:2*!(0,eS.rx)(a),maximumFractionDigits:2*!(0,eS.rx)(a)})}),tT.icon&&(0,n.jsx)("span",{className:"inline-flex items-center [&>div]:static [&>div]:top-auto",children:tT.icon})]})}),(0,n.jsx)(x.ModalDialog,{open:i,title:"",onClose:()=>{r(!1)},size:"fluid",children:(0,n.jsx)(x.Text,{children:t.rich("header.remaining_credits_balance.modal.text",{strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e}),br:()=>(0,n.jsx)("br",{})})})})]})}function tP({user:e}){let t=(0,N.c)("header.links"),{features:{isAutoRechargeAvailable:i}}=(0,eN.L)(),{mainLinks:r,hasPremiumLink:s}=(0,c.c)(),l=(0,a.usePathname)(),d=r.find(e=>e.href===l),u=e?(0,G.wZ)(e):null,h=e?(0,G.aD)(e):"NoSubscription",x=e?.businesses.data?.[0],m=x?.wallet.data,p=i&&"NoSubscription"===h,g=m?.balance>0&&!p;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:o()("flex h-full min-w-0 flex-1",d&&"ml-0"),children:(0,n.jsx)("nav",{className:"hidden h-full flex-shrink-0 overflow-x-hidden md:flex",children:(0,n.jsx)(tv.A,{hasItemBorder:!0})})}),(0,n.jsxs)("div",{className:"hidden md:flex items-center gap-[8px]",children:[(0,n.jsx)(tw.A,{user:e,className:"mr-[6px]"}),("NoSubscription"!==h||null!==u&&u?.remaining!==null)&&(0,n.jsx)(eZ.BS,{on:["no","no","yes"],children:(0,n.jsx)(eG,{user:e})}),(p||g)&&(0,n.jsxs)(eZ.BS,{on:["no","yes"],children:[p&&(0,n.jsx)(eK,{wallet:m}),g&&(0,n.jsx)(tN,{wallet:m})]}),s&&(0,n.jsx)(H(),{href:q.gO.getUrl(),prefetch:!1,className:"header_premiumLink flex h-full flex-shrink-0 items-center text-right text-16 [text-rendering:optimizeLegibility]",children:t("get_premium")})]}),(0,n.jsx)("div",{className:"hidden md:block",children:(0,n.jsx)(tC,{user:e})}),(0,n.jsx)(t_,{})]})}var tz=i(2892);let tM=()=>{let e=(0,N.c)("pro_services.automation_infos.auto_purchase");return(0,n.jsx)("div",{className:"p-4 pt-2 md:p-8 md:pt-2 md:pb-4",children:(0,n.jsx)(tz.A,{color:"indigo",buttonColor:"indigo",campaignId:"enable-automation",disableCollapse:!1,heroTitle:e("text"),heroSubtitle:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.Flash,{isInline:!0})," ",e("title")]}),detailsTitle:void 0,detailsText:void 0,link:q.Fq.getUrl({query:{enableAutomation:1,automation:"auto_purchase"}}),ctaText:e("button"),maxCloseStatePersist:86400,variant:"lg"})})};var tE=i(25544),t$=i(98222);function tI({open:e,mode:t,paymentAccounts:i,refetchPaymentAccounts:r,onClose:a}){let l=(0,N.c)(),o=(0,p.tl)(),c=(0,ep.m)(),d=(0,em.A)(),[u,h]=(0,s.useState)(!1),[g,b]=(0,s.useState)(!1),j=async()=>{h(!0),o(m.n8Y);let e=await (0,eg.O2)("managePaymentSources",c);e&&d&&(b&&b(!0),d.openCheckout({hostedPageUrl:e,onClose:async()=>{b&&(b(!1),await r(),h(!1))}}))};(0,s.useEffect)(()=>{e&&o&&i.length>0&&(o(m.Anj),a())},[i,o,e]),(0,s.useEffect)(()=>{e&&o&&o(m.Rud)},[e,o]);let f=(0,s.useCallback)(e=>(0,n.jsx)(x.Text,{weight:"bold",children:e}),[]),_=(0,t$.c)(t),v=(0,tE.SA)(t);return(0,n.jsxs)(x.ModalDialog,{open:e&&!g,onClose:a,size:"fluid",title:l("header.banners.automation_missing_payment_account.modal.title",{automationMode:v,discountRate:_}),children:[(0,n.jsx)(x.Heading,{level:"4",children:l.rich("header.banners.automation_missing_payment_account.modal.subtitle",{strong:f,discountRate:_,automationMode:v})}),(0,n.jsx)(x.Text,{children:l.rich("header.banners.automation_missing_payment_account.modal.text.1",{strong:f,discountRate:_,automationMode:v})}),(0,n.jsx)(x.Text,{children:l.rich("header.banners.automation_missing_payment_account.modal.text.2",{strong:f,discountRate:_,automationMode:v})}),(0,n.jsx)(x.Inset,{vertical:"$300",children:(0,n.jsx)(x.Card,{backgroundColor:"gray",children:(0,n.jsxs)(x.Stack,{alignment:"center",spacing:"$200",children:[(0,n.jsx)(x.Text,{align:"center",children:l.rich("header.banners.automation_missing_payment_account.modal.text.3",{strong:f,discountRate:_,automationMode:v})}),(0,n.jsx)(x.Button,{fullWidth:[!0,!1],onClick:j,working:u,children:l("header.banners.automation_missing_payment_account.modal.button")})]})})}),(0,n.jsx)(x.Text,{size:"small",children:l.rich("header.banners.automation_missing_payment_account.modal.text.4",{discountRate:_,automationMode:v,strong:f,aServiceDashboard:e=>(0,n.jsx)(x.TextLink,{href:q.Fq.getUrl(),children:e})})})]})}let tR={include:"payment_accounts"};function tU(){(0,ex.A)();let{data:e,refetch:t}=((e=!0)=>{let{data:t}=(0,eM.useQuery)({queryKey:[{url:"/me",params:{fields:{user:"businesses,full_name",pro_profile:["first_name"],business:"payment_accounts,company_name",payment_account:"is_valid",include:"businesses,business.payment_accounts,payment_account,payment_accounts,user.business.payment_accounts"}}}],enabled:e,select:({data:e})=>0===e.businesses.data.length?void 0:e.businesses.data[0]}),i={url:`/businesses/${t?.id}`,params:tR};return(0,eM.useQuery)({queryKey:[i],select:({data:e})=>e.paymentAccounts.data.filter(e=>e.isValid),enabled:!!t&&e})})(),i=(0,a.useSearchParams)(),r=(0,N.c)(),l=(0,p.tl)(),[o,c]=(0,s.use
1State)(!!i?.get("automatedPurchaseIssue")||!0);(0,s.useEffect)(()=>{l&&l(m.SCt)},[l]);let d="auto_purchase";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eh.A,{}),(0,n.jsx)("div",{className:"bg-red-5 shadow-100 p-0 m-0",children:(0,n.jsx)(x.Stack,{children:(0,n.jsx)(x.Inset,{horizontal:["$100","$300"],vertical:["$100"],children:(0,n.jsxs)(x.Columns,{alignV:"center",spacing:["$100","$300"],children:[(0,n.jsx)(x.Column,{width:"content",children:(0,n.jsx)(x.TextLinkButton,{onClick:()=>c(!0),noUnderline:!0,children:(0,n.jsx)(x.Inset,{right:["$50","$300"],left:["$100","$0"],children:(0,n.jsx)(ez.N,{color:"white",size:"large"})})})}),(0,n.jsx)(x.Column,{children:(0,n.jsx)(x.TextLinkButton,{onClick:()=>c(!0),noUnderline:!0,children:(0,n.jsxs)(x.Stack,{children:[(0,n.jsxs)(x.Visible,{on:["no","yes"],children:[(0,n.jsx)(x.Text,{size:"small",color:"white",weight:"bold",children:r("header.banners.automation_missing_payment_account.title",{automationMode:(0,tE.SA)(d)})}),(0,n.jsx)(x.Text,{size:"small",color:"white",children:r("header.banners.automation_missing_payment_account.text")})]}),(0,n.jsx)(x.Visible,{on:["yes","no"],children:(0,n.jsx)(x.Text,{size:"xsmall",color:"white",weight:"bold",children:r("header.banners.automation_missing_payment_account.text")})})]})})}),(0,n.jsx)(x.Column,{width:"content",children:(0,n.jsx)("div",{children:(0,n.jsxs)(x.Button,{size:"small",variant:"onColor",onClick:()=>c(!0),children:[(0,n.jsx)(x.Visible,{on:["yes","no"],children:r("common.ui_actions.see_more")}),(0,n.jsx)(x.Visible,{on:["no","yes"],children:r("header.banners.automation_missing_payment_account.button.label")})]})})})]})})})}),e&&(0,n.jsx)(tI,{open:o,mode:d,paymentAccounts:e,refetchPaymentAccounts:t,onClose:()=>c(!1)})]})}var tL=i(68870);let tD={fields:{invoice:"amount,currency,invoice_url",request:"customer,city,service,created_at",customer:"full_name",city:"name",service:"name",quote:"created_at"},include:"request,request.customer,request.city,request.service,quote",meta:{invoice:"invoice_url"}};function tB({invoices:e,onInvoiceClick:t}){let i=(0,N.k)();return(0,n.jsx)(x.Card,{backgroundColor:"gray",children:(0,n.jsx)(x.Stack,{spacing:"$100",children:e.map(e=>(0,n.jsx)(x.TextLinkButton,{onClick:()=>{t(e.id)},color:"secondary",noUnderline:!0,children:(0,n.jsx)("div",{className:"border-0 border-b-1 border-solid border-gray-1 pb-2",children:(0,n.jsxs)(x.Columns,{children:[(0,n.jsx)(x.Column,{children:(0,n.jsxs)(x.Stack,{children:[(0,n.jsxs)(x.Text,{truncateAfter:1,size:"small",children:[(({firstName:e,lastName:t})=>`${e||""} ${t&&t.length>0?`${t[0]}.`:""}`.trim())(e.request.data.customer.data)," ",(0,n.jsx)(x.Tag,{color:"gray",label:e.request.data.service.data.name,weight:"subtle"})]}),(0,n.jsx)(x.Text,{color:"dark",size:"xsmall",children:i.dateTime(new Date((e.quote.data||e.request.data).createdAt),{dateStyle:"medium"})})]})}),(0,n.jsx)(x.Column,{width:"content",children:(0,n.jsx)(x.Text,{weight:"bold",children:(0,n.jsx)(eT.A,{value:e.amount/100})})})]})})},e.id))})})}function tF({campaignId:e,title:t="",open:i=!1,canClose:r=!0,onClose:a,maxCloseStatePersist:l,children:o,footerContent:c}){let d=(0,p.tl)(),u=`marketing-modal-closed-${e}`,[h,x]=(0,s.useState)((0,w.zM)(u)||!1),g=(0,s.useMemo)(()=>({campaign:e}),[e]);return(0,s.useEffect)(()=>{d&&g&&d(m.WXe,g)},[d,g]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(eZ.yZ,{open:i||!h,size:"fluid",title:t,hideCloseIcon:!r,onClose:r?()=>{x(!0),l&&(0,w.w6)(u,!0,1e3*l),a&&a()}:void 0,footerContent:c,children:o})})}function tH(){let e,t,i="unpaid-invoices",{data:r}=((e=!0)=>(0,eM.useQuery)({queryKey:[{url:"/invoices/unpaid",params:tD}],enabled:e,select:({data:e})=>e}))(),[a,l]=(0,s.useState)(!0),c=(0,ep.m)(),d=(e=(0,C.A)(),t=(0,y.useMutation)({mutationFn:t=>e.get(`/invoices/${t}`,{params:{meta:{invoice:"invoice_url"}}}),onSuccess:e=>{e.data?.data?.meta.invoiceUrl&&window.open(e.data?.data?.meta.invoiceUrl).focus()}}),async e=>{t.mutateAsync(e)}),u=(0,p.tl)(),h=(0,N.c)("marketing_announcements.payment_due"),g=(0,s.useMemo)(()=>({campaign:i}),[i]),b=async()=>{let e=await (0,eg.O2)("collectDuePayments",c);e&&(u(m.auo,g),u(m.sKG,g),window.open(e,"_blank").focus())};if(!r||0===r.length)return null;let j=r.length>2;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"p-4 pt-2 md:p-8 md:pt-2 md:pb-4",children:(0,n.jsx)(tz.A,{color:"red",campaignId:i,disableCollapse:!0,heroTitle:(0,n.jsxs)(x.Stack,{alignment:"start",children:[(0,n.jsx)(x.Text,{weight:"bold",color:"white",transform:"uppercase",align:"start",children:h("banner.title")}),(0,n.jsx)(x.Text,{color:"white",align:"start",children:h("banner.text")})]}),heroSubtitle:(0,n.jsx)(n.Fragment,{}),detailsTitle:void 0,detailsText:void 0,buttonColor:"indigo",link:"#",onLinkClick:()=>{l(!0)},ctaText:h("banner.button_label"),variant:"lg"})}),(0,n.jsx)(tF,{campaignId:i,open:a,onClose:()=>{j||l(!1)},title:"",canClose:!j,maxCloseStatePersist:1800,footerContent:(0,n.jsx)(x.Inset,{vertical:"$50",children:(0,n.jsxs)(x.Stack,{spacing:"$100",children:[(0,n.jsx)(x.Button,{onClick:b,fullWidth:!0,children:h("modal.button_label")}),(0,n.jsx)(x.Text,{size:"xsmall",align:"center",children:h.rich("modal.footnote",{email:()=>(0,n.jsx)(x.TextLink,{href:`mailto:${tL.K.CONTACT_EMAIL}`,children:tL.K.CONTACT_EMAIL})})})]})}),children:(0,n.jsx)(x.Bleed,{top:"$300",children:(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)("span",{className:o()("font-[90px] m-auto rounded-8 p-16",{"bg-red-5":j,"bg-orange-4":!j}),children:(0,n.jsx)(ez.N,{size:"xxlarge",color:"white"})}),(0,n.jsx)(x.Heading,{level:"3",align:"center",children:h(j?"modal.account_blocked.title":"modal.account_not_blocked.title")}),(0,n.jsx)(x.Inset,{spacing:"$100",children:(0,n.jsx)(x.Text,{children:h.rich(j?"modal.account_blocked.text":"modal.account_not_blocked.text",{strong:e=>(0,n.jsx)(x.Text,{weight:"bold",color:"negative",children:e})})})}),(0,n.jsx)(x.Inset,{vertical:"$100",children:(0,n.jsx)(tB,{invoices:r,onInvoiceClick:d})})]})})})]})}let tV=()=>(0,n.jsx)(n.Fragment,{});function tO(){let e=(0,N.c)("marketing_announcements.automation_mandatory.loading_screen");return(0,n.jsx)(x.Inset,{spacing:"$800",children:(0,n.jsxs)(x.Stack,{alignment:"center",spacing:"$300",children:[(0,n.jsx)(x.Loader,{size:"large",color:"primary"}),(0,n.jsx)(x.Text,{color:"subdued",weight:"bold",children:e("text")})]})})}let tq=({onClick:e,isWorking:t})=>{let i=(0,N.c)();return(0,n.jsx)(x.Button,{onClick:e,working:t,fullWidth:!0,children:i("common.ui_actions.continue")})};function tW(){let e=(0,N.c)("marketing_announcements.automation_mandatory.success_screen");return(0,n.jsx)(x.Bleed,{top:"$300",children:(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)(x.Heading,{level:"4",align:"center",children:e("title")}),(0,n.jsx)(x.Inset,{spacing:"$100",children:(0,n.jsx)(x.Text,{size:"small",children:e.rich("text",{br:()=>(0,n.jsx)("br",{}),pro_services_link:e=>(0,n.jsx)(x.TextLink,{href:q.Fq.getUrl(),children:e})})})})]})})}let tK=({onClick:e,isWorking:t})=>{let i=(0,N.c)("marketing_announcements.automation_mandatory.initial_screen");return(0,n.jsxs)(x.Stack,{alignment:"center",spacing:"$100",children:[(0,n.jsx)(x.Button,{onClick:e,working:t,fullWidth:!0,children:i("action_button")}),(0,n.jsx)(x.Text,{size:"xsmall",color:"subdued",align:"center",children:i.rich("footnote",{terms_link:e=>(0,n.jsx)(x.TextLink,{href:q.PF.getUrl(),target:"_blank",children:e})})})]})};function tG(){let e=(0,N.c)("marketing_announcements.automation_mandatory.initial_screen");return(0,n.jsx)(x.Bleed,{top:"$300",children:(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)(x.Heading,{level:"4",align:"center",children:e("title")}),(0,n.jsx)(x.Inset,{spacing:"$100",children:(0,n.jsx)(x.Text,{size:"small",children:e.rich("text",{br:()=>(0,n.jsx)("br",{})})})})]})})}let tY={page:{size:100},fields:{service_configuration:"automation,automation_budget,service",service:"id,name,banner_picture_url,picture"},include:["service"],meta:{service:"automation_budget_default"}},tZ=e=>
1{let t={url:`/pro_profiles/${e?.id}/service_configurations`,params:tY};return(0,eM.useQuery)({queryKey:[t],select:({data:e})=>e,enabled:!!e})};function tJ({user:e}){let t,i,r="quickconnect-mandatory",[a,l]=(0,s.useState)(!1),{data:o=[]}=tZ(e),[c,d]=(0,s.useState)("initial"),u=(0,p.tl)(),h=(t=(({onCalled:e}={})=>{let t=(0,C.A)(),i=(0,y.useMutation)({mutationFn:({id:e})=>t.patch(`/pro_profiles/${e}`,{data:{id:e,type:"pro_profile",attributes:{is_term_conditions_accepted:!0}}}),onMutate:e,onSuccess:({data:e})=>e});return async e=>{let{data:t}=await i.mutateAsync(e);return t.data}})(),i=(({onCalled:e}={})=>{let t=(0,C.A)(),i=(0,y.useMutation)({mutationFn:({id:e,budget:i,automation:r})=>t.patch(`/service_configurations/${e}`,{data:{id:e,type:"service_configuration",attributes:{automation_budget:i,automation:r}}}),onMutate:e,onSuccess:({data:e})=>e});return async e=>{let{data:t}=await i.mutateAsync(e);return t.data}})(),async({user:e,serviceConfigurations:r})=>{await t({id:e.id}),r.forEach(async e=>{"auto_purchase"!==e.automation&&await i({id:e.id,automation:"auto_purchase",budget:e.service.data.meta.automationBudgetDefault})}),await new Promise(e=>{setTimeout(e,2e3)})}),m=(0,s.useMemo)(()=>({campaign:r}),[r]),g=async()=>{l(!0);try{await h({user:e,serviceConfigurations:o}),u("quick_connect_mandatory_banner",{...m,action:"accept"})}catch(e){console.error(e)}finally{l(!1)}},b=async()=>{switch(c){case"initial":d("loading"),await g(),d("success");break;case"loading":d("success");break;case"success":d("closed")}};return(0,n.jsx)(tF,{campaignId:r,title:"",open:"closed"!==c,canClose:!0,maxCloseStatePersist:43200,footerContent:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:"initial"===c,children:(0,n.jsx)(tK,{onClick:b,isWorking:a})}),(0,n.jsx)(x.Case,{when:"loading"===c,children:(0,n.jsx)(tV,{})}),(0,n.jsx)(x.Case,{when:"success"===c,children:(0,n.jsx)(tq,{onClick:b,isWorking:a})})]}),children:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:"initial"===c,children:(0,n.jsx)(tG,{})}),(0,n.jsx)(x.Case,{when:"loading"===c,children:(0,n.jsx)(tO,{})}),(0,n.jsx)(x.Case,{when:"success"===c,children:(0,n.jsx)(tW,{})})]})})}var tQ=i(14236),tX=i.n(tQ),t0=i(73209);function t1({amount:e}){let t=(0,N.c)("pro_activation_modal.profile_offline.intro");return(0,n.jsxs)(x.Stack,{spacing:"$500",children:[(0,n.jsx)(x.Heading,{level:"3",align:"center",children:(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)("span",{className:o()("font-[90px] m-auto rounded-8 p-16 bg-red-5"),children:(0,n.jsx)(ez.N,{size:"xxlarge",color:"white"})}),t.rich("title",{amount:()=>(0,n.jsx)("span",{className:"text-indigo-8 text-[30px] px-4",children:(0,n.jsx)(eT.A,{value:e})}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",color:"inherit",children:e})})]})}),(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)(x.Text,{children:t.rich("text.1",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})}),(0,n.jsx)(x.Text,{children:t.rich("text.2",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})})]})]})}function t2({amount:e}){let t=(0,N.c)("pro_activation_modal.profile_offline.payment_account");return(0,n.jsx)("div",{className:"bg-white-0",children:(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)(x.Heading,{level:"3",weight:"weak",align:"center",children:(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)("span",{className:o()("font-[90px] m-auto rounded-8 p-16 bg-red-5"),children:(0,n.jsx)(ez.N,{size:"xxlarge",color:"white"})}),t.rich("title",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})]})}),(0,n.jsx)(x.Text,{children:t.rich("text1",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})}),(0,n.jsx)(x.Text,{children:t.rich("text2",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})}),(0,n.jsx)(x.Text,{children:t.rich("text3",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})})]})})}function t5({amount:e}){let t=(0,N.c)("pro_activation_modal.profile_offline.congratulations");return(0,n.jsxs)(x.Stack,{spacing:"$500",children:[(0,n.jsxs)(x.Stack,{spacing:"$400",children:[(0,n.jsxs)(x.Heading,{level:"3",align:"center",children:["â
"," ",t.rich("title",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})]}),(0,n.jsx)(x.Heading,{level:"4",align:"center",children:t.rich("subtitle",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})})]}),(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)(x.Text,{children:t.rich("text1",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})}),(0,n.jsx)(x.Text,{children:t.rich("text2",{amount:()=>(0,n.jsx)(eT.A,{value:e}),strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})})]})]})}var t3=i(78824),t4=i(81292);function t9({amount:e}){let t=(0,N.c)("pro_activation_modal.profile_offline.activation");return(0,n.jsx)("div",{className:"grid items-center justify-center h-[400px]",children:(0,n.jsxs)(x.Stack,{alignment:"center",spacing:"$500",children:[(0,n.jsx)(x.Heading,{level:"2",align:"center",children:t("title")}),(0,n.jsx)(x.Heading,{level:"4",align:"center",children:t.rich("subtitle",{amount:()=>(0,n.jsx)(eT.A,{value:e})})}),(0,n.jsx)(tc.aH,{size:"xlarge",color:"primary"})]})})}var t8=i(98942);function t6({open:e,onClose:t,serviceConfigurations:i}){let r=(0,N.c)("pro_activation_modal.profile_offline"),l=(0,a.useRouter)(),[o,c]=(0,s.use
1State)(!1),[d,u]=(0,s.useState)(!1),[h,m]=(0,s.useState)("loading"),p=(0,em.A)(),{data:g,refetch:b}=(0,t4.A)(!0),j=(0,t3.A)(),f=(0,t8.A)();(0,s.useEffect)(()=>{if(d){let e=setInterval(async()=>{let{data:t}=await b();t&&t.length>0&&(p.closeAll(),m("activation"),u(!1),c(!1),clearInterval(e))},5e3);return()=>clearInterval(e)}return()=>{}},[b,d]);let _=async()=>{c(!0);let e=await j();e.url&&p&&(u(!0),p.openCheckout({hostedPageUrl:e.url,onClose:async()=>{let{data:e}=await b();e&&e.length>0&&m("activation"),u(!1),c(!1)}}))},v=async()=>{"intro"===h&&g?.length===0?m("payment_account"):"intro"===h&&g&&g.length>0?m("activation"):"payment_account"===h?_():"congratulations"===h&&l.push(q.MD.getUrl())};return(0,s.useEffect)(()=>{(async()=>{"activation"===h&&(await f.mutate(i),m("congratulations"))})()},[h,i]),(0,s.useEffect)(()=>{e&&m("loading")},[e]),(0,s.useEffect)(()=>{(async()=>{"loading"===h&&(g&&g.length>0?(await new Promise(e=>{setTimeout(e,1e3)}),m("activation")):g&&0===g.length&&m("payment_account"))})()},[g,h]),(0,n.jsx)(x.ModalDialog,{title:"",size:"small",open:e&&!d,onClose:"congratulations"===h?t:void 0,hideCloseIcon:!0,footerContent:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:"loading"===h,children:(0,n.jsx)(x.Button,{working:!0,fullWidth:!0})}),(0,n.jsx)(x.Else,{children:(0,n.jsx)(x.Button,{onClick:v,working:o,fullWidth:!0,children:r(`${h}.cta`)})})]}),children:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:"intro"===h,children:(0,n.jsx)(t1,{amount:0})}),(0,n.jsx)(x.Case,{when:"loading"===h,children:(0,n.jsx)("div",{className:"flex flex-col items-center justify-center w-full h-full",children:(0,n.jsx)(x.Loader,{size:"xlarge",color:"primary"})})}),(0,n.jsx)(x.Case,{when:"payment_account"===h,children:(0,n.jsx)(t2,{amount:0})}),(0,n.jsx)(x.Case,{when:"activation"===h,children:(0,n.jsx)(t9,{amount:0})}),(0,n.jsx)(x.Case,{when:"congratulations"===h,children:(0,n.jsx)(t5,{amount:0})})]})})}function t7({amount:e}){let t=(0,N.c)("pro_activation_modal.cashback.intro");return(0,n.jsxs)(x.Stack,{spacing:"$500",children:[(0,n.jsx)(x.Heading,{level:"3",align:"center",children:(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)("span",{className:o()("text-[60px] m-auto rounded-8 p-16 bg-blue-1"),children:"\uD83D\uDCB0"}),t.rich("title",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",color:"inherit",children:e})})]})}),(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)(x.Text,{children:t.rich("text.1",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})}),(0,n.jsx)(x.Text,{children:t.rich("text.2",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})})]})]})}function ie({amount:e}){let t=(0,N.c)("pro_activation_modal.cashback.payment_account");return(0,n.jsx)("div",{className:"bg-white-0",children:(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)(x.Heading,{level:"3",weight:"weak",align:"center",children:(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)("span",{className:o()("text-[60px] m-auto rounded-8 p-16 bg-blue-1"),children:"\uD83D\uDCB0"}),t.rich("title",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})]})}),(0,n.jsx)(x.Text,{children:t.rich("text1",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})}),(0,n.jsx)(x.Text,{children:t.rich("text2",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})}),(0,n.jsx)(x.Text,{children:t.rich("text3",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})})]})})}function it({amount:e}){let t=(0,N.c)("pro_activation_modal.cashback.congratulations");return(0,n.jsxs)(x.Stack,{spacing:"$500",children:[(0,n.jsxs)(x.Stack,{spacing:"$400",children:[(0,n.jsxs)(x.Heading,{level:"3",align:"center",children:["â
"," ",t.rich("title",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})]}),(0,n.jsx)(x.Heading,{level:"4",align:"center",children:t.rich("subtitle",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})})]}),(0,n.jsxs)(x.Stack,{spacing:"$300",children:[(0,n.jsx)(x.Text,{children:t.rich("text1",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})}),(0,n.jsx)(x.Text,{children:t.rich("text2",{amount:e,strong:e=>(0,n.jsx)(x.Text,{weight:"bold",children:e})})})]})]})}function ii({amount:e}){let t=(0,N.c)("pro_activation_modal.cashback.activation");return(0,n.jsx)("div",{className:"grid items-center justify-center h-[400px]",children:(0,n.jsxs)(x.Stack,{alignment:"center",spacing:"$500",children:[(0,n.jsx)(x.Heading,{level:"2",align:"center",children:t("title")}),(0,n.jsx)(x.Heading,{level:"4",align:"center",children:t.rich("subtitle",{amount:e})}),(0,n.jsx)(tc.aH,{size:"xlarge",color:"primary"})]})})}let ir="intro";function is({amount:e,open:t,onClose:i,serviceConfigurations:r}){let l=(0,N.c)("pro_activation_modal.cashback"),o=(0,N.c)("common.ui_actions"),c=(0,a.useRouter)(),[d,u]=(0,s.use
1State)(!1),[h,m]=(0,s.useState)(!1),[p,g]=(0,s.useState)(ir),b=(0,em.A)(),{data:j,refetch:f}=(0,t4.A)(!0),_=(0,t3.A)(),v=(0,t8.A)();(0,s.useEffect)(()=>{if(h){let e=setInterval(async()=>{let{data:t}=await f();t&&t.length>0&&(b.closeAll(),g("activation"),m(!1),u(!1),clearInterval(e))},5e3);return()=>clearInterval(e)}return()=>{}},[f,h]);let w=async()=>{u(!0);let e=await _();e.url&&b&&(m(!0),b.openCheckout({hostedPageUrl:e.url,onClose:async()=>{let{data:e}=await f();e&&e.length>0&&g("activation"),m(!1),u(!1)}}))},y=async()=>{"intro"===p&&j?.length===0?g("payment_account"):"intro"===p&&j&&j.length>0?g("activation"):"payment_account"===p?w():"congratulations"===p&&c.push(q.MD.getUrl())};return(0,s.useEffect)(()=>{(async()=>{"activation"===p&&(await v.mutate(r),g("congratulations"))})()},[p,r]),(0,s.useEffect)(()=>{t&&g(ir)},[t]),(0,s.useEffect)(()=>{(async()=>{"loading"===p&&(j&&j.length>0?(await new Promise(e=>{setTimeout(e,1e3)}),g("activation")):j&&0===j.length&&g("payment_account"))})()},[j,p]),(0,n.jsx)(x.ModalDialog,{title:"",size:"small",open:t&&!h,onClose:"congratulations"===p?i:void 0,hideCloseIcon:!0,footerContent:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:"loading"===p,children:(0,n.jsx)(x.Button,{working:!0,fullWidth:!0})}),(0,n.jsx)(x.Case,{when:"payment_account"===p,children:(0,n.jsx)(x.Button,{onClick:y,working:d,fullWidth:!0,children:l(`${p}.cta`)})}),(0,n.jsx)(x.Else,{children:(0,n.jsx)(x.Button,{onClick:y,working:d,fullWidth:!0,children:o("next")})})]}),children:(0,n.jsxs)(x.Match,{children:[(0,n.jsx)(x.Case,{when:"intro"===p,children:(0,n.jsx)(t7,{amount:e})}),(0,n.jsx)(x.Case,{when:"loading"===p,children:(0,n.jsx)("div",{className:"flex flex-col items-center justify-center w-full h-full",children:(0,n.jsx)(x.Loader,{size:"xlarge",color:"primary"})})}),(0,n.jsx)(x.Case,{when:"payment_account"===p,children:(0,n.jsx)(ie,{amount:e})}),(0,n.jsx)(x.Case,{when:"activation"===p,children:(0,n.jsx)(ii,{amount:e})}),(0,n.jsx)(x.Case,{when:"congratulations"===p,children:(0,n.jsx)(it,{amount:e})})]})})}function ia({user:e}){(0,em.A)(),(0,ex.A)();let{data:t}=tZ(e),i=(0,a.useSearchParams)(),r=i?.get("offer")||{},{currency:l}=(0,eN.L)(),o=t?(e=>{if(0===e.length)return 200;let[t]=e;return 4*t.service.data.meta.automationBudgetDefault})(t)/((0,eS.rx)(l)?1:100):void 0,c=tX()(r,"_")[0],d=parseInt(tX()(r,"_")[1],10),u=o?Math.min(d,o):d,h=!!(c&&u),[x,m]=(0,s.useState)(h);return t?(0,n.jsxs)(n.Fragment,{children:["cash"===c&&u&&(0,n.jsx)(t0.A,{amount:u,open:x,onClose:()=>m(!1),user:e,serviceConfigurations:t}),"cashback"===c&&u&&(0,n.jsx)(is,{amount:u,open:x,onClose:()=>m(!1),serviceConfigurations:t}),"profile-not-visible"===c&&(0,n.jsx)(t6,{open:!0,onClose:()=>m(!1),serviceConfigurations:t})]}):null}let il=()=>{let e=(0,N.c)("marketing_announcements.account_paused");return(0,n.jsx)("div",{className:"p-4 pt-2 md:p-8 md:pt-2 md:pb-4",children:(0,n.jsx)(tz.A,{color:"red",buttonColor:"white",onClose:void 0,campaignId:"paused",disableCollapse:!0,heroTitle:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(x.Text,{color:"inherit",size:"large",weight:"bold",children:e.rich("title",{br:()=>(0,n.jsx)("br",{})})})}),ctaText:e("button"),heroSubtitle:(0,n.jsx)(n.Fragment,{}),link:q.YK.getUrl(),maxCloseStatePersist:86400,variant:"lg"})})};function io({user:e}){let t,i,r,s,l,o=(t=e.businesses.data?.[0].proProfiles.data?.[0].isPaused,i=e.businesses.data?.[0].meta.nbQuickConnectPendingInvoices,r=e.businesses.data?.[0].meta.nbValidPaymentAccounts,s=e.businesses.data?.[0].meta.quickConnectStatus,l=(0,a.useSearchParams)(),t?"account_paused":l?.get("offer")?"marketing_offer":0===r&&"disabled"!==s||l?.get("automatedPurchaseIssue")?"payment_method_missing":i>0?"payment_due":0===r?"automation":null);return o?(0,n.jsxs)(J.YG,{children:[(0,n.jsx)(J.di,{when:"account_paused"===o,children:(0,n.jsx)(il,{})}),(0,n.jsx)(J.di,{when:"payment_method_missing"===o,children:(0,n.jsx)(tU,{})}),(0,n.jsx)(J.di,{when:"payment_due"===o,children:(0,n.jsx)(tH,{})}),(0,n.jsx)(J.di,{when:"full_automation"===o,children:(0,n.jsx)(tJ,{user:e})}),(0,n.jsx)(J.di,{when:"automation"===o,children:(0,n.jsx)(tM,{})}),(0,n.jsx)(J.di,{when:"marketing_offer"===o,children:(0,n.jsx)(ia,{user:e})})]}):null}var ic=i(47650),id=i(63691);function iu({open:e,onClose:t,user:i}){let r=(0,a.useRouter)(),l=(0,a.usePathname)(),o=(0,a.useSearchParams)(),{handleLinkClick:h,userMode:{pageMode:m}}=(0,d.useHeaderContext)(),{mobileMenuLinks:p}=(0,c.c)(),b=(0,N.c)("header.links"),j=(0,N.c)("pro_settings_page.navigation"),f=!!(i&&(0,G.AG)(i)),_=i?.businesses.data?.[0]?.proProfiles.data?.[0],v=e=>{t(),h(e)};return(0,n.jsx)(id.Drawer.Root,{open:e,onClose:t,onOpenChange:e=>!e&&t(),direction:"right",children:(0,n.jsxs)(id.Drawer.Portal,{children:[(0,n.jsx)(id.Drawer.Overlay,{className:"fixed inset-0 z-[350] bg-black-0/40"}),(0,n.jsxs)(id.Drawer.Content,{className:"fixed inset-y-0 right-0 z-[360] flex h-full w-[85vw] max-w-[320px] flex-col bg-white-0","aria-describedby":void 0,style:{borderRadius:"20px 0 0 20px"},children:[(0,n.jsx)(id.Drawer.Title,{asChild:!0,children:(0,n.jsx)("div",{className:"h-[61
1px] flex-shrink-0 pr-24 w-full border-solid border-0 border-b-1 border-gray-1 flex justify-end items-center",children:(0,n.jsx)("div",{className:"cursor-pointer text-gray-7 hover:text-gray-9",tabIndex:0,role:"button",onClick:t,children:(0,n.jsx)(g.Close,{color:"inherit",size:"medium"})})})}),_&&(0,n.jsx)(e1,{hasBg:!0,user:i}),_&&m===u.b.PRO&&(0,n.jsx)(eG,{fullWidth:!0,user:i,variant:"mobile"}),i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"px-[16px] py-[8px]",children:(0,n.jsx)(tw.A,{user:i,menuMode:!0})}),(0,n.jsx)(x.Divider,{})]}),(0,n.jsxs)("div",{className:"flex h-full flex-col overflow-y-auto pt-[8px] pb-[calc(24px+env(safe-area-inset-bottom,0px))] space-y-[4px]",children:[p.map((e,t)=>(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(Z,{links:e,hasLimitReached:f}),t!==p.length-1&&(0,n.jsx)(x.Divider,{})]},e[0]?.label||t)),(0,n.jsx)("div",{className:"flex-grow"}),m===u.b.PRO&&(0,n.jsx)(Y,{url:q.r0.getUrl(),label:b("switch_to_customer"),index:q.r0.index,onClick:()=>v("switchToCustomer")}),m===u.b.PRO_AS_CUSTOMER&&(0,n.jsx)(Y,{url:q.MD.getUrl({params:{filter:""}}),label:b("switch_to_pro"),index:q.MD.index,onClick:()=>v("switchToPro")}),m!==u.b.GUEST&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y,{url:q.YK.getUrl(),label:j("account_settings"),index:q.Y0.index}),(0,n.jsx)("div",{className:"group",children:(0,n.jsx)(Y,{label:(0,n.jsx)(K.A,{label:b("notifications"),hoverParent:!0}),index:"",onClick:()=>{t(),r.push(`${l}?${o}&pwa=true`)}})}),m===u.b.PRO&&(0,n.jsx)("div",{className:"group",children:(0,n.jsx)(Y,{url:q.Y0.getUrl(),label:(0,n.jsx)(K.A,{label:j("widgets"),hoverParent:!0}),index:q.Y0.index})}),(0,n.jsx)(Y,{label:b("logout"),index:q.yG.index,url:q.yG.getUrl()})]})]})]})]})})}function ih({user:e,updatedLeadsCount:t}){let i=(0,N.c)("header.links"),r=(0,a.usePathname)(),l=(0,a.useSearchParams)(),{unreadCount:o}=(0,tx.U)(),[c,d]=(0,s.useState)(!1),[u,h]=(0,s.useState)(!1),[x,m]=(0,s.useState)("");(0,s.useEffect)(()=>{h(!0),m(window.location.pathname);let e=()=>{setTimeout(()=>m(window.location.pathname),0)};window.addEventListener("popstate",e);let t=window.history.pushState.bind(window.history),i=window.history.replaceState.bind(window.history);return window.history.pushState=(...i)=>{t(...i),e()},window.history.replaceState=(...t)=>{i(...t),e()},()=>{window.removeEventListener("popstate",e),window.history.pushState=t,window.history.replaceState=i}},[]);let p=/\/pro\/messenger\/.+\/.+/.test(x),b=/\/pro\/leads\/.+/.test(x)||!!l.get("selectedLeadId"),j=x.startsWith("/client/")||x.startsWith("/request-overview"),f=p||b||j;(0,s.useEffect)(()=>(f?document.body.classList.remove("has-pro-tab-bar"):document.body.classList.add("has-pro-tab-bar"),()=>{document.body.classList.remove("has-pro-tab-bar")}),[f]);let _=e?.businesses?.data?.[0]?.proProfiles?.data?.[0],v=t??_?.meta?.notificationsNb?.leads,w=r?.startsWith("/pro/messenger")??!1,y=r?.startsWith("/pro/leads")??!1,C=[{key:"messenger",href:q.Uv.getUrl(),label:i("user_messenger"),icon:(0,n.jsx)(g.Messages,{size:"medium"}),activeIcon:(0,n.jsx)(g.MessagesFilled,{size:"medium"}),isActive:w,badge:o},{key:"leads",href:q.MD.getUrl(),label:i("pro_leads"),icon:(0,n.jsx)(g.Flash,{size:"medium"}),activeIcon:(0,n.jsx)(g.FlashFilled,{size:"medium"}),isActive:y,badge:v},{key:"menu",label:"Menu",icon:(0,n.jsx)(g.Menu,{size:"medium"}),activeIcon:(0,n.jsx)(g.Menu,{size:"medium"}),isActive:!1,onClick:()=>d(!0)}],k=(0,s.useRef)(null),[A,S]=(0,s.useState)({left:0,width:0,ready:!1}),T=C.findIndex(e=>e.isActive),P=(0,s.useCallback)(()=>{let e=k.current;if(T<0||!e)return void S(e=>({...e,ready:!1}));let t=e.getBoundingClientRect().width/C.length;S({left:t*T,width:t,ready:!0})},[T,C.length]);(0,s.useEffect)(()=>{let e=requestAnimationFrame(P);return()=>cancelAnimationFrame(e)},[P,f]),(0,s.useEffect)(()=>(window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)),[P]);let z=u&&!f,M=(0,s.useRef)(null);return((0,s.useEffect)(()=>{let e=M.current;if(!e||!z)return document.documentElement.style.setProperty("--mobile-tab-bar-height","0px"),()=>{};let t=new ResizeObserver(()=>{let t=e.getBoundingClientRect().height;document.documentElement.style.setProperty("--mobile-tab-bar-height",`${t}px`)});return t.observe(e),()=>t.disconnect()},[z]),(0,s.useEffect)(()=>()=>{document.documentElement.style.setProperty("--mobile-tab-bar-height","0px")},[]),u)?(0,ic.createPortal)((0,n.jsxs)("div",{ref:M,className:`fixed left-0 right-0 bottom-0 z-[340] md:hidden transition-[transform,opacity] duration-300 ease-out-expo ${z?"translate-y-0 opacity-100":"translate-y-[calc(100%+16px)] opacity-0 pointer-events-none"}`,style:{paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:[(0,n.jsxs)("nav",{ref:k,className:"relative border-0 border-t border-solid overflow-hidden",style:{background:"linear-gradient(180deg, rgba(235,242,255,0.82) 0%, rgba(225,236,252,0.72) 100%)",backdropFilter:"blur(40px) saturate(200%)",WebkitBackdropFilter:"blur(40px) saturate(200%)",borderColor:"rgba(0,0,0,0.10)",boxShadow:"inset 0 1px 0 rgba(255,255,255,0.85), 0 -2px 6px rgba(0,0,0,0.08)"},children:[(0,n.jsx)("div",{className:"absolute top-0 left-[5%] right-[5%] h-[1px] z-[2]",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent)"}}),(0,n.jsx)("div",{className:"absolute z-0 rounded-[14px]",style:{to
1p:4,bottom:4,left:A.left+4,width:A.width-8,opacity:+!!A.ready,background:"rgba(255,255,255,0.85)",border:"1px solid rgba(74,135,248,0.22)",boxShadow:"0 1px 4px rgba(40,80,200,0.28)",transition:A.ready?"left 350ms cubic-bezier(0.32, 0.72, 0, 1), width 350ms cubic-bezier(0.32, 0.72, 0, 1), opacity 150ms ease":"none"}}),(0,n.jsx)("div",{className:"relative z-[1] flex h-[72px] items-stretch",children:C.map(e=>{let t=e.isActive?"#007AFF":"#1C1C1E",i=(0,n.jsxs)("div",{className:"relative flex flex-1 flex-col items-center justify-center gap-[2px] active:opacity-60 transition-opacity duration-100",children:[(0,n.jsx)("div",{className:"relative",style:{color:t},children:(0,n.jsx)(O.Ex,{count:e.badge||0,overflowCount:99,children:e.isActive?e.activeIcon:e.icon})}),(0,n.jsx)("span",{className:"text-[12px] leading-tight",style:{color:t,fontWeight:600},children:e.label})]});return e.href?(0,n.jsx)(H(),{href:e.href,prefetch:!1,className:"flex flex-1 no-underline",children:i},e.key):(0,n.jsx)("button",{type:"button",className:"flex flex-1 border-0 bg-transparent cursor-pointer p-0",onClick:e.onClick,children:i},e.key)})})]}),(0,n.jsx)(iu,{open:c,onClose:()=>d(!1),user:e})]}),document.body):null}function ix({open:e,onClose:t,user:i}){let r=(0,a.useRouter)(),l=(0,a.usePathname)(),o=(0,a.useSearchParams)(),{handleLinkClick:h,userMode:{pageMode:m}}=(0,d.useHeaderContext)(),{mobileMenuLinks:p}=(0,c.c)(),b=(0,N.c)("header.links");return(0,n.jsx)(id.Drawer.Root,{open:e,onClose:t,onOpenChange:e=>!e&&t(),direction:"right",children:(0,n.jsxs)(id.Drawer.Portal,{children:[(0,n.jsx)(id.Drawer.Overlay,{className:"fixed inset-0 z-[350] bg-black-0/40"}),(0,n.jsxs)(id.Drawer.Content,{className:"fixed inset-y-0 right-0 z-[360] flex h-full w-[85vw] max-w-[320px] flex-col bg-white-0","aria-describedby":void 0,style:{borderRadius:"20px 0 0 20px"},children:[(0,n.jsx)(id.Drawer.Title,{asChild:!0,children:(0,n.jsx)("div",{className:"h-[61px] flex-shrink-0 pr-24 w-full border-solid border-0 border-b-1 border-gray-1 flex justify-end items-center",children:(0,n.jsx)("div",{className:"cursor-pointer text-gray-7 hover:text-gray-9",tabIndex:0,role:"button",onClick:t,children:(0,n.jsx)(g.Close,{color:"inherit",size:"medium"})})})}),(0,n.jsx)(e1,{hasBg:!0,user:i}),(0,n.jsxs)("div",{className:"flex h-full flex-col overflow-y-auto pt-[8px] pb-[calc(24px+env(safe-area-inset-bottom,0px))] space-y-[4px]",children:[p.map((e,t)=>(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(Z,{links:e,hasLimitReached:!1}),t!==p.length-1&&(0,n.jsx)(x.Divider,{})]},e[0]?.label||t)),(0,n.jsx)("div",{className:"flex-grow"}),m===u.b.PRO_AS_CUSTOMER&&(0,n.jsx)(Y,{url:q.MD.getUrl({params:{filter:""}}),label:b("switch_to_pro"),index:q.MD.index,onClick:()=>{t(),h("switchToPro")}}),m!==u.b.GUEST&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y,{url:q.AF.getUrl(),label:b("pro_setting"),index:q.AF.index}),(0,n.jsx)("div",{className:"group",children:(0,n.jsx)(Y,{label:(0,n.jsx)(K.A,{label:b("notifications"),hoverParent:!0}),index:"",onClick:()=>{t(),r.push(`${l}?${o}&pwa=true`)}})}),(0,n.jsx)(Y,{label:b("logout"),index:q.yG.index,url:q.yG.getUrl()})]})]})]})]})})}function im({user:e}){let t=(0,N.c)("tabbar.tab"),i=(0,a.usePathname)(),[r,l]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),[d,u]=(0,s.useState)("");(0,s.useEffect)(()=>{c(!0),u(window.location.pathname);let e=()=>{setTimeout(()=>u(window.location.pathname),0)};window.addEventListener("popstate",e);let t=window.history.pushState.bind(window.history),i=window.history.replaceState.bind(window.history);return window.history.pushState=(...i)=>{t(...i),e()},window.history.replaceState=(...t)=>{i(...t),e()},()=>{window.removeEventListener("popstate",e),window.history.pushState=t,window.history.replaceState=i}},[]);let h=["/client/dashboard","/client/new-request","/client/messenger","/settings"].some(e=>d.startsWith(e))||["/"].includes(d),x=["/request-overview"].some(e=>d.startsWith(e)),m=/\/client\/messenger\/.+\/.+/.test(d),p=!h||x||m;(0,s.useEffect)(()=>(p?document.body.classList.remove("has-client-tab-bar"):document.body.classList.add("has-client-tab-bar"),()=>{document.body.classList.remove("has-client-tab-bar")}),[p]);let b=i?.startsWith("/client/new-request")??!1,j=(i?.startsWith("/client/dashboard")??!1)&&!b,f=[{key:"new-project",href:q.fz.getUrl(),label:t("new_project"),icon:(0,n.jsx)(g.Add,{size:"medium"}),activeIcon:(0,n.jsx)(g.Add,{size:"medium"}),isActive:b},{key:"projects",href:q.r0.getUrl(),label:t("projects"),icon:(0,n.jsx)(g.Home,{size:"medium"}),activeIcon:(0,n.jsx)(g.Home,{size:"medium"}),isActive:j},{key:"menu",label:"Menu",icon:(0,n.jsx)(g.Menu,{size:"medium"}),activeIcon:(0,n.jsx)(g.Menu,{size:"medium"}),isActive:!1,onClick:()=>l(!0)}
1],_=(0,s.useRef)(null),[v,w]=(0,s.useState)({left:0,width:0,ready:!1}),y=f.findIndex(e=>e.isActive),C=(0,s.useCallback)(()=>{let e=_.current;if(y<0||!e)return void w(e=>({...e,ready:!1}));let t=e.getBoundingClientRect().width/f.length;w({left:t*y,width:t,ready:!0})},[y,f.length]);(0,s.useEffect)(()=>{let e=requestAnimationFrame(C);return()=>cancelAnimationFrame(e)},[C,p]),(0,s.useEffect)(()=>(window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)),[C]);let k=o&&!p,A=(0,s.useRef)(null);return((0,s.useEffect)(()=>{let e=A.current;if(!e||!k)return document.documentElement.style.setProperty("--mobile-tab-bar-height","0px"),()=>{};let t=new ResizeObserver(()=>{let t=e.getBoundingClientRect().height;document.documentElement.style.setProperty("--mobile-tab-bar-height",`${t}px`)});return t.observe(e),()=>t.disconnect()},[k]),(0,s.useEffect)(()=>()=>{document.documentElement.style.setProperty("--mobile-tab-bar-height","0px")},[]),o)?(0,ic.createPortal)((0,n.jsxs)("div",{ref:A,className:`fixed left-0 right-0 bottom-0 z-[340] md:hidden transition-[transform,opacity] duration-300 ease-out-expo ${k?"translate-y-0 opacity-100":"translate-y-[calc(100%+16px)] opacity-0 pointer-events-none"}`,style:{paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:[(0,n.jsxs)("nav",{ref:_,className:"relative border-0 border-t border-solid overflow-hidden",style:{background:"linear-gradient(180deg, rgba(235,242,255,0.82) 0%, rgba(225,236,252,0.72) 100%)",backdropFilter:"blur(40px) saturate(200%)",WebkitBackdropFilter:"blur(40px) saturate(200%)",borderColor:"rgba(0,0,0,0.10)",boxShadow:"inset 0 1px 0 rgba(255,255,255,0.85), 0 -2px 6px rgba(0,0,0,0.08)"},children:[(0,n.jsx)("div",{className:"absolute top-0 left-[5%] right-[5%] h-[1px] z-[2]",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent)"}}),(0,n.jsx)("div",{className:"absolute z-0 rounded-[14px]",style:{top:4,bottom:4,left:v.left+4,width:v.width-8,opacity:+!!v.ready,background:"rgba(255,255,255,0.85)",border:"1px solid rgba(74,135,248,0.22)",boxShadow:"0 1px 4px rgba(40,80,200,0.28)",transition:v.ready?"left 350ms cubic-bezier(0.32, 0.72, 0, 1), width 350ms cubic-bezier(0.32, 0.72, 0, 1), opacity 150ms ease":"none"}}),(0,n.jsx)("div",{className:"relative z-[1] flex h-[72px] items-stretch",children:f.map(e=>{let t=e.isActive?"#007AFF":"#1C1C1E",i=(0,n.jsxs)("div",{className:"relative flex flex-1 flex-col items-center justify-center gap-[2px] active:opacity-60 transition-opacity duration-100",children:[(0,n.jsx)("div",{className:"relative",style:{color:t},children:(0,n.jsx)(O.Ex,{count:e.badge||0,overflowCount:99,children:e.isActive?e.activeIcon:e.icon})}),(0,n.jsx)("span",{className:"text-[12px] leading-tight",style:{color:t,fontWeight:600},children:e.label})]});return e.href?(0,n.jsx)(H(),{href:e.href,prefetch:!1,className:"flex flex-1 no-underline",children:i},e.key):(0,n.jsx)("button",{type:"button",className:"flex flex-1 border-0 bg-transparent cursor-pointer p-0",onClick:e.onClick,children:i},e.key)})})]}),(0,n.jsx)(ix,{open:r,onClose:()=>l(!1),user:e})]}),document.body):null}function ip({updatedLeadsCount:e}){let t=(0,a.usePathname)(),{mainLinks:i}=(0,c.c)(),{user:r,refetchUser:l,userMode:{pageMode:x}}=(0,d.useHeaderContext)();(0,s.useEffect)(()=>{e&&l()},[e]);let m=(0,h.rC)(t||""),p=i.some(e=>e.notificationNumber),g=t?.startsWith("/request-overview")||/\/client\/messenger\/.+\/.+/.test(t||"")||/\/pro\/messenger\/.+\/.+/.test(t||"")||/\/pro\/leads\/.+/.test(t||"");return void 0!==r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("header",{className:o()("relative border-0 border-b-1 border-solid border-gray-1 bg-white-0 shadow-100",{"hidden md:block":x!==u.b.GUEST&&g,"mobile-header-auto":x!==u.b.GUEST&&!g}),children:[!m&&x!==u.b.GUEST&&(0,n.jsx)(to,{}),(0,n.jsx)(W,{hasNotificationIcon:x===u.b.PRO&&(p||!!(r&&(0,G.AG)(r))),children:(0,n.jsxs)("div",{className:"flex h-full w-full items-center space-x-4",children:[x===u.b.GUEST&&(0,n.jsx)(tS,{}),r&&(0,n.jsxs)(n.Fragment,{children:[(x===u.b.CUSTOMER||x===u.b.PRO_AS_CUSTOMER)&&(0,n.jsx)(tA,{user:r}),x===u.b.PRO&&(0,n.jsx)(tP,{user:r})]})]})}),(0,n.jsx)(e5,{user:r||null}),x!==u.b.GUEST&&(0,n.jsx)(B,{}),x===u.b.PRO&&r&&(0,n.jsx)(io,{user:r})]}),x===u.b.PRO&&r&&(0,n.jsx)(ih,{user:r,updatedLeadsCount:e}),(x===u.b.CUSTOMER||x===u.b.PRO_AS_CUSTOMER)&&r&&(0,n.jsx)(im,{user:r})]})||(0,n.jsx)(th,{})}},57884:(e,t,i)=>{"use strict";i.d(t,{default:()=>a});var r=i(95155),n=i(2961),s=i.n(n);let a=({href:e,target:t="_self",onClick:i,className:n,dataCy:a,dataTest:l,children:o})=>{let c=()=>{(i?.(),"_blank"===t)?window.open(e,"_blank","noopener,noreferrer"):window.location.href=e};return(0,r.jsx)("span",{role:"link",tabIndex:0,onClick:c,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),c())},className:s()("cursor-pointer",n),"data-cy":a,"data-test":l,children:o})}},60037:(e,t,i)=>{"use strict";i.d(t,{MQ:()=>o,Mt:()=>u,OS:()=>l,qO:()=>x,u9:()=>h,wv:()=>d,yT:()=>c});var r=i(76464),n=i(80297);let s=[r.nR.ProfileOptimization,r.nR.ClientsVisibilityExtra,r.nR.ClientsVisibilityMaximum],a={[r.nR.ProfileOptimization]:"pricing_page.card.features.profile_optimization",[r.nR.ClientsVisibilityExtra]:"pricing_page.card.features.clients_visibility_extra",[r.nR.ClientsVisibilityMaximum]:"pricing_page.card.features.clients_visibility_maximum"},l=e=>["basic","professional","enterprise"].includes(e),o=e=>"basic"===e?"pricing_page.card.individual.title":"professional"===e?"pricing_page.card.professional.title":"enterprise"===e?"pricing_page.card.enterprise.title":"pricing_page.card.legacy.title",c=e=>"basic"===e?"pricing_page.card.individual.description":"professional"===e?"pricing_page.card.professional.description":"enterprise"===e?"pricing_page.card.enterprise.description":"",d=(e,t,i)=>e?{name:"turbo",label:i.rich("pricing_page.card.features.turbo_limit",{limit:t,strong:n.k})}:{name:"turbo",label:i.rich("pricing_page.card.features.turbo_unlimited",{strong:n.k})},u=(e,t,i)=>e?{name:"interaction",label:i.rich("pricing_page.card.features.interaction_limit",{limit:t,strong:n.k})}:{name:"interaction",label:i.rich("pricing_page.card.features.interaction_unlimited",{strong:n.k})},h=(e,t)=>e.map(e=>{if(Object.values(s).includes(e))return{name:"",label:t.rich(a[e],{strong:n.k})}}).filter(e=>e),x=(e,t,i)=>e?t.subscriptionPricingList[0]:t.subscriptionPricingList.find(e=>e.periodUnit===i)},60644:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var r=i(95155),n=i(95203),s=i(12115),a=i(2961),l=i.n(a);function o({size:e=8,active:t}){return(0,r.jsxs)("span",{className:"relative flex items-center justify-center flex-shrink-0 z-[2]",style:{width:e+12,height:e+12},children:[(0,r.jsx)("span",{className:"rounded-full",style:{width:e,height:e,backgroundColor:t?"#34D399":"#94A3B8"}}),t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"absolute rounded-full",style:{width:e,height:e,backgroundColor:"#34D399",animation:"meeta-sonar 4s ease-out infinite"}}),(0,r.jsx)("span",{className:"absolute rounded-full",style:{width:e,height:e,backgroundColor:"#34D399",animation:"meeta-sonar 4s ease-out infinite 2s"}})]})]})}function c(){return(0,r.jsx)("span",{className:"absolute inset-0 z-[3] pointer-events-none overflow-hidden",style:{borderRadius:"inherit"},children:(0,r.jsx)("span",{className:"absolute top-0 bottom-0",style:{width:"40%",left:"-100%",background:"linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%)",animation:"meeta-shimmer 6s ease-in-out infinite"}})})}function d({borderRadius:e}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"absolute z-[0]",style:{inset:-4,borderRadius:e+2,background:"linear-gradient(-45deg, #2563EB, #7C3AED, #EC4899, #F59
1E0B, #2563EB, #7C3AED)",backgroundSize:"400% 400%",animation:"meeta-promo-gradient 3.5s ease infinite"}}),(0,r.jsx)("span",{className:"absolute inset-0 z-[1]",style:{borderRadius:e,background:"rgba(255,255,255,0.82)",backdropFilter:"blur(6px)"}})]})}function u({variant:e,onClick:t,compact:i=!1,className:n,menuMode:a=!1,mobileHeader:h=!1}){let x="on"===e,m="promo"===e,p="off"===e,[g,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>{if(!h)return;let e=window.matchMedia("(max-width: 359px)");b(e.matches);let t=e=>b(e.matches);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[h]);let j=(0,s.useCallback)(e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())},[t]),f="Meeta";x?f="Ouvrir Meeta":m&&(f="Decouvrir Meeta");let _={role:"button",tabIndex:0,"aria-label":f,onClick:t,onKeyDown:j,"data-meeta-btn":""},v={background:"linear-gradient(-45deg, #4338CA, #5B4ED8, #6366F1, #7C5CE7, #4F46E5, #4338CA)",backgroundSize:"350% 350%",animation:"meeta-glow 8s ease-in-out infinite",border:"none"},w={animation:"meeta-breathe 3s ease-in-out infinite"};if(a)return(0,r.jsxs)("div",{..._,className:l()("relative isolate flex items-center gap-[8px] w-full cursor-pointer","px-[12px] py-[8px]",p&&"bg-gray-0 border border-solid border-gray-3 hover:bg-gray-1",n),style:{borderRadius:12,...x?v:{},...m?w:{}},children:[m&&(0,r.jsx)(d,{borderRadius:12}),m&&(0,r.jsx)(c,{}),(x||m)&&(0,r.jsx)(o,{size:7,active:x}),(0,r.jsx)("span",{className:l()("text-[13px] font-semibold leading-none z-[2]",{"text-white-0":x,"text-indigo-8":m}),children:"Meeta"}),(0,r.jsx)("span",{className:l()("ml-auto flex-shrink-0 text-[11px] leading-none z-[2]",{"text-white-0 opacity-70":x,"text-gray-5":p,"text-indigo-8 opacity-60":m}),children:x?"Configurer":m?"Decouvrir":"En savoir plus"})]});if(i||g){let e=h?28:34;return(0,r.jsxs)("div",{..._,className:l()("relative isolate inline-flex items-center justify-center cursor-pointer",p&&"bg-gray-0 border border-solid border-gray-3 hover:bg-gray-1",n),style:{width:e,height:e,borderRadius:"50%",...x?v:{},...m?{...w,borderRadius:"50%"}:{}},children:[m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"absolute z-[0]",style:{inset:-4,borderRadius:"50%",background:"linear-gradient(-45deg, #2563EB, #7C3AED, #EC4899, #F59E0B, #2563EB, #7C3AED)",backgroundSize:"400% 400%",animation:"meeta-promo-gradient 3.5s ease infinite"}}),(0,r.jsx)("span",{className:"absolute inset-0 z-[1]",style:{borderRadius:"50%",background:"rgba(255,255,255,0.82)"}}
1)]}),(0,r.jsx)(o,{size:h?6:7,active:x})]})}let y=h?16:22,C=h?"py-[5px] px-[12px]":"py-[6px] px-[16px]";return(x||m)&&(C=h?"py-[5px] pl-[6px] pr-[12px]":"py-[6px] pl-[8px] pr-[16px]"),(0,r.jsxs)("div",{role:"button",tabIndex:0,"aria-label":f,onClick:t,onKeyDown:j,className:l()("relative isolate inline-flex items-center gap-[4px] cursor-pointer",C,p&&"bg-gray-0 border border-solid border-gray-3 hover:bg-gray-1",n),style:{borderRadius:y,...x?v:{},...m?w:{}},children:[m&&(0,r.jsx)(d,{borderRadius:y}),m&&(0,r.jsx)(c,{}),(x||m)&&(0,r.jsx)(o,{size:h?6:7,active:x}),(0,r.jsx)("span",{className:l()(h?"text-[12px]":"text-[13px]","font-semibold leading-none z-[2]",{"text-white-0":x,"text-indigo-8":m}),children:"Meeta"})]})}function h({user:e,...t}){let{meetaActive:i}=function(e){if(!e)return{meetaActive:!1};let t=Array.isArray(e.businesses)?e.businesses[0]:e.businesses?.data?.[0],i=Array.isArray(t?.proProfiles)?t?.proProfiles?.[0]:t?.proProfiles?.data?.[0];return{meetaActive:!!i?.meta?.meetaEnabled,userName:e.fullName,userPhone:e.phoneNumber,proId:i?.id}}(e),{openSettings:s}=(0,n.b)();return(0,r.jsx)(u,{variant:i?"on":"promo",onClick:()=>{i?s():window.open("/go/get_meeta_quick_start","_blank")},...t})}i(80975)},60794:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var r=i(95155),n=i(72867);let s=({onLoad:e})=>(0,r.jsx)(n.default,{src:"https://js.chargebee.com/v2/chargebee.js","data-cb-gtm-enabled":"true",onLoad:e})},63292:(e,t,i)=>{"use strict";i.d(t,{C:()=>l,W:()=>o});let r={ar:"arabic",id:"chinese",ja:"chinese",ko:"chinese",lo:"chinese",ms:"chinese",th:"chinese",zh:"chinese",vi:"chinese",fa:"german",da:"german",de:"german",en:"german",es:"german",fi:"german",el:"german",he:"german",hu:"german",it:"german",nl:"german",no:"german",pt:"german",sv:"german",fr:"french",tl:"french",tr:"french","pt-br":"french",ru:"russian",cs:"czech",sk:"czech",pl:"polish",hr:"croatian",sr:"croatian",lt:"lithuanian",is:"icelandic",sl:"slovenian"};var n=i(58056);let s=["zero","one","two","few","many","other"],a={arabic:e=>e<3?e:e%100>=3&&e%100<=10?3:e%100>=11?4:5,chinese:()=>5,german:e=>e<2?e:5,french:e=>e<2?e:5,russian:e=>e%10==1&&e%100!=11?1:[2,3,4].indexOf(e%10)>=0&&0>[12,13,14].indexOf(e%100)?3:e%10==0||[5,6,7,8,9].indexOf(e%10)>=0||[11,12,13,14].indexOf(e%100)>=0?4:5,czech:e=>1===e?1:e>=2&&e<=4?3:5,polish:e=>1===e?1:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?3:5,icelandic:e=>e%10!=1||e%100==11?5:1,slovenian:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:5,croatian:e=>e%10==1&&e%100!=11?1:[2,3,4].indexOf(e%10)>=0&&0>[12,13,14].indexOf(e%100)?3:5,lithuanian:e=>e%10==1&&e%100!=11?1:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?3:5},l=(e,t,i)=>{if(t<0)return console.error(`The value ${t} for key ${e} is negative!`),e;let n=r[i.slice(0,2)]||"german",l=s[a[n]?.(t)];return`${e}.${l}`},o=()=>{let e=(0,n.Ym)();return(t,i)=>l(t,i,e)}},68870:(e,t,i)=>{"use strict";i.d(t,{K:()=>r});let r={NAME:"StarOfService",CAPITAL:31521.93,POSTAL_ADDRESS:"128 rue La Bo\xe9tie, 75008 Paris, France",REPRESENTANTS:"Lucas LAMBERTINI, Toni PAIGNANT, Mael LECLAIR",CONTACT_EMAIL:"[email protected]",PRESS_ENQUIRY_CONTACT_EMAIL:"[email protected]",DISABLE_ACCOUNT_EMAIL:"[email protected]",EDAA_LINK:"https://www.youronlinechoices.com/fr/controler-ses-cookies/",APPS:{appStore:"https://itunes.apple.com/fr/app/starofservice/id1265662150?l=en&mt=8",googlePlay:"https://play.google.com/store/apps/details?id=com.starofservice.customer"}}},69421:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(12115);let n=function(){let e=(0,r.useRef)(!1);return(0,r.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}},72202:(e,t,i)=>{"use strict";i.d(t,{b:()=>r.bH});var r=i(11414)},73209:(e,t,i)=>{"use strict";i.d(t,{A:()=>y});var r=i(95155),n=i(12115),s=i(24071),a=i(38190),l=i(87899),o=i(39318),c=i(40341),d=i(31541),u=i(48747),h=i(13044);function x({amount:e}){let t=(0,c.c)("pro_start_offer.setup_modal.intro");return(0,r.jsxs)(s.Stack,{spacing:"$500",children:[(0,r.jsx)(s.Heading,{level:"3",align:"center",children:t.rich("title",{amount:()=>(0,r.jsx)("span",{className:"text-indigo-8 text-[30px] px-4",children:(0,r.jsx)(h.A,{value:e})}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",color:"inherit",children:e})})}),(0,r.jsxs)(s.Stack,{spacing:"$300",children:[(0,r.jsx)(s.Text,{children:t.rich("text.1",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})}),(0,r.jsx)(s.Text,{children:t.rich("text.2",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})})]}),(0,r.jsxs)(s.Heading,{level:"4",align:"center",children:[t.rich("text.3",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})}),(0,r.jsx)("span",{className:"text-[30px]",children:"\uD83D\uDC47"})]})]})}let m=({leftContent:e,rightContent:t})=>(0,r.jsxs)(s.Columns,{spacing:"$300",alignV:"center",children:[(0,r.jsx)(s.Column,{width:"content",children:(0,r.jsx)("span",{className:"text-[30px]",children:e})}),(0,r.jsx)(s.Column,{children:(0,r.jsx)(s.Text,{children:t})})]});function p({amount:e}){let t=(0,c.c)("pro_start_offer.setup_modal.explanation");return(0,r.jsxs)(s.Stack,{spacing:"$600",children:[(0,r.jsx)(s.Heading,{level:"3",align:"center",children:t("title")}),(0,r.jsxs)(s.Stack,{spacing:"$400",children:[(0,r.jsx)(m,{leftContent:"\uD83D\uDCF2",rightContent:t.rich("text.1",{amount:()=>(0,r.jsx)(s.Text,{weight:"bold",children:(0,r.jsx)(h.A,{value:e})}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})}),(0,r.jsx)(m,{leftContent:"\uD83C\uDFAF",rightContent:t.rich("text.2",{amount:()=>(0,r.jsx)(s.Text,{weight:"bold",children:(0,r.jsx)(h.A,{value:e})}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})}),(0,r.jsx)(m,{leftContent:"\uD83D\uDDFAï¸",rightContent:t.rich("text.3",{amount:()=>(0,r.jsx)(s.Text,{weight:"bold",children:(0,r.jsx)(h.A,{value:e})}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})})]}),(0,r.jsx)(s.Heading,{level:"4",align:"center",children:t.rich("text.4",{amount:()=>(0,r.jsx)(s.Text,{weight:"bold",children:(0,r.jsx)(h.A,{value:e})}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})})]})}function g({amount:e}){let t=(0,c.c)("pro_start_offer.setup_modal.payment_account");return(0,r.jsx)("div",{className:"bg-white-0",children:(0,r.jsxs)(s.Stack,{spacing:"$300",children:[(0,r.jsx)(s.Heading,{level:"3",weight:"weak",align:"center",children:t.rich("title",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})}),(0,r.jsx)("span",{className:"text-[60px] text-center",children:"\uD83D\uDCB0"}),(0,r.jsx)(s.Text,{children:t.rich("text1",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})}),(0,r.jsx)(s.Text,{children:t.rich("text2",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})}),(0,r.jsx)(s.Text,{children:t.rich("text3",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})})]})})}function b({amount:e}){let t=(0,c.c)("pro_start_offer.setup_modal.congratulations");return(0,r.jsxs)(s.Stack,{spacing:"$500",children:[(0,r.jsxs)(s.Stack,{spacing:"$400",children:[(0,r.jsxs)(s.Heading,{level:"3",align:"center",children:[(0,r.jsx)(s.Text,{size:"xxlarge",children:"\uD83D\uDCB0 \uD83C\uDF89"}),(0,r.jsx)("br",{}),t.rich("title",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})]}),(0,r.jsx)(s.Heading,{level:"4",align:"center",children:t.rich("subtitle",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})})]}),(0,r.jsxs)(s.Stack,{spacing:"$300",children:[(0,r.jsx)(s.Text,{children:t.rich("text1",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})}),(0,r.jsx)(s.Text,{children:t.rich("text2",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})})]}),(0,r.jsx)(s.Heading,{level:"4",align:"center",children:t.rich("text3",{amount:()=>(0,r.jsx)(h.A,{value:e}),strong:e=>(0,r.jsx)(s.Text,{weight:"bold",children:e})})})]})}var j=i(78824),f=i(81292),_=i(49554);function v({amount:e}){let t=(0,c.c)("pro_start_offer.setup_modal.activation");return(0,r.jsx)("div",{className:"grid items-center justify-center h-[400px]",children:(0,r.jsxs)(s.Stack,{alignment:"center",spacing:"$500",children:[(0,r.jsx)(s.Heading,{level:"2",align:"center",children:t("title")}),(0,r.jsx)(s.Heading,{level:"4",align:"center",children:t.rich("subtitle",{amount:()=>(0,r.jsx)(h.A,{value:e})})}),(0,r.jsx)(_.aH,{size:"xlarge",color:"primary"})]})})}var w=i(98942);function y({open:e,onClose:t,user:i,serviceConfigurations:h,amount:m}
1){let _=(0,c.c)("pro_start_offer.setup_modal"),C=(0,o.useRouter)(),[k,A]=(0,n.useState)(!1),[S,T]=(0,n.useState)(!1),[N,P]=(0,n.useState)(!1),[z,M]=(0,n.useState)("intro"),{countryCode:E,currency:$}=(0,u.useDomainContext)(),I=(0,a.A)(),{data:R,refetch:U}=(0,f.A)(!0),L=(0,j.A)(),D=(0,w.A)(),B=async e=>{await fetch("/api/chargebee/credits",{method:"POST",body:JSON.stringify(e)})},F=i.meta.dataLayer&&i.meta.dataLayer?.length>0?i.meta.dataLayer[0].user.userId:null;(0,n.useEffect)(()=>{if(N){let e=setInterval(async()=>{let{data:t}=await U();t&&t.length>0&&(I.closeAll(),A(!0),M("activation"),P(!1),T(!1),clearInterval(e))},5e3);return()=>clearInterval(e)}return()=>{}},[U,N]);let H=async()=>{T(!0);let e=await L();e.url&&I&&(P(!0),I.openCheckout({hostedPageUrl:e.url,onClose:async()=>{let{data:e}=await U();e&&e.length>0&&M("activation"),P(!1),T(!1)}}))},V=async()=>{"intro"===z?M("explanation"):"explanation"===z&&R?.length===0?M("payment_account"):"explanation"===z&&R&&R.length>0?M("activation"):"payment_account"===z?H():"congratulations"===z&&C.push(l.MD.getUrl())};return(0,n.useEffect)(()=>{(async()=>{if("activation"===z){let e=h.some(e=>!e.automation);await D.mutate(h),(e||k)&&await B({userId:F||"",email:i.emailAddress,country:E,amount:m*((0,d.rx)($)?1:100),currency:$}),M("congratulations")}})()},[z,h]),(0,r.jsx)(s.ModalDialog,{title:"",size:"fluid",open:e&&!N,onClose:["congratulations","activation"].includes(z)?void 0:t,hideCloseIcon:["congratulations","activation"].includes(z),footerContent:"activation"!==z?(0,r.jsx)(s.Button,{onClick:V,working:S,fullWidth:!0,children:_(`${z}.cta`)}):void 0,children:(0,r.jsxs)(s.Match,{children:[(0,r.jsx)(s.Case,{when:"intro"===z,children:(0,r.jsx)(x,{amount:m})}),(0,r.jsx)(s.Case,{when:"explanation"===z,children:(0,r.jsx)(p,{amount:m})}),(0,r.jsx)(s.Case,{when:"payment_account"===z,children:(0,r.jsx)(g,{amount:m})}),(0,r.jsx)(s.Case,{when:"activation"===z,children:(0,r.jsx)(v,{amount:m})}),(0,r.jsx)(s.Case,{when:"congratulations"===z,children:(0,r.jsx)(b,{amount:m})})]})})}},73630:(e,t,i)=>{"use strict";i.d(t,{U:()=>s}),i(95155);var r=i(12115);i(16523),i(11902),i(57271),i(11414),i(57274);let n=(0,r.createContext)({unreadCount:0}),s=()=>(0,r.useContext)(n)},76464:(e,t,i)=>{"use strict";i.d(t,{Fr:()=>h,QM:()=>u,X4:()=>a,c_:()=>c,hW:()=>d,nR:()=>s,sG:()=>o});var r,n,s=((r={}).FeaturesBrowsingClientsProjects="features.browsing-clients-projects",r.FeaturesAutoMessaging="features.auto-messaging",r.OnlineVisibilitySeo="online-visibility.seo",r.ClientsVisibilityBasic="online-visibility.starofservice-users.basic",r.ClientsVisibilityExtra="online-visibility.starofservice-users.extra",r.ClientsVisibilityMaximum="online-visibility.starofservice-users.maximum",r.ProfileOptimization="csm.profile-optimization",r.CustomerSupportHigherPriority="csm.high-priority-support",r.CustomerSupportPhoneDedicated="csm.dedicated-phone-support",r.BadgeVerifiedAccount="features.verified-account",r);let a={get_new_customers:{pick_opportunities:["features.browsing-clients-projects"],clientsOnPhone:["features.auto-messaging"],auto_messaging:["features.auto-messaging"]},increased_visibility:{grow_traffic:["online-visibility.seo"],visible_to_clients:["online-visibility.starofservice-users.basic","online-visibility.starofservice-users.extra","online-visibility.starofservice-users.maximum"],perfect_profile:["csm.profile-optimization"]},manage_your_business:{support_priority:["csm.high-priority-support"],get_assistance:["csm.dedicated-phone-support"],get_verified_account:["features.verified-account"]}};var l=((n=l||{}).Basic="online-visibility.starofservice-users.basic",n.Extra="online-visibility.starofservice-users.extra",n.Maximum="online-visibility.starofservice-users.maximum",n);let o={"online-visibility.starofservice-users.basic":{level:1,key:"pricing_page.compare_plans.increase_visibility.visible_to_clients.values.basic"},"online-visibility.starofservice-users.extra":{level:2,key:"pricing_page.compare_plans.increase_visibility.visible_to_clients.values.extra"},"online-visibility.starofservice-users.maximum":{level:3,key:"pricing_page.compare_plans.increase_visibility.visible_to_clients.values.maximum"}},c="pricing_page.compare_plans.get_customers.clients_on_phone.title",d={title:"pricing_page.compare_plans.get_customers.title",pickOpportunities:{title:"pricing_page.compare_plans.get_customers.pick_opportunities.title",description:"pricing_page.compare_plans.get_customers.pick_opportunities.description"},findClients:{title:"pricing_page.compare_plans.get_customers.find_clients.title",description:"pricing_page.compare_plans.get_customers.find_clients.description",availableFor:null,limits:{}},clientsOnPhone:{title:c,description:"pricing_page.compare_plans.get_customers.clients_on_phone.description"},auto_messaging:{title:"pricing_page.compare_plans.get_customers.auto_messaging.title",description:"pricing_page.compare_plans.get_customers.auto_messaging.description"}},u={title:"pricing_page.compare_plans.increase_visibility.title",growTraffic:{title:"pricing_page.compare_plans.increase_visibility.grow_traffic.title",description:"pricing_page.compare_plans.increase_visibility.grow_traffic.description"},visibleToClients:{title:"pricing_page.compare_plans.increase_visibility.visible_to_clients.title",description:"pricing_page.compare_plans.increase_visibility.visible_to_clients.description"},perfectProfile:{title:"pricing_page.compare_plans.increase_visibility.perfect_profile.title",description:"pricing_page.compare_plans.increase_visibility.perfect_profile.description"}},h={title:"pricing_page.compare_plans.manage_your_business.title",supportPriority:{title:"pricing_page.compare_plans.manage_your_business.support_priority.title",description:"pricing_page.compare_plans.manage_your_business.support_priority.description"},getAssistance:{title:"pricing_page.compare_plans.manage_your_business.get_assistance.title",description:"pricing_page.compare_plans.manage_your_business.get_assistance.description"},getVerifiedAccount:{title:"pricing_page.compare_plans.manage_your_business.get_verified_account.title",description:"pricing_page.compare_plans.manage_your_business.get_verified_account.de
1scription"}}},78824:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var r=i(19487),n=i(36232);let s=()=>{let e=(0,n.A)(),t=(0,r.useMutation)({mutationFn:()=>e.post("/manage_payments_sources_hosted_page",{data:{type:"hosted_page"}})});return async()=>{let{data:e}=await t.mutateAsync();return e.data}}},79732:(e,t,i)=>{"use strict";i.d(t,{V:()=>n});let r={edges:{node:{id:!0,apiId:!0,caption:!0,thumbnailUrl:!0}}},n={__typename:!0,createdAt:!0,sender:{apiId:!0},on_TextMessage:{id:!0,body:!0,attachments:r,customData:!0},on_AttachmentMessage:{id:!0,attachments:r},on_VideoCallMessage:{id:!0},on_EventMessage:{id:!0,eventType:!0,eventData:!0},conversation:{id:!0,apiId:!0},readBy:{apiId:!0},deliveredTo:{apiId:!0}}},80297:(e,t,i)=>{"use strict";i.d(t,{k:()=>s,v:()=>a});var r=i(95155),n=i(24071);let s=e=>(0,r.jsx)(n.Text,{weight:"bold",color:"inherit",children:e}),a=(0,r.jsx)("br",{})},80975:()=>{},81292:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var r=i(40181);let n={include:"payment_accounts"},s=e=>{let{data:t}=(0,r.useQuery)({queryKey:[{url:"/me",params:{fields:{user:"businesses,full_name",pro_profile:["first_name"],business:"payment_accounts,company_name",payment_account:"is_valid",include:"businesses,business.payment_accounts,payment_account,payment_accounts,user.business.payment_accounts"}}}],enabled:e,select:({data:e})=>0===e.businesses.data.length?void 0:e.businesses.data[0]}),i={url:`/businesses/${t?.id}`,params:n};return(0,r.useQuery)({queryKey:[i],select:({data:e})=>e.paymentAccounts.data.filter(e=>e.isValid),enabled:!!t&&e})}},82747:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});let r={src:"https://cdn-vercel.prod.starofservice.com/41393c5b/_next/static/media/favicon-dot-16x16.dbbe8a5c.png",height:16,width:16,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAPFBMVEVEg/eMvP+Rhb6Juv/+aEpNifiXvP6Hsf1Jhvf5YkbJbHY7g//Ia3U5gv9Kh/hKif56qPtDg/mqxv1rnfkMuq3JAAAADnRSTlP+u4K7+P73/Muifdp+2ZUMVeYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA+SURBVHicFcZLFoAwCAPAqLRQPwng/e/qc1aDEPWctiDCt2UGcrTv6wYrveZx/WmfKeDtzAFCmShSCIGk4gNe8QLDH65PsAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},83016:(e,t,i)=>{"use strict";i.d(t,{B:()=>n});var r=i(87899);let n=(e,t)=>"pro"===e?t?r.wB.getUrl({params:{type:"conversation",id:t}}):r.Uv.getUrl():t?r.YY.getUrl({params:{type:"conversation",id:t}}):r.Cp.getUrl()},85016:(e,t,i)=>{"use strict";i.r(t),i.d(t,{HeaderContextProvider:()=>p,useHeaderContext:()=>g});var r=i(95155),n=i(12115),s=i(9457),a=i(11414),l=i(45508),o=i(2497),c=i(91950),d=i(40181),u=i(39318),h=i(90461);let x=(0,n.createContext)({}),{Provider:m}=x,p=({children:e})=>{let{data:t,refetch:i}=((e=!0)=>{let[t,i]=(0,n.useState)(),r=(0,u.usePathname)();(0,n.useEffect)(()=>{(async()=>{i(await (0,c.hasCookie)("Authorization"))})()},[r]);let s=(0,d.useQuery)({queryKey:[{url:"/me",params:h.tz}],select:e=>e.data||null,enabled:!!(e&&t),gcTime:3e5});return!1===t?{data:null,refetch:s.refetch}:s.isError&&s.error?.response?.status===403?{...s,data:null}:s})(!0),x=(0,a.Ay)(),p=(0,s.tl)(),{pageMode:g,setUserMode:b}=x,[j,f]=(0,n.useState)(void 0),[_,v]=(0,n.useState)(!1),[w,y]=(0,n.useState)(""),[C,k]=(0,n.useState)("bg-white-0");return(0,r.jsx)(m,{value:{handleLinkClick:e=>{let i=(0,o.Y4)(e,g);"switchToPro"===e&&b("pro"),"switchToCustomer"===e&&b("customer"),i&&p(i,{user_id:t?.id,user_type:(0,o.JI)(g)})},user:t,refetchUser:i,userMode:(0,a.Ay)(),dropdown:(()=>{let e=(0,n.useRef)(null),t=(0,l.useResponsiveValue)({mobile:!0,tablet:!1})||!1,[i,r]=(0,n.useState)(!1),[s,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let t=t=>{t.target&&!e.current?.contains(t.target)&&a(!1)};return window&&window.addEventListener("click",t),()=>{window.removeEventListener("click",t)}},[a]),{dropdownMenuRef:e,handleDropdownOpen:()=>{t?r(!i):a(!s)},isMobileMenuOpen:i,setIsMobileMenuOpen:r,isDropdownOpen:s,setIsDropdownOpen:a}})(),extraContent:j,setExtraContent:f,isExpandedHeader:_,setIsExpandedHeader:v,extraContentClassNames:w,setExtraContentClassNames:y,innerClassName:C,setInnerClassName:k},children:e})},g=()=>(0,n.useContext)(x)},88876:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});let r={src:"https://cdn-vercel.prod.starofservice.com/41393c5b/_next/static/media/favicon-dot.090bf4cc.ico",height:48,width:48,blurWidth:0,blurHeight:0}},90461:(e,t,i)=>{"use strict";i.d(t,{AG:()=>o,Oh:()=>n,Vw:()=>c,aD:()=>a,h:()=>s,tz:()=>r,wZ:()=>l});let r={meta:{user:"data_layer,has_verified_phone,phone_sms_verification_status,jwt_token",business:"credits,pro_profiles,free_interactions_max,free_interactions_available,free_interactions_next_renewal,is_subscription_signup_pending,is_booking_pro,last_subscription_signup_screen_finished,wallet,autorecharge_status,quick_connect_status,nb_val
1id_payment_accounts,nb_quick_connect_pending_invoices",pro_profile:"is_inactive_imported,notifications_nb,identity_verified,products_enabled,meeta_enabled",pro_account_subscription:"next_refresh_at",wallet:"autorecharge_options"},fields:{user:"businesses,customer_profile,email_address,email_address_status,first_name,last_name,full_name,short_name,has_avatar,picture_url,has_phone,has_valid_phone,old_password_verification,phone_number,timezone,businesses,subscriptions",customer_profile:"notifications",business:"pro_profiles,company_name,wallet",pro_profile:"premium_account_enabled,star_account_config,is_paused,nb_reviews,average_rating,profile_quality_score,available_balance",wallet:"balance,autorecharge_enabled,autorecharge_threshold,autorecharge_target,autorecharge_bonus_percent,autorecharge_bonus_amount,autorecharge_validation_status"},include:"businesses,businesses.wallet,businesses.pro_profiles,businesses.pro_profiles.star_account_config,subscriptions,subscriptions.subscription_plan,subscriptions.subscription_plan.subscription_pricing_list,subscriptions.subscription_plan.subscription_pricing_list.subscription_trial,customer_profile"},n=e=>!!e&&e.starAccountConfig?.isFeatureAccessible&&!e.premiumAccountEnabled,s=e=>!!e&&e.subscriptions.data?.[0]||null,a=e=>{let t=s(e),i=!!e.subscriptions.data.length&&e.subscriptions.data.some(e=>e.isActive),r=e.subscriptions.data[0]?.nextBillingAt===null,n=!!e.subscriptions.data[0]?.isFailingPayment,a=e.subscriptions.data[0]?.isSubscriptionUpgradeRequired;return t?n?"PaymentIssue":i?r?"NonRenewing":a?"RequiresUpdate":"SubscriptionActive":"Expired":"NoSubscription"},l=e=>{if(!e||!e.businesses||!e.businesses.data.length||e.businesses.data[0]?.meta?.freeInteractionsMax===void 0||e.businesses.data[0]?.meta?.freeInteractionsMax===null)return null;let t=e.businesses.data[0]?.meta;return{max:t?.freeInteractionsMax??null,remaining:t?.freeInteractionsAvailable??null,nextRenewal:t?.freeInteractionsNextRenewal??null}},o=e=>(e=>{let t=s(e);if(t){let{usedTurbo:e,maxTurbo:i}=t;return![null,void 0,0].includes(i)&&e===i}return!1})(e)||(e=>{let t=s(e);if(t){let{usedInteractions:e,maxInteractions:i}=t;return![null,void 0,0].includes(i)&&e===i}return!1})(e),c=e=>{let t,i=a(e),r=["PaymentIssue","Expired","RequiresUpdate"].includes(i),n=o(e),s="NoSubscription"===i&&!!(t=l(e))&&!!(t?.nextRenewal&&!t?.remaining);return r||n||s}},98222:(e,t,i)=>{"use strict";i.d(t,{L:()=>n,c:()=>r});let r=e=>20*!!e,n=(e,t,i)=>{let n=r(e)/100;return{min:Math.round(t/(1-n)/(1.2*i)),max:Math.round(t/(1-n)/i)+1}}},98942:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(19487),n=i(36232),s=i(31541),a=i(77862);let l={page:{size:100},fields:{service_configuration:"automation,automation_budget,service",service:"id,name,banner_picture_url,picture"},include:"service",meta:{service:"automation_budget_default"}},o=()=>{let e=(()=>{let e=(0,n.A)(),{currency:t}=(0,a.L)(),i=(0,r.useMutation)({mutationFn:({serviceConfiguration:i})=>{let r=i.service.data.meta.automationBudgetDefault/((0,s.rx)(t)?1:100),n="auto_purchase"===i.automation&&i.automationBudget?Math.max(i.automationBudget,r):r;return e.patch(`/service_configurations/${i.id}`,{data:{id:i.id,type:"service_configuration",attributes:{automation:"auto_purchase",automation_budget:n}}},{params:l})}});return async({serviceConfiguration:e})=>{i.mutateAsync({serviceConfiguration:e})}})();return{mutate:async t=>{let i=t.filter(e=>"quick_connect"!==e.automation).map(t=>e({serviceConfiguration:t}));await Promise.all(i)}}}}}]);
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.