import{w as f,d as E}from"./index.6ec942b9.js";import{ad as w,ae as T,af as D,ag as W}from"./index.463cc238.js";function g(t){return Object.prototype.toString.call(t)==="[object Date]"}function u(t,e){if(t===e||t!==t)return()=>t;const o=typeof t;if(o!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const i=e.map((n,r)=>u(t[r],n));return n=>i.map(r=>r(n))}if(o==="object"){if(!t||!e)throw new Error("Object cannot be null");if(g(t)&&g(e)){t=t.getTime(),e=e.getTime();const r=e-t;return s=>new Date(t+s*r)}const i=Object.keys(e),n={};return i.forEach(r=>{n[r]=u(t[r],e[r])}),r=>{const s={};return i.forEach(a=>{s[a]=n[a](r)}),s}}if(o==="number"){const i=e-t;return n=>t+n*i}throw new Error(`Cannot interpolate ${o} values`)}function x(t,e={}){const o=f(t);let i,n=t;function r(s,a){if(t==null)return o.set(t=s),Promise.resolve();n=s;let c=i,p=!1,{delay:j=0,duration:l=400,easing:A=W,interpolate:q=u}=w(w({},e),a);if(l===0)return c&&(c.abort(),c=null),o.set(t=n),Promise.resolve();const d=T()+j;let y;return i=D(h=>{if(h<d)return!0;p||(y=q(t,s),typeof l=="function"&&(l=l(t,s)),p=!0),c&&(c.abort(),c=null);const m=h-d;return m>l?(o.set(t=s),!1):(o.set(t=y(A(m/l))),!0)}),i.promise}return{set:r,update:(s,a)=>r(s(n,t),a),subscribe:o.subscribe}}const N=f([]),k=f([{id:1,question:"What is this?",answer:"This is the chat interface.",vote:"na"},{id:1,question:"How do I use it?",answer:"Just type in a question below!",vote:"na"}]),P=f({labelNames:["txt2.txt","pdf2.txt"],labels:[0,3],projection:[[.1443715864989249,.00463214192040876,.11292804485781914],[-.05626482326843836,-.013694651798983428,.01709368313171561]]}),S=f("all"),b=[{na:0,good:0,bad:0}],F=E(k,t=>{let e={...b[0]};return t.forEach(o=>{e[o.vote]++}),console.log("newTally",e),[{...e}]},b),C=["Who","What","How","Why","Where","Does","Can","N/A"],I=x(C.map(t=>({question:t,count:0})));export{k as c,S as f,P as p,I as q,F as s,x as t,N as u};
