1import{n as e,s as t,t as n}from"./jsx-runtime-DnlWeMvz.js";import{y as r}from"./index-BxJ-yY_r.js";import{i,r as a}from"./chat-types-DPiEoBuv.js";var o=r(`sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),s=t(e(),1),c=n(),l=`ylan.home-chat.pending-draft`;function u(e,t,n){if(!(typeof window>`u`))try{window.sessionStorage.setItem(l,JSON.stringify({value:e,topic:t,background:n}))}catch{}}function d(){if(typeof window>`u`)return null;try{let e=window.sessionStorage.getItem(l);if(!e)return null;window.sessionStorage.removeItem(l);let t=JSON.parse(e);return typeof t.value!=`string`||typeof t.topic!=`string`?null:{value:t.value,topic:t.topic,...a(t.background)||i(t.background)?{background:t.background}:{}}}catch{return null}}var f=(0,s.createContext)(null);function p({children:e}){let[t,n]=(0,s.useState)(``),[r,i]=(0,s.useState)(``),[a,o]=(0,s.useState)(0),l=(0,s.useCallback)((e,t)=>{n(e),i(t),o(e=>e+1)},[]);(0,s.useEffect)(()=>{let e=d();e&&l(e.value,e.topic)},[l]);let u=(0,s.useMemo)(()=>({value:t,topic:r,focusRequest:a,setValue:n,setTopic:i,usePrompt:l}),[a,r,l,t]);return(0,c.jsx)(f.Provider,{value:u,children:e})}function m(){let e=(0,s.useContext)(f);if(!e)throw Error(`useHomeChatDraft must be used inside HomeChatDraftProvider`);return e}export{o as a,m as i,d as n,u as r,p as 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.