Fn(E,t&&(X(t)?t[m]:t),n,s,r));return}if(Bn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Fn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Ss(s.component):s.el,o=r?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===re?a.refs={}:a.refs,p=a.setupState,g=oe(p),w=p===re?()=>!1:E=>he(g,E);if(c!=null&&c!==l&&(Ce(c)?(u[c]=null,w(c)&&(p[c]=null)):je(c)&&(c.value=null)),me(l))mn(l,a,12,[o,u]);else{const E=Ce(l),m=je(l);if(E||m){const R=()=>{if(e.f){const S=E?w(l)?p[l]:u[l]:l.value;r?X(S)&&ei(S,i):X(S)?S.includes(i)||S.push(i):E?(u[l]=[i],w(l)&&(p[l]=u[l])):(l.value=[i],e.k&&(u[e.k]=l.value))}else E?(u[l]=o,w(l)&&(p[l]=o)):m&&(l.value=o,e.k&&(u[e.k]=o))};o?(R.id=-1,nt(R,n)):R()}}}rs().requestIdleCallback,rs().cancelIdleCallback;const Bn=e=>!!e.type.__asyncLoader,lr=e=>e.type.__isKeepAlive;function Da(e,t,n=Yt,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{It();const a=xr(n),l=_t(t,n,e,o);return a(),Mt(),l});return s?r.unshift(i):r.push(i),i}}const qi=e=>(t,n=Yt)=>{(!Vn||e==="sp")&&Da(e,(...s)=>t(...s),n)},Hn=qi("m"),xs=qi("bum"),Na=Symbol.for("v-ndc");function ys(e,t,n,s){let r;const i=n,o=X(e);if(o||Ce(e)){const a=o&&gn(e);let l=!1,c=!1;a&&(l=!lt(e),c=Vt(e),e=is(e)),r=new Array(e.length);for(let u=0,p=e.length;ut(a,l,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let l=0,c=a.length;le?po(e)?Ss(e):ar(e.parent):null,zn=ht(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ar(e.parent),$root:e=>ar(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{rr(e.update)}),$nextTick:e=>e.n||(e.n=kt.bind(e.proxy)),$watch:e=>Qt}),ur=(e,t)=>e!==re&&!e.__isScriptSetup&&he(e,t),Fa={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:a,appContext:l}=e;let c;if(t[0]!=="$"){const w=o[t];if(w!==void 0)switch(w){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(ur(s,t))return o[t]=1,s[t];if(r!==re&&he(r,t))return o[t]=2,r[t];if((c=e.propsOptions[0])&&he(c,t))return o[t]=3,i[t];if(n!==re&&he(n,t))return o[t]=4,n[t];o[t]=0}}const u=zn[t];let p,g;if(u)return t==="$attrs"&&Ue(e.attrs,"get",""),u(e);if((p=a.__cssModules)&&(p=p[t]))return p;if(n!==re&&he(n,t))return o[t]=4,n[t];if(g=l.config.globalProperties,he(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return ur(r,t)?(r[t]=n,!0):s!==re&&he(s,t)?(s[t]=n,!0):he(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let a;return!!n[o]||e!==re&&he(e,o)||ur(t,o)||(a=i[0])&&he(a,o)||he(s,o)||he(zn,o)||he(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:he(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Wi(){return{app:null,config:{isNativeTag:Dl,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ba=0;function Ha(e,t){return function(s,r=null){me(s)||(s=ht({},s)),r!=null&&!Ae(r)&&(r=null);const i=Wi(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:Ba++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:Su,get config(){return i.config},set config(u){},use(u,...p){return o.has(u)||(u&&me(u.install)?(o.add(u),u.install(c,...p)):me(u)&&(o.add(u),u(c,...p))),c},mixin(u){return c},component(u,p){return p?(i.components[u]=p,c):i.components[u]},directive(u,p){return p?(i.directives[u]=p,c):i.directives[u]},mount(u,p,g){if(!l){const w=c._ceVNode||Me(s,r);return w.appContext=i,g===!0?g="svg":g===!1&&(g=void 0),e(w,u,g),l=!0,c._container=u,u.__vue_app__=c,Ss(w.component)}},onUnmount(u){a.push(u)},unmount(){l&&(_t(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,p){return i.provides[u]=p,c},runWithContext(u){const p=yn;yn=c;try{return u()}finally{yn=p}}};return c}}let yn=null;function za(e,t,n=!1){const s=co();if(s||yn){let r=yn?yn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&me(t)?t.call(s&&s.proxy):t}}const Gi={},Ki=()=>Object.create(Gi),Yi=e=>Object.getPrototypeOf(e)===Gi;function Ua(e,t,n,s=!1){const r={},i=Ki();e.propsDefaults=Object.create(null),Zi(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:pa(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function ja(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,a=oe(r),[l]=e.propsOptions;let c=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let p=0;pe==="_"||e==="__"||e==="_ctx"||e==="$stable",dr=e=>X(e)?e.map(Et):[Et(e)],qa=(e,t,n)=>{if(t._n)return t;const s=Ni((...r)=>dr(t(...r)),n);return s._c=!1,s},Qi=(e,t,n)=>{const s=e._ctx;for(const r in e){if(fr(r))continue;const i=e[r];if(me(i))t[r]=qa(r,i,s);else if(i!=null){const o=dr(i);t[r]=()=>o}}},Ji=(e,t)=>{const n=dr(t);e.slots.default=()=>n},eo=(e,t,n)=>{for(const s in t)(n||!fr(s))&&(e[s]=t[s])},Wa=(e,t,n)=>{const s=e.slots=Ki();if(e.vnode.shapeFlag&32){const r=t.__;r&&zs(s,"__",r,!0);const i=t._;i?(eo(s,t,n),n&&zs(s,"_",i,!0)):Qi(t,s)}else t&&Ji(e,t)},Ga=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=re;if(s.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:eo(r,t,n):(i=!t.$stable,Qi(t,r)),o=t}else t&&(Ji(e,t),o={default:1});if(i)for(const a in r)!fr(a)&&o[a]==null&&delete r[a]},nt=au;function Ka(e){return Ya(e)}function Ya(e,t){const n=rs();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:p,nextSibling:g,setScopeId:w=Qt,insertStaticContent:E}=e,m=(f,h,b,T=null,v=null,_=null,M=void 0,I=null,P=!!h.dynamicChildren)=>{if(f===h)return;f&&!on(f,h)&&(T=le(f),de(f,v,_,!0),f=null),h.patchFlag===-2&&(P=!1,h.dynamicChildren=null);const{type:k,ref:B,shapeFlag:L}=h;switch(k){case vs:R(f,h,b,T);break;case Ke:S(f,h,b,T);break;case hr:f==null&&V(h,b,T,M);break;case Be:$(f,h,b,T,v,_,M,I,P);break;default:L&1?A(f,h,b,T,v,_,M,I,P):L&6?Y(f,h,b,T,v,_,M,I,P):(L&64||L&128)&&k.process(f,h,b,T,v,_,M,I,P,ze)}B!=null&&v?Fn(B,f&&f.ref,_,h||f,!h):B==null&&f&&f.ref!=null&&Fn(f.ref,null,_,f,!0)},R=(f,h,b,T)=>{if(f==null)s(h.el=a(h.children),b,T);else{const v=h.el=f.el;h.children!==f.children&&c(v,h.children)}},S=(f,h,b,T)=>{f==null?s(h.el=l(h.children||""),b,T):h.el=f.el},V=(f,h,b,T)=>{[f.el,f.anchor]=E(f.children,h,b,T,f.el,f.anchor)},K=({el:f,anchor:h},b,T)=>{let v;for(;f&&f!==h;)v=g(f),s(f,b,T),f=v;s(h,b,T)},O=({el:f,anchor:h})=>{let b;for(;f&&f!==h;)b=g(f),r(f),f=b;r(h)},A=(f,h,b,T,v,_,M,I,P)=>{h.type==="svg"?M="svg":h.type==="math"&&(M="mathml"),f==null?C(h,b,T,v,_,M,I,P):W(f,h,v,_,M,I,P)},C=(f,h,b,T,v,_,M,I)=>{let P,k;const{props:B,shapeFlag:L,transition:H,dirs:q}=f;if(P=f.el=o(f.type,_,B&&B.is,B),L&8?u(P,f.children):L&16&&te(f.children,P,null,T,v,pr(f,_),M,I),q&&nn(f,null,T,"created"),J(P,f,f.scopeId,M,T),B){for(const fe in B)fe!=="value"&&!Cn(fe)&&i(P,fe,null,B[fe],_,T);"value"in B&&i(P,"value",null,B.value,_),(k=B.onVnodeBeforeMount)&&At(k,T,f)}q&&nn(f,null,T,"beforeMount");const ee=Za(v,H);ee&&H.beforeEnter(P),s(P,h,b),((k=B&&B.onVnodeMounted)||ee||q)&&nt(()=>{k&&At(k,T,f),ee&&H.enter(P),q&&nn(f,null,T,"mounted")},v)},J=(f,h,b,T,v)=>{if(b&&w(f,b),T)for(let _=0;_{for(let k=P;k{const I=h.el=f.el;let{patchFlag:P,dynamicChildren:k,dirs:B}=h;P|=f.patchFlag&16;const L=f.props||re,H=h.props||re;let q;if(b&&sn(b,!1),(q=H.onVnodeBeforeUpdate)&&At(q,b,h,f),B&&nn(h,f,b,"beforeUpdate"),b&&sn(b,!0),(L.innerHTML&&H.innerHTML==null||L.textContent&&H.textContent==null)&&u(I,""),k?ne(f.dynamicChildren,k,I,b,T,pr(h,v),_):M||We(f,h,I,null,b,T,pr(h,v),_,!1),P>0){if(P&16)xe(I,L,H,b,v);else if(P&2&&L.class!==H.class&&i(I,"class",null,H.class,v),P&4&&i(I,"style",L.style,H.style,v),P&8){const ee=h.dynamicProps;for(let fe=0;fe{q&&At(q,b,h,f),B&&nn(h,f,b,"updated")},T)},ne=(f,h,b,T,v,_,M)=>{for(let I=0;I{if(h!==b){if(h!==re)for(const _ in h)!Cn(_)&&!(_ in b)&&i(f,_,h[_],null,v,T);for(const _ in b){if(Cn(_))continue;const M=b[_],I=h[_];M!==I&&_!=="value"&&i(f,_,I,M,v,T)}"value"in b&&i(f,"value",h.value,b.value,v)}},$=(f,h,b,T,v,_,M,I,P)=>{const k=h.el=f?f.el:a(""),B=h.anchor=f?f.anchor:a("");let{patchFlag:L,dynamicChildren:H,slotScopeIds:q}=h;q&&(I=I?I.concat(q):q),f==null?(s(k,b,T),s(B,b,T),te(h.children||[],b,B,v,_,M,I,P)):L>0&&L&64&&H&&f.dynamicChildren?(ne(f.dynamicChildren,H,b,v,_,M,I),(h.key!=null||v&&h===v.subTree)&&to(f,h,!0)):We(f,h,b,B,v,_,M,I,P)},Y=(f,h,b,T,v,_,M,I,P)=>{h.slotScopeIds=I,f==null?h.shapeFlag&512?v.ctx.activate(h,b,T,M,P):G(h,b,T,v,_,M,P):z(f,h,P)},G=(f,h,b,T,v,_,M)=>{const I=f.component=gu(f,T,v);if(lr(f)&&(I.ctx.renderer=ze),mu(I,!1,M),I.asyncDep){if(v&&v.registerDep(I,ue,M),!f.el){const P=I.subTree=Me(Ke);S(null,P,h,b),f.placeholder=P.el}}else ue(I,f,h,b,v,_,M)},z=(f,h,b)=>{const T=h.component=f.component;if(ou(f,h,b))if(T.asyncDep&&!T.asyncResolved){Se(T,h,b);return}else T.next=h,T.update();else h.el=f.el,T.vnode=h},ue=(f,h,b,T,v,_,M)=>{const I=()=>{if(f.isMounted){let{next:L,bu:H,u:q,parent:ee,vnode:fe}=f;{const it=no(f);if(it){L&&(L.el=fe.el,Se(f,L,M)),it.asyncDep.then(()=>{f.isUnmounted||I()});return}}let se=L,ke;sn(f,!1),L?(L.el=fe.el,Se(f,L,M)):L=fe,H&&ss(H),(ke=L.props&&L.props.onVnodeBeforeUpdate)&&At(ke,ee,L,fe),sn(f,!0);const Oe=ro(f),rt=f.subTree;f.subTree=Oe,m(rt,Oe,p(rt.el),le(rt),f,v,_),L.el=Oe.el,se===null&&lu(f,Oe.el),q&&nt(q,v),(ke=L.props&&L.props.onVnodeUpdated)&&nt(()=>At(ke,ee,L,fe),v)}else{let L;const{el:H,props:q}=h,{bm:ee,m:fe,parent:se,root:ke,type:Oe}=f,rt=Bn(h);sn(f,!1),ee&&ss(ee),!rt&&(L=q&&q.onVnodeBeforeMount)&&At(L,se,h),sn(f,!0);{ke.ce&&ke.ce._def.shadowRoot!==!1&&ke.ce._injectChildStyle(Oe);const it=f.subTree=ro(f);m(null,it,b,T,f,v,_),h.el=it.el}if(fe&&nt(fe,v),!rt&&(L=q&&q.onVnodeMounted)){const it=h;nt(()=>At(L,se,it),v)}(h.shapeFlag&256||se&&Bn(se.vnode)&&se.vnode.shapeFlag&256)&&f.a&&nt(f.a,v),f.isMounted=!0,h=b=T=null}};f.scope.on();const P=f.effect=new ci(I);f.scope.off();const k=f.update=P.run.bind(P),B=f.job=P.runIfDirty.bind(P);B.i=f,B.id=f.uid,P.scheduler=()=>rr(B),sn(f,!0),k()},Se=(f,h,b)=>{h.component=f;const T=f.vnode.props;f.vnode=h,f.next=null,ja(f,h.props,T,b),Ga(f,h.children,b),It(),Li(f),Mt()},We=(f,h,b,T,v,_,M,I,P=!1)=>{const k=f&&f.children,B=f?f.shapeFlag:0,L=h.children,{patchFlag:H,shapeFlag:q}=h;if(H>0){if(H&128){ce(k,L,b,T,v,_,M,I,P);return}else if(H&256){xt(k,L,b,T,v,_,M,I,P);return}}q&8?(B&16&&ge(k,v,_),L!==k&&u(b,L)):B&16?q&16?ce(k,L,b,T,v,_,M,I,P):ge(k,v,_,!0):(B&8&&u(b,""),q&16&&te(L,b,T,v,_,M,I,P))},xt=(f,h,b,T,v,_,M,I,P)=>{f=f||pt,h=h||pt;const k=f.length,B=h.length,L=Math.min(k,B);let H;for(H=0;HB?ge(f,v,_,!0,!1,L):te(h,b,T,v,_,M,I,P,L)},ce=(f,h,b,T,v,_,M,I,P)=>{let k=0;const B=h.length;let L=f.length-1,H=B-1;for(;k<=L&&k<=H;){const q=f[k],ee=h[k]=P?Kt(h[k]):Et(h[k]);if(on(q,ee))m(q,ee,b,null,v,_,M,I,P);else break;k++}for(;k<=L&&k<=H;){const q=f[L],ee=h[H]=P?Kt(h[H]):Et(h[H]);if(on(q,ee))m(q,ee,b,null,v,_,M,I,P);else break;L--,H--}if(k>L){if(k<=H){const q=H+1,ee=qH)for(;k<=L;)de(f[k],v,_,!0),k++;else{const q=k,ee=k,fe=new Map;for(k=ee;k<=H;k++){const $e=h[k]=P?Kt(h[k]):Et(h[k]);$e.key!=null&&fe.set($e.key,k)}let se,ke=0;const Oe=H-ee+1;let rt=!1,it=0;const Ft=new Array(Oe);for(k=0;k=Oe){de($e,v,_,!0);continue}let Xe;if($e.key!=null)Xe=fe.get($e.key);else for(se=ee;se<=H;se++)if(Ft[se-ee]===0&&on($e,h[se])){Xe=se;break}Xe===void 0?de($e,v,_,!0):(Ft[Xe-ee]=k+1,Xe>=it?it=Xe:rt=!0,m($e,h[Xe],b,null,v,_,M,I,P),ke++)}const Qn=rt?Xa(Ft):pt;for(se=Qn.length-1,k=Oe-1;k>=0;k--){const $e=ee+k,Xe=h[$e],ot=h[$e+1],Bt=$e+1{const{el:_,type:M,transition:I,children:P,shapeFlag:k}=f;if(k&6){N(f.component.subTree,h,b,T);return}if(k&128){f.suspense.move(h,b,T);return}if(k&64){M.move(f,h,b,ze);return}if(M===Be){s(_,h,b);for(let L=0;L I.enter(_),v);else{const{leave:L,delayLeave:H,afterLeave:q}=I,ee=()=>{f.ctx.isUnmounted?r(_):s(_,h,b)},fe=()=>{L(_,()=>{ee(),q&&q()})};H?H(_,ee,fe):fe()}else s(_,h,b)},de=(f,h,b,T=!1,v=!1)=>{const{type:_,props:M,ref:I,children:P,dynamicChildren:k,shapeFlag:B,patchFlag:L,dirs:H,cacheIndex:q}=f;if(L===-2&&(v=!1),I!=null&&(It(),Fn(I,null,b,f,!0),Mt()),q!=null&&(h.renderCache[q]=void 0),B&256){h.ctx.deactivate(f);return}const ee=B&1&&H,fe=!Bn(f);let se;if(fe&&(se=M&&M.onVnodeBeforeUnmount)&&At(se,h,f),B&6)ve(f.component,b,T);else{if(B&128){f.suspense.unmount(b,T);return}ee&&nn(f,null,h,"beforeUnmount"),B&64?f.type.remove(f,h,b,ze,T):k&&!k.hasOnce&&(_!==Be||L>0&&L&64)?ge(k,h,b,!1,!0):(_===Be&&L&384||!v&&B&16)&&ge(P,h,b),T&&pe(f)}(fe&&(se=M&&M.onVnodeUnmounted)||ee)&&nt(()=>{se&&At(se,h,f),ee&&nn(f,null,h,"unmounted")},b)},pe=f=>{const{type:h,el:b,anchor:T,transition:v}=f;if(h===Be){Te(b,T);return}if(h===hr){O(f);return}const _=()=>{r(b),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(f.shapeFlag&1&&v&&!v.persisted){const{leave:M,delayLeave:I}=v,P=()=>M(b,_);I?I(f.el,_,P):P()}else _()},Te=(f,h)=>{let b;for(;f!==h;)b=g(f),r(f),f=b;r(h)},ve=(f,h,b)=>{const{bum:T,scope:v,job:_,subTree:M,um:I,m:P,a:k,parent:B,slots:{__:L}}=f;so(P),so(k),T&&ss(T),B&&X(L)&&L.forEach(H=>{B.renderCache[H]=void 0}),v.stop(),_&&(_.flags|=8,de(M,f,h,b)),I&&nt(I,h),nt(()=>{f.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},ge=(f,h,b,T=!1,v=!1,_=0)=>{for(let M=_;M{if(f.shapeFlag&6)return le(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const h=g(f.anchor||f.el),b=h&&h[Ia];return b?g(b):h};let yt=!1;const Ct=(f,h,b)=>{f==null?h._vnode&&de(h._vnode,null,null,!0):m(h._vnode||null,f,h,null,null,null,b),h._vnode=f,yt||(yt=!0,Li(),Oi(),yt=!1)},ze={p:m,um:de,m:N,r:pe,mt:G,mc:te,pc:We,pbc:ne,n:le,o:e};return{render:Ct,hydrate:void 0,createApp:Ha(Ct)}}function pr({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function sn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Za(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function to(e,t,n=!1){const s=e.children,r=t.children;if(X(s)&&X(r))for(let i=0;i>1,e[n[a]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function no(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:no(t)}function so(e){if(e)for(let t=0;tza(Qa);function rn(e,t,n){return eu(e,t,n)}function eu(e,t,n=re){const{immediate:s,deep:r,flush:i,once:o}=n,a=ht({},n),l=t&&s||!t&&i!=="post";let c;if(Vn){if(i==="sync"){const w=Ja();c=w.__watcherHandles||(w.__watcherHandles=[])}else if(!l){const w=()=>{};return w.stop=Qt,w.resume=Qt,w.pause=Qt,w}}const u=Yt;a.call=(w,E,m)=>_t(w,u,E,m);let p=!1;i==="post"?a.scheduler=w=>{nt(w,u&&u.suspense)}:i!=="sync"&&(p=!0,a.scheduler=(w,E)=>{E?w():rr(w)}),a.augmentJob=w=>{t&&(w.flags|=4),p&&(w.flags|=2,u&&(w.id=u.uid,w.i=u))};const g=_a(e,t,a);return Vn&&(c?c.push(g):l&&g()),g}const tu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ut(t)}Modifiers`]||e[`${Jt(t)}Modifiers`];function nu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||re;let r=n;const i=t.startsWith("update:"),o=i&&tu(s,t.slice(7));o&&(o.trim&&(r=n.map(u=>Ce(u)?u.trim():u)),o.number&&(r=n.map(Us)));let a,l=s[a=Hs(t)]||s[a=Hs(Ut(t))];!l&&i&&(l=s[a=Hs(Jt(t))]),l&&_t(l,e,6,r);const c=s[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,_t(c,e,6,r)}}function su(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={};return i?(X(i)?i.forEach(a=>o[a]=null):ht(o,i),Ae(e)&&s.set(e,o),o):(Ae(e)&&s.set(e,null),null)}function ws(e,t){return!e||!es(t)?!1:(t=t.slice(2).replace(/Once$/,""),he(e,t[0].toLowerCase()+t.slice(1))||he(e,Jt(t))||he(e,t))}function Ep(){}function ro(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:p,data:g,setupState:w,ctx:E,inheritAttrs:m}=e,R=ms(e);let S,V;try{if(n.shapeFlag&4){const O=r||s,A=O;S=Et(c.call(A,O,u,p,w,g,E)),V=a}else{const O=t;S=Et(O.length>1?O(p,{attrs:a,slots:o,emit:l}):O(p,null)),V=t.props?a:ru(a)}}catch(O){Un.length=0,hs(O,e,1),S=Me(Ke)}let K=S;if(V&&m!==!1){const O=Object.keys(V),{shapeFlag:A}=K;O.length&&A&7&&(i&&O.some(Fs)&&(V=iu(V,i)),K=Gt(K,V,!1,!0))}return n.dirs&&(K=Gt(K,null,!1,!0),K.dirs=K.dirs?K.dirs.concat(n.dirs):n.dirs),n.transition&&Nn(K,n.transition),S=K,ms(R),S}const ru=e=>{let t;for(const n in e)(n==="class"||n==="style"||es(n))&&((t||(t={}))[n]=e[n]);return t},iu=(e,t)=>{const n={};for(const s in e)(!Fs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function ou(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?io(s,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let p=0;pe.__isSuspense;function au(e,t){t&&t.pendingBranch?X(e)?t.effects.push(...e):t.effects.push(e):Ca(e)}const Be=Symbol.for("v-fgt"),vs=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),hr=Symbol.for("v-stc"),Un=[];let st=null;function F(e=!1){Un.push(st=e?null:[])}function uu(){Un.pop(),st=Un[Un.length-1]||null}let jn=1;function lo(e,t=!1){jn+=e,e<0&&st&&t&&(st.hasOnce=!0)}function ao(e){return e.dynamicChildren=jn>0?st||pt:null,uu(),jn>0&&st&&st.push(e),e}function j(e,t,n,s,r,i){return ao(x(e,t,n,s,r,i,!0))}function St(e,t,n,s,r){return ao(Me(e,t,n,s,r,!0))}function _s(e){return e?e.__v_isVNode===!0:!1}function on(e,t){return e.type===t.type&&e.key===t.key}const uo=({key:e})=>e!=null?e:null,Ts=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||je(e)||me(e)?{i:at,r:e,k:t,f:!!n}:e:null);function x(e,t=null,n=null,s=0,r=null,i=e===Be?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&uo(t),ref:t&&Ts(t),scopeId:Di,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:at};return a?(mr(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Ce(n)?8:16),jn>0&&!o&&st&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&st.push(l),l}const Me=cu;function cu(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Na)&&(e=Ke),_s(e)){const a=Gt(e,t,!0);return n&&mr(a,n),jn>0&&!i&&st&&(a.shapeFlag&6?st[st.indexOf(e)]=a:st.push(a)),a.patchFlag=-2,a}if(Tu(e)&&(e=e.__vccOpts),t){t=fu(t);let{class:a,style:l}=t;a&&!Ce(a)&&(t.class=ye(a)),Ae(l)&&(nr(l)&&!X(l)&&(l=ht({},l)),t.style=js(l))}const o=Ce(e)?1:oo(e)?128:Fi(e)?64:Ae(e)?4:me(e)?2:0;return x(e,t,n,s,r,o,i,!0)}function fu(e){return e?nr(e)||Yi(e)?ht({},e):e:null}function Gt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?du(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&uo(c),ref:t&&t.ref?n&&i?X(i)?i.concat(Ts(t)):[i,Ts(t)]:Ts(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Be?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Gt(e.ssContent),ssFallback:e.ssFallback&&Gt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&Nn(u,l.clone(u)),u}function gr(e=" ",t=0){return Me(vs,null,e,t)}function Ve(e="",t=!1){return t?(F(),St(Ke,null,e)):Me(Ke,null,e)}function Et(e){return e==null||typeof e=="boolean"?Me(Ke):X(e)?Me(Be,null,e.slice()):_s(e)?Kt(e):Me(vs,null,String(e))}function Kt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Gt(e)}function mr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(X(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),mr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Yi(t)?t._ctx=at:r===3&&at&&(at.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else me(t)?(t={default:t,_ctx:at},n=32):(t=String(t),s&64?(n=16,t=[gr(t)]):n=8);e.children=t,e.shapeFlag|=n}function du(...e){const t={};for(let n=0;nYt||at;let ks,br;{const e=rs(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};ks=t("__VUE_INSTANCE_SETTERS__",n=>Yt=n),br=t("__VUE_SSR_SETTERS__",n=>Vn=n)}const xr=e=>{const t=Yt;return ks(e),e.scope.on(),()=>{e.scope.off(),ks(t)}},fo=()=>{Yt&&Yt.scope.off(),ks(null)};function po(e){return e.vnode.shapeFlag&4}let Vn=!1;function mu(e,t=!1,n=!1){t&&br(t);const{props:s,children:r}=e.vnode,i=po(e);Ua(e,s,i,t),Wa(e,r,n||t);const o=i?bu(e,t):void 0;return t&&br(!1),o}function bu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Fa);const{setup:s}=n;if(s){It();const r=e.setupContext=s.length>1?yu(e):null,i=xr(e),o=mn(s,e,0,[e.props,r]),a=ni(o);if(Mt(),i(),(a||e.sp)&&!Bn(e)&&$a(e),a){if(o.then(fo,fo),t)return o.then(l=>{ho(e,l)}).catch(l=>{hs(l,e,0)});e.asyncDep=o}else ho(e,o)}else go(e)}function ho(e,t,n){me(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ae(t)&&(e.setupState=Ci(t)),go(e)}function go(e,t,n){const s=e.type;e.render||(e.render=s.render||Qt)}const xu={get(e,t){return Ue(e,"get",""),e[t]}};function yu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,xu),slots:e.slots,emit:e.emit,expose:t}}function Ss(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ci(ha(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in zn)return zn[n](e)},has(t,n){return n in t||n in zn}})):e.proxy}const wu=/(?:^|[-_])(\w)/g,vu=e=>e.replace(wu,t=>t.toUpperCase()).replace(/[-_]/g,"");function _u(e,t=!0){return me(e)?e.displayName||e.name:e.name||t&&e.__name}function mo(e,t,n=!1){let s=_u(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e&&e.parent){const r=i=>{for(const o in i)if(i[o]===t)return o};s=r(e.components||e.parent.type.components)||r(e.appContext.components)}return s?vu(s):n?"App":"Anonymous"}function Tu(e){return me(e)&&"__vccOpts"in e}const Re=(e,t)=>wa(e,t,Vn);function ku(e,t,n){const s=arguments.length;return s===2?Ae(t)&&!X(t)?_s(t)?Me(e,null,[t]):Me(e,t):Me(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&_s(n)&&(n=[n]),Me(e,t,n))}const Su="3.5.18";let yr;const bo=typeof window!="undefined"&&window.trustedTypes;if(bo)try{yr=bo.createPolicy("vue",{createHTML:e=>e})}catch{}const xo=yr?e=>yr.createHTML(e):e=>e,Eu="http://www.w3.org/2000/svg",Au="http://www.w3.org/1998/Math/MathML",Dt=typeof document!="undefined"?document:null,yo=Dt&&Dt.createElement("template"),Ru={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Dt.createElementNS(Eu,e):t==="mathml"?Dt.createElementNS(Au,e):n?Dt.createElement(e,{is:n}):Dt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Dt.createTextNode(e),createComment:e=>Dt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Dt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{yo.innerHTML=xo(s==="svg"?`${e} `:s==="mathml"?`${e} `:e);const a=yo.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Zt="transition",qn="animation",Wn=Symbol("_vtc"),wo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Cu=ht({},Bi,wo),Pu=(e=>(e.displayName="Transition",e.props=Cu,e))((e,{slots:t})=>ku(Oa,Iu(e),t)),ln=(e,t=[])=>{X(e)?e.forEach(n=>n(...t)):e&&e(...t)},vo=e=>e?X(e)?e.some(t=>t.length>1):e.length>1:!1;function Iu(e){const t={};for(const $ in e)$ in wo||(t[$]=e[$]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:w=`${n}-leave-to`}=e,E=Mu(r),m=E&&E[0],R=E&&E[1],{onBeforeEnter:S,onEnter:V,onEnterCancelled:K,onLeave:O,onLeaveCancelled:A,onBeforeAppear:C=S,onAppear:J=V,onAppearCancelled:te=K}=t,W=($,Y,G,z)=>{$._enterCancelled=z,an($,Y?u:a),an($,Y?c:o),G&&G()},ne=($,Y)=>{$._isLeaving=!1,an($,p),an($,w),an($,g),Y&&Y()},xe=$=>(Y,G)=>{const z=$?J:V,ue=()=>W(Y,$,G);ln(z,[Y,ue]),_o(()=>{an(Y,$?l:i),Nt(Y,$?u:a),vo(z)||To(Y,s,m,ue)})};return ht(t,{onBeforeEnter($){ln(S,[$]),Nt($,i),Nt($,o)},onBeforeAppear($){ln(C,[$]),Nt($,l),Nt($,c)},onEnter:xe(!1),onAppear:xe(!0),onLeave($,Y){$._isLeaving=!0;const G=()=>ne($,Y);Nt($,p),$._enterCancelled?(Nt($,g),Eo()):(Eo(),Nt($,g)),_o(()=>{$._isLeaving&&(an($,p),Nt($,w),vo(O)||To($,s,R,G))}),ln(O,[$,G])},onEnterCancelled($){W($,!1,void 0,!0),ln(K,[$])},onAppearCancelled($){W($,!0,void 0,!0),ln(te,[$])},onLeaveCancelled($){ne($),ln(A,[$])}})}function Mu(e){if(e==null)return null;if(Ae(e))return[wr(e.enter),wr(e.leave)];{const t=wr(e);return[t,t]}}function wr(e){return zl(e)}function Nt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Wn]||(e[Wn]=new Set)).add(t)}function an(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Wn];n&&(n.delete(t),n.size||(e[Wn]=void 0))}function _o(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Lu=0;function To(e,t,n,s){const r=e._endId=++Lu,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=Ou(e,t);if(!o)return s();const c=o+"end";let u=0;const p=()=>{e.removeEventListener(c,g),i()},g=w=>{w.target===e&&++u>=l&&p()};setTimeout(()=>{u(n[E]||"").split(", "),r=s(`${Zt}Delay`),i=s(`${Zt}Duration`),o=ko(r,i),a=s(`${qn}Delay`),l=s(`${qn}Duration`),c=ko(a,l);let u=null,p=0,g=0;t===Zt?o>0&&(u=Zt,p=o,g=i.length):t===qn?c>0&&(u=qn,p=c,g=l.length):(p=Math.max(o,c),u=p>0?o>c?Zt:qn:null,g=u?u===Zt?i.length:l.length:0);const w=u===Zt&&/\b(transform|all)(,|$)/.test(s(`${Zt}Property`).toString());return{type:u,timeout:p,propCount:g,hasTransform:w}}function ko(e,t){for(;e.lengthSo(n)+So(e[s])))}function So(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Eo(){return document.body.offsetHeight}function $u(e,t,n){const s=e[Wn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ao=Symbol("_vod"),Du=Symbol("_vsh"),Nu=Symbol(""),Fu=/(^|;)\s*display\s*:/;function Bu(e,t,n){const s=e.style,r=Ce(n);let i=!1;if(n&&!r){if(t)if(Ce(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Es(s,a,"")}else for(const o in t)n[o]==null&&Es(s,o,"");for(const o in n)o==="display"&&(i=!0),Es(s,o,n[o])}else if(r){if(t!==n){const o=s[Nu];o&&(n+=";"+o),s.cssText=n,i=Fu.test(n)}}else t&&e.removeAttribute("style");Ao in e&&(e[Ao]=i?s.display:"",e[Du]&&(s.display="none"))}const Ro=/\s*!important$/;function Es(e,t,n){if(X(n))n.forEach(s=>Es(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Hu(e,t);Ro.test(n)?e.setProperty(Jt(s),n.replace(Ro,""),"important"):e[s]=n}}const Co=["Webkit","Moz","ms"],vr={};function Hu(e,t){const n=vr[t];if(n)return n;let s=Ut(t);if(s!=="filter"&&s in e)return vr[t]=s;s=ii(s);for(let r=0;r_r||(Vu.then(()=>_r=0),_r=Date.now());function Wu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;_t(Gu(s,n.value),t,5,[s])};return n.value=e,n.attached=qu(),n}function Gu(e,t){if(X(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const $o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ku=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?$u(e,s,o):t==="style"?Bu(e,n,s):es(t)?Fs(t)||Uu(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Yu(e,t,s,o))?(Mo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Io(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ce(s))?Mo(e,Ut(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Io(e,t,s,o))};function Yu(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&$o(t)&&me(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return $o(t)&&Ce(n)?!1:t in e}const Do=e=>{const t=e.props["onUpdate:modelValue"]||!1;return X(t)?n=>ss(t,n):t};function Zu(e){e.target.composing=!0}function No(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Tr=Symbol("_assign"),Xu={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Tr]=Do(r);const i=s||r.props&&r.props.type==="number";wn(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=Us(a)),e[Tr](a)}),n&&wn(e,"change",()=>{e.value=e.value.trim()}),t||(wn(e,"compositionstart",Zu),wn(e,"compositionend",No),wn(e,"change",No))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[Tr]=Do(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Us(e.value):e.value,l=t==null?"":t;a!==l&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===l)||(e.value=l))}},Qu=["ctrl","shift","alt","meta"],Ju={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Qu.some(n=>e[`${n}Key`]&&!t.includes(n))},ct=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const t=tc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=rc(s);if(!r)return;const i=t._component;!me(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,sc(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function sc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function rc(e){return Ce(e)?document.querySelector(e):e}const ic=["aria-pressed"],oc={key:0,viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":"true"},lc={key:1,viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",fill:"none"},ac={__name:"ChatbotToggler",props:{isOpen:{type:Boolean,required:!0}},emits:["toggle"],setup(e){return(t,n)=>(F(),j("button",{class:"fixed bottom-5 right-5 z-9999 grid h-12 w-12 appearance-none place-items-center rounded-full border border-white/20 bg-gradient-to-br from-brand-500 to-brand-600 text-white shadow-[0_20px_36px_-20px_rgba(109,79,194,0.85)] transition-all duration-250 hover:-translate-y-0.5 hover:from-brand-600 hover:to-violet-700 hover:shadow-[0_22px_40px_-22px_rgba(109,79,194,1)] focus:outline-none max-[600px]:bottom-3 max-[600px]:right-3 max-[600px]:h-13 max-[600px]:w-13",style:{"border-radius":"9999px"},"aria-pressed":e.isOpen?"true":"false",onClick:n[0]||(n[0]=s=>t.$emit("toggle"))},[e.isOpen?(F(),j("svg",lc,n[2]||(n[2]=[x("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]))):(F(),j("svg",oc,n[1]||(n[1]=[x("path",{d:"M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",fill:"currentColor",stroke:"currentColor","stroke-width":"2","stroke-linecap":"miter","stroke-linejoin":"miter"},null,-1)])))],8,ic))}},uc={class:"chat-header relative flex min-h-14 items-center justify-between px-4 pb-2.5 pt-3 text-white sm:px-5"},cc={class:"flex min-w-0 flex-1 items-center gap-2 sm:gap-2.5"},fc={xmlns:"http://www.w3.org/2000/svg",width:"35",height:"35",viewBox:"0 0 1024 1024",class:"h-8 w-8 shrink-0 rounded-full bg-white p-1.5 shadow-md motion-safe:animate-soft-float",style:{fill:"#6d4fc2"}},dc={class:"ml-2 flex items-center gap-1.5"},pc=["title"],hc=["title","aria-label"],gc={key:0,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},mc={key:1,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},bc=["title","aria-label"],xc={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},yc={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},wc={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},vc={__name:"ChatHeader",props:{windowMode:{type:String,required:!0},autoReadEnabled:{type:Boolean,required:!0},activeTtsProvider:{type:String,required:!0}},emits:["close","cycleResize","toggleAutoRead"],setup(e){const t=e,n={default:"Compact",half:"Half Screen",full:"Full Screen"},s=Re(()=>n[t.windowMode]||"Compact"),r=Re(()=>t.windowMode==="default"?"Half Screen":t.windowMode==="half"?"Full Screen":"Compact"),i=Re(()=>t.activeTtsProvider==="polly"?"TTS: Polly":t.activeTtsProvider==="browser"?"TTS: Browser":"TTS: Off"),o=Re(()=>t.activeTtsProvider==="polly"?"bg-emerald-500/45":t.activeTtsProvider==="browser"?"bg-amber-500/45":"bg-slate-500/35");return(a,l)=>(F(),j("div",uc,[x("div",cc,[(F(),j("svg",fc,l[3]||(l[3]=[x("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))),l[4]||(l[4]=x("h2",{class:"truncate text-xs font-semibold tracking-[0.01em] sm:text-base text-white/95"},"ChangAI from ERPGulf",-1))]),x("div",dc,[x("span",{class:ye(["hidden rounded-full border border-white/25 px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-white/95 shadow-sm backdrop-blur-sm sm:inline",o.value]),title:`TTS provider: ${i.value}`},Qe(i.value),11,pc),x("button",{class:ye(["h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none sm:flex",e.autoReadEnabled?"bg-white/24 shadow-sm":"hover:bg-white/15"]),style:{"border-radius":"0.375rem"},title:e.autoReadEnabled?"Auto speech on":"Auto speech off","aria-label":e.autoReadEnabled?"Turn off auto speech":"Turn on auto speech",onClick:l[0]||(l[0]=c=>a.$emit("toggleAutoRead"))},[e.autoReadEnabled?(F(),j("svg",gc,l[5]||(l[5]=[x("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),x("path",{d:"M15 9a4 4 0 0 1 0 6"},null,-1),x("path",{d:"M18 7a7 7 0 0 1 0 10"},null,-1)]))):(F(),j("svg",mc,l[6]||(l[6]=[x("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),x("path",{d:"M22 9l-6 6"},null,-1),x("path",{d:"M16 9l6 6"},null,-1)])))],10,hc),x("button",{class:ye(["flex h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none","bg-white/20 shadow-sm hover:bg-white/25"]),style:{"border-radius":"0.375rem"},title:`Resize mode: ${s.value} (click to ${r.value})`,"aria-label":`Resize mode ${s.value}. Click to switch to ${r.value}`,onClick:l[1]||(l[1]=c=>a.$emit("cycleResize"))},[e.windowMode==="default"?(F(),j("svg",xc,l[7]||(l[7]=[x("rect",{x:"7",y:"8",width:"10",height:"8",rx:"2"},null,-1)]))):e.windowMode==="half"?(F(),j("svg",yc,l[8]||(l[8]=[x("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),x("path",{d:"M12 5v14"},null,-1)]))):(F(),j("svg",wc,l[9]||(l[9]=[x("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),x("path",{d:"M8 8H6v2M16 8h2v2M8 16H6v-2M16 16h2v-2"},null,-1)])))],8,bc),x("button",{class:"grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-white/20 text-white transition-all duration-200 hover:scale-105 hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70",style:{"border-radius":"9999px"},"aria-label":"Close chatbot",onClick:l[2]||(l[2]=c=>a.$emit("close"))},l[10]||(l[10]=[x("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[x("path",{d:"M6 9l6 6 6-6"})],-1)]))])]))}},_c={class:"flex gap-1.5 border-b border-slate-200/80 px-2.5 pb-2.5 pt-1"},Tc=["onClick"],kc={class:"inline-flex items-center gap-1.5"},Sc={__name:"TabBar",props:{modelValue:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e){const t=e,n=Re(()=>{const s=[{id:"chat",label:"Chats"},{id:"debug",label:"Debug"},{id:"support",label:"Support"},{id:"settings",label:"Settings"}];return t.debugEnabled?s:s.filter(r=>r.id!=="debug")});return(s,r)=>(F(),j("div",_c,[(F(!0),j(Be,null,ys(n.value,i=>(F(),j("button",{key:i.id,class:ye(["group min-w-0 flex-1 h-9 appearance-none rounded-lg border border-transparent bg-transparent px-2 text-xs font-semibold transition-all duration-200 focus:outline-none",e.modelValue===i.id?"border-white/30 bg-linear-to-r from-violet-300/36 via-indigo-300/30 to-sky-300/28 text-white shadow-[0_4px_10px_rgba(20,24,40,0.22)]":"text-white/80 hover:border-white/25 hover:bg-white/12 hover:text-white"]),onClick:o=>s.$emit("update:modelValue",i.id)},[x("span",kc,[x("span",{class:ye(["h-1.5 w-1.5 rounded-full transition-colors duration-200",e.modelValue===i.id?"bg-white":"bg-white/40 group-hover:bg-white/70"])},null,2),gr(" "+Qe(i.label),1)])],10,Tc))),128))]))}},Ec=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Ac={},Rc={xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 1024 1024",class:"h-7.5 w-7.5 shrink-0 self-end rounded-full bg-gradient-to-br from-brand-500 to-brand-600 p-1.5 fill-white shadow-[0_10px_18px_-12px_rgba(109,79,194,0.85)]"};function Cc(e,t){return F(),j("svg",Rc,t[0]||(t[0]=[x("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))}const Bo=Ec(Ac,[["render",Cc]]),As={PIPELINE:"changai.changai.api.v2.text2sql_pipeline_v2.run_text2sql_pipeline",SUPPORT:"changai.changai.api.v2.text2sql_pipeline_v2.support_bot",SETTINGS:"changai.changai.api.v2.text2sql_pipeline_v2.get_frontend_settings",TTS:"changai.changai.api.v2.text2sql_pipeline_v2.synthesize_tts"};function kr(e,t={},n="actual"){return n==="test"?Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify(t)}`}):!window.frappe||!window.frappe.call?Promise.reject(new Error("Frappe API is unavailable in actual mode.")):new Promise((s,r)=>{window.frappe.call({method:e,args:t,callback(i){s(i.message)},error(i){r(i)}})})}function Pc(e,t,n="actual",s=null,r){if(n==="test")return{promise:Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify({user_question:e,chat_id:t,request_id:s,sendNonErptoAI:r})}`}),cancel:()=>!1};if(!window.frappe||!window.frappe.call)return{promise:Promise.reject(new Error("Frappe API is unavailable in actual mode.")),cancel:()=>!1};let i=null,o=!1;return{promise:new Promise((c,u)=>{i=window.frappe.call({method:As.PIPELINE,args:{user_question:e,chat_id:t,request_id:s,sendNonErptoAI:r},callback(p){o=!0,c(p.message)},error(p){o=!0,u(p)}})}),cancel:()=>o||!i||typeof i.abort!="function"?!1:(i.abort(),o=!0,!0)}}function Ic(e,t="actual"){return kr(As.SUPPORT,{message:e},t)}function Mc(e="actual"){return kr(As.SETTINGS,{},e)}function Lc(e,t="Zayd",n="actual"){return kr(As.TTS,{text:e,voice_id:t},n)}function Sr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var un=Sr();function Ho(e){un=e}var cn={exec:()=>null};function ie(e,t=""){let n=typeof e=="string"?e:e.source,s={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(qe.caret,"$1"),n=n.replace(r,o),s},getRegex:()=>new RegExp(n,t)};return s}var Oc=((e="")=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},$c=/^(?:[ \t]*(?:\n|$))+/,Dc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Nc=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Fc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Er=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,zo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Uo=ie(zo).replace(/bull/g,Er).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Bc=ie(zo).replace(/bull/g,Er).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ar=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Hc=/^[^\n]+/,Rr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,zc=ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Rr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Uc=ie(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Er).getRegex(),Rs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Cr=/|$))/,jc=ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Cr).replace("tag",Rs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),jo=ie(Ar).replace("hr",Gn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex(),Vc=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",jo).getRegex(),Pr={blockquote:Vc,code:Dc,def:zc,fences:Nc,heading:Fc,hr:Gn,html:jc,lheading:Uo,list:Uc,newline:$c,paragraph:jo,table:cn,text:Hc},Vo=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex(),qc={...Pr,lheading:Bc,table:Vo,paragraph:ie(Ar).replace("hr",Gn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex()},Wc={...Pr,html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:cn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie(Ar).replace("hr",Gn).replace("heading",` *#{1,6} *[^
+]`).replace("lheading",Uo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Gc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kc=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,qo=/^( {2,}|\\)\n(?!\s*$)/,Yc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k (?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Oc?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Go=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,ef=ie(Go,"u").replace(/punct/g,vn).getRegex(),tf=ie(Go,"u").replace(/punct/g,Wo).getRegex(),Ko="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nf=ie(Ko,"gu").replace(/notPunctSpace/g,Ir).replace(/punctSpace/g,Cs).replace(/punct/g,vn).getRegex(),sf=ie(Ko,"gu").replace(/notPunctSpace/g,Qc).replace(/punctSpace/g,Xc).replace(/punct/g,Wo).getRegex(),rf=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ir).replace(/punctSpace/g,Cs).replace(/punct/g,vn).getRegex(),of=ie(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,vn).getRegex(),lf="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",af=ie(lf,"gu").replace(/notPunctSpace/g,Ir).replace(/punctSpace/g,Cs).replace(/punct/g,vn).getRegex(),uf=ie(/\\(punct)/,"gu").replace(/punct/g,vn).getRegex(),cf=ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ff=ie(Cr).replace("(?:-->|$)","-->").getRegex(),df=ie("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ff).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ps=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,pf=ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ps).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Yo=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",Ps).replace("ref",Rr).getRegex(),Zo=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Rr).getRegex(),hf=ie("reflink|nolink(?!\\()","g").replace("reflink",Yo).replace("nolink",Zo).getRegex(),Xo=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Mr={_backpedal:cn,anyPunctuation:uf,autolink:cf,blockSkip:Jc,br:qo,code:Kc,del:cn,delLDelim:cn,delRDelim:cn,emStrongLDelim:ef,emStrongRDelimAst:nf,emStrongRDelimUnd:rf,escape:Gc,link:pf,nolink:Zo,punctuation:Zc,reflink:Yo,reflinkSearch:hf,tag:df,text:Yc,url:cn},gf={...Mr,link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",Ps).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ps).getRegex()},Lr={...Mr,emStrongRDelimAst:sf,emStrongLDelim:tf,delLDelim:of,delRDelim:af,url:ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Xo).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Qo=e=>bf[e];function Rt(e,t){if(t){if(qe.escapeTest.test(e))return e.replace(qe.escapeReplace,Qo)}else if(qe.escapeTestNoEncode.test(e))return e.replace(qe.escapeReplaceNoEncode,Qo);return e}function Jo(e){try{e=encodeURI(e).replace(qe.percentDecode,"%")}catch{return null}return e}function el(e,t){var i;let n=e.replace(qe.findPipe,(o,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),s=n.split(qe.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length=0&&qe.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
+`)}function xf(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let s=0;s0?-2:-1}function yf(e,t=0){let n=t,s="";for(let r of e)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function nl(e,t,n,s,r){let i=t.href,o=t.title||null,a=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,l}function wf(e,t,n){let s=e.match(n.other.indentCodeCompensation);if(s===null)return t;let r=s[1];return t.split(`
+`).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(`
+`)}var Ms=class{constructor(e){we(this,"options");we(this,"rules");we(this,"lexer");this.options=e||un}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:tl(t[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=wf(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=Xt(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:Xt(t[0],`
+`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Xt(t[0],`
+`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Xt(t[0],`
+`).split(`
+`),s="",r="",i=[];for(;n.length>0;){let o=!1,a=[],l;for(l=0;l1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),o=!1;for(;e;){let l=!1,c="",u="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let p=yf(t[2].split(`
+`,1)[0],t[1].length),g=e.split(`
+`,1)[0],w=!p.trim(),E=0;if(this.options.pedantic?(E=2,u=p.trimStart()):w?E=t[1].length+1:(E=p.search(this.rules.other.nonSpaceChar),E=E>4?1:E,u=p.slice(E),E+=t[1].length),w&&this.rules.other.blankLine.test(g)&&(c+=g+`
+`,e=e.substring(g.length+1),l=!0),!l){let m=this.rules.other.nextBulletRegex(E),R=this.rules.other.hrRegex(E),S=this.rules.other.fencesBeginRegex(E),V=this.rules.other.headingBeginRegex(E),K=this.rules.other.htmlBeginRegex(E),O=this.rules.other.blockquoteBeginRegex(E);for(;e;){let A=e.split(`
+`,1)[0],C;if(g=A,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),C=g):C=g.replace(this.rules.other.tabCharGlobal," "),S.test(g)||V.test(g)||K.test(g)||O.test(g)||m.test(g)||R.test(g))break;if(C.search(this.rules.other.nonSpaceChar)>=E||!g.trim())u+=`
+`+C.slice(E);else{if(w||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(p)||V.test(p)||R.test(p))break;u+=`
+`+g}w=!g.trim(),c+=A+`
+`,e=e.substring(A.length+1),p=C.slice(E)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0)),r.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),r.raw+=c}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l of r.items){this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]);let c=l.tokens[0];if(l.task&&((c==null?void 0:c.type)==="text"||(c==null?void 0:c.type)==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let u=this.rules.other.listTaskCheckbox.exec(l.raw);if(u){let p={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};l.checked=p.checked,r.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=p.raw+l.tokens[0].raw,l.tokens[0].text=p.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(p)):l.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):l.tokens.unshift(p)}}else l.task&&(l.task=!1);if(!r.loose){let u=l.tokens.filter(g=>g.type==="space"),p=u.length>0&&u.some(g=>this.rules.other.anyLine.test(g.raw));r.loose=p}}if(r.loose)for(let l of r.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=tl(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:Xt(t[0],`
+`),href:s,title:r}}}table(e){var o;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=el(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(o=t[3])!=null&&o.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
+`):[],i={type:"table",raw:Xt(t[0],`
+`),header:[],align:[],rows:[]};if(n.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:Xt(t[0],`
+`),depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
+`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Xt(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=xf(t[2],"()");if(i===-2)return;if(i>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],r=i[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),nl(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return nl(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+r);(s=c.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(o=[...i].length,s[3]||s[4]){a+=o;continue}else if((s[5]||s[6])&&r%3&&!((r+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let u=[...s[0]][0].length,p=e.slice(0,r+s.index+u+o);if(Math.min(r,o)%2){let w=p.slice(1,-1);return{type:"em",raw:p,text:w,tokens:this.lexer.inlineTokens(w)}}let g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+r);(s=l.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(o=[...i].length,o!==r))continue;if(s[3]||s[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let c=[...s[0]][0].length,u=e.slice(0,r+s.index+c+o),p=u.slice(r,-r);return{type:"del",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,s;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=(s=(n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])!=null?s:"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},mt=class Qr{constructor(t){we(this,"tokens");we(this,"options");we(this,"state");we(this,"inlineQueue");we(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||un,this.options.tokenizer=this.options.tokenizer||new Ms,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:qe,block:Is.normal,inline:Kn.normal};this.options.pedantic?(n.block=Is.pedantic,n.inline=Kn.pedantic):this.options.gfm&&(n.block=Is.gfm,this.options.breaks?n.inline=Kn.breaks:n.inline=Kn.gfm),this.tokenizer.rules=n}static get rules(){return{block:Is,inline:Kn}}static lex(t,n){return new Qr(n).lex(t)}static lexInline(t,n){return new Qr(n).inlineTokens(t)}lex(t){t=t.replace(qe.carriageReturn,`
+`),this.blockTokens(t,this.tokens);for(let n=0;n(l=u.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let u=n.at(-1);l.raw.length===1&&u!==void 0?u.raw+=`
+`:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
+`)?"":`
+`)+l.raw,u.text+=`
+`+l.text,this.inlineQueue.at(-1).src=u.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
+`)?"":`
+`)+l.raw,u.text+=`
+`+l.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},n.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let c=t;if((a=this.options.extensions)!=null&&a.startBlock){let u=1/0,p=t.slice(1),g;this.options.extensions.startBlock.forEach(w=>{g=w.call({lexer:this},p),typeof g=="number"&&g>=0&&(u=Math.min(u,g))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(this.state.top&&(l=this.tokenizer.paragraph(c))){let u=n.at(-1);s&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(`
+`)?"":`
+`)+l.raw,u.text+=`
+`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(l),s=c.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
+`)?"":`
+`)+l.raw,u.text+=`
+`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var c,u,p,g,w,E;this.tokenizer.lexer=this;let s=t,r=null;if(this.tokens.links){let m=Object.keys(this.tokens.links);if(m.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)m.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)i=r[2]?r[2].length:0,s=s.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=(p=(u=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:u.call({lexer:this},s))!=null?p:s;let o=!1,a="",l=1/0;for(;t;){if(t.length(m=S.call({lexer:this},t,n))?(t=t.substring(m.raw.length),n.push(m),!0):!1))continue;if(m=this.tokenizer.escape(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.tag(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.link(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(m.raw.length);let S=n.at(-1);m.type==="text"&&(S==null?void 0:S.type)==="text"?(S.raw+=m.raw,S.text+=m.text):n.push(m);continue}if(m=this.tokenizer.emStrong(t,s,a)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.codespan(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.br(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.del(t,s,a)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.autolink(t)){t=t.substring(m.raw.length),n.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(t))){t=t.substring(m.raw.length),n.push(m);continue}let R=t;if((E=this.options.extensions)!=null&&E.startInline){let S=1/0,V=t.slice(1),K;this.options.extensions.startInline.forEach(O=>{K=O.call({lexer:this},V),typeof K=="number"&&K>=0&&(S=Math.min(S,K))}),S<1/0&&S>=0&&(R=t.substring(0,S+1))}if(m=this.tokenizer.inlineText(R)){t=t.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(a=m.raw.slice(-1)),o=!0;let S=n.at(-1);(S==null?void 0:S.type)==="text"?(S.raw+=m.raw,S.text+=m.text):n.push(m);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return n}infiniteLoopError(t){let n="Infinite loop on byte: "+t;if(!this.options.silent)throw new Error(n)}},Ls=class{constructor(e){we(this,"options");we(this,"parser");this.options=e||un}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let s=(i=(t||"").match(qe.notSpaceStart))==null?void 0:i[0],r=e.replace(qe.endingNewline,"")+`
+`;return s?''+(n?r:Rt(r,!0))+`
+`:""+(n?r:Rt(r,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}
+`}hr(e){return`
+`}list(e){let t=e.ordered,n=e.start,s="";for(let o=0;o
+`+s+""+r+`>
+`}listitem(e){return`${this.parser.parse(e.tokens)}
+`}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`${this.parser.parseInline(e)}
+`}table(e){let t="",n="";for(let r=0;r${s}`),`
+`}tablerow({text:e}){return`
+${e}
+`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`${n}>
+`}strong({tokens:e}){return`${this.parser.parseInline(e)} `}em({tokens:e}){return`${this.parser.parseInline(e)} `}codespan({text:e}){return`${Rt(e,!0)}`}br(e){return" "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let s=this.parser.parseInline(n),r=Jo(e);if(r===null)return s;e=r;let i='"+s+" ",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=Jo(e);if(r===null)return Rt(n);e=r;let i=` ",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Rt(e.text)}},Or=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}},bt=class Jr{constructor(t){we(this,"options");we(this,"renderer");we(this,"textRenderer");this.options=t||un,this.options.renderer=this.options.renderer||new Ls,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Or}static parse(t,n){return new Jr(n).parse(t)}static parseInline(t,n){return new Jr(n).parseInline(t)}parse(t){var s,r;this.renderer.parser=this;let n="";for(let i=0;i{let l=o[a].flat(1/0);n=n.concat(this.walkTokens(l,t))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=t.renderers[r.name];i?t.renderers[r.name]=function(...o){let a=r.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[r.level];i?i.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new Ls(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,a=n.renderer[o],l=r[o];r[o]=(...c)=>{let u=a.apply(r,c);return u===!1&&(u=l.apply(r,c)),u||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Ms(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,a=n.tokenizer[o],l=r[o];r[o]=(...c)=>{let u=a.apply(r,c);return u===!1&&(u=l.apply(r,c)),u}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new Yn;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,a=n.hooks[o],l=r[o];Yn.passThroughHooks.has(i)?r[o]=c=>{if(this.defaults.async&&Yn.passThroughHooksRespectAsync.has(i))return(async()=>{let p=await a.call(r,c);return l.call(r,p)})();let u=a.call(r,c);return l.call(r,u)}:r[o]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await a.apply(r,c);return p===!1&&(p=await l.apply(r,c)),p})();let u=a.apply(r,c);return u===!1&&(u=l.apply(r,c)),u}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),r&&(a=a.concat(r.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return mt.lex(e,t!=null?t:this.defaults)}parser(e,t){return bt.parse(e,t!=null?t:this.defaults)}parseMarkdown(e){return(t,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(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 i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let o=r.hooks?await r.hooks.preprocess(t):t,a=await(r.hooks?await r.hooks.provideLexer(e):e?mt.lex:mt.lexInline)(o,r),l=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let c=await(r.hooks?await r.hooks.provideParser(e):e?bt.parse:bt.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(c):c})().catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let o=(r.hooks?r.hooks.provideLexer(e):e?mt.lex:mt.lexInline)(t,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(e):e?bt.parse:bt.parseInline)(o,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(o){return i(o)}}}onError(e,t){return n=>{if(n.message+=`
+Please report this to https://github.com/markedjs/marked.`,e){let s="An error occurred:
"+Rt(n.message+"",!0)+" ";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},fn=new vf;function be(e,t){return fn.parse(e,t)}be.options=be.setOptions=function(e){return fn.setOptions(e),be.defaults=fn.defaults,Ho(be.defaults),be},be.getDefaults=Sr,be.defaults=un,be.use=function(...e){return fn.use(...e),be.defaults=fn.defaults,Ho(be.defaults),be},be.walkTokens=function(e,t){return fn.walkTokens(e,t)},be.parseInline=fn.parseInline,be.Parser=bt,be.parser=bt.parse,be.Renderer=Ls,be.TextRenderer=Or,be.Lexer=mt,be.lexer=mt.lex,be.Tokenizer=Ms,be.Hooks=Yn,be.parse=be,be.options,be.setOptions,be.use,be.walkTokens,be.parseInline,bt.parse,mt.lex;function sl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n2?s-2:0),i=2;i1?n-1:0),r=1;r1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:Zn;if(il&&il(e,null),!Ze(t))return e;let s=t.length;for(;s--;){let r=t[s];if(typeof r=="string"){const i=n(r);i!==r&&(Af(t)||(t[s]=i),r=i)}e[r]=!0}return e}function Df(e){for(let t=0;t/g),jf=ft(/\${[\w\W]*/g),Vf=ft(/^data-[\-\w.\u00B7-\uFFFF]+$/),qf=ft(/^aria-[\-\w]+$/),ml=ft(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wf=ft(/^(?:\w+script|data):/i),Gf=ft(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Kf=ft(/^html$/i),Yf=ft(/^[a-z][.\w]*(-[.\w]+)+$/i),An={element:1,text:3,progressingInstruction:7,comment:8,document:9},Zf=function(){return typeof window=="undefined"?null:window},Xf=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(s=n.getAttribute(r));const i="dompurify"+(s?"#"+s:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return null}},bl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zf();const t=U=>xl(U);if(t.version="3.4.3",t.removed=[],!e||!e.document||e.document.nodeType!==An.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const s=n,r=s.currentScript,i=e.DocumentFragment,o=e.HTMLTemplateElement,a=e.Node,l=e.Element,c=e.NodeFilter,u=e.NamedNodeMap,p=u===void 0?e.NamedNodeMap||e.MozNamedAttrMap:u,g=e.HTMLFormElement,w=e.DOMParser,E=e.trustedTypes,m=l.prototype,R=En(m,"cloneNode"),S=En(m,"remove"),V=En(m,"nextSibling"),K=En(m,"childNodes"),O=En(m,"parentNode");if(typeof o=="function"){const U=n.createElement("template");U.content&&U.content.ownerDocument&&(n=U.content.ownerDocument)}let A,C="";const J=n,te=J.implementation,W=J.createNodeIterator,ne=J.createDocumentFragment,xe=J.getElementsByTagName,$=s.importNode;let Y=bl();t.isSupported=typeof rl=="function"&&typeof O=="function"&&te&&te.createHTMLDocument!==void 0;const G=zf,z=Uf,ue=jf,Se=Vf,We=qf,xt=Wf,ce=Gf,N=Yf;let de=ml,pe=null;const Te=Z({},[...dl,...Fr,...Br,...Hr,...pl]);let ve=null;const ge=Z({},[...hl,...zr,...gl,...$s]);let le=Object.seal(_n(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),yt=null,Ct=null;const ze=Object.seal(_n(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ur=!0,f=!0,h=!1,b=!0,T=!1,v=!0,_=!1,M=!1,I=!1,P=!1,k=!1,B=!1,L=!0,H=!1;const q="user-content-";let ee=!0,fe=!1,se={},ke=null;const Oe=Z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let rt=null;const it=Z({},["audio","video","img","source","image","track"]);let Ft=null;const Qn=Z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let Bt=ot,jr=!1,Vr=null;const hp=Z({},[$e,Xe,ot],Nr);let qr=Z({},["mi","mo","mn","ms","mtext"]),Wr=Z({},["annotation-xml"]);const gp=Z({},["title","style","font","a","script"]);let Jn=null;const mp=["application/xhtml+xml","text/html"],bp="text/html";let Le=null,Rn=null;const xp=n.createElement("form"),Sl=function(d){return d instanceof RegExp||d instanceof Function},Gr=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rn&&Rn===d)return;(!d||typeof d!="object")&&(d={}),d=et(d),Jn=mp.indexOf(d.PARSER_MEDIA_TYPE)===-1?bp:d.PARSER_MEDIA_TYPE,Le=Jn==="application/xhtml+xml"?Nr:Zn,pe=Ee(d,"ALLOWED_TAGS")&&Ze(d.ALLOWED_TAGS)?Z({},d.ALLOWED_TAGS,Le):Te,ve=Ee(d,"ALLOWED_ATTR")&&Ze(d.ALLOWED_ATTR)?Z({},d.ALLOWED_ATTR,Le):ge,Vr=Ee(d,"ALLOWED_NAMESPACES")&&Ze(d.ALLOWED_NAMESPACES)?Z({},d.ALLOWED_NAMESPACES,Nr):hp,Ft=Ee(d,"ADD_URI_SAFE_ATTR")&&Ze(d.ADD_URI_SAFE_ATTR)?Z(et(Qn),d.ADD_URI_SAFE_ATTR,Le):Qn,rt=Ee(d,"ADD_DATA_URI_TAGS")&&Ze(d.ADD_DATA_URI_TAGS)?Z(et(it),d.ADD_DATA_URI_TAGS,Le):it,ke=Ee(d,"FORBID_CONTENTS")&&Ze(d.FORBID_CONTENTS)?Z({},d.FORBID_CONTENTS,Le):Oe,yt=Ee(d,"FORBID_TAGS")&&Ze(d.FORBID_TAGS)?Z({},d.FORBID_TAGS,Le):et({}),Ct=Ee(d,"FORBID_ATTR")&&Ze(d.FORBID_ATTR)?Z({},d.FORBID_ATTR,Le):et({}),se=Ee(d,"USE_PROFILES")?d.USE_PROFILES&&typeof d.USE_PROFILES=="object"?et(d.USE_PROFILES):d.USE_PROFILES:!1,Ur=d.ALLOW_ARIA_ATTR!==!1,f=d.ALLOW_DATA_ATTR!==!1,h=d.ALLOW_UNKNOWN_PROTOCOLS||!1,b=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,T=d.SAFE_FOR_TEMPLATES||!1,v=d.SAFE_FOR_XML!==!1,_=d.WHOLE_DOCUMENT||!1,P=d.RETURN_DOM||!1,k=d.RETURN_DOM_FRAGMENT||!1,B=d.RETURN_TRUSTED_TYPE||!1,I=d.FORCE_BODY||!1,L=d.SANITIZE_DOM!==!1,H=d.SANITIZE_NAMED_PROPS||!1,ee=d.KEEP_CONTENT!==!1,fe=d.IN_PLACE||!1,de=Ff(d.ALLOWED_URI_REGEXP)?d.ALLOWED_URI_REGEXP:ml,Bt=typeof d.NAMESPACE=="string"?d.NAMESPACE:ot,qr=Ee(d,"MATHML_TEXT_INTEGRATION_POINTS")&&d.MATHML_TEXT_INTEGRATION_POINTS&&typeof d.MATHML_TEXT_INTEGRATION_POINTS=="object"?et(d.MATHML_TEXT_INTEGRATION_POINTS):Z({},["mi","mo","mn","ms","mtext"]),Wr=Ee(d,"HTML_INTEGRATION_POINTS")&&d.HTML_INTEGRATION_POINTS&&typeof d.HTML_INTEGRATION_POINTS=="object"?et(d.HTML_INTEGRATION_POINTS):Z({},["annotation-xml"]);const y=Ee(d,"CUSTOM_ELEMENT_HANDLING")&&d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING=="object"?et(d.CUSTOM_ELEMENT_HANDLING):_n(null);if(le=_n(null),Ee(y,"tagNameCheck")&&Sl(y.tagNameCheck)&&(le.tagNameCheck=y.tagNameCheck),Ee(y,"attributeNameCheck")&&Sl(y.attributeNameCheck)&&(le.attributeNameCheck=y.attributeNameCheck),Ee(y,"allowCustomizedBuiltInElements")&&typeof y.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=y.allowCustomizedBuiltInElements),T&&(f=!1),k&&(P=!0),se&&(pe=Z({},pl),ve=_n(null),se.html===!0&&(Z(pe,dl),Z(ve,hl)),se.svg===!0&&(Z(pe,Fr),Z(ve,zr),Z(ve,$s)),se.svgFilters===!0&&(Z(pe,Br),Z(ve,zr),Z(ve,$s)),se.mathMl===!0&&(Z(pe,Hr),Z(ve,gl),Z(ve,$s))),ze.tagCheck=null,ze.attributeCheck=null,Ee(d,"ADD_TAGS")&&(typeof d.ADD_TAGS=="function"?ze.tagCheck=d.ADD_TAGS:Ze(d.ADD_TAGS)&&(pe===Te&&(pe=et(pe)),Z(pe,d.ADD_TAGS,Le))),Ee(d,"ADD_ATTR")&&(typeof d.ADD_ATTR=="function"?ze.attributeCheck=d.ADD_ATTR:Ze(d.ADD_ATTR)&&(ve===ge&&(ve=et(ve)),Z(ve,d.ADD_ATTR,Le))),Ee(d,"ADD_URI_SAFE_ATTR")&&Ze(d.ADD_URI_SAFE_ATTR)&&Z(Ft,d.ADD_URI_SAFE_ATTR,Le),Ee(d,"FORBID_CONTENTS")&&Ze(d.FORBID_CONTENTS)&&(ke===Oe&&(ke=et(ke)),Z(ke,d.FORBID_CONTENTS,Le)),Ee(d,"ADD_FORBID_CONTENTS")&&Ze(d.ADD_FORBID_CONTENTS)&&(ke===Oe&&(ke=et(ke)),Z(ke,d.ADD_FORBID_CONTENTS,Le)),ee&&(pe["#text"]=!0),_&&Z(pe,["html","head","body"]),pe.table&&(Z(pe,["tbody"]),delete yt.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw Os('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Os('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=d.TRUSTED_TYPES_POLICY,C=A.createHTML("")}else A===void 0&&(A=Xf(E,r)),A!==null&&typeof C=="string"&&(C=A.createHTML(""));Ye&&Ye(d),Rn=d},El=Z({},[...Fr,...Br,...Bf]),Al=Z({},[...Hr,...Hf]),yp=function(d){let y=O(d);(!y||!y.tagName)&&(y={namespaceURI:Bt,tagName:"template"});const D=Zn(d.tagName),ae=Zn(y.tagName);return Vr[d.namespaceURI]?d.namespaceURI===Xe?y.namespaceURI===ot?D==="svg":y.namespaceURI===$e?D==="svg"&&(ae==="annotation-xml"||qr[ae]):!!El[D]:d.namespaceURI===$e?y.namespaceURI===ot?D==="math":y.namespaceURI===Xe?D==="math"&&Wr[ae]:!!Al[D]:d.namespaceURI===ot?y.namespaceURI===Xe&&!Wr[ae]||y.namespaceURI===$e&&!qr[ae]?!1:!Al[D]&&(gp[D]||!El[D]):!!(Jn==="application/xhtml+xml"&&Vr[d.namespaceURI]):!1},wt=function(d){kn(t.removed,{element:d});try{O(d).removeChild(d)}catch{S(d)}},dn=function(d,y){try{kn(t.removed,{attribute:y.getAttributeNode(d),from:y})}catch{kn(t.removed,{attribute:null,from:y})}if(y.removeAttribute(d),d==="is")if(P||k)try{wt(y)}catch{}else try{y.setAttribute(d,"")}catch{}},Rl=function(d){let y=null,D=null;if(I)d=" "+d;else{const Ie=al(d,/^[\r\n\t ]+/);D=Ie&&Ie[0]}Jn==="application/xhtml+xml"&&Bt===ot&&(d=''+d+"");const ae=A?A.createHTML(d):d;if(Bt===ot)try{y=new w().parseFromString(ae,Jn)}catch{}if(!y||!y.documentElement){y=te.createDocument(Bt,"template",null);try{y.documentElement.innerHTML=jr?C:ae}catch{}}const De=y.body||y.documentElement;return d&&D&&De.insertBefore(n.createTextNode(D),De.childNodes[0]||null),Bt===ot?xe.call(y,_?"html":"body")[0]:_?y.documentElement:De},Cl=function(d){return W.call(d.ownerDocument||d,d,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Kr=function(d){return d instanceof g&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof p)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},Yr=function(d){return typeof a=="function"&&d instanceof a};function Ht(U,d,y){Tn(U,D=>{D.call(t,d,y,Rn)})}const Pl=function(d){let y=null;if(Ht(Y.beforeSanitizeElements,d,null),Kr(d))return wt(d),!0;const D=Le(d.nodeName);if(Ht(Y.uponSanitizeElement,d,{tagName:D,allowedTags:pe}),v&&d.hasChildNodes()&&!Yr(d.firstElementChild)&&He(/<[/\w!]/g,d.innerHTML)&&He(/<[/\w!]/g,d.textContent)||v&&d.namespaceURI===ot&&D==="style"&&Yr(d.firstElementChild)||d.nodeType===An.progressingInstruction||v&&d.nodeType===An.comment&&He(/<[/\w]/g,d.data))return wt(d),!0;if(yt[D]||!(ze.tagCheck instanceof Function&&ze.tagCheck(D))&&!pe[D]){if(!yt[D]&&Ml(D)&&(le.tagNameCheck instanceof RegExp&&He(le.tagNameCheck,D)||le.tagNameCheck instanceof Function&&le.tagNameCheck(D)))return!1;if(ee&&!ke[D]){const ae=O(d)||d.parentNode,De=K(d)||d.childNodes;if(De&&ae){const Ie=De.length;for(let tt=Ie-1;tt>=0;--tt){const dt=R(De[tt],!0);ae.insertBefore(dt,V(d))}}}return wt(d),!0}return d instanceof l&&!yp(d)||(D==="noscript"||D==="noembed"||D==="noframes")&&He(/<\/no(script|embed|frames)/i,d.innerHTML)?(wt(d),!0):(T&&d.nodeType===An.text&&(y=d.textContent,Tn([G,z,ue],ae=>{y=Sn(y,ae," ")}),d.textContent!==y&&(kn(t.removed,{element:d.cloneNode()}),d.textContent=y)),Ht(Y.afterSanitizeElements,d,null),!1)},Il=function(d,y,D){if(Ct[y]||L&&(y==="id"||y==="name")&&(D in n||D in xp))return!1;const ae=ve[y]||ze.attributeCheck instanceof Function&&ze.attributeCheck(y,d);if(!(f&&!Ct[y]&&He(Se,y))){if(!(Ur&&He(We,y))){if(!ae||Ct[y]){if(!(Ml(d)&&(le.tagNameCheck instanceof RegExp&&He(le.tagNameCheck,d)||le.tagNameCheck instanceof Function&&le.tagNameCheck(d))&&(le.attributeNameCheck instanceof RegExp&&He(le.attributeNameCheck,y)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(y,d))||y==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&He(le.tagNameCheck,D)||le.tagNameCheck instanceof Function&&le.tagNameCheck(D))))return!1}else if(!Ft[y]){if(!He(de,Sn(D,ce,""))){if(!((y==="src"||y==="xlink:href"||y==="href")&&d!=="script"&&ul(D,"data:")===0&&rt[d])){if(!(h&&!He(xt,Sn(D,ce,"")))){if(D)return!1}}}}}}return!0},wp=Z({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ml=function(d){return!wp[Zn(d)]&&He(N,d)},Ll=function(d){Ht(Y.beforeSanitizeAttributes,d,null);const y=d.attributes;if(!y||Kr(d))return;const D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve,forceKeepAttr:void 0};let ae=y.length;for(;ae--;){const De=y[ae],Ie=De.name,tt=De.namespaceURI,dt=De.value,vt=Le(Ie),Xr=dt;let Ne=Ie==="value"?Xr:Mf(Xr);if(D.attrName=vt,D.attrValue=Ne,D.keepAttr=!0,D.forceKeepAttr=void 0,Ht(Y.uponSanitizeAttribute,d,D),Ne=D.attrValue,H&&(vt==="id"||vt==="name")&&ul(Ne,q)!==0&&(dn(Ie,d),Ne=q+Ne),v&&He(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ne)){dn(Ie,d);continue}if(vt==="attributename"&&al(Ne,"href")){dn(Ie,d);continue}if(D.forceKeepAttr)continue;if(!D.keepAttr){dn(Ie,d);continue}if(!b&&He(/\/>/i,Ne)){dn(Ie,d);continue}T&&Tn([G,z,ue],$l=>{Ne=Sn(Ne,$l," ")});const Ol=Le(d.nodeName);if(!Il(Ol,vt,Ne)){dn(Ie,d);continue}if(A&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!tt)switch(E.getAttributeType(Ol,vt)){case"TrustedHTML":{Ne=A.createHTML(Ne);break}case"TrustedScriptURL":{Ne=A.createScriptURL(Ne);break}}if(Ne!==Xr)try{tt?d.setAttributeNS(tt,Ie,Ne):d.setAttribute(Ie,Ne),Kr(d)?wt(d):ll(t.removed)}catch{dn(Ie,d)}}Ht(Y.afterSanitizeAttributes,d,null)},Zr=function(d){let y=null;const D=Cl(d);for(Ht(Y.beforeSanitizeShadowDOM,d,null);y=D.nextNode();)Ht(Y.uponSanitizeShadowNode,y,null),Pl(y),Ll(y),y.content instanceof i&&Zr(y.content);Ht(Y.afterSanitizeShadowDOM,d,null)},Ns=function(d){if(d.nodeType===An.element&&d.shadowRoot instanceof i){const ae=d.shadowRoot;Ns(ae),Zr(ae)}const y=d.childNodes;if(!y)return;const D=[];Tn(y,ae=>{kn(D,ae)});for(const ae of D)Ns(ae)};return t.sanitize=function(U){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=null,D=null,ae=null,De=null;if(jr=!U,jr&&(U=""),typeof U!="string"&&!Yr(U)&&(U=Nf(U),typeof U!="string"))throw Os("dirty is not a string, aborting");if(!t.isSupported)return U;if(M||Gr(d),t.removed=[],typeof U=="string"&&(fe=!1),fe){const dt=U.nodeName;if(typeof dt=="string"){const vt=Le(dt);if(!pe[vt]||yt[vt])throw Os("root node is forbidden and cannot be sanitized in-place")}Ns(U)}else if(U instanceof a)y=Rl(""),D=y.ownerDocument.importNode(U,!0),D.nodeType===An.element&&D.nodeName==="BODY"||D.nodeName==="HTML"?y=D:y.appendChild(D),Ns(D);else{if(!P&&!T&&!_&&U.indexOf("<")===-1)return A&&B?A.createHTML(U):U;if(y=Rl(U),!y)return P?null:B?C:""}y&&I&&wt(y.firstChild);const Ie=Cl(fe?U:y);for(;ae=Ie.nextNode();)Pl(ae),Ll(ae),ae.content instanceof i&&Zr(ae.content);if(fe)return U;if(P){if(T){y.normalize();let dt=y.innerHTML;Tn([G,z,ue],vt=>{dt=Sn(dt,vt," ")}),y.innerHTML=dt}if(k)for(De=ne.call(y.ownerDocument);y.firstChild;)De.appendChild(y.firstChild);else De=y;return(ve.shadowroot||ve.shadowrootmode)&&(De=$.call(s,De,!0)),De}let tt=_?y.outerHTML:y.innerHTML;return _&&pe["!doctype"]&&y.ownerDocument&&y.ownerDocument.doctype&&y.ownerDocument.doctype.name&&He(Kf,y.ownerDocument.doctype.name)&&(tt="
+`+tt),T&&Tn([G,z,ue],dt=>{tt=Sn(tt,dt," ")}),A&&B?A.createHTML(tt):tt},t.setConfig=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Gr(U),M=!0},t.clearConfig=function(){Rn=null,M=!1},t.isValidAttribute=function(U,d,y){Rn||Gr({});const D=Le(U),ae=Le(d);return Il(D,ae,y)},t.addHook=function(U,d){typeof d=="function"&&kn(Y[U],d)},t.removeHook=function(U,d){if(d!==void 0){const y=Pf(Y[U],d);return y===-1?void 0:If(Y[U],y,1)[0]}return ll(Y[U])},t.removeHooks=function(U){Y[U]=[]},t.removeAllHooks=function(){Y=bl()},t}var Qf=xl();const Jf={key:1,class:"flex min-w-0 max-w-[calc(100%-2.5rem)] flex-1 flex-col max-[600px]:max-w-[calc(100%-2.25rem)]"},ed={key:0,class:"flex w-fit flex-col items-start gap-1"},td=["aria-label"],nd={class:"inline-flex items-center gap-1.5"},sd={class:"text-[8px] font-semibold tracking-[0.12em] uppercase text-[#3a67c9]"},rd={key:1,class:"flex w-fit max-w-full flex-col items-start gap-2"},id={class:"chat-card relative w-fit max-w-full whitespace-pre-line rounded-[10px_10px_10px_3px] px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900"},od=["innerHTML"],ld={key:0,class:"pointer-events-none absolute inset-x-0 bottom-0 h-14 rounded-b-[10px] bg-linear-to-t from-white via-white/92 to-white/0","aria-hidden":"true"},ad={key:0,class:"flex flex-wrap items-center gap-2"},ud=["title","aria-label"],cd={key:1,class:"flex flex-wrap items-center"},fd=["title","aria-label"],dd={viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},pd=["innerHTML"],yl={__name:"ChatMessage",props:{message:{type:Object,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,default:()=>({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Zayd"})}},setup(e){const t=e,n=Q(!1),s=Q(null),r=Q(!1),i=Q(!1),o=Re(()=>typeof window!="undefined"&&"speechSynthesis"in window&&"SpeechSynthesisUtterance"in window);function a(A){typeof window!="undefined"&&window.dispatchEvent(new CustomEvent("changai-tts-provider",{detail:{provider:A}}))}function l(A){if(typeof A!="string")return"";const C=A.replace(/[\u{1F000}-\u{1FFFF}]/gu,"").replace(/[\u{2600}-\u{26FF}]/gu,"").replace(/[\u{2700}-\u{27BF}]/gu,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/#{1,6}\s+/g,"").replace(/[-*+]\s+/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\s+/g," ");return C.includes("<")?(new DOMParser().parseFromString(A,"text/html").body.textContent||"").replace(/\s+/g," ").trim():C.trim()}function c(){o.value&&window.speechSynthesis.cancel(),s.value&&(s.value.pause(),s.value.src="",s.value=null),n.value=!1}function u(){var A,C,J;if(i.value=!i.value,i.value)c();else{const te=m.value;if(!t.autoReadEnabled||!((A=t.ttsConfig)!=null&&A.enableVoiceChat)||!te||E())return;if((C=t.ttsConfig)!=null&&C.pollyAvailable&&((J=t.ttsConfig)!=null&&J.usePolly)){g(te).catch(W=>{p(te)});return}p(te)}}function p(A){if(!o.value||!A)return;window.dispatchEvent(new CustomEvent("changai-tts-stop")),window.speechSynthesis.cancel();const C=new SpeechSynthesisUtterance(A);C.rate=1,C.pitch=1,C.onend=()=>{n.value=!1},C.onerror=()=>{n.value=!1},n.value=!0,a("browser"),window.speechSynthesis.speak(C)}async function g(A){var ne;const C=await Lc(A,((ne=t.ttsConfig)==null?void 0:ne.voiceId)||"Zayd");if(!(C!=null&&C.ok)||!(C!=null&&C.audio_base64))throw new Error((C==null?void 0:C.error)||"Polly synthesis failed");window.dispatchEvent(new CustomEvent("changai-tts-stop")),c();const J=(C==null?void 0:C.mime_type)||"audio/mpeg",te=new Audio(`data:${J};base64,${C.audio_base64}`);s.value=te,n.value=!0;let W=!1;te.onplay=()=>{W=!0,a("polly")},te.onended=()=>{s.value===te&&(s.value=null),n.value=!1},te.onerror=()=>{s.value===te&&(s.value=null),n.value=!1},await te.play(),W||a("polly")}function w(){c()}function E(){var A;return!!((A=t.message)!=null&&A.isStatus)}const m=Re(()=>{var A;return l(((A=t.message)==null?void 0:A.text)||"")}),R=Re(()=>{var A;return((A=t.message)==null?void 0:A.role)!=="user"&&E()}),S=Re(()=>{var A;return(A=t.message)!=null&&A.isStatus?t.message.statusType==="support"?"Sending to support":m.value||"Thinking":""}),V=Re(()=>{var J;if(((J=t.message)==null?void 0:J.role)==="user"||R.value)return!1;const A=m.value,C=A.split(/\n+/).filter(Boolean).length;return A.length>520||C>8}),K=Re(()=>{var A,C;return((A=t.message)==null?void 0:A.role)!=="user"&&!R.value&&((C=t.ttsConfig)==null?void 0:C.enableVoiceChat)}),O=Re(()=>{var C;const A=((C=t.message)==null?void 0:C.text)||"";return Qf.sanitize(be.parse(A))});return rn(()=>t.message.text,async(A,C)=>{var W,ne,xe;if(!t.autoReadEnabled||t.message.role==="user"||i.value)return;if(!((W=t.ttsConfig)!=null&&W.enableVoiceChat)){a("off");return}const J=l(A);if(!J||E())return;const te=l(C||"");if(J!==te){if((ne=t.ttsConfig)!=null&&ne.pollyAvailable&&((xe=t.ttsConfig)!=null&&xe.usePolly))try{await g(J);return}catch{}p(J)}}),rn(()=>t.message.text,()=>{r.value=!1,i.value=!1}),Hn(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-stop",w)}),xs(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-stop",w),n.value&&c()}),(A,C)=>(F(),j("div",{class:ye(["motion-safe:animate-fade-rise flex w-full gap-1.5",e.message.role==="user"?"flex-col items-end":"items-start"])},[e.message.role!=="user"?(F(),St(Bo,{key:0})):Ve("",!0),e.message.role!=="user"?(F(),j("div",Jf,[R.value?(F(),j("div",ed,[x("div",{class:"chat-card inline-flex w-fit rounded-[10px_10px_10px_3px] px-3 py-2",role:"status","aria-live":"polite","aria-label":S.value},[x("div",nd,[C[1]||(C[1]=x("span",{class:"relative inline-flex h-4 w-4 shrink-0 items-center justify-center"},[x("span",{class:"absolute inset-0 rounded-full border border-transparent border-t-[#4b89ff] border-r-[#4b89ff]/70 animate-gemini-arc"}),x("svg",{viewBox:"0 0 24 24",class:"relative h-3 w-3 text-[#4b89ff] animate-gemini-spark","aria-hidden":"true"},[x("path",{fill:"currentColor",d:"M12 2.8c.52 3.22 1.6 5.66 3.22 7.28 1.62 1.62 4.06 2.7 7.28 3.22-3.22.52-5.66 1.6-7.28 3.22-1.62 1.62-2.7 4.06-3.22 7.28-.52-3.22-1.6-5.66-3.22-7.28-1.62-1.62-4.06-2.7-7.28-3.22 3.22-.52 5.66-1.6 7.28-3.22 1.62-1.62 2.7-4.06 3.22-7.28Z"})])],-1)),x("span",sd,Qe(S.value),1)])],8,td)])):(F(),j("div",rd,[x("div",id,[x("div",{class:ye(["overflow-x-auto",V.value&&!r.value?"max-h-48 overflow-y-hidden":""]),innerHTML:O.value},null,10,od),V.value&&!r.value?(F(),j("div",ld)):Ve("",!0)]),V.value?(F(),j("div",ad,[x("button",{type:"button",class:"inline-flex items-center rounded-full border border-slate-200 bg-white px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-slate-600 transition-colors duration-200 hover:border-brand-200 hover:text-brand-600",title:r.value?"Collapse response":"Expand response","aria-label":r.value?"Collapse response":"Expand response",onClick:C[0]||(C[0]=J=>r.value=!r.value)},Qe(r.value?"Collapse":"Expand"),9,ud)])):Ve("",!0),K.value?(F(),j("div",cd,[x("button",{type:"button",class:ye(["inline-flex h-8 w-8 items-center justify-center rounded-full border transition-colors duration-200",i.value?"border-red-200 bg-red-50 text-red-600 hover:border-red-300 hover:bg-red-100":"border-green-200 bg-green-50 text-green-600 hover:border-green-300 hover:bg-green-100"]),title:i.value?"Unmute voice playback":"Mute voice playback","aria-label":i.value?"Unmute voice playback":"Mute voice playback",onClick:u},[(F(),j("svg",dd,[C[6]||(C[6]=x("path",{d:"M11 5L6 9H3v6h3l5 4V5Z"},null,-1)),i.value?(F(),j(Be,{key:0},[C[2]||(C[2]=x("path",{d:"M15 9l4 6"},null,-1)),C[3]||(C[3]=x("path",{d:"M19 9l-4 6"},null,-1))],64)):(F(),j(Be,{key:1},[C[4]||(C[4]=x("path",{d:"M15 10a3 3 0 0 1 0 4"},null,-1)),C[5]||(C[5]=x("path",{d:"M17.5 7.5a6 6 0 0 1 0 9"},null,-1))],64))]))],10,fd)])):Ve("",!0)]))])):(F(),j("div",{key:2,class:"w-fit max-w-[85%] whitespace-pre-line rounded-[13px_13px_3px_13px] bg-linear-to-br from-brand-500 to-brand-600 px-4 py-3 text-[11px] leading-relaxed wrap-anywhere text-white shadow-[0_14px_30px_-18px_rgba(109,79,194,0.85)] max-[600px]:max-w-[88%]",innerHTML:O.value},null,8,pd))],2))}},hd={class:"flex flex-col gap-4 sm:gap-5"},gd={class:"motion-safe:animate-fade-rise flex w-full items-start gap-1.5"},md={__name:"ChatTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(F(),j("div",hd,[x("div",gd,[Me(Bo),n[0]||(n[0]=x("p",{class:"w-fit max-w-[calc(100%-2.5rem)] whitespace-pre-line rounded-[10px_10px_10px_3px] bg-brand-50 px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900 max-[600px]:max-w-[calc(100%-2.25rem)]"},[gr(" Hello there 👋 I am ChangAI from ERPGulf.com , your ERP assistant."),x("br"),x("a",{target:"_blank",href:"https://app.erpgulf.com/en/articles/chang-ai-quick-start-guide",rel:"noopener noreferrer",style:{color:"#1e90ff"}},"ChangAI Quick Start Guide - Click here.")],-1))]),(F(!0),j(Be,null,ys(e.messages,(s,r)=>(F(),St(yl,{key:r,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}};function wl(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function vl(e){var t,n;return(e==null?void 0:e.message)||((t=e==null?void 0:e.responseJSON)==null?void 0:t.exception)||((n=e==null?void 0:e.responseJSON)==null?void 0:n.message)||(e==null?void 0:e.responseText)||String(e)}function bd(e){return typeof e=="string"?e:e&&typeof e=="object"?e.error?`⚠️ ${e.error}`:e.answer||e.text||"":""}const xd={key:0,class:"rounded-lg bg-brand-50 px-4 py-3 text-xs text-black"},yd={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},wd={key:1,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-brand-50 p-2 text-[11px]"},vd={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},_d={__name:"DebugTab",props:{logs:{type:Array,required:!0},currentDebug:{type:Object,default:null}},setup(e){const t=new Set(["gemini_json_content","private_key","private_key_id","client_secret","client_id","aws_access_key","aws_secret_key","api_key","token","access_token","refresh_token","password","secret","authorization","embed_version_id","llm_version_id","entity_retriever","retriever","deploy_url","support_api_url","get_ticket_details_url"]);function n(r,i=0){if(i>10||r===null||r===void 0||typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(o=>n(o,i+1));if(typeof r=="object"){const o={};for(const[a,l]of Object.entries(r))t.has(a.toLowerCase())||(o[a]=n(l,i+1));return o}return r}function s(r){return wl(n(r))}return(r,i)=>(F(),j("div",null,[e.logs.length===0?(F(),j("p",xd,"No debug data yet.")):Ve("",!0),(F(!0),j(Be,null,ys(e.logs,(o,a)=>(F(),j("div",{key:a,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-gray-100 p-2 text-[11px]"},[x("pre",yd,Qe(s(o)),1)]))),128)),e.currentDebug?(F(),j("div",wd,[x("pre",vd,Qe(s(e.currentDebug)),1)])):Ve("",!0)]))}},Td={class:"flex flex-col gap-4 sm:gap-5"},kd={key:0,class:"chat-card motion-safe:animate-fade-rise rounded-lg px-4 py-3 text-xs text-slate-900"},Sd={__name:"SupportTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(F(),j("div",Td,[e.messages.length===0?(F(),j("p",kd,"Send a message to Support.")):Ve("",!0),(F(!0),j(Be,null,ys(e.messages,(s,r)=>(F(),St(yl,{key:r,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}},Ed={class:"flex flex-col gap-4"},Ad={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Rd={class:"flex items-start justify-between gap-4"},Cd=["aria-pressed","title"],Pd={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Id={class:"flex items-start justify-between gap-4"},Md={class:"mt-2 text-[11px] text-slate-500"},Ld={key:0,class:"mt-1 text-[11px] text-slate-500"},Od={key:1,class:"mt-1 text-[11px] text-slate-500"},$d=["aria-pressed","disabled"],Dd={key:0,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},Nd={key:1,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},Fd={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Bd={class:"flex items-start justify-between gap-4"},Hd=["aria-pressed","title"],zd={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Ud={class:"flex items-start justify-between gap-4"},jd=["aria-pressed","title"],Vd={__name:"SettingsTab",props:{autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},settings:{type:Object,default:null},debugEnabled:{type:Boolean,default:!1},sendNonERPtoaiEnabled:{type:Boolean,default:!1}},emits:["toggleAutoRead","togglePollyPreference","toggleDebug","toggleSendNonERP"],setup(e){const t=e,n=Re(()=>{var s,r;return(s=t.ttsConfig)!=null&&s.enableVoiceChat?(r=t.ttsConfig)!=null&&r.pollyAvailable?"Available":"Unavailable":"Voice disabled on server"});return(s,r)=>{var i,o,a,l,c,u,p,g,w,E,m,R,S,V,K;return F(),j("div",Ed,[r[10]||(r[10]=x("div",{class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4 text-slate-900"},[x("h3",{class:"text-sm font-semibold tracking-[0.01em]"},"Speech Settings"),x("p",{class:"mt-1 text-xs leading-relaxed text-slate-600"},"These controls apply only inside this chatbot box for the current browser session.")],-1)),x("div",Ad,[x("div",Rd,[r[4]||(r[4]=x("div",null,[x("p",{class:"text-sm font-semibold text-slate-900"},"Auto Read Replies"),x("p",{class:"mt-1 text-xs text-slate-600"},"Automatically read bot replies aloud.")],-1)),x("button",{class:ye(["group relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.autoReadEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.autoReadEnabled?"true":"false",title:e.autoReadEnabled?"Disable auto read":"Enable auto read",onClick:r[0]||(r[0]=O=>s.$emit("toggleAutoRead"))},[x("span",{class:ye(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.autoReadEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,Cd)]),x("p",{class:ye(["mt-3 text-[11px] font-medium",e.autoReadEnabled?"text-emerald-700":"text-slate-500"])},Qe(e.autoReadEnabled?"Auto read is active.":"Auto read is currently off."),3)]),x("div",Pd,[x("div",Id,[x("div",null,[r[5]||(r[5]=x("p",{class:"text-sm font-semibold text-slate-900"},"Use Amazon Polly",-1)),r[6]||(r[6]=x("p",{class:"mt-1 text-xs text-slate-600"},"Use Polly when available; otherwise browser speech is used automatically.",-1)),x("p",Md,"Availability: "+Qe(n.value),1),(i=e.settings)!=null&&i.aws_region?(F(),j("p",Ld,"Region: "+Qe(e.settings.aws_region),1)):Ve("",!0),(o=e.ttsConfig)!=null&&o.voiceId?(F(),j("p",Od,"Voice: "+Qe(e.ttsConfig.voiceId),1)):Ve("",!0)]),x("button",{class:ye(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-55",(a=e.ttsConfig)!=null&&a.usePolly&&((l=e.ttsConfig)!=null&&l.enableVoiceChat)&&((c=e.ttsConfig)!=null&&c.pollyAvailable)?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":(u=e.ttsConfig)!=null&&u.usePolly&&((p=e.ttsConfig)!=null&&p.enableVoiceChat)&&((g=e.ttsConfig)!=null&&g.pollyAvailable)?"true":"false",disabled:!((w=e.ttsConfig)!=null&&w.pollyAvailable)||!((E=e.ttsConfig)!=null&&E.enableVoiceChat),onClick:r[1]||(r[1]=O=>s.$emit("togglePollyPreference"))},[x("span",{class:ye(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",(m=e.ttsConfig)!=null&&m.usePolly&&((R=e.ttsConfig)!=null&&R.enableVoiceChat)&&((S=e.ttsConfig)!=null&&S.pollyAvailable)?"left-[1.45rem]":"left-0.5"])},null,2)],10,$d)]),(V=e.ttsConfig)!=null&&V.enableVoiceChat?(K=e.ttsConfig)!=null&&K.pollyAvailable?Ve("",!0):(F(),j("p",Nd,"Polly is not available for this site. Browser speech will be used.")):(F(),j("p",Dd,"Voice chat is disabled in ChangAI Settings."))]),x("div",Fd,[x("div",Bd,[x("div",null,[r[7]||(r[7]=x("p",{class:"text-sm font-semibold text-slate-900"},"Enable Debug Tab",-1)),r[8]||(r[8]=x("p",{class:"mt-1 text-xs text-slate-600"}," Show or hide the Debug tab inside this chatbot. ",-1)),x("p",{class:ye(["mt-2 text-[11px] font-medium",e.debugEnabled?"text-emerald-700":"text-slate-500"])},Qe(e.debugEnabled?"Debug tab is active.":"Debug tab is currently off."),3)]),x("button",{type:"button",class:ye(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.debugEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.debugEnabled?"true":"false",title:e.debugEnabled?"Disable debug tab":"Enable debug tab",onClick:r[2]||(r[2]=O=>s.$emit("toggleDebug"))},[x("span",{class:ye(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.debugEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,Hd)])]),x("div",zd,[x("div",Ud,[r[9]||(r[9]=x("div",null,[x("p",{class:"text-sm font-semibold text-slate-900"},"Send non-ERP questions directly to AI"),x("p",{class:"mt-1 text-xs text-slate-600"},"Questions unrelated to your ERP will skip the system and go straight to AI")],-1)),x("button",{class:ye(["group relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.sendNonERPtoaiEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.sendNonERPtoaiEnabled?"true":"false",title:e.sendNonERPtoaiEnabled?"Non-ERP questions are being sent directly to AI":"Enable direct AI reply for non-ERP questions",onClick:r[3]||(r[3]=O=>s.$emit("toggleSendNonERP"))},[x("span",{class:ye(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.sendNonERPtoaiEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,jd)]),x("p",{class:ye(["mt-3 text-[11px] font-medium",e.sendNonERPtoaiEnabled?"text-emerald-700":"text-slate-500"])},Qe(e.sendNonERPtoaiEnabled?"Non-ERP questions are now routed directly to AI":"Direct AI routing is currently off"),3)])])}}},qd={key:0,class:"pointer-events-none absolute -top-14 left-0 right-0 z-20 flex justify-center px-2",role:"status","aria-live":"polite"},Wd={__name:"StatusToast",props:{visible:{type:Boolean,required:!0},message:{type:String,default:""},type:{type:String,default:"info"},dismissible:{type:Boolean,default:!0}},emits:["close"],setup(e){const t=e,n=Re(()=>t.type==="error"?"bg-red-50 text-red-700 ring-red-200":(t.type==="listening","bg-blue-50 text-blue-700 ring-blue-200")),s=Re(()=>t.type==="error"?"bg-red-500":t.type==="listening"?"bg-blue-500 animate-pulse":"bg-blue-500");return(r,i)=>(F(),St(Pu,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"translate-y-1 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"translate-y-1 opacity-0"},{default:Ni(()=>[e.visible?(F(),j("div",qd,[x("div",{class:ye(["pointer-events-auto flex max-w-[92%] items-start gap-2 rounded-lg px-3 py-2 text-xs shadow-lg ring-1",n.value])},[x("span",{class:ye(["mt-0.5 h-2 w-2 shrink-0 rounded-full",s.value])},null,2),x("span",null,Qe(e.message),1),e.dismissible?(F(),j("button",{key:0,type:"button",class:"ml-1 appearance-none border-0 text-current/80 transition hover:text-current focus:outline-none","aria-label":"Dismiss notification",onClick:i[0]||(i[0]=o=>r.$emit("close"))}," × ")):Ve("",!0)],2)])):Ve("",!0)]),_:1}))}},Gd={class:"relative w-full"},Kd=["placeholder","disabled"],Yd=["title","aria-label","disabled"],Zd={key:0,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},Xd={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Qd={key:2,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",class:"animate-spin"},Jd=["title","aria-label","disabled"],ep={key:0,viewBox:"0 0 24 24",width:"18",height:"18",fill:"none","aria-hidden":"true",class:"text-rose-600 motion-safe:animate-stop-button-pulse"},tp={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},np={__name:"ChatForm",props:{placeholder:{type:String,default:"Message..."},disabled:{type:Boolean,default:!1},isAwaitingResponse:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(e,{expose:t,emit:n}){const s=e,r=n,i=Q(""),o=Q(null),a=Q(!1),l=Q(!1),c=Q(!1),u=Q(!1),p=Q(!1),g=Q(!1),w=Q(!1),E=Q(""),m=Q("info"),R=Q("Voice input is unavailable in this browser/context.");let S=null,V=null,K=null;const O=Q(""),A=Q(!1),C=Re(()=>c.value?"Requesting microphone permission...":u.value?"Starting voice input...":p.value?"Stopping voice input...":l.value?a.value?"Stop voice input":"Start voice input":"Voice input is unavailable in this browser/context"),J=Re(()=>s.isAwaitingResponse?"Stop response":"Send"),te=Re(()=>s.isAwaitingResponse?!1:s.disabled||!i.value.trim()),W=Re(()=>s.isAwaitingResponse?"bg-white border border-rose-100 shadow-[0_8px_20px_-12px_rgba(159,18,57,0.35)] hover:bg-rose-50":"bg-linear-to-br from-brand-500 to-brand-600 text-white shadow-[0_10px_24px_-16px_rgba(109,79,194,0.85)] hover:from-brand-600 hover:to-violet-700");function ne(){return typeof window=="undefined"?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function xe(){var pe;const ce=ne(),N=typeof window!="undefined"?window.isSecureContext:!1,de=typeof navigator!="undefined"&&!!((pe=navigator.mediaDevices)!=null&&pe.getUserMedia);l.value=!!(ce&&N&&de),N?(!de||!ce)&&(R.value="Voice input is not supported in this browser."):R.value="Voice input requires HTTPS (or localhost).",ce&&l.value&&(S=new ce,S.continuous=!0,S.interimResults=!0,S.lang=typeof navigator!="undefined"&&navigator.language||"en-US",S.onstart=()=>{a.value=!0,u.value=!1,p.value=!1,$(),Se("Listening... Tap mic to stop","listening",{persistent:!0,key:"listening"})},S.onend=()=>{a.value=!1,u.value=!1,p.value=!1,$(),O.value==="listening"&&We(),A.value&&(A.value=!1,xt())},S.onerror=Te=>{if(a.value=!1,u.value=!1,p.value=!1,$(),A.value=!1,(Te==null?void 0:Te.error)==="not-allowed"||(Te==null?void 0:Te.error)==="service-not-allowed"){Se("Microphone permission denied. Please allow microphone access in browser settings.","error");return}if((Te==null?void 0:Te.error)==="audio-capture"){Se("No microphone detected. Please connect a microphone and try again.","error");return}if((Te==null?void 0:Te.error)==="no-speech"){Se("No speech detected. Try speaking a bit louder.","info");return}Se("Voice input failed. Please try again.","error")},S.onresult=Te=>{let ve="";for(let ge=Te.resultIndex;ge{if(S&&!(!a.value&&!p.value))try{S.abort()}catch{p.value=!1,A.value=!1}},1200)}}function G(){if(!l.value||!S){Se(R.value,"error");return}if(a.value||u.value||p.value){Y({submitAfterStop:a.value});return}ue()}async function z(){var ce;if(g.value)return!0;if(!((ce=navigator.mediaDevices)!=null&&ce.getUserMedia))return Se("Microphone API is unavailable in this browser.","error"),!1;c.value=!0,Se("Requesting microphone permission...","info",{persistent:!0,key:"requesting"});try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(de=>de.stop()),g.value=!0,!0}catch(N){return(N==null?void 0:N.name)==="NotAllowedError"||(N==null?void 0:N.name)==="SecurityError"?Se("Microphone permission denied. Please allow it and try again.","error"):(N==null?void 0:N.name)==="NotFoundError"?Se("No microphone found on this device.","error"):Se("Unable to access microphone. Please check browser permissions.","error"),!1}finally{c.value=!1,O.value==="requesting"&&We()}}async function ue(){var N;if(!(!S||a.value||u.value||p.value||!await z()||!S)){A.value=!1,(N=o.value)==null||N.focus(),u.value=!0;try{S.start()}catch(de){u.value=!1,p.value=!1,(de==null?void 0:de.name)!=="InvalidStateError"&&Se("Unable to start voice input. Please try again.","error")}}}function Se(ce,N="info",de={}){const{duration:pe=4200,persistent:Te=!1,key:ve=""}=de;E.value=ce,m.value=N,O.value=ve,w.value=!0,V&&clearTimeout(V),Te||(V=setTimeout(()=>{w.value=!1,O.value=""},pe))}function We(){w.value=!1,O.value="",V&&(clearTimeout(V),V=null)}function xt(){if(s.isAwaitingResponse){r("cancel");return}const ce=i.value.trim();ce&&((a.value||u.value||p.value)&&S&&Y({submitAfterStop:!1}),r("submit",ce),i.value="")}return t({focus:()=>{var ce;return(ce=o.value)==null?void 0:ce.focus()}}),Hn(()=>{xe()}),xs(()=>{if(S&&(a.value||u.value||p.value)){A.value=!1,$();try{S.abort()}catch{}}$(),We()}),(ce,N)=>(F(),j("div",Gd,[x("form",{class:"group flex min-h-11 items-center gap-2 rounded-full border border-slate-200/90 bg-white/95 px-3 shadow-[0_12px_26px_-20px_rgba(15,23,42,0.7)] transition-all duration-250 focus-within:-translate-y-0.5 focus-within:border-brand-200 focus-within:shadow-[0_18px_30px_-20px_rgba(13,110,253,0.5)] focus-within:ring-2 focus-within:ring-brand-500/25",style:{"border-radius":"9999px"},autocomplete:"off",onSubmit:ct(xt,["prevent"]),onClick:N[5]||(N[5]=ct(()=>{},["stop"])),onMousedown:N[6]||(N[6]=ct(()=>{},["stop"])),onKeydown:N[7]||(N[7]=ct(()=>{},["stop"])),onKeyup:N[8]||(N[8]=ct(()=>{},["stop"]))},[Pa(x("input",{ref_key:"inputRef",ref:o,type:"text","onUpdate:modelValue":N[0]||(N[0]=de=>i.value=de),class:"h-11 w-full border-none bg-transparent text-sm font-medium text-slate-800 placeholder:text-slate-400 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",placeholder:e.disabled?"Waiting for response...":e.placeholder,disabled:e.disabled,required:"",onKeydown:N[1]||(N[1]=ct(()=>{},["stop"])),onKeyup:N[2]||(N[2]=ct(()=>{},["stop"])),onKeypress:N[3]||(N[3]=ct(()=>{},["stop"])),onInput:N[4]||(N[4]=ct(()=>{},["stop"]))},null,40,Kd),[[Xu,i.value]]),x("button",{type:"button",class:ye(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-transparent text-slate-600 transition-all duration-200 hover:-translate-y-0.5 hover:border-slate-200 hover:bg-slate-100 hover:text-slate-900 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",a.value?"border-red-200 bg-red-100 text-red-600 shadow-[0_10px_20px_-18px_rgba(220,38,38,0.9)] hover:bg-red-100 hover:text-red-600":""]),style:{"border-radius":"9999px"},title:C.value,"aria-label":C.value,disabled:e.disabled||!l.value||c.value||u.value||p.value,onClick:G},[a.value&&!c.value?(F(),j("svg",Zd,N[9]||(N[9]=[x("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)]))):c.value?(F(),j("svg",Qd,N[11]||(N[11]=[x("circle",{cx:"12",cy:"12",r:"9",opacity:"0.3"},null,-1),x("path",{d:"M21 12a9 9 0 0 1-9 9"},null,-1)]))):(F(),j("svg",Xd,N[10]||(N[10]=[x("path",{d:"M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3z"},null,-1),x("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),x("path",{d:"M12 19v3"},null,-1)])))],10,Yd),x("button",{type:"submit",title:J.value,"aria-label":J.value,class:ye(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border-0 transition-all duration-200 hover:-translate-y-0.5 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",W.value]),style:{"border-radius":"9999px"},disabled:te.value},[e.isAwaitingResponse?(F(),j("svg",ep,N[12]||(N[12]=[x("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor","stroke-width":"2.1",class:"opacity-95"},null,-1),x("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1.35",fill:"currentColor"},null,-1)]))):(F(),j("svg",tp,N[13]||(N[13]=[x("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.59 5.58L20 12l-8-8-8 8z"},null,-1)])))],10,Jd)],32),Me(Wd,{visible:w.value,message:E.value,type:m.value,dismissible:m.value!=="listening",onClose:We},null,8,["visible","message","type","dismissible"])]))}},sp={class:"relative overflow-hidden bg-linear-to-br from-brand-600 via-brand-500 to-violet-400"},rp={class:"min-w-0"},ip={key:1,class:"border-t border-slate-200/80 bg-white/90 px-3 py-3 pb-[calc(12px+env(safe-area-inset-bottom))] backdrop-blur-sm sm:px-4 sm:py-4"},op=56,lp={__name:"ChatbotPopup",props:{isOpen:{type:Boolean,required:!0},activeTab:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1},sendNonERPtoaiEnabled:{type:Boolean,default:!1},chatHistory:{type:Array,required:!0},debugLogs:{type:Array,required:!0},currentDebug:{type:Object,default:null},supportHistory:{type:Array,required:!0},autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},activeTtsProvider:{type:String,required:!0},settings:{type:Object,default:null},isAwaitingResponse:{type:Boolean,default:!1}},emits:["close","submit","cancelResponse","update:activeTab","toggleAutoRead","togglePollyPreference","toggleDebug","toggleSendNonERP"],setup(e,{expose:t,emit:n}){const s=e,r=n,i=Q(null),o=Q(null),a=Q(s.activeTab),l=Q("default"),c=Q(!1);function u(){const m=i.value;if(!s.isOpen||!m){c.value=!1;return}const R=m.scrollHeight-m.clientHeight;if(R<=4){c.value=!1;return}const S=R-m.scrollTop;c.value=S>op}function p(){const m=i.value;m&&(m.scrollTo({top:m.scrollHeight,behavior:"smooth"}),setTimeout(()=>{u()},220))}function g(){kt(()=>{u()})}function w(){if(l.value==="default"){l.value="half";return}if(l.value==="half"){l.value="full";return}l.value="default"}const E=Re(()=>{const m="chat-shell fixed z-[9999] flex min-h-0 flex-col overflow-hidden border border-slate-200/80 shadow-[0_32px_80px_-44px_rgba(2,6,23,0.7),0_18px_40px_-24px_rgba(15,23,42,0.45)] transition-all duration-300 ease-out origin-bottom-right",R=s.isOpen?"pointer-events-auto opacity-100 translate-x-0 translate-y-0 scale-100 motion-safe:animate-surface-in":"pointer-events-none opacity-0 translate-x-1/5 translate-y-8 scale-95";return l.value==="full"?[m,R,"inset-0 h-screen w-screen max-h-screen max-w-screen rounded-none origin-center"]:l.value==="half"?[m,R,"bottom-[74px] right-5 h-[min(86vh,860px)] w-[min(50vw,860px)] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(86vh,760px)] max-[900px]:w-[min(70vw,760px)] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]:[m,R,"bottom-[74px] right-5 h-[min(560px,72vh)] w-[min(360px,calc(100vw-40px))] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(70vh,540px)] max-[900px]:w-[min(360px,calc(100vw-24px))] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]});return rn(()=>s.activeTab,m=>{a.value=m,g()}),rn(()=>s.isOpen,m=>{m&&a.value!=="settings"&&kt(()=>{var R;return(R=o.value)==null?void 0:R.focus()}),g()}),rn(a,m=>{r("update:activeTab",m),g()}),rn(()=>[s.chatHistory.length,s.supportHistory.length,s.debugLogs.length,s.currentDebug],()=>{g()}),rn(()=>s.debugEnabled,m=>{!m&&a.value==="debug"&&(a.value="chat"),g()}),Hn(()=>{g()}),t({scrollToBottom(){kt(()=>{p()})}}),(m,R)=>(F(),j("div",{class:ye(E.value),onKeydown:R[9]||(R[9]=ct(()=>{},["stop"])),onKeyup:R[10]||(R[10]=ct(()=>{},["stop"])),onKeypress:R[11]||(R[11]=ct(()=>{},["stop"]))},[R[14]||(R[14]=x("div",{class:"pointer-events-none absolute -right-14 -top-14 h-36 w-36 rounded-full bg-brand-500/15 blur-2xl"},null,-1)),R[15]||(R[15]=x("div",{class:"pointer-events-none absolute -bottom-14 -left-12 h-32 w-32 rounded-full bg-violet-400/15 blur-2xl"},null,-1)),x("div",sp,[R[12]||(R[12]=x("div",{class:"pointer-events-none absolute inset-0 opacity-45",style:{background:"linear-gradient(120deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.02) 52%, rgba(255,255,255,0.12) 100%)"}},null,-1)),Me(vc,{windowMode:l.value,autoReadEnabled:e.autoReadEnabled,activeTtsProvider:e.activeTtsProvider,onClose:R[0]||(R[0]=S=>m.$emit("close")),onCycleResize:w,onToggleAutoRead:R[1]||(R[1]=S=>m.$emit("toggleAutoRead"))},null,8,["windowMode","autoReadEnabled","activeTtsProvider"]),Me(Sc,{modelValue:a.value,"onUpdate:modelValue":R[2]||(R[2]=S=>a.value=S),debugEnabled:e.debugEnabled},null,8,["modelValue","debugEnabled"])]),x("div",{class:"chat-scrollbar min-h-0 flex-1 overflow-x-hidden overflow-y-scroll bg-slate-50/60 px-4 py-4 max-[900px]:px-3.5 max-[900px]:py-3.5 max-[600px]:px-3 max-[600px]:py-3",ref_key:"chatBodyRef",ref:i,onScrollPassive:u},[x("div",rp,[a.value==="chat"?(F(),St(md,{key:0,messages:e.chatHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):a.value==="debug"&&e.debugEnabled?(F(),St(_d,{key:1,logs:e.debugLogs,currentDebug:e.currentDebug},null,8,["logs","currentDebug"])):a.value==="support"?(F(),St(Sd,{key:2,messages:e.supportHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):a.value==="settings"?(F(),St(Vd,{key:3,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig,settings:e.settings,debugEnabled:e.debugEnabled,sendNonERPtoaiEnabled:e.sendNonERPtoaiEnabled,onToggleAutoRead:R[3]||(R[3]=S=>m.$emit("toggleAutoRead")),onTogglePollyPreference:R[4]||(R[4]=S=>m.$emit("togglePollyPreference")),onToggleDebug:R[5]||(R[5]=S=>m.$emit("toggleDebug")),onToggleSendNonERP:R[6]||(R[6]=S=>m.$emit("toggleSendNonERP"))},null,8,["autoReadEnabled","ttsConfig","settings","debugEnabled","sendNonERPtoaiEnabled"])):Ve("",!0)])],544),c.value?(F(),j("button",{key:0,type:"button",class:ye(["absolute right-4 z-20 grid h-9 w-9 place-items-center rounded-full border border-brand-200/70 bg-white/95 text-brand-600 shadow-[0_14px_26px_-16px_rgba(15,23,42,0.65)] transition-all duration-200 hover:-translate-y-0.5 hover:border-brand-300 hover:text-brand-700 focus:outline-none",a.value!=="settings"?"bottom-[calc(90px+env(safe-area-inset-bottom))] sm:bottom-[96px]":"bottom-4 sm:bottom-5"]),title:"Scroll to bottom","aria-label":"Scroll to bottom",onClick:p},R[13]||(R[13]=[x("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[x("path",{d:"M7 10l5 5 5-5"})],-1)]),2)):Ve("",!0),a.value!=="settings"?(F(),j("div",ip,[Me(np,{ref_key:"chatFormRef",ref:o,placeholder:a.value==="support"?"Message Support...":"Message...",disabled:a.value==="chat"&&e.isAwaitingResponse,isAwaitingResponse:a.value==="chat"&&e.isAwaitingResponse,onSubmit:R[7]||(R[7]=S=>m.$emit("submit",S)),onCancel:R[8]||(R[8]=S=>m.$emit("cancelResponse"))},null,8,["placeholder","disabled","isAwaitingResponse"])])):Ve("",!0)],34))}},_l="changai_chat_id",Tl="changai_polly_enabled";function ap(){let e=sessionStorage.getItem(_l);return e||(e=`session_${Date.now()}_${crypto.randomUUID()}`,sessionStorage.setItem(_l,e)),e}function up(){const e=localStorage.getItem(Tl);return e===null?!0:e==="true"}function cp(e){localStorage.setItem(Tl,String(!!e))}const fp={__name:"App",setup(e){const t=Q(!1),n=Q("chat"),s=Q([]),r=Q([]),i=Q(!1),o=Q([]),a=Q(null),l=Q("actual"),c=Q(!0),u=Q(null),p=Q(!1),g=Q(null),w=Q(!1),E=Q({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Zayd",enable_changai:!1}),m=Q("off"),R=Q(null),S=Re(()=>R.value!==null);function V(){if(!E.value.enableVoiceChat){m.value="off";return}m.value=E.value.usePolly?"polly":"browser"}function K(G){var ue;const z=(ue=G==null?void 0:G.detail)==null?void 0:ue.provider;(z==="polly"||z==="browser"||z==="off")&&(m.value=z)}async function O(){var ue,Se,We,xt,ce;if(!(p.value||u.value)){p.value=!0;try{u.value=await Mc(l.value),E.value={enableVoiceChat:!!((ue=u.value)!=null&&ue.enable_voice_chat),pollyAvailable:!!((Se=u.value)!=null&&Se.polly_enabled),usePolly:!!((We=u.value)!=null&&We.polly_enabled)&&up(),voiceId:((xt=u.value)==null?void 0:xt.polly_voice_id)||"Zayd",enable_changai:!!((ce=u.value)!=null&&ce.enable_changai)},V(),r.value.push({type:"settings",settings:u.value})}catch(N){const de=vl(N);r.value.push({type:"settings",error:de})}finally{p.value=!1}}}function A(){t.value=!t.value}function C(){var G;(G=a.value)==null||G.scrollToBottom()}function J(){c.value=!c.value}function te(){const G=!E.value.usePolly;E.value={...E.value,usePolly:G&&E.value.pollyAvailable},cp(E.value.usePolly),V()}function W(){w.value=!w.value}async function ne(G){n.value==="support"?await Y(G):await xe(G)}async function xe(G){var ve;g.value=null,l.value==="actual"&&await O(),s.value.push({role:"user",text:G}),await kt(),C();const z=us({role:"model",text:"Thinking...",cancelable:!0,isStatus:!0,statusType:"thinking"});s.value.push(z),await kt(),C();let ue=!1;const Se=ap(),We=`${Se}_${Date.now()}`,xt=w.value,ce=Pc(G,Se,l.value,We,w.value),N=`debug_${We}`;let de=Date.now();const pe=[],Te=ge=>{var ze;const le=Date.now(),yt=((le-de)/1e3).toFixed(2);de=le;const Ct=`${ge.message} (${yt}s)`;if(ge.message&&(pe.push(Ct),g.value=Ct),!ge.done&&ge.message&&(z.text=ge.message,z.statusType="pipeline"),ge.done){z.cancelable=!1,ge.error?(z.text=`⚠️ ${ge.message||"Something failed"}`,z.isStatus=!1,z.statusType=null):(ze=ge.data)!=null&&ze.answer&&(z.text=ge.data.answer,z.isStatus=!1,z.statusType=null),frappe.realtime.off(N),g.value=null;return}};frappe.realtime.on(N,Te),R.value=()=>{ue||(ue=!0,ce.cancel(),frappe.realtime.off(N),z.isStatus=!1,z.statusType=null,z.text="Cancelled by user.",r.value.push({type:"cancelled",user:G,steps:[...pe]}),g.value=null,z.cancelable=!1,R.value=null)};try{const ge=await ce.promise;if(ue)return;z.cancelable=!1;const le=((ve=bd(ge==null?void 0:ge.Bot))==null?void 0:ve.trim())||"No response.";z.isStatus=!1,z.statusType=null,z.text=le,r.value.push({type:"success",user:G,steps:[...pe],final_response:ge}),g.value=null}catch(ge){if(ue)return;frappe.realtime.off(N),z.cancelable=!1,z.isStatus=!1,z.statusType=null;const le=vl(ge);g.value=null,r.value.push({type:"failed",user:G,steps:[...pe],error:le}),z.isStatus=!1,z.statusType=null,z.text="⚠️ Something went wrong. Please try again."}finally{frappe.realtime.off(N),ue||(R.value=null)}await kt(),C()}function $(){var G;(G=R.value)==null||G.call(R)}async function Y(G){o.value.push({role:"user",text:G}),await kt(),C();const z=us({role:"model",text:"Sending to support...",isStatus:!0,statusType:"support"});o.value.push(z),await kt(),C();try{const ue=await Ic(G,l.value);z.text=ue?wl(ue):"Support request sent successfully."}catch{z.text="⚠️ Failed to reach support. Please try again."}await kt(),C()}return Hn(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-provider",K),l.value==="actual"&&O()}),xs(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-provider",K)}),(G,z)=>(F(),j(Be,null,[E.value.enable_changai?(F(),St(ac,{key:0,isOpen:t.value,onToggle:A},null,8,["isOpen"])):Ve("",!0),Me(lp,{ref_key:"popupRef",ref:a,isOpen:t.value,activeTab:n.value,"onUpdate:activeTab":z[0]||(z[0]=ue=>n.value=ue),chatHistory:s.value,debugLogs:r.value,currentDebug:g.value,supportHistory:o.value,autoReadEnabled:c.value,ttsConfig:E.value,activeTtsProvider:m.value,settings:u.value,isAwaitingResponse:S.value,debugEnabled:i.value,sendNonERPtoaiEnabled:w.value,onToggleDebug:z[1]||(z[1]=ue=>i.value=!i.value),onClose:z[2]||(z[2]=ue=>t.value=!1),onSubmit:ne,onCancelResponse:$,onToggleAutoRead:J,onTogglePollyPreference:te,onToggleSendNonERP:W},null,8,["isOpen","activeTab","chatHistory","debugLogs","currentDebug","supportHistory","autoReadEnabled","ttsConfig","activeTtsProvider","settings","isAwaitingResponse","debugEnabled","sendNonERPtoaiEnabled"])],64))}};function dp(){const e=document.querySelector('link[href*="/assets/changai/dist/changai-chatbot.css"]');if(e!=null&&e.href)return e.href;const t=Array.from(document.scripts).find(n=>{var s;return(s=n.src)==null?void 0:s.includes("/assets/changai/dist/changai-chatbot.js")});return t!=null&&t.src?t.src.replace(/changai-chatbot\.js(\?.*)?$/,"changai-chatbot.css$1"):null}function pp(e){const t=dp();if(!t){const n=Array.from(document.querySelectorAll("style[data-vite-dev-id]"));return n.length&&n.forEach(s=>{const r=document.createElement("style");r.dataset.changaiShadowDevStyle="1",r.textContent=s.textContent||"",e.appendChild(r)}),Promise.resolve()}return e.querySelector('link[data-changai-shadow-style="1"]')?Promise.resolve():new Promise(n=>{const s=document.createElement("link");s.rel="stylesheet",s.href=t,s.dataset.changaiShadowStyle="1",s.onload=()=>n(),s.onerror=()=>n(),e.appendChild(s),setTimeout(n,1200)})}async function kl(){if(document.getElementById("changai-chatbot-host"))return;const e=document.createElement("div");e.id="changai-chatbot-host",document.body.appendChild(e);const t=e.attachShadow({mode:"open"});await pp(t);const n=document.createElement("div");n.id="changai-chatbot-root",t.appendChild(n),nc(fp).mount(n);function s(r){r.stopPropagation()}n.addEventListener("keydown",s),n.addEventListener("keyup",s),n.addEventListener("keypress",s)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",kl):kl()})();
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index f617a97..23fd542 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -8,6 +8,8 @@
"name": "changai-chatbot",
"version": "1.0.0",
"dependencies": {
+ "dompurify": "^3.4.3",
+ "marked": "^18.0.3",
"vue": "^3.5.17"
},
"devDependencies": {
@@ -66,9 +68,9 @@
}
},
"node_modules/@esbuild/aix-ppc64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz",
- "integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz",
+ "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==",
"cpu": [
"ppc64"
],
@@ -83,9 +85,9 @@
}
},
"node_modules/@esbuild/android-arm": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz",
- "integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz",
+ "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==",
"cpu": [
"arm"
],
@@ -100,9 +102,9 @@
}
},
"node_modules/@esbuild/android-arm64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz",
- "integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz",
+ "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==",
"cpu": [
"arm64"
],
@@ -117,9 +119,9 @@
}
},
"node_modules/@esbuild/android-x64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz",
- "integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz",
+ "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==",
"cpu": [
"x64"
],
@@ -134,9 +136,9 @@
}
},
"node_modules/@esbuild/darwin-arm64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz",
- "integrity": "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz",
+ "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==",
"cpu": [
"arm64"
],
@@ -151,9 +153,9 @@
}
},
"node_modules/@esbuild/darwin-x64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz",
- "integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz",
+ "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==",
"cpu": [
"x64"
],
@@ -168,9 +170,9 @@
}
},
"node_modules/@esbuild/freebsd-arm64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz",
- "integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz",
+ "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==",
"cpu": [
"arm64"
],
@@ -185,9 +187,9 @@
}
},
"node_modules/@esbuild/freebsd-x64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz",
- "integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz",
+ "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==",
"cpu": [
"x64"
],
@@ -202,9 +204,9 @@
}
},
"node_modules/@esbuild/linux-arm": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz",
- "integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz",
+ "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==",
"cpu": [
"arm"
],
@@ -219,9 +221,9 @@
}
},
"node_modules/@esbuild/linux-arm64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz",
- "integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz",
+ "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==",
"cpu": [
"arm64"
],
@@ -236,9 +238,9 @@
}
},
"node_modules/@esbuild/linux-ia32": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz",
- "integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz",
+ "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==",
"cpu": [
"ia32"
],
@@ -253,9 +255,9 @@
}
},
"node_modules/@esbuild/linux-loong64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz",
- "integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz",
+ "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==",
"cpu": [
"loong64"
],
@@ -270,9 +272,9 @@
}
},
"node_modules/@esbuild/linux-mips64el": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz",
- "integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz",
+ "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==",
"cpu": [
"mips64el"
],
@@ -287,9 +289,9 @@
}
},
"node_modules/@esbuild/linux-ppc64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz",
- "integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz",
+ "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==",
"cpu": [
"ppc64"
],
@@ -304,9 +306,9 @@
}
},
"node_modules/@esbuild/linux-riscv64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz",
- "integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz",
+ "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==",
"cpu": [
"riscv64"
],
@@ -321,9 +323,9 @@
}
},
"node_modules/@esbuild/linux-s390x": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz",
- "integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz",
+ "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==",
"cpu": [
"s390x"
],
@@ -338,9 +340,9 @@
}
},
"node_modules/@esbuild/linux-x64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz",
- "integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz",
+ "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==",
"cpu": [
"x64"
],
@@ -355,9 +357,9 @@
}
},
"node_modules/@esbuild/netbsd-arm64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz",
- "integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz",
+ "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==",
"cpu": [
"arm64"
],
@@ -372,9 +374,9 @@
}
},
"node_modules/@esbuild/netbsd-x64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz",
- "integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz",
+ "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==",
"cpu": [
"x64"
],
@@ -389,9 +391,9 @@
}
},
"node_modules/@esbuild/openbsd-arm64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz",
- "integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz",
+ "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==",
"cpu": [
"arm64"
],
@@ -406,9 +408,9 @@
}
},
"node_modules/@esbuild/openbsd-x64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz",
- "integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz",
+ "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==",
"cpu": [
"x64"
],
@@ -423,9 +425,9 @@
}
},
"node_modules/@esbuild/openharmony-arm64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz",
- "integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz",
+ "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==",
"cpu": [
"arm64"
],
@@ -440,9 +442,9 @@
}
},
"node_modules/@esbuild/sunos-x64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz",
- "integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz",
+ "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==",
"cpu": [
"x64"
],
@@ -457,9 +459,9 @@
}
},
"node_modules/@esbuild/win32-arm64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz",
- "integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz",
+ "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==",
"cpu": [
"arm64"
],
@@ -474,9 +476,9 @@
}
},
"node_modules/@esbuild/win32-ia32": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz",
- "integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz",
+ "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==",
"cpu": [
"ia32"
],
@@ -491,9 +493,9 @@
}
},
"node_modules/@esbuild/win32-x64": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz",
- "integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz",
+ "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==",
"cpu": [
"x64"
],
@@ -564,9 +566,9 @@
"license": "MIT"
},
"node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.1.tgz",
- "integrity": "sha512-oENme6QxtLCqjChRUUo3S6X8hjCXnWmJWnedD7VbGML5GUtaOtAyx+fEEXnBXVf0CBZApMQU0Idwi0FmyxzQhw==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.3.tgz",
+ "integrity": "sha512-x35CNW/ANXG3hE/EZpRU8MXX1JDN86hBb2wMGAtltkz7pc6cxgjpy1OMMfDosOQ+2hWqIkag/fGok1Yady9nGw==",
"cpu": [
"arm"
],
@@ -578,9 +580,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.1.tgz",
- "integrity": "sha512-OikvNT3qYTl9+4qQ9Bpn6+XHM+ogtFadRLuT2EXiFQMiNkXFLQfNVppi5o28wvYdHL2s3fM0D/MZJ8UkNFZWsw==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.3.tgz",
+ "integrity": "sha512-xw3xtkDApIOGayehp2+Rz4zimfkaX65r4t47iy+ymQB2G4iJCBBfj0ogVg5jpvjpn8UWn/+q9tprxleYeNp3Hw==",
"cpu": [
"arm64"
],
@@ -592,9 +594,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.1.tgz",
- "integrity": "sha512-EFYNNGij2WllnzljQDQnlFTXzSJw87cpAs4TVBAWLdkvic5Uh5tISrIL6NRcxoh/b2EFBG/TK8hgRrGx94zD4A==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.3.tgz",
+ "integrity": "sha512-vo6Y5Qfpx7/5EaamIwi0WqW2+zfiusVihKatLvtN1VFVy3D13uERk/6gZLU1UiHRL6fDXqj/ELIeVRGnvcTE1g==",
"cpu": [
"arm64"
],
@@ -606,9 +608,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.1.tgz",
- "integrity": "sha512-ZaNH06O1KeTug9WI2+GRBE5Ujt9kZw4a1+OIwnBHal92I8PxSsl5KpsrPvthRynkhMck4XPdvY0z26Cym/b7oA==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.3.tgz",
+ "integrity": "sha512-D+0QGcZhBzTN82weOnsSlY7V7+RMmPuF1CkbxyMAGE8+ZHeUjyb76ZiWmBlCu//AQQONvxcqRbwZTajZKqjuOw==",
"cpu": [
"x64"
],
@@ -620,9 +622,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.1.tgz",
- "integrity": "sha512-n4SLVebZP8uUlJ2r04+g2U/xFeiQlw09Me5UFqny8HGbARl503LNH5CqFTb5U5jNxTouhRjai6qPT0CR5c/Iig==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.3.tgz",
+ "integrity": "sha512-6HnvHCT7fDyj6R0Ph7A6x8dQS/S38MClRWeDLqc0MdfWkxjiu1HSDYrdPhqSILzjTIC/pnXbbJbo+ft+gy/9hQ==",
"cpu": [
"arm64"
],
@@ -634,9 +636,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.1.tgz",
- "integrity": "sha512-8vu9c02F16heTqpvo3yeiu7Vi1REDEC/yES/dIfq3tSXe6mLndiwvYr3AAvd1tMNUqE9yeGYa5w7PRbI5QUV+w==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.3.tgz",
+ "integrity": "sha512-KHLgC3WKlUYW3ShFKnnosZDOJ0xjg9zp7au3sIm2bs/tGBeC2ipmvRh/N7JKi0t9Ue20C0dpEshi8WUubg+cnA==",
"cpu": [
"x64"
],
@@ -648,9 +650,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.1.tgz",
- "integrity": "sha512-K4ncpWl7sQuyp6rWiGUvb6Q18ba8mzM0rjWJ5JgYKlIXAau1db7hZnR0ldJvqKWWJDxqzSLwGUhA4jp+KqgDtQ==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.3.tgz",
+ "integrity": "sha512-DV6fJoxEYWJOvaZIsok7KrYl0tPvga5OZ2yvKHNNYyk/2roMLqQAbGhr78EQ5YhHpnhLKJD3S1WFusAkmUuV5g==",
"cpu": [
"arm"
],
@@ -662,9 +664,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.1.tgz",
- "integrity": "sha512-YykPnXsjUjmXE6j6k2QBBGAn1YsJUix7pYaPLK3RVE0bQL2jfdbfykPxfF8AgBlqtYbfEnYHmLXNa6QETjdOjQ==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.3.tgz",
+ "integrity": "sha512-mQKoJAzvuOs6F+TZybQO4GOTSMUu7v0WdxEk24krQ/uUxXoPTtHjuaUuPmFhtBcM4K0ons8nrE3JyhTuCFtT/w==",
"cpu": [
"arm"
],
@@ -676,9 +678,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.1.tgz",
- "integrity": "sha512-kKvqBGbZ8i9pCGW3a1FH3HNIVg49dXXTsChGFsHGXQaVJPLA4f/O+XmTxfklhccxdF5FefUn2hvkoGJH0ScWOA==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.3.tgz",
+ "integrity": "sha512-Whjj2qoiJ6+OOJMGptTYazaJvjOJm+iKHpXQM1P3LzGjt7Ff++Tp7nH4N8J/BUA7R9IHfDyx4DJIflifwnbmIA==",
"cpu": [
"arm64"
],
@@ -690,9 +692,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.1.tgz",
- "integrity": "sha512-zzX5nTw1N1plmqC9RGC9vZHFuiM7ZP7oSWQGqpbmfjK7p947D518cVK1/MQudsBdcD84t6k70WNczJOct6+hdg==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.3.tgz",
+ "integrity": "sha512-4YTNHKqGng5+yiZt3mg77nmyuCfmNfX4fPmyUapBcIk+BdwSwmCWGXOUxhXbBEkFHtoN5boLj/5NON+u5QC9tg==",
"cpu": [
"arm64"
],
@@ -703,10 +705,24 @@
"linux"
]
},
- "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.1.tgz",
- "integrity": "sha512-O8CwgSBo6ewPpktFfSDgB6SJN9XDcPSvuwxfejiddbIC/hn9Tg6Ai0f0eYDf3XvB/+PIWzOQL+7+TZoB8p9Yuw==",
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.3.tgz",
+ "integrity": "sha512-SU3kNlhkpI4UqlUc2VXPGK9o886ZsSeGfMAX2ba2b8DKmMXq4AL7KUrkSWVbb7koVqx41Yczx6dx5PNargIrEA==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-musl": {
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.3.tgz",
+ "integrity": "sha512-6lDLl5h4TXpB1mTf2rQWnAk/LcXrx9vBfu/DT5TIPhvMhRWaZ5MxkIc8u4lJAmBo6klTe1ywXIUHFjylW505sg==",
"cpu": [
"loong64"
],
@@ -718,9 +734,23 @@
]
},
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.1.tgz",
- "integrity": "sha512-JnCfFVEKeq6G3h3z8e60kAp8Rd7QVnWCtPm7cxx+5OtP80g/3nmPtfdCXbVl063e3KsRnGSKDHUQMydmzc/wBA==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.3.tgz",
+ "integrity": "sha512-BMo8bOw8evlup/8G+cj5xWtPyp93xPdyoSN16Zy90Q2QZ0ZYRhCt6ZJSwbrRzG9HApFabjwj2p25TUPDWrhzqQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-musl": {
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.3.tgz",
+ "integrity": "sha512-E0L8X1dZN1/Rph+5VPF6Xj2G7JJvMACVXtamTJIDrVI44Y3K+G8gQaMEAavbqCGTa16InptiVrX6eM6pmJ+7qA==",
"cpu": [
"ppc64"
],
@@ -732,9 +762,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.1.tgz",
- "integrity": "sha512-dVxuDqS237eQXkbYzQQfdf/njgeNw6LZuVyEdUaWwRpKHhsLI+y4H/NJV8xJGU19vnOJCVwaBFgr936FHOnJsQ==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.3.tgz",
+ "integrity": "sha512-oZJ/WHaVfHUiRAtmTAeo3DcevNsVvH8mbvodjZy7D5QKvCefO371SiKRpxoDcCxB3PTRTLayWBkvmDQKTcX/sw==",
"cpu": [
"riscv64"
],
@@ -746,9 +776,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.1.tgz",
- "integrity": "sha512-CvvgNl2hrZrTR9jXK1ye0Go0HQRT6ohQdDfWR47/KFKiLd5oN5T14jRdUVGF4tnsN8y9oSfMOqH6RuHh+ck8+w==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.3.tgz",
+ "integrity": "sha512-Dhbyh7j9FybM3YaTgaHmVALwA8AkUwTPccyCQ79TG9AJUsMQqgN1DDEZNr4+QUfwiWvLDumW5vdwzoeUF+TNxQ==",
"cpu": [
"riscv64"
],
@@ -760,9 +790,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.1.tgz",
- "integrity": "sha512-x7ANt2VOg2565oGHJ6rIuuAon+A8sfe1IeUx25IKqi49OjSr/K3awoNqr9gCwGEJo9OuXlOn+H2p1VJKx1psxA==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.3.tgz",
+ "integrity": "sha512-cJd1X5XhHHlltkaypz1UcWLA8AcoIi1aWhsvaWDskD1oz2eKCypnqvTQ8ykMNI0RSmm7NkTdSqSSD7zM0xa6Ig==",
"cpu": [
"s390x"
],
@@ -774,9 +804,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.1.tgz",
- "integrity": "sha512-9OADZYryz/7E8/qt0vnaHQgmia2Y0wrjSSn1V/uL+zw/i7NUhxbX4cHXdEQ7dnJgzYDS81d8+tf6nbIdRFZQoQ==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.3.tgz",
+ "integrity": "sha512-DAZDBHQfG2oQuhY7mc6I3/qB4LU2fQCjRvxbDwd/Jdvb9fypP4IJ4qmtu6lNjes6B531AI8cg1aKC2di97bUxA==",
"cpu": [
"x64"
],
@@ -788,9 +818,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.1.tgz",
- "integrity": "sha512-NuvSCbXEKY+NGWHyivzbjSVJi68Xfq1VnIvGmsuXs6TCtveeoDRKutI5vf2ntmNnVq64Q4zInet0UDQ+yMB6tA==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.3.tgz",
+ "integrity": "sha512-cRxsE8c13mZOh3vP+wLDxpQBRrOHDIGOWyDL93Sy0Ga8y515fBcC2pjUfFwUe5T7tqvTvWbCpg1URM/AXdWIXA==",
"cpu": [
"x64"
],
@@ -801,10 +831,38 @@
"linux"
]
},
+ "node_modules/@rollup/rollup-openbsd-x64": {
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.3.tgz",
+ "integrity": "sha512-QaWcIgRxqEdQdhJqW4DJctsH6HCmo5vHxY0krHSX4jMtOqfzC+dqDGuHM87bu4H8JBeibWx7jFz+h6/4C8wA5Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.3.tgz",
+ "integrity": "sha512-AaXwSvUi3QIPtroAUw1t5yHGIyqKEXwH54WUocFolZhpGDruJcs8c+xPNDRn4XiQsS7MEwnYsHW2l0MBLDMkWg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
"node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.1.tgz",
- "integrity": "sha512-mWz+6FSRb82xuUMMV1X3NGiaPFqbLN9aIueHleTZCc46cJvwTlvIh7reQLk4p97dv0nddyewBhwzryBHH7wtPw==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.3.tgz",
+ "integrity": "sha512-65LAKM/bAWDqKNEelHlcHvm2V+Vfb8C6INFxQXRHCvaVN1rJfwr4NvdP4FyzUaLqWfaCGaadf6UbTm8xJeYfEg==",
"cpu": [
"arm64"
],
@@ -816,9 +874,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.1.tgz",
- "integrity": "sha512-7Thzy9TMXDw9AU4f4vsLNBxh7/VOKuXi73VH3d/kHGr0tZ3x/ewgL9uC7ojUKmH1/zvmZe2tLapYcZllk3SO8Q==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.3.tgz",
+ "integrity": "sha512-EEM2gyhBF5MFnI6vMKdX1LAosE627RGBzIoGMdLloPZkXrUN0Ckqgr2Qi8+J3zip/8NVVro3/FjB+tjhZUgUHA==",
"cpu": [
"ia32"
],
@@ -829,10 +887,24 @@
"win32"
]
},
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.3.tgz",
+ "integrity": "sha512-E5Eb5H/DpxaoXH++Qkv28RcUJboMopmdDUALBczvHMf7hNIxaDZqwY5lK12UK1BHacSmvupoEWGu+n993Z0y1A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
"node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.1.tgz",
- "integrity": "sha512-7GVB4luhFmGUNXXJhH2jJwZCFB3pIOixv2E3s17GQHBFUOQaISlt7aGcQgqvCaDSxTZJUzlK/QJ1FN8S94MrzQ==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.3.tgz",
+ "integrity": "sha512-hPt/bgL5cE+Qp+/TPHBqptcAgPzgj46mPcg/16zNUmbQk0j+mOEQV/+Lqu8QRtDV3Ek95Q6FeFITpuhl6OTsAA==",
"cpu": [
"x64"
],
@@ -1122,6 +1194,13 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@types/trusted-types": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
+ "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
+ "license": "MIT",
+ "optional": true
+ },
"node_modules/@vitejs/plugin-vue": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.1.tgz",
@@ -1361,6 +1440,15 @@
"node": ">=8"
}
},
+ "node_modules/dompurify": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.3.tgz",
+ "integrity": "sha512-VVwJidIJcp1hpg2OMXML3ZVRPYSZiq4aX7qBh83BSIpOaRDqI+qxhXjjIWnpzkOXhmp0L81lnoME1mnCc9H48A==",
+ "license": "(MPL-2.0 OR Apache-2.0)",
+ "optionalDependencies": {
+ "@types/trusted-types": "^2.0.7"
+ }
+ },
"node_modules/electron-to-chromium": {
"version": "1.5.328",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.328.tgz",
@@ -1395,9 +1483,9 @@
}
},
"node_modules/esbuild": {
- "version": "0.25.8",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz",
- "integrity": "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==",
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz",
+ "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -1408,32 +1496,32 @@
"node": ">=18"
},
"optionalDependencies": {
- "@esbuild/aix-ppc64": "0.25.8",
- "@esbuild/android-arm": "0.25.8",
- "@esbuild/android-arm64": "0.25.8",
- "@esbuild/android-x64": "0.25.8",
- "@esbuild/darwin-arm64": "0.25.8",
- "@esbuild/darwin-x64": "0.25.8",
- "@esbuild/freebsd-arm64": "0.25.8",
- "@esbuild/freebsd-x64": "0.25.8",
- "@esbuild/linux-arm": "0.25.8",
- "@esbuild/linux-arm64": "0.25.8",
- "@esbuild/linux-ia32": "0.25.8",
- "@esbuild/linux-loong64": "0.25.8",
- "@esbuild/linux-mips64el": "0.25.8",
- "@esbuild/linux-ppc64": "0.25.8",
- "@esbuild/linux-riscv64": "0.25.8",
- "@esbuild/linux-s390x": "0.25.8",
- "@esbuild/linux-x64": "0.25.8",
- "@esbuild/netbsd-arm64": "0.25.8",
- "@esbuild/netbsd-x64": "0.25.8",
- "@esbuild/openbsd-arm64": "0.25.8",
- "@esbuild/openbsd-x64": "0.25.8",
- "@esbuild/openharmony-arm64": "0.25.8",
- "@esbuild/sunos-x64": "0.25.8",
- "@esbuild/win32-arm64": "0.25.8",
- "@esbuild/win32-ia32": "0.25.8",
- "@esbuild/win32-x64": "0.25.8"
+ "@esbuild/aix-ppc64": "0.27.7",
+ "@esbuild/android-arm": "0.27.7",
+ "@esbuild/android-arm64": "0.27.7",
+ "@esbuild/android-x64": "0.27.7",
+ "@esbuild/darwin-arm64": "0.27.7",
+ "@esbuild/darwin-x64": "0.27.7",
+ "@esbuild/freebsd-arm64": "0.27.7",
+ "@esbuild/freebsd-x64": "0.27.7",
+ "@esbuild/linux-arm": "0.27.7",
+ "@esbuild/linux-arm64": "0.27.7",
+ "@esbuild/linux-ia32": "0.27.7",
+ "@esbuild/linux-loong64": "0.27.7",
+ "@esbuild/linux-mips64el": "0.27.7",
+ "@esbuild/linux-ppc64": "0.27.7",
+ "@esbuild/linux-riscv64": "0.27.7",
+ "@esbuild/linux-s390x": "0.27.7",
+ "@esbuild/linux-x64": "0.27.7",
+ "@esbuild/netbsd-arm64": "0.27.7",
+ "@esbuild/netbsd-x64": "0.27.7",
+ "@esbuild/openbsd-arm64": "0.27.7",
+ "@esbuild/openbsd-x64": "0.27.7",
+ "@esbuild/openharmony-arm64": "0.27.7",
+ "@esbuild/sunos-x64": "0.27.7",
+ "@esbuild/win32-arm64": "0.27.7",
+ "@esbuild/win32-ia32": "0.27.7",
+ "@esbuild/win32-x64": "0.27.7"
}
},
"node_modules/escalade": {
@@ -1453,11 +1541,14 @@
"license": "MIT"
},
"node_modules/fdir": {
- "version": "6.4.6",
- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
- "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
"dev": true,
"license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
"peerDependencies": {
"picomatch": "^3 || ^4"
},
@@ -1509,7 +1600,6 @@
"integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"bin": {
"jiti": "lib/jiti-cli.mjs"
}
@@ -1520,7 +1610,6 @@
"integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",
"dev": true,
"license": "MPL-2.0",
- "peer": true,
"dependencies": {
"detect-libc": "^2.0.3"
},
@@ -1785,6 +1874,18 @@
"@jridgewell/sourcemap-codec": "^1.5.5"
}
},
+ "node_modules/marked": {
+ "version": "18.0.3",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-18.0.3.tgz",
+ "integrity": "sha512-7VT90JOkDeaRWpfjOReRGPEKn0ecdARBkDGL+tT1wZY0efPPqkUxLUSmzy/C7TIylQYJC9STISEsCHrqb/7VIA==",
+ "license": "MIT",
+ "bin": {
+ "marked": "bin/marked.js"
+ },
+ "engines": {
+ "node": ">= 20"
+ }
+ },
"node_modules/nanoid": {
"version": "3.3.11",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
@@ -1817,9 +1918,9 @@
"license": "ISC"
},
"node_modules/picomatch": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
"dev": true,
"license": "MIT",
"peer": true,
@@ -1831,9 +1932,9 @@
}
},
"node_modules/postcss": {
- "version": "8.5.8",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz",
- "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==",
+ "version": "8.5.14",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz",
+ "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==",
"funding": [
{
"type": "opencollective",
@@ -1867,9 +1968,9 @@
"license": "MIT"
},
"node_modules/rollup": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.1.tgz",
- "integrity": "sha512-33xGNBsDJAkzt0PvninskHlWnTIPgDtTwhg0U38CUoNP/7H6wI2Cz6dUeoNPbjdTdsYTGuiFFASuUOWovH0SyQ==",
+ "version": "4.60.3",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.3.tgz",
+ "integrity": "sha512-pAQK9HalE84QSm4Po3EmWIZPd3FnjkShVkiMlz1iligWYkWQ7wHYd1PF/T7QZ5TVSD6uSTon5gBVMSM4JfBV+A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1883,26 +1984,31 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.46.1",
- "@rollup/rollup-android-arm64": "4.46.1",
- "@rollup/rollup-darwin-arm64": "4.46.1",
- "@rollup/rollup-darwin-x64": "4.46.1",
- "@rollup/rollup-freebsd-arm64": "4.46.1",
- "@rollup/rollup-freebsd-x64": "4.46.1",
- "@rollup/rollup-linux-arm-gnueabihf": "4.46.1",
- "@rollup/rollup-linux-arm-musleabihf": "4.46.1",
- "@rollup/rollup-linux-arm64-gnu": "4.46.1",
- "@rollup/rollup-linux-arm64-musl": "4.46.1",
- "@rollup/rollup-linux-loongarch64-gnu": "4.46.1",
- "@rollup/rollup-linux-ppc64-gnu": "4.46.1",
- "@rollup/rollup-linux-riscv64-gnu": "4.46.1",
- "@rollup/rollup-linux-riscv64-musl": "4.46.1",
- "@rollup/rollup-linux-s390x-gnu": "4.46.1",
- "@rollup/rollup-linux-x64-gnu": "4.46.1",
- "@rollup/rollup-linux-x64-musl": "4.46.1",
- "@rollup/rollup-win32-arm64-msvc": "4.46.1",
- "@rollup/rollup-win32-ia32-msvc": "4.46.1",
- "@rollup/rollup-win32-x64-msvc": "4.46.1",
+ "@rollup/rollup-android-arm-eabi": "4.60.3",
+ "@rollup/rollup-android-arm64": "4.60.3",
+ "@rollup/rollup-darwin-arm64": "4.60.3",
+ "@rollup/rollup-darwin-x64": "4.60.3",
+ "@rollup/rollup-freebsd-arm64": "4.60.3",
+ "@rollup/rollup-freebsd-x64": "4.60.3",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.60.3",
+ "@rollup/rollup-linux-arm-musleabihf": "4.60.3",
+ "@rollup/rollup-linux-arm64-gnu": "4.60.3",
+ "@rollup/rollup-linux-arm64-musl": "4.60.3",
+ "@rollup/rollup-linux-loong64-gnu": "4.60.3",
+ "@rollup/rollup-linux-loong64-musl": "4.60.3",
+ "@rollup/rollup-linux-ppc64-gnu": "4.60.3",
+ "@rollup/rollup-linux-ppc64-musl": "4.60.3",
+ "@rollup/rollup-linux-riscv64-gnu": "4.60.3",
+ "@rollup/rollup-linux-riscv64-musl": "4.60.3",
+ "@rollup/rollup-linux-s390x-gnu": "4.60.3",
+ "@rollup/rollup-linux-x64-gnu": "4.60.3",
+ "@rollup/rollup-linux-x64-musl": "4.60.3",
+ "@rollup/rollup-openbsd-x64": "4.60.3",
+ "@rollup/rollup-openharmony-arm64": "4.60.3",
+ "@rollup/rollup-win32-arm64-msvc": "4.60.3",
+ "@rollup/rollup-win32-ia32-msvc": "4.60.3",
+ "@rollup/rollup-win32-x64-gnu": "4.60.3",
+ "@rollup/rollup-win32-x64-msvc": "4.60.3",
"fsevents": "~2.3.2"
}
},
@@ -1937,14 +2043,14 @@
}
},
"node_modules/tinyglobby": {
- "version": "0.2.14",
- "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
- "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
+ "version": "0.2.16",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz",
+ "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "fdir": "^6.4.4",
- "picomatch": "^4.0.2"
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
},
"engines": {
"node": ">=12.0.0"
@@ -1985,19 +2091,19 @@
}
},
"node_modules/vite": {
- "version": "7.0.6",
- "resolved": "https://registry.npmjs.org/vite/-/vite-7.0.6.tgz",
- "integrity": "sha512-MHFiOENNBd+Bd9uvc8GEsIzdkn1JxMmEeYX35tI3fv0sJBUTfW5tQsoaOwuY4KhBI09A3dUJ/DXf2yxPVPUceg==",
+ "version": "7.3.3",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.3.tgz",
+ "integrity": "sha512-/4XH147Ui7OGTjg3HbdWe5arnZQSbfuRzdr9Ec7TQi5I7R+ir0Rlc9GIvD4v0XZurELqA035KVXJXpR61xhiTA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
- "esbuild": "^0.25.0",
- "fdir": "^6.4.6",
+ "esbuild": "^0.27.0",
+ "fdir": "^6.5.0",
"picomatch": "^4.0.3",
"postcss": "^8.5.6",
- "rollup": "^4.40.0",
- "tinyglobby": "^0.2.14"
+ "rollup": "^4.43.0",
+ "tinyglobby": "^0.2.15"
},
"bin": {
"vite": "bin/vite.js"
diff --git a/frontend/package.json b/frontend/package.json
index d3b4083..01ae3c3 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -9,6 +9,8 @@
"preview": "vite preview"
},
"dependencies": {
+ "dompurify": "^3.4.3",
+ "marked": "^18.0.3",
"vue": "^3.5.17"
},
"devDependencies": {
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 3abc95c..46f5041 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -17,11 +17,13 @@ const autoReadEnabled = ref(true)
const settings = ref(null)
const isLoadingSettings = ref(false)
const currentDebug = ref(null)
+const sendNonERPtoaiEnabled = ref(false)
const ttsConfig = ref({
enableVoiceChat: false,
pollyAvailable: false,
usePolly: true,
- voiceId: 'Joanna',
+ voiceId: 'Zayd',
+ enable_changai: false,
})
const activeTtsProvider = ref('off')
const cancelPendingChatRequest = ref(null)
@@ -43,22 +45,28 @@ function handleTtsProviderEvent(event) {
}
async function loadSettings() {
+ console.log('loadSettings called, frappe available:', !!window.frappe?.call)
+ console.log('loadSettings called')
if (isLoadingSettings.value || settings.value) return
isLoadingSettings.value = true
try {
settings.value = await getSettingsDetails(responseMode.value)
+ console.log('Full settings:', settings.value) // 👈 add this
+ console.log('enable_changai raw value:', settings.value?.enable_changai) // 👈 add this
ttsConfig.value = {
enableVoiceChat: Boolean(settings.value?.enable_voice_chat),
pollyAvailable: Boolean(settings.value?.polly_enabled),
usePolly: Boolean(settings.value?.polly_enabled) && getPollyPreference(),
- voiceId: settings.value?.polly_voice_id || 'Joanna',
+ voiceId: settings.value?.polly_voice_id || 'Zayd',
+ enable_changai: Boolean(settings.value?.enable_changai),
}
updateProviderFromSettings()
debugLogs.value.push({ type: 'settings', settings: settings.value })
} catch (err) {
const errorText = getErrorText(err)
console.error('Settings API Error:', err)
+ console.error('Settings error detail:', errorText)
debugLogs.value.push({ type: 'settings', error: errorText })
} finally {
isLoadingSettings.value = false
@@ -87,6 +95,9 @@ function togglePollyPreference() {
updateProviderFromSettings()
}
+function sendNonErpToAI() {
+ sendNonERPtoaiEnabled.value = !sendNonERPtoaiEnabled.value
+}
async function handleSubmit(message) {
if (activeTab.value === 'support') {
await handleSupportSubmit(message)
@@ -113,7 +124,9 @@ async function handleChatSubmit(message) {
let cancelled = false
const chatId = getOrCreateChatId()
const requestId = `${chatId}_${Date.now()}`
- const request = runPipelineCancelable(message,chatId, responseMode.value,requestId)
+ const sendNonErptoAI = sendNonERPtoaiEnabled.value
+ console.log('sendNonErptoAI value being sent:', sendNonErptoAI, typeof sendNonErptoAI)
+ const request = runPipelineCancelable(message,chatId, responseMode.value,requestId,sendNonERPtoaiEnabled.value)
const eventName = `debug_${requestId}`
let lastStepTime = Date.now()
const steps = []
@@ -132,11 +145,8 @@ async function handleChatSubmit(message) {
thinkingMsg.text = msg.message
thinkingMsg.statusType = 'pipeline'
}
-
- if (msg.done) {
+if (msg.done) {
thinkingMsg.cancelable = false
- thinkingMsg.isStatus = false
- thinkingMsg.statusType = null
if (msg.error) {
thinkingMsg.text = `⚠️ ${msg.message || 'Something failed'}`
@@ -146,9 +156,6 @@ async function handleChatSubmit(message) {
thinkingMsg.text = msg.data.answer
thinkingMsg.isStatus = false
thinkingMsg.statusType = null
- } else if (msg.message) {
- thinkingMsg.text = msg.message
-
}
frappe.realtime.off(eventName)
@@ -262,7 +269,7 @@ onBeforeUnmount(() => {
-
+
{
:settings="settings"
:isAwaitingResponse="isAwaitingChatResponse"
:debugEnabled="debugEnabled"
+ :sendNonERPtoaiEnabled="sendNonERPtoaiEnabled"
@toggleDebug="debugEnabled = !debugEnabled"
@close="showChatbot = false"
@submit="handleSubmit"
@cancelResponse="handleCancelResponse"
@toggleAutoRead="toggleAutoRead"
@togglePollyPreference="togglePollyPreference"
+ @toggleSendNonERP="sendNonErpToAI"
+
/>
diff --git a/frontend/src/components/ChatMessage.vue b/frontend/src/components/ChatMessage.vue
index 4f0f7da..60914b0 100644
--- a/frontend/src/components/ChatMessage.vue
+++ b/frontend/src/components/ChatMessage.vue
@@ -37,7 +37,7 @@
-
- {{ message.text }}
-
+
@@ -110,6 +109,8 @@
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import BotIcon from './BotIcon.vue'
import { synthesizeTTS } from '../utils/frappe.js'
+import { marked } from 'marked'
+import DOMPurify from 'dompurify'
const props = defineProps({
message: {
@@ -126,7 +127,7 @@ const props = defineProps({
enableVoiceChat: false,
pollyAvailable: false,
usePolly: true,
- voiceId: 'Joanna',
+ voiceId: 'Zayd',
}),
},
})
@@ -135,6 +136,8 @@ const isSpeaking = ref(false)
const currentAudio = ref(null)
const isExpanded = ref(false)
const isMuted = ref(false)
+let ttsTimer = null
+
const speechSupported = computed(() => (
typeof window !== 'undefined' &&
@@ -148,11 +151,21 @@ function emitTtsProvider(provider) {
detail: { provider },
}))
}
-
function getSpeakableText(raw) {
if (typeof raw !== 'string') return ''
- if (!raw.includes('<')) return raw.trim()
-
+ // Strip markdown before anything else
+ const stripped = raw
+ .replace(/[\u{1F000}-\u{1FFFF}]/gu, '') // emojis block 1
+ .replace(/[\u{2600}-\u{26FF}]/gu, '') // emojis block 2
+ .replace(/[\u{2700}-\u{27BF}]/gu, '')
+ .replace(/\*\*(.*?)\*\*/g, '$1') // **bold**
+ .replace(/\*(.*?)\*/g, '$1') // *italic*
+ .replace(/`([^`]+)`/g, '$1') // `code`
+ .replace(/#{1,6}\s+/g, '') // # headings
+ .replace(/[-*+]\s+/g, '') // • bullet points
+ .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1') // [links](url)
+ .replace(/\s+/g, ' ')
+ if (!stripped.includes('<')) return stripped.trim()
const parser = new DOMParser()
const doc = parser.parseFromString(raw, 'text/html')
return (doc.body.textContent || '').replace(/\s+/g, ' ').trim()
@@ -213,7 +226,7 @@ function speakText(text) {
}
async function speakTextWithPolly(text) {
- const ttsResponse = await synthesizeTTS(text, props.ttsConfig?.voiceId || 'Joanna')
+ const ttsResponse = await synthesizeTTS(text, props.ttsConfig?.voiceId || 'Zayd')
if (!ttsResponse?.ok || !ttsResponse?.audio_base64) {
throw new Error(ttsResponse?.error || 'Polly synthesis failed')
}
@@ -286,6 +299,11 @@ const showMuteButton = computed(() => (
props.ttsConfig?.enableVoiceChat
))
+const renderedMessage = computed(() => {
+ const raw = props.message?.text || ''
+ return DOMPurify.sanitize(marked.parse(raw))
+})
+
watch(
() => props.message.text,
async (newText, oldText) => {
diff --git a/frontend/src/components/ChatbotPopup.vue b/frontend/src/components/ChatbotPopup.vue
index 8f1b0c1..fa7cbe3 100644
--- a/frontend/src/components/ChatbotPopup.vue
+++ b/frontend/src/components/ChatbotPopup.vue
@@ -37,9 +37,11 @@
:ttsConfig="ttsConfig"
:settings="settings"
:debugEnabled="debugEnabled"
+ :sendNonERPtoaiEnabled="sendNonERPtoaiEnabled"
@toggleAutoRead="$emit('toggleAutoRead')"
@togglePollyPreference="$emit('togglePollyPreference')"
@toggleDebug="$emit('toggleDebug')"
+ @toggleSendNonERP="$emit('toggleSendNonERP')"
/>
@@ -88,6 +90,7 @@ const props = defineProps({
type: Boolean,
default: false,
},
+ sendNonERPtoaiEnabled: { type: Boolean, default: false },
chatHistory: { type: Array, required: true },
debugLogs: { type: Array, required: true },
currentDebug: { type: Object, default: null },
@@ -99,7 +102,7 @@ const props = defineProps({
isAwaitingResponse: { type: Boolean, default: false },
})
-const emit = defineEmits(['close', 'submit', 'cancelResponse', 'update:activeTab', 'toggleAutoRead', 'togglePollyPreference', 'toggleDebug'])
+const emit = defineEmits(['close', 'submit', 'cancelResponse', 'update:activeTab', 'toggleAutoRead', 'togglePollyPreference', 'toggleDebug','toggleSendNonERP'])
const chatBodyRef = ref(null)
const chatFormRef = ref(null)
diff --git a/frontend/src/components/SettingsTab.vue b/frontend/src/components/SettingsTab.vue
index d4e90ab..363606a 100644
--- a/frontend/src/components/SettingsTab.vue
+++ b/frontend/src/components/SettingsTab.vue
@@ -81,6 +81,29 @@
+
+
+
+
Send non-ERP questions directly to AI
+
Questions unrelated to your ERP will skip the system and go straight to AI
+
+
+
+
+
+
+ {{ sendNonERPtoaiEnabled ? 'Non-ERP questions are now routed directly to AI' : 'Direct AI routing is currently off' }}
+
+
@@ -104,9 +127,13 @@ const props = defineProps({
type: Boolean,
default: false,
},
+sendNonERPtoaiEnabled: {
+ type: Boolean,
+ default: false,
+}
})
-defineEmits(['toggleAutoRead', 'togglePollyPreference', 'toggleDebug'])
+defineEmits(['toggleAutoRead', 'togglePollyPreference', 'toggleDebug','toggleSendNonERP'])
const pollyAvailabilityLabel = computed(() => {
if (!props.ttsConfig?.enableVoiceChat) return 'Voice disabled on server'
diff --git a/frontend/src/tailwind.css b/frontend/src/tailwind.css
index 5d3b11e..818a751 100644
--- a/frontend/src/tailwind.css
+++ b/frontend/src/tailwind.css
@@ -20,10 +20,14 @@
}
@keyframes dot-wave {
- 0%, 60%, 100% {
+
+ 0%,
+ 60%,
+ 100% {
transform: translateY(0);
opacity: 0.35;
}
+
30% {
transform: translateY(-5px);
opacity: 1;
@@ -35,6 +39,7 @@
transform: rotate(0deg);
opacity: 0.65;
}
+
100% {
transform: rotate(360deg);
opacity: 1;
@@ -42,11 +47,13 @@
}
@keyframes gemini-spark {
+
0%,
100% {
transform: scale(0.78);
opacity: 0.72;
}
+
50% {
transform: scale(1.04);
opacity: 1;
@@ -54,11 +61,13 @@
}
@keyframes think-pulse {
+
0%,
100% {
transform: scale(0.72);
opacity: 0.35;
}
+
45% {
transform: scale(1.08);
opacity: 1;
@@ -69,6 +78,7 @@
0% {
background-position: 0% 50%;
}
+
100% {
background-position: 200% 50%;
}
@@ -79,12 +89,15 @@
transform: translate(-130%, -50%);
opacity: 0;
}
+
20% {
opacity: 0.8;
}
+
80% {
opacity: 0.8;
}
+
100% {
transform: translate(460%, -50%);
opacity: 0;
@@ -92,10 +105,12 @@
}
@keyframes soft-float {
+
0%,
100% {
transform: translateY(0);
}
+
50% {
transform: translateY(-4px);
}
@@ -106,6 +121,7 @@
opacity: 0;
transform: translateY(10px) scale(0.98);
}
+
to {
opacity: 1;
transform: translateY(0) scale(1);
@@ -117,6 +133,7 @@
opacity: 0;
transform: translateY(8px);
}
+
to {
opacity: 1;
transform: translateY(0);
@@ -124,11 +141,13 @@
}
@keyframes stop-button-pulse {
+
0%,
100% {
transform: scale(0.94);
opacity: 0.92;
}
+
50% {
transform: scale(1);
opacity: 1;
@@ -136,6 +155,7 @@
}
@layer base {
+
#changai-chatbot-root,
#changai-chatbot-root * {
box-sizing: border-box;
@@ -160,6 +180,46 @@
background-clip: padding-box;
}
+ #changai-chatbot-root .chat-card strong {
+ font-weight: 700;
+ }
+
+ #changai-chatbot-root .chat-card em {
+ font-style: italic;
+ }
+
+ #changai-chatbot-root .chat-card p {
+ margin-bottom: 0.4rem;
+ }
+
+ #changai-chatbot-root .chat-card p:last-child {
+ margin-bottom: 0;
+ }
+
+ #changai-chatbot-root .chat-card ul {
+ list-style: disc;
+ padding-inline-start: 1.25rem;
+ margin-bottom: 0.4rem;
+ }
+
+ #changai-chatbot-root .chat-card ol {
+ list-style: decimal;
+ padding-inline-start: 1.25rem;
+ margin-bottom: 0.4rem;
+ }
+
+ #changai-chatbot-root .chat-card li {
+ margin-bottom: 0.15rem;
+ }
+
+ #changai-chatbot-root .chat-card code {
+ font-family: monospace;
+ font-size: 0.8em;
+ background: rgba(109, 79, 194, 0.08);
+ padding: 0.1em 0.35em;
+ border-radius: 4px;
+ }
+
#changai-chatbot-root button.rounded-full,
#changai-chatbot-root form.rounded-full {
border-radius: 9999px;
@@ -212,6 +272,7 @@
}
@media (prefers-reduced-motion: reduce) {
+
#changai-chatbot-root *,
#changai-chatbot-root *::before,
#changai-chatbot-root *::after {
@@ -221,4 +282,4 @@
scroll-behavior: auto !important;
}
}
-}
+}
\ No newline at end of file
diff --git a/frontend/src/utils/frappe.js b/frontend/src/utils/frappe.js
index 40585aa..1fd57fd 100644
--- a/frontend/src/utils/frappe.js
+++ b/frontend/src/utils/frappe.js
@@ -33,14 +33,15 @@ export function frappeCall(method, args = {}, mode = 'actual') {
})
}
-export function runPipeline(userQuestion, chatId, mode = 'actual', requestId = null) {
+export function runPipeline(userQuestion, chatId, mode = 'actual', requestId = null, sendNonErptoAI) {
return frappeCall(API.PIPELINE, {
user_question: userQuestion,
chat_id: chatId,
request_id: requestId,
+ sendNonErptoAI: sendNonErptoAI,
}, mode)
}
-export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', requestId = null) {
+export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', requestId = null, sendNonErptoAI) {
if (mode === 'test') {
return {
promise: Promise.resolve({
@@ -48,6 +49,7 @@ export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', req
user_question: userQuestion,
chat_id: chatId,
request_id: requestId,
+ sendNonErptoAI: sendNonErptoAI,
})}`
}),
cancel: () => false,
@@ -71,6 +73,7 @@ export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', req
user_question: userQuestion,
chat_id: chatId,
request_id: requestId,
+ sendNonErptoAI: sendNonErptoAI,
},
callback(r) {
settled = true
@@ -102,7 +105,7 @@ export function getSettingsDetails(mode = 'actual') {
return frappeCall(API.SETTINGS, {}, mode)
}
-export function synthesizeTTS(text, voiceId = 'Joanna', mode = 'actual') {
+export function synthesizeTTS(text, voiceId = 'Zayd', mode = 'actual') {
return frappeCall(API.TTS, {
text,
voice_id: voiceId,