PageSourceSearch

https://www.hylab.cn/_nuxt/B0dcYWpn.js

js hylab.cn collected 2026-10-06 17:46:12 UTC 2,684 bytes, 1 lines download raw bytes

1import{l as I,y as j,C as E,W as r,X as M,a3 as T,Y as V,u as n,A as c,a9 as h,ae as o,a4 as w,$ as d,a2 as y,T as q,_ as A,j as u}from"./Dqo3qaBd.js";const L=["src","alt"],N={key:2,class:"image-preview-counter"},P=I({__name:"ImagePreviewModal",setup(F,{expose:x}){const a=u(!1),t=u([]),m=u(""),s=u(0),l=u(!1);let g=0;async function _(i,e){const B=++g;m.value=i,s.value=0,l.value=!1;let v=[];try{v=await e()}catch{v=[]}B===g&&(t.value=v,v.length>0?(a.value=!0,document.body.style.overflow="hidden"):(a.value=!1,document.body.style.overflow=""))}function p(){g++,a.value=!1,l.value=!1,document.body.style.overflow=""}function C(){l.value=!l.value}function f(){s.value=(s.value-1+t.value.length)%t.value.length}function k(){s.value=(s.value+1)%t.value.length}function b(){l.value?l.value=!1:p()}return j(()=>{const i=e=>{a.value&&(e.key==="Escape"?p():e.key==="ArrowLeft"&&t.value.length>1?f():e.key==="ArrowRight"&&t.value.length>1&&k())};window.addEventListener("keydown",i),E(()=>{window.removeEventListener("keydown",i)})}),x({open:_}),(i,e)=>(r(),M(A,{to:"body"},[T(q,{name:"image-preview"},{default:V(()=>[n(a)?(r(),c("div",{key:0,class:h(["image-preview-overlay",{"is-fullscreen":n(l)}]),onClick:b},[o("button",{class:"image-preview-close","aria-label":"关闭预览",onClick:w(p,["stop"])},[...e[0]||(e[0]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])]),n(t).length>1?(r(),c("button",{key:0,class:"image-preview-nav image-preview-prev","aria-label":"上一张",onClick:w(f,["stop"])},[...e[1]||(e[1]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o("polyline",{points:"15 18 9 12 15 6"})],-1)])])):d("",!0),n(t).length>1?(r(),c("button",{key:1,class:"image-preview-nav image-preview-next","aria-label":"下一张",onClick:w(k,["stop"])},[...e[2]||(e[2]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o("polyline",{points:"9 18 15 12 9 6"})],-1)])])):d("",!0),o("img",{src:n(t)[n(s)],alt:n(m),class:h(["image-preview-img",{"is-fullscreen":n(l)}]),onClick:w(C,["stop"])},null,10,L),n(t).length>1?(r(),c("div",N,y(n(s)+1)+" / "+y(n(t).length),1)):d("",!0)],2)):d("",!0)]),_:1})]))}}),S=Object.assign(P,{__name:"ImagePreviewModal"});export{S as _};

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.