1import{S as Z,i as q,s as D,A as V,B as d,f as k,D as m,E,p as w,e as z,F as y,G as L,H as N,C as A,O as M,I as Q,J as I,N as U,q as K,c as B,m as C,o as h,t as g,l as j,v as W,a4 as X,g as $,h as x,k as F,n as G,x as ee}from"./index.84b6e782.js";/* empty css */import{a as le}from"./Empty.svelte_svelte_type_style_lang.085940ab.js";import{B as te}from"./BlockLabel.765f314e.js";import{E as ne}from"./Empty.2cdb2d1a.js";function se(s){let e,t;return{c(){e=V("svg"),t=V("path"),d(t,"fill","currentColor"),d(t,"d","M4 2H2v26a2 2 0 0 0 2 2h26v-2H4v-3h22v-8H4v-4h14V5H4Zm20 17v4H4v-4ZM16 7v4H4V7Z"),d(e,"xmlns","http://www.w3.org/2000/svg"),d(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),d(e,"aria-hidden","true"),d(e,"role","img"),d(e,"class","iconify iconify--carbon"),d(e,"width","100%"),d(e,"height","100%"),d(e,"preserveAspectRatio","xMidYMid meet"),d(e,"viewBox","0 0 32 32")},m(l,n){k(l,e,n),m(e,t)},p:E,i:E,o:E,d(l){l&&w(e)}}}class P extends Z{constructor(e){super(),q(this,e,null,se,D,{})}}function J(s,e,t){const l=s.slice();return l[6]=e[t],l[8]=t,l}function O(s){let e,t=s[0].confidences,l=[];for(let n=0;n<t.length;n+=1)l[n]=T(J(s,t,n));return{c(){for(let n=0;n<l.length;n+=1)l[n].c();e=z()},m(n,a){for(let o=0;o<l.length;o+=1)l[o].m(n,a);k(n,e,a)},p(n,a){if(a&25){t=n[0].confidences;let o;for(o=0;o<t.length;o+=1){const c=J(n,t,o);l[o]?l[o].p(c,a):(l[o]=T(c),l[o].c(),l[o].m(e.parentNode,e))}for(;o<l.length;o+=1)l[o].d(1);l.length=t.length}},d(n){U(l,n),n&&w(e)}}}function R(s){let e,t,l,n=Math.round(s[6].confidence*100)+"",a,o;return{c(){e=y("div"),t=L(),l=y("div"),a=N(n),o=N("%"),d(e,"class","line svelte-1s28oeb"),d(l,"class","confidence svelte-1s28oeb")},m(c,f){k(c,e,f),k(c,t,f),k(c,l,f),m(l,a),m(l,o)},p(c,f){f&1&&n!==(n=Math.round(c[6].confidence*100)+"")&&I(a,n)},d(c){c&&w(e),c&&w(t),c&&w(l)}}}function T(s){let e,t,l,n,a,o,c=s[6].label+"",f,u,r,p,v,_=s[0].confidences&&R(s);function i(){return s[5](s[8],s[6])}return{c(){e=y("div"),t=y("div"),l=y("div"),n=L(),a=y("div"),o=y("div"),f=N(c),u=L(),_&&_.c(),r=L(),d(l,"class","bar svelte-1s28oeb"),A(l,"width",s[6].confidence*100+"%"),d(o,"class","text svelte-1s28oeb"),d(a,"class","label svelte-1s28oeb"),d(t,"class","inner-wrap svelte-1s28oeb"),d(e,"class","confidence-set group svelte-1s28oeb"),M(e,"selectable",s[3])},m(b,H){k(b,e,H),m(e,t),m(t,l),m(t,n),m(t,a),m(a,o),m(o,f),m(a,u),_&&_.m(a,null),m(e,r),p||(v=Q(e,"click",i),p=!0)},p(b,H){s=b,H&1&&A(l,"width",s[6].confidence*100+"%"),H&1&&c!==(c=s[6].label+"")&&I(f,c),s[0].confidences?_?_.p(s,H):(_=R(s),_.c(),_.m(a,null)):_&&(_.d(1),_=null),H&8&&M(e,"selectable",s[3])},d(b){b&&w(e),_&&_.d(),p=!1,v()}}}function ae(s){let e,t,l=s[0].label+"",n,a,o=typeof s[0]=="object"&&s[0].confidences&&O(s);return{c(){e=y("div"),t=y("div"),n=N(l),a=L(),o&&o.c(),d(t,"class","output-class svelte-1s28oeb"),M(t,"sr-only",!s[1]),M(t,"no-confidence",!("confidences"in s[0])),A(t,"background-color",s[2]||"transparent",!1)},m(c,f){k(c,e,f),m(e,t),m(t,n),m(e,a),o&&o.m(e,null)},p(c,[f]){f&1&&l!==(l=c[0].label+"")&&I(n,l),f&2&&M(t,"sr-only",!c[1]),f&1&&M(t,"no-confidence",!("confidences"in c[0])),f&4&&A(t,"background-color",c[2]||"transparent",!1),typeof c[0]=="object"&&c[0].confidences?o?o.p(c,f):(o=O(c),o.c(),o.m(e,null)):o&&(o.d(1),o=null)},i:E,o:E,d(c){c&&w(e),o&&o.d()}}}function ie(s,e,t){let{value:l}=e;const n=K();let{show_label:a=!0}=e,{color:o=void 0}=e,{selectable:c=!1}=e;const f=(u,r)=>{n("select",{index:u,value:r.label})};return s.$$set=u=>{"value"in u&&t(0,l=u.value),"show_label"in u&&t(1,a=u.show_label),"color"in u&&t(2,o=u.color),"selectable"in u&&t(3,c=u.selectable)},[l,a,o,c,n,f]}class oe extends Z{constructor(e){super(),q(this,e,ie,ae,D,{value:0,show_label:1,color:2,selectable:3})}}function Y(s){let e,t;return e=new te({props:{Icon:P,label:s[4],disable:typeof s[5].container=="boolean"&&!s[5].container}}),{c(){B(e.$$.fragment)},m(l,n){C(e,l,n),t=!0},p(l,n){const a={};n&16&&(a.label=l[4]),n&32&&(a.disable=typeof l[5].container=="boolean"&&!l[5].container),e.$set(a)},i(l){t||(h(e.$$.fragment,l),t=!0)},o(l){g(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function ce(s){let e,t;return e=new ne({props:{$$slots:{default:[re]},$$scope:{ctx:s}}}),{c(){B(e.$$.fragment)},m(l,n){C(e,l,n),t=!0},p(l,n){const a={};n&2048&&(a.$$scope={dirty:n,ctx:l}
1),e.$set(a)},i(l){t||(h(e.$$.fragment,l),t=!0)},o(l){g(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function fe(s){let e,t;return e=new oe({props:{selectable:s[8],value:s[3],show_label:s[7],color:s[2]}}),e.$on("select",s[9]),{c(){B(e.$$.fragment)},m(l,n){C(e,l,n),t=!0},p(l,n){const a={};n&256&&(a.selectable=l[8]),n&8&&(a.value=l[3]),n&128&&(a.show_label=l[7]),n&4&&(a.color=l[2]),e.$set(a)},i(l){t||(h(e.$$.fragment,l),t=!0)},o(l){g(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function re(s){let e,t;return e=new P({}),{c(){B(e.$$.fragment)},m(l,n){C(e,l,n),t=!0},i(l){t||(h(e.$$.fragment,l),t=!0)},o(l){g(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function ue(s){let e,t,l,n,a,o,c;const f=[s[6]];let u={};for(let i=0;i<f.length;i+=1)u=W(u,f[i]);e=new X({props:u});let r=s[7]&&Y(s);const p=[fe,ce],v=[];function _(i,b){return typeof i[3]=="object"&&i[3]!==void 0&&i[3]!==null?0:1}return n=_(s),a=v[n]=p[n](s),{c(){B(e.$$.fragment),t=L(),r&&r.c(),l=L(),a.c(),o=z()},m(i,b){C(e,i,b),k(i,t,b),r&&r.m(i,b),k(i,l,b),v[n].m(i,b),k(i,o,b),c=!0},p(i,b){const H=b&64?$(f,[x(i[6])]):{};e.$set(H),i[7]?r?(r.p(i,b),b&128&&h(r,1)):(r=Y(i),r.c(),h(r,1),r.m(l.parentNode,l)):r&&(F(),g(r,1,1,()=>{r=null}),G());let S=n;n=_(i),n===S?v[n].p(i,b):(F(),g(v[S],1,1,()=>{v[S]=null}),G(),a=v[n],a?a.p(i,b):(a=v[n]=p[n](i),a.c()),h(a,1),a.m(o.parentNode,o))},i(i){c||(h(e.$$.fragment,i),h(r),h(a),c=!0)},o(i){g(e.$$.fragment,i),g(r),g(a),c=!1},d(i){j(e,i),i&&w(t),r&&r.d(i),i&&w(l),v[n].d(i),i&&w(o)}}}function _e(s){let e,t;return e=new le({props:{test_id:"label",visible:s[1],elem_id:s[0],disable:typeof s[5].container=="boolean"&&!s[5].container,$$slots:{default:[ue]},$$scope:{ctx:s}}}),{c(){B(e.$$.fragment)},m(l,n){C(e,l,n),t=!0},p(l,[n]){const a={};n&2&&(a.visible=l[1]),n&1&&(a.elem_id=l[0]),n&32&&(a.disable=typeof l[5].container=="boolean"&&!l[5].container),n&2556&&(a.$$scope={dirty:n,ctx:l}
1),e.$set(a)},i(l){t||(h(e.$$.fragment,l),t=!0)},o(l){g(e.$$.fragment,l),t=!1},d(l){j(e,l)}}}function be(s,e,t){let{elem_id:l=""}=e,{visible:n=!0}=e,{color:a=void 0}=e,{value:o}=e,{label:c="Label"}=e,{style:f={}}=e,{loading_status:u}=e,{show_label:r}=e,{selectable:p=!1}=e;const v=K();function _(i){ee.call(this,s,i)}return s.$$set=i=>{"elem_id"in i&&t(0,l=i.elem_id),"visible"in i&&t(1,n=i.visible),"color"in i&&t(2,a=i.color),"value"in i&&t(3,o=i.value),"label"in i&&t(4,c=i.label),"style"in i&&t(5,f=i.style),"loading_status"in i&&t(6,u=i.loading_status),"show_label"in i&&t(7,r=i.show_label),"selectable"in i&&t(8,p=i.selectable)},s.$$.update=()=>{s.$$.dirty&8&&v("change")},[l,n,a,o,c,f,u,r,p,_]}class de extends Z{constructor(e){super(),q(this,e,be,_e,D,{elem_id:0,visible:1,color:2,value:3,label:4,style:5,loading_status:6,show_label:7,selectable:8})}}var we=de;const pe=["static"],ye=s=>({type:{payload:"{ label: string; confidences?: Array<{ label: string; confidence: number }>"},description:{payload:"output label and optional set of confidences per label"}});export{we as Component,ye as document,pe as modes}; 2//# sourceMappingURL=index.de8b8b83.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.