PageSourceSearch

https://app.cookieyes.com/assets/dashboard.lazy-CXqusNze.js

js cookieyes.com collected 2026-09-24 07:18:22 UTC 71,049 bytes, 24 lines download raw bytes

1import{Y as kt,r as C,u as L,j as e,b2 as z,a9 as J,aa as q,ab as Q,E as A,ad as ee,S as At,T as Qe,cw as b,ba as Mt,aC as Re,fV as X,iv as _t,iK as Pt,iw as Dt,ix as Ue,iC as et,aL as Ht,g5 as tt,ce as Tt,F as It,a0 as Ot,y as H,aG as R,a$ as Ae,iL as st,iM as Ze,iN as $e,iO as at,iP as nt,a4 as W,gq as Et,iQ as Y,iR as Bt,iS as it,a1 as rt,fZ as Ft,f_ as Rt,a2 as Ut,a3 as Zt,iT as $t,iU as $,iV as Wt,aP as Me,e0 as Vt,e as _e,dO as lt,fU as ct,gX as te,iW as Ne,iX as Kt,eo as zt,b6 as Gt,ae as Yt,at as ot,iY as Xt,gb as Jt,an as F,bw as qt,iZ as Qt,i_ as es,c4 as ts,i$ as ss,d as as,av as ns,$ as is,gm as rs,gk as ls,j0 as cs,ir as ve,j1 as os}from"./index-DMQ34O7E.js";import{R as ds}from"./RouteGuard-DV-fk1dm.js";import{u as gs,S as xs,W as ps,A as ms}from"./AgencyWebsiteStatsBar-DthieiNy.js";import{B as hs,P as us}from"./agencyPaymentConfirmationModal-CtQn7Bg4.js";/* empty css            */import{N as fs,A as ys}from"./AgencyUnconfirmedPaymentBanner-DjZ-7gTo.js";import{A as dt,a as bs}from"./AgencyTierProgressModal-Dyse1GpL.js";import{S as Se}from"./skeleton-mkSgIJpG.js";import{E as Cs}from"./external-link-DGOH_I46.js";import{U as js}from"./UserAccessModal-qBI-g-0B.js";import"./ChangePlanNewPricingDialog-D9EaoJtW.js";import"./agencyPlanFeatures-CW7FvdpP.js";import"./agencyDiscount-BdQJ5hVW.js";import"./coupon-C3vzSeyC.js";import"./badge-percent-Dx5l40FU.js";import"./separator-COA4eDqS.js";import"./teamService-DLmxajjJ.js";/**
2 * @license lucide-react v0.503.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ws=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],Ns=kt("trending-up",ws),ke=C.forwardRef(({className:t,icon:s,title:n,subtitle:a,description:i,value:l,total:x,showTotal:p=!1,buttonText:h,buttonVariant:r="primary",onButtonClick:u,isButtonDisabled:d=!1,isUpgrade:m,isAgencyLicenseOnDue:j,isAgencyLicenseSuspended:N,isActiveSiteSlotsFilled:f,totalSites:y,activeSites:S,showButton:c=!0,isLoading:w=!1,...M},D)=>{const{t:P}=L(),T=()=>y!==S?N?e.jsx(J,{children:e.jsxs(q,{children:[e.jsx(Q,{asChild:!0,children:e.jsx("span",{children:e.jsx(A,{onClick:u,disabled:!0,variant:r,className:"cursor-not-allowed",id:"addSite-organization",children:h})})}),e.jsx(ee,{side:"right",sideOffset:5,children:e.jsx("p",{children:P("agency.suspendedSubscriptionSetUp")})})]})}):e.jsx(A,{onClick:u,disabled:j||N,variant:r,className:j||N?"cursor-not-allowed":"",id:"addSite-organization",children:h}):e.jsxs("div",{className:"flex  gap-2",children:[m&&!j&&e.jsx("p",{className:"text-gray-700",children:P("agency.dashboard.siteLimitReached")}),!f&&e.jsx(J,{children:e.jsxs(q,{children:[e.jsx(Q,{asChild:!0,children:e.jsxs(A,{onClick:u,disabled:d,variant:r,className:d?"cursor-not-allowed opacity-50":"",id:"addSite-organization",children:[h,w?e.jsx(At,{className:"ml-2 w-4 h-4"}):null]})}),d&&e.jsx(ee,{side:"right",sideOffset:5,children:f?e.jsx("p",{children:P("agency.dashboard.upgradeLicenseTooltip",{upgradeLicense:P("agency.dashboard.upgradeLicense")})}):e.jsx("p",{children:e.jsx(Qe,{i18nKey:"agency.dashboard.purchaseLicenseTooltip",components:{b:e.jsx("span",{className:"font-semibold"})}})})})]})})]});return e.jsxs("div",{ref:D,className:z("flex flex-col md:flex-row bg-white rounded-lg shadow-lg p-4 md:p-6",t),...M,children:[e.jsx("div",{className:"flex flex-col bg-blue-50 rounded-lg w-full md:w-1/3",children:e.jsxs("div",{className:"flex flex-col items-start px-6 py-4",children:[s&&e.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary-lighter flex items-center justify-center mb-2",children:s}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-baseline",children:[e.jsx("h2",{className:"text-5xl font-bold text-gray-900",children:l}),p&&e.jsxs("span",{className:"text-xl text-gray-500 ml-1",children:["/",x]})]}),e.jsx("p",{className:"text-gray-500 text-lg mt-0.5",children:n}),a&&e.jsx("p",{className:"text-gray-500 text-sm mt-0.5",children:a})]})]})}),e.jsxs("div",{className:"flex flex-col justify-between w-full md:w-2/3 px-6 py-4",children:[i&&e.jsx("p",{className:"text-gray-700",children:i}),c&&e.jsx("div",{className:"mt-4",children:T()})]})]})});ke.displayName="LicenseCard";const vs=({websites:t})=>{const{t:s}=L(),n=b(r=>r.isAgencyLicenseSuspended()),a=b(r=>r.pricingModel==="v2"),i=b(r=>r.getChargedSitesCount()),l=!a||((t==null?void 0:t.length)??0)===0||i>0,{reactivatingWebsiteId:x,handleReactivate:p}=gs(t??[]),h=C.useMemo(()=>t==null?void 0:t.map((r,u)=>{var d;return e.jsxs("tr",{className:"border-b border-gray-200 last:border-0 hover:bg-gray-50",children:[e.jsx("td",{className:"px-6 py-4 text-sm font-medium text-secondary",children:r.organization}),e.jsx("td",{className:"px-6 py-4 text-sm text-secondary",children:r.url}),e.jsx("td",{className:"px-6 py-4 text-sm text-secondary",children:Mt
6(r.created_at)}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs(Re,{variant:_t(r.websiteplan.slug),children:[X(r.websiteplan.slug),r.is_trial?` ${s("agency.trialSuffix")}`:""]})}),a&&e.jsx("td",{className:"px-6 py-4 text-sm text-gray-900","data-testid":`trial-status-${r.id}`,children:r.trial_ends_at?Dt(r.trial_ends_at)?s("agency.trialEnded"):Pt(r.trial_ends_at,{utc:!0}):"-"}),l&&e.jsx("td",{className:"px-6 py-4",children:e.jsx(Re,{variant:Ue(r)?"success":"danger",children:Ue(r)?s("agency.dashboard.statusActive"):s("agency.dashboard.statusInactive")})}),l&&e.jsx("td",{className:"px-6 py-4 text-sm text-gray-900",children:r.website_status==="paymentPending"||!r.pageviews?"-":r.pageviews.views_limit===0?e.jsx("span",{children:s("agency.unlimited")}):e.jsxs("span",{children:[Math.round(r.pageviews.views/r.pageviews.views_limit*100),"%"]})}),e.jsx("td",{className:"px-6 py-4",children:e.jsx("div",{className:"flex items-center justify-start gap-4",children:(d=r.website_metadata)!=null&&d.has_scheduled_trial_cancellation?e.jsx(xs,{website:r,onReactivate:p,isReactivating:x===r.id}):e.jsx(ps,{website:r,index:u,isAgencyLicenseSuspended:n,t:s,contentAlign:"start"})})})]},r.url)}),[t,s,n,a,l,x,p]);return e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 text-sm text-gray-500",children:[e.jsx("th",{className:"px-6 py-3 text-left align-top",children:s("agency.websiteName")}),e.jsx("th",{className:"px-6 py-3 text-left align-top",children:s("agency.websiteUrl")}),e.jsx("th",{className:"px-6 py-3 text-left align-top",children:s("agency.createdDate")}),e.jsx("th",{className:"px-6 py-3 text-left align-top",children:s("agency.plan")}),a&&e.jsx("th",{className:"px-6 py-3 text-left align-top",children:s("agency.trialStatus")}),l&&e.jsx("th",{className:"px-6 py-3 text-left align-top",children:s("agency.bannerStatus")}),l&&e.jsx("th",{className:"px-6 py-3 text-left align-top",children:s("agency.pageViewsUsed")}),e.jsx("th",{className:"px-6 py-3 text-left align-top",children:s("agency.actions")})]})}),e.jsx("tbody",{children:h})]})})},Ss=C.memo(vs),Le="box-border inline-flex h-8 shrink-0 items-center justify-center rounded-full border-[0.5px] border-[#C7CADE] bg-[#F4F5FA] px-3 text-sm font-semibold text-dark";function We({isNewPricing:t=!1,bannerStatusFilter:s,filteredSitesCount:n}){const{t:a}=L(),{data:i=[],isLoading:l}=et({limit:6,...s?{banner_status:s,per_page:6}:{}},{keepPreviousData:!0}),{isAgencyAddSiteDisabled:x,isActiveSiteSlotsFilled:p,websiteCounts:h}=b(),[r,u]=C.useState(!1);if(l)return e.jsx(Ht,{isCardLoader:!0,size:"md"});const d=()=>e.jsx("div",{className:"mt-4 bg-white shadow rounded-lg",children:e.jsx("div",{className:"p-6 flex justify-center items-center",children:e.jsxs("div",{className:"flex flex-col text-center min-h-[250px] justify-center items-center",children:[e.jsx(Tt,{className:"mb-2"}),e.jsx("p",{className:"text-secondary-dark text-xl font-semibold mb-2",children:a("agency.websites.noWebsitesFound")}),e.jsxs("div",{className:"text-secondary-dark text-md",children:[e.jsx("div",{className:"w-fit mb-2",children:a("agency.websites.startImplementing")}),x()?e.jsx(J,{children:e.jsxs(q,{children:[e.jsx(Q,{asChild:!0,children:e.jsx(A,{id:"addSite",variant:"secondary-light",disabled:!0,className:"text-base font-medium",children:e.jsxs("span",{className:"text-md",children:["+ ",a("agency.websites.newSite")]})})}),e.jsx(ee,{side:"right",children:e.jsx("p",{className:"text-xs",children:p()?a("agency.websites.upgradeLicense"):a("agency.websites.purchaseLicense")})})]})}):e.jsx(A,{id:"addSite",variant:"primary",className:"text-base font-medium",onClick:()=>u(!0),children:e.jsxs("span",{className:"text-md",children:["+ ",a("agency.websites.newSite")]})})]})]})})}),m=(h==null?void 0:h.by_plan)??[],j=t?m.reduce((c,w)=>c+w.count,0):i.length,N=t?m.filter(c=>c.slug.split("-")[1]==="basic").reduce((c,w)=>c+w.count,0):i.filter(c=>X(c.websiteplan.slug)==="basic").length,f=t?m.filter(c=>c.slug.split("-")[1]==="pro").reduce((c,w)=>c+w.count,0):i.filter(c=>X(c.websiteplan.slug)==="pro").length,y=t?m.filter(c=>c.slug.split("-")[1]==="ultimate").reduce((c,w)=>c+w.count,0):i.filter(c=>X(c.websiteplan.slug)==="ultimate").length,S=()=>e.jsxs("div",{className:"rounded-lg bg-white shadow-sm",children:[t?e.jsx("div",{"data-testid":"agency-websites-header",className:"flex items-center justify-between border-b border-gray-200 px-8 py-[18px]",children:e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsx("h2",{"data-testid":"agency-websites-title",className:"font-semibold text-xl text-dark whitespace-nowrap",children:a("agency.newPricing.sites.title",{count:s&&n!==void 0?n:j})}),!s&&e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("span",{"data-testid":"agency-websites-pill-basic",className:Le,children:a("agency.newPricing.sites.planPill",{plan:a("agency.newPricing.sites.plans.basic"),count:N})}),e.jsx("span",{"data-testid":"agency-websites-pill-pro",className:Le,children:a("agency.newPricing.sites.planPill",{plan:a("agency.newPricing.sites.plans.pro"),count:f})}),e.jsx("span",{"data-testid":"agency-websites-pill-ultimate",className:Le,children:a("agency.newPricing.sites.planPill",{plan:a("agency.newPricing.sites.plans.ultimate"),count:y})})]})]})}):e.jsx("div",{className:"border-b border-gray-200 px-6 py-4",children:e.jsx("p",{className:"text-xl font-medium text-gray-900",children:a("agency.dashboard.recentlyAddedWebsites")})}),s&&i.length===0?e.jsx("div",{"data-testid":"agency-websites-filter-empty",className:"flex min-h-[120px] items-center justify-center px-6 py-8 text-md text-secondary-dark",children:a(s==="active"?"agency.websites.noActiveWebsites":"agency.websites.noInactiveWebsites")}):e.jsx(Ss,{websites:i}),e.jsx("div",{"data-testid":"agency-websites-view-all-footer",className:"border-t border-gray-200 px-6 py-4",children:e.jsx(It,{to:"/agency/websites",search:s?{filter:s}:{},unsafeRelative:"path",children:e.jsx(A,{variant:"link",className:"p-0 text-blue-600",children:a("agency.dashboard.viewAllWebsites")})})})]});return e.jsxs(e.Fragment,{children:[i!=null&&i.length||s?S():d(),e.jsx(tt,{isOpen:r,onOpenChange:u})]})}const Ls=({width:t=21,height:s=18,svgColor:n="#1060C6"})=>{const a=encodeURIComponent(`
7    <svg width="${t}" height="${s}" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg">
8      <g clip-path="url(#clip0_2345_1047)">
9        <path d="M1.0498 4.71667H19.9498M18.496 1.05884H2.50365C2.11807 1.05884 1.74828 1.18755 1.47563 1.41667C1.20298 1.64579 1.0498 1.95654 1.0498 2.28056V15.7195C1.0498 16.0435 1.20298 16.3542 1.47563 16.5834C1.74828 16.8125 2.11807 16.9412 2.50365 16.9412H18.496C18.8815 16.9412 19.2513 16.8125 19.524 16.5834C19.7966 16.3542 19.9498 16.0435 19.9498 15.7195V2.28056C19.9498 1.95654 19.7966 1.64579 19.524 1.41667C19.2513 1.18755 18.8815 1.05884 18.496 1.05884Z" stroke="${n}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
10      </g>
11      <defs>
12        <clipPath id="clip0_2345_1047">
13          <rect width="21" height="18" fill="white"/>
14        </clipPath>
15      </defs>
16    </svg>
17  `);return e.jsx("img",{src:`data:image/svg+xml;utf8,${a}`,alt:"License",width:t,height:s,title:"License icon"})},ks=({width:t=39,height:s=39,svgColor:n="#1060C6",fillColor:a="#C4DDFD"})=>{const i=encodeURIComponent(`
18    <svg width="${t}" height="${s}" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
19      <rect width="39" height="39" rx="8" fill="${a}"/>
20      <path d="M10.0498 14.7167H28.9498M27.496 11.0588H11.5037C11.1181 11.0588 10.7483 11.1876 10.4756 11.4167C10.203 11.6458 10.0498 11.9565 10.0498 12.2806V25.7195C10.0498 26.0435 10.203 26.3542 10.4756 26.5834C10.7483 26.8125 11.1181 26.9412 11.5037 26.9412H27.496C27.8815 26.9412 28.2513 26.8125 28.524 26.5834C28.7966 26.3542 28.9498 26.0435 28.9498 25.7195V12.2806C28.9498 11.9565 28.7966 11.6458 28.524 11.4167C28.2513 11.1876 27.8815 11.0588 27.496 11.0588Z" stroke="${n}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
21      <rect width="14" height="13" transform="translate(21 18)" fill="${a}"/>
22      <path d="M25.875 24.125H22.125V22.875H25.875V19.125H27.125V22.875H30.875V24.125H27.125V27.875H25.875V24.125Z" fill="${n}"/>
23    </svg>
24  `);return e.jsx("img",{src:`data:image/svg+xml;utf8,${i}`,alt:"License Added",width:t,height:s,title:"License Added icon"})},As=({width:t=154,height:s=33,lockColor:n="#76CBA1",className:a})=>{const i=Ot[n]||n;return e.jsxs("svg",{width:t,height:s,viewBox:"0 0 154 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:a,children:[e.jsxs("g",{clipPath:"url(#clip0_0_5)",children:[e.jsx("path",{d:"M7.12286 14.2182L9.2541 3.49232H14.0926C15.2117 3.49232 16.1086 3.73281 16.7669 4.22181C17.4252 4.71081 17.7544 5.38418 17.7544 6.23392C17.7544 7.24398 17.2936 8.01355 16.3802 8.53461C17.1537 8.91138 17.5486 9.56872 17.5486 10.4906C17.5486 11.5648 17.1125 12.4546 16.2403 13.152C15.368 13.8575 14.1255 14.2102 12.5209 14.2102H7.13109L7.12286 14.2182ZM13.3026 9.91343H11.2784L10.9245 11.6931H12.9323C13.3109 11.6931 13.6071 11.5888 13.821 11.3804C14.035 11.172 14.142 10.8994 14.142 10.5788C14.142 10.1379 13.8622 9.91343 13.3026 9.91343ZM13.533 6.01747H12.0601L11.7392 7.66083H13.1298C13.5166 7.66083 13.8128 7.56463 14.0021 7.37224C14.1996 7.17985 14.2901 6.93134 14.2901 6.64275C14.2901 6.23392 14.035 6.02549 13.533 6.02549V6.01747Z",fill:"white"}),e.jsx("path",{d:"M17.959 14.2181L20.1067 3.49219H23.4064L21.7853 11.6128H26.1712L25.6528 14.2181H17.9672H17.959Z",fill:"white"}),e.jsx("path",{d:"M33.9811 14.2181L33.7672 12.5667H30.2206L29.3402 14.2181H25.9746L31.7923 3.49219H35.7585L37.4619 14.2101H33.9811V14.2181ZM32.6316 8.03746L31.5043 10.1538H33.5862L33.3146 8.03746L33.2323 6.71476L32.6316 8.03746Z",fill:"white"}),e.jsx("path",{d:"M49.4883 7.1554H46.1063C45.9911 6.24955 45.4891 5.80063 44.6004 5.80063C43.794 5.80063 43.1192 6.23351 42.5761 7.09126C42.033 7.95703 41.7697 8.92701 41.7697 10.0253C41.7697 11.2838 42.3046 11.9171 43.3743 11.9171C43.8022 11.9171 44.1972 11.8049 44.5593 11.5884C44.9131 11.364 45.1929 11.0594 45.3821 10.6585H48.7971C48.3445 11.9492 47.6039 12.9192 46.5753 13.5605C45.5467 14.2018 44.4029 14.5224 43.1522 14.5224C41.6545 14.5224 40.4778 14.1296 39.6303 13.344C38.7827 12.5584 38.363 11.4602 38.363 10.0413C38.363 8.8709 38.6181 7.78067 39.1201 6.75458C39.6303 5.72848 40.3955 4.87875 41.4159 4.20537C42.4445 3.532 43.613 3.19531 44.946 3.19531C46.4683 3.19531 47.6039 3.56407 48.3609 4.30157C49.118 5.03908 49.4965 5.98501 49.4965 7.1554H49.4883Z",fill:"white"}),e.jsx("path",{d:"M56.1501 14.2182L53.4346 9.56872L52.5048 14.2182H49.205L51.3445 3.49232H54.6442L53.6732 8.37428L58.0098 3.49232H61.7456L56.759 8.93543L59.9353 14.2182H56.1501Z",fill:"white"}),e.jsx("path",{d:"M12.0997 24.8732H7.87017L7.12959 28.5928H3.82988L5.96934 17.8749H14.1322L13.6303 20.4001H8.75887L8.3639 22.3561H12.5852L12.0833 24.8812L12.0997 24.8732Z",fill:"white"}),e.jsx("path",{d:"M18.6314 24.9534H17.3149L16.5907 28.5929H13.291L15.4305 17.875H20.1702C21.3881 17.875 22.3426 18.1395 23.0256 18.6686C23.7086 19.1977 24.0542 19.9512 24.0542 20.9132C24.0542 22.2199 23.4535 23.1738 22.2603 23.7831C22.573 24.1278 22.7458 24.6248 22.7787 25.2661L22.9598 28.5929H19.4955V25.8513C19.4955 25.4825 19.4379 25.242 19.3227 25.1298C19.2075 25.0176 18.9771 24.9534 18.6314 24.9534ZM19.7012 20.4002H18.2282L17.8086 22.5165H19.1992C19.6518 22.5165 19.9974 22.3962 20.236 22.1638C20.4747 21.9313 20.5899 21.5946 20.5899 21.1617C20.5899 20.6567 20.2936 20.4082 19.7012 20.4082V20.4002Z",fill:"white"}),e.jsx("path",{d:"M24.0566 28.5929L26.1961 17.875H29.4958L27.3564 28.5929H24.0566Z",fill:"white"}),e.jsx("path",{d:"M28.9785 28.5929L31.118 17.875H35.4545C37.0838 17.875 38.3346 18.2678 39.2068 19.0454C40.079 19.823 40.5152 20.9372 40.5152 22.3882C40.5152 23.4784 40.2436 24.4965 39.717 25.4424C39.1821 26.3804 38.4004 27.1419 37.3636 27.7271C36.3268 28.3123 35.15 28.6009 33.8335 28.6009H28.9785V28.5929ZM35.2323 20.4723H33.9075L32.8049 25.9876H34.0803C35.0019 25.9876 35.7343 25.6348 36.2856 24.9374C36.8369 24.24 37.1085 23.3903 37.1085 22.3882C37.1085 21.771 36.9521 21.29 36.6312 20.9613C36.3103 20.6326 35.8495 20.4643 35.2323 20.4643V20.4723Z",fill:"white"}),e.jsx("path",{d:"M47.1667 28.5929L46.9527 26.9415H43.4062L42.5257 28.5929H39.1602L44.9861 17.875H48.9523L50.6557 28.5929H47.1749H47.1667ZM45.8254 22.4123L44.6981 24.5286H46.7799L46.5084 22.4123L46.4261 21.0896L45.8254 22.4123Z",fill:"white"}
24),e.jsx("path",{d:"M53.4789 25.0336L51.2324 17.875H54.7461L55.4867 20.8892L55.6842 22.1958L56.3671 20.8892L58.342 17.875H61.8886L56.7868 25.0336L56.0709 28.5929H52.7712L53.4871 25.0336H53.4789Z",fill:"white"}),e.jsx("path",{d:"M94.4981 7.15531H91.1161C91.0009 6.24947 90.499 5.80055 89.6103 5.80055C88.8038 5.80055 88.1291 6.23343 87.586 7.09118C87.0429 7.95695 86.7796 8.92693 86.7796 10.0252C86.7796 11.2837 87.3145 11.917 88.3842 11.917C88.8121 11.917 89.2071 11.8048 89.5691 11.5884C89.923 11.3639 90.2027 11.0593 90.392 10.6585H93.8069C93.3543 11.9491 92.6137 12.9191 91.5852 13.5604C90.5566 14.2017 89.4128 14.5224 88.162 14.5224C86.6644 14.5224 85.4877 14.1295 84.6401 13.3439C83.7926 12.5583 83.3729 11.4601 83.3729 10.0412C83.3729 8.87082 83.628 7.78059 84.1299 6.7545C84.6401 5.7284 85.4054 4.87867 86.4258 4.20529C87.4543 3.53192 88.6228 3.19523 89.9559 3.19523C91.4782 3.19523 92.6137 3.56398 93.3708 4.30149C94.1278 5.03899 94.5063 5.98493 94.5063 7.15531H94.4981Z",fill:"white"}),e.jsx("path",{d:"M97.3148 10.6508L95.0684 3.49219H98.582L99.3226 6.50634L99.5201 7.81301L100.203 6.50634L102.178 3.49219H105.725L100.623 10.6508L99.9068 14.2101H96.6071L97.323 10.6508H97.3148Z",fill:"white"}),e.jsx("path",{d:"M104.396 14.2179L106.536 3.5H111.374C112.494 3.5 113.39 3.74049 114.049 4.22949C114.707 4.71849 115.036 5.39186 115.036 6.2416C115.036 7.25166 114.575 8.02123 113.662 8.54229C114.436 8.91906 114.83 9.5764 114.83 10.4983C114.83 11.5725 114.394 12.4623 113.522 13.1597C112.65 13.8652 111.407 14.2179 109.803 14.2179H104.413H104.396ZM110.576 9.91309H108.552L108.198 11.6927H110.206C110.584 11.6927 110.881 11.5885 111.095 11.3801C111.309 11.1717 111.416 10.8991 111.416 10.5784C111.416 10.1375 111.136 9.91309 110.576 9.91309ZM110.807 6.01714H109.334L109.013 7.66049H110.403C110.79 7.66049 111.086 7.5643 111.276 7.3719C111.473 7.17951 111.564 6.931 111.564 6.64241C111.564 6.23358 111.309 6.02515 110.807 6.02515V6.01714Z",fill:"white"}),e.jsx("path",{d:"M115.225 14.2179L117.364 3.5H125.535L125.033 6.02515H120.162L119.857 7.55628H124.079L123.593 10.0013H119.372L119.035 11.7007H123.906L123.404 14.2259H115.233L115.225 14.2179Z",fill:"white"}),e.jsx("path",{d:"M130.122 10.5706H128.805L128.081 14.2101H124.781L126.921 3.49219H131.66C132.878 3.49219 133.833 3.75673 134.516 4.28581C135.199 4.81489 135.544 5.56843 135.544 6.53039C135.544 7.83706 134.944 8.791 133.751 9.40025C134.063 9.74495 134.236 10.242 134.269 10.8833L134.45 14.2101H130.986V11.4685C130.986 11.0997 130.928 10.8592 130.813 10.747C130.698 10.6348 130.467 10.5706 130.122 10.5706ZM131.191 6.01734H129.718L129.299 8.13366H130.689C131.142 8.13366 131.488 8.01342 131.726 7.78094C131.965 7.54847 132.08 7.21178 132.08 6.7789C132.08 6.27387 131.784 6.02536 131.191 6.02536V6.01734Z",fill:"white"}),e.jsx("path",{d:"M83.628 24.3363L83.2824 21.5146L82.081 28.593H78.7813L80.9208 17.8751H85.2902L85.9074 23.1419L86.1378 25.0899L87.1335 23.1579L89.8654 17.8751H94.0374L91.8979 28.593H88.5982L90.2604 21.4985L88.7628 24.3764L86.5739 28.593H84.1382L83.6198 24.3363H83.628Z",fill:"white"}),e.jsx("path",{d:"M99.0072 28.8973C97.5096 28.8973 96.3164 28.4964 95.4359 27.6868C94.5555 26.8771 94.1193 25.7548 94.1193 24.3279C94.1193 23.1094 94.3991 21.9872 94.9587 20.9691C95.5182 19.951 96.3246 19.1333 97.3779 18.5081C98.4312 17.8908 99.6161 17.5782 100.949 17.5782C102.447 17.5782 103.64 17.979 104.52 18.7886C105.401 19.5983 105.837 20.7206 105.837 22.1475C105.837 23.366 105.557 24.4883 104.998 25.5063C104.438 26.5244 103.632 27.3421 102.578 27.9674C101.525 28.5846 100.34 28.8973 99.0072 28.8973ZM99.361 26.2919C100.25 26.2919 100.974 25.8751 101.558 25.0414C102.142 24.2077 102.422 23.3099 102.422 22.3559C102.422 21.6585 102.266 21.1294 101.953 20.7446C101.64 20.3678 101.188 20.1755 100.595 20.1755C99.7066 20.1755 98.9825 20.5923 98.3983 21.426C97.814 22.2597 97.5342 23.1575 97.5342 24.1115C97.5342 24.8089 97.6906 25.338 98.0033 25.7228C98.316 26.0995 98.7686 26.2919 99.361 26.2919Z",fill:"white"}),e.jsx("path",{d:"M110.84 24.1678L110.305 22.1317L109.202 28.5929H105.902L108.042 17.875H111.547L113.135 22.276L113.687 24.3442L114.756 17.875H117.842L115.925 28.5929H112.428L110.84 24.1598V24.1678Z",fill:"white"}),e.jsx("path",{d:"M117.549 28.5929L119.688 17.875H124.025C125.654 17.875 126.905 18.2678 
24127.777 19.0454C128.649 19.823 129.085 20.9372 129.085 22.3882C129.085 23.4784 128.814 24.4965 128.287 25.4424C127.752 26.3804 126.971 27.1419 125.934 27.7271C124.897 28.3123 123.72 28.6009 122.404 28.6009H117.549V28.5929ZM123.794 20.4723H122.47L121.367 25.9876H122.642C123.564 25.9876 124.296 25.6348 124.848 24.9374C125.399 24.24 125.671 23.3903 125.671 22.3882C125.671 21.771 125.514 21.29 125.193 20.9613C124.872 20.6326 124.412 20.4643 123.794 20.4643V20.4723Z",fill:"white"}),e.jsx("path",{d:"M135.745 28.593L135.531 26.9417H131.984L131.104 28.593H127.738L133.564 17.8752H137.53L139.234 28.593H135.753H135.745ZM134.403 22.4124L133.276 24.5287H135.358L135.086 22.4124L135.004 21.0897L134.403 22.4124Z",fill:"white"}),e.jsx("path",{d:"M142.043 25.0338L139.797 17.8752H143.311L144.051 20.8893L144.249 22.196L144.932 20.8893L146.906 17.8752H150.453L145.351 25.0338L144.635 28.593H141.336L142.052 25.0338H142.043Z",fill:"white"}),e.jsx("path",{d:"M70.5346 23.0158C70.5748 22.8856 70.5606 22.7444 70.4946 22.6237C70.4286 22.5028 70.3155 22.4119 70.1794 22.3727C70.0432 22.3335 69.897 22.3498 69.7733 22.416C69.6497 22.4822 69.5585 22.5931 69.5183 22.7233C69.4782 22.8533 69.4919 22.9938 69.5577 23.1144C69.6237 23.2353 69.7368 23.3262 69.8729 23.3654C70.0091 23.4046 70.1552 23.3883 70.2791 23.3221C70.4026 23.256 70.4944 23.1459 70.5346 23.0158ZM77.8902 16.4017L79.8699 9.98767C80.304 8.5815 80.154 7.06892 79.4512 5.78247C78.7482 4.49584 77.5499 3.54078 76.1192 3.12894C74.6885 2.71715 73.1442 2.88275 71.8266 3.5877C70.5092 4.29259 69.526 5.4791 69.092 6.8852L67.1122 13.2992C66.9235 13.9108 66.2694 14.2624 65.6514 14.0845C65.0334 13.9066 64.6854 13.2665 64.8742 12.655L66.8539 6.24096C67.4701 4.2446 68.8657 2.5624 70.7318 1.56398C72.5977 0.565701 74.7814 0.332417 76.8028 0.914227C78.8241 1.49608 80.5192 2.84599 81.5146 4.66787C82.5102 6.49004 82.7242 8.63555 82.108 10.6319L80.1282 17.0459C79.9395 17.6575 79.2854 18.0091 78.6674 17.8312C78.0496 17.6532 77.7014 17.0131 77.8902 16.4017ZM72.7719 23.6598C72.5495 24.38 72.0467 24.9864 71.3747 25.346C70.7026 25.7056 69.9162 25.7893 69.1893 25.5801C68.4626 25.3709 67.8527 24.8852 67.4942 24.229C67.1356 23.5727 67.058 22.7994 67.2802 22.079C67.5026 21.3586 68.0062 20.752 68.6785 20.3923C69.3505 20.0328 70.1362 19.9488 70.863 20.158C71.5898 20.3672 72.2004 20.8531 72.5589 21.5093C72.9175 22.1657 72.9942 22.9395 72.7719 23.6598Z",fill:i}),e.jsx("path",{d:"M60.5614 12.1542C60.8249 11.3011 61.4215 10.5819 62.22 10.1548C63.0185 9.72774 63.9536 9.62779 64.8194 9.87695L81.1433 14.5742C82.0091 14.8234 82.7349 15.4012 83.1609 16.1807C83.5869 16.9601 83.6782 17.8772 83.4148 18.7304L80.4351 28.3805C80.1717 29.2337 79.5751 29.9529 78.7766 30.38C77.978 30.807 77.043 30.907 76.1771 30.6578L59.8533 25.9606C58.9874 25.7114 58.2616 25.1335 57.8357 24.3541C57.4097 23.5747 57.3183 22.6575 57.5817 21.8044L60.5614 12.1542Z",fill:i,stroke:i,strokeWidth:"0.659069",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M80.0397 16.8341C80.8601 16.8354 81.5098 17.0588 81.9889 17.5044C82.468 17.9425 82.7069 18.5348 82.7056 19.2813C82.7052 19.5226 82.6855 19.7375 82.6465 19.926C82.5997 20.1521 82.549 20.3481 82.4946 20.5139L77.7928 20.5067C77.7849 20.5594 77.7809 20.6348 77.7808 20.7329C77.7801 21.125 77.8957 21.4343 78.1275 21.6609C78.367 21.8799 78.6803 21.9897 79.0673 21.9903C79.3923 21.9908 79.6711 21.9234 79.9035 21.788C80.1437 21.6451 80.3375 21.4607 80.4849 21.2347L82.2379 21.2374C81.9505 21.8402 81.5046 22.3372 80.9003 22.7284C80.3037 23.112 79.6261 23.3033 78.8677 23.3021C78.0473 23.3008 77.3898 23.0736 76.8952 22.6204C76.4006 22.1672 76.154 21.5523 76.1554 20.7756C76.1557 20.5494 76.1794 20.3119 76.2262 20.0631C76.3434 19.4148 76.5805 18.8459 76.9373 18.3563C77.3019 17.8667 77.7515 17.4904 78.286 17.2273C78.8204 16.9642 79.405 16.8331 80.0397 16.8341ZM81.0334 19.5502C81.0491 19.4296 81.057 19.3429 81.0571 19.2901C81.0577 18.9282 80.9382 18.6452 80.6986 18.4413C80.4591 18.2373 80.1458 18.135 79.7588 18.1344C79.3486 18.1338 78.9808 18.2614 78.6553 18.5173C78.3298 18.7656 78.1009 19.1084 77.9685 19.5455L81.0334 19.5502Z",fill:"black"}),e.jsx("path",{d:"M75.9993 14.833L74.4643 23.2004L72.8275 23.1979L74.3625 14.8305L75.9993 14.833Z",fill:"black"}),e.jsx("path",{d:"M69.7537 22.2953C69.5365 22.5815 69.2072 22.8223 68.7657 23.0176C68.3242 23.2055 67.8635 23.299 67.3837 23.2983C66.8341 23.2974 66.3894 23.1535 66.0493 22.8664C65.717 22.5794 65.5513 22.1832 65.5521 21.678C65.5529 21.2407 65.6851 20.8601 65.9488 20.5362C66.2203 20.2049 66.5883 19.949 67.053 19.7688C67.5177 19.5885 68.0364 19.4988 68.6091 19.4997L70.2577 19.5023C70.2735 19.3213 70.2814 19.2007 70.2815 19.1404C70.2821 18.7935 70.1897 18.5257 70.0043 18.3369C69.8266 18.1481 69.5636 18.0534 69.2153 18.0529C68.8902 18.0524 68.5998 18.1462 68.3441 18.3343C68.0961 18.5149 67.9099 18.7748 67.7855 19.1139L66.1602 19.1114C66.3936 18.4029 66.797 17.8342 67.3705 17.4053C67.944 16.9764 68.6486 16.7626 69.4845 16.7639C70.2275 16.765 70.827 16.9582 71.283 17.3435C71.739 17.7288 71.9664 18.2569 71.9652 18.928C71.965 19.0864 71.9453 19.2862 71.9062 19.5274L71.2382 23.1911L69.5896 23.1886L69.7537 22.2953ZM68.1404 22.0326C68.3958 22.033 68.663 21.9769 68.9418 21.8642C69.2206 21.744 69.4608 21.5671 69.6625 21.3337C69.8718 21.1003 70.0077 20.8252 70.0702 20.5086L70.0703 20.4747L68.5146 20.4723C68.1276 20.4717 67.8218 20.558 67.597 20.731C67.3723 20.8966 67.2597 21.1 67.2593 21.3413C67.2589 21.5524 67.336 21.7222 67.4906 21.8507C67.6452 21.9715 67.8618 22.0322 68.1404 22.0326Z",fill:"black"}),e.jsx("path",{d:"M61.6435 23.2555C60.8308 23.2542 60.1617 23.076 59.636 22.7208C59.118 22.3581 58.8596 21.8524 58.8607 21.204C58.8609 21.1361 58.8688 21.0343 58.8845 20.8986L60.5446 20.9012C60.5131 21.2178 60.5978 21.4781 60.7987 21.682C61.0073 21.8859 61.309 21.9882 61.7037 21.9888C62.0984 21.9894 62.4081 21.9107 62.6328 21.7527C62.8653 21.5872 62.9818 21.3536 62.9823 21.052C62.9828 20.773 62.8632 20.5503 62.6236 20.3841C62.3917 20.2178 62.0244 20.0325 61.5216 19.8282C61.0576 19.6389 60.6786 19.4649 60.3848 19.3061C60.0987 19.1473 59.8514 18.9283 59.6429 18.6489C59.4422 18.3621 59.3422 18.0038 59.3429 17.574C59.3438 17.0838 59.4722 16.658 59.7282 16.2965C59.992 15.9349 60.3485 15.6565 60.7977 15.4611C61.2547 15.2658 61.7734 
2415.1685 62.3539 15.1694C62.9266 15.1703 63.4218 15.2653 63.8394 15.4545C64.2647 15.6361 64.5816 15.8967 64.79 16.2364C65.0061 16.576 65.0983 16.9721 65.0666 17.4244L63.3368 17.4218L63.3486 17.2974C63.3491 17.0485 63.2527 16.8448 63.0594 16.6861C62.874 16.5275 62.611 16.4479 62.2704 16.4474C61.9067 16.4468 61.6124 16.5293 61.3877 16.6949C61.163 16.8604 61.0503 17.0865 61.0499 17.373C61.0495 17.5615 61.1112 17.7275 61.2348 17.871C61.3661 18.0069 61.5245 18.1278 61.7101 18.2336C61.8957 18.3319 62.1625 18.4605 62.5105 18.6194C62.9668 18.8162 63.3418 19.0015 63.6356 19.1754C63.9294 19.3493 64.1806 19.5796 64.3891 19.8665C64.5975 20.1534 64.7014 20.5042 64.7007 20.9189C64.6999 21.3713 64.5715 21.7745 64.3155 22.1285C64.0673 22.4825 63.7108 22.761 63.246 22.9639C62.7891 23.1592 62.2549 23.2564 61.6435 23.2555Z",fill:"black"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_0_5",children:e.jsx("rect",{width:"154",height:"33",fill:"white"})})})]})},Ms="2025-11-28,2025-12-15,2025-12-31",_s=()=>{const s=Ms.split(",").map(h=>h.trim()),n=new Date().getTime();for(const h of s){const[r,u,d]=h.split("-").map(Number),m=new Date(Date.UTC(r,u-1,d,23,59,59,999));if(m.getTime()>n)return m.getTime()}const a=s[s.length-1],[i,l,x]=a.split("-").map(Number);return new Date(Date.UTC(i,l-1,x,23,59,59,999)).getTime()};function Ve(){const t=_s(),s=new Date().getTime(),n=t-s;if(n<=0)return{days:0,hours:0,minutes:0,seconds:0};const a=Math.floor(n/(1e3*60*60*24)),i=Math.floor(n/(1e3*60*60)%24),l=Math.floor(n/(1e3*60)%60),x=Math.floor(n/1e3%60);return{days:a,hours:i,minutes:l,seconds:x}}const Ke=[{label:"Days",key:"days"},{label:"Hours",key:"hours"},{label:"Minutes",key:"minutes"},{label:"Seconds",key:"seconds"}],gt="nudgeAndAlertMeta",Ps=12,Ds="bfBannerAddonDismissedAt",Hs="bfBannerPurchaseDismissedAt",ze=()=>Ds,Ge=()=>Hs,Ye=t=>{const s=localStorage.getItem(gt),n=s?JSON.parse(s):{},a=String(t),i=n[a]||{};return{existingMeta:n,userMeta:i}},Xe=(t,s,n)=>{const a=String(t),i={...n,[a]:s};return localStorage.setItem(gt,JSON.stringify(i)),i},Ts=({onClaimDeal:t,hasMadeTransaction:s=!1,onClose:n})=>{const{t:a}=L("agency"),[i,l]=C.useState(Ve()),[x,p]=C.useState(!1),h=H(c=>c.userId()),r=H(c=>c.updateNudgeAndAlertMeta),u=R(c=>c.customAgency()),d=R(c=>c.isAgencyBlackFridayAddOnAvailed()),m=b(c=>c.isAgencyLicenseSuspended()),j=b(c=>c.isAgencyLicenseOnDue());C.useEffect(()=>{try{const{existingMeta:c,userMeta:w}=Ye(h),M=s?ze():Ge();if(w[M]){const D=new Date(w[M]);(new Date().getTime()-D.getTime())/(1e3*60*60)<Ps?p(!0):(delete w[M],Xe(h,w,c),p(!1))}}catch(c){console.error("Error checking banner dismissal:",c)}},[h,s]);const N=()=>{try{const{existingMeta:c,userMeta:w}=Ye(h),M=s?ze():Ge();w[M]=new Date().toISOString();const D=Xe(h,w,c);r(D),p(!0),n==null||n()}catch(c){console.error("Error saving banner dismissal:",c),p(!0),n==null||n()}},f=s;if(C.useEffect(()=>{const c=setInterval(()=>{l(Ve())},1e3);return()=>clearInterval(c)},[]),u||x||f&&d||f&&m||f&&j||i.days===0&&i.hours===0&&i.minutes===0&&i.seconds===0)return null;const y=f?"#FFC107":"#76CBA1",S=f?"green-bg":"black-bg";return e.jsxs("div",{className:`relative flex w-full py-3 black-friday ${S} bg-cover bg-center bg-no-repeat`,children:[e.jsx("button",{onClick:N,className:"absolute top-[5px] right-3 text-white hover:opacity-70 cursor-pointer","aria-label":"Close banner",children:e.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",children:e.jsx("path",{d:"M14.25 4.75L4.75 14.25M4.75 4.75L14.25 14.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),e.jsxs("div",{className:"flex items-center mx-20",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(As,{width:154,height:33,lockColor:y,className:"h-[33px] w-[154px]"}),e.jsxs("div",{className:"flex flex-col gap-1 text-white ml-8",children:[e.jsx("p",{className:"text-[18px] font-bold leading-[27px]",children:a(f?"agency.blackFridayBanner.addMore.title":"agency.blackFridayBanner.default.title")}),e.jsx("p",{className:"text-[14px] leading-5",children:f?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"font-normal text-white",children:[a("agency.blackFridayBanner.addMore.descriptionStart")," "]}),e.jsxs("span",{className:"font-bold bg-gradient-to-r from-[#FFC107] to-[#DFA906] bg-clip-text text-transparent",children:[a("agency.blackFridayBanner.addMore.highlight")," "]}),e.jsx("span",{className:"font-normal text-white",children:a("agency.blackFridayBanner.addMore.descriptionEnd")})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-normal text-white",children:a("agency.blackFridayBanner.default.description")})," ",e.jsx("span",{className:"font-bold text-[#57bd8d]",children:a("agency.blackFridayBanner.default.offer")})]})})]})]}),e.jsx(A,{onClick:t,className:`px-6 py-[7px] text-base font-semibold mx-14 outline-none border-none ${f?"bg-white text-[#33a881]":"bg-[#33a881] text-white"}`,children:a("agency.blackFridayBanner.cta")})]}),e.jsx("div",{className:"flex justify-end w-80",children:e.jsx("div",{className:"border border-[#4e4b66]  px-4 py-2 rounded-lg",children:e.jsx("div",{className:"flex items-center gap-1",children:Ke.map((c,w)=>e.jsxs(Ae.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("span",{className:"timer-digit text-xl leading-[21px] text-white",children:String(i[c.key]).padStart(c.key==="days"?1:2,"0")}),e.jsx("span",{className:"text-[9px] leading-[9px] text-white",children:c.label})]}),w<Ke.length-1&&e.jsx("span",{className:"timer-digit text-xs font-bold text-white",children:":"})]},c.key))})})})]})]})};function se(t){const s=localStorage.getItem(st),n=s?JSON.parse(s):{},a=n[String(t)]??{};return{existingMeta:n,userMeta:a}}function ae(t,s,n){const a={...n,[String(t)]:s};return localStorage.setItem(st,JSON.stringify(a)),a}function Je(){const t=Et()-Date.now();return t<=0?{days:0,hours:0,minutes:0,seconds:0}:{days:Math.floor(t/(1e3*60*60*24)),hours:Math.floor(t/(1e3*60*60)%24),minutes:Math.floor(t/(1e3*60)%60),seconds:Math.floor(t/1e3%60)}}const Is=({onClaimDeal:t,hasMadeTransaction:s=!1,isAddonAvailed:n=!1,onClose:a})=>{const{t:i}=L("agency"),[l,x]=C.useState(Je()),[p,h]=C.useState(!1),r=H(y=>y.userId()),u=H(y=>y.updateNudgeAndAlertMeta),d=R(y=>y.customAgency()),m=b(y=>y.isAgencyLicenseSuspended()),j=b(y=>y.isAgencyLicenseOnDue());C.useEffect(()=>{try{const{existingMeta:y,userMeta:S}=se(r),c=s?Ze:$e;if(S[c]){const w=new Date(S[c]);(Date.now()-w.getTime())/(1e3*60*60)<at?h(!0):(delete S[c],ae(r,S,y),h(!1))}}catch(y){console.error("Error checking promo banner dismissal:",y)}},[r,s]),C.useEffect(()=>{const y=setInterval(()=>x(Je()),1e3);return()=>clearInterval(y)},[]);const N=()=>{try{const{existingMeta:y,userMeta:S}=se(r),c=s?Ze:$e;S[c]=new Date().toISOString();const w=ae(r,S,y);u(w),h(!0),a==null||a()}catch(y){console.error("Error saving promo banner dismissal:",y),h(!0),a==null||a()}};if(d||p||s&&n||s&&m||s&&j||l.days===0&&l.hours===0&&l.minutes===0&&l.seconds===0)return null;const f=s;return e.jsxs("div",{className:"w-full flex items-center py-1 relative overflow-hidden min-h-20",style:{background:f?"linear-gradient(100.06deg, var(--color-promo-bg-end) 11.3%, var(--color-promo-addon-bg-end) 93.3%)":"linear-gradient(-70.16deg, var(--color-promo-bg-start) 25%, var(--color-promo-bg-end) 99%)"},"data-testid":"agency-promo-banner",children:[e.jsx("img",{src:"/images/agency-promo-confetti-left.svg",alt:"","aria-hidden":"true",className:"absolute top-0 h-full pointer-events-none select-none",style:{left:"-48px",width:"238px",mixBlendMode:"soft-light"}}),e.jsxs("div",{className:"flex items-center gap-[106px] justify-center flex-1 mx-28 z-10",children:[e.jsxs("div",{className:"flex gap-8 items-center shrink-0",children:[e.jsxs("div",{className:"flex gap-4 items-center shrink-0",children:[e.jsx("img",{src:"/images/agency-promo-logo.svg",alt:"GDPR anniversary logo",className:"h-[46px] w-[102px] shrink-0",draggable:"false"}),!f&&e.jsxs("div",{className:"relative shrink-0 h-8 w-40",children:[e.jsx("img",{src:"/images/agency-promo-badge-bg.svg",alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full"}),e.jsx("span",{className:"absolute inset-0 flex items-center pl-4 text-lg font-normal text-black leading-6 tracking-[0.12px] whitespace-nowrap",children:i("agency.agencyPromoBanner.badge")})]})]}),e.jsxs("div",{className:"flex flex-col gap-px text-white whitespace-nowrap",children:[e.jsx("p",{className:"text-2xl font-bold leading-[27px]",children:i(f?"agency.agencyPromoBanner.addon.title":"agency.agencyPromoBanner.title")}),f?e.jsxs("p",{className:"text-md font-normal leading-5",children:[e.jsxs("span",{className:"font-normal text-white",children:[i("agency.agencyPromoBanner.addon.descriptionStart")," "]}),e.jsxs("span",{className:"font-bold bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(to right, var(--color-promo-highlight-gold-start), var(--color-promo-highlight-gold-end))"},children:[i("agency.agencyPromoBanner.addon.highlight")," "]}),e.jsx("span",{className:"font-normal text-white",children:i("agency.agencyPromoBanner.addon.descriptionEnd")})]}):e.jsx("p",{className:"text-md font-normal leading-5",children:i("agency.agencyPromoBanner.description")})]})]}),e.jsx(A,{className:z("text-dark text-xl font-semibold px-6 py-[7px] rounded-[4px] border-none shadow-[0_8px_13px_0_rgba(39,40,60,0.2)] shrink-0",f?"bg-white hover:bg-white/90":"bg-promo-cta-green hover:bg-promo-cta-green/90"),onClick:t,"data-testid":"agency-promo-banner-cta",children:i("agency.agencyPromoBanner.cta")}),e.jsx("div",{className:z("flex items-center justify-center gap-1 px-4 py-2 rounded-lg border h-14 w-[186px] overflow-hidden shrink-0",f?"border-secondary-dark":"border-promo-countdown-border"),style:{background:"linear-gradient(to right, rgba(0,0,0,0.04), rgba(0,0,0,0.4))"},"data-testid":"agency-promo-countdown",children:nt.map((y,S)=>e.jsxs(Ae.Fragment,{children:[S>0&&e.jsx("span",{className:"text-white font-bold text-[12px] w-1 text-center shrink-0",children:":"}),e.jsxs("div",{className:"flex flex-col items-center gap-1 text-white whitespace-nowrap tracking-[-0.25px]",children:[e.jsx("span",{className:"text-3xl font-semibold leading-[21px]",children:l[y.key]}),e.jsx("span",{className:"text-[9px] font-normal leading-[9px]",children:y.label})]})]},y.key))})]}),e.jsx("button",{className:"absolute top-1.5 right-3 text-white opacity-70 hover:opacity-100 transition-opacity z-10",onClick:N,"aria-label":"Close banner","data-testid":"agency-promo-banner-close",children:e.jsx(W,{size:18})})]})};function qe(){const t=Bt()-Date.now();return t<=0?{days:0,hours:0,minutes:0,seconds:0}:{days:Math.floor(t/(1e3*60*60*24)),hours:Math.floor(t/(1e3*60*60)%24),minutes:Math.floor(t/(1e3*60)%60),seconds:Math.floor(t/1e3%60)}}const Os=({onClaimDeal:t,onClose:s})=>{const{t:n}=L("agency"),[a,i]=C.useState(qe()),[l,x]=C.useState(!1),p=H(d=>d.userId()),h=H(d=>d.updateNudgeAndAlertMeta);C.useEffect(()=>{try{const{existingMeta:d,userMeta:m}=se(p);if(m[Y]){const j=new Date(m[Y]);(Date.now()-j.getTime())/(1e3*60*60)<at?x(!0):(delete m[Y],ae(p,m,d),x(!1))}}catch(d){console.error("Error checking promo banner dismissal:",d)}},[p]),C.useEffect(()=>{const d=setInterval(()=>i(qe()),1e3);return()=>clearInterval(d)},[]);const r=()=>{try{const{existingMeta:d,userMeta:m}=se(p);m[Y]=new Date().toISOString();const j=ae(p,m,d);h(j),x(!0),s==null||s()}catch(d){console.error("Error saving promo banner dismissal:",d),x(!0),s==null||s()}},u=a.days===0&&a.hours===0&&a.minutes===0&&a.seconds===0;return l||u?null:e.jsxs("div",{className:"w-full relative overflow-hidden min-h-[70px]",style:{background:"linear-gradient(-70.16deg, #364253 25.069%, #111111 99.114%)"},"data-testid":"agency-promo-strip",children:[e.jsx("img",{src:"/images/agency-promo-confetti-left.png",alt:"","aria-hidden":"true","data-testid":"agency-promo-strip-confetti-left",className:"absolute left-0 top-0 h-full pointer-events-none select-none"}),e.jsx("div",{className:"absolute -translate-y-1/2 top-1/2 z-10",style:{left:"120px",width:"1280px"},children:e.jsxs("div",{className:"flex flex-1 gap-[106px] items-center justify-center",children:[e.jsxs("div",{className:"flex gap-8 items-center shrink-0",children:[e.jsxs("div",{className:"flex gap-1.5 items-center shrink-0",children:[e.jsx("img",{src:"/images/agency-promo-logo.svg",alt:"Agency Logo",className:"shrink-0",style:{height:"36px",width:"119px"},draggable:"false"}),e.jsxs("div",{className:"inline-grid grid-cols-[max-content] grid-rows-[max-content] leading-[0] place-items-start relative shrink-0",children:[e.jsx("div",{className:"[grid-area:1/1] relative mt-[0.75px]",style:{height:"31.094px",width:"115.094px"},children:e.jsx("div",{className:"absolute",style:{inset:"0 -4.5% -16.67% 0"},children:e.jsx("img",{src:"/images/agency-promo-wceu-badge.svg",alt:"","aria-hidden":"true",className:"block w-full h-full"})})}),e.jsx("p",{className:"[grid-area:1/1] relative font-[Poppins] font-normal not-italic text-[19.434px] text-black text-center tracking-[0.155px] [word-break:break-word]",style:{lineHeight:"31.094px",marginLeft:"6.52px",width:"97.742px",fontFeatureSettings:'"ss02" 1, "ss04" 1, "liga" 0, "clig" 0'},children:"Exclusive"})]})]}),e.jsxs("div",{className:"flex flex-col gap-px items-start shrink-0 text-white",children:[e.jsx("p",{className:"text-2xl font-bold leading-[27px]",children:n("agency.agencyPromoBanner.title")}),e.jsx("p",{className:"text-md font-normal leading-5",style:{width:"392px"},children:n("agency.agencyPromoBanner.description")})]})]}),e.jsx("button",{className:"bg-promo-cta-green text-promo-cta-text text-xl font-semibold leading-6 px-6 py-[7px] rounded-sm shrink-0 cursor-pointer transition-opacity hover:opacity-90",style:{filter:"drop-shadow(0px 8px 13px rgba(39, 40, 60, 0.2))"},onClick:t,"data-testid":"agency-promo-strip-cta",children:n("agency.agencyPromoBanner.cta")}),e.jsx("div",{className:"flex items-center gap-1 rounded-lg border border-promo-countdown-border overflow-clip shrink-0 px-4 py-2",style:{width:"186px",height:"56px",background:"linear-gradient(to right, rgba(0,0,0,0.04), rgba(0,0,0,0.4))"},"data-testid":"agency-promo-strip-countdown",children:nt.map((d,m)=>e.jsxs(Ae.Fragment,{children:[m>0&&e.jsx("span",{className:"w-1 text-white font-bold text-xs leading-[18px] tracking-[-0.222px] font-[Poppins]",children:":"}),e.jsxs("div",{className:"flex flex-col gap-1 items-center tracking-[-0.25px] whitespace-nowrap",children:[e.jsx("span",{className:"text-3xl font-semibold leading-[21px] text-white",children:String(a[d.key]).padStart(2,"0")}),e.jsx("span",{className:"text-[9px] font-normal leading-[9px] text-white",children:d.label})]})]},d.key))})]})}),e.jsx("button",{className:"absolute opacity-70 hover:opacity-100 transition-opacity z-10 cursor-pointer",style:{right:"11px",top:"5px",width:"18px",height:"18px"},onClick:r,"aria-label":"Close banner","data-testid":"agency-promo-strip-close",children:e.jsx(W,{size:18,className:"text-white"})})]})},xt=({width:t=19,height:s=19,svgColor:n="white"})=>e.jsxs("svg",{"data-testid":"call-icon-svg",xmlns:"http://www.w3.org/2000/svg",width:t,height:s,viewBox:"0 0 19 20",fill:"none",children:[e.jsx("path",{d:"M15.6555 9.23205H17.1837C17.1837 5.31224 14.2244 2.35596 10.2992 2.35596V3.88415C13.4029 3.88415 15.6555 6.13288 15.6555 9.23205Z",fill:n}
24),e.jsx("path",{d:"M10.3068 6.9406C11.9137 6.9406 12.5991 7.626 12.5991 9.23289H14.1273C14.1273 6.76868 12.771 5.41241 10.3068 5.41241V6.9406ZM12.9216 11.0996C12.7748 10.9659 12.5818 10.8947 12.3835 10.9008C12.1851 10.9069 11.9969 10.99 11.8587 11.1324L10.0302 13.0129C9.5901 12.9288 8.70528 12.653 7.79447 11.7445C6.88367 10.8329 6.60783 9.94579 6.52608 9.50873L8.40499 7.67948C8.54742 7.54128 8.6305 7.35308 8.63663 7.15471C8.64276 6.95634 8.57147 6.76336 8.43784 6.61663L5.61451 3.51211C5.48082 3.36491 5.29502 3.27562 5.09657 3.26321C4.89811 3.2508 4.70264 3.31624 4.55165 3.44563L2.89357 4.86761C2.76146 5.00019 2.68261 5.17665 2.67198 5.36351C2.66052 5.55453 2.44198 10.0795 5.95071 13.5898C9.01168 16.65 12.8459 16.8738 13.9019 16.8738C14.0562 16.8738 14.151 16.8693 14.1762 16.8677C14.3629 16.8567 14.5391 16.7776 14.6713 16.6454L16.0926 14.9865C16.222 14.8356 16.2876 14.6402 16.2753 14.4418C16.2631 14.2433 16.1739 14.0575 16.0268 13.9237L12.9216 11.0996Z",fill:n})]});function Es(t){try{return new URL(t).origin}catch{return null}}function Pe({isOpen:t,onOpenChange:s}){const{t:n}=L(),a=H(u=>u.userEmail()),i=H(u=>u.userName()),{mutateAsync:l}=it(),x="https://calendly.com/cookieyes-support/15mins?hide_event_type_details=1&hide_gdpr_banner=1&utm_source=webapp&utm_medium=onboarding&utm_campaign=book_call_feature",p=x.startsWith("http"),h=p?`${x}&name=${i}&email=${a}`:"",r=Es(x);return C.useEffect(()=>{if(!t||!p)return;function u(m){if(!r||m.origin!==r)return;const j=m.data;if(!j||j.event!==$t)return;const{onboardingChecklist:N,setOnboardingChecklist:f}=b.getState();f({...N??$,call_booked:!0}),l({flag:"call_booked"}).catch(y=>{console.error("Failed to persist call_booked flag:",y.message)})}window.addEventListener("message",u);const d=document.createElement("script");return d.src="https://assets.calendly.com/assets/external/widget.js",d.async=!0,document.body.appendChild(d),()=>{window.removeEventListener("message",u),d.parentNode&&d.parentNode.removeChild(d)}},[t]),e.jsx(rt,{open:t,onOpenChange:s,children:e.jsxs(Ft,{children:[e.jsx(Rt,{className:"fixed inset-0 z-[1073] bg-black/50"}),e.jsxs(Ut,{className:z("fixed left-[50%] top-[50%] z-[1074] w-[90vw] sm:w-[80vw] md:w-[70vw] lg:w-[60vw] xl:w-[35vw] max-w-[500px] max-h-[90vh] translate-x-[-50%] translate-y-[-50%] rounded-lg bg-agency-background shadow-lg overflow-hidden"),children:[e.jsxs(Zt,{className:"px-4",children:[e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsx("span",{className:"text-2xl font-semibold pr-4",children:n("agency.callSupportModal.title")}),e.jsx("button",{onClick:()=>s(!1),className:"hover:opacity-70 cursor-pointer",children:e.jsx(W,{className:"h-5 w-5  text-secondary-dark"})})]}),e.jsx("span",{className:"text-sm text-secondary mb-4",children:n("agency.callSupportModal.description")})]}),e.jsx("div",{className:"mt-1 flex justify-center px-4 pb-4overflow-hidden",children:e.jsx("div",{className:"flex justify-center w-full bg-white rounded-lg overflow-hidden",children:e.jsx("div",{className:"calendly-inline-widget w-full","data-url":h,style:{height:"min(460px, calc(90vh - 200px))",minHeight:"300px",width:"100%"}})})})]})]})})}function Bs(){const{t}=L(),[s,n]=C.useState(!1),a=()=>{n(!0)};return e.jsxs(e.Fragment,{children:[!s&&e.jsx("div",{className:"fixed bottom-6 right-8 bg-gradient-to-r from-blue-500 to-blue-600 rounded-[4px]","data-testid":"call-support-widget",children:e.jsxs("div",{className:"flex items-center p-4",children:[e.jsxs("div",{className:"flex flex-col mr-4",children:[e.jsxs("span",{className:"flex items-center font-bold text-white",children:[e.jsx(xt,{}),e.jsx("span",{className:"ml-1 text-md",children:t("agency.callSupportWidget.title")})]}),e.jsx("span",{className:"text-sm text-white",children:t("agency.callSupportWidget.description")})]}),e.jsx("div",{children:e.jsx("button",{className:"bg-white px-4 py-2 rounded-[4px] cursor-pointer",onClick:a,children:e.jsx("span",{className:"text-blue-600 text-sm font-semibold",children:t("agency.callSupportWidget.btnText")})})})]})}),e.jsx(Pe,{isOpen:s,onOpenChange:n})]})}const Fs=()=>{const t=b(r=>r.showMigrationBanner),s=b(r=>r.setShowMigrationBanner),{t:n}=L(),[a,i]=C.useState(!1),{mutateAsync:l,isPending:x}=Wt(),p=C.useRef(!1);if(!t)return null;const h=async()=>{var r;if(!p.current){p.current=!0;try{const u=await l();s(((r=u==null?void 0:u.data)==null?void 0:r.show_migration_banner)??!1)}catch(u){Me.error(Vt(u,n("agency.migrationBanner.dismissError")))}finally{p.current=!1}}};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{role:"status","aria-live":"polite",className:"relative p-4 bg-primary-lightest border border-primary-lightest mb-4 rounded w-full","data-testid":"migration-notice-banner",children:[e.jsxs("div",{className:"flex items-center w-full gap-3",children:[e.jsx("div",{className:"bg-primary-lighter p-2 rounded-lg flex-shrink-0","data-testid":"migration-banner-icon-container",children:e.jsx(Ns,{className:"h-7 w-7 text-primary-dark","aria-hidden":"true"})}),e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsxs("div",{className:"flex-grow pr-4",children:[e.jsx("p",{className:"text-base font-semibold text-dark mb-1","data-testid":"migration-banner-title",children:n("agency.migrationBanner.title")}),e.jsx("p",{className:"text-sm text-secondary-dark","data-testid":"migration-banner-body",children:e.jsx(Qe,{i18nKey:"agency.migrationBanner.body",components:{bold:e.jsx("strong",{className:"font-semibold"})}})})]}),e.jsx("div",{className:"flex items-center flex-shrink-0 ml-4 mr-8",children:e.jsx(A,{variant:"primary",onClick:()=>i(!0),"data-testid":"migration-banner-cta",children:n("agency.migrationBanner.cta")})})]})]}),e.jsx("button",{type:"button",className:"absolute top-3 right-3 text-secondary-dark hover:text-dark transition-colors disabled:opacity-50 disabled:cursor-not-allowed",onClick:h,disabled:x,"aria-busy":x,"data-testid":"migration-banner-close","aria-label":n("agency.migrationBanner.closeLabel"),children:e.jsx(W,{className:"w-5 h-5"})})]}),e.jsx(dt,{isOpen:a,onClose:()=>i(!1)})]})};function Rs(){const{t}=L(),s=_e(),n=b(i=>i.isAgencyAddSiteDisabled());return b(i=>i.pricingModel)===null?e.jsxs("div",{"data-testid":"agency-pricing-cta-card",className:"bg-white rounded-lg shadow-sm p-8 flex flex-col items-center gap-4 w-full",children:[e.jsx(Se,{className:"h-8 w-64"}),e.jsx(Se,{className:"h-5 w-96"}),e.jsx(Se,{className:"h-10 w-40"})]}):e.jsxs("div",{"data-testid":"agency-pricing-cta-card",className:"bg-white rounded-lg shadow-sm p-8 flex flex-col items-center gap-4 w-full",children:[e.jsx("h3",{"data-testid":"agency-pricing-cta-title",className:"text-2xl font-semibold text-center",children:t("agency.newPricing.cta.title")}),e.jsx("p",{"data-testid":"agency-pricing-cta-subtitle",className:"text-xl text-center max-w-sm",children:t("agency.newPricing.cta.subtitle.starter")}),e.jsxs(A,{variant:"primary",disabled:n,onClick:()=>s({to:"/agency/add-site"}),"data-testid":"agency-pricing-cta-btn",children:[e.jsx(lt,{className:"w-5 h-5 mr-1"}),t("agency.newPricing.cta.addFirstSite")]})]})}function Us(){const{t}=L(),s=b(l=>l.license),n=(s==null?void 0:s.active_sites)??0,a=ct(n),i=te.findIndex(l=>l.key===a.key);return e.jsxs("div",{"data-testid":"agency-tier-progress-card",className:"bg-white rounded-lg shadow-sm p-8 flex flex-col items-center gap-6 w-full",children:[e.jsx("h3",{"data-testid":"agency-tier-progress-title",className:"text-2xl font-semibold text-center",children:t("agency.newPricing.tiers.title")}),e.jsx("div",{className:"w-full overflow-x-auto",children:e.jsx("div",{className:"flex items-start min-w-[1060px] py-3 px-10 gap-0",children:te.map((l,x)=>e.jsxs(C.Fragment,{children:[x>0&&e.jsxs("div",{className:"flex-1 h-2 self-center relative bg-[#d9dbe9]",children:[i>=x&&e.jsx("div",{className:"absolute inset-0 bg-[#136fe8] rounded-r-full"}),i===x-1&&e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-[35%] bg-[#136fe8] rounded-r-full"})]}),e.jsx(bs,{tier:l,testId:`agency-tier-box-${l.key}`,isCurrent:l.key===a.key})]},l.key))})}),e.jsx("p",{"data-testid":"agency-tier-progress-footer",className:"text-md text-center",children:t("agency.newPricing.tiers.footer")})]})}const Zs={starter:{backgroundColor:"#1578F7"},bronze:{background:"linear-gradient(90.03deg, #B26C08 0%, #EBB15E 100%)"},silver:{background:"linear-gradient(135deg, #747E98 0%, #CCCCCC 50%, #747E98 100%)"},gold:{background:"linear-gradient(72.47deg, #E8A616 -64.63%, #F2A061 68.57%, #E8A616 201.77%)"}},$s={background:"linear-gradient(90deg, #008AED 0%, #73C2FB 100%)"};function Ws(t){return t==="platinum"?$s:Zs[t]}function Vs({totalSites:t,inTrialCount:s,onViewTiers:n}){const{t:a}=L();return e.jsxs("div",{"data-testid":"agency-pricing-platinum-summary",className:"flex w-full flex-row flex-wrap items-center justify-between gap-x-4 gap-y-2",children:[e.jsxs("span",{"data-testid":"agency-pricing-progress-sites-label",className:"text-secondary-dark text-md leading-normal",children:[e.jsx("span",{className:"font-semibold",children:t}),e.jsxs("span",{className:"font-normal",children:[a("agency.newPricing.progress.sitesAfterCount",{count:t}),s>0?e.jsxs(e.Fragment,{children:[" ",a("agency.newPricing.progress.trialInParens",{trial:s})]}):null]})]}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-row flex-wrap items-center justify-end gap-x-4 gap-y-1 text-right",children:[e.jsx("p",{"data-testid":"agency-pricing-platinum-message",className:`m-0 min-w-0 text-secondary-dark ${Ne}`,children:a("agency.newPricing.progress.platinumPartner")}),e.jsxs("a",{"data-testid":"agency-pricing-contact-support",href:Kt,target:"_blank",rel:"noopener noreferrer",className:`text-primary inline-flex shrink-0 items-center gap-1 underline ${Ne}`,children:[a("agency.newPricing.progress.contactSupport"),e.jsx(Cs,{className:"h-4 w-4 shrink-0","aria-hidden":!0})]}),e.jsx("button",{type:"button","data-testid":"agency-pricing-view-all-tiers",className:`text-primary shrink-0 cursor-pointer border-none bg-transparent p-0 underline ${Ne}`,onClick:n,children:a("agency.newPricing.progress.viewAllTiers")})]})]})}function Ks({totalSites:t,inTrialCount:s,remaining:n,nextTierName:a,onViewTiers:i}){const{t:l}=L();return e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("span",{"data-testid":"agency-pricing-progress-sites-label",className:"text-secondary-dark text-md font-medium",children:s>0?l("agency.newPricing.progress.sitesCountWithTrial",{count:t,trial:s}):l("agency.newPricing.progress.sitesCount",{count:t})}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{"data-testid":"agency-pricing-progress-nudge",className:"text-secondary-dark text-sm",children:l("agency.newPricing.progress.unlockNext",{count:n,remaining:n,tier:a})}),e.jsx("button",{type:"button","data-testid":"agency-pricing-view-all-tiers",className:"text-primary curs
24or-pointer border-none bg-transparent p-0 text-sm",onClick:i,children:l("agency.newPricing.progress.viewAllTiers")})]})]})}function zs({totalSites:t,inTrialCount:s,tier:n,progressPercent:a,remaining:i,nextTierName:l,onViewTiers:x}){return e.jsxs(e.Fragment,{children:[e.jsx(Ks,{totalSites:t,inTrialCount:s,remaining:i,nextTierName:l,onViewTiers:x}),e.jsx(zt,{"data-testid":"agency-pricing-progress-bar-fill",value:a,className:"h-2 bg-secondary-lighter",indicatorClassName:"bg-transparent",indicatorStyle:Ws(n.key)})]})}function Gs(t){var a;if(t.nextThreshold===null)return"";const s=te.findIndex(i=>i.key===t.key),n=((a=te[s+1])==null?void 0:a.key)??"platinum";return n.charAt(0).toUpperCase()+n.slice(1)}function Ys(){const[t,s]=C.useState(!1),n=b(N=>N.getTotalSitesForProgress),a=b(N=>{var f;return((f=N.websiteCounts)==null?void 0:f.in_trial)??0}),i=b(N=>{var f;return(f=N.websiteCounts)==null?void 0:f.by_status}),l=n(),x=ct(l),p=i?i.active+i.draft+i.past_due:l,h=x.key==="platinum",r=x.nextThreshold!==null?Math.min(100,Math.round(l/x.nextThreshold*100)):100,u=x.nextThreshold!==null?x.nextThreshold-l:0,d=Gs(x),m=()=>s(!0),j=h?"w-full rounded-lg border border-secondary-lighter bg-white px-6 py-4 shadow-sm":"w-full rounded-lg bg-white px-6 py-4 shadow-sm";return e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-testid":"agency-pricing-progress-bar",className:j,children:h?e.jsx(Vs,{totalSites:p,inTrialCount:a,onViewTiers:m}):e.jsx(zs,{totalSites:p,inTrialCount:a,tier:x,progressPercent:r,remaining:u,nextTierName:d,onViewTiers:m})}),e.jsx(dt,{isOpen:t,onClose:()=>s(!1)})]})}function Xs({stepNumber:t,status:s}){return s==="completed"?e.jsx("div",{className:"w-6 h-6 rounded-full bg-success flex items-center justify-center flex-shrink-0","data-testid":`step-icon-${t}`,children:e.jsx(ot,{className:"w-3 h-3 text-white"})}):s==="active"?e.jsx("div",{className:"w-6 h-6 rounded-full bg-primary flex items-center justify-center flex-shrink-0 ring-2 ring-primary-lighter","data-testid":`step-icon-${t}`,children:e.jsx("span",{className:"text-xs text-white font-semibold",children:t})}):e.jsx("div",{className:"w-6 h-6 rounded-full border border-gray-light flex items-center justify-center flex-shrink-0","data-testid":`step-icon-${t}`,children:e.jsx("span",{className:"text-xs text-gray-placeholder font-semibold",children:t})})}function Js({stepNumber:t,title:s,description:n,status:a,isExpanded:i,onToggle:l,tipText:x,primaryCtaLabel:p,onPrimaryCtaClick:h,secondaryCtaLabel:r,onSecondaryCtaClick:u}){const d=a==="completed";return e.jsxs("div",{className:"px-6 py-4",children:[e.jsxs("button",{type:"button",className:"flex items-center justify-between w-full text-left",onClick:l,"data-testid":`step-toggle-${t}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Xs,{stepNumber:t,status:a}),e.jsx("span",{className:z("text-md font-semibold",d?"line-through text-gray-placeholder":"text-dark"),"data-testid":`step-title-${t}`,children:s})]}),e.jsx("div",{className:"flex-shrink-0 ml-2",children:i?e.jsx(Gt,{className:"w-4 h-4 text-secondary"}):e.jsx(Yt,{className:"w-4 h-4 text-secondary"})})]}),i&&e.jsxs("div",{className:"mt-3 ml-9",children:[e.jsx("p",{className:"text-sm text-secondary-dark mb-3",children:n}),x&&e.jsx("div",{className:"inline-flex px-3 py-1 rounded-full bg-primary-lightest border border-primary text-xs text-primary mb-3",children:x}),!d&&(p||r)&&e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[p&&h&&e.jsx(A,{variant:"primary",size:"md",onClick:h,"data-testid":`step-cta-primary-${t}`,children:p}),r&&u&&e.jsx(A,{variant:"outline-secondary",size:"md",onClick:u,"data-testid":`step-cta-secondary-${t}`,children:r})]})]})]})}function qs({currentStep:t,totalSteps:s,onReopen:n,onDismiss:a}){const{t:i}=L();return e.jsxs("div",{className:"fixed bottom-6 right-28 z-50 bg-primary rounded-full px-3 py-2 flex items-center gap-2 cursor-pointer shadow-[0px_4px_20px_0px_rgba(19,111,232,0.4)]",onClick:n,role:"button",tabIndex:0,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&n()},"data-testid":"agency-onboarding-checklist-floating-tile",children:[e.jsxs("span",{className:"bg-white rounded-full px-2 py-0.5 text-xs font-bold text-primary","data-testid":"floating-tile-step-label",children:["Step ",t,"/",s]}),e.jsx("span",{className:"text-sm font-bold text-white",children:i("agencyDashboard.onboardingChecklist.floatingTile.completeSetup")}),e.jsx(J,{children:e.jsxs(q,{children:[e.jsx(Q,{asChild:!0,children:e.jsx("button",{type:"button",className:"cursor-pointer text-white",onClick:l=>{l.stopPropagation(),a()},"data-testid":"btn-floating-tile-close","aria-label":i("agencyDashboard.onboardingChecklist.floatingTile.dontShowAgain"),children:e.jsx(W,{size:16})})}),e.jsx(ee,{side:"top",children:i("agencyDashboard.onboardingChecklist.floatingTile.dontShowAgain")})]})})]})}function Qs(t){Me.custom(()=>e.jsxs("div",{className:"flex items-center gap-[10px] bg-white rounded px-4 py-3 shadow-[0px_16px_24px_0px_rgba(0,0,0,0.12)]",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-primary flex items-center justify-center flex-shrink-0",children:e.jsx(ot,{className:"w-3.5 h-3.5 text-white",strokeWidth:2.5})}),e.jsx("p",{className:"text-sm text-secondary-dark",children:t})]}),{position:"top-right"})}function ea(t){const s=[!0,!!(t!=null&&t.site_added),!!(t!=null&&t.team_added||t!=null&&t.team_skipped),!!(t!=null&&t.setup_done)],n=s.findIndex(a=>!a);return s.map((a,i)=>a?"completed":i===n?"active":"pending")}function ta(t){if(t.length===0)return 0;const s=t.findIndex(n=>n!=="completed");return s===-1?t.length-1:s}function sa(){const{t}=L(),s=_e(),n=b(g=>g.onboardingChecklist),a=b(g=>g.setOnboardingChecklist),i=b(g=>g.onboardingUndoVisible),l=b(g=>g.setOnboardingUndoVisible),x=b(g=>g.shouldShowScheduleCallCta()),{mutateAsync:p}=it(),{mutateAsync:h}=Xt(),{data:r}=et(),u=R(g=>g.accountID()),d=`${Qt}_${u}`,m=n??null,j=(m==null?void 0:m.dismissed)===!0,N=Jt(d)==="true",f=ea(m),y=ta(f),c=f.filter(g=>g==="completed").length===4,[w,M]=C.useState(y),[D,P]=C.useState(!N),[T,U]=C.useState(!1),[ne,V]=C.useState(!1);if(C.useEffect(()=>{if(!c||j)return;let g=!1;return(async()=>{try{if(await p({flag:"dismissed"}),g)return;a({...m??$,dismissed:!0}),F("Agency Onboarding Checklist Auto Dismissed",{})}catch(v){console.error("Failed to auto-dismiss onboarding checklist:",v.message)}})(),()=>{g=!0}},[c,j]),n===void 0)return null;if(j&&i)return e.jsxs("div",{className:"fixed bottom-32 right-8 z-50 flex items-center gap-1","data-testid":"onboarding-undo-notification",children:[e.jsx("span",{className:"text-md text-secondary-dark",children:t("agencyDashboard.onboardingChecklist.dismiss.undoMessage")}),e.jsx("button",{className:"cursor-pointer text-md font-medium text-primary",onClick:re,"data-testid":"btn-onboarding-undo",children:t("agencyDashboard.onboardingChecklist.dismiss.undo")})]});if(j&&!i)return null;if(N&&!D)return e.jsx(qs,{currentStep:y+1,totalSteps:4,onReopen:()=>{qt(d),P(!0)},onDismiss:ie});async function ie(){try{await p({flag:"dismissed"}),a({...m??$,dismissed:!0}),l(!0),F("Agency Onboarding Checklist Dismissed",{})}catch(g){console.error("Failed to dismiss onboarding checklist:",g.message)}}async function re(){try{await h(),a({...m??{...$,dismissed:!0},dismissed:!1}),l(!1)}catch(g){console.error("Failed to enable onboarding checklist:",g.message)}}const le=()=>{ss(d,"true"),P(!1),F("Agency Onboarding Checklist Closed",{})},ce=()=>{F("Agency Onboarding Step CTA Clicked",{step:2}),s({to:"/agency/add-site"})},O=()=>{F("Agency Onboarding Step CTA Clicked",{step:3}),U(!0)},K=async()=>{F("Agency Onboarding No Team Yet Clicked",{});try{await p({flag:"team_skipped"}),a({...m??$,team_skipped:!0})}catch(g){console.error("Failed to set team_skipped flag:",g.message)}},Z=()=>{a({...m??$,team_added:!0}),setTimeout(()=>{Qs(t("agencyDashboard.onboardingChecklist.toasts.inviteSent"))},150)},oe=()=>{if(F("Agency Onboarding Step CTA Clicked",{step:4}),!r||r.length===0)return;const v=[...r].sort((E,xe)=>{const pe=new Date(E.created_at??0).getTime(),me=new Date(xe.created_at??0).getTime();return pe-me})[0];if(v.website_status==="paymentPending"){Me.error(t("agency.setupBlockedPaymentPending"));return}s({to:"/setup",search:{websiteId:v.id}})},De=g=>{M(v=>v===g?null:g)},de=g=>{const v=f[g];return v==="completed"?"bg-success":v==="active"?"bg-primary":"bg-gray-light"},ge=g=>
24g===2?{onPrimaryCtaClick:ce}:g===3?{onPrimaryCtaClick:O,onSecondaryCtaClick:K}:g===4?{onPrimaryCtaClick:oe}:{};return e.jsxs(e.Fragment,{children:[D&&!T&&e.jsxs("div",{className:"fixed bottom-6 right-28 z-50 w-[420px] rounded-xl bg-white border border-gray-light shadow-lg flex flex-col overflow-hidden","data-testid":"agency-onboarding-checklist-panel",children:[e.jsxs("div",{className:"px-6 py-4 relative",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("h3",{className:"text-xl font-bold text-primary pr-6",children:t("agencyDashboard.onboardingChecklist.title")}),e.jsx("button",{type:"button",className:"absolute top-4 right-4 cursor-pointer text-secondary hover:text-dark transition-colors",onClick:le,"data-testid":"btn-checklist-close","aria-label":"Close checklist",children:e.jsx(W,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-3",children:[e.jsx("div",{className:`flex items-center gap-[5px] h-2 shrink-0 ${c?"":"w-[72px]"}`,children:f.map((g,v)=>{const E=f[v]==="active";return e.jsx("div",{className:`h-2 rounded-full ${E?"flex-1 min-w-px":"w-2 shrink-0"} ${de(v)}`,"data-testid":`progress-dot-${v+1}`},v)})}),e.jsx("span",{className:"text-xs text-secondary","data-testid":"progress-label",children:c?t("agencyDashboard.onboardingChecklist.allDone"):t("agencyDashboard.onboardingChecklist.stepLabel",{current:y+1,total:4})})]})]}),e.jsx("div",{className:"divide-y divide-gray-light",children:es.map((g,v)=>{const E=ge(g.stepNumber);return e.jsx(Js,{stepNumber:g.stepNumber,title:f[v]==="completed"&&g.completedTitleKey?t(g.completedTitleKey):t(g.titleKey),description:t(g.descriptionKey),status:f[v],isExpanded:w===v,onToggle:()=>De(v),tipText:g.tipKey?t(g.tipKey):void 0,primaryCtaLabel:g.primaryCtaKey?t(g.primaryCtaKey):void 0,secondaryCtaLabel:g.secondaryCtaKey?t(g.secondaryCtaKey):void 0,...E},g.stepNumber)})}),x&&e.jsxs("div",{className:"bg-primary-lightest px-6 py-4 flex items-center justify-between gap-4","data-testid":"onboarding-help-banner",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[e.jsx(xt,{width:16,height:16,svgColor:"#1578f7"}),e.jsx("p",{className:"text-sm font-bold text-primary",children:t("agencyDashboard.onboardingChecklist.helpBanner.title")})]}),e.jsx("p",{className:"text-xs text-secondary-dark",children:t("agencyDashboard.onboardingChecklist.helpBanner.body")})]}),e.jsxs(A,{variant:"primary",size:"sm",className:"flex-shrink-0 flex items-center gap-1 px-2 py-[6px] text-sm font-medium",onClick:()=>V(!0),children:[t("agencyDashboard.onboardingChecklist.helpBanner.cta"),e.jsx(ts,{className:"w-4 h-4"})]})]})]}),e.jsx(Pe,{isOpen:ne,onOpenChange:V}),e.jsx(rt,{open:T,onOpenChange:g=>U(g),children:e.jsx(js,{open:T,onClose:()=>U(!1),action:"add",onSuccess:Z})})]})}const va=as("/agency/dashboard")({component:na});function aa(){const t=b(n=>n.license),s=b(n=>n.isAgencyLicenseSuspended());return!!(t&&!s)}function na(){var Oe,Ee,Be;const{t}=L(),s=_e(),[n,a]=C.useState(!1),[i,l]=C.useState(!1),[x,p]=C.useState(!1),[h,r]=C.useState(null),[u,d]=C.useState(!1),m=R(o=>o.accountID()),j=ns({strict:!1}),[N,f]=C.useState(()=>String((j==null?void 0:j.book_call)??"")==="1"),y=b(o=>o.isAgencyAddSiteDisabled()),S=b(o=>o.isAgencyLicenseOnDue()),c=b(o=>o.isActiveSiteSlotsFilled()),{mutateAsync:w}=is({mutationFn:o=>rs.getPlanBySlug(o)}),{mutateAsync:M}=ls(),[D,P]=C.useState(!1),[T,U]=C.useState(!1),[ne,V]=C.useState(!1),ie=async()=>{k?await re():l(!0)},re=async()=>{if(!(!(k!=null&&k.planSlug)||!(k!=null&&k.slots)||!m)){d(!0);try{const o={planSlug:k==null?void 0:k.planSlug},B={plan_id:(await w(o)).id,site_count:k==null?void 0:k.slots,account_id:m},Fe=await M(B);Fe.status&&window.location.assign(Fe.url)}catch(o){console.error("Error during checkout:",o)}finally{d(!1)}}},le=()=>{a(!0)},ce=o=>{const _={...o,siteCount:o.site_count??"",discount:o.totalPrice-o.netPrice||0,recurringAmount:o.netPrice||0,proRataAmount:o.prorationAmount||0,couponDiscount:o.couponDiscount||0,licenseId:(O==null?void 0:O.id)||""};r(_)},{license:O,hasMadeTransaction:K,details:Z,shouldShowScheduleCallCta:oe}=b(),de=cs.includes((Z==null?void 0:Z.ref)??"")&&!K,ge=b(o=>o.pricingModel),g=b(o=>{var _;return((_=o.websiteCounts)==null?void 0:_.in_trial)??0}),v=b(o=>o.getTotalSitesForProgress),E=b(o=>o.getActiveSitesCount),xe=b(o=>o.getChargedSitesCount),pe=b(o=>{var _,B;return((B=(_=o.websiteCounts)==null?void 0:_.by_status)==null?void 0:B.scheduled_cancellation)??0}),me=b(o=>{var _,B;return((B=(_=o.websiteCounts)==null?void 0:_.by_status)==null?void 0:B.draft)??0}),pt=b(o=>o.suspendedWebsitesCount??0),{registeredUserName:He}=H(),he=b(o=>o.onboardingChecklist),mt=(he==null?void 0:he.dismissed)===!0,ue=O?O.slots:0,Te=E(),ht=v(),k=R(o=>o.customAgency()),ut=b(o=>o.isAgencyLicenseSuspended()),ft=R(o=>o.isAgencyGdprAnnualAddonAvailed()),fe=aa(),I=ge==="v2",{data:ye,isLoading:yt,isError:bt}=ve({per_page:1}),{data:be,isLoading:Ct,isError:jt}=ve({banner_status:"active",per_page:1}),{data:Ce,isLoading:wt,isError:Nt}=ve({banner_status:"inactive",per_page:1}),G={total:((Oe=ye==null?void 0:ye.pages[0])==null?void 0:Oe.total)??0,active:((Ee=be==null?void 0:be.pages[0])==null?void 0:Ee.total)??0,inactive:((Be=Ce==null?void 0:Ce.pages[0])==null?void 0:Be.total)??0},Ie=!(yt||Ct||wt)&&!(bt||jt||Nt),[je,vt]=C.useState("total"),St=o=>{vt(o)},we=Ie&&je!=="total"?je:void 0,Lt=we?G[we]:void 0;return C.useEffect(()=>{const o=j.open;decodeURIComponent(o??"").toLowerCase()==="purchase-license"&&!I&&l(!0)},[]),e.jsx(ds,{permissionKey:"user::agency-dashboard:index",requireVerified:!0,children:e.jsxs("div",{className:"agency bg-secondary-lightest min-h-screen",children:[!I&&e.jsx(Ts,{onClaimDeal:()=>{U(!0),l(!0)},hasMadeTransaction:K}),Z!==null&&(de?e.jsx(Os,{onClaimDeal:()=>{V(!0),l(!0)}}):e.jsx(Is,{onClaimDeal:()=>{P(!0),l(!0)},hasMadeTransaction:K,isAddonAvailed:ft})),e.jsxs("div",{className:"px-8 py-6",children:[I?e.jsxs("div",{className:"flex items-center justify-between mb-6 flex-wrap gap-3",children:[e.jsxs("div",{className:"flex items-center gap-6 flex-wrap",children:[e.jsx("h6",{className:"text-3xl font-semibold",children:t("agency.dashboard.title",{registeredUserName:He()})}),e.jsx(os,{context:"dashboard",activeSites:xe(),sitesInTrial:g})]}),e.jsxs(A,{variant:"primary",disabled:y,onClick:()=>s({to:"/agency/add-site"}),"data-testid":"agency-new-site-btn",children:[e.jsx(lt,{className:"w-5 h-5 mr-1"}),t("agency.newPricing.header.newSite")]})]}):e.jsx("h6",{className:"text-3xl mb-6 font-semibold",children:t("agency.dashboard.title",{registeredUserName:He()})}),I&&e.jsxs(e.Fragment,{children:[e.jsx(fs,{}),e.jsx(ys,{})]}),e.jsx(Fs,{}),I?ht===0&&pe===0&&pt===0&&me===0?e.jsxs("div",{className:"flex flex-col gap-6 mb-6",children:[e.jsx(Rs,{}),e.jsx(Us,{})]}):e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(Ys,{}),Ie&&e.jsx(ms,{total:G.total,active:G.active,inactive:G.inactive,selected:je,onSelect:St}),e.jsx(We,{isNewPricing:!0,bannerStatusFilter:we,filteredSitesCount:Lt})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[e.jsx(ke,{title:"Site license",icon:e.jsx(Ls,{}),value:ue,buttonVariant:"upgrade",description:"Purchase a multi-site license to easily manage cookie consent across multiple client websites.",buttonText:t(fe?"agency.dashboard.upgradeLicense":"agency.dashboard.purchaseLicense"),onButtonClick:ie,showButton:!(k&&fe),isLoading:u,isButtonDisabled:S}),e.jsx(ke,{title:"Site license",icon:e.jsx(ks,{}),value:Te,total:ue,showTotal:!0,description:"Add your clients websites to start managing them.",buttonText:"Add site",onButtonClick:le,isButtonDisabled:y,isUpgrade:fe,isAgencyLicenseOnDue:S,isAgencyLicenseSuspended:ut,isActiveSiteSlotsFilled:c,totalSites:ue,activeSites:Te})]}),e.jsx(We,{})]}),!I&&e.jsx(tt,{isOpen:n,onOpenChange:a}),e.jsx(hs,{isOpen:i,onOpenChange:o=>{l(o),o||(P(!1),U(!1),V(!1))},onConfirmPayment:o=>{ce(o),p(!0)},gdprAnnualMode:D,blackFridayMode:T,wceuMode:ne}),e.jsx(us,{isOpen:x,onOpenChange:p,paymentData:h,onConfirm:()=>{p(!1)}}),e.jsx(Pe,{isOpen:N,onOpenChange:f}),oe()&&(!I||mt)&&e.jsx(Bs,{}),I&&e.jsx(sa,{})]})]})})}export{na as AgencyDashboard,va as Route};

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.