PageSourceSearch

https://tencent-hunyuan3d-2-1.hf.space/assets/ImagePreview-CieM3r9y.js

js tencent-hunyuan3d-2-1.hf.space collected 2026-10-03 10:23:49 UTC 7,271 bytes, 2 lines download raw bytes

1import{I as P}from"./Index-D21IHG0c.js";import{u as Q}from"./Blocks-Dw_9NR1K.js";import{B as R}from"./BlockLabel-BXXlQleC.js";import{E as U}from"./Empty-CLiqUlWX.js";import{S as W}from"./ShareButton-OlciWAJu.js";import{D as X}from"./Download-DVtk-Jv3.js";import{M as Y,a as Z}from"./Minimize-X5PPawdt.js";import{I as K}from"./Image-Bsh8Umrh.js";import{g as y}from"./utils-Gtzs_Zla.js";import{I as x}from"./Image-DG8jX6JY.js";import{D as ee}from"./DownloadLink-BgAM71ly.js";import"./index-D5ROCp7B.js";/* empty css                                                   */import"./Button-uOcat6Z0.js";import"./file-url-BIHPd7vS.js";import"./svelte/svelte.js";const{SvelteComponent:te,append:z,attr:L,binding_callbacks:ne,bubble:C,check_outros:B,create_component:k,destroy_component:v,detach:H,element:S,empty:le,flush:D,group_outros:M,init:oe,insert:N,listen:re,mount_component:I,safe_not_equal:se,space:V,toggle_class:T,transition_in:c,transition_out:b}=window.__gradio__svelte__internal,{createEventDispatcher:ie,onMount:ae}=window.__gradio__svelte__internal;function ue(l){let e,n,t,o,r,p,$,g,d,s,h,E,a=!l[8]&&l[7]&&j(l),f=l[8]&&l[7]&&A(l),_=l[3]&&G(l),m=l[5]&&J(l);return d=new x({props:{src:l[0].url,alt:"",loading:"lazy"}}),d.$on("load",l[15]),{c(){e=S("div"),n=S("div"),a&&a.c(),t=V(),f&&f.c(),o=V(),_&&_.c(),r=V(),m&&m.c(),p=V(),$=S("button"),g=S("div"),k(d.$$.fragment),L(n,"class","icon-buttons svelte-1p15vfy"),L(g,"class","image-frame svelte-1p15vfy"),T(g,"selectable",l[4]),L($,"class","svelte-1p15vfy"),L(e,"class","image-container svelte-1p15vfy")},m(u,w){N(u,e,w),z(e,n),a&&a.m(n,null),z(n,t),f&&f.m(n,null),z(n,o),_&&_.m(n,null),z(n,r),m&&m.m(n,null),z(e,p),z(e,$),z($,g),I(d,g,null),l[16](e),s=!0,h||(E=re($,"click",l[10]),h=!0)},p(u,w){!u[8]&&u[7]?a?(a.p(u,w),w&384&&c(a,1)):(a=j(u),a.c(),c(a,1),a.m(n,t)):a&&(M(),b(a,1,1,()=>{a=null}),B()),u[8]&&u[7]?f?(f.p(u,w),w&384&&c(f,1)):(f=A(u),f.c(),c(f,1),f.m(n,o)):f&&(M(),b(f,1,1,()=>{f=null}),B()),u[3]?_?(_.p(u,w),w&8&&c(_,1)):(_=G(u),_.c(),c(_,1),_.m(n,r)):_&&(M(),b(_,1,1,()=>{_=null}),B()),u[5]?m?(m.p(u,w),w&32&&c(m,1)):(m=J(u),m.c(),c(m,1),m.m(n,null)):m&&(M(),b(m,1,1,()=>{m=null}),B());const F={};w&1&&(F.src=u[0].url),d.$set(F),(!s||w&16)&&T(g,"selectable",u[4])},i(u){s||(c(a),c(f),c(_),c(m),c(d.$$.fragment,u),s=!0)},o(u){b(a),b(f),b(_),b(m),b(d.$$.fragment,u),s=!1},d(u){u&&H(e),a&&a.d(),f&&f.d(),_&&_.d(),m&&m.d(),v(d),l[16](null),h=!1,E()}}}function fe(l){let e,n;return e=new U({props:{unpadded_box:!0,size:"large",$$slots:{default:[_e]},$$scope:{ctx:l}}}),{c(){k(e.$$.fragment)},m(t,o){I(e,t,o),n=!0},p(t,o){const r={};o&262144&&(r.$$scope={dirty:o,ctx:t}),e.$set(r)},i(t){n||(c(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){v(e,t)}}}function j(l){let e,n;return e=new P({props:{Icon:Y,label:l[8]?"Exit full screen":"View in full screen"}}),e.$on("click",l[11]),{c(){k(e.$$.fragment)},m(t,o){I(e,t,o),n=!0},p(t,o){const r={};o&256&&(r.label=t[8]?"Exit full screen":"View in full screen"),e.$set(r)},i(t){n||(c(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){v(e,t)}}}function A(l){let e,n;return e=new P({props:{Icon:Z,label:l[8]?"Exit full screen":"View in full screen"}}),e.$on("click",l[11]),{c(){k(e.$$.fragment)},m(t,o){I(e,t,o),n=!0},p(t,o){const r={};o&256&&(r.label=t[8]?"Exit full screen":"View in full screen"),e.$set(r)},i(t){n||(c(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){v(e,t)}}}function G(l){let e,n;return e=new ee({props:{href:l[0].url,download:l[0].orig_name||"image",$$slots:{default:[ce]},$$scope:{ctx:l}}}),{c(){k(e.$$.fragment)},m(t,o){I(e,t,o),n=!0},p(t,o){const r={};o&1&&(r.href=t[0].url),o&1&&(r.download=t[0].orig_name||"image"),o&262208&&(r.$$scope={dirty:o,ctx:t}),e.$set(r)},i(t){n||(c(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){v(e,t)}}}function ce(l){let e,n;return e=new P({props:{Icon:X,label:l[6]("common.download")}}),{c(){k(e.$$.fragment)},m(t,o){I(e,t,o),n=!0},p(t,o){const r={};o&64&&(r.label=t[6]("common.download")),e.$set(r)},i(t){n||(c(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){v(e,t)}}}function J(l){let e,n;return e=new W({props:{i18n:l[6],formatter:l[12],value:l[0]}}),e.$on("share",l[13]),e.$on("error",l[14]),{c(){k(e.$$.fragment)},m(t,o){I(e,t,o),n=!0},p(t,o){const r={};o&64&&(r.i18n=t[6]),o&1&&(r.value=t[0]),e.$set(r)},i(t){n||(c(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){v(e,t)}}}function _e(l){let e,n;return e=new K({}),{c(){k(e.$$.fragment)},m(t,o){I(e,t,o),n=!0},i(t){n||(c(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){v(e,t)}}}function me(l){let e,n,t,o,r,p;
1e=new R({props:{show_label:l[2],Icon:K,label:l[2]?l[1]||l[6]("image.image"):""}});const $=[fe,ue],g=[];function d(s,h){return s[0]===null||!s[0].url?0:1}return t=d(l),o=g[t]=$[t](l),{c(){k(e.$$.fragment),n=V(),o.c(),r=le()},m(s,h){I(e,s,h),N(s,n,h),g[t].m(s,h),N(s,r,h),p=!0},p(s,[h]){const E={};h&4&&(E.show_label=s[2]),h&70&&(E.label=s[2]?s[1]||s[6]("image.image"):""),e.$set(E);let a=t;t=d(s),t===a?g[t].p(s,h):(M(),b(g[a],1,1,()=>{g[a]=null}),B(),o=g[t],o?o.p(s,h):(o=g[t]=$[t](s),o.c()),c(o,1),o.m(r.parentNode,r))},i(s){p||(c(e.$$.fragment,s),c(o),p=!0)},o(s){b(e.$$.fragment,s),b(o),p=!1},d(s){s&&(H(n),H(r)),v(e,s),g[t].d(s)}}}function be(l,e,n){let{value:t}=e,{label:o=void 0}=e,{show_label:r}=e,{show_download_button:p=!0}=e,{selectable:$=!1}=e,{show_share_button:g=!1}=e,{i18n:d}=e,{show_fullscreen_button:s=!0}=e;const h=ie(),E=i=>{let q=y(i);q&&h("select",{index:q,value:null})};let a=!1,f;ae(()=>{document.addEventListener("fullscreenchange",()=>{n(8,a=!!document.fullscreenElement)})});const _=async()=>{a?(await document.exitFullscreen(),n(8,a=!a)):await f.requestFullscreen()},m=async i=>i?`<img src="${await Q(i)}" />`:"";function u(i){C.call(this,l,i)}function w(i){C.call(this,l,i)}function F(i){C.call(this,l,i)}function O(i){ne[i?"unshift":"push"](()=>{f=i,n(9,f)})}return l.$$set=i=>{"value"in i&&n(0,t=i.value),"label"in i&&n(1,o=i.label),"show_label"in i&&n(2,r=i.show_label),"show_download_button"in i&&n(3,p=i.show_download_button),"selectable"in i&&n(4,$=i.selectable),"show_share_button"in i&&n(5,g=i.show_share_button),"i18n"in i&&n(6,d=i.i18n),"show_fullscreen_button"in i&&n(7,s=i.show_fullscreen_button)},[t,o,r,p,$,g,d,s,a,f,E,_,m,u,w,F,O]}class Le extends te{constructor(e){super(),oe(this,e,be,me,se,{value:0,label:1,show_label:2,show_download_button:3,selectable:4,show_share_button:5,i18n:6,show_fullscreen_button:7})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),D()}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),D()}get show_label(){return this.$$.ctx[2]}set show_label(e){this.$$set({show_label:e}),D()}get show_download_button(){return this.$$.ctx[3]}set show_download_button(e){this.$$set({show_download_button:e}),D()}get selectable(){return this.$$.ctx[4]}set selectable(e){this.$$set({selectable:e}),D()}get show_share_button(){return this.$$.ctx[5]}set show_share_button(e){this.$$set({show_share_button:e}),D()}get i18n(){return this.$$.ctx[6]}set i18n(e){this.$$set({i18n:e}),D()}get show_fullscreen_button(){return this.$$.ctx[7]}set show_fullscreen_button(e){this.$$set({show_fullscreen_button:e}),D()}}export{Le as default};
2//# sourceMappingURL=ImagePreview-CieM3r9y.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.