text: var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function c(t){t.forEach(e)}function o(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e){t.appendChild(e)}function i(t,e,n){t.insertBefore(e,n||null)}function l(t){t.parentNode.removeChild(t)}function a(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function u(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function d(){return f(" ")}function m(t,e,n,c){return t.addEventListener(e,n,c),()=>t.removeEventListener(e,n,c)}function h(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function g(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}let p;function $(t){p=t}function v(){const t=function(){if(!p)throw new Error("Function called outside component initialization");return p}();return(e,n)=>{const c=t.$$.callbacks[e];if(c){const o=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);c.slice().forEach((e=>{e.call(t,o)}))}}}const b=[],x=[],y=[],w=[],k=Promise.resolve();let E=!1;function _(t){y.push(t)}let O=!1;const L=new Set;function C(){if(!O){O=!0;do{for(let t=0;t<b.length;t+=1){const e=b[t];$(e),j(e.$$)}for($(null),b.length=0;x.length;)x.pop()();for(let t=0;t<y.length;t+=1){const e=y[t];L.has(e)||(L.add(e),e())}y.length=0}while(b.length);for(;w.length;)w.pop()();E=!1,O=!1,L.clear()}}function j(t){if(null!==t.fragment){t.update(),c(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(_)}}const T=new Set;let A;function M(){A={r:0,c:[],p:A}}function B(){A.r||c(A.c),A=A.p}function I(t,e){t&&t.i&&(T.delete(t),t.i(e))}function N(t,e,n,c){if(t&&t.o){if(T.has(t))return;T.add(t),A.c.push((()=>{T.delete(t),c&&(n&&t.d(1),c())})),t.o(e)}}function z(t){t&&t.c()}function H(t,n,r){const{fragment:s,on_mount:i,on_destroy:l,after_update:a}=t.$$;s&&s.m(n,r),_((()=>{const n=i.map(e).filter(o);l?l.push(...n):c(n),t.$$.on_mount=[]})),a.forEach(_)}function S(t,e){const n=t.$$;null!==n.fragment&&(c(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function q(t,e){-1===t.$$.dirty[0]&&(b.push(t),E||(E=!0,k.then(C)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function F(e,o,r,s,i,a,u=[-1]){const f=p;$(e);const d=o.props||{},m=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:i,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(f?f.$$.context:[]),callbacks:n(),dirty:u,skip_bound:!1};let h=!1;if(m.ctx=r?r(e,d,((t,n,...c)=>{const o=c.length?c[0]:n;return m.ctx&&i(m.ctx[t],m.ctx[t]=o)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](o),h&&q(e,t)),n})):[],m.update(),h=!0,c(m.before_update),m.fragment=!!s&&s(m.ctx),o.target){if(o.hydrate){const t=function(t){return Array.from(t.childNodes)}(o.target);m.fragment&&m.fragment.l(t),t.forEach(l)}else m.fragment&&m.fragment.c();o.intro&&I(e.$$.fragment),H(e,o.target,o.anchor),C()}$(f)}class J{$destroy(){S(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function P(t,e){if(IntersectionObserver){const n=new IntersectionObserver((function(n){n.forEach((n=>{n.isIntersecting&&t.setAttribute("src",e)}))}),{rootMargin:"50px 0px",threshold:.01});return n.observe(t),{destroy(){n&&n.unobserve(t)}}}{let c=void 0;function n(){c&&clearTimeout(c),c=setTimeout((function(){var n=window.pageYOffset;t.offsetTop<window.innerHeight+n&&t.setAttribute("src",e)}),20)}return document.addEventListener("scroll",n),window.addEventListener("resize",n),window.addEventListener("orientationChange",n),{destroy(){document.removeEventListener("scroll",n),window.removeEventListener("resize",n),window.removeEventListener("orientationChange",n)}}}}function R(t,e,n){const c=t.slice();return c[1]=e[n],c}function Y(t){let e,n,c,o,r,a,m=t[1]+"",p=G(t[0].confidences[t[1]])+"";return{c(){e=u("p"),n=f(m),c=u("br"),o=f(p),r=d(),h(e,"class",a="card-footer-item "+K(t[0].confidences[t[1]]))},m(t,l){i(t,e,l),s(e,n),s(e,c),s(e,o),s(e,r)},p(t,c){1&c&&m!==(m=t[1]+"")&&g(n,m),1&c&&p!==(p=G(t[0].confidences[t[1]])+"")&&g(o,p),1&c&&a!==(a="card-footer-item "+K(t[0].confidences[t[1]]))&&h(e,"class",a)},d(t){t&&l(e)}}}function D(e){let n,c,r,m,p,$,v,b,x,y,w,k,E,_,O=e[0].image+"",L=Object.keys(e[0].confidences),C=[];for(let t=0;t<L.length;t+=1)C[t]=Y(R(e,L,t));return{c(){n=u("div"),c=u("div"),r=u("div"),m=f(O),p=d(),$=u("div"),v=u("figure"),b=u("img"),w=d(),k=u("div");for(let t=0;t<C.length;t+=1)C[t].c();h(r,"class","card-header-title"),h(c,"class","card-header"),h(b,"alt",x=e[0].image),h(v,"class","image is-square"),h($,"class","card-image"),h(k,"class","card-footer has-text-centered"),h(n,"class","card")},m(l,a){i(l,n,a),s(n,c),s(c,r),s(r,m),s(n,p),s(n,$),s($,v),s(v,b),s(n,w),s(n,k);for(let t=0;t<C.length;t+=1)C[t].m(k,null);var u;E||(u=y=P.call(null,b,"images/"+e[0].image),_=u&&o(u.destroy)?u.destroy:t,E=!0)},p(t,[e]){if(1&e&&O!==(O=t[0].image+"")&&g(m,O),1&e&&x!==(x=t[0].image)&&h(b,"alt",x),y&&o(y.update)&&1&e&&y.update.call(null,"images/"+t[0].image),1&e){let n;for(L=Object.keys(t[0].confidences),n=0;n<L.length;n+=1){const c=R(t,L,n);C[n]?C[n].p(c,e):(C[n]=Y(c),C[n].c(),C[n].m(k,null))}for(;n<C.length;n+=1)C[n].d(1);C.length=L.length}},i:t,o:t,d(t){t&&l(n),a(C,t),E=!1,_()}}}function G(t){return 1==t||0==t?t:t.toFixed(3)}function K(t){return 1==t?"has-background-success":""}function Q(t,e,n){let{match:c}=e;return t.$$set=t=>{"match"in t&&n(0,c=t.match)},[c]}class U extends J{constructor(t){super(),F(this,t,Q,D,r,{match:0})}}function V(t,e,n){const c=t.slice();return c[6]=e[n],c}function W(t){let e,n;return e=new U({props:{match:t[6]}}),{c(){z(e.$$.fragment)},m(t,c){H(e,t,c),n=!0},p(t,n){const c={};16&n&&(c.match=t[6]),e.$set(c)},i(t){n||(I(e.$$.fragment,t),n=!0)},o(t){N(e.$$.fragment,t),n=!1},d(t){S(e,t)}}}function X(t){let e,n,c,o,r,p,$,v,b,x,y,w,k,E,_,O,L,C,j,T,A,z=t[1].length+"",H=t[3].length+"",S=t[4],q=[];for(let e=0;e<S.length;e+=1)q[e]=W(V(t,S,e));const F=t=>N(q[t],1,1,(()=>{q[t]=null}));return{c(){e=u("div"),n=u("p"),c=u("span"),o=f(t[0]),r=d(),p=u("span"),$=f(z),v=d(),b=u("span"),x=f(H),y=d(),w=u("br"),k=d(),E=u("label"),_=u("input"),O=f("\n      exclude full confidences"),L=d(),C=u("div");for(let t=0;t<q.length;t+=1)q[t].c();h(c,"class","title"),h(p,"class","tag is-info"),h(b,"class","tag is-warning"),h(_,"type","checkbox"),h(E,"class","checkbox"),h(n,"class","has-text-centered"),h(C,"class","match-list svelte-7373i7"),h(e,"class","box")},m(l,a){i(l,e,a),s(e,n),s(n,c),s(c,o),s(n,r),s(n,p),s(p,$),s(n,v),s(n,b),s(b,x),s(n,y),s(n,w),s(n,k),s(n,E),s(E,_),_.checked=t[2],s(E,O),s(e,L),s(e,C);for(let t=0;t<q.length;t+=1)q[t].m(C,null);j=!0,T||(A=m(_,"change",t[5]),T=!0)},p(t,[e]){if((!j||1&e)&&g(o,t[0]),(!j||2&e)&&z!==(z=t[1].length+"")&&g($,z),(!j||8&e)&&H!==(H=t[3].length+"")&&g(x,H),4&e&&(_.checked=t[2]),16&e){let n;for(S=t[4],n=0;n<S.length;n+=1){const c=V(t,S,n);q[n]?(q[n].p(c,e),I(q[n],1)):(q[n]=W(c),q[n].c(),I(q[n],1),q[n].m(C,null))}for(M(),n=S.length;n<q.length;n+=1)F(n);B()}},i(t){if(!j){for(let t=0;t<S.length;t+=1)I(q[t]);j=!0}},o(t){q=q.filter(Boolean);for(let t=0;t<q.length;t+=1)N(q[t]);j=!1},d(t){t&&l(e),a(q,t),T=!1,A()}}}function Z(t,e,n){let c,o,{name:r}=e,{matches:s=[]}=e,i=!1;return t.$$set=t=>{"name"in t&&n(0,r=t.name),"matches"in t&&n(1,s=t.matches)},t.$$.update=()=>{3&t.$$.dirty&&n(3,c=s.filter((t=>t.confidences[r]<1))),14&t.$$.dirty&&n(4,o=i?c:s)},[r,s,i,c,o,function(){i=this.checked,n(2,i)}]}class tt extends J{constructor(t){super(),F(this,t,Z,X,r,{name:0,matches:1})}}function et(e){let n,o,r,a,f,g;return{c(){n=u("div"),o=u("p"),o.textContent="Load results file  ",r=d(),a=u("input"),h(o,"class","subtitle"),h(a,"type","file"),h(a,"id","results-file-input"),h(n,"class","notification is-info is-light has-text-centered")},m(t,c){i(t,n,c),s(n,o),s(n,r),s(n,a),f||(g=[m(a,"change",e[2]),m(a,"change",e[1])],f=!0)},p:t,i:t,o:t,d(t){t&&l(n),f=!1,c(g)}}}function nt(t,e,n){const c=v();let o;return[o,function(){o[0].text().then((t=>{c("loaded",{file:o[0].name,results:JSON.parse(t)})}))},function(){o=this.files,n(0,o)}]}class ct extends J{constructor(t){super(),F(this,t,nt,et,r,{})}}function ot(t,e,n){const c=t.slice();return c[3]=e[n],c}function rt(e){let n,c;return n=new ct({}),n.$on("loaded",e[2]),{c(){z(n.$$.fragment)},m(t,e){H(n,t,e),c=!0},p:t,i(t){c||(I(n.$$.fragment,t),c=!0)},o(t){N(n.$$.fragment,t),c=!1},d(t){S(n,t)}}}function st(t){let e,n,c=Object.keys(t[1]),o=[];for(let e=0;e<c.length;e+=1)o[e]=it(ot(t,c,e));const r=t=>N(o[t],1,1,(()=>{o[t]=null}));return{c(){e=u("div");for(let t=0;t<o.length;t+=1)o[t].c();h(e,"class","columns")},m(t,c){i(t,e,c);for(let t=0;t<o.length;t+=1)o[t].m(e,null);n=!0},p(t,n){if(2&n){let s;for(c=Object.keys(t[1]),s=0;s<c.length;s+=1){const r=ot(t,c,s);o[s]?(o[s].p(r,n),I(o[s],1)):(o[s]=it(r),o[s].c(),I(o[s],1),o[s].m(e,null))}for(M(),s=c.length;s<o.length;s+=1)r(s);B()}},i(t){if(!n){for(let t=0;t<c.length;t+=1)I(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)N(o[t]);n=!1},d(t){t&&l(e),a(o,t)}}}function it(t){let e,n,c,o;return n=new tt({props:{name:t[3],matches:t[1][t[3]].matches}}),{c(){e=u("div"),z(n.$$.fragment),c=d(),h(e,"class","column")},m(t,r){i(t,e,r),H(n,e,null),s(e,c),o=!0},p(t,e){const c={};2&e&&(c.name=t[3]),2&e&&(c.matches=t[1][t[3]].matches),n.$set(c)},i(t){o||(I(n.$$.fragment,t),o=!0)},o(t){N(n.$$.fragment,t),o=!1},d(t){t&&l(e),S(n)}}}function lt(t){let e,n,c,o,r,a,m,p,$,v,b,x,y,w,k;const E=[st,rt],_=[];function O(t,e){return t[1]?0:1}return b=O(t),x=_[b]=E[b](t),{c(){e=u("nav"),n=u("div"),c=u("p"),c.textContent="MOIC - Biofilm image classifier",o=d(),r=u("p"),a=f(t[0]),m=d(),p=u("div"),p.innerHTML='<div class="navbar-end"><p class="navbar-item"><span class="tag is-info">matches</span></p> \n      <p class="navbar-item"><span class="tag is-warning">uncertain matches</span></p></div>',$=d(),v=u("section"),x.c(),y=d(),w=u("footer"),w.innerHTML='<div class="content has-text-centered">Built by Paul J. Cullen and Robert M. Romito</div>',h(c,"class","navbar-item title"),h(r,"class","navbar-item subtitle"),h(n,"class","navbar-brand"),h(p,"class","navbar-menu"),h(e,"class","navbar is-fixed-top"),h(v,"class","section"),h(w,"class","footer")},m(t,l){i(t,e,l),s(e,n),s(n,c),s(n,o),s(n,r),s(r,a),s(e,m),s(e,p),i(t,$,l),i(t,v,l),_[b].m(v,null),i(t,y,l),i(t,w,l),k=!0},p(t,[e]){(!k||1&e)&&g(a,t[0]);let n=b;b=O(t),b===n?_[b].p(t,e):(M(),N(_[n],1,1,(()=>{_[n]=null})),B(),x=_[b],x||(x=_[b]=E[b](t),x.c()),I(x,1),x.m(v,null))},i(t){k||(I(x),k=!0)},o(t){N(x),k=!1},d(t){t&&l(e),t&&l($),t&&l(v),_[b].d(),t&&l(y),t&&l(w)}}}function at(t,e,n){let c,o="";return[o,c,function(t){n(0,o=t.detail.file),n(1,c=t.detail.results)}]}return new class extends J{constructor(t){super(),F(this,t,at,lt,r,{})}}({target:document.body})}();
  //# sourceMappingURL=bundle.js.map
  