1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8920],{8547:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r(37967),a=r(24305);let n=function(){let{enabled:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.A)({enabled:e,apiPath:"/advisor/watchlist",queryKey:a.VZ})}},19603:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(11037).A)("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]])},26804:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(11037).A)("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},27284:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(11037).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},30913:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r(14232),a=r(62896),n=r(37876);function i(e){let{companyName:t,size:r=32,className:i}=e,l=String(t||"").trim(),{0:o,1:c}
1=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1,t=null;if(c(null),l&&"function"==typeof fetch)return fetch(`/api/company-logo?name=${encodeURIComponent(l)}`,{credentials:"same-origin",cache:"force-cache"}).then(async r=>{if(e||!r.ok||204===r.status||!(r.headers.get("content-type")||"").startsWith("image/"))return;let s=await r.blob();if(s.size&&!e&&"function"==typeof URL.createObjectURL){if(t=URL.createObjectURL(s),e){URL.revokeObjectURL(t),t=null;return}c(t)}}).catch(()=>{}),()=>{e=!0,t&&URL.revokeObjectURL(t)}},[l]);let d=`${r}px`;return(0,n.jsxs)("span",{"data-testid":"company-logo","data-company":l,"aria-hidden":"true",className:(0,a.cn)("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-lg","border border-[color:var(--ee-nested-border,#f0f0f3)] bg-[color:var(--ee-nested-bg,#f8f9fa)]","text-[11px] font-semibold text-[var(--text-secondary)] select-none",i),style:{width:d,height:d},children:[(0,n.jsx)("span",{"data-testid":"company-logo-monogram",children:function(e){let t=String(e||"").trim().split(/\s+/).filter(Boolean);return 0===t.length?"?":1===t.length?t[0].slice(0,2).toUpperCase():`${t[0][0]||""}${t[1][0]||""}`.toUpperCase()}(l)}),o?(0,n.jsx)("img",{"data-testid":"company-logo-image",alt:"",src:o,width:r,height:r,decoding:"async",referrerPolicy:"no-referrer",onError:()=>c(null),className:"absolute inset-0 h-full w-full object-contain"}):null]})}},32795:(e,t,r)=>{"use strict";r.d(t,{A:()=>i}),r(14232);var s=r(37876);function a(e){return Math.max(0,Math.min(1,Number(e)||0))}function n(e,t){return`M ${e} ${t+1.35} C ${e} ${t+1.35} ${e-2.55} ${t-.55} ${e-2.55} ${t-1.55} C ${e-2.55} ${t-2.55} ${e-1.55} ${t-3.05} ${e} ${t-2.15} C ${e+1.55} ${t-3.05} ${e+2.55} ${t-2.55} ${e+2.55} ${t-1.55} C ${e+2.55} ${t-.55} ${e} ${t+1.35} ${e} ${t+1.35} Z`}function i(e){let{className:t="h-4 w-4",fill:r=.12,bottomFill:i}=e,l=a(r),o=a(null==i?.82*l:i),c=18.5*l,d=18.5*o;return(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":!0,"data-testid":"algorithm-sliders-icon","data-fill":l.toFixed(3),children:[(0,s.jsx)("rect",{x:2.75,y:7.15,width:18.5,height:1.7,rx:.85,fill:"currentColor",opacity:.22}),(0,s.jsx)("rect",{x:2.75,y:15.15,width:18.5,height:1.7,rx:.85,fill:"currentColor",opacity:.22}),(0,s.jsx)("rect",{x:2.75,y:7.15,height:1.7,rx:.85,fill:"var(--brand-primary, #6DD233)",opacity:.8,className:"origin-left transition-[width] duration-500 ease-out motion-reduce:transition-none",style:{width:c}}),(0,s.jsx)("rect",{x:2.75,y:15.15,height:1.7,rx:.85,fill:"var(--brand-primary, #6DD233)",opacity:.65,className:"origin-left transition-[width] duration-500 ease-out motion-reduce:transition-none",style:{width:d}}),(0,s.jsx)("path",{d:n(2.75+c,8),fill:"currentColor"}),(0,s.jsx)("path",{d:n(2.75+d,16),fill:"currentColor"})]})}},33615:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(11037).A)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},37967:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var s=r(66284),a=r(59860),n=r(16187),i=r(85551),l=r(41541),o=r(13240),c=r(86788),d=r(39117),u=r(24305);let h=["companyName","notes"],m=["id","companyName","notes"];function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){(0,s.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let b=function(){let{enabled:e=!0,apiPath:t="/advisor/watchlist",queryKey:r=["advisorWatchlist"]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=(0,n.jE)(),p=`[useWatchlist:${t}]`,b=(0,i.I)({queryKey:r,queryFn:async()=>{let e=(await o.default.get(t)).data;return{entries:(0,u.Rx)(e),limit:(0,u.Gb)(e)}},enabled:!!e,refetchOnWindowFocus:!0,staleTime:3e4,retry:1,meta:{suppressGlobalError:!0}});b.error&&(0,c.O)(d.s6.WARN,`${p} Failed to fetch watchlist: ${b.error.message}`);let x=()=>s.invalidateQueries({queryKey:r}),f=(0,l.n)({mutationFn:async e=>{let{companyName:r,notes:s}=e,n=(0,a.A)(e,h),i=(0,u.n1)(g({companyName:r,notes:s},n));return(await o.default.post(t,i)).data},onSuccess:()=>{(0,c.O)(d.s6.INFO,`${p} Company added`),x()},onError:e=>{let t=e.response?.data?.message||e.response?.data?.error||e.message||"Request failed";(0,c.O)(d.s6.ERROR,`${p} Add failed: ${t}`)}}),y=(0,l.n)({mutationFn:async e=>(await o.default.delete(`${t}/${e}`)).data,onSuccess:(e,t)=>{(0,c.O)(d.s6.INFO,`${p} Entry ${t} removed`),x()},onError:(e,t)=>
1{let r=e.response?.data?.message||e.response?.data?.error||e.message||"Request failed";(0,c.O)(d.s6.ERROR,`${p} Delete failed for ${t}: ${r}`)}}),v=(0,l.n)({mutationFn:async e=>{let{id:r,companyName:s,notes:n}=e,i=(0,a.A)(e,m),l=(0,u.n1)(g({companyName:s,notes:n},i));return(await o.default.put(`${t}/${r}`,l)).data},onSuccess:()=>{(0,c.O)(d.s6.INFO,`${p} Entry updated`),x()},onError:e=>{let t=e.response?.data?.message||e.response?.data?.error||e.message||"Request failed";(0,c.O)(d.s6.ERROR,`${p} Update failed: ${t}`)}}),j=Array.isArray(b.data?.entries)?b.data.entries:[],w=b.data?.limit??u.qj,N=j.length>=w;return{entries:j,isLoading:b.isLoading,error:b.error??null,refetch:b.refetch,atCapacity:N,maxEntries:w,addCompany:f.mutateAsync,isAdding:f.isPending,addError:f.error??null,updateCompany:v.mutateAsync,isUpdating:v.isPending,updateError:v.error??null,removeCompany:y.mutateAsync,isRemoving:y.isPending,removeError:y.error??null,pendingEntryId:y.isPending?y.variables:v.isPending?v.variables?.id:null}}},41541:(e,t,r)=>{"use strict";r.d(t,{n:()=>m});var s=r(66284),a=r(14232),n=r(21407),i=r(60388),l=r(90089),o=r(37149),c=class extends l.Q{#e;#t=void 0;#r;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.EN)(t.mutationKey)!==(0,o.EN)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#n(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#n()}mutate(e,t){return this.#s=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#a(){let e=this.#r?.state??(0,n.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#n(e){i.jG.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,r,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,r,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,r,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,r,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=r(16187);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){(0,s.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function m(e,t){let r=(0,d.jE)(t),[s]=a.useState(()=>new c(r,e));a.useEffect(()=>{s.setOptions(e)},[s,e]);let n=a.useSyncExternalStore(a.useCallback(e=>s.subscribe(i.jG.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),l=a.useCallback((e,t)=>{s.mutate(e,t).catch(o.lQ)},[s]);if(n.error&&(0,o.GU)(s.options.throwOnError,[n.error]))throw n.error;return h(h({},n),{},{mutate:l,mutateAsync:n.mutate})}},42508:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(11037).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},46388:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(11037).A)("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},55221:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(11037).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},60671:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(11037).A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},66170:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>d,Cq:()=>o,c_:()=>l,ve:()=>c});var s=r(14232),a=r(51555),n=r(68124),i=r(37876);let l=10,o="inline-flex h-9 min-w-9 items-center justify-center rounded-[10px] border text-[12.5px] font-bold transition-colors disabled:cursor-not-allowed disabled:opacity-40",c="border-[var(--ee-export-btn-border,#DCDCE8)] bg-[var(--ee-export-btn-bg,#EEF1FA)] text-[var(--ee-export-btn-text,#002153)] hover:brightness-[0.97]";function d(e){let{page:t=1,totalPages:r=1,total:d=0,pageSize:u=l,onPageChange:h,disabled:m=!1,rangeTestId:p,showRange:g=!0,hideTopBorder:b=!1,rangeLead:x=""}=e,f=(0,s.useMemo)(()=>(function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;if(t<=0)return[];if(t<=r)return Array.from({length:t},(e,t)=>t+1);let s=Math.max(1,e-Math.floor(r/2)),a=Math.min(t,s+r-1),n=[];(s=Math.max(1,a-r+1))>1&&(n.push(1),s>2&&n.push("â¦"));for(let e=s;e<=a;e+=1)n.push(e);return a<t&&(a<t-1&&n.push("â¦"),n.push(t)),n})(t,r),[t,r]);if(d<=0)return null;let y=(t-1)*u+1,v=Math.min(t*u,d),j=r>1,w=e=>{!m&&h&&(e<1||e>r||e===t||h(e))};return(0,i.jsxs)("div",{className:`mt-2 flex flex-col gap-3 pt-3 sm:flex-row sm:items-center sm:justify-between ${b?"":"border-t border-[var(--ee-divider,#DCDCE8)]"}`,"data-tour":"ee-saved-briefs-pagination",children:[g?(0,i.jsxs)("span",{className:"text-[12.5px] text-[var(--ee-text-muted,#555555)]","data-testid":p,children:[x,y,"â",v," of ",d]}):(0,i.jsx)("span",{}),j?(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,i.jsxs)("button",{type:"button",onClick:()=>w(t-1),disabled:m||t<=1,className:`${o} ${c} gap-0.5 px-2.5`,"aria-label":"Previous page",children:[(0,i.jsx)(a.A,{className:"h-4 w-4",strokeWidth:2}),(0,i.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),f.map((e,r)=>"â¦"===e?(0,i.jsx)("span",{className:"px-1 text-[12.5px] text-[var(--ee-text-muted,#555555)]","aria-hidden":!0,
1children:"â¦"},`ellipsis-${r}`):(0,i.jsx)("button",{type:"button",onClick:()=>w(e),disabled:m,className:`${o} ${e===t?"border-[var(--ee-green,#4ccf00)] bg-[var(--ee-green,#4ccf00)] text-white":c}`,"aria-label":`Page ${e}`,"aria-current":e===t?"page":void 0,children:e},e)),(0,i.jsxs)("button",{type:"button",onClick:()=>w(t+1),disabled:m||t>=r,className:`${o} ${c} gap-0.5 px-2.5`,"aria-label":"Next page",children:[(0,i.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,i.jsx)(n.A,{className:"h-4 w-4",strokeWidth:2})]})]}):null]})}},69493:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/shared/matchmaking/signals",function(){return r(78196)}])},78196:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ei});var s=r(14232),a=r(89099),n=r(77203),i=r(26804),l=r(21379),o=r(52896),c=r(66284),d=r(39117),u=r(95499);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function m(){let e=u.S.getLocal(d.d5.ADVISOR_ID);return e&&"undefined"!==e?`advisor:${e}`:null}function p(){let e=u.S.getLocal(d.d5.SIGNALS_INSTRUCTIONAL_BANNER_DISMISSED);return e&&"object"==typeof e&&!Array.isArray(e)?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach(function(t){(0,c.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e):{}}var g=r(37876);let b=()=>{let{resolvedTheme:e}=(0,l.D)(),t="dark"===e,{0:r,1:a}=(0,s.useState)(()=>(function(){let e=m(),t=p();return!!e&&!0===t[e]||!e&&!0===t["*"]})());return r?null:(0,g.jsxs)("div",{"data-testid":"signals-instructional-banner",role:"region","aria-label":"How to start using Signals",className:`relative shrink-0 rounded-xl px-4 py-4 pr-11 sm:px-5 ${t?"border-habitsgreen/25 bg-habitsgreen/10 border":"border border-[rgba(109,210,51,0.18)] bg-[rgba(109,210,51,0.08)]"}`,children:[(0,g.jsx)("button",{type:"button",onClick:()=>{!function(){let e=m()||"*",t=p();t[e]=!0,u.S.setLocal(d.d5.SIGNALS_INSTRUCTIONAL_BANNER_DISMISSED,t)}(),a(!0)},"aria-label":"Dismiss Signals instructions","data-testid":"signals-instructional-banner-dismiss",className:`absolute top-3 right-3 flex h-8 w-8 items-center justify-center rounded-full transition-colors ${t?"text-[var(--text-secondary)] hover:bg-white/10 hover:text-white":"text-[#6b7280] hover:bg-black/5 hover:text-[#111827]"}`,children:(0,g.jsx)(o.A,{className:"h-4 w-4",strokeWidth:2})}),(0,g.jsxs)("div",{className:"flex items-start gap-3",children:[(0,g.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full ${t?"bg-habitsgreen/15":"bg-[rgba(109,210,51,0.16)]"}`,children:(0,g.jsx)(n.A,{className:"text-habitsgreen h-4 w-4","aria-hidden":!0})}),(0,g.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,g.jsx)("h3",{className:"pr-2 text-sm font-semibold text-[var(--text-primary)] sm:text-[15px]",children:"Two ways to start tracking an audience or company"}),(0,g.jsxs)("ul",{className:"mt-2 space-y-1.5 text-sm leading-5 text-[var(--text-secondary)] sm:leading-6",children:[(0,g.jsxs)("li",{className:"flex gap-2",children:[(0,g.jsx)("span",{className:"bg-habitsgreen mt-2 h-1.5 w-1.5 shrink-0 rounded-full","aria-hidden":!0}),(0,g.jsx)("span",{children:"Search in the Engagement Engine. Every audience or company brief you build automatically starts matching Signals for it."})]}),(0,g.jsxs)("li",{className:"flex gap-2",children:[(0,g.jsx)("span",{className:"bg-habitsgreen mt-2 h-1.5 w-1.5 shrink-0 rounded-full","aria-hidden":!0}),(0,g.jsxs)("span",{children:["Or add it to your"," ",(0,g.jsx)("a",{href:d.y_,className:"text-habitsgreen font-medium underline underline-offset-2 hover:opacity-80",children:"Watchlist"}),". Track a company you haven't researched yet and get an email the moment something happens."]})]})]}),(0,g.jsxs)("p",{className:"mt-3 text-sm text-[var(--text-secondary)]",children:["Need help? Check out our"," ",(0,g.jsx)("a",{href:"https://www.usehabits.com/guides/signals-101",target:"_blank",rel:"noopener noreferrer",className:"text-habitsgreen font-medium underline underline-offset-2 hover:opacity-80",children:"Signals 101 guide"})]})]})]})]})};var x=r(29149),f=r(6120),y=r(30913),v=r(11037);
1let j=(0,v.A)("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var w=r(55221),N=r(42508),k=r(60671),$=r(46388),O=r(27284);let A=(0,v.A)("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);var S=r(33615),M=r(19603);let C=(0,v.A)("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach(function(t){(0,c.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let P=/\s*·\s*possible\s*$/i,D={habits_prospect:100,watchlist:90,segment:80,audience:75,prior_search:70,location:60,suggested:50,contacts:40,employer:30,unknown:10};function F(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!!t.possible,s=r?" Possible match â confirm if this employer is correct.":"",a={habits_prospect:{label:"Habits prospect",tooltip:"Matched to a prospect you connected with through Habits",emphasize:!0},watchlist:{label:"Watchlist",tooltip:"On your watchlist"},prior_search:{label:"Prior search",tooltip:"Matched from a company you searched before"},suggested:{label:"Suggested",tooltip:"Suggested from employer enrichment"},location:{label:"Location",tooltip:"Matched to a location you follow"},segment:{label:function(e){let t=String(e||"").trim();return t?t.length<=18?t:`${t.slice(0,17).trimEnd()}â¦`:"Segment"}(t.segmentName),tooltip:t.segmentName?`Segment: ${t.segmentName}`:"Matched on a saved segment"},audience:{label:"Audience",tooltip:t.audienceName?`From a prior audience search: ${t.audienceName}`:"From a prior audience search"},contacts:{label:"Contacts",tooltip:"Matched someone in your contacts"},employer:{label:"Employer",tooltip:"Matched on employer"},unknown:{label:"Match",tooltip:"Matched for this signal"}},n=a[e]||a.unknown;return R({type:e,label:n.label,tooltip:`${n.tooltip}.${s}`.replace(/\.\./g,"."),possible:r,priority:D[e]??D.unknown},n.emphasize?{emphasize:!0}:{})}let _={habits_prospect:j,watchlist:w.A,prior_search:N.A,suggested:k.A,location:$.A,segment:O.A,audience:A,contacts:S.A,employer:M.A,unknown:C};function I(e){let{badges:t=[],isDark:r=!1}=e,{visible:s,overflow:a,overflowTooltip:n}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(e||[]).map(e=>R(R({},function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=String(e||"").trim(),s=P.test(r),a=r.replace(P,"").trim(),n=a.toLowerCase(),i=function(e){switch(String(e||"").trim()){case"habits_match":return"habits_prospect";case"watchlist":case"watchlist_industry":return"watchlist";case"search_history":return"prior_search";case"saved_segment":return"segment";case"segment":return"audience";case"enrichment":return"suggested";case"device":return"contacts";default:return null}}(t.employerSource);if("segment"===i){let e=a.match(/^matched on segment:\s*(.+)$/i);return F("segment",{segmentName:e?.[1]?.trim(),possible:s})}if("audience"===i){let e=a.match(/^matched on prior audience search:\s*(.+)$/i);return F("audience",{audienceName:e?.[1]?.trim(),possible:s})}if(i)return F(i,{possible:s});if(n.includes("prospect")&&n.includes("habits"))return F("habits_prospect",{possible:s});if(n.startsWith("matched on your watchlist"))return F("watchlist",{possible:s});if(n.startsWith("matched on prior company search"))return F("prior_search",{possible:s});if(n.startsWith("matched on suggested employer"))return F("suggested",{possible:s});if(n.startsWith("matched on location you follow")||n.startsWith("matched on location:"))return F("location",{possible:s});if(n.startsWith("matched on segment")){let e=a.match(/^matched on segment:\s*(.+)$/i);return F("segment",{segmentName:e?.[1]?.trim(),possible:s})}if(n.startsWith("matched on prior audience search")){let e=a.match(/^matched on prior audience search:\s*(.+)$/i);return F("audience",{audienceName:e?.[1]?.trim(),possible:s})}if(n.startsWith("matched on someone in your contacts"))return F("contacts",{possible:s});if(n.startsWith("matched on your employer")||n.startsWith("matched on employer"))return F("employer",{possible:s});if(n.startsWith("possible match on contact name"))return F("contacts",{possible:!0});let l=a.replace(/^matched on\s+/i,"").trim();if(l){let e=l.length>18?`${l.slice(0,17).trimEnd()}â¦`:l;return{type:"unknown",label:e.charAt(0).toUpperCase()+e.slice(1),tooltip:r||l,possible:s,priority:D.unknown}}return F("unknown",{possible:s})}(e.label,{employerSource:e.employerSource})),{},{id:e.id})),r=new Set,s=[];for(let e of t){let t=`${e.type}:${e.label}:${+!!e.possible}`;r.has(t)||(r.add(t),s.push(e))}s.sort((e,t)=>
1t.priority-e.priority);let a=s.slice(0,2),n=s.slice(2),i=n.map(e=>e.tooltip.replace(/\.$/,"")).join("; ");return{visible:a,overflow:n,overflowTooltip:i}}(t);if(0===s.length)return null;let i=r?"border-slate-400/35 bg-slate-400/10 text-slate-100":"border-slate-300 bg-slate-100 text-slate-700",l=r?"border-dashed border-slate-400/50 bg-slate-400/[0.06] text-slate-300":"border-dashed border-slate-300 bg-slate-50 text-slate-600",o=r?"border-[var(--brand-primary)]/35 bg-slate-400/10 text-slate-100":"border-[var(--brand-primary)]/50 bg-[var(--brand-primary)]/10 text-slate-800",c=r?"h-3 w-3 shrink-0 text-slate-400":"h-3 w-3 shrink-0 text-slate-500",d=r?"ml-0.5 font-normal text-slate-400":"ml-0.5 font-normal text-slate-500";return(0,g.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1","data-testid":"signal-match-badges",children:[s.map(e=>{let t=_[e.type]||C,r=e.possible?`${e.tooltip} (possible match)`:e.tooltip,s=e.possible?l:e.emphasize?o:i;return(0,g.jsxs)("span",{title:e.tooltip,"aria-label":r,"data-match-type":e.type,"data-possible":e.possible?"true":"false",className:`inline-flex max-w-[9.5rem] items-center gap-1 rounded-md border px-2 py-0.5 text-[11px] font-medium leading-tight tracking-wide ${s}`,children:[(0,g.jsx)(t,{className:c,"aria-hidden":!0}),(0,g.jsxs)("span",{className:"truncate",children:[e.label,e.possible?(0,g.jsx)("span",{className:d,children:"\xb7 Possible"}):null]})]},e.id)}),a.length>0?(0,g.jsxs)("span",{title:n,"aria-label":`And ${a.length} more: ${n}`,className:`inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium ${r?"border-slate-400/35 bg-slate-400/10 text-slate-200":"border-slate-300 bg-slate-100 text-slate-600"}`,children:["+",a.length]}):null]})}var L=r(64358);let U=e=>{let{signal:t,isRead:r=!1,usefulVote:s=null,usefulComment:a=null,onDismiss:n,onNotRelevant:i,onViewBrief:o,onOpenConsumer:c,onMarkRead:d,onUsefulVote:u}=e,{resolvedTheme:h}=(0,l.D)(),m="dark"===h,p=(0,f.QM)(t.contacts),b="company"===(t.type||"company")&&!!t.event?.entity,v=(t.contacts||[]).filter(e=>String(e?.name||"").trim().toLowerCase().startsWith("matched on")),j=new Set(v.map(e=>e.id)),w=(t.contacts||[]).filter(e=>!j.has(e.id)),N=w.slice(0,3),k=Math.max(0,w.length-N.length),$=v.length>0?v.map(e=>({id:e.id,label:e.name,employerSource:e.employerSource})):p?.matchBasis?[{id:`basis-${p.id||"match"}`,label:p.matchBasis,employerSource:p.employerSource}]:[];return(0,g.jsxs)("article",{"data-testid":"signal-card",className:`rounded-xl border p-4 transition-colors ${m?"border-[#1c2c40] bg-[#091b34]":"border-[#F0F0F3] bg-white"} ${r?"opacity-80":""}`,children:[(0,g.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,g.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-3","data-testid":"signal-card-title-row",children:[b?(0,g.jsx)(y.A,{companyName:t.event.entity,size:32}):null,(0,g.jsx)("div",{className:"min-w-0 flex-1",children:(0,g.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[r?null:(0,g.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full bg-[var(--brand-primary)]","aria-label":"Unread"}),(0,g.jsx)("h3",{className:"text-sm font-semibold text-[var(--text-primary)] sm:text-base",children:t.statement})]})})]}),$.length>0?(0,g.jsx)(I,{badges:$,isDark:m}):null]}),(0,g.jsxs)("p",{className:`mt-1 text-xs ${m?"text-[#9ca3af]":"text-[#2A2A2A]"}`,"data-testid":"signal-card-meta",children:[t.event?.entity?`${t.event.entity} \xb7 `:"",function(e){try{return(0,x.m)(new Date(e),{addSuffix:!0})}catch{return""}}(t.occurredAt)]}),t.event?.articleTitle?(0,g.jsx)("p",{className:`mt-1 line-clamp-2 text-xs ${m?"text-[#9ca3af]":"text-[#2A2A2A]"}`,"data-testid":"signal-article-title",title:t.event.articleTitle,children:t.event.articleTitle}):null,N.length>0?(0,g.jsxs)("ul",{className:"mt-3 flex flex-wrap gap-2",children:[N.map(e=>(0,g.jsx)("li",{children:(0,g.jsxs)("button",{type:"button",onClick:()=>{d?.(t),c?.(e)},className:"hover:bg-sidebar-hover inline-flex items-center gap-2 rounded-full border border-[var(--content-block-border)] px-2.5 py-1 text-xs text-[var(--text-primary)]",children:[(0,g.jsx)("span",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-[var(--brand-primary)]/20 text-[10px] font-semibold",children:function(e){let t=String(e||"").trim().split(/\s+/).filter(
1Boolean);return t.length?1===t.length?t[0].slice(0,2).toUpperCase():`${t[0][0]||""}${t[1][0]||""}`.toUpperCase():"?"}(e.name)}),e.name]})},e.id)),k>0?(0,g.jsxs)("li",{className:`self-center text-xs ${m?"text-[#9ca3af]":"text-[#2A2A2A]"}`,children:["+",k," more"]}):null]}):0===$.length?(0,g.jsx)("p",{className:`mt-2 text-xs ${m?"text-[#9ca3af]":"text-[#2A2A2A]"}`,children:"Company signal â no matched connections yet"}):null,(0,g.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[t.existingBriefId||o?(0,g.jsx)("button",{type:"button",className:"rounded-lg bg-[var(--brand-primary)] px-3 py-1.5 text-xs font-medium text-white hover:opacity-90",onClick:()=>{d?.(t),o?.(t)},children:t.existingBriefId?"View brief":"Research"}):null,(0,g.jsx)("button",{type:"button",className:`hover:bg-sidebar-hover rounded-lg border px-3 py-1.5 text-xs text-[var(--text-secondary)] ${m?"border-[#263444] bg-[#0D1F33]":"border-[#DCDCE8] bg-[#F1F3FA]"}`,onClick:()=>n?.(t),children:"Dismiss"}),(0,g.jsx)("button",{type:"button",className:`hover:bg-sidebar-hover rounded-lg border px-3 py-1.5 text-xs text-[var(--text-secondary)] ${m?"border-[#263444] bg-[#0D1F33]":"border-[#DCDCE8] bg-[#F1F3FA]"}`,onClick:()=>i?.(t),children:"Not relevant"})]}),u?(0,g.jsx)("div",{className:`mt-3 border-t pt-3 ${m?"border-[#1c2c40]":"border-[#F3F3F7]"}`,children:(0,g.jsx)(L.A,{eventId:t.eventId,initialVote:s,initialComment:a,onVote:u})}):null]})};var W=r(41172);let B=e=>{let{href:t=d.y_}=e,r=(0,a.useRouter)(),{resolvedTheme:s}=(0,l.D)(),i="dark"===s;return(0,g.jsxs)("div",{"data-testid":"signals-empty",className:`flex flex-col items-center rounded-xl border px-8 py-12 text-center ${i?"border-[#1c2c40]":"border-[#F0F0F3]"}`,children:[(0,g.jsx)("div",{className:`flex h-12 w-12 items-center justify-center rounded-full ${i?"bg-gray-800":"bg-[rgba(109,210,51,0.1)]"}`,children:(0,g.jsx)(n.A,{className:"text-habitsgreen h-6 w-6"})}),(0,g.jsx)("h3",{className:"mt-4 text-base font-semibold text-[var(--text-primary)]",children:"No signals yet"}),(0,g.jsx)("p",{className:"mt-2 max-w-md text-sm text-[#9ca3af]",children:"Start searching for audiences or companies in the Engagement Engine, or add them to your watchlist, to uncover relevant signals and updates."}),(0,g.jsx)("button",{type:"button","data-testid":"signals-empty-cta",className:"mt-5 rounded-lg bg-[var(--brand-primary)] px-5 py-2.5 text-sm font-medium text-white hover:opacity-90",onClick:()=>r.push(t),children:"Start getting signals"})]})};var q=r(74899),T=r(66170),V=r(58564),z=r(10400),H=r(8547),G=r(63035),K=r(86788);
1let Q="[SignalsPanel]",Z={dismiss:"dismiss this signal",notRelevant:"mark this signal as not relevant"},X=e=>{let{embedded:t=!1}=e,r=(0,a.useRouter)(),{resolvedTheme:n}=(0,l.D)(),{0:i,1:o}=(0,s.useState)(0),{0:c,1:u}=(0,s.useState)(5),{0:h,1:m}=(0,s.useState)(!1),{0:p,1:b}=(0,s.useState)(null),x=(0,s.useRef)(null),y=(0,s.useRef)(null),{events:v,feedback:j,loading:w,error:N,refresh:k,saveFeedback:$}=(0,V.A)(),{matchables:O,loading:A,refresh:S}=(0,z.A)({enabled:!0}),{entries:M}=(0,H.A)({enabled:!0});(0,s.useEffect)(()=>{k()},[k]),(0,s.useEffect)(()=>{let e=(M||[]).map(e=>`${e.id}:${e.companyName}`).join("|");if(null===y.current){y.current=e;return}y.current!==e&&(y.current=e,k(),S())},[M,k,S]);let C=(0,s.useMemo)(()=>{let e=(0,f.Vb)(v,O);return(0,G.k9)(e,j)},[v,O,j]),E=(0,s.useMemo)(()=>(0,f.ok)(C,f.us.MATCHED),[C]),R=E.length,P=(0,s.useMemo)(()=>E.slice(i,i+c),[E,i,c]);(0,s.useEffect)(()=>{i>0&&i>=R&&o(Math.max(0,Math.floor((R-1)/c)*c))},[i,R,c]),(0,s.useEffect)(()=>{let e=e=>{x.current&&!x.current.contains(e.target)&&m(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);let D=async e=>{try{await $(e)}catch(e){(0,K.O)(d.s6.WARN,`${Q} feedback: ${e.message}`)}},F=e=>{D((0,G.g3)(j,e.eventId))},_=(e,t)=>{b({type:e,signal:t})},I=e=>{_("dismiss",e)},L=e=>{_("notRelevant",e)},X=async e=>{let{eventId:t,vote:r,comment:s}=e;await D((0,G.Py)(j,t,r,s))},J=e=>{let t=e.consumerId||String(e.id||"").replace(/^consumer_/,"");t&&r.push(`/consumer/${t}`)},Y=e=>{let t=function(e){let t=String(e?.event?.entity||"").trim(),r=String(e?.event?.location||"").trim(),s=e?.type||"company",a=Array.isArray(e?.contacts)?e.contacts:[],n=a.length>0,i=a.map(e=>{if(e?.consumerId!=null&&String(e.consumerId).trim())return String(e.consumerId).trim();let t=String(e?.id||"").trim();return t.startsWith("consumer_")?t.replace(/^consumer_/,""):""}).find(Boolean),l=new URLSearchParams;if(l.set("source","connections_signal"),e?.existingBriefId)return l.set("tab","companies"),t&&l.set("company",t),l.set("report_id",String(e.existingBriefId)),`/advisor/intelligence?${l.toString()}`;if("company"===s||"location"===s||"industry"===s){let e="location"===s&&r?r:t;if(e)return l.set("tab","companies"),l.set("company",e),l.set("autorun","1"),`/advisor/intelligence?${l.toString()}`}return i?`/consumer/${encodeURIComponent(i)}?research=1&source=connections_signal`:n?`/advisor/intelligence?${l.toString()}`:t?(l.set("tab","companies"),l.set("company",t),l.set("autorun","1"),`/advisor/intelligence?${l.toString()}`):"/advisor/intelligence"}(e);(0,K.O)(d.s6.DEBUG,`${Q} Research â ${t} (eventId=${e.eventId})`),r.push(t)};return(w||A)&&0===E.length?(0,g.jsx)(q.A,{embedded:t}):N?(0,g.jsxs)("div",{className:`rounded-xl border p-6 text-center ${"dark"===n?"border-[#1c2c40]":"border-[#F0F0F3]"}`,children:[(0,g.jsx)("p",{className:"text-sm text-[var(--text-secondary)]",children:N}),(0,g.jsx)("button",{type:"button",className:"mt-3 rounded-lg bg-[var(--brand-primary)] px-4 py-2 text-sm font-medium text-black",onClick:()=>void k(),children:"Try again"})]}):0===E.length?(0,g.jsx)(B,{}):(0,g.jsxs)("div",{"data-testid":"signals-panel",className:`flex flex-col gap-3 ${t?"":"p-4"}`,children:[P.map(e=>(0,g.jsx)(U,{signal:e,isRead:j.readEventIds.includes(e.eventId),usefulVote:j.usefulVotes?.[e.eventId]?.vote??null,usefulComment:j.usefulVotes?.[e.eventId]?.comment??null,onDismiss:I,onNotRelevant:L,onViewBrief:Y,onOpenConsumer:J,onMarkRead:F,onUsefulVote:X},e.eventId)),!t&&(0,g.jsx)("div",{className:"h-24"}),(0,g.jsx)("div",{className:t?"mt-6 pt-4":"fixed right-0 bottom-0 left-0 z-10",children:(0,g.jsxs)("div",{className:"flex flex-col py-4",children:[(0,g.jsxs)("div",{className:"flex items-center gap-3",children:[(0,g.jsx)("span",{className:"text-[12.5px] text-[var(--ee-text-muted,#555555)]",children:"Rows per page"}),(0,g.jsxs)("div",{className:"relative",ref:x,children:[(0,g.jsxs)("button",{type:"button",onClick:()=>m(!h),className:`${T.Cq} ${T.ve} min-w-[70px] gap-1 px-2.5`,children:[c,(0,g.jsx)("svg",{className:`h-4 w-4 transition-transform ${h?"rotate-180":""}`,viewBox:"0 0 20 20",fill:"none",children:(0,g.jsx)("path",{d:"M6 8L10 12L14 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),h&&(0,g.jsx)("div",{className:"absolute bottom-full left-0 z-20 mb-2 min-w-[70px] overflow-hidden rounded-[10px] border border-[var(--ee-export-btn-border,#DCDCE8)] bg-[var(--ee-export-btn-bg,#EEF1FA)] shadow-lg",children:[5,10,25].map(e=>(0,g.jsx)("button",{type:"button",onClick:()=>{u(e),o(0),m(!1)},className:`w-full px-3 py-2 text-left text-[12.5px] font-bold transition-colors ${c===e?"bg-[var(--ee-green,#4ccf00)] text-white":"text-[var(--ee-export-btn-text,#002153)] hover:brightness-[0.97]"}`,children:e},e))})]})]}),(0,g.jsx)(T.Ay,{page:Math.floor(i/c)+1,totalPages:Math.max(1,Math.ceil(R/c)),total:R,pageSize:c,onPageChange:e=>o((e-1)*c),rangeTestId:"signals-page-range"})]})}),(0,g.jsx)(W.A,{isOpen:!!p,actionLabel:Z[p?.type]||"update this signal",onCancel:()=>b(null),onConfirm:()=>{if(!p)return;let{type:e,signal:t}=p;if(b(null),"dismiss"===e)return void D((0,G.ZV)(j,t.eventId));D((0,G.tn)(j,t))}})]})};var J=r(32795);function Y(e){let{href:t=d.wg,className:r="",signalCount:n,enabled:i=!0}=e,l=(0,a.useRouter)(),o=function(){let{enabled:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{events:t,feedback:r,refresh:a}=(0,V.A)(),{matchables:n}=(0,z.A)({enabled:e}),i=(0,s.useMemo)(()=>
1{if(!e)return 0;let s=(0,f.ok)((0,f.Vb)(t,n),f.us.MATCHED);return(0,G.k9)(s,r).length},[e,t,r,n]);return(0,s.useEffect)(()=>{e&&a()},[e,a]),i}({enabled:i&&null==n}),c=null==n?o:n,{top:u,bottom:h}=(0,s.useMemo)(()=>{let e=Math.max(0,Math.min(1,Number(Math.min(.72,.12+.045*Math.max(0,Math.floor(Number(c)||0))))||0)),t=Math.max(0,Math.min(1,.82*e));return{top:e,bottom:t}},[c]);return(0,g.jsxs)("button",{type:"button","data-testid":"see-your-algorithm-badge","data-signal-count":c,"aria-label":c>0?`See your algorithm, ${c} signal${1===c?"":"s"} found`:"See your algorithm",onClick:()=>l.push(t),className:`inline-flex h-[34px] shrink-0 items-center gap-2 rounded-[12px] border border-[#E5E7EB] bg-white px-3 text-[13px] font-medium text-[#09182D] transition-opacity hover:opacity-90 dark:border-white/20 ${r}`,children:[(0,g.jsx)(J.A,{className:"h-[15px] w-[15px] shrink-0",fill:u,bottomFill:h}),"See your algorithm"]})}function ee(e){let{href:t=d.y_,className:r=""}=e,s=(0,a.useRouter)();return(0,g.jsx)("button",{type:"button","data-testid":"watchlist-config-badge","aria-label":"Add to Watchlist",onClick:()=>s.push(t),className:`inline-flex h-[34px] shrink-0 items-center gap-1.5 rounded-[10px] border border-transparent px-3 text-[13px] font-semibold transition-opacity hover:opacity-90 ${r}`,style:{background:"#4CCF00",color:"#FFFFFF"},children:"+ Add to Watchlist"})}var et=r(82303),er=r(53937),es=r(1187),ea=r(22929),en=r(17749);let ei=()=>{let e=(0,a.useRouter)(),t=u.S.getLocal(d.d5.ADVISOR_ID),r=t&&"undefined"!==t,{hasEngagementEngine:l,loaded:o,loading:c}=(0,ea.A)({enabled:!!r}),h=r&&o&&!c&&!1===l,{openModal:m}=(0,en.A)(),p=(0,s.useCallback)(()=>{m("Signals")},[m]);(0,s.useEffect)(()=>{if(!r)return void e.replace("/shared/matchmaking/messages");h&&(p(),e.replace({pathname:"/shared/matchmaking/messages",query:{tab:"notifications"}}))},[r,h,p,e]);let x=(0,s.useMemo)(()=>!!r&&o&&!c&&!h,[r,o,c,h]);if((0,es.A)({title:"Signals",description:"Here's where you'll see activity and updates from engagement engine insights.",icon:(0,g.jsx)(n.A,{className:"text-habitsgreen h-5 w-5 sm:h-6 sm:w-6"}),showHelp:!1,hideBackButton:!0,rightAction:(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[x?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Y,{enabled:x}),(0,g.jsx)(ee,{})]}):null,(0,g.jsx)("a",{href:"https://www.usehabits.com/guides/signals-101",target:"_blank",rel:"noopener noreferrer","aria-label":"Open the Signals 101 guide",title:"Signals 101",className:"inline-flex h-[34px] w-[34px] items-center justify-center rounded-full text-[#555555] transition-opacity hover:opacity-70 dark:text-[#aab6c7]","data-tour":"signals-guide-link",children:(0,g.jsx)(i.A,{className:"h-5 w-5",strokeWidth:1.8})})]})}),!r)return null;let f=!!r&&(!o||c);return(0,g.jsxs)("div",{className:"flex h-full min-h-0 flex-col gap-4",children:[x?(0,g.jsxs)("div",{"data-tour":"signals-page-panel",className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto",children:[(0,g.jsx)(er.A,{copy:"Get notified when new signals match, even if Habits is closed."}),(0,g.jsx)(b,{}),(0,g.jsx)(X,{embedded:!0})]}):f?(0,g.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto",children:[(0,g.jsx)(b,{}),(0,g.jsx)(q.A,{embedded:!0})]}):null,(0,g.jsx)(et.A,{})]})}}},e=>{e.O(0,[2405,5551,4320,6070,6161,636,6593,8792],()=>e(e.s=69493)),_N_E=e.O()}]);
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.