1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5447],{93453:function(e,t,s){var n=s(52676),o=s(75271),r=s(99839),l=s(63557),a=s(24695),i=s(34774),c=s.n(i);t.Z=e=>{let{children:t}=e,{t:s}=(0,r.$G)("chat"),i=(0,o.useRef)(null),[m,x]=(0,o.useState)(!1),u=async()=>{var e,t;await navigator.clipboard.writeText(null!==(t=null===(e=i.current)||void 0===e?void 0:e.innerText)&&void 0!==t?t:""),x(!0),setTimeout(()=>x(!1),1e3)};return(0,n.jsxs)("div",{className:"relative group my-4 -ml-9 pl-9",children:[(0,n.jsx)("div",{className:"absolute left-0 top-1.5 z-10 transition-opacity opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto",children:(0,n.jsx)(a.Z,{content:s("copy"),position:"left",children:(0,n.jsx)("button",{type:"button","aria-label":s("copy"),onClick:u,className:"flex items-center text-iron-400 hover:text-iron-800",children:(0,n.jsx)(l.Z,{name:m?"check":"content_copy",size:18,flex:!0})})})}),(0,n.jsx)("pre",{ref:i,className:c().codeBlock,children:t})]})}},68834:function(e,t,s){var n=s(52676),o=s(63557),r=s(75271);t.Z=e=>{let{label:t,children:s}=e,[l,a]=(0,r.useState)(!1);return(0,n.jsxs)("div",{className:"ml-12 ".concat(l?"pb-4":""),children:[(0,n.jsxs)("div",{onClick:()=>a(!l),className:"inline-flex items-center cursor-pointer select-none text-iron-700 hover:text-iron-400 font-medium text-sm duration-200",children:[(0,n.jsx)("span",{children:t}),(0,n.jsx)("span",{className:"ml-1 inline-block transform transition-transform ".concat(l?"rotate-90":"rotate-0"),children:(0,n.jsx)(o.Z,{name:"chevron_right",size:20})})]}),l&&s]})}},12709:function(e,t,s){s.d(t,{I2:function(){return h},ze:function(){return d}});var n=s(52676),o=s(75271),r=s(23600),l=s(40715),a=s(19),i=s(63557),c=s(18327),m=s(20664),x=s(99839),u=s(4219);function d(e){let t;let s=/<protocols(?:\s+name="([^"]*)")?>([\s\S]*?)<\/protocols>/g,n=0,o=[];for(;null!==(t=s.exec(e));){if(t.index>n){let s=e.substring(n,t.index).trim();s&&o.push({content:s,isProtocol:!1})}o.push({content:t[2].trim(),isProtocol:!0,isIncomplete:!1,protocolName:t[1]||void 0}),n=s.lastIndex}let r=e.substring(n),l=r.match(/<protocols(?:\s+name="([^"]*)")?>([\s\S]*)$/);if(l){let e=r.substring(0,l.index);e.trim()&&o.push({content:e.trim(),isProtocol:!1}),o.push({content:l[2],isProtocol:!0,isIncomplete:!0,protocolName:l[1]||void 0})}else r.trim()&&o.push({content:r.trim(),isProtocol:!1});return 0===o.length&&o.push({content:e,isProtocol:!1}),o}let p=e=>{let{isOpen:t,onClose:s,copyToClipboard:r}=e,{t:l}=(0,x.$G)("chat"),a=(0,o.useRef)(null);return((0,o.useEffect)(()=>{let e=e=>{a.current&&!a.current.contains(e.target)&&s()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]),t)?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{ref:a,style:{position:"absolute",bottom:25,right:0,boxShadow:"0px 0px 16px 0px rgba(0, 0, 0, 0.15)"},className:"w-40 bg-white rounded-lg border z-50",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("button",{className:"w-full py-2 pl-4 pr-3 hover:bg-iron-100 cursor-pointer transition-colors text-black font-medium text-left flex items-center justify-between text-sm",onClick:()=>{r(),s()},children:(0,n.jsx)("span",{children:l("asMarkdown")})}),(0,n.jsx)("button",{className:"w-full py-2 pl-4 pr-3 hover:bg-iron-100 cursor-pointer transition-colors text-black font-medium text-left flex items-center justify-between text-sm",onClick:()=>{r("html"),s()},children:(0,n.jsx)("span",{children:"As HTML"})})]})}):null},h=e=>{let{content:t,isIncomplete:s=!1,protocolName:d,onOpenAsDocument:h}=e,{t:b}=(0,x.$G)("chat"),[f,y]=(0,o.useState)(!1),[j,v]=(0,o.useState)(!1),[g,N]=(0,o.useState)(!1),w=(0,o.useRef)(null),k=async e=>{if(!e){await navigator.clipboard.writeText(t),v(!0),setTimeout(()=>v(!1),1e3);return}let s=new Blob([await (0,a.TU)(t)],{type:"text/html"}),n=new Blob([t],{type:"text/plain"});try{await navigator.clipboard.write([new ClipboardItem({"text/html":s,"text/plain":n})]),v(!0),setTimeout(()=>v(!1),1e3)}catch(e){(0,m._)(e.message)}};return(0,n.jsxs)("div",{className:"protocol-block my-4 border border-gray-200 rounded-lg bg-gray-50",children:[(0,n.jsxs)("div",{className:"protocol-header flex justify-between items-center px-3 py-2 bg-gray-100 border-b border-gray-200 text-xs font-semibold",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsxs)("span",{children:["Protocol",d?": ".concat(d):""]}),s&&(0,n.jsx)("span",{className:"ml-2 flex items-center text-blue-600",children:(0,n.jsx)(c.Z,{size:"xxs",type:"black"})})]}),!s&&(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[h&&(0,n.jsxs)("button",{type:"button",className:"flex items-center gap-1 text-iron-400 hover:text-iron-800 disabled:opacity-60",disabled:f,onClick:async()=>{y(!0);try{await h(d||b("protocols.untitledDraft"))}catch(e){(0,m._)(b("protocols.openAsDocumentFailed"))}finally{y(!1)}},children:[f?(0,n.jsx)(c.Z,{size:"xxs",type:"black"}):(0,n.jsx)(i.Z,{name:"edit_document",size:16}),(0,n.jsx)("span",{children:b("protocols.openAsDocument")})]}),(0,n.jsx)(u.Z,{name:d||b("protocols.untitledDraft"),getContent:()=>t,source:"chat",variant:"compact"}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("div",{ref:w,className:"flex items-center cursor-pointer group text-iron-400 hover:text-iron-800",onClick:()=>N(!0),children:[j?(0,n.jsx)(i.Z,{name:"check",size:16}):(0,n.jsx)(i.Z,{name:"content_copy",size:16}),(0,n.jsx)("span",{className:"inline-block overflow-hidden transition-all duration-300 ease-in-out max-w-0 group-hover:max-w-[15p
1x] ml-0.5",children:(0,n.jsx)(i.Z,{name:"keyboard_arrow_down",size:12,className:"inline-block"})})]}),(0,n.jsx)(p,{isOpen:g,onClose:()=>N(!1),copyToClipboard:k})]})]})]}),(0,n.jsxs)("div",{className:"protocol-content p-4",children:[(0,n.jsx)(r.UG,{remarkPlugins:[l.Z],components:{h1:e=>{let{...t}=e;return(0,n.jsx)("h1",{className:"text-lg font-bold mb-3 text-gray-800",...t})},h2:e=>{let{...t}=e;return(0,n.jsx)("h2",{className:"text-base font-semibold mb-2 text-gray-700",...t})},h3:e=>{let{...t}=e;return(0,n.jsx)("h3",{className:"text-sm font-medium mb-2 text-gray-600",...t})},p:e=>{let{...t}=e;return(0,n.jsx)("p",{className:"mb-2 text-sm text-gray-700",...t})},ul:e=>{let{...t}=e;return(0,n.jsx)("ul",{className:"list-disc list-outside my-2 pl-5 space-y-1",...t})},ol:e=>{let{...t}=e;return(0,n.jsx)("ol",{className:"list-decimal list-outside my-2 pl-5 space-y-1",...t})},li:e=>{let{...t}=e;return(0,n.jsx)("li",{className:"text-sm text-gray-700 pl-1",...t})},strong:e=>{let{...t}=e;return(0,n.jsx)("strong",{className:"font-semibold text-gray-800",...t})}},children:t}),s&&(0,n.jsx)("span",{className:"inline-block w-2 h-4 bg-gray-400 animate-pulse ml-1"})]})]})}},36087:function(e,t,s){var n=s(52676),o=s(75271),r=s(23600),l=s(40715),a=s(19),i=s(63557),c=s(24695),m=s(20664),x=s(99839),u=s(16624),d=s(42985);t.Z=e=>{let{displayContent:t,rawContent:s,references:p,renderLink:h}=e,{t:b}=(0,x.$G)("chat"),[f,y]=(0,o.useState)(!1),[j,v]=(0,o.useState)(!1),g=()=>{y(!0),setTimeout(()=>y(!1),1e3)},N=async e=>{let t=(0,u.Bo)(s,p,!1);if(!e){await navigator.clipboard.writeText(t),g();return}try{let e=await (0,a.TU)(t);await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([t],{type:"text/plain"})})]),g()}catch(e){(0,m._)(e.message)}};return(0,n.jsxs)("div",{className:"relative group my-4 -ml-9 pl-9",children:[(0,n.jsx)("div",{className:"absolute left-0 top-1.5 transition-opacity ".concat(j?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto"),children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(c.Z,{content:b("copy"),position:"left",children:(0,n.jsxs)("button",{type:"button","aria-label":b("copy"),onClick:()=>v(e=>!e),className:"flex items-center text-iron-400 hover:text-iron-800",children:[(0,n.jsx)(i.Z,{name:f?"check":"content_copy",size:18,flex:!0}),(0,n.jsx)(i.Z,{name:"keyboard_arrow_down",size:12,flex:!0})]})}),j&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>v(!1)}),(0,n.jsxs)("div",{className:"absolute right-0 top-full mt-1 w-40 ".concat(d.$Y," py-1 z-50"),children:[(0,n.jsx)("button",{type:"button",className:"w-full py-2 pl-4 pr-3 hover:bg-iron-100 transition-colors text-black font-medium text-left text-sm",onClick:()=>{N(),v(!1)},children:b("asMarkdown")}),(0,n.jsx)("button",{type:"button",className:"w-full py-2 pl-4 pr-3 hover:bg-iron-100 transition-colors text-black font-medium text-left text-sm",onClick:()=>{N("html"),v(!1)},children:"As HTML"})]})]})]})}),(0,n.jsx)("div",{className:"overflow-x-auto w-full border border-gray-200 rounded-none",children:(0,n.jsx)(r.UG,{remarkPlugins:[l.Z],rehypePlugins:u.WH,components:{...h?{a:h}:{},table:e=>{let{...t}=e;return(0,n.jsx)("table",{className:"min-w-full",...t})},thead:e=>{let{...t}=e;return(0,n.jsx)("thead",{className:"border-b border-b-gray-200 text-left",...t})},tbody:e=>{let{...t}=e;return(0,n.jsx)("tbody",{...t})},tr:e=>{let{...t}=e;return(0,n.jsx)("tr",{className:"border-b border-b-gray-200 last:border-b-0",...t})},th:e=>{let{...t}=e;return(0,n.jsx)("th",{className:"p-4",...t})},td:e=>{let{...t}=e;return(0,n.jsx)("td",{className:"p-4 text-sm",...t})}},children:t})})]})}}}]);
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.