PageSourceSearch

https://timm-timmattentionviz.hf.space/assets/Index-BRFk139t.js

js timm-timmattentionviz.hf.space collected 2026-10-03 10:24:44 UTC 12,828 bytes, 2 lines download raw bytes

1import{B as Oe}from"./Button-CBm22jT_.js";import{B as Ae}from"./BlockTitle-KyJOmiwq.js";import{S as Le}from"./Index-DZ8pD6u3.js";import{E as Ve}from"./Empty-DCv_MjjF.js";import{L as Ee}from"./LineChart-CKh1Fdep.js";import{e as Te}from"./vega-embed.module-D_MfdHZ2.js";import"./index-C_QmXOlO.js";import"./svelte/svelte.js";import"./Info-Bg0ixuF0.js";import"./dsv-DB8NKgIY.js";const{SvelteComponent:je,append:Be,assign:Ie,attr:ye,binding_callbacks:Ne,check_outros:de,create_component:D,destroy_component:q,detach:W,element:xe,empty:ke,flush:c,get_spread_object:De,get_spread_update:qe,group_outros:me,init:Me,insert:O,mount_component:M,noop:ge,safe_not_equal:Re,set_data:we,space:te,text:ve,transition_in:y,transition_out:S}=window.__gradio__svelte__internal,{onMount:Ue}=window.__gradio__svelte__internal;function he(n){let e,t;const i=[{autoscroll:n[2].autoscroll},{i18n:n[2].i18n},n[10]];let a={};for(let r=0;r<i.length;r+=1)a=Ie(a,i[r]);return e=new Le({props:a}),e.$on("clear_status",n[36]),{c(){D(e.$$.fragment)},m(r,f){M(e,r,f),t=!0},p(r,f){const s=f[0]&1028?qe(i,[f[0]&4&&{autoscroll:r[2].autoscroll},f[0]&4&&{i18n:r[2].i18n},f[0]&1024&&De(r[10])]):{};e.$set(s)},i(r){t||(y(e.$$.fragment,r),t=!0)},o(r){S(e.$$.fragment,r),t=!1},d(r){q(e,r)}}}function He(n){let e;return{c(){e=ve(n[3])},m(t,i){O(t,e,i)},p(t,i){i[0]&8&&we(e,t[3])},d(t){t&&W(e)}}}function Xe(n){let e,t;return e=new Ve({props:{unpadded_box:!0,$$slots:{default:[Ge]},$$scope:{ctx:n}}}),{c(){D(e.$$.fragment)},m(i,a){M(e,i,a),t=!0},p(i,a){const r={};a[1]&1048576&&(r.$$scope={dirty:a,ctx:i}),e.$set(r)},i(i){t||(y(e.$$.fragment,i),t=!0)},o(i){S(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Ye(n){let e,t=n[1]&&be(n);return{c(){t&&t.c(),e=ke()},m(i,a){t&&t.m(i,a),O(i,e,a)},p(i,a){i[1]?t?t.p(i,a):(t=be(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:ge,o:ge,d(i){i&&W(e),t&&t.d(i)}}}function Ge(n){let e,t;return e=new Ee({}),{c(){D(e.$$.fragment)},m(i,a){M(e,i,a),t=!0},i(i){t||(y(e.$$.fragment,i),t=!0)},o(i){S(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function be(n){let e,t;return{c(){e=xe("p"),t=ve(n[1]),ye(e,"class","caption svelte-10k9m4v")},m(i,a){O(i,e,a),Be(e,t)},p(i,a){a[0]&2&&we(t,i[1])},d(i){i&&W(e)}}}function Je(n){let e,t,i,a,r,f,s,d,m,o=n[10]&&he(n);t=new Ae({props:{show_label:n[7],info:void 0,$$slots:{default:[He]},$$scope:{ctx:n}}});const E=[Ye,Xe],g=[];function A(u,_){return u[0]?0:1}return f=A(n),s=g[f]=E[f](n),{c(){o&&o.c(),e=te(),D(t.$$.fragment),i=te(),a=xe("div"),r=te(),s.c(),d=ke(),ye(a,"class","svelte-10k9m4v")},m(u,_){o&&o.m(u,_),O(u,e,_),M(t,u,_),O(u,i,_),O(u,a,_),n[37](a),O(u,r,_),g[f].m(u,_),O(u,d,_),m=!0},p(u,_){u[10]?o?(o.p(u,_),_[0]&1024&&y(o,1)):(o=he(u),o.c(),y(o,1),o.m(e.parentNode,e)):o&&(me(),S(o,1,1,()=>{o=null}),de());const x={};_[0]&128&&(x.show_label=u[7]),_[0]&8|_[1]&1048576&&(x.$$scope={dirty:_,ctx:u}),t.$set(x);let z=f;f=A(u),f===z?g[f].p(u,_):(me(),S(g[z],1,1,()=>{g[z]=null}),de(),s=g[f],s?s.p(u,_):(s=g[f]=E[f](u),s.c()),y(s,1),s.m(d.parentNode,d))},i(u){m||(y(o),y(t.$$.fragment,u),y(s),m=!0)},o(u){S(o),S(t.$$.fragment,u),S(s),m=!1},d(u){u&&(W(e),W(i),W(a),W(r),W(d)),o&&o.d(u),q(t,u),n[37](null),g[f].d(u)}}}function Ke(n){let e,t;return e=new Oe({props:{visible:n[6],elem_id:n[4],elem_classes:n[5],scale:n[8],min_width:n[9],allow_overflow:!1,padding:!0,height:n[11],$$slots:{default:[Je]},$$scope:{ctx:n}}}),{c(){D(e.$$.fragment)},m(i,a){M(e,i,a),t=!0},p(i,a){const r={};a[0]&64&&(r.visible=i[6]),a[0]&16&&(r.elem_id=i[4]),a[0]&32&&(r.elem_classes=i[5]),a[0]&256&&(r.scale=i[8]),a[0]&512&&(r.min_width=i[9]),a[0]&2048&&(r.height=i[11]),a[0]&5263|a[1]&1048576&&(r.$$scope={dirty:a,ctx:i}),e.$set(r)},i(i){t||(y(e.$$.fragment,i),t=!0)},o(i){S(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Qe(n,e,t){let i,a,r,f,{value:s}=e,{x:d}=e,{y:m}=e,{color:o=null}=e,{title:E=null}=e,{x_title:g=null}=e,{y_title:A=null}=e,{color_title:u=null}=e,{x_bin:_=null}=e,{y_aggregate:x=void 0}=e,{color_map:z=null}=e,{x_lim:T=null}=e,{y_lim:R=null}=e,{x_label_angle:U=null}=e,{y_label_angle:H=null}=e,{caption:le=null}=e,{sort:K=null}=e;function Fe(l){if(l==="x")return"ascending";if(l==="-x")return"descending";if(l==="y")return{field:m,order:"ascending"};if(l==="-y")return{field:m,order:"descending"};if(l===null)return;if(Array.isArray(l))return l}let{_selectable:X=!1}=e,{target:Q}=e,Y,{gradio:j}=e,P,Z=!1;const Se={s:1,m:60,h:60*60,d:24*60*60};let N,B;function ze(l){let k=l.columns.indexOf(d),L=l.columns.indexOf(m),b=o?l.columns.indexOf(o):null;return l.data.map(w=>{const v={[d]:w[k],[m]:w[L]};return o&&b!==null&&(v[o]=w[b]),v})}let h,C=window.getComputedStyle(Q),I,p=!1,ie;function ne(){if(I&&I.finalize(),!s)return;ie=h.offsetWidth;const l=Pe();if(!l)return;let k=new ResizeObserver(()=>{ie===0&&h.offsetWidth!==0&&s.datatypes[d]==="nominal"?ne():I.signal("width",h.offsetWidth).run()});Te(h,l,{actions:!1}).then(function(L){I=L.view,k.observe(h);var b;I.addEventListener("dblclick",()=>{j.dispatch("double_click")}
1),h.addEventListener("mousedown",function(w){w.detail>1&&w.preventDefault()},!1),X&&I.addSignalListener("brush",function(w,v){if(Object.keys(v).length===0)return;clearTimeout(b);let F=v[Object.keys(v)[0]];r&&(F=[F[0]/1e3,F[1]/1e3]),Z?G=()=>{j.dispatch("select",{value:F,index:F,selected:!0})}:b=setTimeout(function(){j.dispatch("select",{value:F,index:F,selected:!0})},250)})})}let G=null;Ue(()=>{t(34,p=!0),h.addEventListener("mousedown",()=>{Z=!0}),h.addEventListener("mouseup",()=>{Z=!1,G&&(G(),G=null)})});function Pe(){if(!s)return null;let l=C.getPropertyValue("--color-accent"),k=C.getPropertyValue("--body-text-color"),L=C.getPropertyValue("--border-color-primary"),b=C.fontFamily,w=C.getPropertyValue("--block-title-text-weight");const v=V=>V.endsWith("px")?parseFloat(V.slice(0,-2)):12;let F=v(C.getPropertyValue("--text-md")),J=v(C.getPropertyValue("--text-sm"));return{$schema:"https://vega.github.io/schema/vega-lite/v5.17.0.json",background:"transparent",config:{autosize:{type:"fit",contains:"padding"},axis:{labelFont:b,labelColor:k,titleFont:b,titleColor:k,titlePadding:8,tickColor:L,labelFontSize:J,gridColor:L,titleFontWeight:"normal",titleFontSize:J,labelFontWeight:"normal",domain:!1,labelAngle:0},legend:{labelColor:k,labelFont:b,titleColor:k,titleFont:b,titleFontWeight:"normal",titleFontSize:J,labelFontWeight:"normal",offset:2},title:{color:k,font:b,fontSize:F,fontWeight:w,anchor:"middle"},view:{stroke:L},mark:{stroke:s.mark!=="bar"?l:void 0,fill:s.mark==="bar"?l:void 0,cursor:"crosshair"}},data:{name:"data"},datasets:{data:Y},layer:["plot",...s.mark==="line"?["hover"]:[]].map(V=>({encoding:{size:s.mark==="line"?V=="plot"?{condition:{empty:!1,param:"hoverPlot",value:3},value:2}:{condition:{empty:!1,param:"hover",value:100},value:0}:void 0,opacity:V==="plot"?void 0:{condition:{empty:!1,param:"hover",value:1},value:0},x:{axis:U?{labelAngle:U}:{},field:d,title:g||d,type:s.datatypes[d],scale:f?{domain:f}:void 0,bin:P?{step:P}:void 0,sort:a},y:{axis:H?{labelAngle:H}:{},field:m,title:A||m,type:s.datatypes[m],scale:R?{domain:R}:void 0,aggregate:B?N:void 0},color:o?{field:o,legend:{orient:"bottom",title:u},scale:s.datatypes[o]==="nominal"?{domain:i,range:z?i.map(ee=>z[ee]):void 0}:{range:[100,200,300,400,500,600,700,800,900].map(ee=>C.getPropertyValue("--primary-"+ee)),interpolate:"hsl"},type:s.datatypes[o]}:void 0,tooltip:[{field:m,type:s.datatypes[m],aggregate:B?N:void 0,title:A||m},{field:d,type:s.datatypes[d],title:g||d,format:r?"%Y-%m-%d %H:%M:%S":void 0,bin:P?{step:P}:void 0},...o?[{field:o,type:s.datatypes[o]}]:[]]},strokeDash:{},mark:{clip:!0,type:V==="hover"?"point":s.mark},name:V})),params:[...s.mark==="line"?[{name:"hoverPlot",select:{clear:"mouseout",fields:o?[o]:[],nearest:!0,on:"mouseover",type:"point"},views:["hover"]},{name:"hover",select:{clear:"mouseout",nearest:!0,on:"mouseover",type:"point"},views:["hover"]}]:[],...X?[{name:"brush",select:{encodings:["x"],mark:{fill:"gray",fillOpacity:.3,stroke:"none"},type:"interval"},views:["plot"]}]:[]],width:h.offsetWidth,title:E||void 0}}let{label:se="Textbox"}=e,{elem_id:ae=""}=e,{elem_classes:re=[]}=e,{visible:oe=!0}=e,{show_label:ue}=e,{scale:ce=null}=e,{min_width:_e=void 0}=e,{loading_status:$=void 0}=e,{height:fe=void 0}=e;const Ce=()=>j.dispatch("clear_status",$);function We(l){Ne[l?"unshift":"push"](()=>{h=l,t(12,h)})}return n.$$set=l=>{"value"in l&&t(0,s=l.value),"x"in l&&t(13,d=l.x),"y"in l&&t(14,m=l.y),"color"in l&&t(15,o=l.color),"title"in l&&t(16,E=l.title),"x_title"in l&&t(17,g=l.x_title),"y_title"in l&&t(18,A=l.y_title),"color_title"in l&&t(19,u=l.color_title),"x_bin"in l&&t(20,_=l.x_bin),"y_aggregate"in l&&t(21,x=l.y_aggregate),"color_map"in l&&t(22,z=l.color_map),"x_lim"in l&&t(23,T=l.x_lim),"y_lim"in l&&t(24,R=l.y_lim),"x_label_angle"in l&&t(25,U=l.x_label_angle),"y_label_angle"in l&&t(26,H=l.y_label_angle),"caption"in l&&t(1,le=l.caption),"sort"in l&&t(27,K=l.sort),"_selectable"in l&&t(28,X=l._selectable),"target"in l&&t(29,Q=l.target),"gradio"in l&&t(2,j=l.gradio),"label"in l&&t(3,se=l.label),"elem_id"in l&&t(4,ae=l.elem_id),"elem_classes"in l&&t(5,re=l.elem_classes),"visible"in l&&t(6,oe=l.visible),"show_label"in l&&t(7,ue=l.show_label),"scale"in l&&t(8,ce=l.scale),"min_width"in l&&t(9,_e=l.min_width),"loading_status"in l&&t(10,$=l.loading_status),"height"in l&&t(11,fe=l.height)},n.$$.update=()=>{n.$$.dirty[0]&1&&t(30,Y=s?ze(s):[]),n.$$.dirty[0]&1073774593&&(i=o&&s&&s.datatypes[o]==="nominal"?Array.from(new Set(Y.map(l=>l[o]))):[]),n.$$.dirty[0]&134217728&&(a=Fe(K)),n.$$.dirty[0]&8193&&t(35,r=s&&s.datatypes[d]==="temporal"),n.$$.dirty[0]&8388608|n.$$.dirty[1]&16&&(f=T&&r?[T[0]*1e3,T[1]*1e3]:T),n.$$.dirty[0]&1048576&&t(31,P=_?typeof _=="string"?1e3*parseInt(_.substring(0,_.length-1))*Se[_[_.length-1]]:_:void 0),n.$$.dirty[0]&2105345|n.$$.dirty[1]&5&&s&&(s.mark==="point"?(t(33,B=P!==void 0),t(32,N=x||B?"sum":void 0)):(t(33,B=P!==void 0||s.datatypes[d]==="nominal"),t(32,N=x||"sum"))),n.$$.dirty[0]&165666819|n.$$.dirty[1]&10&&p&&ne()},[s,le,j,se,ae,re,oe,ue,ce,_e,$,fe,h,d,m,o,E,g,A,u,_,x,z,T,R,U,H,K,X,Q,Y,P,N,B,p,r,Ce,We]}class rt extends je{constructor(e){super(),Me(this,e,Qe,Ke,Re,{value:0,x:13,y:14,color:15,title:16,x_title:17,y_title:18,color_title:19,x_bin:20,y_aggregate:21,color_map:22,x_lim:23,y_lim:24,x_label_angle:25,y_label_angle:26,caption:1,sort:27,_selectable:28,target:29,gradio:2,label:3,elem_id:4,elem_classes:5,visible:6,show_label:7,scale:8,min_
1width:9,loading_status:10,height:11},null,[-1,-1])}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),c()}get x(){return this.$$.ctx[13]}set x(e){this.$$set({x:e}),c()}get y(){return this.$$.ctx[14]}set y(e){this.$$set({y:e}),c()}get color(){return this.$$.ctx[15]}set color(e){this.$$set({color:e}),c()}get title(){return this.$$.ctx[16]}set title(e){this.$$set({title:e}),c()}get x_title(){return this.$$.ctx[17]}set x_title(e){this.$$set({x_title:e}),c()}get y_title(){return this.$$.ctx[18]}set y_title(e){this.$$set({y_title:e}),c()}get color_title(){return this.$$.ctx[19]}set color_title(e){this.$$set({color_title:e}),c()}get x_bin(){return this.$$.ctx[20]}set x_bin(e){this.$$set({x_bin:e}),c()}get y_aggregate(){return this.$$.ctx[21]}set y_aggregate(e){this.$$set({y_aggregate:e}),c()}get color_map(){return this.$$.ctx[22]}set color_map(e){this.$$set({color_map:e}),c()}get x_lim(){return this.$$.ctx[23]}set x_lim(e){this.$$set({x_lim:e}),c()}get y_lim(){return this.$$.ctx[24]}set y_lim(e){this.$$set({y_lim:e}),c()}get x_label_angle(){return this.$$.ctx[25]}set x_label_angle(e){this.$$set({x_label_angle:e}),c()}get y_label_angle(){return this.$$.ctx[26]}set y_label_angle(e){this.$$set({y_label_angle:e}),c()}get caption(){return this.$$.ctx[1]}set caption(e){this.$$set({caption:e}),c()}get sort(){return this.$$.ctx[27]}set sort(e){this.$$set({sort:e}),c()}get _selectable(){return this.$$.ctx[28]}set _selectable(e){this.$$set({_selectable:e}),c()}get target(){return this.$$.ctx[29]}set target(e){this.$$set({target:e}),c()}get gradio(){return this.$$.ctx[2]}set gradio(e){this.$$set({gradio:e}),c()}get label(){return this.$$.ctx[3]}set label(e){this.$$set({label:e}),c()}get elem_id(){return this.$$.ctx[4]}set elem_id(e){this.$$set({elem_id:e}),c()}get elem_classes(){return this.$$.ctx[5]}set elem_classes(e){this.$$set({elem_classes:e}),c()}get visible(){return this.$$.ctx[6]}set visible(e){this.$$set({visible:e}),c()}get show_label(){return this.$$.ctx[7]}set show_label(e){this.$$set({show_label:e}),c()}get scale(){return this.$$.ctx[8]}set scale(e){this.$$set({scale:e}),c()}get min_width(){return this.$$.ctx[9]}set min_width(e){this.$$set({min_width:e}),c()}get loading_status(){return this.$$.ctx[10]}set loading_status(e){this.$$set({loading_status:e}),c()}get height(){return this.$$.ctx[11]}set height(e){this.$$set({height:e}),c()}}export{rt as default};
2//# sourceMappingURL=Index-BRFk139t.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.