PageSourceSearch

https://thetool.company/_next/static/chunks/2rt1kpbgfh-_k.js

js thetool.company collected 2026-10-02 01:55:12 UTC 18,575 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,490998,e=>{"use strict";async function t(e,t,n){try{let r=await fetch("/api/imessage/pair",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceId:t,request:n,agent:e})});if(!r.ok)return null;let a=await r.json().catch(()=>null);return a?.devices?.length?a.devices:[{id:t,label:null}]}catch{return null}}e.s(["reachedPhrase",0,function(e){let t=e.map(e=>e.label).filter(e=>!!e);return e.length<2||0===t.length?null:1===t.length?t[0]:`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`},"requestAgentOnDevice",0,t])},620532,196414,707235,345723,e=>{"use strict";e.s(["BRIEF_PAINTING_DARK",0,{key:"farm",src:"/marketing/hero-painting-farm.jpg",alt:"A farm with a red barn and grazing cattle below distant mountains",title:"The North",place:"Northern Israel",width:1448,height:1086},"BRIEF_PAINTING_LIGHT",0,{key:"rooftops",src:"/marketing/hero-painting-rooftops.jpg",alt:"Tiled rooftops of Nachlaot, Jerusalem, under a soft sky",title:"Nachlaot",place:"Jerusalem",width:1529,height:1029}],620532);let t=["reply_email","send_email","linkedin_message","linkedin_connect","send_whatsapp","send_message","send_sms","call","custom"];function n(e){return"string"==typeof e&&t.includes(e)?e:void 0}let r=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,a=/^\d{4}-\d{2}-\d{2}$/,i=["email","slack","linkedin","whatsapp","imessage","sms","x","reddit","chat","calendar","records"],l=["deal_stage","deal_close_date","deal_mark_lost","deal_next_step","task_create","task_complete","email_draft"];function s(e,t){if("string"!=typeof e)return"";let n=e.trim().replace(/\s+/g," ");if(n.length<=t)return n;let r=n.slice(0,t),a=Math.max(r.lastIndexOf(". "),r.lastIndexOf("! "),r.lastIndexOf("? "));if(a>.45*t)return r.slice(0,a+1);let i=r.lastIndexOf(" ");return`${(i>.5*t?r.slice(0,i):r.slice(0,t-1)).trimEnd()}…`}function o(e){return"string"==typeof e&&r.test(e)?e.toLowerCase():void 0}function d(e){return Array.isArray(e)?e:[]}function c(e){return"string"==typeof e&&i.includes(e)?e:void 0}function u(e,t,n){let r=0x811c9dc5,a=t.toLowerCase().replace(/[^a-z0-9]+/g," ").trim();for(let e=0;e<a.length;e++)r^=a.charCodeAt(e),r=Math.imul(r,0x1000193);let i=`${e}-${(r>>>0).toString(36)}`,l=i,s=1;for(;n.has(l);)l=`${i}-${s++}`;return n.add(l),l}let p=["title","body","who","ask","note"];function m(e){let t=e??{},n=d(t.edited).filter(e=>"string"==typeof e).filter(e=>p.includes(e));if(0===n.length)return{};let r="string"==typeof t.editedFrom&&/^[a-z]+-[a-z0-9-]{1,32}$/.test(t.editedFrom)?t.editedFrom:void 0;return{edited:[...new Set(n)],...r?{editedFrom:r}:{}}}function h(e,t,n){return"string"==typeof e&&t.includes(e)?e:n}let f=["open","in_progress","done","dismissed"],g=["pending","approved","dismissed","failed"];function x(e){return d(e).slice(0,3).map(e=>{let t=e??{},n=c(t.channel),r=s(t.label,60);if(!n||!r)return null;let a=s(t.when,24);return{channel:n,label:r,...a?{when:a}:{}}}).filter(e=>null!==e)}function y(e){let t=e??{},n={},r=o(t.contactId),a=o(t.companyId),i=o(t.dealId),l=o(t.taskId);return r&&(n.contactId=r),a&&(n.companyId=a),i&&(n.dealId=i),l&&(n.taskId=l),"string"==typeof t.conversationId&&/^[\[email protected]]{1,255}$/.test(t.conversationId)&&(n.conversationId=t.conversationId),"string"==typeof t.eventId&&/^[\[email protected]]{1,255}$/.test(t.eventId)&&(n.eventId=t.eventId),n}function w(e){let t=e&&"object"==typeof e?e:{},r=new Set,i=[];for(let e of d(t.push)){if(i.length>=2)break;let t=e??{},n=s(t.title,160),a=s(t.body,560);n&&a&&i.push({id:u("push",n,r),title:n,body:a,evidence:x(t.evidence),refs:y(t.refs),prompt:s(t.prompt,1200)||`${n}. ${a}`,state:h(t.state,f,"open"),...m(t)})}let p=[];for(let e of d(t.todos)){if(p.length>=6)break;let t=e??{},i=s(t.title,160);if(!i)continue;let l="string"==typeof t.dueAt&&a.test(t.dueAt)?t.dueAt:"",d=n(t.taskType);p.push({id:u("todo",i,r),title:i,body:s(t.body,560),evidence:x(t.evidence),refs:y(t.refs),state:h(t.state,f,"open"),...o(t.promotedTaskId)?{promotedTaskId:o(t.promotedTaskId)}:{},...l?{dueAt:l}:{},...d?{taskType:d}:{},...m(t)})}let w=[];for(let e of d(t.moving)){if(w.length>=5)break;let t=e??{},n=s(t.title,160),a=s(t.body,560);n&&a&&w.push({id:u("moving",n,r),title:n,body:a,facing:"internal"===t.facing?"internal":"external",evidence:x(t.evidence),refs:y(t.refs),...m(t)})}let k=[];for(let e of d(t.waiting)){if(k.length>=6)break;let t=e??{},n=s(t.who,60),a=s(t.ask,560),i=c(t.channel);if(!n||!a||!i)continue;let l=s(t.when,24);k.push({id:u("waiting",`${n} ${a}`,r),who:n,ask:a,channel:i,...l?{when:l}:{},refs:y(t.refs),...m(t)})}let b=d(t.week).map(e=>
1s(e,560)).filter(Boolean).slice(0,5),v=[];for(let e of d(t.meetingNotes)){if(v.length>=12)break;let t=e??{},n="string"==typeof t.eventId&&/^[\[email protected]]{1,255}$/.test(t.eventId)?t.eventId:"",r=s(t.note,560);if(!n||!r)continue;let a=d(t.outcomes).map(e=>s(e,160)).filter(Boolean).slice(0,4);v.push({eventId:n,kind:"recap"===t.kind?"recap":"prep",note:r,...a.length?{outcomes:a}:{},...!0===t.personal?{personal:!0}:{},...m(t)})}let I=[],j=new Set;for(let e of d(t.closed)){if(I.length>=20)break;let t=e??{},n=o(t.taskId);!n||j.has(n)||(j.add(n),I.push({taskId:n,outcome:"dropped"===t.outcome?"dropped":"done",reason:s(t.reason,560)}))}let N=[...new Set(d(t.sources).map(c).filter(e=>!!e))];return{headline:s(t.headline,300),push:i,todos:p,actions:function(e,t){let r=[];for(let i of d(e)){if(r.length>=6)break;let e=i??{},d="string"==typeof e.kind&&l.includes(e.kind)?e.kind:null;if(!d)continue;let c=s(e.label,160),p=s(e.reason,560);if(!c||!p)continue;let m=function(e,t){let r=t??{};switch(e){case"deal_stage":{let e=o(r.dealId),t=s(r.stage,64);return e&&t?{dealId:e,stage:t}:null}case"deal_close_date":{let e=o(r.dealId),t="string"==typeof r.date&&a.test(r.date)?r.date:"";if(!e||!t)return null;return{dealId:e,date:t}}case"deal_mark_lost":{let e=o(r.dealId);return e?{dealId:e}:null}case"task_create":{let e=s(r.title,160);if(!e)return null;let t={title:e},i="string"==typeof r.dueAt&&a.test(r.dueAt)?r.dueAt:"";i&&(t.dueAt=i);let l=o(r.contactId),d=o(r.companyId),c=o(r.dealId);l&&(t.contactId=l),d&&(t.companyId=d),c&&(t.dealId=c);let u=n(r.taskType);return u&&(t.taskType=u),t}case"task_complete":{let e=o(r.taskId);return e?{taskId:e}:null}case"deal_next_step":{let e=o(r.dealId),t=s(r.nextStep,160);return e&&t?{dealId:e,nextStep:t}:null}case"email_draft":{let e=Array.isArray(r.to)?r.to.filter(e=>"string"==typeof e).map(e=>e.trim()).filter(e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)).slice(0,5):[],t=s(r.subject,160),n="string"==typeof r.body?r.body.trim().slice(0,4e3):"";if(0===e.length||!n)return null;let a={to:e.join(","),subject:t,body:n};return"string"==typeof r.threadId&&/^[\w-]{1,255}$/.test(r.threadId)&&(a.threadId=r.threadId),a}default:return null}}(d,e.args);if(!m)continue;let f=s(e.targetLabel,60),x="string"==typeof e.appliedAt?e.appliedAt.slice(0,40):"",y=s(e.error,560);r.push({id:u("action",`${d} ${c}`,t),kind:d,label:c,reason:p,args:m,...f?{targetLabel:f}:{},state:h(e.state,g,"pending"),...x?{appliedAt:x}:{},...y?{error:y}:{}})}return r}(t.actions,r),moving:w,waiting:k,week:b,meetingNotes:v,closed:I,sources:N}}let k={push:{title:{max:160,required:!0},body:{max:560,required:!0}},todos:{title:{max:160,required:!0},body:{max:560,required:!1}},moving:{title:{max:160,required:!0},body:{max:560,required:!0}},waiting:{who:{max:60,required:!0},ask:{max:560,required:!0}},meetingNotes:{note:{max:560,required:!0}}},b=new Set(["push","todos","moving","waiting","week","meetingNotes"]);e.s(["EMPTY_BRIEF",0,{headline:"",push:[],todos:[],actions:[],mov
1ing:[],waiting:[],week:[],meetingNotes:[],closed:[],sources:[]},"MAX_HEADLINE",0,300,"applyBriefEdit",0,function(e,t){let{section:n,id:r,field:a,remove:i}=t,l="string"==typeof t.value?t.value:"";if("headline"===n)return i?w({...e,headline:""}):w({...e,headline:s(l,300)});if("week"===n){let t=Number.parseInt(r??"",10);if(!Number.isInteger(t)||t<0||t>=e.week.length)return null;if(i)return w({...e,week:e.week.filter((e,n)=>n!==t)});let n=s(l,560);return n?w({...e,week:e.week.map((e,r)=>r===t?n:e)}):null}if(!r)return null;let o=e[n],d="meetingNotes"===n?"eventId":"id",c=o.findIndex(e=>e[d]===r);if(c<0)return null;if(i)return b.has(n)?w({...e,[n]:o.filter((e,t)=>t!==c)}):null;let u=a?k[n]?.[a]:void 0;if(!u)return null;let p=s(l,u.max);if(!p&&u.required)return null;let m=o[c],h={...m,[a]:p,edited:[...new Set([...m.edited??[],a])],..."meetingNotes"===n?{}:{editedFrom:m.editedFrom??m.id}};return w({...e,[n]:o.map((e,t)=>t===c?h:e)})},"parseBriefPayload",0,w],196414);var v=e.i(843476),I=e.i(522016),j=e.i(647163),N=e.i(572377),$=e.i(903336),_=e.i(447606),S=e.i(210578),A=e.i(213788),C=e.i(607486);let T={people:{},companies:{},deals:{}};e.s(["EMPTY_REF_INDEX",0,T],707235);let q=/\b(?:the|a|an|his|her|their|my|our|your|its|this|that)\s+(?:own\s+)?$/i,F={email:N.MailProviderSquircle,slack:N.SlackSquircle,linkedin:N.LinkedInSquircle,whatsapp:N.WhatsAppSquircle,imessage:N.IMessageSquircle,sms:N.SmsSquircle,x:N.XSquircle,reddit:N.RedditSquircle,chat:N.ChatSquircle,calendar:$.CalendarDateIcon,records:C.Building2};function M({channel:e,className:t}){let n=F[e]??N.MailProviderSquircle;return(0,v.jsx)(n,{className:(0,j.cn)("size-[15px] shrink-0",t)})}function L({href:e,label:t,title:n,children:r}){let a=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("span",{className:"relative mr-1 inline-block size-[18px] shrink-0 overflow-hidden align-[-0.2em] [&>*]:size-full",children:r}),(0,v.jsx)("span",{className:(0,j.cn)("underline-offset-[3px] decoration-foreground/40",e&&"group-hover:underline"),children:t})]});return e?(0,v.jsx)(I.default,{href:e,title:n??t,className:"group inline whitespace-nowrap text-inherit no-underline",children:a}):(0,v.jsx)("span",{title:n??t,className:"inline whitespace-nowrap text-inherit",children:a})}function E({href:e,label:t,children:n,className:r}){return(0,v.jsxs)(I.default,{href:e,title:t,className:(0,j.cn)("entity-chip cursor-pointer inline-flex max-w-[190px] items-center gap-1.5 rounded-full border px-2 py-1 text-xs font-medium text-foreground/80",r),children:[n,(0,v.jsx)("span",{className:"truncate",children:t})]})}e.s(["Card",0,function({children:e,className:t}){return(0,v.jsx)("div",{className:(0,j.cn)("detail-sidebar-cards overflow-hidden rounded-[20px] border border-card-border bg-card p-4",t),children:e})},"ChannelGlyph",0,M,"EvidenceRow",0,function({evidence:e}){return 0===e.length?null:(0,v.jsx)("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1",children:e.map((e,t)=>(0,v.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[11px] text-muted-foreground/75",children:[(0,v.jsx)(M,{channel:e.channel}),(0,v.jsx)("span",{className:"truncate max-w-[220px]",children:e.label}),e.when&&(0,v.jsx)("span",{className:"text-muted-foreground/50",children:e.when})]},`${e.channel}-${e.label}-${t}`))})},"HeadlineWithChips",0,function({text:e,index:t,className:n,style:r,as:a="div"}){let i=function(e,t){if(!e)return[];let n=function(e){let t=[],n=new Map;for(let r of Object.values(e.people)){let e=r.name.trim();e.length>=3&&"unknown"!==e.toLowerCase()&&t.push({alias:e,kind:"person",id:r.id});let a=e.split(/\s+/)[0]??"";if(a.length>=3){let e=a.toLowerCase();n.set(e,[...n.get(e)??[],r.id])}}let r=new Set(Object.values(e.companies).map(e=>e.name.trim().toLowerCase()));for(let[a,i]of n){if(1!==i.length||r.has(a))continue;let n=e.people[i[0]];n&&n.name.trim().toLowerCase()!==a&&t.push({alias:n.name.trim().split(/\s+/)[0],kind:"person",id:n.id,soft:!0})}for(let n of Object.values(e.companies)){let e=n.name.trim();e.length>=3&&"unknown"!==e.toLowerCase()&&t.push({alias:e,kind:"company",id:n.id})}return t.sort((e,t)=>
1{let n=t.alias.length-e.alias.length;if(0!==n)return n;let r=Number(!!e.soft)-Number(!!t.soft);return 0!==r?r:e.kind===t.kind?0:"person"===e.kind?-1:1}),t}(t);if(0===n.length)return[{type:"text",value:e}];let r=[],a=[];for(let t of n){let n,i=RegExp(`(?<![\\w])${t.alias.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?:['’]s)?(?![\\w])`,"gi");for(;n=i.exec(e);){let i=n[0].replace(/['’]s$/i,""),l=n.index,s=l+i.length;!r.some(([e,t])=>l<t&&s>e)&&(!t.soft||function(e,t,n){let r=n.charAt(0);return(r!==r.toLowerCase()||r===r.toUpperCase())&&!q.test(e.slice(0,t))}(e,l,i))&&(r.push([l,s]),a.push({start:l,end:s,alias:t,text:i}))}}if(0===a.length)return[{type:"text",value:e}];a.sort((e,t)=>e.start-t.start);let i=[],l=0;for(let n of a){if(n.start>l&&i.push({type:"text",value:e.slice(l,n.start)}),"person"===n.alias.kind){let e=t.people[n.alias.id];e&&i.push({type:"person",person:e,text:n.text})}else{let e=t.companies[n.alias.id];e&&i.push({type:"company",company:e,text:n.text})}l=n.end}return l<e.length&&i.push({type:"text",value:e.slice(l)}),i}(e,t??T);return 0===i.length?null:(0,v.jsx)(a,{className:n,style:r,children:i.map((e,t)=>{if("text"===e.type)return(0,v.jsx)("span",{children:e.value},`t-${t}`);if("person"===e.type){let n=e.person;return(0,v.jsx)(L,{href:void 0===n.href?`/people/${n.id}`:n.href,label:e.text,title:n.name,children:(0,v.jsx)(S.ContactAvatar,{name:n.name,imageUrl:n.imageUrl,size:"xs",className:"!h-full !w-full !text-[9px]"})},`p-${n.id}-${t}`)}let n=e.company;return(0,v.jsx)(L,{href:`/companies/${n.id}`,label:e.text,title:n.name,children:(0,v.jsx)(A.CompanyLogo,{companyName:n.name,logoUrl:n.logoUrl,domain:n.domain,size:"xs",className:"!h-full !w-full !text-[8px]"})},`c-${n.id}-${t}`)})})},"QuietButton",0,function({children:e,onClick:t,disabled:n,className:r}){return(0,v.jsx)("button",{type:"button",onClick:t,disabled:n,className:(0,j.cn)("inline-flex items-center justify-center gap-1.5 rounded-full border border-border px-4 py-1.5 text-[12px] text-foreground/80","bg-white dark:bg-white/10","transition-colors duration-200 ease-out hover:bg-muted hover:text-foreground","disabled:pointer-events-none disabled:opacity-40",r),children:e})},"RefChips",0,function({refs:e,index:t,className:n}){let r=e.contactId?t?.people[e.contactId]:void 0,a=e.companyId?t?.companies[e.companyId]:void 0,i=e.dealId?t?.deals[e.dealId]:void 0;return r||a||i?(0,v.jsxs)("div",{className:(0,j.cn)("mt-2 flex flex-wrap items-center gap-1.5",n),children:[r&&(0,v.jsx)(E,{href:`/people/${r.id}`,label:r.name,children:(0,v.jsx)(S.ContactAvatar,{name:r.name,imageUrl:r.imageUrl,size:"xs"})}),a&&(0,v.jsx)(E,{href:`/companies/${a.id}`,label:a.name,children:(0,v.jsx)(A.CompanyLogo,{companyName:a.name,logoUrl:a.logoUrl,domain:a.domain,size:"xs"})}),i&&(0,v.jsx)(E,{href:`/deals/${i.id}`,label:i.name,children:(0,v.jsx)(_.HandshakeIcon,{className:"size-3.5 shrink-0"})})]}):null},"SCRIPT",0,{fontFamily:"var(--font-gustatory), cursive"},"Section",0,function({label:e,children:t,className:n,action:r}){return(0,v.jsxs)("section",{className:(0,j.cn)("min-w-0",n),"data-brief-section":e,children:[(0,v.jsxs)("div",{className:"mb-2.5 flex items-center gap-2.5 px-0.5",children:[(0,v.jsx)("h2",{className:"select-none text-[11px] font-semibold uppercase tracking-[0.13em] text-muted-foreground/70 dark:text-foreground/65",children:e}),r]}),t]})},"SourceStack",0,function({evidence:e,href:t,className:n}){if(0===e.length)return null;let r=new Set,a=e.filter(e=>!r.has(e.channel)&&r.add(e.channel)),i=(0,j.cn)("group/sources mt-1.5 flex items-center",t&&"cursor-pointer",n),l=(0,v.jsx)(v.Fragment,{children:a.map((e,t)=>(0,v.jsx)("span",{className:(0,j.cn)("squircle grid shrink-0 place-items-center bg-card p-[2px]","transition-colors duration-200 ease-out","group-hover/row:bg-[#F5F5F5] dark:group-hover/row:bg-[#262626]","transition-[margin] duration-200 ease-out",t>0&&"-ml-[10px] group-hover/sources:ml-1"),title:`${e.label}${e.when?` \xb7 ${e.when}`:""}`,children:(0,v.jsx)(M,{channel:e.channel,className:"size-[18px]"})},`${e.channel}-${t}`))});return t?(0,v.jsx)(I.default,{href:t,title:"Open the thread",className:i,children:l}):(0,v.jsx)("div",{className:i,children:l})},"StickerButton",0,function({children:e,onClick:t,disabled:n,className:r}){return(0,v.jsx)("button",{type:"button",onClick:t,disabled:n,className:(0,j.cn)("inline-flex items-center justify-center gap-1.5 rounded-full bg-foreground px-4 py-1.5 text-[12px] font-medium text-background","transition-opacity duration-200 ease-out hover:opacity-85","disabled:pointer-events-none disabled:opacity-40",r),children:e})}],345723)},904227,e=>{"use strict";var t=e.i(271645);let n={earlyMorning:["You are up early, {name}","You beat the sun here","Early start, {name}
1","The quiet hour is all yours","Nobody has emailed you yet","First one in, {name}","The world is still waking up"],morning:["Morning, {name}","Good morning, {name}","Look who is up","A fresh one, {name}","Coffee first, then everything else","Back at it, {name}","The day is still yours to shape","Let us see what came in overnight","Ready when you are, {name}","Clean slate, {name}"],afternoon:["Afternoon, {name}","Good afternoon, {name}","Still going strong","Second wind time","Halfway there, {name}","The busy middle, {name}","Back from lunch, {name}","Prime inbox hours","Plenty of day left, {name}"],evening:["Evening, {name}","Good evening, {name}","The home stretch, {name}","Winding down, {name}","One last look, {name}","Almost a wrap, {name}","You have earned the evening"],night:["Still here, {name}","Burning the late oil","Most of this can wait for morning","The night shift, {name}","Late one, {name}","Nothing good happens in the inbox after midnight","Go get some sleep, {name}"]},r=[{when:(e,t)=>1===e.getDay()&&("morning"===t||"earlyMorning"===t),lines:["Monday again, {name}","A new week, {name}","Monday. Ease into it"]},{when:(e,t)=>5===e.getDay()&&"night"!==t,lines:["Friday, {name}","Nearly the weekend, {name}","Friday. Land the plane"]},{when:e=>0===e.getDay()||6===e.getDay(),lines:["Working on a weekend, {name}","Weekend mode, {name}","It is the weekend, technically"]}],a=()=>()=>{};e.s(["useGreeting",0,function(e,i){return(0,t.useSyncExternalStore)(a,()=>(function(e){var t;let a,i=e.now??new Date,l=(e.name??"").trim().split(" ")[0]??"",s=(a=i.getHours())<5?"night":a<8?"earlyMorning":a<12?"morning":a<17?"afternoon":a<22?"evening":"night",o=[...n[s]];for(let e of r)e.when(i,s)&&o.push(...e.lines);return t=o[function(e){let t=0x811c9dc5;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,0x1000193);return Math.abs(t)}([e.userId??"anon",i.getFullYear(),i.getMonth(),i.getDate(),i.getHours()].join(":"))%o.length],l?t.replace("{name}",l):t.replace(/,\s*\{name\}/g,"").replace(/\{name\}/g,"you").trim()})({name:e,userId:i}),()=>null)}],904227)}]);

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.