PageSourceSearch

https://www.beeline.life/_next/static/chunks/app/layout-f46265b8a65a81ad.js

js beeline.life collected 2026-10-01 15:00:22 UTC 64,158 bytes, 36 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="78f70226-f1b6-4e62-a261-981336824833",e._sentryDebugIdIdentifier="sentry-dbid-78f70226-f1b6-4e62-a261-981336824833")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{79123:(e,t,n)=>{"use strict";n.d(t,{M0:()=>o,Mp:()=>s,Nz:()=>d,WL:()=>l,qh:()=>a,yF:()=>r});let i=new Set(["SLATE"]);function r(e){let{quote:t,quote_status:n,excerpt:i}=e;return("verbatim"===n||"repaired"===n)&&t?{text:t,leadIn:null}:{text:i,leadIn:"Related passage"}}function s(e){return i.has(e.kind)?"lesson":"document"}function o(e){return e.cell_slug?{type:"modal",cellSlug:e.cell_slug}:null}function a(e){return"route"===e?"Go to lesson":"Open"}function l(e){return"lesson"===e?"Lesson":"Document"}function d(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleDateString()}},222431:()=>{},236640:(e,t,n)=>{"use strict";n.d(t,{AV:()=>i,FA:()=>r,IB:()=>o,ch:()=>s,lk:()=>a});let i="beeline-support-bot-preference",r="beeline:support-bot-preference-change",s={position:"bottom-right",hidden:!1};function o(){try{var e;let t=window.localStorage.getItem(i);if(!t)return s;let n=JSON.parse(t);return{position:(e=n.position,"bottom-right"===e||"bottom-left"===e)?n.position:s.position,hidden:"boolean"==typeof n.hidden?n.hidden:s.hidden}}catch{return s}}function a(e){try{window.localStorage.setItem(i,JSON.stringify(e))}catch{}return window.dispatchEvent(new CustomEvent(r,{detail:e})),e}},265944:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var i=n(212115);let r="/under-maintenance";async function s(e){let t=new AbortController,n=setTimeout(()=>t.abort(),8e3),i=()=>t.abort();e.addEventListener("abort",i);try{let e=await fetch("/api/maintenance",{cache:"no-store",signal:t.signal});if(!e.ok)return null;return await e.json()}catch{return null}finally{clearTimeout(n),e.removeEventListener("abort",i)}}function o(){return(0,i.useEffect)(()=>{let e,t=new AbortController,n=async()=>{let e=await s(t.signal);e&&!t.signal.aborted&&e.enabled&&"full"===e.mode&&window.location.pathname!==r&&function(e,t){let n=e.match(/^\/organization\/([^/]+)/);return!!n&&(!t||0===t.length||t.includes(n[1]))}(window.location.pathname,e.affectedOrgs)&&window.location.replace(r)},i=()=>{e||(e=setInterval(()=>{n()},12e4))},o=()=>{e&&(clearInterval(e),e=void 0)},a=()=>{"visible"===document.visibilityState?(n(),i()):o()},l=()=>{n()};return n(),"visible"===document.visibilityState&&i(),document.addEventListener("visibilitychange",a),window.addEventListener("focus",l),()=>{o(),t.abort(),document.removeEventListener("visibilitychange",a),window.removeEventListener("focus",l)}},[]),null}}
1,368248:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var i=n(695155),r=n(573321);function s(e){let{children:t}=e;return"/under-maintenance"===(0,r.usePathname)()?null:(0,i.jsx)(i.Fragment,{children:t})}},573665:(e,t,n)=>{"use strict";n.d(t,{default:()=>x});var i=n(695155),r=n(573321),s=n(621937),o=n(403672),a=n(644845),l=n(376102),d=n(212115),u=n(467884);let c=()=>{let[e,t]=(0,d.useState)(!1);return((0,d.useEffect)(()=>{u.XF||u.Fr||!u.nr||t(!0)},[]),e)?(0,i.jsxs)("div",{className:"fixed bottom-36 rounded-l right-0 w-36 p-4 bg-theme-secondary-danger text-white text-xs z-50 flex flex-col justify-start items-center","data-sentry-component":"SafariFixedNote","data-sentry-source-file":"SafariFixedNote.tsx",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)("h1",{className:"w-4/5 text-lg text-white mb-3",children:"Wrong browser alert"}),(0,i.jsx)("i",{className:"w-1/5 fas fa-times cursor-pointer",onClick:()=>t(!1)})]}),(0,i.jsx)("div",{children:"Beeline is optimized for Chromium based browsers - Chrome, Edge, Brave to name a few. Safari users may experience severe issues at this stage. Please consider switching to a Chromium-based browser for a better experience."})]}):null};var h=n(733695),m=n(709688),g=n(233306),f=n(660098),p=n(938816);function x(e){let{children:t}=e;return"/under-maintenance"===(0,r.usePathname)()?(0,i.jsx)(i.Fragment,{children:t}):(0,i.jsx)(s.Dv,{"data-sentry-element":"AppProvider","data-sentry-component":"Providers","data-sentry-source-file":"index.tsx",children:(0,i.jsx)(l.yd,{networkStatus:h.pT.ONLINE,clientType:m.jN.WEB_APP,cacheFns:{getFromCache:g.pf,setItemInCache:g.bI,multiGetFromCache:g.mI,multiSetFromCache:g.Ke,multiRemoveFromCache:g.Kk,getAllCacheKeys:g.qk},"data-sentry-element":"UserTrackingProvider","data-sentry-source-file":"index.tsx",children:(0,i.jsxs)(o.Zn,{"data-sentry-element":"ModalProvider","data-sentry-source-file":"index.tsx",children:[t,(0,i.jsx)(a.N9,{position:"top-right","data-sentry-element":"ToastContainer","data-sentry-source-file":"index.tsx"}),(0,i.jsx)(c,{"data-sentry-element":"SafariFixedNote","data-sentry-source-file":"index.tsx"})]})})})}(0,f._)(),(0,p.lH)()}
1,595862:(e,t,n)=>{"use strict";n.d(t,{Ol:()=>h,Vr:()=>d,g7:()=>c,kc:()=>l,qM:()=>o,rS:()=>u,yF:()=>a});var i=n(459185),r=n(792103);function s(e){if(!i.A.isAxiosError(e))return{ok:!1,status:0,detail:""};let t=e.response?.status??0,n=e.response?.data;if("string"==typeof n?.detail)return{ok:!1,status:t,detail:n.detail};if(n&&"boolean"==typeof n.ok)return{ok:!1,status:t,detail:""};if(n&&"object"==typeof n){let e=Object.values(n).flat().find(e=>"string"==typeof e);if("string"==typeof e)return{ok:!1,status:t,detail:e}}return{ok:!1,status:t,detail:""}}async function o(e){try{let t=await r.A.get(`/organization/${e}/guide/prompts/`),n=t.data?.prompts;return Array.isArray(n)?n.filter(e=>"string"==typeof e):[]}catch{return[]}}async function a(e){try{let t=new URLSearchParams({since:e.since});e.until&&t.set("until",e.until),e.org&&t.set("org",e.org),e.outcome&&t.set("outcome",e.outcome);let n=await r.A.get(`/organization/1/guide/turns/export/?${t.toString()}`,{responseType:"blob"}),i=new Blob([n.data],{type:n.headers["content-type"]||"text/csv"}),s=(n.headers["content-disposition"]??"").match(/filename="(.+)"/),o=s?s[1]:`guide-transcripts-${e.since}.csv`,a=window.URL.createObjectURL(i),l=document.createElement("a");return l.href=a,l.download=o,document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(a),{ok:!0,data:{filename:o}}}catch(e){return s(e)}}async function l(e,t){try{let n=await r.A.post(`/organization/${e}/guide/ask/`,t,{timeout:9e4});return{ok:!0,data:n.data}}catch(e){return s(e)}}async function d(e,t){try{let n=await r.A.post(`/organization/${e}/guide/action/${t}/confirm/`,{});return{ok:!0,data:n.data}}catch(e){return s(e)}}async function u(e,t){try{let n=await r.A.post(`/organization/${e}/guide/action/${t}/cancel/`,{});return{ok:!0,data:n.data}}catch(e){return s(e)}}async function c(e,t){try{let n=await r.A.post(`/organization/${e}/guide/escalate/preview/`,{session_id:t});return{ok:!0,data:n.data}}catch(e){return s(e)}}async function h(e,t){try{let n=await r.A.post(`/organization/${e}/guide/escalate/`,t);return{ok:!0,data:n.data}}catch(e){return s(e)}}},662225:(e,t,n)=>{Promise.resolve().then(n.bind(n,109010)),Promise.resolve().then(n.bind(n,792284)),Promise.resolve().then(n.bind(n,940563)),Promise.resolve().then(n.bind(n,783245)),Promise.resolve().then(n.bind(n,368248)),Promise.resolve().then(n.bind(n,265944)),Promise.resolve().then(n.t.bind(n,440609,23)),Promise.resolve().then(n.t.bind(n,842593,23)),Promise.resolve().then(n.t.bind(n,793560,23)),Promise.resolve().then(n.t.bind(n,463778,23)),Promise.resolve().then(n.t.bind(n,138236,23)),Promise.resolve().then(n.t.bind(n,80286,23)),Promise.resolve().then(n.bind(n,573665)),Promise.resolve().then(n.t.bind(n,222431,23)),Promise.resolve().then(n.t.bind(n,922273,23))},783245:(e,t,n)=>{"use strict";n.d(t,{default:()=>e$});var i=n(695155),r=n(212115);function s(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>t("undefined"!=typeof document&&!!document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]'));e();let n=new MutationObserver(e);return n.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-state"]}),()=>n.disconnect()},[]),e}var o=n(573321),a=n(833210),l=n(962872),d=n(148278),u=n(115257),c=n(695205),h=n(236640),m=n(981274),g=n(447650),f=n(692564),p=n(28538),x=n(80723),b=n(821628),y=n(86901),w=n(22164),v=n(358120),j=n(506296),k=n(356204),N=n(948368),_=n(94514),$=n(441585),C=n(420986),S=n(603424),A=n(392289),I=n(267635),T=n(5772),E=n(595862);let P={create_group:{done:"Group created",doing:"Create this group"},edit_group:{done:"Group updated",doing:"Make this change"},move_group:{done:"Group moved",doing:"Move this group"},delete_group:{done:"Group deleted",doing:"Delete this group"},bulk_edit_groups:{done:"Groups updated",doing:"Apply this change"},bulk_create_groups:{done:"Groups created",doing:"Create these groups"},move_group_members:{done:"People moved",doing:"Move these people",queued:"Move started"}};function L(e){return P[e]??{done:"Done",doing:"Do this"}}function R(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0?e:null}function z(e){return"string"==typeof e&&e.trim()?e.trim():""}function G(e){return Array.isArray(e)?e.filter(e=>"string"==typeof e&&!!e.trim()):[]}function F(e){return 1===e?"1 person":`${e} people`}function q(e){return 1===e?"1 group":`${e} groups`}function D(e){let t=e.map(e=>`"${e}"`).join(", ");return 1===e.length?`the tag ${t}`:`the tags ${t}`}function M(e,t,n){if("bulk_create_groups"===e)return function(e){let t=Array.isArray(e.would_create)?e.would_create:[],n=R(e.count)??t.length,i=t.map(e=>z(e?.name)).filter(e=>!!e),r=G(e.warnings),s=[];if(0===n)s.push("Nothing would be created — none of those rows can be used as they are.");else{let e=i.length===n&&n<=3;s.push(e?`Creates ${q(n)}: ${i.map(e=>`"${e}"`).join(", ")}.`:`Creates ${q(n)}.`),s.push("Group names are not checked for duplicates, so confirming this twice would create a second set.")}return s.push(...r),s.join(" ")}(n??{});let i=n?.message??n?.would_create??n?.summary;return"string"==typeof i&&i.trim()?i:"create_group"===e&&"string"==typeof t?.name?`Create a group called "${t.name}".`:L(e).doing}let W={heading:"Beware — this action may not be easily reversed",body:"Are you certain you want to continue?"},O={delete_group:"Yes, delete this group",bulk_edit_groups:"Yes, change these groups",move_group_members:"Yes, move these people"};function B(e){return"number"==typeof e&&Number.isFinite(e)&&e>=0?e:null}function Z(e){return"string"==typeof e&&e.trim()?e.trim():""}let U=new Set(["groups","learners","periods"]);function H(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function V(e){let t=B(e.shown),n=B(e.total),i=function(e){let t=Z(e);return U.has(t)?t:"results"}(e.unit),r=!0===e.truncated;return null!==t&&null!==n&&n>t?`${t} of ${n} ${i}`:r&&null!==t?`only ${t} ${i}`:r?"part of the list":""}function Y(e){return e.length<=1?e[0]??"":2===e.length?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}var K=n(79123);function J(e){return"string"==typeof e?e.trim():""}function Q(e){return"library"===e.kind}var X=n(863754),ee=n(874157),et=n(971687),en=n(403672),ei=n(207340);let er={phase:"idle",intent:"",subject:"",summary:"",contactName:"",contactEmail:"",whatsappUrl:"",supportEmail:"",sentChannel:"",error:""},es="/img/brand/Zeno/Zeno-Confident-Prod.png",eo=0,ea=()=>`guide-msg-${++eo}`;function el(e){let{organizationId:t,route:n}=e,d=s(),[u,c]=(0,r.useState)(!1),[N,_]=(0,r.useState)([]),[$,C]=(0,r.useState)(h.ch),[S,A]=(0,r.useState)(!1),[I,P]=(0,r.useState)(!1),[L,z]=(0,r.useState)(!1),G=(0,r.useRef)(!1),[F,D]=(0,r.useState)(56),[M,W]=(0,r.useState)([]),[O,B]=(0,r.useState)(null),[Z,U]=(0,r.useState)(!1),[H,V]=(0,r.useState)(null),[Y,K]=(0,r.useState)(null),[J,Q]=(0,r.useState)(""),[X,eo]=(0,r.useState)(!1),[el,ec]=(0,r.useState)(er);(0,r.useEffect)(()=>{let e=!1;return(0,E.qM)(t).then(t=>{e||_(t)}
1),()=>{e=!0}},[t]);let em=(0,r.useRef)(null),ep=(0,r.useRef)(null),ey=(0,r.useRef)(null),ew=(0,r.useRef)(null),ev=(0,r.useRef)(null),ej=(0,r.useRef)(null),ek=(0,r.useRef)(!1);(0,r.useEffect)(()=>c(!0),[]),(0,r.useEffect)(()=>{let e=()=>C((0,h.IB)()),t=t=>{let n=t.detail;if(n)return void C(n);e()},n=t=>{t.key===h.AV&&e()};return e(),window.addEventListener(h.FA,t),window.addEventListener("storage",n),()=>{window.removeEventListener(h.FA,t),window.removeEventListener("storage",n)}},[]);let eN=M.reduce((e,t)=>"bot"===t.role?t.id:e,void 0),e_=M.reduce((e,t)=>"user"===t.role?t.id:e,void 0);(0,r.useLayoutEffect)(()=>{if(!S)return;let e=ew.current,t=ev.current,n=!!eN&&eN!==ej.current;if(n&&e&&t){ej.current=eN??null;let n=t.getBoundingClientRect().top-e.getBoundingClientRect().top,i=Math.max(0,e.scrollHeight-e.clientHeight),r=e.scrollTop+n-12;e.scrollTop=Math.max(0,Math.min(r,i));return}n&&(ej.current=eN??null),ey.current?.scrollIntoView({block:"end"})},[M,Z,S,X,el.phase,eN]),(0,r.useLayoutEffect)(()=>{let e=ep.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,120)}px`,e.style.overflowY=e.scrollHeight>120?"auto":"hidden")},[J,S]),(0,r.useEffect)(()=>{if(!S)return;let e=e=>{"Escape"===e.key&&(e.stopPropagation(),eC())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[S]);let e$=(0,r.useCallback)(()=>{A(!0),window.setTimeout(()=>ep.current?.focus(),0)},[]),eC=(0,r.useCallback)(()=>{A(!1)},[]);(0,r.useEffect)(()=>{let e=e=>{let t=e.detail?.question;t&&Q(t),e$()};return window.addEventListener(m.Zz,e),()=>window.removeEventListener(m.Zz,e)},[e$]);let eS=(0,o.useRouter)(),eA=n.split("/")[2]??"",{createModal:eI}=(0,en.k3)(),{membership:eT}=(0,l.A)(eA),eE=(0,r.useCallback)((e,t)=>{W(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]),eP=(0,r.useCallback)(e=>{if(!eA||"create_group"!==e.tool)return;let t="string"==typeof e.params?.name?e.params.name:"",n=`/organization/${eA}/workspace/admin/groups?modal=${encodeURIComponent("create-group")}`+(t?`&prefill_name=${encodeURIComponent(t)}`:"");eS.push(n)},[eA,eS]),eL=(0,r.useCallback)(e=>{Q(e),window.setTimeout(()=>{let e=ep.current;e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},0)},[]),eR=(0,r.useCallback)(async(e,n)=>{if(null==n.action_id)return;eE(e,{actionState:"working"});let i=await (0,E.Vr)(t,n.action_id);if(i.ok){let t=function(e){let t;if("string"==typeof e)return{succeeded:!0,messageText:e};let n=e??{},i=!1!==n.success,r="string"==typeof n.code?n.code:void 0,s="string"==typeof n.message?n.message:"",o="processing"===n.status||"string"==typeof n.job_id,a=Array.isArray(n.warnings)?n.warnings.filter(e=>"string"==typeof e&&!!e.trim()):[],l="number"==typeof n.moved_count?n.moved_count:null,d=R(n.updated_count),u=Array.isArray(n.created)?n.created.length:null;return t=s||(o?"That is running in the background now — larger moves take a few minutes. The group lists will catch up when it finishes.":0===l?"Nobody was moved — no one in that group matched.":null!==l?`Moved ${l} ${1===l?"person":"people"}.`:i&&null!==d?0===d?"No groups changed — none of them needed that change.":`Updated ${q(d)}.`:i&&null!==u?0===u?"Nothing was created.":`Created ${q(u)}.`:i?"Done.":"That did not go through, and nothing was changed."),a.length&&(t=`${t} ${a.join(" ")}`.trim()),{succeeded:i,queued:o,errorCode:r,messageText:t}}(i.data.result);eE(e,{actionState:t.succeeded?"done":"failed",actionOutcome:{succeeded:t.succeeded,text:t.messageText,queued:t.queued??!1}});return}let{status:r,detail:s}=i;eE(e,{actionState:"failed",actionOutcome:{succeeded:!1,text:409===r?s||"That one was already handled.":410===r?"That offer expired — ask me again and I will re-offer it.":s||"That did not go through, and nothing was changed."}})},[t,eE]),ez=(0,r.useCallback)(async(e,n)=>{eE(e,{actionState:"dismissed"}),null!=n.action_id&&await (0,E.rS)(t,n.action_id)},[t,eE]),eG=(0,r.useCallback)(e=>{eA&&((0,et.ru)(e.askedQuestion??""),eC(),eS.push(`/organization/${eA}/build/storyboard-builder?from=ask-zeno`))},[eA,eS,eC]),eF=(0,r.useCallback)(e=>{if(!eA)return;let t=e.route.replace("[slug]",eA);
1if(!t.includes("[")){if(e.deep_link){let n=t.includes("?")?"&":"?";t+=`${n}modal=${encodeURIComponent(e.deep_link)}`}eS.push(t)}},[eA,eS]),eq=(0,r.useCallback)(e=>{let n=eT?.organization?.settings;eI("ViewHiveCellModal",{cellSlug:e,orgSlug:eA,orgId:t,themeColours:{primary_color:n?.primary_color??ei.o.primary_color,secondary_color:n?.secondary_color??ei.o.secondary_color,accent_color:n?.accent_color??ei.o.accent_color,dashboard_hero_style:n?.dashboard_hero_style??"gradient"}})},[eI,eT,eA,t]),eD=(0,r.useCallback)(()=>{M.forEach(e=>{let n=e.action?.action_id,i=void 0===e.actionState||"offered"===e.actionState;null!=n&&i&&(0,E.rS)(t,n)}),W([]),B(null),K(""),V(null),eo(!1),ec(er)},[M,t]),eM=(0,r.useCallback)(async e=>{let i=e.trim();if(!i||Z)return;let r=ea();V(null),K(i),W(e=>[...e,{id:r,role:"user",text:i}]),Q(""),U(!0);let s=await (0,E.kc)(t,{question:i,session_id:O,route:n});if(U(!1),!s.ok){V({status:s.status,detail:s.detail}),W(e=>e.filter(e=>e.id!==r)),Q(e=>0===e.length?i:e);return}B(s.data.session_id),W(e=>[...e,{id:ea(),role:"bot",text:s.data.answer,citations:s.data.citations,outcome:s.data.outcome,khLinks:s.data.kh_suggestions,destination:s.data.destination,destinationConfidence:s.data.destination_confidence,roleHint:s.data.role_hint,action:s.data.action,actionState:s.data.action?"offered":void 0,buildHandoff:s.data.build_handoff,readProvenance:s.data.read_provenance??null,libraryProvenance:s.data.library_provenance,askedQuestion:i}]),"unsupported"===s.data.outcome||"deferred"===s.data.outcome?(eo(!0),["loading","editing","submitting"].includes(el.phase)||ec(er)):("done"===el.phase||"error"===el.phase)&&(eo(!1),ec(er))},[t,Z,n,O,el.phase]),eW=(0,r.useCallback)(()=>{eo(!0),ec(er)},[]),eO=(0,r.useCallback)(async e=>{if(null==O)return;eo(!0),ec({...er,intent:e,phase:"loading"});let n=await (0,E.g7)(t,O);if(!n.ok)return void ec({...er,intent:e,phase:"error",error:n.detail||"We couldn't prepare your request just now. Please try again."});ec({phase:"editing",intent:e,subject:n.data.subject,summary:n.data.summary,contactName:n.data.contact.name,contactEmail:n.data.contact.email,whatsappUrl:n.data.whatsapp_url??"",supportEmail:n.data.support_email,sentChannel:"",error:""})},[t,O]),eB=(0,r.useCallback)(async e=>{if(null==O)return;if(!el.subject.trim()||!el.summary.trim())return void ec(e=>({...e,error:"Please add a subject and a short summary before sending."}));if(ek.current)return;ek.current=!0;let n=el.subject.trim(),i=el.summary.trim();try{if("bug"!==e)if("whatsapp"===e){let e=el.whatsappUrl.split("?")[0],t=`${e}?text=${encodeURIComponent(i.slice(0,500))}`;window.open(t,"_blank","noopener,noreferrer")}else{let e=el.supportEmail||"[email protected]",t=`mailto:${e}?subject=${encodeURIComponent(n)}&body=${encodeURIComponent(i)}`;window.location.href=t}ec(e=>({...e,phase:"submitting",error:""}));let r=await (0,E.Ol)(t,{session_id:O,subject:n,summary:i,channel:e});if(!r.ok&&"bug"===e)return void ec(e=>({...e,phase:"error",error:r.detail||"We couldn't file your bug report just now. Please try “Talk to a human” instead so this still reaches someone."}));ec(t=>({...t,phase:"done",sentChannel:e,error:""}))}finally{ek.current=!1}},[el.subject,el.summary,el.whatsappUrl,el.supportEmail,t,O]);if((0,r.useEffect)(()=>{if(S){G.current=!0,P(!0),z(!1);return}if(!G.current)return;let e=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,t=()=>window.setTimeout(()=>em.current?.focus(),0);if(e){P(!1),z(!1),t();return}z(!0);let n=window.setTimeout(()=>{P(!1),z(!1),t()},180);return()=>window.clearTimeout(n)},[S]),(0,r.useLayoutEffect)(()=>{if(!S)return;let e=()=>D(function(){if("undefined"==typeof document)return 56;let e=document.querySelector("div.sticky.top-0.z-40.w-full");if(!e)return 56;let t=Math.round(e.getBoundingClientRect().bottom);return!Number.isFinite(t)||t<=0||t>400?56:t}());e(),window.addEventListener("resize",e);let t="undefined"!=typeof ResizeObserver?new ResizeObserver(e):null;return t?.observe(document.body),()=>{window.removeEventListener("resize",e),t?.disconnect()}},[S]),(0,r.useEffect)(()=>S?(document.body.dataset.guideDrawer="bottom-left"===$.position?"left":"right",()=>{delete document.body.dataset.guideDrawer}):void delete document.body.dataset.guideDrawer,[S,$.position]),!u)return null;let eZ="bottom-left"===$.position,eU=J.trim().length>0&&!Z,eH=0===M.length&&!Z&&!H,eV=M.find(e=>
1"bot"===e.role)?.id,eY=!I&&!d&&(0,i.jsx)("button",{ref:em,type:"button",onClick:e$,"aria-label":"Ask Zeno","aria-haspopup":"dialog","aria-expanded":!1,className:`guide-accent guide-shadow fixed bottom-5 ${eZ?"left-5":"right-5"} z-30 flex h-12 w-12 items-center justify-center rounded-full transition-transform hover:scale-105 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,children:(0,i.jsx)(f.A,{className:"h-5 w-5","aria-hidden":"true"})}),eK=I&&(0,i.jsxs)("section",{role:"dialog","aria-label":"Ask Zeno",className:`guide-surface guide-border ${L?"guide-panel-anim-out pointer-events-none":"guide-panel-anim"} ${eZ?"guide-panel-from-left":"guide-panel-from-right"} guide-shadow fixed bottom-0 ${eZ?"left-0 border-r":"right-0 border-l"} z-40 flex w-[calc(100vw-40px)] max-w-[400px] flex-col overflow-hidden`,style:{top:F},children:[(0,i.jsxs)("header",{className:"guide-border guide-surface-raised flex items-center justify-between gap-2 border-b px-4 py-3",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(T.default,{src:es,alt:"",width:32,height:32,className:"rounded-full object-cover object-top","aria-hidden":"true"}),(0,i.jsx)("span",{className:"guide-text text-sm font-semibold",children:"Ask Zeno"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)("button",{type:"button",onClick:eD,disabled:0===M.length,"aria-label":"Clear chat",title:"Clear chat",className:"guide-text-muted flex h-11 w-11 items-center justify-center rounded-md transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",children:(0,i.jsx)(p.A,{className:"h-4 w-4","aria-hidden":"true"})}),(0,i.jsx)("button",{type:"button",onClick:()=>{var e;return e={...$,position:"bottom-right"===$.position?"bottom-left":"bottom-right"},void C((0,h.lk)(e))},"aria-label":"bottom-right"===$.position?"Dock to the left":"Dock to the right",title:"bottom-right"===$.position?"Dock to the left":"Dock to the right",className:"guide-text-muted flex h-11 w-11 items-center justify-center rounded-md transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:"bottom-right"===$.position?(0,i.jsx)(x.A,{className:"h-4 w-4","aria-hidden":"true"}):(0,i.jsx)(b.A,{className:"h-4 w-4","aria-hidden":"true"})}),(0,i.jsx)("button",{type:"button",onClick:eC,"aria-label":"Close Ask Zeno",className:"guide-text-muted flex h-11 w-11 items-center justify-center rounded-md transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:(0,i.jsx)(a.A,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),(0,i.jsxs)("div",{ref:ew,className:"flex-1 overflow-y-auto px-4 py-4","aria-live":"polite","aria-relevant":"additions",children:[eH?(0,i.jsxs)("div",{className:"flex min-h-full flex-col items-center justify-center py-4 text-center",children:[(0,i.jsx)("div",{children:(0,i.jsxs)("div",{className:"guide-avatar-bob relative mx-auto w-fit shrink-0",children:[(0,i.jsx)("div",{className:"absolute -inset-2 rounded-full bg-gradient-to-br from-amber-400/20 to-orange-500/10 blur-lg","aria-hidden":"true"}),(0,i.jsx)(T.default,{src:es,alt:"","aria-hidden":"true",width:80,height:80,className:"relative h-20 w-20 rounded-full object-cover object-top"})]})}),(0,i.jsx)("h2",{className:"guide-text mt-3 text-2xl font-semibold leading-tight",children:"Hi, I'm Zeno."}),(0,i.jsx)("p",{className:"guide-text-muted mt-2.5 max-w-sm text-sm leading-6",children:"Ask me how to do something and I'll point you to the right place."}),(0,i.jsx)("div",{className:"mt-4 flex max-w-md flex-wrap items-center justify-center gap-2",children:N.map(e=>(0,i.jsx)("button",{type:"button",onClick:()=>void eM(e),className:"guide-border guide-text cursor-pointer rounded-full border px-3.5 py-1.5 text-sm font-medium transition-colors hover:border-primary/50 hover:bg-primary/10 hover:text-primary focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:e},e))})]}):(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[M.map(e=>"user"===e.role?(0,i.jsx)("div",{ref:e.id===e_?ev:void 0,className:"flex justify-end",children:(0,i.jsx)("div",{className:"guide-bubble-user max-w-[92%] whitespace-pre-wrap rounded-lg px-4 py-3 text-sm leading-6",children:e.text})},e.id):(0,i.jsxs)("div",{className:"relative flex flex-col items-start gap-2 pl-[42px]",children:[(0,i.jsx)(ed,{}),e.id===eV&&(0,i.jsx)("span",{className:"guide-text-muted -mb-1 text-xs",children:"Zeno \xb7 Support"}),(0,i.jsx)("div",{className:"guide-bubble-bot max-w-[92%] rounded-lg px-4 py-3 text-sm leading-6",children:(0,i.jsx)(eg,{text:e.text})}),(0,i.jsx)(eu,{provenance:e.readProvenance}),(0,i.jsx)(eh,{citations:e.citations,provenance:e.libraryProvenance,onOpenSource:eq}),e.destination&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ee.$,{type:"button",size:"sm",onClick:()=>eF(e.destination),title:`Go to ${e.destination.title}`,"aria-label":`Take me there: go to ${e.destination.title}`,className:"ml-1 w-fit shadow-sm",children:[(0,i.jsxs)("span",{children:["Take me to ",e.destination.title]}),(0,i.jsx)(b.A,{className:"h-4 w-4 shrink-0","aria-hidden":"true"})]}),"low"===e.destinationConfidence&&(0,i.jsx)("p",{className:"guide-text-muted ml-1 text-xs",children:"I’m less sure about this one — worth a glance before you go."})]}),e.buildHandoff&&(0,i.jsxs)("button",{type:"button",onClick:()=>eG(e),title:"Continue in Build — Zeno will pick this up","aria-label":"Build this with Zeno in Build mode",className:"guide-secondary ml-1 inline-flex w-fit items-center gap-1.5 rounded-md px-3 py-2 text-sm font-medium shadow-sm transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[(0,i.jsx)(y.A,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),(0,i.jsx)("span",{children:"Build this with Zeno"})]}),e.action&&"dismissed"!==e.actionState&&(0,i.jsx)(ef,{action:e.action,state:e.actionState??"offered",outcome:e.actionOutcome??null,onPrefill:()=>eP(e.action),onSeed:eL,onConfirm:()=>void eR(e.id,e.action),onDismiss:()=>void ez(e.id,e.action)}),e.roleHint&&e.roleHint.roles.length>0&&(0,i.jsx)("div",{className:"guide-border ml-1 w-[85%] border-l pl-3",children:(0,i.jsx)("span",{className:"guide-text-muted text-xs",children:`This is ${function(e){let t=e=>"admin"===e?`an ${e}`:`a ${e}
1`,n=e.filter(e=>"admin"===e||"manager"===e||"learner"===e);return 0===n.length?"a different":1===n.length?t(n[0]):`${t(n[0])} or ${n.slice(1).join(" or ")}`}(e.roleHint.roles)} capability, so it isn't available with your access. Someone with that role in your workspace can do it for you.`})}),e.khLinks&&e.khLinks.length>0&&(0,i.jsxs)("div",{className:"guide-border ml-1 flex w-[85%] flex-col gap-1 border-l pl-3",children:[(0,i.jsx)("span",{className:"guide-text-muted text-xs",children:"answered"===e.outcome?"There may be more on this in the Knowledge Hub:":"The Knowledge Hub may still have what you need:"}),e.khLinks.map((t,n)=>(0,i.jsxs)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"guide-link inline-flex items-center gap-1 text-xs",children:[(0,i.jsx)(w.A,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),(0,i.jsx)("span",{className:"truncate",children:t.title})]},`${e.id}-kh-${n}`))]})]},e.id)),Z&&(0,i.jsxs)("div",{className:"relative flex flex-col items-start pl-[42px]",children:[(0,i.jsx)(ed,{}),(0,i.jsx)("div",{className:"guide-bubble-bot guide-text-muted inline-flex items-center gap-2 rounded-lg px-4 py-3 text-sm",role:"status","aria-label":"Zeno is thinking",children:(0,i.jsx)("span",{className:"animate-pulse motion-reduce:animate-none",children:"Zeno is thinking…"})})]}),H&&(0,i.jsx)(ex,{error:H,onRetry:()=>Y&&void eM(Y),retryable:0===H.status||H.status>=500})]}),X&&(0,i.jsx)(eb,{state:el,canStart:null!=O,onStart:eO,onChangeSubject:e=>ec(t=>({...t,subject:e})),onChangeSummary:e=>ec(t=>({...t,summary:e})),onSubmit:eB,onDismiss:()=>{eo(!1),ec(er)}}),(0,i.jsx)("div",{ref:ey})]}),!X&&null!=O&&(0,i.jsx)("div",{className:"guide-border flex justify-center border-t px-4 py-1.5",children:(0,i.jsxs)("button",{type:"button",onClick:eW,className:"guide-secondary inline-flex items-center gap-1.5 rounded-md px-3 py-1 text-xs font-medium shadow-sm transition-colors hover:scale-[1.02] focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[(0,i.jsx)(v.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Get help"]})}),(0,i.jsx)("div",{className:"guide-border guide-surface-raised border-t p-3",children:(0,i.jsx)("div",{className:"guide-border guide-surface rounded-2xl border p-2 shadow-sm focus-within:ring-1 focus-within:ring-ring",children:(0,i.jsxs)("div",{className:"flex flex-col gap-1 p-1",children:[(0,i.jsx)("label",{htmlFor:"guide-composer",className:"sr-only",children:"Ask Zeno a question"}),(0,i.jsx)("textarea",{id:"guide-composer",ref:ep,rows:1,value:J,onChange:e=>{Q(e.target.value)},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),eM(J))},disabled:Z,placeholder:"Ask Zeno…",className:"guide-text max-h-[120px] min-h-[68px] w-full resize-none border-0 bg-transparent px-3.5 py-2.5 text-sm leading-6 placeholder:text-[var(--guide-on-surface-muted)] focus:outline-none focus:ring-0 disabled:opacity-60"}),(0,i.jsx)("div",{className:"flex items-center justify-end px-0.5",children:(0,i.jsx)("button",{type:"button",onClick:()=>void eM(J),disabled:!eU,"aria-label":"Send",className:"guide-accent grid h-9 w-9 shrink-0 place-items-center rounded-full transition-opacity focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",children:Z?(0,i.jsx)(j.A,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):(0,i.jsx)(k.A,{className:"h-4 w-4","aria-hidden":"true"})})})]})})})]});return(0,g.createPortal)((0,i.jsxs)(i.Fragment,{children:[eY,eK]}),document.body)}function ed(){return(0,i.jsx)(T.default,{src:es,alt:"","aria-hidden":"true",width:32,height:32,className:"absolute left-0 top-0.5 h-8 w-8 shrink-0 rounded-full object-cover object-top ring-2 ring-primary/50 ring-offset-2 ring-offset-popover","data-sentry-element":"Image","data-sentry-component":"ZenoMessageAvatar","data-sentry-source-file":"GuideWidget.tsx"})}function eu(e){let{provenance:t}=e,n=function(e){if(!e||!Array.isArray(e.reads))return null;let t=e.reads.filter(H);if(0===t.length)return null;let n=[];
1t.forEach(e=>{let t=Z(e.scope);t&&!n.includes(t)&&n.push(t)});let i=t.map(V).filter(e=>!!e),r=n.length?` for ${function(e){if(e.length<=80)return e;let t=e.slice(0,80),n=t.lastIndexOf(" "),i=n>40?t.slice(0,n):t;return`${i.trimEnd()}…`}(Y(n))}`:"",s=[`From your workspace data${r}`];i.length&&s.push(`showing ${Y(i)}`);let o=function(e){if("string"!=typeof e||!e.trim())return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}(e.checked_at);o&&s.push(`checked at ${o}`);let a=[];return t.forEach(e=>{let t=Z(e.basis);if(!t)return;let n=/[.!?]$/.test(t)?t:`${t}.`;a.includes(n)||a.push(n)}),{attribution:`${s.join(", ")}.`,bases:a,truncated:t.some(e=>!0===e.truncated)}}(t);return n?(0,i.jsxs)("div",{className:"guide-border ml-1 flex w-[85%] flex-col gap-1 border-l pl-3","data-sentry-component":"GuideProvenanceNote","data-sentry-source-file":"GuideWidget.tsx",children:[(0,i.jsx)("span",{className:"guide-text-muted text-xs leading-5",children:n.attribution}),n.bases.map(e=>(0,i.jsx)("span",{className:"guide-text-muted text-xs leading-5",children:e},e))]}):null}function ec(e){let{group:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"guide-text flex items-center gap-1.5 text-xs font-medium",children:[(0,i.jsx)(N.A,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true","data-sentry-element":"FileText","data-sentry-source-file":"GuideWidget.tsx"}),(0,i.jsx)("span",{className:"min-w-0 truncate",title:t.title,children:t.title})]}),t.quotes.map(e=>(0,i.jsxs)("span",{className:"guide-border guide-text-muted block border-l pl-2 text-xs italic leading-5",children:["“",e.quote,"”"]},e.snippetIndex))]})}function eh(e){let{citations:t,provenance:n,onOpenSource:s}=e,[o,a]=(0,r.useState)(!1),l=function(e,t){var n;if(!t)return null;let i=function(e){if(!e)return[];let t=[],n=new Map;return e.filter(Q).forEach(e=>{var i,r;let s="number"==typeof(i=e.cell_id)||"string"==typeof i?String(i):"";if(!s)return;let o=n.get(s);o||(o={cellId:s,title:J(e.title)||"Untitled document",cellSlug:J(e.cell_slug)||null,quotes:[]},n.set(s,o),t.push(s)),o.quotes.push({snippetIndex:"number"==typeof(r=e.snippet_index)&&Number.isFinite(r)?r:0,quote:J(e.quote)})}),t.map(e=>{let t=n.get(e);return{...t,quotes:[...t.quotes].sort((e,t)=>e.snippetIndex-t.snippetIndex)}})}(e);return 0===i.length?null:{groups:i,visibleGroups:i.slice(0,3),hiddenCount:Math.max(0,i.length-3),provenanceLine:(n=i.length,`From your workspace's documents — ${n} ${1===n?"source":"sources"}.`),warning:t.warning??null}}(t,n);if(!l)return null;let d=o?l.groups:l.visibleGroups;return(0,i.jsxs)("div",{className:"guide-border ml-1 flex w-[85%] flex-col gap-2 border-l pl-3","data-sentry-component":"GuideLibrarySourcesNote","data-sentry-source-file":"GuideWidget.tsx",children:[(0,i.jsx)("span",{className:"guide-text-muted text-xs leading-5",children:l.provenanceLine}),l.warning&&(0,i.jsx)("span",{className:"guide-text-muted text-xs leading-5",children:l.warning}),d.map(e=>{let t=(0,K.M0)({cell_slug:e.cellSlug??""});if(!t)return(0,i.jsx)("div",{className:"flex flex-col gap-1",children:(0,i.jsx)(ec,{group:e})},e.cellId);let n=(0,K.qh)(t.type);return(0,i.jsxs)("button",{type:"button",onClick:()=>s(t.cellSlug),"aria-label":`${n}: ${e.title}`,className:"guide-border flex w-full flex-col gap-1 rounded-md border bg-transparent p-2 text-left transition-colors hover:border-primary/50 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[(0,i.jsx)(ec,{group:e}),(0,i.jsx)("span",{className:"guide-accent-text self-end text-xs font-medium",children:n})]},e.cellId)}),l.hiddenCount>0&&(0,i.jsx)("button",{type:"button",onClick:()=>a(e=>!e),className:"guide-text-muted self-start text-xs font-medium underline underline-offset-2 hover:opacity-80 focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:o?"Show fewer sources":`Show ${l.hiddenCount} more source${1===l.hiddenCount?"":"s"}`})]})}let em={p:e=>{let{children:t}=e;return(0,i.jsx)("p",{className:"mb-2 last:mb-0",children:t})},strong:e=>{let{children:t}=e;return(0,i.jsx)("strong",{className:"font-semibold",children:t})},em:e=>{let{children:t}=e;return(0,i.jsx)("em",{className:"italic",children:t})},ul:e=>{let{children:t}=e;return(0,i.jsx)("ul",{className:"my-2 list-disc space-y-1 pl-5 last:mb-0",children:t})},ol:e=>{let{children:t}=e;return(0,i.jsx)("ol",{className:"my-2 list-decimal space-y-1 pl-5 last:mb-0",children:t})},li:e=>{let{children:t}=e;return(0,i.jsx)("li",{className:"leading-6",children:t})},a:e=>{let{href:t,children:n}=e;return(0,i.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"guide-link underline underline-offset-2 hover:opacity-80",children:n})},code:e=>{let{children:t}=e;return(0,i.jsx)("code",{className:"rounded bg-background px-1 py-0.5 text-[0.85em]",children:t})},pre:e=>{let{children:t}=e;return(0,i.jsx)("pre",{className:"my-2 overflow-x-auto rounded bg-background p-2 text-xs",children:t})},h1:e=>{let{children:t}=e;return(0,i.jsx)("h1",{className:"mb-1 text-base font-semibold",children:t})},h2:e=>{let{children:t}=e;return(0,i.jsx)("h2",{className:"mb-1 text-base font-semibold",children:t})},h3:e=>{let{children:t}=e;return(0,i.jsx)("h3",{className:"mb-1 text-sm font-semibold",children:t})}};function eg(e){let{text:t}=e;return t.trim()?(0,i.jsx)("div",{className:"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0","data-sentry-component":"GuideMarkdown","data-sentry-source-file":"GuideWidget.tsx",children:(0,i.jsx)(X.oz,{components:em,"data-sentry-element":"ReactMarkdown","data-sentry-source-file":"GuideWidget.tsx",children:t})}):null}function ef(e){let{action:t,state:n,outcome:r,onPrefill:s,onSeed:o,onConfirm:l,onDismiss:d}=e;if("done"===n||"failed"===n){let e=r?.succeeded??!1;return(0,i.jsxs)("div",{className:`ml-1 flex w-fit max-w-[85%] items-start gap-2 rounded-md border px-3 py-2 text-xs ${e?"guide-border":"guide-danger-box"}`,role:"status",children:[e?r?.queued?(0,i.jsx)(j.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 animate-spin","aria-hidden":"true"}):(0,i.jsx)(_.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":"true"}):(0,i.jsx)(a.A,{className:"guide-danger-text mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),(0,i.jsxs)("span",{className:"guide-text",children:[(0,i.jsx)("span",{className:"font-semibold",children:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{done:i,queued:r}=L(e);return t?n?r??"Started":i:`${i} — didn't apply`}(t.tool,e,r?.queued??!1)}),r?.text?(0,i.jsxs)(i.Fragment,{children:[" — ",r.text]}):null]})]})}if("prefill"===t.rung)return(0,i.jsxs)(ee.$,{type:"button",size:"sm",variant:"outline",onClick:s,className:"ml-1 w-fit",children:[(0,i.jsx)("span",{children:L(t.tool).doing}),(0,i.jsx)(b.A,{className:"h-4 w-4 shrink-0","aria-hidden":"true"})]});if("ask"===t.rung){let{messageText:e,seed:n}=function(e,t,n){let i=new Set(t??[]),r="string"==typeof n&&n.trim()?n.trim():"";if("edit_group"===e){if(i.has("group_id"))return{messageText:"I can make that change for you — I just need to know which group you mean. There's more than one that c
1ould match, so which should I change?",seed:""};if(i.has("change"))return{messageText:r?`I can update ${r} for you — I just need to know what to change. A new name, for example?`:"I can update that group for you — I just need to know what to change.",seed:r?`Rename ${r} to `:""}}if("move_group"===e){if(i.has("group_id"))return{messageText:"I can move a group for you — I just need to know which one. There's more than one that could match, so which should I move?",seed:""};if(i.has("new_parent_group_id"))return{messageText:r?`I can move ${r} for you — which group should it sit under? Everything beneath it moves too.`:"I can move that group for you — which group should it sit under?",seed:r?`Move ${r} under `:""}}if("move_group_members"===e){if(i.has("from_group_id")||i.has("to_group_id"))return{messageText:"I can move people between groups — I just need to know which group they are in now and which one they should end up in.",seed:""};if(i.has("all_members"))return{messageText:"I can move everyone from one group to the other, but I cannot pick out individual people yet. Shall I move all of them?",seed:r?`Move everyone from ${r} to `:"Move everyone from "}}if("bulk_edit_groups"===e){if(i.has("group_ids")||i.has("group_id"))return{messageText:"I can apply the same change to several groups at once — I just need to know which ones. Tell me their names and I'll line them up.",seed:""};if(i.has("change"))return{messageText:"I can change all of those groups together — I just need to know what to change. I can set their classification, or add and remove tags.",seed:""}}if("bulk_create_groups"===e){if(i.has("groups"))return{messageText:"I can create a batch of groups in one go — I just need the list of names, and the classification they should all have.",seed:""};if(i.has("classification"))return{messageText:"I can create those groups for you — I just need to know which classification they should all have. Every workspace has its own set, so I'd rather ask than pick the wrong one.",seed:""}}return{messageText:"I can do that for you — I just need a little more detail.",seed:""}}(t.tool,t.needs,t.subject);return(0,i.jsxs)("div",{className:"guide-border ml-1 flex w-fit max-w-[85%] flex-col gap-2 rounded-md border px-3 py-2",children:[(0,i.jsx)("p",{className:"guide-text text-xs",children:e}),n?(0,i.jsx)(ee.$,{type:"button",size:"sm",variant:"outline",onClick:()=>o(n),className:"w-fit",children:(0,i.jsxs)("span",{children:[n.trim(),"…"]})}):null]})}if("confirm"!==t.rung)return null;let u="working"===n;return"destructive"===t.risk_tier?(0,i.jsx)(ep,{action:t,working:u,onConfirm:l,onDismiss:d}):(0,i.jsxs)("div",{className:"guide-border ml-1 flex w-fit max-w-[85%] flex-col gap-2 rounded-md border px-3 py-2","data-sentry-component":"GuideActionCard","data-sentry-source-file":"GuideWidget.tsx",children:[(0,i.jsx)("p",{className:"guide-text text-xs",children:M(t.tool,t.params,t.preview)}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(ee.$,{type:"button",size:"sm",onClick:l,disabled:u,"data-sentry-element":"Button","data-sentry-source-file":"GuideWidget.tsx",children:u?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j.A,{className:"h-4 w-4 shrink-0 animate-spin","aria-hidden":"true"}),(0,i.jsx)("span",{children:"Working…"})]}):(0,i.jsx)("span",{children:L(t.tool).doing})}),(0,i.jsx)("button",{type:"button",onClick:d,disabled:u,className:"guide-text-muted rounded-md px-2 py-1 text-xs transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50",children:"No thanks"})]})]})}function ep(e){let{action:t,working:n,onConfirm:r,onDismiss:s}=e,o=function(e,t){let n=t??{};if("delete_group"===e){let e=z(n.group_name),t=R(n.member_count),i=R(n.descendant_count),r=[];if(r.push(e?`Deletes ${e} permanently.`:"Deletes this group permanently."),null!==t&&r.push(0===t?"No one is a member of it right now.":`Removes ${F(t)} from ${e||"that group"}.`),null!==i&&i>0){r.push(`${q(i)} ${1===i?"sits":"sit"} beneath it.`);let e=z(n.note);e&&r.push(e)}return r.push("If you only want it out of the way, set the group to inactive from the Groups page instead — that you can undo."),r}if("bulk_edit_groups"===e){let e=n.proposed_changes??{},t=R(e.group_count)??(Array.isArray(n.group_ids)?n.group_ids.length:null),i=z(e.classification),r=G(e.add_tags),s=G(e.remove_tags),o=[];return null!==t&&o.push(`Changes ${q(t)} in one go.`),i&&o.push(`Sets the classification on every one of them to "${i}".`),r.length&&o.push(`Adds ${D(r)} to every one of them.`),s.length&&o.push(`Removes ${D(s)} from every one of them.`),o.length>0&&o.push(`Sub-groups are not affected — only the ${null!==t?q(t):"groups"} listed change. The Groups page cascades a classification change down the tree by default;
1 this does not.`),o.push(...G(n.warnings)),o}if("move_group_members"===e){let e=z(n.from_group),t=z(n.to_group),i=R(n.affected_count),r=G(n.sample_names),s=[];if(0===i)return s.push(e?`No one is in ${e} right now, so no one would move.`:"No one would move — the group this reads from is empty."),s;if(null!==i&&e&&t?s.push(`Moves ${F(i)} out of ${e} and into ${t}.`):null!==i?s.push(`Moves ${F(i)} into a different group.`):e&&t&&s.push(`Moves people out of ${e} and into ${t}.`),r.length){let e=null===i?0:Math.max(0,i-r.length);s.push(e>0?`Including ${r.join(", ")} and ${e} more.`:`That's ${r.join(", ")}.`)}return null!==i&&i>25&&s.push("A move this size runs in the background, so it lands over the next few minutes rather than all at once."),s}return[]}(t.tool,t.preview),a=`guide-destructive-${t.action_id??"pending"}`,l=`${a}-warning`,d=`${a}-detail`;return(0,i.jsxs)("div",{className:"guide-danger-box ml-1 flex w-fit max-w-[85%] flex-col gap-2 rounded-md border px-3 py-2.5","data-sentry-component":"GuideDestructiveConfirmCard","data-sentry-source-file":"GuideWidget.tsx",children:[(0,i.jsxs)("div",{className:"flex items-start gap-2",children:[(0,i.jsx)($.A,{className:"guide-danger-text mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true","data-sentry-element":"AlertTriangle","data-sentry-source-file":"GuideWidget.tsx"}),(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsx)("span",{className:"guide-danger-text text-sm font-semibold",children:W.heading}),(0,i.jsx)("p",{id:l,className:"guide-text text-xs leading-relaxed",children:W.body})]})]}),(0,i.jsxs)("div",{id:d,className:"flex flex-col gap-1 pl-6",children:[(0,i.jsx)("span",{className:"guide-text-muted text-xs font-medium",children:"What this will do"}),o.length>0?(0,i.jsx)("ul",{className:"guide-text list-disc space-y-1 pl-4 text-xs leading-relaxed",children:o.map(e=>(0,i.jsx)("li",{children:e},e))}):(0,i.jsx)("p",{className:"guide-text text-xs leading-relaxed",children:M(t.tool,t.params,t.preview)})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(ee.$,{type:"button",size:"sm",variant:"destructive",onClick:r,disabled:n,"aria-describedby":`${l} ${d}`,"data-sentry-element":"Button","data-sentry-source-file":"GuideWidget.tsx",children:n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j.A,{className:"h-4 w-4 shrink-0 animate-spin","aria-hidden":"true"}),(0,i.jsx)("span",{children:"Working…"})]}):(0,i.jsx)("span",{children:O[t.tool]??"Yes, do this"})}),(0,i.jsx)(ee.$,{type:"button",size:"sm",variant:"outline",onClick:s,disabled:n,"data-sentry-element":"Button","data-sentry-source-file":"GuideWidget.tsx",children:(0,i.jsx)("span",{children:"Cancel"})})]})]})}function ex(e){let{error:t,onRetry:n,retryable:r}=e,{title:s,body:o}=function(e){switch(e.status){case 400:return{title:"Nothing to send yet",body:"Please type a question first."};case 401:return{title:"Your session expired",body:"Please refresh the page or sign in again to keep chatting."};case 429:return{title:"Taking a quick breather",body:e.detail||"That was a bit quick — give it a few seconds and ask again."};case 503:return{title:"Zeno is momentarily unavailable",body:e.detail||"Something went wrong reaching Zeno. Give it another try."};default:return{title:"That didn’t go through",body:e.detail||"Something went wrong sending your question. Please try again."}}}(t);return(0,i.jsxs)("div",{role:"alert",className:"guide-danger-box flex flex-col gap-2 rounded-md border px-3 py-2.5","data-sentry-component":"GuideErrorNotice","data-sentry-source-file":"GuideWidget.tsx",children:[(0,i.jsx)("span",{className:"guide-danger-text text-sm font-semibold",children:s}),(0,i.jsx)("span",{className:"guide-text-muted text-xs leading-relaxed",children:o}),r&&(0,i.jsxs)("button",{type:"button",onClick:n,className:"guide-text mt-0.5 inline-flex w-fit items-center gap-1.5 rounded-md border border-[var(--guide-border)] px-2.5 py-1 text-xs transition-colors hover:bg-accent focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[(0,i.jsx)(C.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Try again"]})]})}function eb(e){let{state:t,canStart:n,onStart:s,onChangeSubject:o,onChangeSummary:l,onSubmit:d,onDismiss:u}=e,c="submitting"===t.phase,h="bug"===t.intent,[m,g]=(0,r.useState)(!1),f=(0,r.useCallback)(()=>{let e="ticket"===t.sentChannel&&t.supportEmail?`To: ${t.supportEmail}
2
3`:"",n=`${e}${t.subject}
4
5${t.summary}`;navigator.clipboard?.writeText(n).then(()=>{g(!0),window.setTimeout(()=>g(!1),2e3)},()=>{})},[t.subject,t.summary,t.supportEmail,t.sentChannel]);return(0,i.jsxs)("div",{className:"guide-border guide-surface-raised mt-3 flex flex-col gap-3 rounded-lg border p-3","data-sentry-component":"GuideEscalationCard","data-sentry-source-file":"GuideWidget.tsx",children:[(0,i.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[h?(0,i.jsx)(S.A,{className:"guide-accent-text h-4 w-4","aria-hidden":"true"}):(0,i.jsx)(v.A,{className:"guide-accent-text h-4 w-4","aria-hidden":"true"}),(0,i.jsx)("span",{className:"guide-text text-sm font-semibold",children:h?"Report a bug":"Contact a human"})]}),(0,i.jsx)("button",{type:"button",onClick:u,"aria-label":"Dismiss",className:"guide-text-muted -my-2 -mr-2 flex h-11 w-11 items-center justify-center rounded-md transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:(0,i.jsx)(a.A,{className:"h-3.5 w-3.5","aria-hidden":"true","data-sentry-element":"X","data-sentry-source-file":"GuideWidget.tsx"})})]}),"idle"===t.phase&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"guide-text-muted text-xs leading-relaxed",children:"Do you want to talk to a human?"}),(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("button",{type:"button",onClick:()=>s("human"),disabled:!n,className:"guide-accent inline-flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm font-semibold transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)(v.A,{className:"h-4 w-4","aria-hidden":"true"}),"Talk to a human"]}),(0,i.jsxs)("button",{type:"button",onClick:()=>
5s("bug"),disabled:!n,className:"guide-text guide-border inline-flex h-11 w-full items-center justify-center gap-2 rounded-md border text-sm transition-colors hover:bg-accent focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)(S.A,{className:"h-4 w-4","aria-hidden":"true"}),"Report a bug"]})]}),(0,i.jsx)("span",{className:"guide-text-muted text-xs leading-relaxed",children:n?"A human replies by email or WhatsApp. A bug report goes straight to the Beeline product team.":"Ask Zeno a question first so we can share the context with support."})]}),"loading"===t.phase&&(0,i.jsxs)("div",{className:"guide-text-muted flex items-center gap-2 py-2 text-xs",children:[(0,i.jsx)(j.A,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Preparing your request…"]}),("editing"===t.phase||c)&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"guide-text-muted text-xs leading-relaxed",children:h?"Review and edit this, then send it. It goes straight to the Beeline product team — no email app needed.":"Review and edit this, then send it yourself from your email or WhatsApp — nothing is sent until you do."}),(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsx)("label",{htmlFor:"guide-esc-subject",className:"guide-text-muted text-xs font-medium",children:"Subject"}),(0,i.jsx)("input",{id:"guide-esc-subject",value:t.subject,onChange:e=>o(e.target.value),disabled:c,className:"guide-text guide-border-input rounded-md border bg-transparent px-3 py-2 text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-60"})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsx)("label",{htmlFor:"guide-esc-summary",className:"guide-text-muted text-xs font-medium",children:"Summary"}),(0,i.jsx)("textarea",{id:"guide-esc-summary",value:t.summary,onChange:e=>l(e.target.value),disabled:c,rows:4,className:"guide-text guide-border-input resize-none rounded-md border bg-transparent px-3 py-2 text-sm focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-60"})]}),t.contactEmail&&!h&&(0,i.jsxs)("p",{className:"guide-text-muted text-xs",children:["You’ll be sending from ",t.contactEmail,"."]}),t.error&&(0,i.jsx)("span",{role:"alert",className:"guide-danger-text text-xs",children:t.error}),(0,i.jsx)("div",{className:"flex flex-col gap-2",children:h?(0,i.jsxs)("button",{type:"button",onClick:()=>d("bug"),disabled:c,className:"guide-accent inline-flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm font-semibold transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",children:[c?(0,i.jsx)(j.A,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):(0,i.jsx)(S.A,{className:"h-4 w-4","aria-hidden":"true"}),c?"Sending report…":"Send bug report"]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{type:"button",onClick:()=>d("ticket"),disabled:c,className:"guide-accent inline-flex h-11 w-full items-center justify-center gap-2 rounded-md text-sm font-semibold transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",children:[c?(0,i.jsx)(j.A,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}):(0,i.jsx)(A.A,{className:"h-4 w-4","aria-hidden":"true"}),"Email support"]}),t.whatsappUrl&&(0,i.jsxs)("button",{type:"button",onClick:()=>d("whatsapp"),disabled:c,className:"guide-text guide-border inline-flex h-11 w-full items-center justify-center gap-2 rounded-md border text-sm transition-colors hover:bg-accent focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)(w.A,{className:"h-4 w-4","aria-hidden":"true"}),"Continue on WhatsApp"]})]})})]}),"done"===t.phase&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)("p",{className:"guide-text text-xs leading-relaxed",children:"bug"===t.sentChannel?"Thanks — your report is with the Beeline product team. There’s nothing else to send.":"whatsapp"===t.sentChannel?"WhatsApp is open with your message ready — review it there and hit send to reach the Beeline support team.":"Your email app is open with the request ready — review it and hit send to reach the Beeline support team."}),"bug"!==t.sentChannel&&(0,i.jsxs)("button",{type:"button",onClick:f,className:"guide-text guide
5-border inline-flex w-fit items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs transition-colors hover:bg-accent focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[m?(0,i.jsx)(_.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}):(0,i.jsx)(I.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}),m?"Copied":"Didn’t open? Copy the request"]})]}),"error"===t.phase&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)("span",{role:"alert",className:"guide-danger-text text-xs",children:t.error}),(0,i.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,i.jsxs)("button",{type:"button",onClick:()=>s(t.intent||"human"),className:"guide-text inline-flex w-fit items-center gap-1.5 rounded-md border border-[var(--guide-border)] px-2.5 py-1 text-xs transition-colors hover:bg-accent focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[(0,i.jsx)(C.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Try again"]}),h&&(0,i.jsxs)("button",{type:"button",onClick:()=>s("human"),className:"guide-text inline-flex w-fit items-center gap-1.5 rounded-md border border-[var(--guide-border)] px-2.5 py-1 text-xs transition-colors hover:bg-accent focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[(0,i.jsx)(v.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Talk to a human instead"]})]})]})]})}let ey="beeline-chatthing-widget-script",ew='button[data-cy="button-chatthing"]',ev=0;function ej(e){return"bottom-left"===e?"left: 20px; right: auto;":"right: 20px; left: auto;"}function ek(e,t){var n,i;let r=t&&!e.hidden;return{colour:{primaryColour:"rgb(53, 53, 53)",primaryColourInverted:"#fff",widgetColour:"rgb(17, 24, 39)",widgetColourInverted:"#fff"},botId:"9b422d6e-580f-42cc-8a34-e27cb90d5b1f",css:{iframe:`height: 100%;
6width: 100%;
7border: 0;`,widget:(n=e.position,`position: fixed;
8z-index: 999;
9height: 48px;
10width: 48px;
11border-radius: 100%;
12bottom: 20px;
13${ej(n)}
14background: rgb(17 24 39);
15color: rgb(255, 255, 255);
16box-shadow: 0px 4px 19px rgba(0,0,0,0.2);
17border: none;
18display: ${r?"flex":"none"};
19align-items: center;
20justify-content: center;
21cursor: pointer;
22overflow: hidden;
23padding: 0px;`),window:(i=e.position,`position: fixed;
24z-index: 999;
25bottom: 84px;
26${ej(i)}
27width: calc(100vw - 40px);
28height: calc(100vh - 120px);
29max-width: 400px;
30max-height: 600px;
31background: rgb(17 24 39);
32border-radius: 8px;
33box-shadow: 0px 4px 19px rgba(0,0,0,0.2);
34border: 1px solid rgba(255,255,255,0.1);
35display: none;
36overflow: hidden;`)}}}function eN(e,t,n){let i=ek(e,t),r=t&&!e.hidden,s=++ev;window.chatThingConfig=i;let o=0,a=()=>{if(s!==ev)return;o+=1;let e=document.querySelector(ew),l=document.querySelector('[data-cy="window-chatthing"]');if(n?.(!!e),e&&(e.style.cssText=i.css?.widget??""),r&&(window.chatThing?.showTrigger?.(),e&&(e.style.cssText=i.css?.widget??"")),l){let e="none"!==window.getComputedStyle(l).display;l.style.cssText=i.css?.window??"",r&&e&&(l.style.display="block")}r||(window.chatThing?.hide?.(),window.chatThing?.hideTrigger?.()),!(!t||e)&&o<12&&window.setTimeout(a,250)};a()}function e_(e){let{isAppPage:t}=e,n=s(),[o,l]=(0,r.useState)(null),[d,u]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{let e=()=>{l((0,h.IB)())},t=t=>{let n=t.detail;if(n)return void l(n);e()},n=t=>{t.key===h.AV&&e()};return e(),window.addEventListener(h.FA,t),window.addEventListener("storage",n),()=>{window.removeEventListener(h.FA,t),window.removeEventListener("storage",n)}},[]),(0,r.useEffect)(()=>{if(!o)return;if(window.chatThingConfig=ek(o,t),!t)return void eN(o,!1,u);if(document.getElementById(ey))return void eN(o,!0,u);let e=document.createElement("script");e.id=ey,e.src="https://chatthing.ai/chat-widget.js",e.async=!0,e.defer=!0,e.onload=()=>{eN(o,!0,u)},document.body.appendChild(e)},[t,o]),(0,r.useEffect)(()=>{if(o&&t){if(n){window.chatThing?.hide?.(),window.chatThing?.hideTrigger?.();let e=document.querySelector(ew);e&&(e.style.display="none");return}o.hidden||eN(o,!0,u)}},[n,o,t]),!o||!t||o.hidden||!d||n)return null;let c="bottom-left"===o.position?{left:"44px"}:{right:"44px"};return(0,i.jsx)("button",{type:"button",onClick:()=>l((0,h.lk)({...o,hidden:!0})),"aria-label":"Hide support chat",title:"Hide support chat — bring it back from the Help menu",style:{position:"fixed",zIndex:1e3,bottom:"44px",height:"24px",width:"24px",...c},className:"flex items-center justify-center rounded-full border border-border bg-background text-muted-foreground shadow-sm transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","data-sentry-component":"ChatThingInjector","data-sentry-source-file":"support-bot.tsx",children:(0,i.jsx)(a.A,{className:"h-3.5 w-3.5","aria-hidden":"true","data-sentry-element":"X","data-sentry-source-file":"support-bot.tsx"})})}function e$(){let e=(0,o.usePathname)(),t=!!((e?.startsWith("/organization/")||e?.startsWith("/o/"))&&!e?.includes("/auth/")),n=(0,r.useMemo)(()=>t&&e?e.split("/")[2]??"":"",[t,e]),{membership:s}=(0,l.A)(n),a=s?.organization?.id,h=!!(0,d.o)([u.tk.GUIDE_SUPPORT_BOT],s?.organization)[u.tk.GUIDE_SUPPORT_BOT],m=t&&h&&"number"==typeof a&&!(0,c.ZF)(e);return((0,r.useEffect)(()=>
36{if(!m)return;let e=()=>{window.chatThing?.hide?.(),window.chatThing?.hideTrigger?.(),document.querySelectorAll('[data-cy="button-chatthing"],[data-cy="window-chatthing"]').forEach(e=>e.remove())};e();let t=[250,750,1500].map(t=>window.setTimeout(e,t));return()=>t.forEach(e=>window.clearTimeout(e))},[m]),(0,c.ZF)(e))?null:m?(0,i.jsx)(el,{organizationId:a,route:e??""},a):(0,i.jsx)(e_,{isAppPage:t,"data-sentry-element":"ChatThingInjector","data-sentry-component":"SupportBot","data-sentry-source-file":"support-bot.tsx"})}},792284:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var i=n(212115),r=n(430285),s=n(822082);let o=[/ResizeObserver loop limit exceeded/i,/ResizeObserver loop completed with undelivered notifications/i],a=!1;function l(){let e=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(!e.current&&!a){if(e.current=!0,r.L.getInternalContext()){a=!0;return}r.L.init({applicationId:"5ffaa270-7d3b-43dd-a68e-d5afa45c5470",clientToken:"pub24e61558fc0657f8c78d7a080cdaa384",site:"us5.datadoghq.com",service:"webapp",env:"production",version:"0.0.1",sessionSampleRate:10,sessionReplaySampleRate:0,trackBfcacheViews:!0,trackUserInteractions:!0,trackResources:!0,defaultPrivacyLevel:"mask-user-input",beforeSend:e=>{var t;return!("error"===e.type&&(0,s.sF)(e.error.message))&&!("error"===e.type&&"string"==typeof(t=e.error.message)&&0!==t.length&&o.some(e=>e.test(t)))}}),a=!0}},[]),null}},823788:(e,t,n)=>{"use strict";n.d(t,{$m:()=>r,C5:()=>o,VP:()=>i,aZ:()=>s});let i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("function"==typeof window.gtag)try{window.gtag("event","page_view",{page_path:e,page_location:window.location?.href,page_title:document?.title,user_id:n||void 0,send_to:t})}catch(e){}},r=(e,t)=>{void 0!==window&&window?.gtag&&window?.gtag("event",e,t)},s=(e,t)=>{void 0!==window&&window?.gtag&&window?.gtag("event",e.eventName,{...t,category:e?.category})},o=function(e){var t,n;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=e.eventName,n=e.category,void 0!==window&&window?.gtag&&window?.gtag("event",t,{...r,category:n,user_id:i})}},940563:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var i=n(212115),r=n(573321),s=n(823788);function o(){let e=(0,r.usePathname)(),t=(0,r.useSearchParams)();return(0,i.useEffect)(()=>{let n=e+(t?.toString()?`?${t.toString()}`:"");try{(0,s.VP)(n,"G-Y62HB28QSY",null)}catch(e){}},[e,t]),null}},971687:(e,t,n)=>{"use strict";n.d(t,{$k:()=>d,EP:()=>l,Mn:()=>s,UQ:()=>a,ru:()=>o});let i="guide:build-handoff",r=e=>`gaps:build-handoff:${e}`;function s(e,t){try{let n={context:t,ts:Date.now()};sessionStorage.setItem(r(e),JSON.stringify(n))}catch{}}function o(e,t){let n=e.trim().slice(0,2e3);if(n)try{let e={prompt:n,ts:Date.now(),gap:t};sessionStorage.setItem(i,JSON.stringify(e))}catch{}}function a(e){try{let t=sessionStorage.getItem(i);if(null==t)return null;sessionStorage.removeItem(i);let n=JSON.parse(t);if("string"!=typeof n.prompt||"number"!=typeof n.ts||Date.now()-n.ts>3e5)return null;return e&&n.gap&&s(e,n.gap),n.prompt.trim().slice(0,2e3)||null}catch{return null}}function l(e){try{let t=sessionStorage.getItem(r(e));if(!t)return null;let n=JSON.parse(t);if(!n.context||"number"!=typeof n.ts)return null;if(Date.now()-n.ts>864e5)return sessionStorage.removeItem(r(e)),null;return n.context}catch{return null}}function d(e){try{sessionStorage.removeItem(r(e))}catch{}}},981274:(e,t,n)=>{"use strict";n.d(t,{Ge:()=>o,SC:()=>a,WN:()=>l,Zz:()=>r,ty:()=>i});let i="beeline:readiness-patch",r="beeline:guide-open",s=null,o=e=>(s=e,()=>{s===e&&(s=null)}),a=e=>{window.dispatchEvent(new CustomEvent(r,{detail:{question:e}}))},l=e=>{if(!e.selection)return`What should I do about ${e.capability} for ${e.population}?`;let{people:t,label:n}=e.selection;return`I've got ${t.toLocaleString()} ${1===t?"person":"people"} in ${e.population} who ${n.toLowerCase()} on ${e.capability}. What should I do about them?`}}},e=>{e.O(0,[23723,32077,96516,75846,65106,96408,97811,41110,94710,89933,94935,71913,91965,97926,97564,63524,60234,58568,23915,94758,92619,21951,44845,38437,67215,44855,58077,486,74963,67884,91798,17888,99003,2719,49339,41995,357,1184,7029,15210,59185,39300,98863,911,37366,44054,5198,76276,15914,44923,28292,32169,72491,19119,31594,3313,41373,45652,30556,66709,12746,21190,1528,72037,40804,26573,81555,24718,15861,62374,54822,83496,23741,84046,80260,61419,14850,28441,85224,77358],()=>e(e.s=662225)),_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.