PageSourceSearch

https://jck.nl/_nuxt/C-Q6QmhC.js

js jck.nl collected 2026-09-24 09:24:26 UTC 8,524 bytes, 1 lines download raw bytes

1import{f as R,aD as j,a6 as q,o as u,c as h,z as g,a0 as x,aE as H,a as _,w as T,s as b,F as J,r as A,Z as k,d as O,aF as S,aG as G,ar as Z}from"./DSg5KMYM.js";const c={addEventListeners(s,e,r){for(let t=0,n=e.length;t<n;t++)s.addEventListener(e[t],r,{passive:!1})},removeEventListeners(s,e,r){for(let t=0,n=e.length;t<n;t++)s.removeEventListener(e[t],r,{passive:!1})},emitEvent:function(s,e,r){if(s.componentInstance)s.componentInstance.$emit(e,r);else{let t=new window.CustomEvent(e,{detail:r});s.el.dispatchEvent(t)}}},C=["mousedown","touchstart"],D=["mousemove","touchmove"],I=["mouseup","touchend"],V=function(s,e,r){let t=s,n=!0,i=window;typeof e.value=="boolean"?n=e.value:typeof e.value=="object"?(typeof e.value.target=="string"?(t=s.querySelector(e.value.target),t||console.error("There is no element with the current target value.")):typeof e.value.target<"u"&&console.error(`The parameter "target" should be either 'undefined' or 'string'.`),typeof e.value.container=="string"?(i=document.querySelector(e.value.container),i||console.error("There is no element with the current container value.")):typeof e.value.container<"u"&&console.error(`The parameter "container" should be be either 'undefined' or 'string'.`),typeof e.value.active=="boolean"?n=e.value.active:typeof e.value.active<"u"&&console.error(`The parameter "active" value should be either 'undefined', 'true' or 'false'.`)):typeof e.value<"u"&&console.error("The passed value should be either 'undefined', 'true' or 'false' or 'object'.");const p=function(a,m){i===window?window.scrollBy(a,m):(i.scrollLeft+=a,i.scrollTop+=m)},l=function(){let a,m,E,y=!1;t.md=function(o){const w=o instanceof window.MouseEvent,d=w?o.pageX:o.touches[0].pageX,f=w?o.pageY:o.touches[0].pageY,v=document.elementFromPoint(d-window.pageXOffset,f-window.pageYOffset),L=e.arg==="nochilddrag",$=e.modifiers.noleft,N=e.modifiers.noright,X=e.modifiers.nomiddle,B=e.modifiers.noback,Y=e.modifiers.noforward,M=e.arg==="firstchilddrag",W=v===t,z=v===t.firstChild,F=L?typeof v?.dataset.dragscroll<"u":typeof v?.dataset.noDragscroll>"u";if(!(!W&&(!F||M&&!z))&&!(o.button===0&&$)){if(o.button===1&&X||o.button===2&&N||o.button===3&&B||o.button===4&&Y)return;E=1,a=w?o.clientX:o.touches[0].clientX,m=w?o.clientY:o.touches[0].clientY}},t.mu=function(o){E=0,y&&c.emitEvent(r,"dragscrollend"),y=!1},t.mm=function(o){const w=o instanceof window.MouseEvent;let d,f;if(E){o.preventDefault(),y||c.emitEvent(r,"dragscrollstart"),y=!0;const v=t.scrollLeft+t.clientWidth>=t.scrollWidth||t.scrollLeft===0,L=t.scrollTop+t.clientHeight>=t.scrollHeight||t.scrollTop===0;d=-a+(a=w?o.clientX:o.touches[0].clientX),f=-m+(m=w?o.clientY:o.touches[0].clientY),e.modifiers.pass?(t.scrollLeft-=e.modifiers.y?-0:d,t.scrollTop-=e.modifiers.x?-0:f,t===document.body&&(t.scrollLeft-=e.modifiers.y?-0:d,t.scrollTop-=e.modifiers.x?-0:f),(v||e.modifiers.y)&&p(-d,0),(L||e.modifiers.x)&&p(0,-f)):(e.modifiers.x&&(f=-0),e.modifiers.y&&(d=-0),t.scrollLeft-=d,t.scrollTop-=f,t===document.body&&(t.scrollLeft-=d,t.scrollTop-=f)),c.emitEvent(r,"dragscrollmove",{deltaX:-d,deltaY:-f})}},c.addEventListeners(t,C,t.md),c.addEventListeners(window,I,t.mu),c.addEventListeners(window,D,t.mm)};n?document.readyState==="complete"?l():window.addEventListener("load",l):(c.removeEventListeners(t,C,t.md),c.removeEventListeners(window,I,t.mu),c.removeEventListeners(window,D,t.mm))},K=s=>{const e=s;c.removeEventListeners(e,C,e.md),c.removeEventListeners(window,I,e.mu),c.removeEventListeners(window,D,e.mm)},P={mounted:(s,e,r)=>V(s,e,r),updated:(s,e,r)=>{JSON.stringify(e.value)!==JSON.stringify(e.oldValue)&&V(s,e,r)},unmounted:s=>K(s)};typeof window<"u"&&window.Vue&&(window.VueDragscroll=P);const Q={directives:{dragscroll:P},data(){return{isDragging:!1,supportsTouch:!1,mounted:!1}},mounted(){("ontouchstart"in window||navigator.msMaxTouchPoints)&&(this.supportsTouch=!0),this.mounted=!0},methods:{handleDragStart(){this.isDragging=!0},handleDragEnd(){this.isDragging=!1}}},U=["data-touch-support"];function ee(s,e,r,t,n,i){const p=j("dragscroll");return!n.supportsTouch&&n.mounted?q((u(),h("div",{key:0,class:x(["drag-to-scroll",{"is-dragging":n.isDragging}]),onDragscrollstart:e[0]||(e[0]=(...l)=>i.handleDragStart&&i.handleDragStart(...l)),onDragscrollend:e[1]||(e[1]=(...l)=>i.handleDragEnd&&i.handleDragEnd(...l))},[g(s.$slots,"default")],34)),[[p]]):(u(),h("div",{key:1,"data-touch-support":n.supportsTouch?"true":"false"},[g(s.$slots,"default")],8,U))}const te=R(Q,[["render",ee]]),se={name:"DnSlider",components:{DragToScroll:te},props:{items:{type:Array,default:null},controlsEnabled:{type:Boolean,default:!1},hasPadding:{type:Boolean,default:!0},controlTransitionName:{type:String,default:"fade"},trackIntersection:{type:Boolean,default:!1},intersectionThreshold:{type:Number,default:.75}},data(){return{overflowRight:!1,overflowLeft:!1,intersectionObserver:null,itemIsVisible:[]}},watch:{items(s){this.itemIsVisible=s.map(()=>null)},controlsEnabled(s){return s?this.enableControls():this.disableControls()},trackIntersection(s){return s?this.addIntersectionObservers():this.removeIntersectionObservers()}},async mounted(){this.controlsEnabled&&this.enableControls(),this.trackIntersection&&(await G(),this.addIntersectionObservers())},unmounted(){this.controlsEnabled&&this.disableControls(),this.trackIntersection&&this.removeIntersectionObservers()},methods:{enableControls(){this.calculatePositions(),window.addEventListener("resize",this.calculatePositions),this.$refs.scrollContainer.$el.addEventListener("scroll",this.calculatePositions)},disableControls(){window.removeEventListener("resize",this.calculatePositions),this.$refs.scrollContainer&&this.$refs.scrollContainer.$el&&this.$refs.scrollContainer.$el.removeEventListener("scroll",this.calculatePositions)},calculatePositions(){if(!this.$refs.items||!this.$refs.items.length)return;const s=this.$refs.items[0].getBoundingClientRect(),e=this.$refs.items[this.$refs.items.length-1].getBoundingClientRect();this.overflowLeft=s.left<0,this.overflowRight=e.right>window.innerWidth},scroll(s){let e=0;this.$refs.items&&this.$refs.items.length&&(e=this.$refs.items[0].offsetWidth);const r=this.$refs.scrollContainer.$el;let t=0;if(s==="left")t=r.scrollLeft-e;else if(s==="right")t=r.scrollLeft+e;else return;r.scrollTo({left:t,behavior:"smooth"}),this.calculatePositions(t)},scrollLeft(){this.scroll("left")},scrollRight(){this.scroll("right")}
1,addIntersectionObservers(){if(!this.intersectionObserver){const s={threshold:this.intersectionThreshold};this.intersectionObserver=new IntersectionObserver(this.onIntersect,s)}this.$refs.items.forEach(s=>{this.intersectionObserver.observe(s)})},onIntersect(s){for(const e of s)e.isIntersecting?e.target.dispatchEvent(new Event("enter")):e.target.dispatchEvent(new Event("leave"))},removeIntersectionObservers(){this.intersectionObserver?.disconnect()}}},re={key:0,class:"slider"},oe={key:0,class:"slider__padding"},ne=["onEnter","onLeave"],ie={key:1,class:"slider__padding"};function le(s,e,r,t,n,i){const p=H("DragToScroll");return r.items&&r.items.length?(u(),h("div",re,[_(p,{ref:"scrollContainer",class:"slider__track"},{default:T(()=>[g(s.$slots,"default",{},()=>[r.hasPadding?(u(),h("div",oe)):b("",!0),(u(!0),h(J,null,A(r.items,(l,a)=>(u(),h("div",{ref_for:!0,ref:"items",key:`slide_${a}`,class:"slider__item",onEnter:m=>n.itemIsVisible[a]=!0,onLeave:m=>n.itemIsVisible[a]=!1},[g(s.$slots,"slide",{item:l,index:a,isVisible:n.itemIsVisible[a]})],40,ne))),128)),r.hasPadding?(u(),h("div",ie)):b("",!0)])]),_:3},512),r.controlsEnabled?g(s.$slots,"controlLeft",{key:0,scrollLeft:i.scrollLeft,isVisible:n.overflowLeft},()=>[_(S,{name:r.controlTransitionName},{default:T(()=>[n.overflowLeft?(u(),h("button",{key:0,"data-left":"",class:"slider__control",type:"button",onClick:e[0]||(e[0]=k((...l)=>i.scrollLeft&&i.scrollLeft(...l),["prevent"]))},[g(s.$slots,"controlLeftLabel",{},()=>[e[2]||(e[2]=O("Left",-1))])])):b("",!0)]),_:3},8,["name"])]):b("",!0),r.controlsEnabled?g(s.$slots,"controlRight",{key:1,scrollRight:i.scrollRight,isVisible:n.overflowRight},()=>[_(S,{name:r.controlTransitionName},{default:T(()=>[n.overflowRight?(u(),h("button",{key:0,"data-right":"",class:"slider__control",type:"button",onClick:e[1]||(e[1]=k((...l)=>i.scrollRight&&i.scrollRight(...l),["prevent"]))},[g(s.$slots,"controlRightLabel",{},()=>[e[3]||(e[3]=O("Right",-1))])])):b("",!0)]),_:3},8,["name"])]):b("",!0)])):b("",!0)}const ae=R(se,[["render",le]]),ce=Z(ae),fe=Object.assign(ce,{__name:"BaseSlider"});export{fe 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.