tracer-sh 0.2.2 → 0.2.4
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/package.json +1 -1
- package/packages/server/dist/{chunk-6QUU7TGZ.js → chunk-IKD3ICQK.js} +2 -0
- package/packages/server/dist/{chunk-OTYSD6PF.js → chunk-L7TO4UJ4.js} +2 -0
- package/packages/server/dist/{chunk-4VNS5WPM.js → chunk-WOL2ZWU7.js} +1 -0
- package/packages/server/dist/{chunk-7J2BYJNR.js → chunk-WUFQGSGW.js} +2 -1
- package/packages/server/dist/{chunk-5IQ4TST5.js → chunk-XFJVNMJI.js} +2 -0
- package/packages/server/dist/{domain-knowledge-WHIEZOOH.js → domain-knowledge-4AAER546.js} +3 -2
- package/packages/server/dist/{domain-knowledge-V6AENXZV.js → domain-knowledge-A3WXZ55R.js} +3 -2
- package/packages/server/dist/{domain-knowledge-5ZUPRLNB.js → domain-knowledge-CAD7MDFJ.js} +3 -2
- package/packages/server/dist/index.js +107 -29
- package/packages/server/dist/{token-4WRACUIQ.js → token-QV5VOVJ4.js} +3 -2
- package/packages/server/dist/token-util-DLXYCJR4.js +6 -0
- package/packages/web/dist/assets/{SearchableSelect-CGq3RJiX.js → SearchableSelect-CvsTUEdo.js} +1 -1
- package/packages/web/dist/assets/{Settings-CSYYBQF1.js → Settings-gjgo6xd4.js} +1 -1
- package/packages/web/dist/assets/{highlighted-body-OFNGDK62-CnIKGHSu.js → highlighted-body-OFNGDK62-DdqoooTx.js} +1 -1
- package/packages/web/dist/assets/{index-DLQaH2AJ.css → index-CxrnanDH.css} +1 -1
- package/packages/web/dist/assets/index-DqPm6rps.js +48 -0
- package/packages/web/dist/assets/{mermaid-GHXKKRXX-D9p_GS3a.js → mermaid-GHXKKRXX-DQ_Kyq22.js} +3 -3
- package/packages/web/dist/index.html +2 -2
- package/packages/server/dist/token-util-NKFL6ZOU.js +0 -5
- package/packages/web/dist/assets/index-_7TPlTNo.js +0 -48
package/packages/web/dist/assets/{mermaid-GHXKKRXX-D9p_GS3a.js → mermaid-GHXKKRXX-DQ_Kyq22.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-
|
|
2
|
-
import{s as gP,e as bP,f as or,g as te,_ as el,h as yw,l as yP,i as ns,o as ze,k as me,m as qt,n as Un,p as vP,q as Ps,v as xP,w as EP,x as Ke,y as TP,r as m,z as On,j as E,B as vw,D as fm,R as wP,c as Vt,b as z,E as AP,F as yn,G as SP,H as xw,W as is,t as bt,U as Ea,I as Ew,J as Tw,K as Gg,L as du,N as kP,O as Xg,P as Ih,C as _P}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-DdqoooTx.js","assets/index-DqPm6rps.js","assets/index-CxrnanDH.css","assets/SearchableSelect-CvsTUEdo.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{s as gP,e as bP,f as or,g as te,_ as el,h as yw,l as yP,i as ns,o as ze,k as me,m as qt,n as Un,p as vP,q as Ps,v as xP,w as EP,x as Ke,y as TP,r as m,z as On,j as E,B as vw,D as fm,R as wP,c as Vt,b as z,E as AP,F as yn,G as SP,H as xw,W as is,t as bt,U as Ea,I as Ew,J as Tw,K as Gg,L as du,N as kP,O as Xg,P as Ih,C as _P}from"./index-DqPm6rps.js";import{r as Ds,u as CP}from"./SearchableSelect-CvsTUEdo.js";const ww=new Set(["timestamp","start","end","created_at","updated_at","time"]);function IP(e,t){return ww.has(e)?t>1e12:/time/i.test(e)&&t>1e12&&t<3e12}function OP(e,t){return ww.has(e)?t>1e9&&t<1e12:/time/i.test(e)&&t>1e9&&t<3e9}var Aw="vercel.ai.error",NP=Symbol.for(Aw),Zg,Qg,nn=class Sw extends(Qg=Error,Zg=NP,Qg){constructor({name:t,message:r,cause:n}){super(r),this[Zg]=!0,this.name=t,this.cause=n}static isInstance(t){return Sw.hasMarker(t,Aw)}static hasMarker(t,r){const n=Symbol.for(r);return t!=null&&typeof t=="object"&&n in t&&typeof t[n]=="boolean"&&t[n]===!0}};function kw(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var _w="AI_InvalidArgumentError",Cw=`vercel.ai.error.${_w}`,PP=Symbol.for(Cw),Jg,eb,DP=class extends(eb=nn,Jg=PP,eb){constructor({message:e,cause:t,argument:r}){super({name:_w,message:e,cause:t}),this[Jg]=!0,this.argument=r}static isInstance(e){return nn.hasMarker(e,Cw)}},Iw="AI_JSONParseError",Ow=`vercel.ai.error.${Iw}`,RP=Symbol.for(Ow),tb,rb,nb=class extends(rb=nn,tb=RP,rb){constructor({text:e,cause:t}){super({name:Iw,message:`JSON parsing failed: Text: ${e}.
|
|
3
3
|
Error message: ${kw(t)}`,cause:t}),this[tb]=!0,this.text=e}static isInstance(e){return nn.hasMarker(e,Ow)}},Nw="AI_TypeValidationError",Pw=`vercel.ai.error.${Nw}`,LP=Symbol.for(Pw),ib,ab,Da=class Oh extends(ab=nn,ib=LP,ab){constructor({value:t,cause:r,context:n}){let i="Type validation failed";if(n?.field&&(i+=` for ${n.field}`),n?.entityName||n?.entityId){i+=" (";const a=[];n.entityName&&a.push(n.entityName),n.entityId&&a.push(`id: "${n.entityId}"`),i+=a.join(", "),i+=")"}super({name:Nw,message:`${i}: Value: ${JSON.stringify(t)}.
|
|
4
4
|
Error message: ${kw(r)}`,cause:r}),this[ib]=!0,this.value=t,this.context=n}static isInstance(t){return nn.hasMarker(t,Pw)}static wrap({value:t,cause:r,context:n}){var i,a,o;return Oh.isInstance(r)&&r.value===t&&((i=r.context)==null?void 0:i.field)===n?.field&&((a=r.context)==null?void 0:a.entityName)===n?.entityName&&((o=r.context)==null?void 0:o.entityId)===n?.entityId?r:new Oh({value:t,cause:r,context:n})}},as;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(as||(as={}));var ob;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ob||(ob={}));as.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);as.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class tl extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let s=n,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),n}static assert(t){if(!(t instanceof tl))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,as.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r=Object.create(null),n=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];r[a]=r[a]||[],r[a].push(t(i))}else n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}tl.create=e=>new tl(e);var sb;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(sb||(sb={}));var ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ve||(ve={}));class ub extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}const lb=10,MP=13,hi=32;function Af(e){}function jP(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=Af,onError:r=Af,onRetry:n=Af,onComment:i}=e,a=[];let o=!0,s,u="",l=0,c;function f(v){if(o&&(o=!1,v.charCodeAt(0)===239&&v.charCodeAt(1)===187&&v.charCodeAt(2)===191&&(v=v.slice(3))),a.length===0){const S=d(v);S!==""&&a.push(S);return}if(v.indexOf(`
|
|
5
5
|
`)===-1&&v.indexOf("\r")===-1){a.push(v);return}a.push(v);const T=a.join("");a.length=0;const x=d(T);x!==""&&a.push(x)}function d(v){let T=0;if(v.indexOf("\r")===-1){let x=v.indexOf(`
|
|
@@ -128,7 +128,7 @@ ${t}</tr>
|
|
|
128
128
|
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${bn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:n}){let i=this.parser.parseInline(n),a=Uy(t);if(a===null)return i;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+bn(r)+'"'),o+=">"+i+"</a>",o}image({href:t,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=Uy(t);if(a===null)return bn(n);t=a;let o=`<img src="${t}" alt="${n}"`;return r&&(o+=` title="${bn(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:bn(t.text)}},Ym=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Rr=class Jh{options;renderer;textRenderer;constructor(t){this.options=t||Xi,this.options.renderer=this.options.renderer||new dl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ym}static parse(t,r){return new Jh(r).parse(t)}static parseInline(t,r){return new Jh(r).parseInline(t)}parse(t){let r="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let o=i,s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){r+=s||"";continue}}let a=i;switch(a.type){case"space":{r+=this.renderer.space(a);break}case"hr":{r+=this.renderer.hr(a);break}case"heading":{r+=this.renderer.heading(a);break}case"code":{r+=this.renderer.code(a);break}case"table":{r+=this.renderer.table(a);break}case"blockquote":{r+=this.renderer.blockquote(a);break}case"list":{r+=this.renderer.list(a);break}case"checkbox":{r+=this.renderer.checkbox(a);break}case"html":{r+=this.renderer.html(a);break}case"def":{r+=this.renderer.def(a);break}case"paragraph":{r+=this.renderer.paragraph(a);break}case"text":{r+=this.renderer.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}parseInline(t,r=this.renderer){let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=s||"";continue}}let o=a;switch(o.type){case"escape":{n+=r.text(o);break}case"html":{n+=r.html(o);break}case"link":{n+=r.link(o);break}case"image":{n+=r.image(o);break}case"checkbox":{n+=r.checkbox(o);break}case"strong":{n+=r.strong(o);break}case"em":{n+=r.em(o);break}case"codespan":{n+=r.codespan(o);break}case"br":{n+=r.br(o);break}case"del":{n+=r.del(o);break}case"text":{n+=r.text(o);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}},Lo=class{options;block;constructor(e){this.options=e||Xi}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?_r.lex:_r.lexInline}provideParser(){return this.block?Rr.parse:Rr.parseInline}},N7=class{defaults=Fm();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Rr;Renderer=dl;TextRenderer=Ym;Lexer=_r;Tokenizer=fl;Hooks=Lo;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{let i=n;for(let a of i.header)r=r.concat(this.walkTokens(a.tokens,t));for(let a of i.rows)for(let o of a)r=r.concat(this.walkTokens(o.tokens,t));break}case"list":{let i=n;r=r.concat(this.walkTokens(i.items,t));break}default:{let i=n;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let o=i[a].flat(1/0);r=r.concat(this.walkTokens(o,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...o){let s=i.renderer.apply(this,o);return s===!1&&(s=a.apply(this,o)),s}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){let i=this.defaults.renderer||new dl(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,s=r.renderer[o],u=i[o];i[o]=(...l)=>{let c=s.apply(i,l);return c===!1&&(c=u.apply(i,l)),c||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new fl(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,s=r.tokenizer[o],u=i[o];i[o]=(...l)=>{let c=s.apply(i,l);return c===!1&&(c=u.apply(i,l)),c}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Lo;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,s=r.hooks[o],u=i[o];Lo.passThroughHooks.has(a)?i[o]=l=>{if(this.defaults.async&&Lo.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await s.call(i,l);return u.call(i,f)})();let c=s.call(i,l);return u.call(i,c)}:i[o]=(...l)=>{if(this.defaults.async)return(async()=>{let f=await s.apply(i,l);return f===!1&&(f=await u.apply(i,l)),f})();let c=s.apply(i,l);return c===!1&&(c=u.apply(i,l)),c}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(o){let s=[];return s.push(a.call(this,o)),i&&(s=s.concat(i.call(this,o))),s}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _r.lex(e,t??this.defaults)}parser(e,t){return Rr.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(t):t,s=await(i.hooks?await i.hooks.provideLexer():e?_r.lex:_r.lexInline)(o,i),u=i.hooks?await i.hooks.processAllTokens(s):s;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let l=await(i.hooks?await i.hooks.provideParser():e?Rr.parse:Rr.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(l):l})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let o=(i.hooks?i.hooks.provideLexer():e?_r.lex:_r.lexInline)(t,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let s=(i.hooks?i.hooks.provideParser():e?Rr.parse:Rr.parseInline)(o,i);return i.hooks&&(s=i.hooks.postprocess(s)),s}catch(o){return a(o)}}}onError(e,t){return r=>{if(r.message+=`
|
|
129
129
|
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+bn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Bi=new N7;function He(e,t){return Bi.parse(e,t)}He.options=He.setOptions=function(e){return Bi.setOptions(e),He.defaults=Bi.defaults,pk(He.defaults),He};He.getDefaults=Fm;He.defaults=Xi;He.use=function(...e){return Bi.use(...e),He.defaults=Bi.defaults,pk(He.defaults),He};He.walkTokens=function(e,t){return Bi.walkTokens(e,t)};He.parseInline=Bi.parseInline;He.Parser=Rr;He.parser=Rr.parse;He.Renderer=dl;He.TextRenderer=Ym;He.Lexer=_r;He.lexer=_r.lex;He.Tokenizer=fl;He.Hooks=Lo;He.parse=He;He.options;He.setOptions;He.use;He.walkTokens;He.parseInline;Rr.parse;_r.lex;var P7=300,D7="300px",R7=500;function L7(e={}){let{immediate:t=!1,debounceDelay:r=P7,rootMargin:n=D7,idleTimeout:i=R7}=e,[a,o]=m.useState(!1),s=m.useRef(null),u=m.useRef(null),l=m.useRef(null),c=m.useMemo(()=>h=>{let p=Date.now();return window.setTimeout(()=>{h({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-p))})},1)},[]),f=m.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(h,p)=>window.requestIdleCallback(h,p):c,[c]),d=m.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?h=>window.cancelIdleCallback(h):h=>{clearTimeout(h)},[]);return m.useEffect(()=>{if(t){o(!0);return}let h=s.current;if(!h)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(d(l.current),l.current=null);let p=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(d(l.current),l.current=null)},b=x=>{l.current=f(S=>{S.timeRemaining()>0||S.didTimeout?(o(!0),x.disconnect()):l.current=f(()=>{o(!0),x.disconnect()},{timeout:i/2})},{timeout:i})},y=x=>{p(),u.current=window.setTimeout(()=>{var S,w;let A=x.takeRecords();(A.length===0||(w=(S=A.at(-1))==null?void 0:S.isIntersecting)!=null&&w)&&b(x)},r)},v=(x,S)=>{x.isIntersecting?y(S):p()},T=new IntersectionObserver(x=>{for(let S of x)v(S,T)},{rootMargin:n,threshold:0});return T.observe(h),()=>{u.current&&clearTimeout(u.current),l.current&&d(l.current),T.disconnect()}},[t,r,n,i,d,f]),{shouldRender:a,containerRef:s}}var Sk=/\s/,M7=/^\s+$/,j7=new Set(["code","pre","svg","math","annotation"]),B7=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",F7=e=>e.some(t=>B7(t)&&j7.has(t.tagName)),$7=e=>{let t=[],r="",n=!1;for(let i of e){let a=Sk.test(i);a!==n&&r&&(t.push(r),r=""),r+=i,n=a}return r&&t.push(r),t},U7=e=>{let t=[],r="";for(let n of e)Sk.test(n)?r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&t.push(r),t},H7=(e,t,r,n,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:r}ms;--sd-easing:${n}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:o},children:[{type:"text",value:e}]}},z7=(e,t,r,n,i)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(F7(t))return Ta;let o=a,s=o.children.indexOf(e);if(s===-1)return;let u=e.value;if(!u.trim()){i.count+=u.length;return}let l=r.sep==="char"?U7(u):$7(u),c=n.prevContentLength,f=l.map(d=>{let h=i.count;if(i.count+=d.length,M7.test(d))return{type:"text",value:d};let p=c>0&&h<c,b=p?0:i.newIndex++*r.stagger;return H7(d,r.animation,r.duration,r.easing,p,b)});return o.children.splice(s,1,...f),s+f.length},q7=0;function ep(e){var t,r,n,i,a;let o={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(r=e?.duration)!=null?r:150,easing:(n=e?.easing)!=null?n:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(a=e?.stagger)!=null?a:40},s={prevContentLength:0,lastRenderCharCount:0},u=q7++,l=()=>c=>{let f={count:0,newIndex:0};pm(c,"text",(d,h)=>z7(d,h,o,s,f)),s.lastRenderCharCount=f.count,s.prevContentLength=0};return Object.defineProperty(l,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:l,setPrevContentLength(c){s.prevContentLength=c},getLastRenderCharCount(){let c=s.lastRenderCharCount;return s.lastRenderCharCount=0,c}}}ep();var kk=m.createContext(!1),W7=()=>m.useContext(kk),Km=(...e)=>nk(Le(e)),V7=(e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(n=>n.startsWith(r)?n:`${e}:${n}`).join(" ")},Y7=e=>e?(...t)=>V7(e,nk(Le(t))):Km,_a=(e,t,r)=>{let n=typeof t=="string"&&r.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([n+t],{type:r}):t,a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},tp=m.createContext(Km),ke=()=>m.useContext(tp),K7=Km("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),G7=e=>{let t={};for(let r of e.split(";")){let n=r.indexOf(":");if(n>0){let i=r.slice(0,n).trim(),a=r.slice(n+1).trim();i&&a&&(t[i]=a)}}return t},X7=m.memo(({children:e,result:t,language:r,className:n,startLine:i,lineNumbers:a=!0,...o})=>{let s=ke(),u=m.useMemo(()=>s(K7),[s]),l=m.useMemo(()=>{let c={};return t.bg&&(c["--sdm-bg"]=t.bg),t.fg&&(c["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(c,G7(t.rootStyle)),c},[t.bg,t.fg,t.rootStyle]);return E.jsx("div",{className:s(n,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",...o,children:E.jsx("pre",{className:s(n,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:l,children:E.jsx("code",{className:a?s("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((c,f)=>E.jsx("span",{className:a?u:void 0,children:c.length===0||c.length===1&&c[0].content===""?`
|
|
130
130
|
`:c.map((d,h)=>{let p={},b=!!d.bgColor;if(d.color&&(p["--sdm-c"]=d.color),d.bgColor&&(p["--sdm-tbg"]=d.bgColor),d.htmlStyle)for(let[y,v]of Object.entries(d.htmlStyle))y==="color"?p["--sdm-c"]=v:y==="background-color"?(p["--sdm-tbg"]=v,b=!0):p[y]=v;return E.jsx("span",{className:s("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",b&&"bg-[var(--sdm-tbg)]",b&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:p,...d.htmlAttrs,children:d.content},h)})},f))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),Z7=({className:e,language:t,style:r,isIncomplete:n,...i})=>{let a=ke();return E.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...i})},_k=m.createContext({code:""}),Ck=()=>m.useContext(_k),Q7=({language:e})=>{let t=ke();return E.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:E.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},J7=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
131
|
-
`;)t--;return e.slice(0,t)},e$=m.lazy(()=>vw(()=>import("./highlighted-body-OFNGDK62-
|
|
131
|
+
`;)t--;return e.slice(0,t)},e$=m.lazy(()=>vw(()=>import("./highlighted-body-OFNGDK62-DdqoooTx.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.HighlightedCodeBlockBody}))),t$=({code:e,language:t,className:r,children:n,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let u=ke(),l=m.useMemo(()=>J7(e),[e]),c=m.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:l.split(`
|
|
132
132
|
`).map(f=>[{content:f,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[l]);return E.jsx(_k.Provider,{value:{code:e},children:E.jsxs(Z7,{isIncomplete:i,language:t,children:[E.jsx(Q7,{language:t}),n?E.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsx("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:n})}):null,E.jsx(m.Suspense,{fallback:E.jsx(X7,{className:r,language:t,lineNumbers:o,result:c,startLine:a,...s}),children:E.jsx(e$,{className:r,code:l,language:t,lineNumbers:o,raw:c,startLine:a,...s})})]})})},r$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),n$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),i$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),a$=e=>E.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[E.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),o$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),s$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),u$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),l$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),c$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),f$=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Mo={CheckIcon:r$,CopyIcon:n$,DownloadIcon:i$,ExternalLinkIcon:l$,Loader2Icon:a$,Maximize2Icon:o$,RotateCcwIcon:s$,XIcon:u$,ZoomInIcon:c$,ZoomOutIcon:f$},Ik=m.createContext(Mo),d$=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(i=>e[i]===t[i])},qy=({icons:e,children:t})=>{let r=m.useRef(e),n=m.useRef(e?{...Mo,...e}:Mo);d$(r.current,e)||(r.current=e,n.current=e?{...Mo,...e}:Mo);let i=n.current;return E.jsx(Ik.Provider,{value:i,children:t})},zr=()=>m.useContext(Ik),Ok={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},rp=m.createContext(Ok),Pn=()=>m.useContext(rp),Wy=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...o})=>{let s=ke(),[u,l]=m.useState(!1),c=m.useRef(0),{code:f}=Ck(),{isAnimating:d}=m.useContext(yr),h=Pn(),p=a??f,b=async()=>{var T;if(typeof window>"u"||!((T=navigator?.clipboard)!=null&&T.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(p),l(!0),e?.(),c.current=window.setTimeout(()=>l(!1),r))}catch(x){t?.(x)}};m.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let y=zr(),v=u?y.CheckIcon:y.CopyIcon;return E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:b,title:h.copyCode,type:"button",...o,children:n??E.jsx(v,{size:14})})},Vy={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},h$=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...o})=>{let s=ke(),{code:u}=Ck(),{isAnimating:l}=m.useContext(yr),c=Pn(),f=zr(),d=a??u,h=`file.${r&&r in Vy?Vy[r]:"txt"}`,p="text/plain",b=()=>{try{_a(h,d,p),e?.()}catch(y){t?.(y)}};return E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:b,title:c.downloadFile,type:"button",...o,children:n??E.jsx(f.DownloadIcon,{size:14})})},Yy=()=>{let{Loader2Icon:e}=zr(),t=ke();return E.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[E.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),E.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:E.jsx(e,{className:t("size-4 animate-spin")})})]})},p$=/\.[^/.]+$/,m$=({node:e,className:t,src:r,alt:n,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=zr(),u=ke(),l=m.useRef(null),[c,f]=m.useState(!1),[d,h]=m.useState(!1),p=Pn(),b=o.width!=null||o.height!=null,y=(c||b)&&!d,v=d&&!b;m.useEffect(()=>{let w=l.current;if(w!=null&&w.complete){let A=w.naturalWidth>0;f(A),h(!A)}},[]);let T=m.useCallback(w=>{f(!0),h(!1),i?.(w)},[i]),x=m.useCallback(w=>{f(!1),h(!0),a?.(w)},[a]),S=async()=>{if(r)try{let w=await(await fetch(r)).blob(),A=new URL(r,window.location.origin).pathname.split("/").pop()||"",_=A.split(".").pop(),O=A.includes(".")&&_!==void 0&&_.length<=4,R="";if(O)R=A;else{let C=w.type,M="png";C.includes("jpeg")||C.includes("jpg")?M="jpg":C.includes("png")?M="png":C.includes("svg")?M="svg":C.includes("gif")?M="gif":C.includes("webp")&&(M="webp"),R=`${(n||A||"image").replace(p$,"")}.${M}`}_a(R,w,w.type)}catch{window.open(r,"_blank")}};return r?E.jsxs("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[E.jsx("img",{alt:n,className:u("max-w-full rounded-lg",v&&"hidden",t),"data-streamdown":"image",onError:x,onLoad:T,ref:l,src:r,...o}),v&&E.jsx("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:p.imageNotAvailable}),E.jsx("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),y&&E.jsx("button",{className:u("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:S,title:p.downloadImage,type:"button",children:E.jsx(s,{size:14})})]}):null},Qo=0,Gm=()=>{Qo+=1,Qo===1&&(document.body.style.overflow="hidden")},Xm=()=>{Qo=Math.max(0,Qo-1),Qo===0&&(document.body.style.overflow="")},g$=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=zr(),u=ke(),[l,c]=m.useState(!1),f=Pn(),d=m.useCallback(async()=>{try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch{}},[e]),h=m.useCallback(()=>{n(),r()},[n,r]);return m.useEffect(()=>{if(t){Gm();let p=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),Xm()}}},[t,r]),t?E.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:p=>{p.key==="Escape"&&r()},role:"button",tabIndex:0,children:E.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[E.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:f.close,type:"button",children:E.jsx(s,{size:16})}),E.jsxs("div",{className:u("flex flex-col gap-2"),children:[E.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[E.jsx(o,{size:20}),E.jsx("span",{children:f.openExternalLink})]}),E.jsx("p",{className:u("text-muted-foreground text-sm"),children:f.externalLinkWarning})]}),E.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),E.jsxs("div",{className:u("flex gap-2"),children:[E.jsx("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:d,type:"button",children:l?E.jsxs(E.Fragment,{children:[E.jsx(i,{size:14}),E.jsx("span",{children:f.copied})]}):E.jsxs(E.Fragment,{children:[E.jsx(a,{size:14}),E.jsx("span",{children:f.copyLink})]})}),E.jsxs("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:h,type:"button",children:[E.jsx(o,{size:14}),E.jsx("span",{children:f.openLink})]})]})]})}):null},np=m.createContext(null),Zm=()=>m.useContext(np),Gue=()=>{var e;let t=Zm();return(e=t?.code)!=null?e:null},Qm=()=>{var e;let t=Zm();return(e=t?.mermaid)!=null?e:null},b$=e=>{var t;let r=Zm();return r!=null&&r.renderers&&e&&(t=r.renderers.find(n=>Array.isArray(n.language)?n.language.includes(e):n.language===e))!=null?t:null},y$=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((i,a)=>{let o="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{let u=document.createElement("canvas"),l=s.width*n,c=s.height*n;u.width=l,u.height=c;let f=u.getContext("2d");if(!f){a(new Error("Failed to create 2D canvas context for PNG export"));return}f.drawImage(s,0,0,l,c),u.toBlob(d=>{if(!d){a(new Error("Failed to create PNG blob"));return}i(d)},"image/png")},s.onerror=()=>a(new Error("Failed to load SVG image")),s.src=o})},v$=({chart:e,children:t,className:r,onDownload:n,config:i,onError:a})=>{let o=ke(),[s,u]=m.useState(!1),l=m.useRef(null),{isAnimating:c}=m.useContext(yr),f=zr(),d=Qm(),h=Pn(),p=async b=>{try{if(b==="mmd"){_a("diagram.mmd",e,"text/plain"),u(!1),n?.(b);return}if(!d){a?.(new Error("Mermaid plugin not available"));return}let y=d.getMermaid(i),v=e.split("").reduce((S,w)=>(S<<5)-S+w.charCodeAt(0)|0,0),T=`mermaid-${Math.abs(v)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:x}=await y.render(T,e);if(!x){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){_a("diagram.svg",x,"image/svg+xml"),u(!1),n?.(b);return}if(b==="png"){let S=await y$(x);_a("diagram.png",S,"image/png"),n?.(b),u(!1);return}}catch(y){a?.(y)}};return m.useEffect(()=>{let b=y=>{let v=y.composedPath();l.current&&!v.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),E.jsxs("div",{className:o("relative"),ref:l,children:[E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:c,onClick:()=>u(!s),title:h.downloadDiagram,type:"button",children:t??E.jsx(f.DownloadIcon,{size:14})}),s?E.jsxs("div",{className:o("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("svg"),title:h.downloadDiagramAsSvg,type:"button",children:h.mermaidFormatSvg}),E.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("png"),title:h.downloadDiagramAsPng,type:"button",children:h.mermaidFormatPng}),E.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("mmd"),title:h.downloadDiagramAsMmd,type:"button",children:h.mermaidFormatMmd})]}):null]})},x$=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=zr(),u=ke(),[l,c]=m.useState(!1),{isAnimating:f,controls:d}=m.useContext(yr),h=Pn(),p=(()=>{if(typeof d=="boolean")return d;let y=d.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),b=()=>{c(!l)};return m.useEffect(()=>{if(l){Gm();let y=v=>{v.key==="Escape"&&c(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),Xm()}}},[l]),m.useEffect(()=>{l?r?.():n&&n()},[l,r,n]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:f,onClick:b,title:h.viewFullscreen,type:"button",...a,children:E.jsx(o,{size:14})}),l?Ds.createPortal(E.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:b,onKeyDown:y=>{y.key==="Escape"&&b()},role:"button",tabIndex:0,children:[E.jsx("button",{className:u("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:b,title:h.exitFullscreen,type:"button",children:E.jsx(s,{size:20})}),E.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:E.jsx(c2,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:p})})]}),document.body):null]})},Nk=e=>{var t,r;let n=[],i=[],a=e.querySelectorAll("thead th");for(let s of a)n.push(((t=s.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let s of o){let u=[],l=s.querySelectorAll("td");for(let c of l)u.push(((r=c.textContent)==null?void 0:r.trim())||"");i.push(u)}return{headers:n,rows:i}},Pk=e=>{let{headers:t,rows:r}=e,n=s=>{let u=!1,l=!1;for(let c of s){if(c==='"'){u=!0,l=!0;break}(c===","||c===`
|
|
133
133
|
`)&&(u=!0)}return u?l?`"${s.replace(/"/g,'""')}"`:`"${s}"`:s},i=t.length>0?r.length+1:r.length,a=new Array(i),o=0;t.length>0&&(a[o]=t.map(n).join(","),o+=1);for(let s of r)a[o]=s.map(n).join(","),o+=1;return a.join(`
|
|
134
134
|
`)},E$=e=>{let{headers:t,rows:r}=e,n=s=>{let u=!1;for(let c of s)if(c===" "||c===`
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
media="print"
|
|
15
15
|
onload="this.media='all'"
|
|
16
16
|
/>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-DqPm6rps.js"></script>
|
|
18
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CxrnanDH.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
21
21
|
<div id="root"></div>
|