PageSourceSearch

https://www.takehelm.io/_next/static/chunks/46992-22fd74418d640351.js?dpl=dpl_ApXccAEj2hN3u5asCXXPfxSSrR9N

js takehelm.io collected 2026-09-24 15:04:01 UTC 16,083 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[46992],{7964:(e,t,n)=>{n.d(t,{Hk:()=>x,Ql:()=>p,R1:()=>f,Uh:()=>r,ic:()=>i,pI:()=>l});var a=n(79899);let i=["pending","confirmed_source","confirmed_extraction","confirmed_display","not_data_issue","clinical_judgment"],r=["submitted","triaged","in_progress","resolved","closed"],l=a.k5(["data_discrepancy","bug_report","feature_request","general_feedback"]),s=a.k5(r),o=a.k5(i);a.k5(["not_sent","pending","sending","delivered","failed"]);let c=a.Yj().trim().max(160).refine(e=>e.length>0),d=a.Yj().trim().max(1e4).refine(e=>e.length>0),m=a.Ik({schema_version:a.eu("helm_feedback_v1"),submission_key:a.Yj().regex(/^[0-9a-f]{64}$/).optional(),title:c,details:d,source:a.Ik({session_id:a.Yj().min(1).nullable(),channel:a.k5(["web","imessage"]),page_path:a.Yj().min(1).max(240).nullable().optional(),client_context:a.Ik({occurred_at:a.Yj().datetime(),user_agent:a.Yj().max(500),locale:a.Yj().max(40),timezone:a.Yj().max(80),viewport_width:a.ai().int(),viewport_height:a.ai().int(),device_pixel_ratio:a.ai(),release_id:a.Yj().max(100).nullable().optional()}).nullable().optional()}),consent:a.Ik({kind:a.eu("explicit_chat_confirmation"),confirmed_at:a.Yj().datetime()})}),u=a.Ik({schema_version:a.eu("helm_feedback_v2"),title:c,details:d,source:a.Ik({channel:a.eu("provider_web"),page_path:a.Yj().min(1).max(240),reporter_user_id:a.Yj().min(1),acting_user_id:a.Yj().min(1),provider_view_session_id:a.Yj().min(1)}),consent:a.Ik({kind:a.eu("explicit_provider_form_submission"),confirmed_at:a.Yj().datetime()})}),h=a.Ik({schema_version:a.eu("helm_feedback_v3"),submission_key:a.Yj().regex(/^[0-9a-f]{64}$/).optional(),title:c,details:d,source:a.Ik({channel:a.k5(["provider_web","provider_assist","provider_chat"]),page_path:a.Yj().min(1).max(240),reporter_user_id:a.Yj().min(1),acting_user_id:a.Yj().min(1),reporter_provider_id:a.Yj().min(1).nullable(),organization_id:a.Yj().min(1),subject_user_id:a.Yj().min(1).nullable(),provider_view_session_id:a.Yj().min(1).nullable(),client_context:a.Ik({occurred_at:a.Yj().datetime(),user_agent:a.Yj().max(500),locale:a.Yj().max(40),timezone:a.Yj().max(80),viewport_width:a.ai().int(),viewport_height:a.ai().int(),device_pixel_ratio:a.ai(),release_id:a.Yj().max(100).nullable().optional()}).nullable()}),consent:a.Ik({kind:a.k5(["explicit_provider_form_submission","explicit_provider_assist_confirmation","explicit_provider_chat_confirmation"]),confirmed_at:a.Yj().datetime()})});function p(e){return"resolved"===e||"closed"===e}function x(e){return"helm_feedback_v2"===e.schema_version||"helm_feedback_v3"===e.schema_version}function f(e){switch(e.source.channel){case"provider_assist":return"Patient Assist chat";case"provider_chat":return"Provider feedback chat";case"provider_web":return"Provider form";case"imessage":return"iMessage";case"web":return"TakeHelm chat"}}a.gM("schema_version",[m,u,h]),a.Ik({status:s,qualityDisposition:o.optional(),resolutionNote:a.Yj().trim().max(2e3).optional()}).superRefine((e,t)=>{p(e.status)&&!e.resolutionNote&&t.addIssue({code:"custom",path:["resolutionNote"],message:"A user-facing resolution is required when closing feedback."})})},46992:(e,t,n)=>{n.d(t,{a:()=>N});var a=n(21851),i=n(78059),r=n(45048),l=n(64191);function s(e){return(function(e){let t=e.split("\n"),n=e=>!/^\s*\|.*\|\s*$/.test(e)||/`|\\\|/.test(e)?null:e.trim().slice(1,-1).split("|").map(e=>e.trim()),a=/^:?-{3,}:?$/,i=null;for(let e=0;e<t.length;e++){let r=t[e].match(/^\s{0,3}(`{3,}|~{3,})/);if(r){i?r[1][0]===i[0]&&r[1].length>=i.length&&(i=null):i=r[1];continue}if(i||0===e||e===t.length-1||e>=2&&n(t[e-2]))continue;let l=n(t[e-1]),s=n(t[e]),o=n(t[e+1]);l&&s&&o&&!(s.length<3)&&l.length===s.length&&o.length===s.length&&s.filter(e=>a.test(e)).length===s.length-1&&s.every(e=>a.test(e)||/^[a-z]{1,3}$/i.test(e))&&(t[e]="| ".concat(s.map(e=>a.test(e)?e:"---").join(" | ")," |"))}return t.join("\n")})(e).split("\n").map(e=>/^\s*\|/.test(e)?e.replace(/<br\s*\/?>\s*[•●▪-]\s*/gi,"; ").replace(/<br\s*\/?>/gi,"; "):e.replace(/<br\s*\/?>/gi,"\n")).join("\n").split("\n").map(e=>/^\s*\|/.test(e)?e:e.replace(/ [•●▪] /g,"\n• ")).join("\n").replace(/^[•●▪] /gm,"- ")}
1function o(e){let{content:t,components:n,remarkPlugins:i,children:o}=e;return(0,a.jsxs)("div",{className:"prose prose-sm max-w-none whitespace-normal text-sm leading-relaxed [&>p:first-child]:mt-0 [&>p:last-child]:mb-0 [&_p]:my-1.5 [&_p]:text-sm [&_p]:leading-relaxed [&_p]:text-ink [&_li]:text-sm [&_li]:leading-relaxed [&_li]:text-ink [&_strong]:text-ink-strong [&_ul]:my-2 [&_ol]:my-2 [&_li]:my-1 [&_h1]:text-base [&_h2]:text-base [&_h3]:text-sm [&_h4]:text-sm [&_h1]:text-ink-strong [&_h2]:text-ink-strong [&_h3]:text-ink-strong [&_h4]:text-ink-strong [&_table]:text-sm [&_table]:leading-relaxed [&_table]:text-ink [&_pre]:whitespace-pre-wrap",children:[(0,a.jsx)(r.oz,{remarkPlugins:[l.A,...null!=i?i:[]],components:{table:e=>{let{children:t}=e;return(0,a.jsx)("div",{className:"my-3 max-w-full overflow-x-auto",children:(0,a.jsx)("table",{children:t})})},...n},children:s(t)}),o]})}var c=n(45313),d=n(33318),m=n(27583),u=n(9236),h=n(41315),p=n(85993),x=n(54538),f=n(69495);let g={data_discrepancy:"Data discrepancy",bug_report:"Bug report",feature_request:"Feature request",general_feedback:"General feedback"};function _(e){var t;let{review:n,onEdit:i,onSubmit:r,submitLabel:l="Submit report"}=e;return(0,a.jsxs)("div",{className:"rounded-xl border border-brand-200 bg-brand-50/50 p-4 text-sm",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wide text-brand-700",children:g[n.category]}),(0,a.jsx)("p",{className:"mt-1 font-semibold text-ink-strong",children:n.title})]}),(0,a.jsx)("p",{className:"whitespace-pre-wrap leading-relaxed text-ink",children:n.details}),!!(null==(t=n.attachmentNames)?void 0:t.length)&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-xs text-ink-muted",children:[(0,a.jsx)(x.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{children:n.attachmentNames.join(", ")})]})]}),(i||r)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2 border-t border-brand-100 pt-3",children:[i&&(0,a.jsxs)(h.$n,{type:"button",size:"sm",variant:"secondary",onClick:i,children:[(0,a.jsx)(f.A,{className:"mr-1.5 h-3.5 w-3.5","aria-hidden":!0}),"Edit"]}),r&&(0,a.jsx)(h.$n,{type:"button",size:"sm",onClick:r,children:l})]})]})}let b=/<!-- ACTION: (.+?) -->/,v=/<!-- ACTION: (.+?) -->/g,j=/\n*<!-- ROUND_BREAK -->\n*/g;function k(e){let{alignEnd:t}=e;return(0,a.jsxs)("span",{className:"flex items-center gap-1 text-xs text-ink-faint mt-0.5 ".concat(t?"justify-end":""),children:[(0,a.jsx)(c.A,{className:"w-2.5 h-2.5"}),"Text"]})}let w=(0,i.memo)(function(e){var t;let{content:n,streaming:r,showCursor:l,onAction:c,onEditFeedback:u,viaText:x,presentation:f}=e,[g,w]=(0,i.useState)(!1),y=n.replace(j,"\n\n"),{cleanContent:N,action:Y}=r?{cleanContent:y,action:null}:function(e){var t;let n=e.match(b);return n?{cleanContent:e.replace(v,"").trimEnd(),action:"Send Helm Feedback"===(t=n[1])?"Send TakeHelm Feedback":t}:{cleanContent:e,action:null}}(y),C=s(null!=(t=null==f?void 0:f.content)?t:N),I=r?null:(0,p.hd)(N),A=(0,i.useCallback)(async()=>{try{var e;await navigator.clipboard.writeText(null!=(e=null==f?void 0:f.copyText)?e:C),w(!0),setTimeout(()=>w(!1),2e3)}catch(e){w(!1)}},[C,null==f?void 0:f.copyText]);return(0,a.jsxs)("div",{className:"group flex flex-col",children:[(0,a.jsxs)("div",{className:"flex gap-3 max-w-2xl",children:[(0,a.jsx)("div",{className:"flex-shrink-0 w-7 h-7 rounded-full bg-brand-600 flex items-center justify-center mt-0.5",children:(0,a.jsx)("span",{className:"text-white text-xs font-bold",children:"T"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[null==f?void 0:f.notice,I?(0,a.jsx)(_,{review:I,onEdit:u?()=>u(I):void 0,onSubmit:c?()=>c(null!=Y?Y:"Send TakeHelm Feedback"):void 0}):(0,a.jsx)(o,{content:C,remarkPlugins:null==f?void 0:f.remarkPlugins,components:{a:e=>{let{children:t,href:n}=e;return(0,a.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:t})},...null==f?void 0:f.components},children:(null!=l?l:r)&&(0,a.jsx)("span",{className:"inline-block w-[3px] h-[18px] bg-brand-500 animate-pulse ml-0.5 align-text-bottom rounded-full"})}),!I&&Y&&c&&(0,a.jsx)(h.$n,{type:"button",size:"sm",onClick:()=>c(Y),className:"mt-3",children:Y}),null==f?void 0:f.footer]})]}),!r&&(0,a.jsxs)("div",{className:"ml-10 mt-1 flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:A,className:"p-1 text-ink-faint hover:text-ink-muted transition-colors cursor-pointer","aria-label":g?"Copied":"Copy message",children:g?(0,a.jsx)(d.A,{className:"w-3.5 h-3.5"}):(0,a.jsx)(m.A,{className:"w-3.5 h-3.5"})}),x&&(0,a.jsx)(k,{})]})]})}
1),y=(0,i.memo)(function(e){let{content:t,viaText:n}=e;return(0,a.jsxs)("div",{className:"flex flex-col items-end",children:[(0,a.jsx)("div",{className:"max-w-[75%] rounded-2xl rounded-br-md bg-brand-600 px-4 py-2.5 shadow-sm",children:(0,a.jsx)("p",{className:"text-sm leading-relaxed text-white whitespace-pre-wrap",children:t})}),n&&(0,a.jsx)(k,{alignEnd:!0})]})});function N(e){let{messages:t,streamingContent:n,isStreaming:r,streamingStatus:l,className:s,scrollTrigger:o,onAction:c,onEditFeedback:d,presentations:m,streamingPresentation:h}=e,p=(0,i.useRef)(null),x=(0,i.useRef)(null),f=(0,i.useRef)(!0),[g,_]=(0,i.useState)(!1),b=(0,i.useRef)(t.length),v=(0,i.useRef)(t.length),j=(0,i.useRef)(!1),k=(0,i.useCallback)(function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"smooth";null==(e=p.current)||e.scrollIntoView({behavior:t}),f.current=!0,j.current=!1,_(!1)},[]),N=(0,i.useCallback)(()=>{let e=x.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<100;f.current=t,_(!t)},[]);(0,i.useEffect)(()=>{let e=x.current;if(!e)return;let t=()=>{j.current=!0,_(!0),e.scrollTop=e.scrollTop},n=e=>{e.deltaY<0&&t()},a=()=>t();return e.addEventListener("wheel",n,{passive:!0}),e.addEventListener("touchmove",a,{passive:!0}),()=>{e.removeEventListener("wheel",n),e.removeEventListener("touchmove",a)}},[]),(0,i.useEffect)(()=>{var e,a,i;t.length>b.current?((0===b.current||(null==(e=t.at(-1))?void 0:e.role)==="user")&&(j.current=!1,_(!1)),j.current||null==(a=p.current)||a.scrollIntoView({behavior:"smooth"})):n&&!j.current&&(null==(i=p.current)||i.scrollIntoView({behavior:"smooth"})),b.current=t.length},[t,n]),(0,i.useEffect)(()=>{let e=x.current;if(!e)return;let t=new ResizeObserver(()=>{if(!j.current){var e;null==(e=p.current)||e.scrollIntoView({behavior:"instant"})}});return t.observe(e),()=>t.disconnect()},[]),(0,i.useEffect)(()=>{void 0!==o&&t.length>0&&(requestAnimationFrame(()=>{var e;null==(e=p.current)||e.scrollIntoView({behavior:"instant"})}),f.current=!0,j.current=!1,_(!1))},[o]);let Y=r&&n?n.split("\x3c!-- ROUND_BREAK --\x3e").map(e=>e.trim()).filter(Boolean):[],C=void 0!==s?"relative overflow-y-auto overscroll-contain ".concat(s).trim():"relative flex-1 overflow-y-auto overscroll-contain";return(0,a.jsxs)("div",{ref:x,onScroll:N,className:C,children:[(0,a.jsx)("style",{children:"@keyframes chat-fade-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}"}),(0,a.jsxs)("div",{className:"max-w-3xl mx-auto px-4 py-6 space-y-6",children:[t.map((e,t)=>{let n=t>=v.current;return(0,a.jsx)("div",{className:n?"animate-[chat-fade-in_150ms_ease-out]":void 0,children:"assistant"===e.role?(0,a.jsx)(w,{content:e.content,onAction:r?void 0:c,onEditFeedback:r?void 0:d,viaText:"imessage"===e.channel,presentation:null==m?void 0:m[e.id]}):(0,a.jsx)(y,{content:e.content,viaText:"imessage"===e.channel})},e.id)}),Y.map((e,t)=>(0,a.jsx)("div",{children:(0,a.jsx)(w,{content:e,streaming:!0,showCursor:t===Y.length-1,presentation:h})},"streaming-".concat(t))),r&&0===Y.length&&(0,a.jsxs)("div",{className:"flex gap-3 transition-opacity duration-150",children:[(0,a.jsx)("div",{className:"flex-shrink-0 w-7 h-7 rounded-full bg-brand-600 flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-white text-xs font-bold",children:"T"})}),l?(0,a.jsxs)("div",{className:"flex items-center gap-2 py-2 transition-opacity duration-150",children:[(0,a.jsx)("span",{className:"w-1.5 h-1.5 bg-brand-400 rounded-full animate-pulse"}),(0,a.jsx)("span",{className:"text-xs text-ink-muted italic",children:l})]}):(0,a.jsxs)("div",{className:"flex items-center gap-1.5 py-2 transition-opacity duration-150",children:[(0,a.jsx)("span",{className:"w-1.5 h-1.5 bg-ink-faint rounded-full animate-bounce [animation-delay:0ms]"}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 bg-ink-faint rounded-full animate-bounce [animation-delay:150ms]"}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 bg-ink-faint rounded-full animate-bounce [animation-delay:300ms]"})]})]}),(0,a.jsx)("div",{ref:p})]}),(0,a.jsx)("button",{type:"button",onClick:()=>k("smooth"),className:"absolute bottom-4 right-4 w-8 h-8 rounded-full bg-surface border border-hairline shadow-card flex items-center justify-center text-ink-muted hover:text-ink transition-opacity duration-200 cursor-pointer ".concat(g?"opacity-100":"opacity-0 pointer-events-none"),"aria-label":"Scroll to bottom",children:(0,a.jsx)(u.A,{className:"w-4 h-4"})})]})}}
1,85993:(e,t,n)=>{n.d(t,{hd:()=>x,C5:()=>f});var a=n(79899);let i=/\s*<!--\s*ACTION:\s*Send (?:TakeHelm|Helm|Provider) Feedback\s*-->\s*$/i,r=/^(?:ready (?:for me )?to|(?:do you )?want (?:me )?to|(?:would|do) you like me to|(?:shall|should|can|could|may) i (?:go ahead and )?|is (?:this|that|the report) (?:ready|good|okay|ok) (?:for me )?to|are you (?:ready|happy|comfortable) for me to)\s*(?:send|submit|file|retry)\b/i,l=/^(?:(?:can|could|would|will) you (?:please )?)?(?:please )?confirm\b/i,s=/\b(?:to|can|may) (?:send|submit|file|retry)\b/i,o=/\b(?:not|never|don['’]?t|cancel|wait|hold off|later|before|after|once(?! more\b)|when|until)\b/i;var c=n(7964);let d=a.Ik({category:c.pI,title:a.Yj().trim().max(160).refine(e=>e.length>0,"Add a short title."),details:a.Yj().trim().max(1e4).refine(e=>e.length>0,"Describe the feedback."),attachmentNames:a.YO(a.Yj().trim().min(1).max(240)).max(3).optional()}),m={data_discrepancy:"Data discrepancy",bug_report:"Bug report",feature_request:"Feature request",general_feedback:"General feedback"},u=new Map(Object.entries(m).flatMap(e=>{let[t,n]=e;return[[n.toLowerCase(),t],[t.toLowerCase(),t]]})),h=/(?:^|\n)\s*(?:[-*]\s*)?\*{0,2}Category(?::\*{0,2}|\*{0,2}:)/gi,p=/^(?:none|n\/?a|not applicable|no attachments?|none attached|nothing attached)$/i;function x(e){let t=e.replace(/\r\n/g,"\n"),n=function(e){let t=e.replace(i,"").trimEnd(),n=[0,...Array.from(t.matchAll(/\n/g),e=>e.index+1)];for(let e=n.length-1;e>=0;e--){let a=n[e],i=t.slice(a).trim().replace(/^\*{1,2}|\*{1,2}$/g,"");if(i.length>500)break;if(/^[^?]+\?$/.test(i)&&(r.test(i)||l.test(i)&&s.test(i))&&!o.test(i))return a}return null}(t);if(null===n)return null;let a=t.slice(0,n).trimEnd();if(1!=[...a.matchAll(h)].length)return null;let c=a.match(/(?:^|\n)\s*(?:[-*]\s*)?\*{0,2}Category(?::\*{0,2}|\*{0,2}:)\s*([^\n]+)\n+\s*(?:[-*]\s*)?\*{0,2}Title(?::\*{0,2}|\*{0,2}:)\s*([^\n]+)\n+\s*(?:[-*]\s*)?\*{0,2}Details(?::\*{0,2}|\*{0,2}:)\s*([\s\S]*)$/i);if(!c)return null;let m=c[1].trim().replace(/^\*{1,2}|\*{1,2}$/g,""),x=u.get(m.toLowerCase());if(!x)return null;let f=c[3].trim(),g=[],_=f.match(/\n+\s*(?:[-*]\s*)?\*{0,2}Attachments?(?::\*{0,2}|\*{0,2}:)\s*([^\n]+)\s*$/i);_&&(f=f.slice(0,_.index).trim(),g=function(e){let t=e.trim().replace(/^\*{1,2}|\*{1,2}$/g,"").replace(/[.!]$/,"").trim();return p.test(t)?[]:t.split(",").map(e=>e.trim()).filter(Boolean)}(_[1]));let b=d.safeParse({category:x,title:c[2],details:f,...g.length?{attachmentNames:g}:{}});return b.success?b.data:null}function f(e){var t;let n=m[e.category],a=(null==(t=e.attachmentNames)?void 0:t.length)?"\nAttachments: ".concat(e.attachmentNames.join(", ")):"";return"Category: ".concat(n,"\nTitle: ").concat(e.title,"\nDetails: ").concat(e.details).concat(a)}}}]);

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.