import{S as k,i as C,s as $,b as g,c as v,d as _,g as d,a as f,h,j as m,k as p,C as b,x as w,H,a4 as q,a5 as E,E as S,f as T,m as U,t as j,p as B,q as D,K}from"./vendor.906e418a.js";function x(o,a,l){const n=o.slice();return n[5]=a[l],n}function y(o){let a,l=o[5][0]+"",n,e,t,i=o[5][1]+"",s,r;return{c(){a=g("div"),n=v(l),e=_(),t=g("div"),s=v(i),r=_(),d(a,"data-testid","bot"),d(a,"class","px-3 py-2 rounded-2xl bg-yellow-500 text-white ml-7"),d(t,"data-testid","user"),d(t,"class","px-3 py-2 rounded-2xl place-self-start bg-gray-300 dark:bg-gray-850 dark:text-gray-200 mr-7")},m(c,u){f(c,a,u),h(a,n),f(c,e,u),f(c,t,u),h(t,s),h(t,r)},p(c,u){u&1&&l!==(l=c[5][0]+"")&&m(n,l),u&1&&i!==(i=c[5][1]+"")&&m(s,i)},d(c){c&&p(a),c&&p(e),c&&p(t)}}}function z(o){let a,l,n=o[0],e=[];for(let t=0;t<n.length;t+=1)e[t]=y(x(o,n,t));return{c(){a=g("div"),l=g("div");for(let t=0;t<e.length;t+=1)e[t].c();d(l,"class","flex flex-col items-end space-y-4 p-3"),d(a,"class","overflow-y-auto h-64 border border-b-0 rounded-t-lg leading-tight")},m(t,i){f(t,a,i),h(a,l);for(let s=0;s<e.length;s+=1)e[s].m(l,null);o[2](a)},p(t,[i]){if(i&1){n=t[0];let s;for(s=0;s<n.length;s+=1){const r=x(t,n,s);e[s]?e[s].p(r,i):(e[s]=y(r),e[s].c(),e[s].m(l,null))}for(;s<e.length;s+=1)e[s].d(1);e.length=n.length}},i:b,o:b,d(t){t&&p(a),w(e,t),o[2](null)}}}function A(o,a,l){let{value:n}=a,e,t;const i=H();q(()=>{t=e&&e.offsetHeight+e.scrollTop>e.scrollHeight-20}),E(()=>{t&&e.scrollTo(0,e.scrollHeight)});function s(r){S[r?"unshift":"push"](()=>{e=r,l(1,e)})}return o.$$set=r=>{"value"in r&&l(0,n=r.value)},o.$$.update=()=>{o.$$.dirty&1&&n&&i("change")},[n,e,s]}class F extends k{constructor(a){super();C(this,a,A,z,$,{value:0})}}function G(o){let a,l;return a=new F({props:{value:o[0]}}),a.$on("change",o[1]),{c(){T(a.$$.fragment)},m(n,e){U(a,n,e),l=!0},p(n,[e]){const t={};e&1&&(t.value=n[0]),a.$set(t)},i(n){l||(j(a.$$.fragment,n),l=!0)},o(n){B(a.$$.fragment,n),l=!1},d(n){D(a,n)}}}function I(o,a,l){let{value:n=[]}=a;function e(t){K.call(this,o,t)}return o.$$set=t=>{"value"in t&&l(0,n=t.value)},[n,e]}class J extends k{constructor(a){super();C(this,a,I,G,$,{value:0})}}var M=J;const N=["static"];export{M as Component,N as modes};
