uikit 3.11.2-dev.c7ed3c19b → 3.11.2-dev.d8c101f07
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +6 -8
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +26 -55
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +27 -57
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +4 -11
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +8 -14
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +5 -7
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2 -2
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +20 -27
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +54 -92
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +2 -11
- package/src/js/api/hooks.js +1 -1
- package/src/js/api/state.js +1 -1
- package/src/js/components/filter.js +2 -3
- package/src/js/components/internal/lightbox-animations.js +4 -3
- package/src/js/components/internal/slideshow-animations.js +4 -3
- package/src/js/components/lightbox-panel.js +34 -58
- package/src/js/components/lightbox.js +1 -2
- package/src/js/components/sortable.js +1 -1
- package/src/js/core/alert.js +1 -2
- package/src/js/core/modal.js +1 -2
- package/src/js/core/navbar.js +3 -3
- package/src/js/mixin/internal/animate-slide.js +9 -12
- package/src/js/mixin/slider.js +8 -16
- package/src/js/mixin/slideshow.js +2 -2
- package/src/js/mixin/togglable.js +1 -2
- package/src/js/util/ajax.js +9 -12
- package/src/js/util/animation.js +7 -12
- package/src/js/util/lang.js +1 -1
- package/src/js/util/options.js +2 -11
- package/src/js/util/player.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.c7ed3c19b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],f):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox=f(s.UIkit.util))})(this,function(s){"use strict";var f={slide:{show(e){return[{transform:v(e*-100)},{transform:v()}]},percent(e){return P(e)},translate(e,t){return[{transform:v(t*-100*e)},{transform:v(t*100*(1-e))}]}}};function P(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function v(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function w(e){return"scale3d("+e+", "+e+", 1)"}var I=s.assign({},f,{fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:w(1-.2)},{opacity:1,transform:w(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:w(1-.2*e)},{opacity:e,transform:w(1-.2+.2*e)}]}}}),y={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},_={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},$={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation(e){let{animation:t}=e;return!!t[0]},hasTransition(e){let{animation:t}=e;return this.hasAnimation&&t[0]===!0}},methods:{toggleElement(e,t,n){return new Promise(o=>Promise.all(s.toNodes(e).map(i=>{const a=s.isBoolean(t)?t:!this.isToggled(i);if(!s.trigger(i,"before"+(a?"show":"hide"),[this]))return Promise.reject();const h=(s.isFunction(n)?n:n===!1||!this.hasAnimation?this._toggle:this.hasTransition?E(this):S(this))(i,a),r=a?this.clsEnter:this.clsLeave;s.addClass(i,r),s.trigger(i,a?"show":"hide",[this]);const l=()=>{s.removeClass(i,r),s.trigger(i,a?"shown":"hidden",[this]),this.$update(i)};return h?h.then(l,()=>(s.removeClass(i,r),Promise.reject())):l()})).then(o,s.noop))},isToggled(e){return e===void 0&&(e=this.$el),[e]=s.toNodes(e),s.hasClass(e,this.clsEnter)?!0:s.hasClass(e,this.clsLeave)?!1:this.cls?s.hasClass(e,this.cls.split(" ")[0]):s.isVisible(e)},_toggle(e,t){if(!e)return;t=Boolean(t);let n;this.cls?(n=s.includes(this.cls," ")||t!==s.hasClass(e,this.cls),n&&s.toggleClass(e,this.cls,s.includes(this.cls," ")?void 0:t)):(n=t===e.hidden,n&&(e.hidden=!t)),s.$$("[autofocus]",e).some(o=>s.isVisible(o)?o.focus()||!0:o.blur()),n&&(s.trigger(e,"toggled",[t,this]),this.$update(e))}}};function E(e){let{isToggled:t,duration:n,initProps:o,hideProps:i,transition:a,_toggle:h}=e;return(r,l)=>{const d=s.Transition.inProgress(r),m=r.hasChildNodes?s.toFloat(s.css(r.firstElementChild,"marginTop"))+s.toFloat(s.css(r.lastElementChild,"marginBottom")):0,c=s.isVisible(r)?s.height(r)+(d?0:m):0;s.Transition.cancel(r),t(r)||h(r,!0),s.height(r,""),s.fastdom.flush();const g=s.height(r)+(d?0:m);return s.height(r,c),(l?s.Transition.start(r,s.assign({},o,{overflow:"hidden",height:g}),Math.round(n*(1-c/g)),a):s.Transition.start(r,i,Math.round(n*(c/g)),a).then(()=>h(r,!1))).then(()=>s.css(r,o))}}function S(e){return(t,n)=>{s.Animation.cancel(t);const{animation:o,duration:i,_toggle:a}=e;return n?(a(t,!0),s.Animation.in(t,o[0],i,e.origin)):s.Animation.out(t,o[1]||o[0],i,e.origin).then(()=>a(t,!1))}}const p=[];var N={mixins:[_,y,$],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(e,t){let{selPanel:n}=e;return s.$(n,t)},transitionElement(){return this.panel},bgClose(e){let{bgClose:t}=e;return t&&this.panel}},beforeDisconnect(){s.includes(p,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(p,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(p,this))return!1;!this.stack&&p.length?(Promise.all(p.map(t=>t.hide())).then(this.show),e.preventDefault()):p.push(this)}},{name:"show",self:!0,handler(){const e=document.documentElement;s.width(window)>e.clientWidth&&this.overlay&&s.css(document.body,"overflowY","scroll"),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+p.length),s.addClass(e,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,t=>{let{target:n}=t;s.last(p)!==this||this.overlay&&!s.within(n,this.$el)||s.within(n,this.panel)||s.once(document,s.pointerUp+" "+s.pointerCancel+" scroll",o=>{let{defaultPrevented:i,type:a,target:h}=o;!i&&a===s.pointerUp&&n===h&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",t=>{t.keyCode===27&&s.last(p)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(p,this)&&p.splice(p.indexOf(this),1),p.length||s.css(document.body,"overflowY",""),s.css(this.$el,"zIndex",""),p.some(e=>e.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,C(this))},hide(){return this.toggleElement(this.$el,!1,C(this))}}};function C(e){let{transitionElement:t,_toggle:n}=e;return(o,i)=>new Promise((a,h)=>s.once(o,"show hide",()=>{o._reject&&o._reject(),o._reject=h,n(o,i);const r=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{r(),a()},s.toMs(s.css(t,"transitionDuration")))})).then(()=>delete o._reject)}function D(e,t,n,o){let{animation:i,easing:a}=o;const{percent:h,translate:r,show:l=s.noop}=i,d=l(n),m=new s.Deferred;return{dir:n,show(c,g,V){g===void 0&&(g=0);const x=V?"linear":a;return c-=Math.round(c*s.clamp(g,-1,1)),this.translate(g),b(t,"itemin",{percent:g,duration:c,timing:x,dir:n}),b(e,"itemout",{percent:1-g,duration:c,timing:x,dir:n}),Promise.all([s.Transition.start(t,d[1],c,x),s.Transition.start(e,d[0],c,x)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const c in d[0])s.css([t,e],c,"")},forward(c,g){return g===void 0&&(g=this.percent()),s.Transition.cancel([t,e]),this.show(c,g,!0)},translate(c){this.reset();const g=r(c,n);s.css(t,g[1]),s.css(e,g[0]),b(t,"itemtranslatein",{percent:c,dir:n}),b(e,"itemtranslateout",{percent:1-c,dir:n})},percent(){return h(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function b(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var B={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},M={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const o=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=o===this.pos?this.prevPos:this.pos,this.pos=o,t(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&j(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:o}=this,i=Math.abs(t),a=this.getIndex(o+this.dir,o),h=this._getDistance(o,a)||n[o].offsetWidth;for(;a!==o&&i>h;)this.drag-=h*this.dir,o=a,i-=h,a=this.getIndex(o+this.dir,o),h=this._getDistance(o,a)||n[o].offsetWidth;this.percent=i/h;const r=n[o],l=n[a],d=this.index!==a,m=o===a;let c;[this.index,this.prevIndex].filter(g=>!s.includes([a,o],g)).forEach(g=>{s.trigger(n[g],"itemhidden",[this]),m&&(c=!0,this.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||c)&&s.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=o,this.index=a,!m&&s.trigger(r,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),r,!m&&l),d&&(!m&&s.trigger(r,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function j(e){return!e.children.length&&e.childNodes.length}var O={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},z={mixins:[B,M,O],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return H(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},events:{itemshown(){this.$update(this.list)}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,o=t?0:n.length,i=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[a],r=this.getIndex(e,this.index),l=this.slides[r];if(h===l){i();return}if(this.dir=L(e,a),this.prevIndex=a,this.index=r,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,h])){this.index=this.prevIndex,i();return}const d=this._show(h,l,t).then(()=>(h&&s.trigger(h,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return h&&s.trigger(h,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,s.assign({easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing},this.transitionOptions)),!n&&!e)return this._translate(1),Promise.resolve();const{length:o}=this.stack;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const o=this._getTransitioner(t!==n?t:!1,n);return o.translate(e),o},_getTransitioner(e,t,n,o){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),o===void 0&&(o=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),o)}}};function L(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function H(e){return .5*e+300}var W={mixins:[z],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:f,Transitioner:D},computed:{animation(e){let{animation:t,Animations:n}=e;return s.assign(n[t]||n.slide,{name:t})},transitionOptions(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden"(e){let{target:t}=e;this.$update(t)},beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},q={mixins:[y,N,$,W],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:I,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=s.$(this.template),t=s.$(this.selList,e);this.items.forEach(()=>s.append(t,"<li>")),this.$mount(s.append(this.container,e))},computed:{caption(e,t){let{selCaption:n}=e;return s.$(n,t)}},events:[{name:s.pointerMove+" "+s.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=I.scale,s.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:n,type:o,alt:i="",poster:a,attrs:h={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let r;const l={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||n.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))try{const{width:d,height:m}=await s.getImage(n,h.srcset,h.size);this.setItem(t,u("img",s.assign({src:n,width:d,height:m,alt:i},h)))}catch{this.setError(t)}else if(o==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const d=u("video",s.assign({src:n,poster:a,controls:"",playsinline:"","uk-video":""+this.videoAutoplay},h));s.on(d,"loadedmetadata",()=>{s.attr(d,{width:d.videoWidth,height:d.videoHeight}),this.setItem(t,d)}),s.on(d,"error",()=>this.setError(t))}else if(o==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,u("iframe",s.assign({src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe"},h)));else if(r=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,u("iframe",s.assign({src:"https://www.youtube"+(r[1]||"")+".com/embed/"+r[2]+(r[3]?"?"+r[3]:""),width:1920,height:1080},l,h)));else if(r=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:d,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,u("iframe",s.assign({src:"https://player.vimeo.com/video/"+r[1]+(r[2]?"?"+r[2]:""),width:m,height:d},l,h)))}catch{this.setError(t)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e){return e===void 0&&(e=this.index),this.items[s.getIndex(e,this.slides)]},setItem(e,t){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function u(e,t){const n=s.fragment("<"+e+">");return s.attr(n,t),n}var T={install:F,props:{toggle:String},data:{toggle:"a"},computed:{toggles:{get(e,t){let{toggle:n}=e;return s.$$(n,t)},watch(){this.hide()}}},disconnected(){this.hide()},events:[{name:"click",delegate(){return this.toggle+":not(.uk-disabled)"},handler(e){e.preventDefault(),this.show(e.current)}}],methods:{show(e){const t=s.uniqueBy(this.toggles.map(A),"source");if(s.isElement(e)){const{source:n}=A(e);e=s.findIndex(t,o=>{let{source:i}=o;return n===i})}return this.panel=this.panel||this.$create("lightboxPanel",s.assign({},this.$props,{items:t})),s.on(this.panel.$el,"hidden",()=>this.panel=!1),this.panel.show(e)},hide(){return this.panel&&this.panel.hide()}}};function F(e,t){e.lightboxPanel||e.component("lightboxPanel",q),s.assign(t.props,e.component("lightboxPanel").options.props)}function A(e){const t={};for(const n of["href","caption","type","poster","alt","attrs"])t[n==="href"?"source":n]=s.data(e,n);return t.attrs=s.parseOptions(t.attrs),t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",T),T});
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],f):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitLightbox=f(t.UIkit.util))})(this,function(t){"use strict";var f={slide:{show(e){return[{transform:v(e*-100)},{transform:v()}]},percent(e){return P(e)},translate(e,s){return[{transform:v(s*-100*e)},{transform:v(s*100*(1-e))}]}}};function P(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function v(e,s){return e===void 0&&(e=0),s===void 0&&(s="%"),e+=e?s:"","translate3d("+e+", 0, 0)"}function w(e){return"scale3d("+e+", "+e+", 1)"}var I={...f,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:w(1-.2)},{opacity:1,transform:w(1)}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:w(1-.2*e)},{opacity:e,transform:w(1-.2+.2*e)}]}}},y={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:s}=e;return s===!0&&this.$container||s&&t.$(s)}}},_={connected(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},$={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation(e){let{animation:s}=e;return!!s[0]},hasTransition(e){let{animation:s}=e;return this.hasAnimation&&s[0]===!0}},methods:{toggleElement(e,s,n){return new Promise(o=>Promise.all(t.toNodes(e).map(h=>{const a=t.isBoolean(s)?s:!this.isToggled(h);if(!t.trigger(h,"before"+(a?"show":"hide"),[this]))return Promise.reject();const i=(t.isFunction(n)?n:n===!1||!this.hasAnimation?this._toggle:this.hasTransition?E(this):S(this))(h,a),r=a?this.clsEnter:this.clsLeave;t.addClass(h,r),t.trigger(h,a?"show":"hide",[this]);const l=()=>{t.removeClass(h,r),t.trigger(h,a?"shown":"hidden",[this]),this.$update(h)};return i?i.then(l,()=>(t.removeClass(h,r),Promise.reject())):l()})).then(o,t.noop))},isToggled(e){return e===void 0&&(e=this.$el),[e]=t.toNodes(e),t.hasClass(e,this.clsEnter)?!0:t.hasClass(e,this.clsLeave)?!1:this.cls?t.hasClass(e,this.cls.split(" ")[0]):t.isVisible(e)},_toggle(e,s){if(!e)return;s=Boolean(s);let n;this.cls?(n=t.includes(this.cls," ")||s!==t.hasClass(e,this.cls),n&&t.toggleClass(e,this.cls,t.includes(this.cls," ")?void 0:s)):(n=s===e.hidden,n&&(e.hidden=!s)),t.$$("[autofocus]",e).some(o=>t.isVisible(o)?o.focus()||!0:o.blur()),n&&(t.trigger(e,"toggled",[s,this]),this.$update(e))}}};function E(e){let{isToggled:s,duration:n,initProps:o,hideProps:h,transition:a,_toggle:i}=e;return(r,l)=>{const d=t.Transition.inProgress(r),m=r.hasChildNodes?t.toFloat(t.css(r.firstElementChild,"marginTop"))+t.toFloat(t.css(r.lastElementChild,"marginBottom")):0,c=t.isVisible(r)?t.height(r)+(d?0:m):0;t.Transition.cancel(r),s(r)||i(r,!0),t.height(r,""),t.fastdom.flush();const g=t.height(r)+(d?0:m);return t.height(r,c),(l?t.Transition.start(r,{...o,overflow:"hidden",height:g},Math.round(n*(1-c/g)),a):t.Transition.start(r,h,Math.round(n*(c/g)),a).then(()=>i(r,!1))).then(()=>t.css(r,o))}}function S(e){return(s,n)=>{t.Animation.cancel(s);const{animation:o,duration:h,_toggle:a}=e;return n?(a(s,!0),t.Animation.in(s,o[0],h,e.origin)):t.Animation.out(s,o[1]||o[0],h,e.origin).then(()=>a(s,!1))}}const p=[];var N={mixins:[_,y,$],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel(e,s){let{selPanel:n}=e;return t.$(n,s)},transitionElement(){return this.panel},bgClose(e){let{bgClose:s}=e;return s&&this.panel}},beforeDisconnect(){t.includes(p,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===t.includes(p,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(t.includes(p,this))return!1;!this.stack&&p.length?(Promise.all(p.map(s=>s.hide())).then(this.show),e.preventDefault()):p.push(this)}},{name:"show",self:!0,handler(){const e=document.documentElement;t.width(window)>e.clientWidth&&this.overlay&&t.css(document.body,"overflowY","scroll"),this.stack&&t.css(this.$el,"zIndex",t.toFloat(t.css(this.$el,"zIndex"))+p.length),t.addClass(e,this.clsPage),this.bgClose&&t.once(this.$el,"hide",t.on(document,t.pointerDown,s=>{let{target:n}=s;t.last(p)!==this||this.overlay&&!t.within(n,this.$el)||t.within(n,this.panel)||t.once(document,t.pointerUp+" "+t.pointerCancel+" scroll",o=>{let{defaultPrevented:h,type:a,target:i}=o;!h&&a===t.pointerUp&&n===i&&this.hide()},!0)}),{self:!0}),this.escClose&&t.once(this.$el,"hide",t.on(document,"keydown",s=>{s.keyCode===27&&t.last(p)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){t.isFocusable(this.$el)||t.attr(this.$el,"tabindex","-1"),t.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){t.includes(p,this)&&p.splice(p.indexOf(this),1),p.length||t.css(document.body,"overflowY",""),t.css(this.$el,"zIndex",""),p.some(e=>e.clsPage===this.clsPage)||t.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&t.parent(this.$el)!==this.container?(t.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,C(this))},hide(){return this.toggleElement(this.$el,!1,C(this))}}};function C(e){let{transitionElement:s,_toggle:n}=e;return(o,h)=>new Promise((a,i)=>t.once(o,"show hide",()=>{o._reject&&o._reject(),o._reject=i,n(o,h);const r=t.once(s,"transitionstart",()=>{t.once(s,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{r(),a()},t.toMs(t.css(s,"transitionDuration")))})).then(()=>delete o._reject)}function D(e,s,n,o){let{animation:h,easing:a}=o;const{percent:i,translate:r,show:l=t.noop}=h,d=l(n),m=new t.Deferred;return{dir:n,show(c,g,V){g===void 0&&(g=0);const x=V?"linear":a;return c-=Math.round(c*t.clamp(g,-1,1)),this.translate(g),b(s,"itemin",{percent:g,duration:c,timing:x,dir:n}),b(e,"itemout",{percent:1-g,duration:c,timing:x,dir:n}),Promise.all([t.Transition.start(s,d[1],c,x),t.Transition.start(e,d[0],c,x)]).then(()=>{this.reset(),m.resolve()},t.noop),m.promise},cancel(){t.Transition.cancel([s,e])},reset(){for(const c in d[0])t.css([s,e],c,"")},forward(c,g){return g===void 0&&(g=this.percent()),t.Transition.cancel([s,e]),this.show(c,g,!0)},translate(c){this.reset();const g=r(c,n);t.css(s,g[1]),t.css(e,g[0]),b(s,"itemtranslatein",{percent:c,dir:n}),b(e,"itemtranslateout",{percent:1-c,dir:n})},percent(){return i(e||s,s,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function b(e,s,n){t.trigger(e,t.createEvent(s,!1,!1,n))}var B={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!t.$(":focus",this.$el))&&(!this.pauseOnHover||!t.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},M={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const s=this[e];this[e]=n=>{const o=t.getEventPos(n).x*(t.isRtl?-1:1);this.prevPos=o===this.pos?this.prevPos:this.pos,this.pos=o,s(n)}}},events:[{name:t.pointerDown,delegate(){return this.selSlides},handler(e){!this.draggable||!t.isTouch(e)&&j(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,t.on(document,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move(e){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;const{slides:n}=this;let{prevIndex:o}=this,h=Math.abs(s),a=this.getIndex(o+this.dir,o),i=this._getDistance(o,a)||n[o].offsetWidth;for(;a!==o&&h>i;)this.drag-=i*this.dir,o=a,h-=i,a=this.getIndex(o+this.dir,o),i=this._getDistance(o,a)||n[o].offsetWidth;this.percent=h/i;const r=n[o],l=n[a],d=this.index!==a,m=o===a;let c;[this.index,this.prevIndex].filter(g=>!t.includes([a,o],g)).forEach(g=>{t.trigger(n[g],"itemhidden",[this]),m&&(c=!0,this.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||c)&&t.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=o,this.index=a,!m&&t.trigger(r,"beforeitemhide",[this]),t.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),r,!m&&l),d&&(!m&&t.trigger(r,"itemhide",[this]),t.trigger(l,"itemshow",[this]))},end(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(t.isRtl?this.dir*(t.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}t.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function j(e){return!e.children.length&&e.childNodes.length}var O={data:{selNav:!1},computed:{nav(e,s){let{selNav:n}=e;return t.$(n,s)},selNavItem(e){let{attrItem:s}=e;return"["+s+"],[data-"+s+"]"},navItems(e,s){return t.$$(this.selNavItem,s)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map((e,s)=>"<li "+this.attrItem+'="'+s+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const s of this.navItems){const n=t.data(s,this.attrItem);t.toggleClass(s,this.clsActive,t.toNumber(n)===e),t.toggleClass(s,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},z={mixins:[B,M,O],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){t.removeClass(this.slides,this.clsActive)},computed:{duration(e,s){let{velocity:n}=e;return H(s.offsetWidth/n)},list(e,s){let{selList:n}=e;return t.$(n,s)},maxIndex(){return this.length-1},selSlides(e){let{selList:s,selSlides:n}=e;return s+" "+(n||"> *")},slides:{get(){return t.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},events:{itemshown(){this.$update(this.list)}},methods:{show(e,s){if(s===void 0&&(s=!1),this.dragging||!this.length)return;const{stack:n}=this,o=s?0:n.length,h=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](e),!s&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),i=t.hasClass(this.slides,this.clsActive)&&this.slides[a],r=this.getIndex(e,this.index),l=this.slides[r];if(i===l){h();return}if(this.dir=L(e,a),this.prevIndex=a,this.index=r,i&&!t.trigger(i,"beforeitemhide",[this])||!t.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,h();return}const d=this._show(i,l,s).then(()=>(i&&t.trigger(i,"itemhidden",[this]),t.trigger(l,"itemshown",[this]),new Promise(m=>{t.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return i&&t.trigger(i,"itemhide",[this]),t.trigger(l,"itemshow",[this]),d},getIndex(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.index),t.clamp(t.getIndex(e,this.slides,s,this.finite),0,this.maxIndex)},getValidIndex(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),this.getIndex(e,s)},_show(e,s,n){if(this._transitioner=this._getTransitioner(e,s,this.dir,{easing:n?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:o}=this.stack;return this._transitioner[o>1?"forward":"show"](o>1?Math.min(this.duration,75+75/(o-1)):this.duration,this.percent)},_getDistance(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate(e,s,n){s===void 0&&(s=this.prevIndex),n===void 0&&(n=this.index);const o=this._getTransitioner(s!==n?s:!1,n);return o.translate(e),o},_getTransitioner(e,s,n,o){return e===void 0&&(e=this.prevIndex),s===void 0&&(s=this.index),n===void 0&&(n=this.dir||1),o===void 0&&(o=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,n*(t.isRtl?-1:1),o)}}};function L(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function H(e){return .5*e+300}var W={mixins:[z],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:f,Transitioner:D},computed:{animation(e){let{animation:s,Animations:n}=e;return{...n[s]||n.slide,name:s}},transitionOptions(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden"(e){let{target:s}=e;this.$update(s)},beforeitemshow(e){let{target:s}=e;t.addClass(s,this.clsActive)},itemshown(e){let{target:s}=e;t.addClass(s,this.clsActivated)},itemhidden(e){let{target:s}=e;t.removeClass(s,this.clsActive,this.clsActivated)}}},q={mixins:[y,N,$,W],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:I,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=t.$(this.template),s=t.$(this.selList,e);this.items.forEach(()=>t.append(s,"<li>")),this.$mount(t.append(this.container,e))},computed:{caption(e,s){let{selCaption:n}=e;return t.$(n,s)}},events:[{name:t.pointerMove+" "+t.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),t.removeClass(this.slides,this.clsActive),t.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=I.scale,t.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){t.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,s){const{source:n,type:o,alt:h="",poster:a,attrs:i={}}=s;if(this.setItem(s,"<span uk-spinner></span>"),!n)return;let r;const l={frameborder:"0",allow:"autoplay",allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":""+this.videoAutoplay};if(o==="image"||n.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i))try{const{width:d,height:m}=await t.getImage(n,i.srcset,i.size);this.setItem(s,u("img",{src:n,width:d,height:m,alt:h,...i}))}catch{this.setError(s)}else if(o==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const d=u("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...i});t.on(d,"loadedmetadata",()=>{t.attr(d,{width:d.videoWidth,height:d.videoHeight}),this.setItem(s,d)}),t.on(d,"error",()=>this.setError(s))}else if(o==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(s,u("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...i}));else if(r=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(s,u("iframe",{src:"https://www.youtube"+(r[1]||"")+".com/embed/"+r[2]+(r[3]?"?"+r[3]:""),width:1920,height:1080,...l,...i}));else if(r=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:d,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(s,u("iframe",{src:"https://player.vimeo.com/video/"+r[1]+(r[2]?"?"+r[2]:""),width:m,height:d,...l,...i}))}catch{this.setError(s)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const s=this.getItem(e);this.getSlide(s).childElementCount||t.trigger(this.$el,"itemload",[s])},getItem(e){return e===void 0&&(e=this.index),this.items[t.getIndex(e,this.slides)]},setItem(e,s){t.trigger(this.$el,"itemloaded",[this,t.html(this.getSlide(e),s)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),t.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){t.removeClass(this.$el,"uk-active","uk-transition-active")}}};function u(e,s){const n=t.fragment("<"+e+">");return t.attr(n,s),n}var T={install:F,props:{toggle:String},data:{toggle:"a"},computed:{toggles:{get(e,s){let{toggle:n}=e;return t.$$(n,s)},watch(){this.hide()}}},disconnected(){this.hide()},events:[{name:"click",delegate(){return this.toggle+":not(.uk-disabled)"},handler(e){e.preventDefault(),this.show(e.current)}}],methods:{show(e){const s=t.uniqueBy(this.toggles.map(A),"source");if(t.isElement(e)){const{source:n}=A(e);e=t.findIndex(s,o=>{let{source:h}=o;return n===h})}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:s}),t.on(this.panel.$el,"hidden",()=>this.panel=!1),this.panel.show(e)},hide(){return this.panel&&this.panel.hide()}}};function F(e,s){e.lightboxPanel||e.component("lightboxPanel",q),t.assign(s.props,e.component("lightboxPanel").options.props)}function A(e){const s={};for(const n of["href","caption","type","poster","alt","attrs"])s[n==="href"?"source":n]=t.data(e,n);return s.attrs=t.parseOptions(s.attrs),s}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",T),T});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitnotification",["uikit-util"],o):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitNotification=o(t.UIkit.util))})(this,function(t){"use strict";var o={props:{container:Boolean},data:{container:!0},computed:{container(s){let{container:e}=s;return e===!0&&this.$container||e&&t.$(e)}}},r={mixins:[o],functional:!0,args:["message","status"],data:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",clsContainer:"uk-notification",clsClose:"uk-notification-close",clsMsg:"uk-notification-message"},install:c,computed:{marginProp(s){let{pos:e}=s;return"margin"+(t.startsWith(e,"top")?"Top":"Bottom")},startProps(){return{opacity:0,[this.marginProp]:-this.$el.offsetHeight}}},created(){const s=t.$("."+this.clsContainer+"-"+this.pos,this.container)||t.append(this.container,'<div class="'+this.clsContainer+" "+this.clsContainer+"-"+this.pos+'" style="display: block"></div>');this.$mount(t.append(s,'<div class="'+this.clsMsg+(this.status?" "+this.clsMsg+"-"+this.status:"")+'"> <a href class="'+this.clsClose+'" data-uk-close></a> <div>'+this.message+"</div> </div>"))},async connected(){const s=t.toFloat(t.css(this.$el,this.marginProp));await t.Transition.start(t.css(this.$el,this.startProps),{opacity:1,[this.marginProp]:s}),this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},events:{click(s){t.closest(s.target,'a[href="#"],a[href=""]')&&s.preventDefault(),this.close()},[t.pointerEnter](){this.timer&&clearTimeout(this.timer)},[t.pointerLeave](){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))}},methods:{async close(s){const e=i=>{const n=t.parent(i);t.trigger(i,"close",[this]),t.remove(i),n!=null&&n.hasChildNodes()||t.remove(n)};this.timer&&clearTimeout(this.timer),s||await t.Transition.start(this.$el,this.startProps),e(this.$el)}}};function c(s){s.notification.closeAll=function(e,i){t.apply(document.body,n=>{const a=s.getComponent(n,"notification");a&&(!e||e===a.group)&&a.close(i)})}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("notification",r),r});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],u):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitParallax=u(r.UIkit.util))})(this,function(r){"use strict";var u={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const n=T(this.media);return!n||window.matchMedia(n).matches}}};function T(n){if(r.isString(n)){if(n[0]==="@"){const e="breakpoint-"+n.substr(1);n=r.toFloat(r.getCssVar(e))}else if(isNaN(n))return n}return n&&!isNaN(n)?"(min-width: "+n+"px)":!1}r.memoize(async n=>n?r.startsWith(n,"data:")?decodeURIComponent(n.split(",")[1]):(await fetch(n)).text():Promise.reject());function B(n){return Math.ceil(Math.max(0,...r.$$("[stroke]",n).map(e=>{try{return e.getTotalLength()}catch{return 0}})))}const b={x:y,y,rotate:y,scale:y,color:v,backgroundColor:v,borderColor:v,blur:f,hue:f,fopacity:f,grayscale:f,invert:f,saturate:f,sepia:f,opacity:q,stroke:H,bgx:I,bgy:I},{keys:w}=Object;var E={mixins:[u],props:O(w(b),"list"),data:O(w(b),void 0),computed:{props(n,e){return w(b).reduce((t,o)=>(r.isUndefined(n[o])||(t[o]=b[o](o,e,n[o].slice())),t),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){r.each(this.getCss(0),(n,e)=>r.css(this.$el,e,""))},getCss(n){return w(this.props).reduce((e,t)=>(this.props[t](e,n),e),{transform:"",filter:""})}}};function y(n,e,t){const o=C(t)||{x:"px",y:"px",rotate:"deg"}[n]||"";return(n==="x"||n==="y")&&(n="translate"+r.ucfirst(n)),t=t.map(r.toFloat),t.length===1&&t.unshift(n==="scale"?1:0),(a,c)=>{let s=h(t,c);r.startsWith(n,"translate")&&(s=r.toFloat(s).toFixed(o==="px"?0:6)),a.transform+=" "+n+"("+s+o+")"}}function v(n,e,t){return t.length===1&&t.unshift(g(e,n,"")),t=t.map(o=>V(e,o)),(o,a)=>{const[c,s,m]=N(t,a),M=c.map((i,l)=>(i+=m*(s[l]-i),l===3?r.toFloat(i):parseInt(i,10))).join(",");o[n]="rgba("+M+")"}}function V(n,e){return g(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function f(n,e,t){t.length===1&&t.unshift(0);const o=C(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=t.map(r.toFloat),(a,c)=>{const s=h(t,c);a.filter+=" "+n+"("+(s+o)+")"}}function q(n,e,t){return t.length===1&&t.unshift(g(e,n,"")),t=t.map(r.toFloat),(o,a)=>{o[n]=h(t,a)}}function H(n,e,t){t.length===1&&t.unshift(0);const o=C(t);if(t=t.map(r.toFloat),!t.some(c=>c))return r.noop;const a=B(e);return r.css(e,"strokeDasharray",a),o==="%"&&(t=t.map(c=>c*a/100)),t=t.reverse(),(c,s)=>{c.strokeDashoffset=h(t,s)}}function I(n,e,t){t.length===1&&t.unshift(0),n=n.substr(-1);const o=n==="y"?"height":"width";t=t.map(c=>r.toPx(c,o,e));const a=g(e,"background-position-"+n,"");return g(e,"backgroundSize","")==="cover"?L(n,e,t,a,o):S(n,t,a)}function L(n,e,t,o,a){const c=R(e);if(!c.width)return r.noop;const s=Math.min(...t),m=Math.max(...t),M=t.indexOf(s)<t.indexOf(m),i=m-s;let l=(M?-i:0)-(M?s:m);const x={width:e.offsetWidth,height:e.offsetHeight},W=r.Dimensions.cover(c,x),P=W[a]-x[a];if(P<i)x[a]=W[a]+i-P;else if(P>i){const d=x[a]/r.toPx(o,a,e,!0);d&&(l-=(P-i)/d)}const z=r.Dimensions.cover(c,x),A=S(n,t,l+"px");return(d,G)=>{A(d,G),d.backgroundSize=z.width+"px "+z.height+"px",d.backgroundRepeat="no-repeat"}}function S(n,e,t){return function(o,a){o["background-position-"+n]="calc("+t+" + "+h(e,a)+"px)"}}const F={};function R(n){const e=r.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[e])return F[e];const t=new Image;return e&&(t.src=e,t.naturalWidth||(t.onload=()=>{F[e]=D(t),r.trigger(n,"bgimageload")})),F[e]=D(t)}function D(n){return{width:n.naturalWidth,height:n.naturalHeight}}function N(n,e){const t=n.length-1,o=Math.min(Math.floor(t*e),t-1);return n.slice(o,o+2).concat(e===1?1:e%(1/t)*t)}function h(n,e){const[t,o,a]=N(n,e);return r.isNumber(t)?t+Math.abs(t-o)*a*(t<o?1:-1):+o}function C(n,e){return n.reduce((t,o)=>t||r.isString(o)&&o.replace(/[\d-]/g,"").trim(),"")||e}function g(n,e,t){const o=n.style[e],a=r.css(r.css(n,e,t),e);return n.style[e]=o,a}function O(n,e){return n.reduce((t,o)=>(t[o]=e,t),{})}var $={mixins:[E],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target(n,e){let{target:t}=n;return j(t&&r.query(t,e)||e)},start(n){let{start:e}=n;return r.toPx(e,"height",this.target,!0)},end(n){let{end:e,viewport:t}=n;return r.toPx(e||(t=(1-t)*100)&&t+"vh+"+t+"%","height",this.target,!0)}},update:{read(n,e){let{percent:t}=n;if(e.has("scroll")||(t=!1),!this.matchMedia)return;const o=t;return t=_(r.scrolledOver(this.target,this.start,this.end),this.easing),{percent:t,style:o===t?!1:this.getCss(t)}},write(n){let{style:e}=n;if(!this.matchMedia){this.reset();return}e&&r.css(this.$el,e)},events:["scroll","resize"]}};function _(n,e){return e>=0?Math.pow(n,e+1):1-Math.pow(1-n,-e+1)}function j(n){return n?"offsetTop"in n?n:j(r.parent(n)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",$),$});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,h){typeof exports=="object"&&typeof module<"u"?module.exports=h(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],h):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitSlider_parallax=h(o.UIkit.util))})(this,function(o){"use strict";var h={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const e=B(this.media);return!e||window.matchMedia(e).matches}}};function B(e){if(o.isString(e)){if(e[0]==="@"){const t="breakpoint-"+e.substr(1);e=o.toFloat(o.getCssVar(t))}else if(isNaN(e))return e}return e&&!isNaN(e)?"(min-width: "+e+"px)":!1}o.memoize(async e=>e?o.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function V(e){return Math.ceil(Math.max(0,...o.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const b={x:w,y:w,rotate:w,scale:w,color:M,backgroundColor:M,borderColor:M,blur:d,hue:d,fopacity:d,grayscale:d,invert:d,saturate:d,sepia:d,opacity:H,stroke:L,bgx:$,bgy:$},{keys:y}=Object;var _={mixins:[h],props:W(y(b),"list"),data:W(y(b),void 0),computed:{props(e,t){return y(b).reduce((n,r)=>(o.isUndefined(e[r])||(n[r]=b[r](r,t,e[r].slice())),n),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){o.each(this.getCss(0),(e,t)=>o.css(this.$el,t,""))},getCss(e){return y(this.props).reduce((t,n)=>(this.props[n](t,e),t),{transform:"",filter:""})}}};function w(e,t,n){const r=P(n)||{x:"px",y:"px",rotate:"deg"}[e]||"";return(e==="x"||e==="y")&&(e="translate"+o.ucfirst(e)),n=n.map(o.toFloat),n.length===1&&n.unshift(e==="scale"?1:0),(a,c)=>{let s=m(n,c);o.startsWith(e,"translate")&&(s=o.toFloat(s).toFixed(r==="px"?0:6)),a.transform+=" "+e+"("+s+r+")"}}function M(e,t,n){return n.length===1&&n.unshift(g(t,e,"")),n=n.map(r=>q(t,r)),(r,a)=>{const[c,s,f]=T(n,a),C=c.map((i,l)=>(i+=f*(s[l]-i),l===3?o.toFloat(i):parseInt(i,10))).join(",");r[e]="rgba("+C+")"}}function q(e,t){return g(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(o.toFloat)}function d(e,t,n){n.length===1&&n.unshift(0);const r=P(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=n.map(o.toFloat),(a,c)=>{const s=m(n,c);a.filter+=" "+e+"("+(s+r)+")"}}function H(e,t,n){return n.length===1&&n.unshift(g(t,e,"")),n=n.map(o.toFloat),(r,a)=>{r[e]=m(n,a)}}function L(e,t,n){n.length===1&&n.unshift(0);const r=P(n);if(n=n.map(o.toFloat),!n.some(c=>c))return o.noop;const a=V(t);return o.css(t,"strokeDasharray",a),r==="%"&&(n=n.map(c=>c*a/100)),n=n.reverse(),(c,s)=>{c.strokeDashoffset=m(n,s)}}function $(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const r=e==="y"?"height":"width";n=n.map(c=>o.toPx(c,r,t));const a=g(t,"background-position-"+e,"");return g(t,"backgroundSize","")==="cover"?R(e,t,n,a,r):D(e,n,a)}function R(e,t,n,r,a){const c=E(t);if(!c.width)return o.noop;const s=Math.min(...n),f=Math.max(...n),C=n.indexOf(s)<n.indexOf(f),i=f-s;let l=(C?-i:0)-(C?s:f);const x={width:t.offsetWidth,height:t.offsetHeight},O=o.Dimensions.cover(c,x),I=O[a]-x[a];if(I<i)x[a]=O[a]+i-I;else if(I>i){const u=x[a]/o.toPx(r,a,t,!0);u&&(l-=(I-i)/u)}const z=o.Dimensions.cover(c,x),A=D(e,n,l+"px");return(u,G)=>{A(u,G),u.backgroundSize=z.width+"px "+z.height+"px",u.backgroundRepeat="no-repeat"}}function D(e,t,n){return function(r,a){r["background-position-"+e]="calc("+n+" + "+m(t,a)+"px)"}}const F={};function E(e){const t=o.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[t])return F[t];const n=new Image;return t&&(n.src=t,n.naturalWidth||(n.onload=()=>{F[t]=S(n),o.trigger(e,"bgimageload")})),F[t]=S(n)}function S(e){return{width:e.naturalWidth,height:e.naturalHeight}}function T(e,t){const n=e.length-1,r=Math.min(Math.floor(n*t),n-1);return e.slice(r,r+2).concat(t===1?1:t%(1/n)*n)}function m(e,t){const[n,r,a]=T(e,t);return o.isNumber(n)?n+Math.abs(n-r)*a*(n<r?1:-1):+r}function P(e,t){return e.reduce((n,r)=>n||o.isString(r)&&r.replace(/[\d-]/g,"").trim(),"")||t}function g(e,t,n){const r=e.style[t],a=o.css(o.css(e,t,n),t);return e.style[t]=r,a}function W(e,t){return e.reduce((n,r)=>(n[r]=t,n),{})}var j={mixins:[_],data:{selItem:"!li"},computed:{item(e,t){let{selItem:n}=e;return o.query(n,t)}},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:r,timing:a,dir:c}}=e;o.fastdom.read(()=>{const s=this.getCss(N(t,c,n)),f=this.getCss(v(t)?.5:c>0?1:0);o.fastdom.write(()=>{o.css(this.$el,s),o.Transition.start(this.$el,f,r,a).catch(o.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){o.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:r}}=e;o.fastdom.read(()=>{const a=this.getCss(N(t,r,n));o.fastdom.write(()=>o.css(this.$el,a))})}}]};function v(e){return o.endsWith(e,"in")}function N(e,t,n){return n/=2,v(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",j),j});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -503,20 +503,13 @@
|
|
|
503
503
|
},
|
|
504
504
|
|
|
505
505
|
_show(prev, next, force) {
|
|
506
|
-
this._transitioner = this._getTransitioner(
|
|
507
|
-
prev,
|
|
508
|
-
next,
|
|
509
|
-
this.dir,
|
|
510
|
-
uikitUtil.assign(
|
|
511
|
-
{
|
|
506
|
+
this._transitioner = this._getTransitioner(prev, next, this.dir, {
|
|
512
507
|
easing: force ?
|
|
513
508
|
next.offsetWidth < 600 ?
|
|
514
509
|
'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */ :
|
|
515
510
|
'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */ :
|
|
516
|
-
this.easing
|
|
517
|
-
|
|
518
|
-
this.transitionOptions));
|
|
519
|
-
|
|
511
|
+
this.easing,
|
|
512
|
+
...this.transitionOptions });
|
|
520
513
|
|
|
521
514
|
|
|
522
515
|
if (!force && !prev) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.c7ed3c19b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=v(e.UIkit.util))})(this,function(e){"use strict";var v={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!e.$(":focus",this.$el))&&(!this.pauseOnHover||!e.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},S={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const s of["start","move","end"]){const t=this[s];this[s]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:e.pointerDown,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&T(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,e.pointerMove,this.move,{passive:!1}),e.on(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,o=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&o>h;)this.drag-=h*this.dir,i=r,o-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=o/h;const g=n[i],c=n[r],l=this.index!==r,a=i===r;let d;[this.index,this.prevIndex].filter(f=>!e.includes([r,i],f)).forEach(f=>{e.trigger(n[f],"itemhidden",[this]),a&&(d=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||d)&&e.trigger(n[this.index],"itemshown",[this]),l&&(this.prevIndex=i,this.index=r,!a&&e.trigger(g,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),g,!a&&c),l&&(!a&&e.trigger(g,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,e.pointerMove,this.move,{passive:!1}),e.off(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const s=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=s?this.index:this.prevIndex,s&&(this.percent=1-this.percent),this.show(this.dir>0&&!s||this.dir<0&&s?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function T(s){return!s.children.length&&s.childNodes.length}var D={data:{selNav:!1},computed:{nav(s,t){let{selNav:n}=s;return e.$(n,t)},selNavItem(s){let{attrItem:t}=s;return"["+t+"],[data-"+t+"]"},navItems(s,t){return e.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((s,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(s=>s&&(s.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(s){s.preventDefault(),this.show(e.data(s.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const s=this.getValidIndex();for(const t of this.navItems){const n=e.data(t,this.attrItem);e.toggleClass(t,this.clsActive,e.toNumber(n)===s),e.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&s===0||n==="next"&&s>=this.maxIndex))}}}},E={mixins:[R,S,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return b(t.offsetWidth/n)},list(s,t){let{selList:n}=s;return e.$(n,t)},maxIndex(){return this.length-1},selSlides(s){let{selList:t,selSlides:n}=s;return t+" "+(n||"> *")},slides:{get(){return e.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},events:{itemshown(){this.$update(this.list)}},methods:{show(s,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,o=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],g=this.getIndex(s,this.index),c=this.slides[g];if(h===c){o();return}if(this.dir=W(s,r),this.prevIndex=r,this.index=g,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,o();return}const l=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(a=>{e.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,a()})})));return h&&e.trigger(h,"itemhide",[this]),e.trigger(c,"itemshow",[this]),l},getIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.index),e.clamp(e.getIndex(s,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(s,t)},_show(s,t,n){if(this._transitioner=this._getTransitioner(s,t,this.dir,e.assign({easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing},this.transitionOptions)),!n&&!s)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(s,t){return this._getTransitioner(s,s!==t&&t).getDistance()},_translate(s,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(s),i},_getTransitioner(s,t,n,i){return s===void 0&&(s=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(e.isNumber(s)?this.slides[s]:s,e.isNumber(t)?this.slides[t]:t,n*(e.isRtl?-1:1),i)}}};function W(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function b(s){return .5*s+300}var O={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==s)&&this.show(s)},events:["resize"]}};function _(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function B(s,t,n,i){let{center:o,easing:r,list:h}=i;const g=new e.Deferred,c=s?p(s,h,o):p(t,h,o)+e.dimensions(t).width*n,l=t?p(t,h,o):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(a,d,f){d===void 0&&(d=0);const m=f?"linear":r;return a-=Math.round(a*e.clamp(d,-1,1)),this.translate(d),d=s?d:e.clamp(d,0,1),u(this.getItemIn(),"itemin",{percent:d,duration:a,timing:m,dir:n}),s&&u(this.getItemIn(!0),"itemout",{percent:1-d,duration:a,timing:m,dir:n}),e.Transition.start(h,{transform:_(-l*(e.isRtl?-1:1),"px")},a,m).then(g.resolve,e.noop),g.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(a,d){return d===void 0&&(d=this.percent()),e.Transition.cancel(h),this.show(a,d,!0)},translate(a){const d=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",_(e.clamp(-l+(d-d*a),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const f=this.getActives(),m=this.getItemIn(),L=this.getItemIn(!0);a=s?e.clamp(a,-1,1):0;for(const x of e.children(h)){const C=e.includes(f,x),M=x===m,N=x===L,z=M||!N&&(C||n*(e.isRtl?-1:1)===-1^w(x,h)>w(s||t));u(x,"itemtranslate"+(z?"in":"out"),{dir:n,percent:N?1-a:M?a:C?1:0})}},percent(){return Math.abs((e.css(h,"transform").split(",")[4]*(e.isRtl?-1:1)+c)/(l-c))},getDistance(){return Math.abs(l-c)},getItemIn(a){a===void 0&&(a=!1);let d=this.getActives(),f=A(h,p(t||s,h,o));if(a){const m=d;d=f,f=m}return f[e.findIndex(f,m=>!e.includes(d,m))]},getActives(){return A(h,p(s||t,h,o))}}}function p(s,t,n){const i=w(s,t);return n?i-P(s,t):Math.min(i,y(t))}function y(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.children(s).reduce((t,n)=>e.dimensions(n).width+t,0)}function P(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function w(s,t){return s&&(e.position(s).left+(e.isRtl?e.dimensions(s).width-e.dimensions(t).width:0))*(e.isRtl?-1:1)||0}function A(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(o=>{const r=w(o,s),h=r+Math.min(e.dimensions(o).width,n);return r>=t&&h<=i})}function u(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var $={mixins:[v,E,O],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:B},computed:{avgWidth(){return I(this.list)/this.length},finite(s){let{finite:t}=s;return t||Math.ceil(I(this.list))<Math.floor(e.dimensions(this.list).width+V(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let s=0;const t=y(this.list),n=e.findIndex(this.slides,i=>{if(s>=t)return!0;s+=e.dimensions(i).width});return~n?n:this.length-1},sets(s){let{sets:t}=s;if(!t)return;const n=e.dimensions(this.list).width/(this.center?2:1);let i=0,o=n,r=0;return t=e.sortBy(this.slides,"offsetLeft").reduce((h,g,c)=>{const l=e.dimensions(g).width;if(r+l>i&&(!this.center&&c>this.maxIndex&&(c=this.maxIndex),!e.includes(h,c))){const d=this.slides[c+1];this.center&&d&&l<o-e.dimensions(d).width/2?o-=l:(o=n,h.push(c),i=r+n+(this.center?l/2:0))}return r+=l,h},[]),!e.isEmpty(t)&&t},transitionOptions(){return{center:this.center,list:this.list}}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$("."+this.clsContainer,this.$el))},update:{write(){for(const n of this.navItems){const i=e.toNumber(e.data(n,this.attrItem));i!==!1&&(n.hidden=!this.maxIndex||i>this.maxIndex||this.sets&&!e.includes(this.sets,i))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1));const s=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)e.toggleClass(n,t,e.includes(s,n))},events:["resize"]},events:{beforeitemshow(s){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");s.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((o,r)=>e.css(o,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const o=this.getIndex(--i+s,s),r=this.slides[o];e.css(r,"order",o>s?-2:-1),n-=e.dimensions(r).width}},getValidIndex(s,t){if(s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),s=this.getIndex(s,t),!this.sets)return s;let n;do{if(e.includes(this.sets,s))return s;n=s,s=this.getIndex(s+this.dir,t)}while(s!==n);return s}}};function V(s){return Math.max(0,...e.children(s).map(t=>e.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",$),$});
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=v(e.UIkit.util))})(this,function(e){"use strict";var v={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!e.$(":focus",this.$el))&&(!this.pauseOnHover||!e.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},S={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const s of["start","move","end"]){const t=this[s];this[s]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:e.pointerDown,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&T(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,e.pointerMove,this.move,{passive:!1}),e.on(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,a=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&a>h;)this.drag-=h*this.dir,i=r,a-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=a/h;const g=n[i],c=n[r],l=this.index!==r,o=i===r;let d;[this.index,this.prevIndex].filter(f=>!e.includes([r,i],f)).forEach(f=>{e.trigger(n[f],"itemhidden",[this]),o&&(d=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||d)&&e.trigger(n[this.index],"itemshown",[this]),l&&(this.prevIndex=i,this.index=r,!o&&e.trigger(g,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),g,!o&&c),l&&(!o&&e.trigger(g,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,e.pointerMove,this.move,{passive:!1}),e.off(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const s=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=s?this.index:this.prevIndex,s&&(this.percent=1-this.percent),this.show(this.dir>0&&!s||this.dir<0&&s?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function T(s){return!s.children.length&&s.childNodes.length}var D={data:{selNav:!1},computed:{nav(s,t){let{selNav:n}=s;return e.$(n,t)},selNavItem(s){let{attrItem:t}=s;return"["+t+"],[data-"+t+"]"},navItems(s,t){return e.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((s,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(s=>s&&(s.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(s){s.preventDefault(),this.show(e.data(s.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const s=this.getValidIndex();for(const t of this.navItems){const n=e.data(t,this.attrItem);e.toggleClass(t,this.clsActive,e.toNumber(n)===s),e.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&s===0||n==="next"&&s>=this.maxIndex))}}}},E={mixins:[R,S,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return b(t.offsetWidth/n)},list(s,t){let{selList:n}=s;return e.$(n,t)},maxIndex(){return this.length-1},selSlides(s){let{selList:t,selSlides:n}=s;return t+" "+(n||"> *")},slides:{get(){return e.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},events:{itemshown(){this.$update(this.list)}},methods:{show(s,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,a=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],g=this.getIndex(s,this.index),c=this.slides[g];if(h===c){a();return}if(this.dir=W(s,r),this.prevIndex=r,this.index=g,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,a();return}const l=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(o=>{e.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,o()})})));return h&&e.trigger(h,"itemhide",[this]),e.trigger(c,"itemshow",[this]),l},getIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.index),e.clamp(e.getIndex(s,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(s,t)},_show(s,t,n){if(this._transitioner=this._getTransitioner(s,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!s)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(s,t){return this._getTransitioner(s,s!==t&&t).getDistance()},_translate(s,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(s),i},_getTransitioner(s,t,n,i){return s===void 0&&(s=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(e.isNumber(s)?this.slides[s]:s,e.isNumber(t)?this.slides[t]:t,n*(e.isRtl?-1:1),i)}}};function W(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function b(s){return .5*s+300}var O={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==s)&&this.show(s)},events:["resize"]}};function _(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function B(s,t,n,i){let{center:a,easing:r,list:h}=i;const g=new e.Deferred,c=s?p(s,h,a):p(t,h,a)+e.dimensions(t).width*n,l=t?p(t,h,a):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(o,d,f){d===void 0&&(d=0);const m=f?"linear":r;return o-=Math.round(o*e.clamp(d,-1,1)),this.translate(d),d=s?d:e.clamp(d,0,1),u(this.getItemIn(),"itemin",{percent:d,duration:o,timing:m,dir:n}),s&&u(this.getItemIn(!0),"itemout",{percent:1-d,duration:o,timing:m,dir:n}),e.Transition.start(h,{transform:_(-l*(e.isRtl?-1:1),"px")},o,m).then(g.resolve,e.noop),g.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(o,d){return d===void 0&&(d=this.percent()),e.Transition.cancel(h),this.show(o,d,!0)},translate(o){const d=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",_(e.clamp(-l+(d-d*o),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const f=this.getActives(),m=this.getItemIn(),L=this.getItemIn(!0);o=s?e.clamp(o,-1,1):0;for(const x of e.children(h)){const C=e.includes(f,x),M=x===m,N=x===L,z=M||!N&&(C||n*(e.isRtl?-1:1)===-1^w(x,h)>w(s||t));u(x,"itemtranslate"+(z?"in":"out"),{dir:n,percent:N?1-o:M?o:C?1:0})}},percent(){return Math.abs((e.css(h,"transform").split(",")[4]*(e.isRtl?-1:1)+c)/(l-c))},getDistance(){return Math.abs(l-c)},getItemIn(o){o===void 0&&(o=!1);let d=this.getActives(),f=A(h,p(t||s,h,a));if(o){const m=d;d=f,f=m}return f[e.findIndex(f,m=>!e.includes(d,m))]},getActives(){return A(h,p(s||t,h,a))}}}function p(s,t,n){const i=w(s,t);return n?i-P(s,t):Math.min(i,y(t))}function y(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.children(s).reduce((t,n)=>e.dimensions(n).width+t,0)}function P(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function w(s,t){return s&&(e.position(s).left+(e.isRtl?e.dimensions(s).width-e.dimensions(t).width:0))*(e.isRtl?-1:1)||0}function A(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(a=>{const r=w(a,s),h=r+Math.min(e.dimensions(a).width,n);return r>=t&&h<=i})}function u(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var $={mixins:[v,E,O],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:B},computed:{avgWidth(){return I(this.list)/this.length},finite(s){let{finite:t}=s;return t||Math.ceil(I(this.list))<Math.floor(e.dimensions(this.list).width+V(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let s=0;const t=y(this.list),n=e.findIndex(this.slides,i=>{if(s>=t)return!0;s+=e.dimensions(i).width});return~n?n:this.length-1},sets(s){let{sets:t}=s;if(!t)return;const n=e.dimensions(this.list).width/(this.center?2:1);let i=0,a=n,r=0;return t=e.sortBy(this.slides,"offsetLeft").reduce((h,g,c)=>{const l=e.dimensions(g).width;if(r+l>i&&(!this.center&&c>this.maxIndex&&(c=this.maxIndex),!e.includes(h,c))){const d=this.slides[c+1];this.center&&d&&l<a-e.dimensions(d).width/2?a-=l:(a=n,h.push(c),i=r+n+(this.center?l/2:0))}return r+=l,h},[]),!e.isEmpty(t)&&t},transitionOptions(){return{center:this.center,list:this.list}}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$("."+this.clsContainer,this.$el))},update:{write(){for(const n of this.navItems){const i=e.toNumber(e.data(n,this.attrItem));i!==!1&&(n.hidden=!this.maxIndex||i>this.maxIndex||this.sets&&!e.includes(this.sets,i))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1));const s=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)e.toggleClass(n,t,e.includes(s,n))},events:["resize"]},events:{beforeitemshow(s){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");s.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((a,r)=>e.css(a,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const a=this.getIndex(--i+s,s),r=this.slides[a];e.css(r,"order",a>s?-2:-1),n-=e.dimensions(r).width}},getValidIndex(s,t){if(s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),s=this.getIndex(s,t),!this.sets)return s;let n;do{if(e.includes(this.sets,s))return s;n=s,s=this.getIndex(s+this.dir,t)}while(s!==n);return s}}};function V(s){return Math.max(0,...e.children(s).map(t=>e.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",$),$});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],u):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitSlideshow_parallax=u(o.UIkit.util))})(this,function(o){"use strict";var u={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const e=B(this.media);return!e||window.matchMedia(e).matches}}};function B(e){if(o.isString(e)){if(e[0]==="@"){const t="breakpoint-"+e.substr(1);e=o.toFloat(o.getCssVar(t))}else if(isNaN(e))return e}return e&&!isNaN(e)?"(min-width: "+e+"px)":!1}o.memoize(async e=>e?o.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function V(e){return Math.ceil(Math.max(0,...o.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const b={x:y,y,rotate:y,scale:y,color:M,backgroundColor:M,borderColor:M,blur:d,hue:d,fopacity:d,grayscale:d,invert:d,saturate:d,sepia:d,opacity:H,stroke:L,bgx:$,bgy:$},{keys:w}=Object;var _={mixins:[u],props:W(w(b),"list"),data:W(w(b),void 0),computed:{props(e,t){return w(b).reduce((n,r)=>(o.isUndefined(e[r])||(n[r]=b[r](r,t,e[r].slice())),n),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){o.each(this.getCss(0),(e,t)=>o.css(this.$el,t,""))},getCss(e){return w(this.props).reduce((t,n)=>(this.props[n](t,e),t),{transform:"",filter:""})}}};function y(e,t,n){const r=P(n)||{x:"px",y:"px",rotate:"deg"}[e]||"";return(e==="x"||e==="y")&&(e="translate"+o.ucfirst(e)),n=n.map(o.toFloat),n.length===1&&n.unshift(e==="scale"?1:0),(a,c)=>{let s=m(n,c);o.startsWith(e,"translate")&&(s=o.toFloat(s).toFixed(r==="px"?0:6)),a.transform+=" "+e+"("+s+r+")"}}function M(e,t,n){return n.length===1&&n.unshift(g(t,e,"")),n=n.map(r=>q(t,r)),(r,a)=>{const[c,s,f]=T(n,a),C=c.map((i,l)=>(i+=f*(s[l]-i),l===3?o.toFloat(i):parseInt(i,10))).join(",");r[e]="rgba("+C+")"}}function q(e,t){return g(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(o.toFloat)}function d(e,t,n){n.length===1&&n.unshift(0);const r=P(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=n.map(o.toFloat),(a,c)=>{const s=m(n,c);a.filter+=" "+e+"("+(s+r)+")"}}function H(e,t,n){return n.length===1&&n.unshift(g(t,e,"")),n=n.map(o.toFloat),(r,a)=>{r[e]=m(n,a)}}function L(e,t,n){n.length===1&&n.unshift(0);const r=P(n);if(n=n.map(o.toFloat),!n.some(c=>c))return o.noop;const a=V(t);return o.css(t,"strokeDasharray",a),r==="%"&&(n=n.map(c=>c*a/100)),n=n.reverse(),(c,s)=>{c.strokeDashoffset=m(n,s)}}function $(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const r=e==="y"?"height":"width";n=n.map(c=>o.toPx(c,r,t));const a=g(t,"background-position-"+e,"");return g(t,"backgroundSize","")==="cover"?R(e,t,n,a,r):D(e,n,a)}function R(e,t,n,r,a){const c=E(t);if(!c.width)return o.noop;const s=Math.min(...n),f=Math.max(...n),C=n.indexOf(s)<n.indexOf(f),i=f-s;let l=(C?-i:0)-(C?s:f);const x={width:t.offsetWidth,height:t.offsetHeight},O=o.Dimensions.cover(c,x),I=O[a]-x[a];if(I<i)x[a]=O[a]+i-I;else if(I>i){const h=x[a]/o.toPx(r,a,t,!0);h&&(l-=(I-i)/h)}const z=o.Dimensions.cover(c,x),A=D(e,n,l+"px");return(h,G)=>{A(h,G),h.backgroundSize=z.width+"px "+z.height+"px",h.backgroundRepeat="no-repeat"}}function D(e,t,n){return function(r,a){r["background-position-"+e]="calc("+n+" + "+m(t,a)+"px)"}}const F={};function E(e){const t=o.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[t])return F[t];const n=new Image;return t&&(n.src=t,n.naturalWidth||(n.onload=()=>{F[t]=S(n),o.trigger(e,"bgimageload")})),F[t]=S(n)}function S(e){return{width:e.naturalWidth,height:e.naturalHeight}}function T(e,t){const n=e.length-1,r=Math.min(Math.floor(n*t),n-1);return e.slice(r,r+2).concat(t===1?1:t%(1/n)*n)}function m(e,t){const[n,r,a]=T(e,t);return o.isNumber(n)?n+Math.abs(n-r)*a*(n<r?1:-1):+r}function P(e,t){return e.reduce((n,r)=>n||o.isString(r)&&r.replace(/[\d-]/g,"").trim(),"")||t}function g(e,t,n){const r=e.style[t],a=o.css(o.css(e,t,n),t);return e.style[t]=r,a}function W(e,t){return e.reduce((n,r)=>(n[r]=t,n),{})}var j={mixins:[_],data:{selItem:"!li"},computed:{item(e,t){let{selItem:n}=e;return o.query(n,t)}},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:r,timing:a,dir:c}}=e;o.fastdom.read(()=>{const s=this.getCss(N(t,c,n)),f=this.getCss(v(t)?.5:c>0?1:0);o.fastdom.write(()=>{o.css(this.$el,s),o.Transition.start(this.$el,f,r,a).catch(o.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){o.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:r}}=e;o.fastdom.read(()=>{const a=this.getCss(N(t,r,n));o.fastdom.write(()=>o.css(this.$el,a))})}}]};function v(e){return o.endsWith(e,"in")}function N(e,t,n){return n/=2,v(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",j),j});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -602,20 +602,13 @@
|
|
|
602
602
|
},
|
|
603
603
|
|
|
604
604
|
_show(prev, next, force) {
|
|
605
|
-
this._transitioner = this._getTransitioner(
|
|
606
|
-
prev,
|
|
607
|
-
next,
|
|
608
|
-
this.dir,
|
|
609
|
-
uikitUtil.assign(
|
|
610
|
-
{
|
|
605
|
+
this._transitioner = this._getTransitioner(prev, next, this.dir, {
|
|
611
606
|
easing: force ?
|
|
612
607
|
next.offsetWidth < 600 ?
|
|
613
608
|
'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */ :
|
|
614
609
|
'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */ :
|
|
615
|
-
this.easing
|
|
616
|
-
|
|
617
|
-
this.transitionOptions));
|
|
618
|
-
|
|
610
|
+
this.easing,
|
|
611
|
+
...this.transitionOptions });
|
|
619
612
|
|
|
620
613
|
|
|
621
614
|
if (!force && !prev) {
|
|
@@ -680,7 +673,7 @@
|
|
|
680
673
|
|
|
681
674
|
computed: {
|
|
682
675
|
animation(_ref) {let { animation, Animations } = _ref;
|
|
683
|
-
return
|
|
676
|
+
return { ...(Animations[animation] || Animations.slide), name: animation };
|
|
684
677
|
},
|
|
685
678
|
|
|
686
679
|
transitionOptions() {
|
|
@@ -705,7 +698,8 @@
|
|
|
705
698
|
uikitUtil.removeClass(target, this.clsActive, this.clsActivated);
|
|
706
699
|
} } };
|
|
707
700
|
|
|
708
|
-
var Animations =
|
|
701
|
+
var Animations = {
|
|
702
|
+
...Animations$1,
|
|
709
703
|
fade: {
|
|
710
704
|
show() {
|
|
711
705
|
return [{ opacity: 0, zIndex: 0 }, { zIndex: -1 }];
|
|
@@ -794,7 +788,7 @@
|
|
|
794
788
|
{ transform: translate(-30 * percent), zIndex: -1 },
|
|
795
789
|
{ transform: translate(100 * (1 - percent)), zIndex: 0 }];
|
|
796
790
|
|
|
797
|
-
} } }
|
|
791
|
+
} } };
|
|
798
792
|
|
|
799
793
|
var SliderReactive = {
|
|
800
794
|
update: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.c7ed3c19b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},I={slide:{show(t){return[{transform:r(t*-100)},{transform:r()}]},percent(t){return v(t)},translate(t,e){return[{transform:r(e*-100*t)},{transform:r(e*100*(1-t))}]}}};function v(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function r(t,e){return t===void 0&&(t=0),e===void 0&&(e="%"),t+=t?e:"","translate3d("+t+", 0, 0)"}function w(t){return"scale3d("+t+", "+t+", 1)"}function y(t,e,n,i){let{animation:m,easing:d}=i;const{percent:a,translate:f,show:l=s.noop}=m,g=l(n),c=new s.Deferred;return{dir:n,show(h,o,M){o===void 0&&(o=0);const x=M?"linear":d;return h-=Math.round(h*s.clamp(o,-1,1)),this.translate(o),u(e,"itemin",{percent:o,duration:h,timing:x,dir:n}),u(t,"itemout",{percent:1-o,duration:h,timing:x,dir:n}),Promise.all([s.Transition.start(e,g[1],h,x),s.Transition.start(t,g[0],h,x)]).then(()=>{this.reset(),c.resolve()},s.noop),c.promise},cancel(){s.Transition.cancel([e,t])},reset(){for(const h in g[0])s.css([e,t],h,"")},forward(h,o){return o===void 0&&(o=this.percent()),s.Transition.cancel([e,t]),this.show(h,o,!0)},translate(h){this.reset();const o=f(h,n);s.css(e,o[1]),s.css(t,o[0]),u(e,"itemtranslatein",{percent:h,dir:n}),u(t,"itemtranslateout",{percent:1-h,dir:n})},percent(){return a(t||e,e,n)},getDistance(){return t==null?void 0:t.offsetWidth}}}function u(t,e,n){s.trigger(t,s.createEvent(e,!1,!1,n))}var z={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},_={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=n=>{const i=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,e(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(t){!this.draggable||!s.isTouch(t)&&A(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,m=Math.abs(e),d=this.getIndex(i+this.dir,i),a=this._getDistance(i,d)||n[i].offsetWidth;for(;d!==i&&m>a;)this.drag-=a*this.dir,i=d,m-=a,d=this.getIndex(i+this.dir,i),a=this._getDistance(i,d)||n[i].offsetWidth;this.percent=m/a;const f=n[i],l=n[d],g=this.index!==d,c=i===d;let h;[this.index,this.prevIndex].filter(o=>!s.includes([d,i],o)).forEach(o=>{s.trigger(n[o],"itemhidden",[this]),c&&(h=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||h)&&s.trigger(n[this.index],"itemshown",[this]),g&&(this.prevIndex=i,this.index=d,!c&&s.trigger(f,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),f,!c&&l),g&&(!c&&s.trigger(f,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function A(t){return!t.children.length&&t.childNodes.length}var N={data:{selNav:!1},computed:{nav(t,e){let{selNav:n}=t;return s.$(n,e)},selNavItem(t){let{attrItem:e}=t;return"["+e+"],[data-"+e+"]"},navItems(t,e){return s.$$(this.selNavItem,e)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((t,e)=>"<li "+this.attrItem+'="'+e+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(t){t.preventDefault(),this.show(s.data(t.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const n=s.data(e,this.attrItem);s.toggleClass(e,this.clsActive,s.toNumber(n)===t),s.toggleClass(e,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},S={mixins:[z,_,N],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(t,e){let{velocity:n}=t;return T(e.offsetWidth/n)},list(t,e){let{selList:n}=t;return s.$(n,e)},maxIndex(){return this.length-1},selSlides(t){let{selList:e,selSlides:n}=t;return e+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},events:{itemshown(){this.$update(this.list)}},methods:{show(t,e){if(e===void 0&&(e=!1),this.dragging||!this.length)return;const{stack:n}=this,i=e?0:n.length,m=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const d=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[d],f=this.getIndex(t,this.index),l=this.slides[f];if(a===l){m();return}if(this.dir=$(t,d),this.prevIndex=d,this.index=f,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,a])){this.index=this.prevIndex,m();return}const g=this._show(a,l,e).then(()=>(a&&s.trigger(a,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(c=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,c()})})));return a&&s.trigger(a,"itemhide",[this]),s.trigger(l,"itemshow",[this]),g},getIndex(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.index),s.clamp(s.getIndex(t,this.slides,e,this.finite),0,this.maxIndex)},getValidIndex(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.prevIndex),this.getIndex(t,e)},_show(t,e,n){if(this._transitioner=this._getTransitioner(t,e,this.dir,s.assign({easing:n?e.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing},this.transitionOptions)),!n&&!t)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate(t,e,n){e===void 0&&(e=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(e!==n?e:!1,n);return i.translate(t),i},_getTransitioner(t,e,n,i){return t===void 0&&(t=this.prevIndex),e===void 0&&(e=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,n*(s.isRtl?-1:1),i)}}};function $(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function T(t){return .5*t+300}var C={mixins:[S],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:I,Transitioner:y},computed:{animation(t){let{animation:e,Animations:n}=t;return s.assign(n[e]||n.slide,{name:e})},transitionOptions(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden"(t){let{target:e}=t;this.$update(e)},beforeitemshow(t){let{target:e}=t;s.addClass(e,this.clsActive)},itemshown(t){let{target:e}=t;s.addClass(e,this.clsActivated)},itemhidden(t){let{target:e}=t;s.removeClass(e,this.clsActive,this.clsActivated)}}},D=s.assign({},I,{fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:w(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:w(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:r(30),zIndex:-1},{transform:r(),zIndex:0}]:[{transform:r(-100),zIndex:0},{transform:r(),zIndex:-1}]},percent(t,e,n){return n<0?1-v(e):v(t)},translate(t,e){return e<0?[{transform:r(30*t),zIndex:-1},{transform:r(-100*(1-t)),zIndex:0}]:[{transform:r(-t*100),zIndex:0},{transform:r(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:r(100),zIndex:0},{transform:r(),zIndex:-1}]:[{transform:r(-30),zIndex:-1},{transform:r(),zIndex:0}]},percent(t,e,n){return n>0?1-v(e):v(t)},translate(t,e){return e<0?[{transform:r(t*100),zIndex:0},{transform:r(-30*(1-t)),zIndex:-1}]:[{transform:r(-30*t),zIndex:-1},{transform:r(100*(1-t)),zIndex:0}]}}}),H={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==t)&&this.show(t)},events:["resize"]}},b={mixins:[p,C,H],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:D},update:{read(){if(!this.list)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write(t){let{height:e}=t;e>0&&s.css(this.list,"minHeight",e)},events:["resize"]}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",b),b});
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},I={slide:{show(t){return[{transform:r(t*-100)},{transform:r()}]},percent(t){return v(t)},translate(t,e){return[{transform:r(e*-100*t)},{transform:r(e*100*(1-t))}]}}};function v(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function r(t,e){return t===void 0&&(t=0),e===void 0&&(e="%"),t+=t?e:"","translate3d("+t+", 0, 0)"}function w(t){return"scale3d("+t+", "+t+", 1)"}function y(t,e,n,i){let{animation:m,easing:d}=i;const{percent:a,translate:f,show:l=s.noop}=m,g=l(n),c=new s.Deferred;return{dir:n,show(h,o,M){o===void 0&&(o=0);const x=M?"linear":d;return h-=Math.round(h*s.clamp(o,-1,1)),this.translate(o),u(e,"itemin",{percent:o,duration:h,timing:x,dir:n}),u(t,"itemout",{percent:1-o,duration:h,timing:x,dir:n}),Promise.all([s.Transition.start(e,g[1],h,x),s.Transition.start(t,g[0],h,x)]).then(()=>{this.reset(),c.resolve()},s.noop),c.promise},cancel(){s.Transition.cancel([e,t])},reset(){for(const h in g[0])s.css([e,t],h,"")},forward(h,o){return o===void 0&&(o=this.percent()),s.Transition.cancel([e,t]),this.show(h,o,!0)},translate(h){this.reset();const o=f(h,n);s.css(e,o[1]),s.css(t,o[0]),u(e,"itemtranslatein",{percent:h,dir:n}),u(t,"itemtranslateout",{percent:1-h,dir:n})},percent(){return a(t||e,e,n)},getDistance(){return t==null?void 0:t.offsetWidth}}}function u(t,e,n){s.trigger(t,s.createEvent(e,!1,!1,n))}var z={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},_={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=n=>{const i=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,e(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(t){!this.draggable||!s.isTouch(t)&&A(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,m=Math.abs(e),d=this.getIndex(i+this.dir,i),a=this._getDistance(i,d)||n[i].offsetWidth;for(;d!==i&&m>a;)this.drag-=a*this.dir,i=d,m-=a,d=this.getIndex(i+this.dir,i),a=this._getDistance(i,d)||n[i].offsetWidth;this.percent=m/a;const f=n[i],l=n[d],g=this.index!==d,c=i===d;let h;[this.index,this.prevIndex].filter(o=>!s.includes([d,i],o)).forEach(o=>{s.trigger(n[o],"itemhidden",[this]),c&&(h=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||h)&&s.trigger(n[this.index],"itemshown",[this]),g&&(this.prevIndex=i,this.index=d,!c&&s.trigger(f,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),f,!c&&l),g&&(!c&&s.trigger(f,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function A(t){return!t.children.length&&t.childNodes.length}var N={data:{selNav:!1},computed:{nav(t,e){let{selNav:n}=t;return s.$(n,e)},selNavItem(t){let{attrItem:e}=t;return"["+e+"],[data-"+e+"]"},navItems(t,e){return s.$$(this.selNavItem,e)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((t,e)=>"<li "+this.attrItem+'="'+e+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(t){t.preventDefault(),this.show(s.data(t.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const n=s.data(e,this.attrItem);s.toggleClass(e,this.clsActive,s.toNumber(n)===t),s.toggleClass(e,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},S={mixins:[z,_,N],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(t,e){let{velocity:n}=t;return T(e.offsetWidth/n)},list(t,e){let{selList:n}=t;return s.$(n,e)},maxIndex(){return this.length-1},selSlides(t){let{selList:e,selSlides:n}=t;return e+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},events:{itemshown(){this.$update(this.list)}},methods:{show(t,e){if(e===void 0&&(e=!1),this.dragging||!this.length)return;const{stack:n}=this,i=e?0:n.length,m=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const d=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[d],f=this.getIndex(t,this.index),l=this.slides[f];if(a===l){m();return}if(this.dir=$(t,d),this.prevIndex=d,this.index=f,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,a])){this.index=this.prevIndex,m();return}const g=this._show(a,l,e).then(()=>(a&&s.trigger(a,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(c=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,c()})})));return a&&s.trigger(a,"itemhide",[this]),s.trigger(l,"itemshow",[this]),g},getIndex(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.index),s.clamp(s.getIndex(t,this.slides,e,this.finite),0,this.maxIndex)},getValidIndex(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.prevIndex),this.getIndex(t,e)},_show(t,e,n){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:n?e.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!t)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate(t,e,n){e===void 0&&(e=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(e!==n?e:!1,n);return i.translate(t),i},_getTransitioner(t,e,n,i){return t===void 0&&(t=this.prevIndex),e===void 0&&(e=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,n*(s.isRtl?-1:1),i)}}};function $(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function T(t){return .5*t+300}var C={mixins:[S],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:I,Transitioner:y},computed:{animation(t){let{animation:e,Animations:n}=t;return{...n[e]||n.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden"(t){let{target:e}=t;this.$update(e)},beforeitemshow(t){let{target:e}=t;s.addClass(e,this.clsActive)},itemshown(t){let{target:e}=t;s.addClass(e,this.clsActivated)},itemhidden(t){let{target:e}=t;s.removeClass(e,this.clsActive,this.clsActivated)}}},D={...I,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:w(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:w(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:r(30),zIndex:-1},{transform:r(),zIndex:0}]:[{transform:r(-100),zIndex:0},{transform:r(),zIndex:-1}]},percent(t,e,n){return n<0?1-v(e):v(t)},translate(t,e){return e<0?[{transform:r(30*t),zIndex:-1},{transform:r(-100*(1-t)),zIndex:0}]:[{transform:r(-t*100),zIndex:0},{transform:r(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:r(100),zIndex:0},{transform:r(),zIndex:-1}]:[{transform:r(-30),zIndex:-1},{transform:r(),zIndex:0}]},percent(t,e,n){return n>0?1-v(e):v(t)},translate(t,e){return e<0?[{transform:r(t*100),zIndex:0},{transform:r(-30*(1-t)),zIndex:-1}]:[{transform:r(-30*t),zIndex:-1},{transform:r(100*(1-t)),zIndex:0}]}}},H={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==t)&&this.show(t)},events:["resize"]}},b={mixins:[p,C,H],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:D},update:{read(){if(!this.list)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write(t){let{height:e}=t;e>0&&s.css(this.list,"minHeight",e)},events:["resize"]}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",b),b});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
|
|
229
229
|
// Reset to previous state
|
|
230
230
|
nodes.forEach((el, i) => propsFrom[i] && uikitUtil.css(el, propsFrom[i]));
|
|
231
|
-
uikitUtil.css(target,
|
|
231
|
+
uikitUtil.css(target, { display: 'block', ...targetProps });
|
|
232
232
|
|
|
233
233
|
// Start transitions on next frame
|
|
234
234
|
requestAnimationFrame(() => {
|
|
@@ -260,15 +260,13 @@
|
|
|
260
260
|
const zIndex = uikitUtil.css(el, 'zIndex');
|
|
261
261
|
|
|
262
262
|
return uikitUtil.isVisible(el) ?
|
|
263
|
-
uikitUtil.assign(
|
|
264
263
|
{
|
|
265
264
|
display: '',
|
|
266
265
|
opacity: opacity ? uikitUtil.css(el, 'opacity') : '0',
|
|
267
266
|
pointerEvents: 'none',
|
|
268
267
|
position: 'absolute',
|
|
269
|
-
zIndex: zIndex === 'auto' ? uikitUtil.index(el) : zIndex
|
|
270
|
-
|
|
271
|
-
getPositionWithMargin(el)) :
|
|
268
|
+
zIndex: zIndex === 'auto' ? uikitUtil.index(el) : zIndex,
|
|
269
|
+
...getPositionWithMargin(el) } :
|
|
272
270
|
|
|
273
271
|
false;
|
|
274
272
|
}
|
|
@@ -542,7 +540,7 @@
|
|
|
542
540
|
|
|
543
541
|
this.touched = new Set([this]);
|
|
544
542
|
this.placeholder = placeholder;
|
|
545
|
-
this.origin =
|
|
543
|
+
this.origin = { target, index: uikitUtil.index(placeholder), ...this.pos };
|
|
546
544
|
|
|
547
545
|
uikitUtil.on(document, uikitUtil.pointerMove, this.move);
|
|
548
546
|
uikitUtil.on(document, uikitUtil.pointerUp, this.end);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(n){return F(n,"top","bottom")}function F(n,s,o){const a=[[]];for(const r of n){if(!e.isVisible(r))continue;let c=v(r);for(let t=a.length-1;t>=0;t--){const h=a[t];if(!h[0]){h.push(r);break}let d;if(h[0].offsetParent===r.offsetParent?d=v(h[0]):(c=v(r,!0),d=v(h[0],!0)),c[s]>=d[o]-1&&c[s]!==d[s]){a.push([r]);break}if(c[o]-1>d[s]||c[s]===d[s]){h.push(r);break}if(t===0){a.unshift([r]);break}}}return a}function v(n,s){s===void 0&&(s=!1);let{offsetTop:o,offsetLeft:a,offsetHeight:r,offsetWidth:c}=n;return s&&([o,a]=e.offsetPosition(n)),{top:o,left:a,bottom:o+r,right:a+c}}const u="uk-transition-leave",w="uk-transition-enter";function y(n,s,o,a){a===void 0&&(a=0);const r=b(s,!0),c={opacity:1},t={opacity:0},h=f=>()=>r===b(s)?f():Promise.reject(),d=h(()=>(e.addClass(s,u),Promise.all(C(s).map((f,i)=>new Promise(m=>setTimeout(()=>e.Transition.start(f,t,o/2,"ease").then(m),i*a)))).then(()=>e.removeClass(s,u)))),p=h(()=>{const f=e.height(s);return e.addClass(s,w),n(),e.css(e.children(s),{opacity:0}),new Promise(i=>requestAnimationFrame(()=>{const m=e.children(s),l=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,f);const E=C(s);e.css(m,t);const B=E.map((j,O)=>new Promise(G=>setTimeout(()=>e.Transition.start(j,c,o/2,"ease").then(G),O*a)));f!==l&&B.push(e.Transition.start(s,{height:l},o/2+E.length*a,"ease")),Promise.all(B).then(()=>{e.removeClass(s,w),r===b(s)&&(e.css(s,{height:"",alignContent:""}),e.css(m,{opacity:""}),delete s.dataset.transition),i()})}))});return e.hasClass(s,u)?T(s).then(p):e.hasClass(s,w)?T(s).then(d).then(p):d().then(p)}function b(n,s){return s&&(n.dataset.transition=1+b(n)),e.toNumber(n.dataset.transition)||0}function T(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function C(n){return g(e.children(n)).reduce((s,o)=>s.concat(e.sortBy(o.filter(a=>e.isInView(a)),"offsetLeft")),[])}function R(n,s,o){return new Promise(a=>requestAnimationFrame(()=>{let r=e.children(s);const c=r.map(h=>P(h,!0)),t=e.css(s,["height","padding"]);e.Transition.cancel(s),r.forEach(e.Transition.cancel),S(s),n(),r=r.concat(e.children(s).filter(h=>!e.includes(r,h))),Promise.resolve().then(()=>{e.fastdom.flush();const h=e.css(s,["height","padding"]),[d,p]=L(s,r,c);r.forEach((f,i)=>p[i]&&e.css(f,p[i])),e.css(s,{display:"block",...t}),requestAnimationFrame(()=>{const f=r.map((i,m)=>e.parent(i)===s&&e.Transition.start(i,d[m],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));Promise.all(f).then(()=>{r.forEach((i,m)=>e.parent(i)===s&&e.css(i,"display",d[m].opacity===0?"none":"")),S(s)},e.noop).then(a)})})}))}function P(n,s){const o=e.css(n,"zIndex");return e.isVisible(n)?{display:"",opacity:s?e.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(n):o,...x(n)}:!1}function L(n,s,o){const a=s.map((c,t)=>e.parent(c)&&t in o?o[t]?e.isVisible(c)?x(c):{opacity:0}:{opacity:e.isVisible(c)?1:0}:!1),r=a.map((c,t)=>{const h=e.parent(s[t])===n&&(o[t]||P(s[t]));if(!h)return!1;if(!c)delete h.opacity;else if(!("opacity"in c)){const{opacity:d}=h;d%1?c.opacity=1:delete h.opacity}return h});return[a,r]}function S(n){e.css(n.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),e.css(n,{height:"",display:"",padding:""})}function x(n){const{height:s,width:o}=e.offset(n),{top:a,left:r}=e.position(n),{marginLeft:c,marginTop:t}=e.css(n,["marginTop","marginLeft"]);return{top:a,left:r,height:s,width:o,marginLeft:c,marginTop:t,transform:""}}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s){s===void 0&&(s=this.$el);const o=this.animation;return(o==="fade"?y:o==="delayed-fade"?function(){for(var r=arguments.length,c=new Array(r),t=0;t<r;t++)c[t]=arguments[t];return y(...c,40)}:o?R:()=>(n(),Promise.resolve()))(n,s,this.duration).then(()=>this.$update(s,"resize"),e.noop)}}},H={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},I={mixins:[H,z],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const n of["init","start","move","end"]){const s=this[n];this[n]=o=>{e.assign(this.pos,e.getEventPos(o)),s(o)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return e.children(this.target)},isEmpty:{get(){return e.isEmpty(this.items)},watch(n){e.toggleClass(this.target,this.clsEmpty,n)},immediate:!0},handles:{get(n,s){let{handle:o}=n;return o?e.$$(o,s):this.items},watch(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:a,offsetLeft:r},placeholder:c}=this;e.css(this.drag,{top:o-a,left:s-r});const t=this.getSortable(document.elementFromPoint(s,o));if(!t)return;const{items:h}=t;if(h.some(e.Transition.inProgress))return;const d=V(h,{x:s,y:o});if(h.length&&(!d||d===c))return;const p=this.getSortable(c),f=q(t.target,d,c,s,o,t===p&&n.moved!==d);f!==!1&&(f&&c===f||(t!==p?(p.remove(c),n.moved=d):delete n.moved,t.insert(c,f),this.touched.add(t)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:a}=n,[r]=this.items.filter(c=>e.within(s,c));!r||a||o>0||e.isInput(s)||e.within(s,"."+this.clsNoDrag)||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=r,this.origin={target:s,index:e.index(r),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(n))},start(n){this.drag=M(this.$container,this.placeholder);const{left:s,top:o}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-o}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),N(this.pos),this.move(n)},move(n){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(n)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;A();const n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:o}of this.touched)for(const a of this.touched)e.removeClass(a.items,s,o);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(n,s){e.addClass(this.items,this.clsItem);const o=()=>s?e.before(s,n):e.append(this.target,n);this.animate(o)},remove(n){!e.within(n,this.target)||this.animate(()=>e.remove(n))},getSortable(n){do{const s=this.$getComponent(n,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(n=e.parent(n))}}};let $;function N(n){let s=Date.now();$=setInterval(()=>{let{x:o,y:a}=n;a+=e.scrollTop(window);const r=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y),/auto|scroll/).reverse().some(c=>{let{scrollTop:t,scrollHeight:h}=c;const{top:d,bottom:p,height:f}=e.offset(e.getViewport(c));if(d<a&&d+35>a)t-=r;else if(p>a&&p-35<a)t+=r;else return;if(t>0&&t<h-f)return e.scrollTop(c,t),!0})},15)}function A(){clearInterval($)}function M(n,s){const o=e.append(n,s.outerHTML.replace(/(^<)(?:li|tr)|(?:li|tr)(\/>$)/g,"$1div$2"));return e.css(o,"margin","0","important"),e.css(o,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(o.firstElementChild,e.height(s.firstElementChild)),o}function V(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function q(n,s,o,a,r,c){if(!e.children(n).length)return;const t=s.getBoundingClientRect();if(!c)return W(n,o)||r<t.top+t.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=D([t.top,t.bottom],[h.top,h.bottom]),p=d?a:r,f=d?"width":"height",i=d?"left":"top",m=d?"right":"bottom",l=h[f]<t[f]?t[f]-h[f]:0;return h[i]<t[i]?l&&p<t[i]+l?!1:s.nextElementSibling:l&&p>t[m]-l?!1:s}function W(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const a=e.children(n),r=a.some((c,t)=>{const h=c.getBoundingClientRect();return a.slice(t+1).some(d=>{const p=d.getBoundingClientRect();return!D([h.left,h.right],[p.left,p.right])})});return o&&e.remove(s),r}function D(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",I),I});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.d8c101f07 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
show ?
|
|
176
176
|
uikitUtil.Transition.start(
|
|
177
177
|
el,
|
|
178
|
-
|
|
178
|
+
{ ...initProps, overflow: 'hidden', height: endHeight },
|
|
179
179
|
Math.round(duration * (1 - currentHeight / endHeight)),
|
|
180
180
|
transition) :
|
|
181
181
|
|