File size: 2,393 Bytes
1850b9b
1
2
import{S as V,i as j,s as G,k as m,q as $,a as k,l as p,m as g,r as q,h,c as x,n as u,b as v,G as _,B as w,I as H,o as M,e as I,J as y,u as z}from"../../chunks/index-b346583a.js";function E(f,a,e){const s=f.slice();return s[2]=a[e],s}function D(f){let a,e,s=f[2].data.prompt+"",c,n,o,i,l;return{c(){a=m("div"),e=m("h1"),c=$(s),n=k(),o=m("img"),l=k(),this.h()},l(r){a=p(r,"DIV",{});var t=g(a);e=p(t,"H1",{class:!0});var d=g(e);c=q(d,s),d.forEach(h),n=x(t),o=p(t,"IMG",{loading:!0,src:!0,class:!0}),l=x(t),t.forEach(h),this.h()},h(){u(e,"class","text-black dark:text-white font-semibold p-2 min-h-[8ch] text-center"),u(o,"loading","lazy"),y(o.src,i=f[2].data.images[0])||u(o,"src",i),u(o,"class","rounded-3xl")},m(r,t){v(r,a,t),_(a,e),_(e,c),_(a,n),_(a,o),_(a,l)},p(r,t){t&1&&s!==(s=r[2].data.prompt+"")&&z(c,s),t&1&&!y(o.src,i=r[2].data.images[0])&&u(o,"src",i)},d(r){r&&h(a)}}}function S(f){let a,e=f[2].data.images.length>0&&D(f);return{c(){e&&e.c(),a=I()},l(s){e&&e.l(s),a=I()},m(s,c){e&&e.m(s,c),v(s,a,c)},p(s,c){s[2].data.images.length>0?e?e.p(s,c):(e=D(s),e.c(),e.m(a.parentNode,a)):e&&(e.d(1),e=null)},d(s){e&&e.d(s),s&&h(a)}}}function B(f){let a,e,s,c,n,o=f[0],i=[];for(let l=0;l<o.length;l+=1)i[l]=S(E(f,o,l));return{c(){a=m("div"),e=m("h1"),s=$("Show off"),c=k(),n=m("div");for(let l=0;l<i.length;l+=1)i[l].c();this.h()},l(l){a=p(l,"DIV",{class:!0});var r=g(a);e=p(r,"H1",{class:!0});var t=g(e);s=q(t,"Show off"),t.forEach(h),r.forEach(h),c=x(l),n=p(l,"DIV",{class:!0});var d=g(n);for(let b=0;b<i.length;b+=1)i[b].l(d);d.forEach(h),this.h()},h(){u(e,"class","text-3xl text-black dark:text-white font-semibold p-2 text-center"),u(a,"class","grid grid-cols-1 gap-4 p-3 "),u(n,"class","grid grid-cols-4 gap-4 p-3")},m(l,r){v(l,a,r),_(a,e),_(e,s),v(l,c,r),v(l,n,r);for(let t=0;t<i.length;t+=1)i[t].m(n,null)},p(l,[r]){if(r&1){o=l[0];let t;for(t=0;t<o.length;t+=1){const d=E(l,o,t);i[t]?i[t].p(d,r):(i[t]=S(d),i[t].c(),i[t].m(n,null))}for(;t<i.length;t+=1)i[t].d(1);i.length=o.length}},i:w,o:w,d(l){l&&h(a),l&&h(c),l&&h(n),H(i,l)}}}const C="https://huggingface.co/datasets/triple-t/dummy/raw/main/stabilityai_stable-diffusion.json";function J(f,a,e){let s=[];function c(){fetch(C).then(n=>n.json()).then(n=>{e(0,s=n)})}return M(()=>{c();const n=window.setInterval(c,2e3);return()=>{clearInterval(n)}}),[s]}class P extends V{constructor(a){super(),j(this,a,J,B,G,{})}}export{P as default};