libre-webui 0.22.0 → 0.22.1
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/backend/dist/main.js +2 -2
- package/backend/dist/main.js.map +1 -1
- package/backend/dist/platform/jobs/domainJobHandlers.d.ts.map +1 -1
- package/backend/dist/platform/jobs/domainJobHandlers.js +5 -0
- package/backend/dist/platform/jobs/domainJobHandlers.js.map +1 -1
- package/backend/dist/platform/storage/storageFactory.d.ts +2 -0
- package/backend/dist/platform/storage/storageFactory.d.ts.map +1 -1
- package/backend/dist/platform/storage/storageFactory.js +15 -3
- package/backend/dist/platform/storage/storageFactory.js.map +1 -1
- package/backend/dist/routes/jobs.d.ts.map +1 -1
- package/backend/dist/routes/jobs.js +9 -0
- package/backend/dist/routes/jobs.js.map +1 -1
- package/backend/dist/services/pluginService.d.ts.map +1 -1
- package/backend/dist/services/pluginService.js +35 -2
- package/backend/dist/services/pluginService.js.map +1 -1
- package/backend/dist/utils/pluginUpload.d.ts.map +1 -1
- package/backend/dist/utils/pluginUpload.js +10 -7
- package/backend/dist/utils/pluginUpload.js.map +1 -1
- package/backend/dist/worker.js +2 -2
- package/backend/dist/worker.js.map +1 -1
- package/backend/package.json +1 -1
- package/frontend/dist/artifact-runtime/.build-fingerprint +1 -1
- package/frontend/dist/assets/{index-CUhEG7E2.js → index-Jtx9Amhz.js} +11 -28
- package/frontend/dist/index.html +9 -9
- package/frontend/dist/js/{ArtifactContainer-BTEDhBnv.js → ArtifactContainer-fZegtmva.js} +1 -1
- package/frontend/dist/js/{ArtifactDemoPage-B0gN3YTl.js → ArtifactDemoPage-BDBXYv9l.js} +1 -1
- package/frontend/dist/js/{ArtifactSandboxFrame-CLBXQkZs.js → ArtifactSandboxFrame-BN16NtKe.js} +2 -2
- package/frontend/dist/js/{ArtifactSlideOutPanel-CfqHPFdE.js → ArtifactSlideOutPanel-x1fS85Ww.js} +1 -1
- package/frontend/dist/js/{ChatPage-DIkAXZWA.js → ChatPage-C_pXh7WN.js} +1 -1
- package/frontend/dist/js/{FirstTimeSetup-B8phXGNA.js → FirstTimeSetup-oRrlZnBm.js} +1 -1
- package/frontend/dist/js/{GalleryPage-W4uI043I.js → GalleryPage-CV_vbE7X.js} +1 -1
- package/frontend/dist/js/{HomePage-DlxehbyO.js → HomePage-P-e7Huco.js} +1 -1
- package/frontend/dist/js/{LibreClawPage-CgD0_G_F.js → LibreClawPage-Cee06SUM.js} +1 -1
- package/frontend/dist/js/{ModelSelector-BYxJU1UV.js → ModelSelector-DXucbvrz.js} +1 -1
- package/frontend/dist/js/{ModelsPage-C4XdCKP5.js → ModelsPage-C3_fZpMM.js} +1 -1
- package/frontend/dist/js/{NotesPage-CDECOl4V.js → NotesPage-rEIPWGIb.js} +1 -1
- package/frontend/dist/js/{PersonasPage-CjSLPrgS.js → PersonasPage-BXtepFuD.js} +1 -1
- package/frontend/dist/js/{PluginUsagePage-DJOXJuH4.js → PluginUsagePage-hhu8cxsu.js} +1 -1
- package/frontend/dist/js/{RichMessageContent-Debeh6bi.js → RichMessageContent-DkiEvdSg.js} +1 -1
- package/frontend/dist/js/{SettingsModal-cUqAeYUP.js → SettingsModal-BNxCtJ51.js} +1 -1
- package/frontend/dist/js/{SystemPage-DxPw0GS7.js → SystemPage-BvvKFuoG.js} +1 -1
- package/frontend/dist/js/{UserManagementPage-CEdYFe_Z.js → UserManagementPage-BccyR7si.js} +1 -1
- package/frontend/dist/js/{WorkPage-DDVeuG_9.js → WorkPage-BgxrvY3I.js} +3 -3
- package/frontend/dist/js/{api-IzobHGND.js → api-BvPDxsUQ.js} +1 -1
- package/frontend/dist/js/{appStore-DKwC2vgn.js → appStore-DRSSjaHn.js} +2 -2
- package/frontend/dist/js/{authStore-OaTuapL7.js → authStore-BVykIRec.js} +3 -3
- package/frontend/dist/js/{chatStore-DXGUVLXD.js → chatStore-UPp5TV_t.js} +3 -3
- package/frontend/dist/js/{config-DPEEuTAe.js → config-BTlPm-cZ.js} +1 -1
- package/frontend/dist/js/{estree-ChwJsD2w.js → estree-CfYahF_d.js} +1 -1
- package/frontend/dist/js/{html-DFrVjciF.js → html-BJsDX1UZ.js} +1 -1
- package/frontend/dist/js/{markdown-FLLx7b67.js → markdown-GLyuUNig.js} +1 -1
- package/frontend/dist/js/{messageCodeStyles-CBkkZY4n.js → messageCodeStyles-BHddEFP1.js} +1 -1
- package/frontend/dist/js/{standalone-i8-5bg5p.js → standalone-Dh56V0YW.js} +1 -1
- package/frontend/dist/js/{typescript-CQ3x-Uni.js → typescript-DRy7A9w4.js} +1 -1
- package/frontend/dist/js/{ui-BHhR3Vok.js → ui-CuY4IifA.js} +2 -2
- package/frontend/dist/js/{workApi-Czu69yWS.js → workApi-DHuYNHLf.js} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-CbPDks39.js";import{S as a}from"../assets/index-
|
|
1
|
+
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-CbPDks39.js";import{S as a}from"../assets/index-Jtx9Amhz.js";var o,s,c=Object.defineProperty,l=e=>{throw TypeError(e)},u=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},f=(e,t,n)=>u(e,typeof t==`symbol`?t:t+``,n),p=(e,t,n)=>t.has(e)||l(`Cannot `+n),m=(e,t,n)=>(p(e,t,`read from private field`),n?n.call(e):t.get(e)),ee=(e,t,n)=>t.has(e)?l(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),te={};d(te,{languages:()=>fo,options:()=>ho,parsers:()=>go,printers:()=>ss});var ne=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),re=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},h=ne(`replaceAll`,function(){if(typeof this==`string`)return re});function ie(e){return this[e<0?this.length+e:e]}var g=ne(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return ie}),ae=()=>{},oe=`string`,se=`array`,ce=`cursor`,le=`indent`,ue=`align`,de=`trim`,fe=`group`,pe=`fill`,me=`if-break`,he=`indent-if-break`,ge=`line-suffix`,_e=`line-suffix-boundary`,_=`line`,ve=`label`,ye=`break-parent`,be=new Set([ce,le,ue,de,fe,pe,me,he,ge,_e,_,ve,ye]);function xe(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function Se(e){if(typeof e==`string`)return oe;if(Array.isArray(e))return se;if(!e)return;let{type:t}=e;if(be.has(t))return t}var Ce=Se,we=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function Te(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
|
|
2
2
|
Expected it to be 'string' or 'object'.`;if(Ce(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=we([...be].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
|
|
3
3
|
Expected it to be ${r}.`}var Ee=class extends Error{constructor(e){((...e)=>(super(...e),i(this,`name`,`InvalidDocError`),this))(Te(e)),this.doc=e}};function De(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){return xe(n,e,i)}function i(e){switch(Ce(e)){case se:return t(e.map(r));case pe:return t({...e,parts:e.parts.map(r)});case me:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case fe:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case ue:case le:case he:case ve:case ge:return t({...e,contents:r(e.contents)});case oe:case ce:case de:case _e:case _:case ye:return t(e);default:throw new Ee(e)}}}function v(e,t=Le){return De(e,e=>typeof e==`string`?S(t,e.split(`
|
|
4
4
|
`)):e)}var y=ae,Oe=ae,ke=ae,Ae=ae;function b(e){return y(e),{type:le,contents:e}}function je(e,t){return Ae(e),y(t),{type:ue,contents:t,n:e}}function Me(e){return je(-1/0,e)}var Ne={type:ye};function Pe(e){return ke(e),{type:pe,parts:e}}function x(e,t={}){return y(e),Oe(t.expandedStates,!0),{type:fe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Fe(e,t=``,n={}){return y(e),t!==``&&y(t),{type:me,breakContents:e,flatContents:t,groupId:n.groupId}}function Ie(e,t){return y(e),{type:he,contents:e,groupId:t.groupId,negate:t.negate}}function S(e,t){y(e),Oe(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var C={type:_},w={type:_,soft:!0},T=[{type:_,hard:!0},Ne],Le=[{type:_,hard:!0,literal:!0},Ne],Re=Object.freeze({character:`'`,codePoint:39}),ze=Object.freeze({character:`"`,codePoint:34}),Be=Object.freeze({preferred:Re,alternate:ze}),Ve=Object.freeze({preferred:ze,alternate:Re});function He(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?Be:Ve,{length:i}=e,a=0,o=0;for(let t=0;t<i;t++){let i=e.charCodeAt(t);i===n.codePoint?a++:i===r.codePoint&&o++}return(a>o?r:n).character}function Ue(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var We=(o=new WeakMap,s=new WeakSet,class{constructor(t){a(this,s),e(this,o,void 0),n(o,this,new Set(t))}getLeadingWhitespaceCount(e){let t=r(o,this),n=0;for(let r=0;r<e.length&&t.has(e.charAt(r));r++)n++;return n}getTrailingWhitespaceCount(e){let t=r(o,this),n=0;for(let r=e.length-1;r>=0&&t.has(e.charAt(r));r--)n++;return n}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return r(o,this).has(e.charAt(0))}hasTrailingWhitespace(e){return r(o,this).has(g(0,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let n=`[${Ue([...r(o,this)].join(``))}]+`,i=new RegExp(t?`(${n})`:n);return e.split(i)}hasWhitespaceCharacter(e){let t=r(o,this);return Array.prototype.some.call(e,e=>t.has(e))}hasNonWhitespaceCharacter(e){let t=r(o,this);return Array.prototype.some.call(e,e=>!t.has(e))}isWhitespaceOnly(e){let t=r(o,this);return Array.prototype.every.call(e,e=>t.has(e))}dedentString(e){let n=t(s,this,Ge).call(this,e);return n===0?e:e.split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-CbPDks39.js";import{S as a}from"../assets/index-
|
|
1
|
+
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-CbPDks39.js";import{S as a}from"../assets/index-Jtx9Amhz.js";var o,s,c,l,u,d,f,p,m=Object.create,h=Object.defineProperty,g=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,v=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,b=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},x=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0})},S=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of _(t))!y.call(e,i)&&i!==n&&h(e,i,{get:()=>t[i],enumerable:!(r=g(t,i))||r.enumerable});return e},C=(e,t,n)=>(n=e==null?{}:m(v(e)),S(t||!e||!e.__esModule?h(n,`default`,{value:e,enumerable:!0}):n,e)),w=b((e,t)=>{t.exports=m;var n=9,r=10,i=32,a=33,o=58,s=91,c=92,l=93,u=94,d=96,f=4,p=1024;function m(e){var t=this.Parser,n=this.Compiler;h(t)&&_(t,e),g(n)&&v(n)}function h(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function g(e){return!!(e&&e.prototype&&e.prototype.visitors)}function _(e,t){for(var m=t||{},h=e.prototype,g=h.blockTokenizers,_=h.inlineTokenizers,v=h.blockMethods,x=h.inlineMethods,S=g.definition,C=_.reference,w=[],T=-1,E=v.length,D;++T<E;)D=v[T],D!==`newline`&&D!==`indentedCode`&&D!==`paragraph`&&D!==`footnoteDefinition`&&w.push([D]);w.push([`footnoteDefinition`]),m.inlineNotes&&(y(x,`reference`,`inlineNote`),_.inlineNote=A),y(v,`definition`,`footnoteDefinition`),y(x,`reference`,`footnoteCall`),g.definition=M,g.footnoteDefinition=O,_.footnoteCall=k,_.reference=j,h.interruptFootnoteDefinition=w,j.locator=C.locator,k.locator=N,A.locator=P;function O(e,t,a){for(var c=this,d=c.interruptFootnoteDefinition,m=c.offset,h=t.length+1,_=0,v=[],y,x,S,C,w,T,E,D,O,k,A,j,M;_<h&&(C=t.charCodeAt(_),C===n||C===i);)_++;if(t.charCodeAt(_++)===s&&t.charCodeAt(_++)===u){for(x=_;_<h;){if(C=t.charCodeAt(_),C!==C||C===r||C===n||C===i)return;if(C===l){S=_,_++;break}_++}if(S!==void 0&&x!==S&&t.charCodeAt(_++)===o){if(a)return!0;for(y=t.slice(x,S),w=e.now(),O=0,k=0,A=_,j=[];_<h;){if(C=t.charCodeAt(_),C!==C||C===r)M={start:O,contentStart:A||_,contentEnd:_,end:_},j.push(M),C===r&&(O=_+1,k=0,A=void 0,M.end=O);else if(k!==void 0)if(C===i||C===n)k+=C===i?1:f-k%f,k>f&&(k=void 0,A=_);else{if(k<f&&M&&(M.contentStart===M.contentEnd||b(d,g,c,[e,t.slice(_,p),!0])))break;k=void 0,A=_}_++}for(_=-1,h=j.length;h>0&&(M=j[h-1],M.contentStart===M.contentEnd);)h--;for(T=e(t.slice(0,M.contentEnd));++_<h;)M=j[_],m[w.line+_]=(m[w.line+_]||0)+(M.contentStart-M.start),v.push(t.slice(M.contentStart,M.end));return E=c.enterBlock(),D=c.tokenizeBlock(v.join(``),w),E(),T({type:`footnoteDefinition`,identifier:y.toLowerCase(),label:y,children:D})}}}function k(e,t,a){var o=t.length+1,c=0,d,f,p,m;if(t.charCodeAt(c++)===s&&t.charCodeAt(c++)===u){for(f=c;c<o;){if(m=t.charCodeAt(c),m!==m||m===r||m===n||m===i)return;if(m===l){p=c,c++;break}c++}if(p!==void 0&&f!==p)return a?!0:(d=t.slice(f,p),e(t.slice(0,c))({type:`footnoteReference`,identifier:d.toLowerCase(),label:d}))}}function A(e,t,n){var r=this,i=t.length+1,a=0,o=0,f,p,m,h,g,_,v;if(t.charCodeAt(a++)===u&&t.charCodeAt(a++)===s){for(m=a;a<i;){if(p=t.charCodeAt(a),p!==p)return;if(_===void 0)if(p===c)a+=2;else if(p===s)o++,a++;else if(p===l)if(o===0){h=a,a++;break}else o--,a++;else if(p===d){for(g=a,_=1;t.charCodeAt(g+_)===d;)_++;a+=_}else a++;else if(p===d){for(g=a,v=1;t.charCodeAt(g+v)===d;)v++;a+=v,_===v&&(_=void 0),v=void 0}else a++}if(h!==void 0)return n?!0:(f=e.now(),f.column+=2,f.offset+=2,e(t.slice(0,a))({type:`footnote`,children:r.tokenizeInline(t.slice(m,h),f)}))}}function j(e,t,n){var r=0;if(t.charCodeAt(r)===a&&r++,t.charCodeAt(r)===s&&t.charCodeAt(r+1)!==u)return C.call(this,e,t,n)}function M(e,t,r){for(var a=0,o=t.charCodeAt(a);o===i||o===n;)o=t.charCodeAt(++a);if(o===s&&t.charCodeAt(a+1)!==u)return S.call(this,e,t,r)}function N(e,t){return e.indexOf(`[`,t)}function P(e,t){return e.indexOf(`^[`,t)}}function v(e){var t=e.prototype.visitors,n=` `;t.footnote=r,t.footnoteReference=i,t.footnoteDefinition=a;function r(e){return`^[`+this.all(e).join(``)+`]`}function i(e){return`[^`+(e.label||e.identifier)+`]`}function a(e){for(var t=this.all(e).join(`
|
|
2
2
|
|
|
3
3
|
`).split(`
|
|
4
4
|
`),r=0,i=t.length,a;++r<i;)a=t[r],a!==``&&(t[r]=n+a);return`[^`+(e.label||e.identifier)+`]: `+t.join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{m as t,p as n}from"./markdown-core-BmPPZiuD.js";import{t as r}from"./useTranslation-C3ei3mJq.js";import{i}from"./utils-CuC1beTY.js";import{Kt as a,Ut as o,Yt as s,nn as c,sn as l,tn as u,zt as d}from"./ui-vendor-D3Ahl1x5.js";import{t as f}from"./logger-DSXjF4ye.js";import{t as p}from"./appStore-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{m as t,p as n}from"./markdown-core-BmPPZiuD.js";import{t as r}from"./useTranslation-C3ei3mJq.js";import{i}from"./utils-CuC1beTY.js";import{Kt as a,Ut as o,Yt as s,nn as c,sn as l,tn as u,zt as d}from"./ui-vendor-D3Ahl1x5.js";import{t as f}from"./logger-DSXjF4ye.js";import{t as p}from"./appStore-DRSSjaHn.js";var m=e(t(),1),h={selection:8,impact:14,success:[10,28,12],warning:[18,42,18]},g=()=>typeof window>`u`||typeof navigator>`u`?!1:navigator.maxTouchPoints>0||window.matchMedia?.(`(pointer: coarse)`).matches===!0,_=()=>typeof navigator<`u`&&typeof navigator.vibrate==`function`&&g(),v=(e=`selection`)=>p.getState().preferences.hapticFeedbackEnabled!==!0||!_()?!1:navigator.vibrate(h[e]),y=[/^ {0,3}(?:`{3,}|~{3,})/m,/`[^`\n]+`/,/^\s{0,3}#{1,6}\s/m,/^\s{0,3}[-*+]\s/m,/^\s{0,3}\d+\.\s/m,/^\s{0,3}>\s/m,/\[[^\]]+\]\([^)]+\)/,/!\[[^\]]*]\([^)]+\)/,/\|.*\|/,/\*\*[^*]+\*\*/,/__[^_]+__/,/~~[^~]+~~/,/\\\[[\s\S]*?\\\]/,/\\\([\s\S]*?\\\)/,/\$\$[\s\S]*?\$\$/,/(^|[^$])\$[^$\n]+\$/],b=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function x(e){let t=[],n=/^( {0,3})(`{3,}|~{3,})([^\n\r]*)(?:\r?\n|$)/gm,r;for(;r=n.exec(e);){let i=r[1].length,a=r[2],o=a[0],s=r[3].trim();if(o==="`"&&s.includes("`"))continue;let c=n.lastIndex,l=RegExp(`^ {0,3}${b(o)}{${a.length},}[ \\t]*(?:\\r?\\n|$)`,`gm`);l.lastIndex=c;let u=l.exec(e),d=s.split(/\s+/)[0]||null;if(!u){t.push({start:r.index,end:e.length,codeStart:c,codeEnd:e.length,indent:i,language:d,complete:!1});break}t.push({start:r.index,end:l.lastIndex,codeStart:c,codeEnd:u.index,indent:i,language:d,complete:!0}),n.lastIndex=l.lastIndex}return t}function S(e){return/<(?:html|head|body)(?:\s|>)|<\/(?:head|body|html)\s*>/i.test(e)}function C(e,t){return e.start<t.end&&t.start<e.end}function w(e,t){let n=/^( {0,3})(<!doctype\s+html(?:\s|>|$)|<html(?:\s[^>\n\r]*)?>)/gim,r;for(;r=n.exec(e);){let n=r.index+r[1].length;if(t.some(e=>n>=e.start&&n<e.end))continue;let i=e.slice(n);if(!S(i.slice(r[2].length)))continue;let a=/<\/html\s*>/i.exec(i),o=a?n+a.index+a[0].length:e.length;return{start:r.index,end:o,codeStart:n,codeEnd:o,indent:0,language:`html`,complete:!!a}}return null}function T(e){let t=x(e),n=w(e,t);return n?[...t.filter(e=>!C(e,n)),n].sort((e,t)=>e.start-t.start):t}function E(e,t){return t===0?e:e.replace(RegExp(`^ {1,${t}}`,`gm`),``)}function D(e){return y.some(t=>t.test(e))}function O(e){let t=[],n=T(e),r=0;for(let i of n){let n=e.slice(r,i.start);n&&t.push({type:`text`,content:n}),t.push({type:`code`,language:i.language,content:E(e.slice(i.codeStart,i.codeEnd),i.indent),complete:i.complete}),r=i.end}let i=e.slice(r);return(i||t.length===0)&&t.push({type:`text`,content:i}),t}function k(e){let t=e=>e.replace(/\\\[([\s\S]*?)\\\]/g,(e,t)=>`$$${t}$$`).replace(/\\\(([\s\S]*?)\\\)/g,(e,t)=>`$${t}$`),n=e=>{let n=/`[^`\n]+`/g,r=``,i=0,a;for(;a=n.exec(e);)r+=t(e.slice(i,a.index)),r+=a[0],i=n.lastIndex;return r+t(e.slice(i))},r=x(e),i=``,a=0;for(let t of r)i+=n(e.slice(a,t.start)),i+=e.slice(t.start,t.end),a=t.end;return i+=n(e.slice(a)),i}var A=n(),j=f(`components:ui:message-code-block`),M=24,N={bash:`sh`,c:`c`,cpp:`cpp`,csharp:`cs`,css:`css`,go:`go`,html:`html`,htm:`html`,java:`java`,javascript:`js`,js:`js`,json:`json`,jsx:`jsx`,kotlin:`kt`,markdown:`md`,mermaid:`mmd`,php:`php`,python:`py`,py:`py`,ruby:`rb`,rust:`rs`,sh:`sh`,shell:`sh`,sql:`sql`,svg:`svg`,swift:`swift`,toml:`toml`,ts:`ts`,tsx:`tsx`,typescript:`ts`,xml:`xml`,yaml:`yaml`,yml:`yaml`,zsh:`sh`};function P(e,t){let n=(e||``).toLowerCase();if(n===`html`||n===`htm`)return`html`;if(n===`svg`)return`svg`;if(n===`mermaid`)return`mermaid`;let r=t.slice(0,500).toLowerCase();return(!n||n===`xml`)&&r.includes(`<svg`)?`svg`:!n&&(r.includes(`<!doctype html`)||r.includes(`<html`))?`html`:null}function F({code:e,language:t,state:n,children:f}){let{t:h}=r(),g=p(e=>e.openArtifactPanel),[_,y]=m.useState(null),[b,x]=m.useState(null),S=m.useRef(null),C=_===e,w=t||`text`,T=h(C?`artifacts.copied`:`artifacts.copy`),E=`${T}: ${w}`,D=m.useMemo(()=>e?e.split(`
|
|
2
2
|
`).length:0,[e]),O=b===null?n===`complete`&&D>M:!b,k=n===`complete`?P(t,e):null;return m.useEffect(()=>()=>{S.current!==null&&window.clearTimeout(S.current)},[]),(0,A.jsxs)(`div`,{dir:`ltr`,"data-testid":`code-block`,"data-state":n,"data-language":w,"data-collapsed":O,className:`group relative my-4 overflow-hidden rounded-xl border border-line bg-surface-subtle text-left text-ink shadow-[0_12px_32px_rgba(13,17,23,0.1)] dark:border-white/10 dark:bg-[#0D1117] dark:text-[#E6EDF3] dark:shadow-[0_12px_32px_rgba(13,17,23,0.16)]`,children:[(0,A.jsxs)(`div`,{className:`flex h-10 items-center justify-between border-b border-line bg-surface-raised/70 px-3.5 dark:border-white/10 dark:bg-white/[0.035]`,children:[(0,A.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,A.jsx)(s,{className:`h-3.5 w-3.5 shrink-0 text-ink-subtle dark:text-[#8B949E]`}),(0,A.jsx)(`span`,{className:`truncate font-mono text-[11px] font-medium lowercase tracking-[-0.01em] text-ink-muted dark:text-[#B1BAC4]`,children:w})]}),(0,A.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[n===`streaming`&&(0,A.jsx)(`span`,{role:`status`,"aria-label":h(`common.loading`),className:`flex h-7 w-7 items-center justify-center`,children:(0,A.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-400`})}),D>M&&(0,A.jsx)(`button`,{type:`button`,onClick:()=>x(O),className:`flex h-7 w-7 items-center justify-center rounded-md text-ink-subtle transition-colors hover:bg-surface-subtle hover:text-ink focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/70 dark:text-[#8B949E] dark:hover:bg-white/[0.08] dark:hover:text-[#E6EDF3]`,title:h(O?`artifacts.expand`:`artifacts.collapse`),"aria-label":h(O?`artifacts.expand`:`artifacts.collapse`),"aria-expanded":!O,children:O?(0,A.jsx)(u,{className:`h-3.5 w-3.5`}):(0,A.jsx)(c,{className:`h-3.5 w-3.5`})}),(0,A.jsx)(`button`,{type:`button`,onClick:()=>{if(!e)return;let n=N[(t||``).toLowerCase()]||`txt`,r=new Blob([e],{type:`text/plain;charset=utf-8`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`snippet.${n}`,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)},disabled:!e,className:`flex h-7 w-7 items-center justify-center rounded-md text-ink-subtle transition-colors hover:bg-surface-subtle hover:text-ink focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/70 disabled:cursor-default disabled:opacity-35 dark:text-[#8B949E] dark:hover:bg-white/[0.08] dark:hover:text-[#E6EDF3]`,title:h(`common.download`),"aria-label":`${h(`common.download`)}: ${w}`,children:(0,A.jsx)(o,{className:`h-3.5 w-3.5`})}),k&&(0,A.jsx)(`button`,{type:`button`,onClick:()=>{if(!k||!e)return;let t=Date.now();g({id:i(),type:k,title:`${w} ${h(`artifacts.preview`)}`,content:e,language:w,createdAt:t,updatedAt:t})},className:`flex h-7 w-7 items-center justify-center rounded-md text-ink-subtle transition-colors hover:bg-surface-subtle hover:text-ink focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/70 dark:text-[#8B949E] dark:hover:bg-white/[0.08] dark:hover:text-[#E6EDF3]`,title:h(`artifacts.preview`),"aria-label":`${h(`artifacts.preview`)}: ${w}`,children:(0,A.jsx)(d,{className:`h-3.5 w-3.5`})}),(0,A.jsx)(`button`,{type:`button`,onClick:async()=>{if(e)try{await navigator.clipboard.writeText(e),v(`success`),y(e),S.current!==null&&window.clearTimeout(S.current),S.current=window.setTimeout(()=>{y(null),S.current=null},2e3)}catch(e){j.error(`Failed to copy code:`,e)}},disabled:!e,className:`flex h-7 w-7 items-center justify-center rounded-md text-ink-subtle transition-colors hover:bg-surface-subtle hover:text-ink focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/70 disabled:cursor-default disabled:opacity-35 dark:text-[#8B949E] dark:hover:bg-white/[0.08] dark:hover:text-[#E6EDF3]`,title:T,"aria-label":E,children:C?(0,A.jsx)(l,{className:`h-3.5 w-3.5 text-green-400`}):(0,A.jsx)(a,{className:`h-3.5 w-3.5`})}),(0,A.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:C?E:``})]})]}),O?(0,A.jsx)(`button`,{type:`button`,onClick:()=>x(!0),className:`block w-full px-3.5 py-2.5 text-left font-mono text-[11px] italic text-ink-subtle transition-colors hover:bg-surface-raised/70 hover:text-ink dark:text-[#8B949E] dark:hover:bg-white/[0.035] dark:hover:text-[#E6EDF3]`,children:h(`chatMessage.hiddenLines`,{count:D})}):f]})}var I=`#0D1117`,L=`rgb(var(--color-surface-subtle))`,R=`max-h-[60vh] min-h-12 overflow-auto bg-surface-subtle p-4 text-left font-mono text-[14px] leading-6 text-ink whitespace-pre tabular-nums dark:bg-[#0D1117] dark:text-[#E6EDF3]`,z={maxHeight:`60vh`,minHeight:`3rem`,overflow:`auto`,padding:`1rem`,fontSize:`14px`,lineHeight:`1.5rem`,fontFamily:`"JetBrains Mono", ui-monospace, SFMono-Regular, monospace`,whiteSpace:`pre`};export{F as a,D as c,z as i,v as l,L as n,O as o,R as r,k as s,I as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-CbPDks39.js";import{S as a}from"../assets/index-
|
|
1
|
+
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-CbPDks39.js";import{S as a}from"../assets/index-Jtx9Amhz.js";var o,s,c,l,u,d,f,p=Object.defineProperty,m=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},h={};m(h,{__debug:()=>mo,check:()=>fo,doc:()=>Ea,format:()=>uo,formatWithCursor:()=>lo,getSupportInfo:()=>po,util:()=>ja,version:()=>Aa});var g=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),_=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},v=g(`replaceAll`,function(){if(typeof this==`string`)return _}),ee=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},te=new class extends ee{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function ne(e,t,n){return te.diff(e,t,n)}var re=()=>{},ie=`cr`,ae=`crlf`,oe=`lf`,se=`\r`,ce=`\r
|
|
2
2
|
`,le=`
|
|
3
3
|
`,ue=le;function de(e){let t=e.indexOf(se);return t===-1?oe:e.charAt(t+1)===le?ae:ie}function fe(e){return e===ie?se:e===ae?ce:ue}var pe=new Map([[le,/\n/g],[se,/\r/g],[ce,/\r\n/g]]);function me(e,t){let n=pe.get(t);return e.match(n)?.length??0}var he=/\r\n?/g;function ge(e){return v(0,e,he,le)}var _e=Symbol.for(`comments`);function ve(e){return this[e<0?this.length+e:e]}var y=g(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return ve}),b=`string`,x=`array`,S=`cursor`,C=`indent`,w=`align`,T=`trim`,E=`group`,D=`fill`,O=`if-break`,k=`indent-if-break`,A=`line-suffix`,j=`line-suffix-boundary`,M=`line`,N=`label`,P=`break-parent`,ye=new Set([S,C,w,T,E,D,O,k,A,j,M,N,P]);function be(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===`
|
|
4
4
|
`);)t--;return t<e.length?e.slice(0,t):e}function xe(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function Se(e){if(typeof e==`string`)return b;if(Array.isArray(e))return x;if(!e)return;let{type:t}=e;if(ye.has(t))return t}var F=Se,Ce=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function we(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as e,p as t}from"./router-vendor-CbPDks39.js";import{S as n}from"../assets/index-
|
|
1
|
+
import{g as e,p as t}from"./router-vendor-CbPDks39.js";import{S as n}from"../assets/index-Jtx9Amhz.js";var r,i=Object.defineProperty,a=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},o={};a(o,{parsers:()=>s});var s={};a(s,{typescript:()=>Qm});var c=()=>()=>{},l=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),u=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},d=l(`replaceAll`,function(){if(typeof this==`string`)return u}),f=`6.0`,p=[],m=new Map;function h(e){return e===void 0?0:e.length}function ee(e,t){if(e!==void 0)for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r)return r}}function te(e,t){if(e!==void 0)for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!==void 0)return r}}function ne(e,t,n){let r=[];T.assertEqual(e.length,t.length);for(let i=0;i<e.length;i++)r.push(n(e[i],t[i],i));return r}function re(e,t){if(e!==void 0){for(let n=0;n<e.length;n++)if(!t(e[n],n))return!1}return!0}function g(e,t,n){if(e!==void 0)for(let r=n??0;r<e.length;r++){let n=e[r];if(t(n,r))return n}}function _(e,t,n){if(e===void 0)return-1;for(let r=n??0;r<e.length;r++)if(t(e[r],r))return r;return-1}function v(e,t,n=Ie){if(e!==void 0){for(let r=0;r<e.length;r++)if(n(e[r],t))return!0}return!1}function y(e,t){if(e!==void 0){let n=e.length,r=0;for(;r<n&&t(e[r]);)r++;if(r<n){let i=e.slice(0,r);for(r++;r<n;){let n=e[r];t(n)&&i.push(n),r++}return i}}return e}function b(e,t){let n;if(e!==void 0){n=[];for(let r=0;r<e.length;r++)n.push(t(e[r],r))}return n}function x(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r&&(Oe(r)?S(t,r):t.push(r))}return t}function ie(e,t){let n;if(e!==void 0)for(let r=0;r<e.length;r++){let i=t(e[r],r);i&&(n=Oe(i)?S(n,i):ue(n,i))}return n??p}function ae(e,t){let n;if(e!==void 0)for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r);(n||i!==a||Oe(a))&&(n||(n=e.slice(0,r)),Oe(a)?S(n,a):n.push(a))}return n??e}function oe(e,t){let n=[];if(e!==void 0)for(let r=0;r<e.length;r++){let i=t(e[r],r);i!==void 0&&n.push(i)}return n}function se(e,t){if(e!==void 0)if(t!==void 0){for(let n=0;n<e.length;n++)if(t(e[n]))return!0}else return e.length>0;return!1}function ce(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function le(e,t,n=Ie){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r],r))return!1;return!0}function ue(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function de(e,t){return t<0?e.length+t:t}function S(e,t,n,r){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(n,r);n=n===void 0?0:de(t,n),r=r===void 0?t.length:de(t,r);for(let i=n;i<r&&i<t.length;i++)t[i]!==void 0&&e.push(t[i]);return e}function fe(e,t,n){return!v(e,t,n)&&(e.push(t),!0)}function pe(e,t,n){return e===void 0?[t]:(fe(e,t,n),e)}function me(e,t){return e.length===0?p:e.slice().sort(t)}Array.prototype.at;function he(e){return e===void 0||e.length===0?void 0:e[0]}function ge(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function _e(e){return T.assert(e.length!==0),e[e.length-1]}function ve(e){return e!==void 0&&e.length===1?e[0]:void 0}function ye(e,t,n,r,i){return be(e,n(t),n,r,i)}function be(e,t,n,r,i){if(!se(e))return-1;let a=i??0,o=e.length-1;for(;a<=o;){let i=a+(o-a>>1),s=n(e[i],i);switch(Math.sign(r(s,t))){case-1:a=i+1;break;case 0:return i;case 1:o=i-1}}return~a}function xe(e,t,n,r,i){if(e&&e.length>0){let a=e.length;if(a>0){let o=r===void 0||r<0?0:r,s=i===void 0||o+i>a-1?a-1:o+i,c;for(arguments.length<=2?(c=e[o],o++):c=n;o<=s;)c=t(c,e[o],o),o++;return c}}return n}var Se=Object.prototype.hasOwnProperty;function Ce(e,t){return Se.call(e,t)}function we(e){let t=[];for(let n in e)Se.call(e,n)&&t.push(n);return t}function Te(){let e=new Map;return e.add=Ee,e.remove=De,e}function Ee(e,t){let n=this.get(e);return n===void 0?this.set(e,n=[t]):n.push(t),n}function De(e,t){let n=this.get(e);n!==void 0&&(Ge(n,t),n.length||this.delete(e))}function Oe(e){return Array.isArray(e)}function ke(e){return Oe(e)?e:[e]}function C(e,t){return e!==void 0&&t(e)?e:void 0}function Ae(e,t){return e!==void 0&&t(e)?e:T.fail(`Invalid cast. The supplied value ${e} did not pass the test '${T.getFunctionName(t)}'.`)}function je(e){}function Me(){return!0}function Ne(e){return e}function Pe(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Fe(e){let t=new Map;return n=>{let r=`${typeof n}:${n}`,i=t.get(r);return i===void 0&&!t.has(r)&&(i=e(n),t.set(r,i)),i}}function Ie(e,t){return e===t}function Le(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Re(e,t){return Ie(e,t)}function ze(e,t){return e===t?0:e===void 0?-1:t===void 0?1:e<t?-1:1}function w(e,t){return ze(e,t)}function Be(e,t,n){for(let r=0;r<e.length;r++)t=Math.max(t,n(e[r]));return t}function Ve(e,t,n){let r=Math.max(2,Math.floor(e.length*.34)),i=Math.floor(e.length*.4)+1,a;for(let o of t){let t=n(o);if(t!==void 0&&Math.abs(t.length-e.length)<=r){if(t===e||t.length<3&&t.toLowerCase()!==e.toLowerCase())continue;let n=He(e,t,i-.1);if(n===void 0)continue;T.assert(n<i),i=n,a=o}}return a}function He(e,t,n){let r=Array(t.length+1),i=Array(t.length+1),a=n+.01;for(let e=0;e<=t.length;e++)r[e]=e;for(let o=1;o<=e.length;o++){let s=e.charCodeAt(o-1),c=Math.ceil(o>n?o-n:1),l=Math.floor(t.length>n+o?n+o:t.length);i[0]=o;let u=o;for(let e=1;e<c;e++)i[e]=a;for(let n=c;n<=l;n++){let a=e[o-1].toLowerCase()===t[n-1].toLowerCase()?r[n-1]+.1:r[n-1]+2,c=s===t.charCodeAt(n-1)?r[n-1]:Math.min(r[n]+1,i[n-1]+1,a);i[n]=c,u=Math.min(u,c)}for(let e=l+1;e<=t.length;e++)i[e]=a;if(u>n)return;let d=r;r=i,i=d}let o=r[t.length];return o>n?void 0:o}function Ue(e,t,n){let r=e.length-t.length;return r>=0&&(n?Le(e.slice(r),t):e.indexOf(t,r)===r)}function We(e,t){e[t]=e[e.length-1],e.pop()}function Ge(e,t){return Ke(e,e=>e===t)}function Ke(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return We(e,n),!0;return!1}function qe(e,t,n){return n?Le(e.slice(0,t.length),t):e.lastIndexOf(t,0)===0}function Je(e){return e===void 0?void 0:[e]}var T;(e=>{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function n(t){return e.currentLogLevel<=t}e.shouldLog=n;function r(t,r){e.loggingHost&&n(t)&&e.loggingHost.log(t,r)}function i(e){r(3,e)}e.log=i,(e=>{function t(e){r(1,e)}e.error=t;function n(e){r(2,e)}e.warn=n;function i(e){r(3,e)}e.log=i;function a(e){r(4,e)}e.trace=a})(i=e.log||(e.log={}));let a={};function o(){return t}e.getAssertionLevel=o;function s(n){let r=t;if(t=n,n>r)for(let t of we(a)){let r=a[t];r!==void 0&&e[t]!==r.assertion&&n>=r.level&&(e[t]=r,a[t]=void 0)}}e.setAssertionLevel=s;function c(e){return t>=e}e.shouldAssert=c;function l(t,n){return c(t)?!0:(a[n]={level:t,assertion:e[n]},e[n]=je,!1)}function u(e,t){let n=Error(e?`Debug Failure. ${e}`:`Debug Failure.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,t||u),n}e.fail=u;function d(e,t,n){return u(`${t||`Unexpected node.`}\r
|
|
2
2
|
Node ${he(e.kind)} was unexpected.`,n||d)}e.failBadSyntaxKind=d;function f(e,t,n,r){e||(t=t?`False expression: ${t}`:`False expression.`,n&&(t+=`\r
|
|
3
3
|
Verbose Debug Information: `+(typeof n==`string`?n:n())),u(t,r||f))}e.assert=f;function p(e,t,n,r,i){e!==t&&u(`Expected ${e} === ${t}. ${n?r?`${n} ${r}`:n:``}`,i||p)}e.assertEqual=p;function m(e,t,n,r){e>=t&&u(`Expected ${e} < ${t}. ${n||``}`,r||m)}e.assertLessThan=m;function h(e,t,n){e>t&&u(`Expected ${e} <= ${t}`,n||h)}e.assertLessThanOrEqual=h;function ee(e,t,n){e<t&&u(`Expected ${e} >= ${t}`,n||ee)}e.assertGreaterThanOrEqual=ee;function te(e,t,n){e??u(t,n||te)}e.assertIsDefined=te;function g(e,t,n){return te(e,t,n||g),e}e.checkDefined=g;function _(e,t,n){for(let r of e)te(r,t,n||_)}e.assertEachIsDefined=_;function v(e,t,n){return _(e,t,n||v),e}e.checkEachDefined=v;function y(e,t=`Illegal value:`,n){return u(`${t} ${typeof e==`object`&&Ce(e,`kind`)&&Ce(e,`pos`)?`SyntaxKind: `+he(e.kind):JSON.stringify(e)}`,n||y)}e.assertNever=y;function x(e,t,n,r){l(1,`assertEachNode`)&&f(t===void 0||re(e,t),n||`Unexpected node.`,()=>`Node array did not pass test '${ue(t)}'.`,r||x)}e.assertEachNode=x;function ie(e,t,n,r){l(1,`assertNode`)&&f(e!==void 0&&(t===void 0||t(e)),n||`Unexpected node.`,()=>`Node ${he(e?.kind)} did not pass test '${ue(t)}'.`,r||ie)}e.assertNode=ie;function ae(e,t,n,r){l(1,`assertNotNode`)&&f(e===void 0||t===void 0||!t(e),n||`Unexpected node.`,()=>`Node ${he(e.kind)} should not have passed test '${ue(t)}'.`,r||ae)}e.assertNotNode=ae;function oe(e,t,n,r){l(1,`assertOptionalNode`)&&f(t===void 0||e===void 0||t(e),n||`Unexpected node.`,()=>`Node ${he(e?.kind)} did not pass test '${ue(t)}'.`,r||oe)}e.assertOptionalNode=oe;function se(e,t,n,r){l(1,`assertOptionalToken`)&&f(t===void 0||e===void 0||e.kind===t,n||`Unexpected node.`,()=>`Node ${he(e?.kind)} was not a '${he(t)}' token.`,r||se)}e.assertOptionalToken=se;function ce(e,t,n){l(1,`assertMissingNode`)&&f(e===void 0,t||`Unexpected node.`,()=>`Node ${he(e.kind)} was unexpected'.`,n||ce)}e.assertMissingNode=ce;function le(e){}e.type=le;function ue(e){if(typeof e!=`function`)return``;if(Ce(e,`name`))return e.name;{let t=Function.prototype.toString.call(e),n=/^function\s+([\w$]+)\s*\(/.exec(t);return n?n[1]:``}}e.getFunctionName=ue;function de(e){return`{ name: ${Zn(e.escapedName)}; flags: ${Te(e.flags)}; declarations: ${b(e.declarations,e=>he(e.kind))} }`}e.formatSymbol=de;function S(e=0,t,n){let r=pe(t);if(e===0)return r.length>0&&r[0][0]===0?r[0][1]:`0`;if(n){let t=[],n=e;for(let[i,a]of r){if(i>e)break;i!==0&&i&e&&(t.push(a),n&=~i)}if(n===0)return t.join(`|`)}else for(let[t,n]of r)if(t===e)return n;return e.toString()}e.formatEnum=S;let fe=new Map;function pe(e){let t=fe.get(e);if(t)return t;let n=[];for(let t in e){let r=e[t];typeof r==`number`&&n.push([r,t])}let r=me(n,(e,t)=>w(e[0],t[0]));return fe.set(e,r),r}function he(e){return S(e,E,!1)}e.formatSyntaxKind=he;function ge(e){return S(e,lt,!1)}e.formatSnippetKind=ge;function _e(e){return S(e,it,!1)}e.formatScriptKind=_e;function ve(e){return S(e,D,!0)}e.formatNodeFlags=ve;function ye(e){return S(e,et,!0)}e.formatNodeCheckFlags=ye;function be(e){return S(e,Xe,!0)}e.formatModifierFlags=be;function xe(e){return S(e,ct,!0)}e.formatTransformFlags=xe;function Se(e){return S(e,ut,!0)}e.formatEmitFlags=Se;function Te(e){return S(e,$e,!0)}e.formatSymbolFlags=Te;function Ee(e){return S(e,tt,!0)}e.formatTypeFlags=Ee;function De(e){return S(e,rt,!0)}e.formatSignatureFlags=De;function Oe(e){return S(e,nt,!0)}e.formatObjectFlags=Oe;function ke(e){return S(e,Qe,!0)}e.formatFlowFlags=ke;function C(e){return S(e,Ze,!0)}e.formatRelationComparisonResult=C;function Ae(e){return S(e,CheckMode,!0)}e.formatCheckMode=Ae;function Me(e){return S(e,SignatureCheckMode,!0)}e.formatSignatureCheckMode=Me;function Ne(e){return S(e,TypeFacts,!0)}e.formatTypeFacts=Ne;let Pe=!1,Fe;function Ie(e){`__debugFlowFlags`in e||Object.defineProperties(e,{__tsDebuggerDisplay:{value(){let e=this.flags&2?`FlowStart`:this.flags&4?`FlowBranchLabel`:this.flags&8?`FlowLoopLabel`:this.flags&16?`FlowAssignment`:this.flags&32?`FlowTrueCondition`:this.flags&64?`FlowFalseCondition`:this.flags&128?`FlowSwitchClause`:this.flags&256?`FlowArrayMutation`:this.flags&512?`FlowCall`:this.flags&1024?`FlowReduceLabel`:this.flags&1?`FlowUnreachable`:`UnknownFlow`,t=this.flags&-2048;return`${e}${t?` (${ke(t)})`:``}`}},__debugFlowFlags:{get(){return S(this.flags,Qe,!0)}},__debugToString:{value(){return qe(this)}}})}function Le(e){return Pe&&(typeof Object.setPrototypeOf==`function`?(Fe||(Fe=Object.create(Object.prototype),Ie(Fe)),Object.setPrototypeOf(e,Fe)):Ie(e)),e}e.attachFlowNodeDebugInfo=Le;let Re;function ze(e){`__tsDebuggerDisplay`in e||Object.defineProperties(e,{__tsDebuggerDisplay:{value(e){return e=String(e).replace(/(?:,[\s\w]+:[^,]+)+\]$/,`]`),`NodeArray ${e}`}}})}function Ve(e){Pe&&(typeof Object.setPrototypeOf==`function`?(Re||(Re=Object.create(Array.prototype),ze(Re)),Object.setPrototypeOf(e,Re)):ze(e))}e.attachNodeArrayDebugInfo=Ve;function He(){if(Pe)return;let e=new WeakMap,t=new WeakMap;Object.defineProperties(So.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let e=this.flags&33554432?`TransientSymbol`:`Symbol`,t=this.flags&-33554433;return`${e} '${er(this)}'${t?` (${Te(t)})`:``}`}},__debugFlags:{get(){return Te(this.flags)}}}),Object.defineProperties(So.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let e=this.flags&402431?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:``}`:this.flags&12?`NullableType`:this.flags&3072?`LiteralType ${JSON.stringify(this.value)}`:this.flags&4096?`LiteralType ${this.value.negative?`-`:``}${this.value.base10Value}n`:this.flags&16384?`UniqueESSymbolType`:this.flags&65536?`EnumType`:this.flags&134217728?`UnionType`:this.flags&268435456?`IntersectionType`:this.flags&2097152?`IndexType`:this.flags&33554432?`IndexedAccessType`:this.flags&67108864?`ConditionalType`:this.flags&16777216?`SubstitutionType`:this.flags&524288?`TypeParameter`:this.flags&1048576?this.objectFlags&3?`InterfaceType`:this.objectFlags&4?`TypeReference`:this.objectFlags&8?`TupleType`:this.objectFlags&16?`AnonymousType`:this.objectFlags&32?`MappedType`:this.objectFlags&1024?`ReverseMappedType`:this.objectFlags&256?`EvolvingArrayType`:`ObjectType`:`Type`,t=this.flags&1048576?this.objectFlags&-142607680:0;return`${e}${this.symbol?` '${er(this.symbol)}'`:``}${t?` (${Oe(t)})`:``}`}},__debugFlags:{get(){return Ee(this.flags)}},__debugObjectFlags:{get(){return this.flags&1048576?Oe(this.objectFlags):``}},__debugTypeToString:{value(){let t=e.get(this);return t===void 0&&(t=this.checker.typeToString(this),e.set(this,t)),t}}}),Object.defineProperties(So.getSignatureConstructor().prototype,{__debugFlags:{get(){return De(this.flags)}},__debugSignatureToString:{value(){return this.checker?.signatureToString(this)}}});let n=[So.getNodeConstructor(),So.getIdentifierConstructor(),So.getTokenConstructor(),So.getSourceFileConstructor()];for(let e of n)Ce(e.prototype,`__debugKind`)||Object.defineProperties(e.prototype,{__tsDebuggerDisplay:{value(){return`${Hr(this)?`GeneratedIdentifier`:V(this)?`Identifier '${Qn(this)}'`:Ms(this)?`PrivateIdentifier '${Qn(this)}'`:Ds(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+`...`)}`:Ts(this)?`NumericLiteral ${this.text}`:Es(this)?`BigIntLiteral ${this.text}n`:zs(this)?`TypeParameterDeclaration`:Bs(this)?`ParameterDeclaration`:Ks(this)?`ConstructorDeclaration`:qs(this)?`GetAccessorDeclaration`:Js(this)?`SetAccessorDeclaration`:Ys(this)?`CallSignatureDeclaration`:Xs(this)?`ConstructSignatureDeclaration`:Zs(this)?`IndexSignatureDeclaration`:Qs(this)?`TypePredicateNode`:$s(this)?`TypeReferenceNode`:ec(this)?`FunctionTypeNode`:tc(this)?`ConstructorTypeNode`:nc(this)?`TypeQueryNode`:rc(this)?`TypeLiteralNode`:ic(this)?`ArrayTypeNode`:ac(this)?`TupleTypeNode`:sc(this)?`OptionalTypeNode`:cc(this)?`RestTypeNode`:lc(this)?`UnionTypeNode`:uc(this)?`IntersectionTypeNode`:dc(this)?`ConditionalTypeNode`:fc(this)?`InferTypeNode`:pc(this)?`ParenthesizedTypeNode`:mc(this)?`ThisTypeNode`:hc(this)?`TypeOperatorNode`:gc(this)?`IndexedAccessTypeNode`:_c(this)?`MappedTypeNode`:vc(this)?`LiteralTypeNode`:oc(this)?`NamedTupleMember`:yc(this)?`ImportTypeNode`:he(this.kind)}${this.flags?` (${ve(this.flags)})`:``}`}},__debugKind:{get(){return he(this.kind)}},__debugNodeFlags:{get(){return ve(this.flags)}},__debugModifierFlags:{get(){return be(eo(this))}},__debugTransformFlags:{get(){return xe(this.transformFlags)}},__debugIsParseTreeNode:{get(){return Jn(this)}},__debugEmitFlags:{get(){return Se(Bi(this))}},__debugGetText:{value(e){if(Ra(this))return``;let n=t.get(this);if(n===void 0){let r=Yn(this),i=r&&Ni(r);n=i?Li(i,r,e):``,t.set(this,n)}return n}}});Pe=!0}e.enableDebugInfo=He;function Ue(e){let t=e&7,n=t===0?`in out`:t===3?`[bivariant]`:t===2?`in`:t===1?`out`:t===4?`[independent]`:``;return e&8?n+=` (unmeasurable)`:e&16&&(n+=` (unreliable)`),n}e.formatVariance=Ue;class We{__debugToString(){switch(this.kind){case 3:return this.debugInfo?.call(this)||`(function mapper)`;case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return ne(this.sources,this.targets||b(this.sources,()=>`any`),(e,t)=>`${e.__debugTypeToString()} -> ${typeof t==`string`?t:t.__debugTypeToString()}`).join(`, `);case 2:return ne(this.sources,this.targets,(e,t)=>`${e.__debugTypeToString()} -> ${t().__debugTypeToString()}`).join(`, `);case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(`
|
|
4
4
|
`).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/RichMessageContent-
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{m as t,p as n}from"./markdown-core-BmPPZiuD.js";import{i as r}from"./router-vendor-CbPDks39.js";import{t as i}from"./utils-CuC1beTY.js";import{a,c as o,o as s,r as c}from"./messageCodeStyles-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/RichMessageContent-DkiEvdSg.js","js/rolldown-runtime-hePW80VL.js","js/markdown-core-BmPPZiuD.js","js/router-vendor-CbPDks39.js","js/utils-CuC1beTY.js","js/utils-vendor-BBa8OxtB.js","js/appStore-DRSSjaHn.js","js/logger-DSXjF4ye.js","js/messageCodeStyles-BHddEFP1.js","js/useTranslation-C3ei3mJq.js","js/ui-vendor-D3Ahl1x5.js","js/markdown-math-mH7AZ_mb.js","assets/markdown-math-ClTedVi7.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{m as t,p as n}from"./markdown-core-BmPPZiuD.js";import{i as r}from"./router-vendor-CbPDks39.js";import{t as i}from"./utils-CuC1beTY.js";import{a,c as o,o as s,r as c}from"./messageCodeStyles-BHddEFP1.js";import"./Button-BV44cTnj.js";var l=e(t(),1),u=n(),d=({label:e,error:t,helper:n,className:r,id:a,...o})=>{let s=(0,l.useId)(),c=a||`input-${s}`;return(0,u.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,u.jsx)(`label`,{htmlFor:c,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,u.jsx)(`input`,{id:c,className:i(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...o}),t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-ink-muted`,children:n})]})},f=l.forwardRef(({label:e,error:t,helper:n,className:r,id:a,...o},s)=>{let c=(0,l.useId)(),d=a||`textarea-${c}`;return(0,u.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,u.jsx)(`label`,{htmlFor:d,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,u.jsx)(`textarea`,{ref:s,id:d,className:i(`block w-full resize-none rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...o}),t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-ink-muted`,children:n})]})});f.displayName=`Textarea`;var p=({label:e,error:t,helper:n,options:r,className:a,id:o,...s})=>{let c=(0,l.useId)(),d=o||`select-${c}`;return(0,u.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,u.jsx)(`label`,{htmlFor:d,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,u.jsx)(`select`,{id:d,className:i(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,a),...s,children:r.map((e,t)=>(0,u.jsx)(`option`,{value:e.value,children:e.label},e.key??`${e.value}-${t}`))}),t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-ink-muted`,children:n})]})};function m({content:e}){return e?(0,u.jsx)(`div`,{dir:`auto`,className:`whitespace-pre-wrap break-words leading-relaxed`,children:e}):null}function h({content:e,language:t,complete:n}){let r=n?e.replace(/\r?\n$/,``):e,i=l.useRef(null),o=l.useRef(!0);return l.useLayoutEffect(()=>{let e=i.current;e&&o.current&&(e.scrollTop=e.scrollHeight)},[r]),(0,u.jsx)(a,{code:r,language:t,state:n?`complete`:`streaming`,children:(0,u.jsx)(`pre`,{ref:i,onScroll:()=>{let e=i.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight;o.current=t<24},className:c,children:(0,u.jsx)(`code`,{children:r})})})}var g=({content:e,className:t,segments:n,isStreaming:r=!0})=>{let a=l.useMemo(()=>n??s(e),[e,n]),o=a[a.length-1],c=o?.type===`code`&&!o.complete;return(0,u.jsxs)(`div`,{className:i(`text-sm leading-relaxed text-gray-700 dark:text-dark-700`,t),children:[a.map((e,t)=>e.type===`code`?(0,u.jsx)(h,{...e},`${e.type}-${t}`):(0,u.jsx)(m,{content:e.content},`${e.type}-${t}`)),r&&!c&&(0,u.jsx)(`span`,{"data-testid":`message-streaming-cursor`,"aria-hidden":`true`,className:`ms-1 inline-block h-5 w-1 animate-pulse rounded-full bg-primary-500 align-text-bottom`})]})},_=l.lazy(()=>r(()=>import(`./RichMessageContent-DkiEvdSg.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])));function v({content:e,className:t}){return(0,u.jsx)(`div`,{dir:`auto`,className:i(`text-sm leading-relaxed text-gray-700 dark:text-dark-700 whitespace-pre-wrap break-words`,t),children:e})}var y=({content:e,className:t,isStreaming:n=!1})=>{let r=l.useMemo(()=>n?s(e):[],[e,n]),i=r.some(e=>e.type===`code`);if(n&&i)return(0,u.jsx)(g,{content:e,className:t,segments:r});let a;return a=o(e)?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsx)(g,{content:e,className:t,isStreaming:!1}),children:(0,u.jsx)(_,{content:e,className:t})}):(0,u.jsx)(v,{content:e,className:t}),(0,u.jsxs)(u.Fragment,{children:[a,n&&(0,u.jsx)(`span`,{"data-testid":`message-streaming-cursor`,"aria-hidden":`true`,className:`ms-1 inline-block h-5 w-1 animate-pulse rounded-full bg-primary-500 align-text-bottom`})]})},b=({children:e,htmlFor:t,className:n=``})=>(0,u.jsx)(`label`,{htmlFor:t,className:i(`text-sm font-medium tracking-[-0.005em] text-ink-muted`,n),children:e}),x=({children:e,className:t=``,...n})=>(0,u.jsx)(`div`,{...n,className:i(`rounded-2xl border border-line bg-surface-raised shadow-card`,t),children:e}),S=({children:e,className:t=``})=>(0,u.jsx)(`div`,{className:i(`flex flex-col space-y-1.5 p-6`,t),children:e}),C=({children:e,className:t=``})=>(0,u.jsx)(`h3`,{className:i(`text-lg font-semibold leading-tight tracking-[-0.02em] text-ink`,t),children:e}),w=({children:e,className:t=``})=>(0,u.jsx)(`p`,{className:i(`text-sm leading-relaxed text-ink-muted`,t),children:e}),T=({children:e,className:t=``})=>(0,u.jsx)(`div`,{className:i(`p-6 pt-0`,t),children:e}),E={narrow:`max-w-4xl`,default:`max-w-6xl`,wide:`max-w-7xl`},D=({children:e,width:t=`default`,className:n,contentClassName:r,...a})=>(0,u.jsx)(`div`,{"data-testid":`page-scroll-region`,className:i(`scroll-region h-full min-h-0 scrollbar-thin`,n),...a,children:(0,u.jsx)(`div`,{className:i(`mx-auto w-full px-4 pb-16 pt-7 sm:px-6 sm:pb-20 sm:pt-10 lg:px-8`,E[t],r),children:e})}),O=({title:e,description:t,eyebrow:n,actions:r,meta:a,className:o,...s})=>(0,u.jsxs)(`header`,{className:i(`mb-8 flex flex-col gap-6 border-b border-gray-200/70 pb-7 text-start dark:border-white/[0.08] sm:mb-10 sm:pb-9 md:flex-row md:items-end md:justify-between`,o),...s,children:[(0,u.jsxs)(`div`,{className:`min-w-0 max-w-3xl`,children:[n&&(0,u.jsx)(`div`,{className:`mb-3 text-[11px] font-medium uppercase tracking-[0.18em] text-gray-500 dark:text-dark-500 rtl:tracking-normal`,children:n}),(0,u.jsx)(`h1`,{className:`text-balance text-3xl font-normal leading-[1.02] tracking-[-0.04em] text-gray-950 dark:text-dark-950 sm:text-5xl rtl:leading-[1.15] rtl:tracking-normal`,children:e}),t&&(0,u.jsx)(`p`,{className:`mt-4 max-w-2xl text-sm leading-6 text-gray-600 dark:text-dark-600 sm:text-base sm:leading-7`,children:t}),a&&(0,u.jsx)(`div`,{className:`mt-4`,children:a})]}),r&&(0,u.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 md:justify-end`,children:r})]});export{w as a,b as c,p as d,f,T as i,y as l,D as n,S as o,d as p,x as r,C as s,O as t,g as u};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/authStore-
|
|
2
|
-
import{n as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,p as n}from"./router-vendor-CbPDks39.js";import{a as r}from"./utils-vendor-BBa8OxtB.js";import{i,t as a}from"./logger-DSXjF4ye.js";import{n as o,t as s}from"./config-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/authStore-BVykIRec.js","js/rolldown-runtime-hePW80VL.js","js/router-vendor-CbPDks39.js","js/markdown-core-BmPPZiuD.js","js/chatStore-UPp5TV_t.js","js/i18next-DgmgtwsV.js","js/utils-CuC1beTY.js","js/utils-vendor-BBa8OxtB.js","js/ui-vendor-D3Ahl1x5.js","js/logger-DSXjF4ye.js","js/api-BvPDxsUQ.js","js/config-BTlPm-cZ.js","js/appStore-DRSSjaHn.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,p as n}from"./router-vendor-CbPDks39.js";import{a as r}from"./utils-vendor-BBa8OxtB.js";import{i,t as a}from"./logger-DSXjF4ye.js";import{n as o,t as s}from"./config-BTlPm-cZ.js";var c=a(`api`);o(),c.debug(`User agent:`,navigator.userAgent),c.debug(`Demo mode detected:`,i());var l=(e,t=!0)=>new Promise(n=>{setTimeout(()=>{n({success:t,data:e,error:t?void 0:`Demo mode: Backend not available`})},500)}),u=r.create({baseURL:s,timeout:3e5});u.interceptors.request.use(e=>{let t=localStorage.getItem(`auth-token`);return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),u.interceptors.response.use(e=>e,e=>{if(e.response?.status===401){c.warn(`Session expired or unauthorized, logging out...`),localStorage.removeItem(`auth-token`),t(async()=>{let{useAuthStore:e}=await import(`./authStore-BVykIRec.js`).then(e=>e.t);return{useAuthStore:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(({useAuthStore:e})=>{e.getState().logout()});let e=window.location.protocol===`file:`;return(e?window.location.hash:window.location.pathname).includes(`/login`)||(window.location.href=e?`#/login`:`/login`),Promise.reject(Error(`Session expired`))}return e.response?.status===403&&(e.config?.url??``).startsWith(`/work`)&&e.config?.url!==`/work/access`&&t(async()=>{let{useAuthStore:e}=await import(`./authStore-BVykIRec.js`).then(e=>e.t);return{useAuthStore:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(({useAuthStore:e})=>{e.getState().refreshWorkAccess()}),c.error(`API Error:`,e),Promise.reject(e)});var d=new Set([`snapshot`,`run_state`,`reasoning_delta`,`assistant_delta`,`tool_call`,`tool_result`,`usage`,`skill_loaded`,`error`,`done`]),f=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:void 0,p=e=>{if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number(e);if(Number.isFinite(t))return t;let n=Date.parse(e);if(Number.isFinite(n))return n}return Date.now()},m=(e,t,n,r,i)=>{let a=f(e);if(!a)return;let o=Number(a.id??t),s=String(a.type??n??``),c=String(a.taskId??r),l=String(a.runId??i);if(!Number.isSafeInteger(o)||o<0||!d.has(s)||c!==r||l!==i)return;let u=a.data;return{id:o,type:s,taskId:c,runId:l,timestamp:p(a.timestamp),data:f(u)||(u===void 0?{}:{content:u})}},h=(e,t,n)=>{let r,i,a=[];for(let t of e.split(`
|
|
3
3
|
`)){if(!t||t.startsWith(`:`))continue;let e=t.indexOf(`:`),n=e===-1?t:t.slice(0,e),o=e===-1?``:t.slice(e+1),s=o.startsWith(` `)?o.slice(1):o;n===`id`&&(r=s),n===`event`&&(i=s),n===`data`&&a.push(s)}if(a.length===0)return;let o=a.join(`
|
|
4
4
|
`);if(o===`[DONE]`)return m({id:r,type:`done`,taskId:t,runId:n,timestamp:Date.now(),data:{}},r,i,t,n);try{return m(JSON.parse(o),r,i,t,n)}catch{return}},g=class{constructor(e,t,r){n(this,`taskId`,void 0),n(this,`runId`,void 0),n(this,`onEvent`,void 0),n(this,`buffer`,``),this.taskId=e,this.runId=t,this.onEvent=r}push(e){e&&(this.buffer+=e,this.drain())}finish(e=``){if(this.buffer+=e,this.drain(),!this.buffer.trim()){this.buffer=``;return}let t=h(this.buffer.replace(/\r\n?/g,`
|
|
5
5
|
`),this.taskId,this.runId);this.buffer=``,t&&this.onEvent(t)}drain(){let e=/\r?\n\r?\n/.exec(this.buffer);for(;e?.index!==void 0;){let t=this.buffer.slice(0,e.index).replace(/\r\n?/g,`
|