PageSourceSearch

https://www.ajd.co.kr/_nuxt/DxaVSaKK.js

js ajd.co.kr collected 2026-09-24 11:16:09 UTC 4,804 bytes, 2 lines download raw bytes

1import{Ei as e,Fn as t,Kn as n,Lr as r,Un as i,Vr as a,Vt as o,Wn as s,Yr as c,Zn as l,_r as u,br as d,di as f,ir as p,jn as m,pr as h,qn as g,qt as _,ri as v,wi as y,wr as b,yr as x}from"./CAPNT5Lx.js";import{R as S}from"./DR0bK-zK.js";a(),p(),f(),m();var C=[`id`],w=32,T=S({__name:`CommonAjTouchSwiper`,props:{id:{type:String,required:!0},aliveTarget:{type:String},activeClass:{type:String},noSwiper:{type:Boolean,default:!1},propClass:{type:[String,Object],default:``},useArrow:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},centerActive:{type:Boolean,default:!1},indicator:{type:Boolean,default:!1},indicatorBottom:{type:Number,default:null}},setup(a){let f=a,p=c(0),m=c(0),S=c(null),T=c(0),E=c(0),D=c(0),O=c(0),k=c([]),A=e=>e.touches??!1?e.touches[0].clientX:e.clientX,j=e=>e.touches??!1?e.touches[0].clientY:e.clientY,M=c(0),N=c(null),P=e=>{e===`prev`?m.value=0:m.value=E.value*-1,S.value.children[0].style.transform=`translateX(${m.value}px)`,T.value=Math.abs(m.value),H()},F=e=>{if(!N.value){let t=Math.abs(A(e)-p.value),n=Math.abs(j(e)-M.value);(t>5||n>5)&&(N.value=t>=n?`horizontal`:`vertical`)}if(N.value!==`horizontal`)return;e.cancelable&&e.preventDefault(),L.value=!0,R.value=!0;let t=A(e)-p.value,n=m.value+t;n=n<0?Math.max(-E.value,n):Math.min(0,n),D.value>=O.value&&(n=0),S.value&&(T.value=Math.abs(n),S.value.children[0].style.transform=`translateX(${n}px)`)},I=()=>{if(S.value){var e,t,n;D.value=(e=S.value.parentElement)==null||(e=e.getBoundingClientRect())==null?void 0:e.width,O.value=(t=S.value.children[0])==null||(t=t.getBoundingClientRect())==null?void 0:t.width,E.value=O.value-((n=S.value)==null||(n=n.getBoundingClientRect())==null?void 0:n.width)}},L=c(!1),R=c(!1),z=c(-1),B=e=>{I(),!(!S.value||D.value>=O.value&&m.value===0)&&(p.value=A(e),M.value=j(e),N.value=null,window.addEventListener(`mousemove`,F),window.addEventListener(`touchmove`,F,{passive:!1}))},V=e=>{S.value&&(L.value=!1,m.value=Number(`${S.value.children[0].style.transform}`.replace(/[^.\-0-9]/gi,``)),window.removeEventListener(`mousemove`,F),window.removeEventListener(`touchmove`,F))},H=()=>{if(D.value<O.value){let e=[];Array.from(S.value.children[0].children).forEach(t=>{e.push(t.offsetLeft)}),k.value=e}},U=i(()=>D.value<O.value),W=i(()=>{if(!U.value||E.value<=0)return{width:`0px`};let e=Math.min(1,D.value/O.value),t=Math.max(6,w*e),n=Math.min(1,Math.max(0,T.value/E.value)),r=(w-t)*n;return{width:`${t}px`,transform:`translateX(${r}px)`}}),G=i(()=>f.useArrow&&T.value>20),K=i(()=>{let e=Math.abs(Math.abs(E.value)-T.value);return f.useArrow&&e>20});u(()=>{!f.noSwiper&&S.value&&(q(),S.value.addEventListener(`mousedown`,B),S.value.addEventListener(`touchstart`,B,{passive:!0}),window.addEventListener(`mouseup`,V),window.addEventListener(`touchend`,V),window.addEventListener(`resize`,I),f.useArrow&&(I(),H(),window.addEventListener(`resize`,H)))});let q=()=>{if(!f.noSwiper&&S.value){if(I(),f.aliveTarget&&f.activeClass){let e=document.getElementsByClassName(f.aliveTarget);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n.classList.contains(f.activeClass)){let e=z.value===t;if(!f.centerActive&&e||f.centerActive&&e&&R.value)break;if(z.value=t,e||(R.value=!1),f.centerActive){let e=S.value.getBoundingClientRect().width;m.value=e/2-n.offsetLeft-n.offsetWidth/2}else m.value=-n.offsetLeft+n.offsetWidth/2;m.value=Math.max(-E.value,m.value),m.value>0&&(m.value=0),S.value.children[0].style.transform=`translateX(${m.value}px)`;break}}return}(E.value<0||+m.value>E.value)&&(S.value.children[0].style.transform=`translateX(0px)`)}};return x(()=>{q()}),h(()=>{!f.noSwiper&&S.value&&(S.value.removeEventListener(`mousedown`,B),S.value.removeEventListener(`touchstart`,B),window.removeEventListener(`mouseup`,V),window.removeEventListener(`touchend`,V),window.removeEventListener(`resize`,I),f.useArrow&&window.removeEventListener(`resize`,H))}),(i,c)=>(d(),g(`div`,{id:a.id,class:y([`aj-touch-swiper`,{smooth:a.aliveTarget!==void 0,"full-width-mobile":a.fullWidth,"is-scrollable":v(U)}]),ref_key:`el`,ref:S},[s(`ul`,{class:y([`no-select`,[a.propClass,{"is-dragging":v(L)}]])},[b(i.$slots,`default`,{},void 0,!0)],2),r(s(`div`,{class:`prev-area`,onClick:c[0]||(c[0]=e=>P(`prev`))},[l(v(o),{icon:v(_).ArrowLeft,"icon-size":18},null,8,[`icon`])],512),[[t,v(G)&&v(D)<v(O)]]),r(s(`div`,{class:`next-area`,onClick:c[1]||(c[1]=e=>P(`next`))},[l(v(o),{icon:v(_).ArrowRight,"icon-size":18},null,8,[`icon`])],512),[[t,v(K)&&v(D)<v(O)]]),b(i.$slots,`last`,{},void 0,!0),a.indicator&&v(U)?(d(),g(`div`,{key:0,class:`aj-touch-swiper-indicator`,style:e(a.indicatorBottom===null?{}:{bottom:`${a.indicatorBottom}px`})},[s(`div`,{class:`aj-touch-swiper-indicator-fill`,style:e(v(W))},null,4)],4)):n(``,!0)],10,C))}},[[`__scopeId`,`data-v-fa0f1902`]]);export{T as t};
2//# sourceMappingURL=DxaVSaKK.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.