clawmini 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/bBmtyQMj.js → dist/web/_app/immutable/chunks/D5iV40bG.js} +1 -1
- package/dist/web/_app/immutable/chunks/{G_zz-Gou.js → vDehDcuJ.js} +1 -1
- package/{web/.svelte-kit/output/client/_app/immutable/entry/app.CJmSwntr.js → dist/web/_app/immutable/entry/app.BCSV3nrG.js} +2 -2
- package/dist/web/_app/immutable/entry/start.D4eLEZUM.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.CYS8iApT.js → 0.CUGC2p-K.js} +1 -1
- package/dist/web/_app/immutable/nodes/{1.Bli0Hqzn.js → 1.CGC_42IQ.js} +1 -1
- package/dist/web/_app/immutable/nodes/{3.Dr0ot9sV.js → 3.0arZe_Uf.js} +1 -1
- package/dist/web/_app/immutable/nodes/{4.oBhvQhcA.js → 4.ClM1bXLE.js} +1 -1
- package/dist/web/_app/immutable/nodes/{5.BBGQ_i84.js → 5.Bq2JzCEj.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +1 -1
- package/templates/environments/macos-proxy/proxy.mjs +42 -12
- package/web/.svelte-kit/ambient.d.ts +40 -98
- package/web/.svelte-kit/generated/server/internal.js +1 -1
- package/web/.svelte-kit/output/client/.vite/manifest.json +26 -26
- package/{dist/web/_app/immutable/chunks/bBmtyQMj.js → web/.svelte-kit/output/client/_app/immutable/chunks/D5iV40bG.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{G_zz-Gou.js → vDehDcuJ.js} +1 -1
- package/{dist/web/_app/immutable/entry/app.CJmSwntr.js → web/.svelte-kit/output/client/_app/immutable/entry/app.BCSV3nrG.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.D4eLEZUM.js +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.CYS8iApT.js → 0.CUGC2p-K.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.Bli0Hqzn.js → 1.CGC_42IQ.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.Dr0ot9sV.js → 3.0arZe_Uf.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{4.oBhvQhcA.js → 4.ClM1bXLE.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{5.BBGQ_i84.js → 5.Bq2JzCEj.js} +1 -1
- package/web/.svelte-kit/output/client/_app/version.json +1 -1
- package/web/.svelte-kit/output/server/chunks/internal.js +1 -1
- package/web/.svelte-kit/output/server/manifest-full.js +1 -1
- package/web/.svelte-kit/output/server/manifest.js +1 -1
- package/web/.svelte-kit/output/server/nodes/0.js +1 -1
- package/web/.svelte-kit/output/server/nodes/1.js +1 -1
- package/web/.svelte-kit/output/server/nodes/3.js +1 -1
- package/web/.svelte-kit/output/server/nodes/4.js +1 -1
- package/web/.svelte-kit/output/server/nodes/5.js +1 -1
- package/dist/web/_app/immutable/entry/start.ZpUrT2ak.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.ZpUrT2ak.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Kt,c as at,a as w,f as L,t as Jt}from"../chunks/BmRlVmv6.js";import{a as Ar}from"../chunks/DhD271EB.js";import{h as Rt,i as Hn,M as ft,t as ue,d as Bn,L as Rr,aO as Lr,k as Gn,S as Ir,aD as Cr,aK as Dr,aE as Or,J as Mr,aP as Nr,aQ as Pr,f as Ce,p as Ft,a as Ut,F as zr,r as y,w as u,G as un,c as S,I as Ne,l as Wn,n as st,D as O,aN as en,s as q,C as qe}from"../chunks/CME08kGM.js";import{s as ke,d as $r,e as qn,a as tn}from"../chunks/DMtIqaiV.js";import{l as mn,s as kn,p as nn,b as or,r as Fr,i as J}from"../chunks/B6YN0Nuq.js";import{I as xn,s as bn,a as Ur,d as Hr,c as Br,e as jn,B as Lt,h as je}from"../chunks/CK9JZLaG.js";import{i as It}from"../chunks/bBmtyQMj.js";import{a as Ze}from"../chunks/DsIToJCP.js";import"../chunks/Ck3rYNON.js";function Gr(s,e,n=!1,r=!1,t=!1,o=!1){var i=s,p="";if(n){var c=s;Rt&&(i=Hn(ft(c)))}ue(()=>{var g=Rr;if(p===(p=e()??"")){Rt&&Bn();return}if(n&&!Rt){g.nodes=null,c.innerHTML=p,p!==""&&Kt(ft(c),c.lastChild);return}if(g.nodes!==null&&(Lr(g.nodes.start,g.nodes.end),g.nodes=null),p!==""){if(Rt){Gn.data;for(var f=Bn(),b=f;f!==null&&(f.nodeType!==Ir||f.data!=="");)b=f,f=Cr(f);if(f===null)throw Dr(),Or;Kt(Gn,b),i=Hn(f);return}var v=r?Nr:t?Pr:void 0,C=Mr(r?"svg":t?"math":"template",v);C.innerHTML=p;var E=r||t?C:C.content;if(Kt(ft(E),E.lastChild),r||t)for(;ft(E);)i.before(ft(E));else i.before(E)}})}function Wr(s,e){const n=mn(e,["children","$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];xn(s,kn({name:"circle-alert"},()=>n,{get iconNode(){return r},children:(t,o)=>{var i=at(),p=Ce(i);bn(p,e,"default",{}),w(t,i)},$$slots:{default:!0}}))}function qr(s,e){const n=mn(e,["children","$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]];xn(s,kn({name:"clock"},()=>n,{get iconNode(){return r},children:(t,o)=>{var i=at(),p=Ce(i);bn(p,e,"default",{}),w(t,i)},$$slots:{default:!0}}))}function jr(s,e){const n=mn(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];xn(s,kn({name:"send"},()=>n,{get iconNode(){return r},children:(t,o)=>{var i=at(),p=Ce(i);bn(p,e,"default",{}),w(t,i)},$$slots:{default:!0}}))}const Zr=async({params:s,fetch:e,depends:n})=>{const{id:r}=s;n(`app:chat:${r}`);try{const t=await e(`/api/chats/${r}`);if(t.ok){const o=await t.json();return{id:r,messages:o}}}catch(t){console.error(t)}return{id:r,messages:[]}},Za=Object.freeze(Object.defineProperty({__proto__:null,load:Zr},Symbol.toStringTag,{value:"Module"}));var Yr=L("<textarea></textarea>");function Xr(s,e){Ft(e,!0);let n=nn(e,"ref",15,null),r=nn(e,"value",15),t=nn(e,"data-slot",3,"textarea"),o=Fr(e,["$$slots","$$events","$$legacy","ref","value","class","data-slot"]);var i=Yr();zr(i),Ur(i,p=>({"data-slot":t(),class:p,...o}),[()=>Br("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e.class)]),or(i,p=>n(p),()=>n()),Hr(i,r),w(s,i),Ut()}function vn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ve=vn();function lr(s){Ve=s}var Ye={exec:()=>null};function A(s,e=""){let n=typeof s=="string"?s:s.source,r={replace:(t,o)=>{let i=typeof o=="string"?o:o.source;return i=i.replace(pe.caret,"$1"),n=n.replace(t,i),r},getRegex:()=>new RegExp(n,e)};return r}var Vr=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),pe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}>`)},Qr=/^(?:[ \t]*(?:\n|$))+/,Kr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Jr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,es=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_n=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,cr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ur=A(cr).replace(/bull/g,_n).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ts=A(cr).replace(/bull/g,_n).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),wn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ns=/^[^\n]+/,Tn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rs=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ss=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_n).getRegex(),Ht="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",yn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,as=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",yn).replace("tag",Ht).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pr=A(wn).replace("hr",yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ht).getRegex(),is=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pr).getRegex(),Sn={blockquote:is,code:Kr,def:rs,fences:Jr,heading:es,hr:yt,html:as,lheading:ur,list:ss,newline:Qr,paragraph:pr,table:Ye,text:ns},Zn=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ht).getRegex(),os={...Sn,lheading:ts,table:Zn,paragraph:A(wn).replace("hr",yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ht).getRegex()},ls={...Sn,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ye,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(wn).replace("hr",yt).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{b as Kt,c as at,a as w,f as L,t as Jt}from"../chunks/BmRlVmv6.js";import{a as Ar}from"../chunks/DhD271EB.js";import{h as Rt,i as Hn,M as ft,t as ue,d as Bn,L as Rr,aO as Lr,k as Gn,S as Ir,aD as Cr,aK as Dr,aE as Or,J as Mr,aP as Nr,aQ as Pr,f as Ce,p as Ft,a as Ut,F as zr,r as y,w as u,G as un,c as S,I as Ne,l as Wn,n as st,D as O,aN as en,s as q,C as qe}from"../chunks/CME08kGM.js";import{s as ke,d as $r,e as qn,a as tn}from"../chunks/DMtIqaiV.js";import{l as mn,s as kn,p as nn,b as or,r as Fr,i as J}from"../chunks/B6YN0Nuq.js";import{I as xn,s as bn,a as Ur,d as Hr,c as Br,e as jn,B as Lt,h as je}from"../chunks/CK9JZLaG.js";import{i as It}from"../chunks/D5iV40bG.js";import{a as Ze}from"../chunks/DsIToJCP.js";import"../chunks/Ck3rYNON.js";function Gr(s,e,n=!1,r=!1,t=!1,o=!1){var i=s,p="";if(n){var c=s;Rt&&(i=Hn(ft(c)))}ue(()=>{var g=Rr;if(p===(p=e()??"")){Rt&&Bn();return}if(n&&!Rt){g.nodes=null,c.innerHTML=p,p!==""&&Kt(ft(c),c.lastChild);return}if(g.nodes!==null&&(Lr(g.nodes.start,g.nodes.end),g.nodes=null),p!==""){if(Rt){Gn.data;for(var f=Bn(),b=f;f!==null&&(f.nodeType!==Ir||f.data!=="");)b=f,f=Cr(f);if(f===null)throw Dr(),Or;Kt(Gn,b),i=Hn(f);return}var v=r?Nr:t?Pr:void 0,C=Mr(r?"svg":t?"math":"template",v);C.innerHTML=p;var E=r||t?C:C.content;if(Kt(ft(E),E.lastChild),r||t)for(;ft(E);)i.before(ft(E));else i.before(E)}})}function Wr(s,e){const n=mn(e,["children","$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];xn(s,kn({name:"circle-alert"},()=>n,{get iconNode(){return r},children:(t,o)=>{var i=at(),p=Ce(i);bn(p,e,"default",{}),w(t,i)},$$slots:{default:!0}}))}function qr(s,e){const n=mn(e,["children","$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]];xn(s,kn({name:"clock"},()=>n,{get iconNode(){return r},children:(t,o)=>{var i=at(),p=Ce(i);bn(p,e,"default",{}),w(t,i)},$$slots:{default:!0}}))}function jr(s,e){const n=mn(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];xn(s,kn({name:"send"},()=>n,{get iconNode(){return r},children:(t,o)=>{var i=at(),p=Ce(i);bn(p,e,"default",{}),w(t,i)},$$slots:{default:!0}}))}const Zr=async({params:s,fetch:e,depends:n})=>{const{id:r}=s;n(`app:chat:${r}`);try{const t=await e(`/api/chats/${r}`);if(t.ok){const o=await t.json();return{id:r,messages:o}}}catch(t){console.error(t)}return{id:r,messages:[]}},Za=Object.freeze(Object.defineProperty({__proto__:null,load:Zr},Symbol.toStringTag,{value:"Module"}));var Yr=L("<textarea></textarea>");function Xr(s,e){Ft(e,!0);let n=nn(e,"ref",15,null),r=nn(e,"value",15),t=nn(e,"data-slot",3,"textarea"),o=Fr(e,["$$slots","$$events","$$legacy","ref","value","class","data-slot"]);var i=Yr();zr(i),Ur(i,p=>({"data-slot":t(),class:p,...o}),[()=>Br("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e.class)]),or(i,p=>n(p),()=>n()),Hr(i,r),w(s,i),Ut()}function vn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ve=vn();function lr(s){Ve=s}var Ye={exec:()=>null};function A(s,e=""){let n=typeof s=="string"?s:s.source,r={replace:(t,o)=>{let i=typeof o=="string"?o:o.source;return i=i.replace(pe.caret,"$1"),n=n.replace(t,i),r},getRegex:()=>new RegExp(n,e)};return r}var Vr=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),pe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}>`)},Qr=/^(?:[ \t]*(?:\n|$))+/,Kr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Jr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,es=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_n=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,cr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ur=A(cr).replace(/bull/g,_n).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ts=A(cr).replace(/bull/g,_n).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),wn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ns=/^[^\n]+/,Tn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rs=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ss=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_n).getRegex(),Ht="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",yn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,as=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",yn).replace("tag",Ht).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pr=A(wn).replace("hr",yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ht).getRegex(),is=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pr).getRegex(),Sn={blockquote:is,code:Kr,def:rs,fences:Jr,heading:es,hr:yt,html:as,lheading:ur,list:ss,newline:Qr,paragraph:pr,table:Ye,text:ns},Zn=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ht).getRegex(),os={...Sn,lheading:ts,table:Zn,paragraph:A(wn).replace("hr",yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ht).getRegex()},ls={...Sn,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ye,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(wn).replace("hr",yt).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",ur).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,us=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dr=/^( {2,}|\\)\n(?!\s*$)/,ps=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,it=/[\p{P}\p{S}]/u,Bt=/[\s\p{P}\p{S}]/u,En=/[^\s\p{P}\p{S}]/u,ds=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bt).getRegex(),hr=/(?!~)[\p{P}\p{S}]/u,hs=/(?!~)[\s\p{P}\p{S}]/u,fs=/(?:[^\s\p{P}\p{S}]|~)/u,gs=A(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Vr?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),fr=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,ms=A(fr,"u").replace(/punct/g,it).getRegex(),ks=A(fr,"u").replace(/punct/g,hr).getRegex(),gr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xs=A(gr,"gu").replace(/notPunctSpace/g,En).replace(/punctSpace/g,Bt).replace(/punct/g,it).getRegex(),bs=A(gr,"gu").replace(/notPunctSpace/g,fs).replace(/punctSpace/g,hs).replace(/punct/g,hr).getRegex(),vs=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,En).replace(/punctSpace/g,Bt).replace(/punct/g,it).getRegex(),_s=A(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,it).getRegex(),ws="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ts=A(ws,"gu").replace(/notPunctSpace/g,En).replace(/punctSpace/g,Bt).replace(/punct/g,it).getRegex(),ys=A(/\\(punct)/,"gu").replace(/punct/g,it).getRegex(),Ss=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Es=A(yn).replace("(?:-->|$)","-->").getRegex(),As=A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Es).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Pt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Rs=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Pt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mr=A(/^!?\[(label)\]\[(ref)\]/).replace("label",Pt).replace("ref",Tn).getRegex(),kr=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tn).getRegex(),Ls=A("reflink|nolink(?!\\()","g").replace("reflink",mr).replace("nolink",kr).getRegex(),Yn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,An={_backpedal:Ye,anyPunctuation:ys,autolink:Ss,blockSkip:gs,br:dr,code:us,del:Ye,delLDelim:Ye,delRDelim:Ye,emStrongLDelim:ms,emStrongRDelimAst:xs,emStrongRDelimUnd:vs,escape:cs,link:Rs,nolink:kr,punctuation:ds,reflink:mr,reflinkSearch:Ls,tag:As,text:ps,url:Ye},Is={...An,link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",Pt).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pt).getRegex()},pn={...An,emStrongRDelimAst:bs,emStrongLDelim:ks,delLDelim:_s,delRDelim:Ts,url:A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Yn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Yn).getRegex()},Cs={...pn,br:A(dr).replace("{2,}","*").getRegex(),text:A(pn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ct={normal:Sn,gfm:os,pedantic:ls},gt={normal:An,gfm:pn,breaks:Cs,pedantic:Is},Ds={"&":"&","<":"<",">":">",'"':""","'":"'"},Xn=s=>Ds[s];function Le(s,e){if(e){if(pe.escapeTest.test(s))return s.replace(pe.escapeReplace,Xn)}else if(pe.escapeTestNoEncode.test(s))return s.replace(pe.escapeReplaceNoEncode,Xn);return s}function Vn(s){try{s=encodeURI(s).replace(pe.percentDecode,"%")}catch{return null}return s}function Qn(s,e){let n=s.replace(pe.findPipe,(o,i,p)=>{let c=!1,g=i;for(;--g>=0&&p[g]==="\\";)c=!c;return c?"|":" |"}),r=n.split(pe.splitPipe),t=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;t<r.length;t++)r[t]=r[t].trim().replace(pe.slashPipe,"|");return r}function mt(s,e,n){let r=s.length;if(r===0)return"";let t=0;for(;t<r&&s.charAt(r-t-1)===e;)t++;return s.slice(0,r-t)}function Os(s,e){if(s.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<s.length;r++)if(s[r]==="\\")r++;else if(s[r]===e[0])n++;else if(s[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Ms(s,e=0){let n=e,r="";for(let t of s)if(t===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=t,n++;return r}function Kn(s,e,n,r,t){let o=e.href,i=e.title||null,p=s[1].replace(t.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:s[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:i,text:p,tokens:r.inlineTokens(p)};return r.state.inLink=!1,c}function Ns(s,e,n){let r=s.match(n.other.indentCodeCompensation);if(r===null)return e;let t=r[1];return e.split(`
|
|
3
3
|
`).map(o=>{let i=o.match(n.other.beginningSpace);if(i===null)return o;let[p]=i;return p.length>=t.length?o.slice(t.length):o}).join(`
|
|
4
4
|
`)}var zt=class{options;rules;lexer;constructor(s){this.options=s||Ve}space(s){let e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(s){let e=this.rules.block.code.exec(s);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:mt(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as W,a as l,f as w,t as D}from"../chunks/BmRlVmv6.js";import{f as z,p as be,t as j,a as _e,c as r,D as v,w as e,I as J,s as o,r as a,C as N,G as xe}from"../chunks/CME08kGM.js";import{s as M,e as ye}from"../chunks/DMtIqaiV.js";import{l as oe,s as se,i as T}from"../chunks/B6YN0Nuq.js";import{I as de,s as ie,B as H,f as we,g as $e,e as Se}from"../chunks/CK9JZLaG.js";import{i as re}from"../chunks/
|
|
1
|
+
import{c as W,a as l,f as w,t as D}from"../chunks/BmRlVmv6.js";import{f as z,p as be,t as j,a as _e,c as r,D as v,w as e,I as J,s as o,r as a,C as N,G as xe}from"../chunks/CME08kGM.js";import{s as M,e as ye}from"../chunks/DMtIqaiV.js";import{l as oe,s as se,i as T}from"../chunks/B6YN0Nuq.js";import{I as de,s as ie,B as H,f as we,g as $e,e as Se}from"../chunks/CK9JZLaG.js";import{i as re}from"../chunks/D5iV40bG.js";import{P as ke,I as U}from"../chunks/Drm9vgeP.js";import"../chunks/Ck3rYNON.js";function je($,c){const b=oe(c,["children","$$slots","$$events","$$legacy"]);const u=[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]];de($,se({name:"arrow-left"},()=>b,{get iconNode(){return u},children:(h,m)=>{var p=W(),g=z(p);ie(g,c,"default",{}),l(h,p)},$$slots:{default:!0}}))}function Je($,c){const b=oe(c,["children","$$slots","$$events","$$legacy"]);const u=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];de($,se({name:"trash-2"},()=>b,{get iconNode(){return u},children:(h,m)=>{var p=W(),g=z(p);ie(g,c,"default",{}),l(h,p)},$$slots:{default:!0}}))}const Me=async({params:$,fetch:c,depends:b})=>{const{id:u}=$;b(`app:chat:${u}:cron`);let h=[];try{const m=await c(`/api/chats/${u}/cron`);m.ok&&(h=await m.json())}catch(m){console.error("Failed to load cron jobs:",m)}return{id:u,cronJobs:h}},Le=Object.freeze(Object.defineProperty({__proto__:null,load:Me},Symbol.toStringTag,{value:"Module"}));var Te=w("<!> Add Job",1),Ee=w('<div class="p-3 bg-destructive/10 text-destructive text-sm rounded-md border border-destructive/20"> </div>'),Ie=w(`<form class="p-4 border rounded-lg space-y-4 bg-card text-card-foreground shadow-sm"><div class="grid grid-cols-2 gap-4"><div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="jobId">Job ID</label> <!></div> <div class="space-y-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="jobType">Schedule Type</label> <select id="jobType" class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"><option>Cron Expression</option><option>Every (e.g. '1h', '30m')</option><option>At (ISO Date/Time)</option></select></div> <div class="space-y-2 col-span-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="jobSchedule">Schedule Expression</label> <!></div> <div class="space-y-2 col-span-2"><label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="jobMessage">Message / Command</label> <!></div></div> <div class="flex justify-end gap-2 pt-2"><!> <!></div></form>`),Pe=w('<div class="p-8 text-center text-muted-foreground border rounded-lg border-dashed">No cron jobs configured for this chat.</div>'),Ce=w('<!> <span class="sr-only">Delete</span>',1),De=w('<div class="flex items-center justify-between p-4 border rounded-lg bg-card text-card-foreground shadow-sm"><div class="space-y-1.5 overflow-hidden"><div class="font-medium flex items-center gap-2"><span class="truncate"> </span> <span class="shrink-0 px-2 py-0.5 text-[10px] uppercase font-bold tracking-wider rounded-full bg-secondary text-secondary-foreground"><!> <!> <!></span></div> <div class="text-sm text-muted-foreground font-mono bg-muted/50 p-1.5 rounded-md truncate"> </div></div> <!></div>'),Ne=w('<div class="grid gap-4"></div>'),ze=w('<div class="flex-1 overflow-y-auto p-6 h-full bg-background text-foreground"><div class="max-w-4xl mx-auto space-y-8"><div class="flex items-center gap-4"><a class="p-2 -ml-2 rounded-full hover:bg-muted text-muted-foreground hover:text-foreground transition-colors" title="Back to Chat"><!></a> <h1 class="text-2xl font-bold tracking-tight">Chat Settings</h1></div> <section class="space-y-4"><div class="flex items-center justify-between"><h2 class="text-xl font-semibold">Cron Jobs</h2> <!></div> <!> <!> <!></section></div></div>');function Ze($,c){be(c,!0);let b=xe(()=>c.data.cronJobs),u=J(!1),h=J(""),m=J(""),p=J(""),g=J("cron"),A=J(!1),O=J("");async function ne(s){if(confirm("Are you sure you want to delete this job?"))try{if(!(await fetch(`/api/chats/${c.data.id}/cron/${s}`,{method:"DELETE"})).ok)throw new Error("Failed to delete job");await re(`app:chat:${c.data.id}:cron`)}catch(t){alert(t instanceof Error?t.message:String(t))}}async function le(s){s.preventDefault(),v(A,!0),v(O,"");try{const t={id:e(h),message:e(m),schedule:{}};e(g)==="cron"?t.schedule.cron=e(p):e(g)==="every"?t.schedule.every=e(p):e(g)==="at"&&(t.schedule.at=e(p));const n=await fetch(`/api/chats/${c.data.id}/cron`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const d=await n.json();throw new Error(d.error||"Failed to add job")}v(u,!1),v(h,""),v(m,""),v(p,""),v(g,"cron"),await re(`app:chat:${c.data.id}:cron`)}catch(t){v(O,t instanceof Error?t.message:String(t),!0)}finally{v(A,!1)}}var V=ze(),X=r(V),G=r(X),L=r(G),ce=r(L);je(ce,{class:"w-5 h-5"}),a(L),N(2),a(G);var Y=o(G,2),Z=r(Y),ve=o(r(Z),2);H(ve,{variant:"outline",size:"sm",onclick:()=>v(u,!e(u)),children:(s,t)=>{var n=Te(),d=z(n);ke(d,{class:"w-4 h-4 mr-2"}),N(),l(s,n)},$$slots:{default:!0}}),a(Z);var ee=o(Z,2);{var ue=s=>{var t=Ee(),n=r(t,!0);a(t),j(()=>M(n,e(O))),l(s,t)};T(ee,s=>{e(O)&&s(ue)})}var te=o(ee,2);{var fe=s=>{var t=Ie(),n=r(t),d=r(n),_=o(r(d),2);U(_,{id:"jobId",placeholder:"e.g. daily-standup",required:!0,get value(){return e(h)},set value(f){v(h,f,!0)}}),a(d);var x=o(d,2),S=o(r(x),2),k=r(S);k.value=k.__value="cron";var I=o(k);I.value=I.__value="every";var P=o(I);P.value=P.__value="at",a(S),a(x);var E=o(x,2),K=o(r(E),2);U(K,{id:"jobSchedule",placeholder:"e.g. * * * * *, 1h, or 2024-01-01T12:00:00Z",required:!0,get value(){return e(p)},set value(f){v(p,f,!0)}}),a(E);var C=o(E,2),Q=o(r(C),2);U(Q,{id:"jobMessage",placeholder:"Command to run...",required:!0,get value(){return e(m)},set value(f){v(m,f,!0)}}),a(C),a(n);var q=o(n,2),B=r(q);H(B,{type:"button",variant:"ghost",onclick:()=>v(u,!1),children:(f,R)=>{N();var i=D("Cancel");l(f,i)},$$slots:{default:!0}});var F=o(B,2);H(F,{type:"submit",get disabled(){return e(A)},children:(f,R)=>{N();var i=D();j(()=>M(i,e(A)?"Saving...":"Save Job")),l(f,i)},$$slots:{default:!0}}),a(q),a(t),ye("submit",t,le),$e(S,()=>e(g),f=>v(g,f)),l(s,t)};T(te,s=>{e(u)&&s(fe)})}var pe=o(te,2);{var he=s=>{var t=W(),n=z(t);{var d=_=>{var x=Pe();l(_,x)};T(n,_=>{e(u)||_(d)})}l(s,t)},me=s=>{var t=Ne();Se(t,21,()=>e(b),n=>n.id,(n,d)=>{var _=De(),x=r(_),S=r(x),k=r(S),I=r(k,!0);a(k);var P=o(k,2),E=r(P);{var K=i=>{var y=D();j(()=>M(y,`cron: ${e(d).schedule.cron??""}`)),l(i,y)};T(E,i=>{e(d).schedule.cron&&i(K)})}var C=o(E,2);{var Q=i=>{var y=D();j(()=>M(y,`every: ${e(d).schedule.every??""}`)),l(i,y)};T(C,i=>{e(d).schedule.every&&i(Q)})}var q=o(C,2);{var B=i=>{var y=D();j(()=>M(y,`at: ${e(d).schedule.at??""}`)),l(i,y)};T(q,i=>{e(d).schedule.at&&i(B)})}a(P),a(S);var F=o(S,2),f=r(F);a(F),a(x);var R=o(x,2);H(R,{variant:"ghost",size:"icon",class:"shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive",onclick:()=>ne(e(d).id),children:(i,y)=>{var ae=Ce(),ge=z(ae);Je(ge,{class:"w-4 h-4"}),N(2),l(i,ae)},$$slots:{default:!0}}),a(_),j(()=>{M(I,e(d).id),M(f,`$ ${e(d).message??""}`)}),l(n,_)}),a(t),l(s,t)};T(pe,s=>{!e(b)||e(b).length===0?s(he):s(me,-1)})}a(Y),a(X),a(V),j(()=>we(L,"href",`/chats/${c.data.id??""}`)),l($,V),_e()}export{Ze as component,Le as universal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1775070844426"}
|
|
@@ -102,7 +102,7 @@ const options = {
|
|
|
102
102
|
<div class="error">
|
|
103
103
|
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
|
|
104
104
|
},
|
|
105
|
-
version_hash: "
|
|
105
|
+
version_hash: "14qufr2"
|
|
106
106
|
};
|
|
107
107
|
async function get_hooks() {
|
|
108
108
|
let handle;
|
|
@@ -10,7 +10,7 @@ return {
|
|
|
10
10
|
assets: new Set(["robots.txt"]),
|
|
11
11
|
mimeTypes: {".txt":"text/plain"},
|
|
12
12
|
_: {
|
|
13
|
-
client: {start:"_app/immutable/entry/start.
|
|
13
|
+
client: {start:"_app/immutable/entry/start.D4eLEZUM.js",app:"_app/immutable/entry/app.BCSV3nrG.js",imports:["_app/immutable/entry/start.D4eLEZUM.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/entry/app.BCSV3nrG.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/Zeh-C-mx.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
14
14
|
nodes: [
|
|
15
15
|
__memo(() => import('./nodes/0.js')),
|
|
16
16
|
__memo(() => import('./nodes/1.js')),
|
|
@@ -10,7 +10,7 @@ return {
|
|
|
10
10
|
assets: new Set(["robots.txt"]),
|
|
11
11
|
mimeTypes: {".txt":"text/plain"},
|
|
12
12
|
_: {
|
|
13
|
-
client: {start:"_app/immutable/entry/start.
|
|
13
|
+
client: {start:"_app/immutable/entry/start.D4eLEZUM.js",app:"_app/immutable/entry/app.BCSV3nrG.js",imports:["_app/immutable/entry/start.D4eLEZUM.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/entry/app.BCSV3nrG.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/Zeh-C-mx.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
|
14
14
|
nodes: [
|
|
15
15
|
__memo(() => import('./nodes/0.js')),
|
|
16
16
|
__memo(() => import('./nodes/1.js')),
|
|
@@ -8,6 +8,6 @@ export const universal = {
|
|
|
8
8
|
"load": null
|
|
9
9
|
};
|
|
10
10
|
export const universal_id = "src/routes/+layout.ts";
|
|
11
|
-
export const imports = ["_app/immutable/nodes/0.
|
|
11
|
+
export const imports = ["_app/immutable/nodes/0.CUGC2p-K.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/CK9JZLaG.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/Zeh-C-mx.js","_app/immutable/chunks/Ck-be5J2.js","_app/immutable/chunks/vDehDcuJ.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/Drm9vgeP.js","_app/immutable/chunks/DsIToJCP.js"];
|
|
12
12
|
export const stylesheets = ["_app/immutable/assets/0.C-4eziNy.css"];
|
|
13
13
|
export const fonts = [];
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
export const index = 1;
|
|
4
4
|
let component_cache;
|
|
5
5
|
export const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;
|
|
6
|
-
export const imports = ["_app/immutable/nodes/1.
|
|
6
|
+
export const imports = ["_app/immutable/nodes/1.CGC_42IQ.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/vDehDcuJ.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/DhD271EB.js"];
|
|
7
7
|
export const stylesheets = [];
|
|
8
8
|
export const fonts = [];
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
export const index = 3;
|
|
4
4
|
let component_cache;
|
|
5
5
|
export const component = async () => component_cache ??= (await import('../entries/pages/agents/_page.svelte.js')).default;
|
|
6
|
-
export const imports = ["_app/immutable/nodes/3.
|
|
6
|
+
export const imports = ["_app/immutable/nodes/3.0arZe_Uf.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/CK9JZLaG.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/Zeh-C-mx.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/Drm9vgeP.js","_app/immutable/chunks/Ck-be5J2.js"];
|
|
7
7
|
export const stylesheets = [];
|
|
8
8
|
export const fonts = [];
|
|
@@ -8,6 +8,6 @@ export const universal = {
|
|
|
8
8
|
"load": null
|
|
9
9
|
};
|
|
10
10
|
export const universal_id = "src/routes/chats/[id]/+page.ts";
|
|
11
|
-
export const imports = ["_app/immutable/nodes/4.
|
|
11
|
+
export const imports = ["_app/immutable/nodes/4.ClM1bXLE.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/CK9JZLaG.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/DsIToJCP.js"];
|
|
12
12
|
export const stylesheets = ["_app/immutable/assets/4.Cc_xwLNl.css"];
|
|
13
13
|
export const fonts = [];
|
|
@@ -8,6 +8,6 @@ export const universal = {
|
|
|
8
8
|
"load": null
|
|
9
9
|
};
|
|
10
10
|
export const universal_id = "src/routes/chats/[id]/settings/+page.ts";
|
|
11
|
-
export const imports = ["_app/immutable/nodes/5.
|
|
11
|
+
export const imports = ["_app/immutable/nodes/5.Bq2JzCEj.js","_app/immutable/chunks/BmRlVmv6.js","_app/immutable/chunks/CME08kGM.js","_app/immutable/chunks/DMtIqaiV.js","_app/immutable/chunks/B6YN0Nuq.js","_app/immutable/chunks/CK9JZLaG.js","_app/immutable/chunks/Ck3rYNON.js","_app/immutable/chunks/DpuLqk8d.js","_app/immutable/chunks/D5iV40bG.js","_app/immutable/chunks/DhD271EB.js","_app/immutable/chunks/Drm9vgeP.js"];
|
|
12
12
|
export const stylesheets = [];
|
|
13
13
|
export const fonts = [];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,a as r}from"../chunks/bBmtyQMj.js";export{o as load_css,r as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,a as r}from"../chunks/bBmtyQMj.js";export{o as load_css,r as start};
|