1import{S as $,i as x,s as ee,e as M,m as B,p as I,t as y,n as q,r as le,x as te,$ as se,H as C,G as E,C as d,g as k,h as ne,j as oe,l as ae,o as ie,q as v,f as re,L as S,E as j,F as L,N as Q,M as H,I as ue,D as N,J as A,K as fe,a0 as _e}from"./index-8bb1e421.js";import{B as me}from"./Button-15729754.js";import{B as ce}from"./BlockLabel-f1bf64c0.js";import{E as ge}from"./Empty-dd502669.js";/* empty css */import{I as R}from"./Image-c08b730d.js";import{n as T}from"./ModifyUpload.svelte_svelte_type_style_lang-ba6baa96.js";function z(t,e,s){const l=t.slice();return l[22]=e[s][0],l[7]=e[s][1],l[24]=s,l}function J(t,e,s){const l=t.slice();return l[25]=e[s][0],l[7]=e[s][1],l[24]=s,l}function he(t){let e,s,l,n,i,o,_=t[8]?t[8][1]:[],m=[];for(let a=0;a<_.length;a+=1)m[a]=K(J(t,_,a));let c=t[4]&&t[8]&&X(t);return{c(){e=E("div"),s=E("img"),n=C();for(let a=0;a<m.length;a+=1)m[a].c();i=C(),c&&c.c(),o=re(),d(s,"class","base-image svelte-1opw6sf"),S(s.src,l=t[8]?t[8][0].data:null)||d(s,"src",l),d(e,"class","image-container svelte-1opw6sf")},m(a,g){k(a,e,g),j(e,s),j(e,n);for(let f=0;f<m.length;f+=1)m[f]&&m[f].m(e,null);k(a,i,g),c&&c.m(a,g),k(a,o,g)},p(a,g){if(g&256&&!S(s.src,l=a[8]?a[8][0].data:null)&&d(s,"src",l),g&800){_=a[8]?a[8][1]:[];let f;for(f=0;f<_.length;f+=1){const b=J(a,_,f);m[f]?m[f].p(b,g):(m[f]=K(b),m[f].c(),m[f].m(e,null))}for(;f<m.length;f+=1)m[f].d(1);m.length=_.length}a[4]&&a[8]?c?c.p(a,g):(c=X(a),c.c(),c.m(o.parentNode,o)):c&&(c.d(1),c=null)},i:L,o:L,d(a){a&&v(e),Q(m,a),a&&v(i),c&&c.d(a),a&&v(o)}}}function de(t){let e,s;return e=new ge({props:{size:"large",unpadded_box:!0,$$slots:{default:[be]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(l,n){B(e,l,n),s=!0},p(l,n){const i={};n&134217728&&(i.$$scope={dirty:n,ctx:l}),e.$set(i)},i(l){s||(I(e.$$.fragment,l),s=!0)},o(l){y(e.$$.fragment,l),s=!1},d(l){q(e,l)}}}function K(t){let e,s,l;return{c(){e=E("img"),d(e,"class","mask svelte-1opw6sf"),S(e.src,s=t[25].data)||d(e,"src",s),d(e,"style",l=t[5].color_map&&t[7]in t[5].color_map?null:`filter: hue-rotate(${Math.round(t[24]*360/t[8][1].length)}deg);`),H(e,"active",t[9]==t[7]),H(e,"inactive",t[9]!=t[7]&&t[9]!=null)},m(n,i){k(n,e,i)},p(n,i){i&256&&!S(e.src,s=n[25].data)&&d(e,"src",s),i&288&&l!==(l=n[5].color_map&&n[7]in n[5].color_map?null:`filter: hue-rotate(${Math.round(n[24]*360/n[8][1].length)}deg);`)&&d(e,"style",l),i&768&&H(e,"active",n[9]==n[7]),i&768&&H(e,"inactive",n[9]!=n[7]&&n[9]!=null)},d(n){n&&v(e)}}}function X(t){let e,s=t[8][1],l=[];for(let n=0;n<s.length;n+=1)l[n]=O(z(t,s,n));return{c(){e=E("div");for(let n=0;n<l.length;n+=1)l[n].c();d(e,"class","legend svelte-1opw6sf")},m(n,i){k(n,e,i);for(let o=0;o<l.length;o+=1)l[o]&&l[o].m(e,null)},p(n,i){if(i&7456){s=n[8][1];let o;for(o=0;o<s.length;o+=1){const _=z(n,s,o);l[o]?l[o].p(_,i):(l[o]=O(_),l[o].c(),l[o].m(e,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=s.length}},d(n){n&&v(e),Q(l,n)}}}function O(t){let e,s=t[7]+"",l,n,i,o;function _(){return t[17](t[7])}function m(){return t[18](t[7])}function c(){return t[21](t[24],t[7])}return{c(){e=E("div"),l=ue(s),n=C(),d(e,"class","legend-item svelte-1opw6sf"),N(e,"background-color",t[5].color_map&&t[7]in t[5].color_map?t[5].color_map[t[7]]+"88":`hsla(${Math.round(t[24]*360/t[8][1].length)}, 100%, 50%, 0.3)`)},m(a,g){k(a,e,g),j(e,l),j(e,n),i||(o=[A(e,"mouseover",_),A(e,"focus",m),A(e,"mouseout",t[19]),A(e,"blur",t[20]),A(e,"click",c)],i=!0)},p(a,g){t=a,g&256&&s!==(s=t[7]+"")&&fe(l,s),g&288&&N(e,"background-color",t[5].color_map&&t[7]in t[5].color_map?t[5].color_map[t[7]]+"88":`hsla(${Math.round(t[24]*360/t[8][1].length)}, 100%, 50%, 0.3)`)},d(a){a&&v(e),i=!1,_e(o)}}}function be(t){let e,s;return e=new R({}),{c(){M(e.$$.fragment)},m(l,n){B(e,l,n),s=!0},i(l){s||(I(e.$$.fragment,l),s=!0)},o(l){y(e.$$.fragment,l),s=!1},d(l){q(e,l)}}}function ke(t){let e,s,l,n,i,o,_,m;const c=[t[6]];let a={};for(let r=0;r<c.length;r+=1)a=te(a,c[r]);e=new se({props:a}),l=new ce({props:{show_label:t[3],Icon:R,label:t[7]||"Image"}});const g=[de,he],f=[];function b(r,h){return r[8]==null?0:1}return o=b(t),_=f[o]=g[o](t),{c(){M(e.$$.fragment),s=C(),M(l.$$.fragment),n=C(),i=E("div"),_.c(),d(i,"class","container svelte-1opw6sf")},m(r,h){B(e,r,h),k(r,s,h),B(l,r,h),k(r,n,h),k(r,i,h),f[o].m(i,null),m=!0},p(r,h){const D=h&64?ne(c,[oe(r[6])]):{};e.$set(D);const p={};h&8&&(p.show_label=r[3]),h&128&&(p.label=r[7]||"Image"),l.$set(p);let w=o;o=b(r),o===w?f[o].p(r,h):(ae(),y(f[w],1,1,()=>{f[w]=null}),ie(),_=f[o],_?_.p(r,h):(_=f[o]=g[o](r),_.c()),I(_,1),_.m(i,null))},i(r){m||(I(e.$$.fragment,r),I(l.$$.fragment,r),I(_),m=!0)},o(r){y(e.$$.fragment,r),y(l.$$.fragment,r),y(_),m=!1},d(r){q(e,r),r&&v(s),q(l,r),r&&v(n),r&&v(i),f[o].d()}}}function ve(t){let e,s;return e=new me({props:{visible:t[2],elem_id:t[0],elem_classes:t[1],padding:!1,style:{height:t[5].height||P,width:t[5].width},$$slots:{default:[ke]},$$scope:{ctx:t}}}),{c(){M(e.$$.fragment)},m(l,n){B(e,l,n),s=!0},p(l,[n]){const i={};n&4&&(i.visible=l[2]),n&1&&(i.elem_id=l[0]),n&2&&(i.elem_classes=l[1]),n&32&&(i.style={height:l[5].height||P,width:l[5].width}),n&134218744&&(i.$$scope={dirty:n,ctx:l}),e.$set(i)},i(l){s||(I(e.$$.fragment,l),s=!0)},o(l){y(e.$$.fragment,l),s=!1},d(l){q(e,l)}}}const P=240;function pe(t,e,s){let{elem_id:l=""}=e,{elem_classes:n=[]}=e,{visible:i=!0}=e,{value:o}=e,_,m,{label:c="Annotated Image"}=e,{show_label:a=!0}=e,{show_legend:g=!0}=e,{style:f={}}=e,{root:b}=e,{root_url:r}=e,h=null,{loading_status:D}=e;
1const p=le();function w(u){s(9,h=u)}function F(){s(9,h=null)}const U=u=>w(u),V=u=>w(u),W=()=>F(),Y=()=>F(),Z=(u,G)=>p("select",{index:u,value:G});return t.$$set=u=>{"elem_id"in u&&s(0,l=u.elem_id),"elem_classes"in u&&s(1,n=u.elem_classes),"visible"in u&&s(2,i=u.visible),"value"in u&&s(13,o=u.value),"label"in u&&s(7,c=u.label),"show_label"in u&&s(3,a=u.show_label),"show_legend"in u&&s(4,g=u.show_legend),"style"in u&&s(5,f=u.style),"root"in u&&s(14,b=u.root),"root_url"in u&&s(15,r=u.root_url),"loading_status"in u&&s(6,D=u.loading_status)},t.$$.update=()=>{t.$$.dirty&122880&&(o!==_&&(s(16,_=o),p("change")),o?s(8,m=[T(o[0],b,r),o[1].map(([u,G])=>[T(u,b,r),G])]):s(8,m=null))},[l,n,i,a,g,f,D,c,m,h,p,w,F,o,b,r,_,U,V,W,Y,Z]}class we extends ${constructor(e){super(),x(this,e,pe,ve,ee,{elem_id:0,elem_classes:1,visible:2,value:13,label:7,show_label:3,show_legend:4,style:5,root:14,root_url:15,loading_status:6})}}const Ce=we,De=["static"],He=t=>({type:{payload:"[string, Array<[string, string]>]"},description:{payload:"path to base image, followed by a list of tuples [mask image path, label]"}});export{Ce as Component,He as document,De as modes}; 2//# sourceMappingURL=index-99ed7709.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.