uikit 3.14.2-dev.f917389f5 → 3.14.3-dev.68d38eb6d
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/CHANGELOG.md +17 -1
- package/dist/css/uikit-core-rtl.css +48 -3
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +48 -3
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +52 -3
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +52 -3
- 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 +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +101 -17
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +101 -17
- 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 +70 -35
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +55 -35
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +55 -35
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +135 -39
- 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 +229 -105
- 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 +298 -139
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/parallax.js +15 -0
- package/src/js/core/accordion.js +3 -3
- package/src/js/core/alert.js +1 -1
- package/src/js/core/drop.js +40 -20
- package/src/js/core/height-viewport.js +14 -9
- package/src/js/core/navbar.js +19 -18
- package/src/js/core/scrollspy.js +4 -0
- package/src/js/core/toggle.js +5 -8
- package/src/js/mixin/parallax.js +54 -34
- package/src/js/mixin/position.js +44 -23
- package/src/js/mixin/togglable.js +105 -19
- package/src/js/util/animation.js +1 -0
- package/src/js/util/dom.js +4 -3
- package/src/js/util/viewport.js +1 -1
- package/src/less/components/drop.less +17 -4
- package/src/less/components/dropdown.less +19 -4
- package/src/less/components/margin.less +13 -14
- package/src/less/components/nav.less +1 -1
- package/src/less/components/navbar.less +32 -11
- package/src/less/components/position.less +1 -1
- package/src/less/components/sticky.less +7 -0
- package/src/less/components/utility.less +1 -2
- package/src/less/theme/dropdown.less +11 -0
- package/src/less/theme/navbar.less +7 -0
- package/src/scss/components/drop.scss +17 -4
- package/src/scss/components/dropdown.scss +19 -4
- package/src/scss/components/margin.scss +13 -14
- package/src/scss/components/nav.scss +1 -1
- package/src/scss/components/navbar.scss +21 -0
- package/src/scss/components/position.scss +1 -1
- package/src/scss/components/sticky.scss +7 -0
- package/src/scss/components/utility.scss +1 -2
- package/src/scss/mixins-theme.scss +8 -0
- package/src/scss/mixins.scss +2 -0
- package/src/scss/theme/dropdown.scss +8 -0
- package/src/scss/theme/navbar.scss +4 -0
- package/src/scss/variables-theme.scss +3 -0
- package/src/scss/variables.scss +1 -0
- package/tests/drop.html +145 -2
- package/tests/dropdown.html +228 -13
- package/tests/height-viewport.html +62 -0
- package/tests/navbar.html +321 -14
- package/tests/sticky-navbar.html +132 -0
- package/tests/sticky-parallax.html +2 -1
- package/tests/sticky.html +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.2-dev.f917389f5 | 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:w(e*-100)},{transform:w()}]},percent(e){return P(e)},translate(e,t){return[{transform:w(t*-100*e)},{transform:w(t*100*(1-e))}]}}};function P(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function w(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function b(e){return"scale3d("+e+", "+e+", 1)"}var I={...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:b(1-.2)},{opacity:1,transform:b(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:b(1-.2*e)},{opacity:e,transform:b(1-.2+.2*e)}]}}},$={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},E={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},C={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:"",boxShadow:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0,boxShadow:"none"}},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 h=s.isBoolean(t)?t:!this.isToggled(i);if(!s.trigger(i,"before"+(h?"show":"hide"),[this]))return Promise.reject();n||(s.Animation.cancel(i),s.Transition.cancel(i));const a=(s.isFunction(n)?n:n===!1||!this.hasAnimation?this._toggle:this.hasTransition?S(this):N(this))(i,h),d=h?this.clsEnter:this.clsLeave;s.addClass(i,d),s.trigger(i,h?"show":"hide",[this]);const r=()=>{s.removeClass(i,d),s.trigger(i,h?"shown":"hidden",[this]),this.$update(i)};return a?a.then(r,()=>(s.removeClass(i,d),Promise.reject())):r()})).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 S(e){let{isToggled:t,duration:n,velocity:o,initProps:i,hideProps:h,transition:a,_toggle:d}=e;return(r,l)=>{const m=s.Transition.inProgress(r),g=r.hasChildNodes()?s.toFloat(s.css(r.firstElementChild,"marginTop"))+s.toFloat(s.css(r.lastElementChild,"marginBottom")):0,c=s.isVisible(r)?s.height(r)+(m?0:g):0;s.Transition.cancel(r),t(r)||d(r,!0),s.height(r,""),s.fastdom.flush();const v=s.height(r)+(m?0:g);return n=o*r.offsetHeight+n,s.height(r,c),(l?s.Transition.start(r,{...i,overflow:"hidden",height:v},Math.round(n*(1-c/v)),a):s.Transition.start(r,h,Math.round(n*(c/v)),a).then(()=>d(r,!1))).then(()=>s.css(r,i))}}function N(e){return(t,n)=>{s.Animation.cancel(t);const{animation:o,duration:i,_toggle:h}=e;return n?(h(t,!0),s.Animation.in(t,o[0],i,e.origin)):s.Animation.out(t,o[1]||o[0],i,e.origin).then(()=>h(t,!1))}}const p=[];var D={mixins:[E,$,C],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:h,target:a}=o;!i&&h===s.pointerUp&&n===a&&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,T(this))},hide(){return this.toggleElement(this.$el,!1,T(this))}}};function T(e){let{transitionElement:t,_toggle:n}=e;return(o,i)=>new Promise((h,a)=>s.once(o,"show hide",()=>{o._reject==null||o._reject(),o._reject=a,n(o,i);const d=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",h,{self:!0}),clearTimeout(r)},{self:!0}),r=setTimeout(()=>{d(),h()},B(s.css(t,"transitionDuration")))})).then(()=>delete o._reject)}function B(e){return e?s.endsWith(e,"ms")?s.toFloat(e):s.toFloat(e)*1e3:0}function z(e,t,n,o){let{animation:i,easing:h}=o;const{percent:a,translate:d,show:r=s.noop}=i,l=r(n),m=new s.Deferred;return{dir:n,show(g,c,v){c===void 0&&(c=0);const y=v?"linear":h;return g-=Math.round(g*s.clamp(c,-1,1)),this.translate(c),x(t,"itemin",{percent:c,duration:g,timing:y,dir:n}),x(e,"itemout",{percent:1-c,duration:g,timing:y,dir:n}),Promise.all([s.Transition.start(t,l[1],g,y),s.Transition.start(e,l[0],g,y)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const g in l[0])s.css([t,e],g,"")},forward(g,c){return c===void 0&&(c=this.percent()),s.Transition.cancel([t,e]),this.show(g,c,!0)},translate(g){this.reset();const c=d(g,n);s.css(t,c[1]),s.css(e,c[0]),x(t,"itemtranslatein",{percent:g,dir:n}),x(e,"itemtranslateout",{percent:1-g,dir:n})},percent(){return a(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function x(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var M={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},j={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)}}},O={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)&&H(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),h=this.getIndex(o+this.dir,o),a=this._getDistance(o,h)||n[o].offsetWidth;for(;h!==o&&i>a;)this.drag-=a*this.dir,o=h,i-=a,h=this.getIndex(o+this.dir,o),a=this._getDistance(o,h)||n[o].offsetWidth;this.percent=i/a;const d=n[o],r=n[h],l=this.index!==h,m=o===h;let g;[this.index,this.prevIndex].filter(c=>!s.includes([h,o],c)).forEach(c=>{s.trigger(n[c],"itemhidden",[this]),m&&(g=!0,this.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||g)&&s.trigger(n[this.index],"itemshown",[this]),l&&(this.prevIndex=o,this.index=h,!m&&s.trigger(d,"beforeitemhide",[this]),s.trigger(r,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),d,!m&&r),l&&(!m&&s.trigger(d,"itemhide",[this]),s.trigger(r,"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 H(e){return!e.children.length&&e.childNodes.length}var L={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))}}}},W={mixins:[j,O,L,M],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 R(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}},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 h=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[h],d=this.getIndex(e,this.index),r=this.slides[d];if(a===r){i();return}if(this.dir=F(e,h),this.prevIndex=h,this.index=d,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(r,"beforeitemshow",[this,a])){this.index=this.prevIndex,i();return}const l=this._show(a,r,t).then(()=>(a&&s.trigger(a,"itemhidden",[this]),s.trigger(r,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return a&&s.trigger(a,"itemhide",[this]),s.trigger(r,"itemshow",[this]),l},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,{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 F(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function R(e){return .5*e+300}var q={mixins:[W],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:f,Transitioner:z},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{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)}}},V={mixins:[$,D,C,q],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:h,attrs:a={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let d;const r={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|jfif|a?png|gif|svg|webp)($|\?)/i))try{const{width:l,height:m}=await s.getImage(n,a.srcset,a.size);this.setItem(t,u("img",{src:n,width:l,height:m,alt:i,...a}))}catch{this.setError(t)}else if(o==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const l=u("video",{src:n,poster:h,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...a});s.on(l,"loadedmetadata",()=>{s.attr(l,{width:l.videoWidth,height:l.videoHeight}),this.setItem(t,l)}),s.on(l,"error",()=>this.setError(t))}else if(o==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,u("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...a}));else if(d=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,u("iframe",{src:"https://www.youtube"+(d[1]||"")+".com/embed/"+d[2]+(d[3]?"?"+d[3]:""),width:1920,height:1080,...r,...a}));else if(d=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:l,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,u("iframe",{src:"https://player.vimeo.com/video/"+d[1]+(d[2]?"?"+d[2]:""),width:m,height:l,...r,...a}))}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 A={install:Y,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(_),"source");if(s.isElement(e)){const{source:n}=_(e);e=s.findIndex(t,o=>{let{source:i}=o;return n===i})}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:t}),s.on(this.panel.$el,"hidden",()=>this.panel=!1),this.panel.show(e)},hide(){var e;return(e=this.panel)==null?void 0:e.hide()}}};function Y(e,t){e.lightboxPanel||e.component("lightboxPanel",V),s.assign(t.props,e.component("lightboxPanel").options.props)}function _(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",A),A});
|
|
1
|
+
/*! UIkit 3.14.3-dev.68d38eb6d | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],u):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox=u(s.UIkit.util))})(this,function(s){"use strict";var u={slide:{show(e){return[{transform:b(e*-100)},{transform:b()}]},percent(e){return S(e)},translate(e,t){return[{transform:b(t*-100*e)},{transform:b(t*100*(1-e))}]}}};function S(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function b(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function x(e){return"scale3d("+e+", "+e+", 1)"}var $={...u,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:x(1-.2)},{opacity:1,transform:x(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:x(1-.2*e)},{opacity:e,transform:x(1-.2+.2*e)}]}}},C={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},N={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},T={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",maxHeight:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:"",boxShadow:""},hideProps:{overflow:"hidden",maxHeight:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0,boxShadow:"none"}},computed:{hasAnimation(e){let{animation:t}=e;return!!t[0]},hasTransition(e){let{animation:t}=e;return s.startsWith(t[0],"slide")}},methods:{toggleElement(e,t,n){return new Promise(o=>Promise.all(s.toNodes(e).map(h=>{const i=s.isBoolean(t)?t:!this.isToggled(h);if(!s.trigger(h,"before"+(i?"show":"hide"),[this]))return Promise.reject();n||(s.Animation.cancel(h),s.Transition.cancel(h));const d=(s.isFunction(n)?n:n===!1||!this.hasAnimation?D(this):this.hasTransition?B(this):L(this))(h,i),r=i?this.clsEnter:this.clsLeave;s.addClass(h,r),s.trigger(h,i?"show":"hide",[this]);const a=()=>{s.removeClass(h,r),s.trigger(h,i?"shown":"hidden",[this]),this.$update(h)};return d?d.then(a,()=>(s.removeClass(h,r),Promise.reject())):a()})).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 D(e){let{_toggle:t}=e;return(n,o)=>(s.Animation.cancel(n),s.Transition.cancel(n),t(n,o))}function B(e){switch(e.animation[0]){case"slide-left":return P(e);case"slide-right":return P(e,!0)}return z(e)}function z(e){let{isToggled:t,duration:n,velocity:o,initProps:h,hideProps:i,transition:d,_toggle:r}=e;return(a,l)=>{const m=s.Transition.inProgress(a),g=!m&&a.hasChildNodes()?s.toFloat(s.css(a.firstElementChild,"marginTop"))+s.toFloat(s.css(a.lastElementChild,"marginBottom")):0,c=s.isVisible(a)?s.toFloat(s.css(a,"height"))+g:0,v=m?s.css(a,Object.keys(h)):l?i:h;s.Transition.cancel(a),t(a)||r(a,!0),s.css(a,"maxHeight",""),s.fastdom.flush();const p=s.toFloat(s.css(a,"height"))+g;return n=o*p+n,s.css(a,{...v,maxHeight:c}),(l?s.Transition.start(a,{...h,overflow:"hidden",maxHeight:p},n*(1-c/p),d):s.Transition.start(a,i,n*(c/p),d).then(()=>r(a,!1))).then(()=>s.css(a,h))}}function P(e,t){let{isToggled:n,duration:o,velocity:h,transition:i,_toggle:d}=e;return(r,a)=>{const l=s.isVisible(r),m=s.toFloat(s.css(r,"marginLeft"));s.Transition.cancel(r);const[g]=s.scrollParents(r);s.css(g,"overflowX","hidden"),n(r)||d(r,!0);const c=s.toFloat(s.css(r,"width"));o=h*c+o;const v=l?(c+m*(t?-1:1))/c*100:0,p=s.offset(r),I=t?p.right<g.clientWidth:Math.round(p.left)>0;return s.css(r,{clipPath:I?t?"polygon(0 0,"+v+"% 0,"+v+"% 100%,0 100%)":"polygon("+(100-v)+"% 0,100% 0,100% 100%,"+(100-v)+"% 100%)":"",marginLeft:(100-v)*(t?1:-1)/100*c}),(a?s.Transition.start(r,{clipPath:I?"polygon(0 0,100% 0,100% 100%,0 100%)":"",marginLeft:0},o*(1-v/100),i):s.Transition.start(r,{clipPath:I?t?"polygon(0 0,0 0,0 100%,0 100%)":"polygon(100% 0,100% 0,100% 100%,100% 100%)":"",marginLeft:(t?1:-1)*c},o*(v/100),i).then(()=>d(r,!1))).then(()=>{s.css(g,"overflowX",""),s.css(r,{clipPath:"",marginLeft:""})})}}function L(e){return(t,n)=>{s.Animation.cancel(t);const{animation:o,duration:h,_toggle:i}=e;return n?(i(t,!0),s.Animation.in(t,o[0],h,e.origin)):s.Animation.out(t,o[1]||o[0],h,e.origin).then(()=>i(t,!1))}}const f=[];var j={mixins:[N,C,T],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(f,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(f,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(f,this))return!1;!this.stack&&f.length?(Promise.all(f.map(t=>t.hide())).then(this.show),e.preventDefault()):f.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"))+f.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(f)!==this||this.overlay&&!s.within(n,this.$el)||s.within(n,this.panel)||s.once(document,s.pointerUp+" "+s.pointerCancel+" scroll",o=>{let{defaultPrevented:h,type:i,target:d}=o;!h&&i===s.pointerUp&&n===d&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",t=>{t.keyCode===27&&s.last(f)===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(f,this)&&f.splice(f.indexOf(this),1),f.length||s.css(document.body,"overflowY",""),s.css(this.$el,"zIndex",""),f.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,A(this))},hide(){return this.toggleElement(this.$el,!1,A(this))}}};function A(e){let{transitionElement:t,_toggle:n}=e;return(o,h)=>new Promise((i,d)=>s.once(o,"show hide",()=>{o._reject==null||o._reject(),o._reject=d,n(o,h);const r=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",i,{self:!0}),clearTimeout(a)},{self:!0}),a=setTimeout(()=>{r(),i()},O(s.css(t,"transitionDuration")))})).then(()=>delete o._reject)}function O(e){return e?s.endsWith(e,"ms")?s.toFloat(e):s.toFloat(e)*1e3:0}function H(e,t,n,o){let{animation:h,easing:i}=o;const{percent:d,translate:r,show:a=s.noop}=h,l=a(n),m=new s.Deferred;return{dir:n,show(g,c,v){c===void 0&&(c=0);const p=v?"linear":i;return g-=Math.round(g*s.clamp(c,-1,1)),this.translate(c),y(t,"itemin",{percent:c,duration:g,timing:p,dir:n}),y(e,"itemout",{percent:1-c,duration:g,timing:p,dir:n}),Promise.all([s.Transition.start(t,l[1],g,p),s.Transition.start(e,l[0],g,p)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const g in l[0])s.css([t,e],g,"")},forward(g,c){return c===void 0&&(c=this.percent()),s.Transition.cancel([t,e]),this.show(g,c,!0)},translate(g){this.reset();const c=r(g,n);s.css(t,c[1]),s.css(e,c[0]),y(t,"itemtranslatein",{percent:g,dir:n}),y(e,"itemtranslateout",{percent:1-g,dir:n})},percent(){return d(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function y(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var M={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},F={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)}}},W={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)&&R(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,h=Math.abs(t),i=this.getIndex(o+this.dir,o),d=this._getDistance(o,i)||n[o].offsetWidth;for(;i!==o&&h>d;)this.drag-=d*this.dir,o=i,h-=d,i=this.getIndex(o+this.dir,o),d=this._getDistance(o,i)||n[o].offsetWidth;this.percent=h/d;const r=n[o],a=n[i],l=this.index!==i,m=o===i;let g;[this.index,this.prevIndex].filter(c=>!s.includes([i,o],c)).forEach(c=>{s.trigger(n[c],"itemhidden",[this]),m&&(g=!0,this.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||g)&&s.trigger(n[this.index],"itemshown",[this]),l&&(this.prevIndex=o,this.index=i,!m&&s.trigger(r,"beforeitemhide",[this]),s.trigger(a,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),r,!m&&a),l&&(!m&&s.trigger(r,"itemhide",[this]),s.trigger(a,"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 R(e){return!e.children.length&&e.childNodes.length}var V={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))}}}},q={mixins:[F,W,V,M],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 Y(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}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,o=t?0:n.length,h=()=>{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 i=this.getIndex(this.index),d=s.hasClass(this.slides,this.clsActive)&&this.slides[i],r=this.getIndex(e,this.index),a=this.slides[r];if(d===a){h();return}if(this.dir=X(e,i),this.prevIndex=i,this.index=r,d&&!s.trigger(d,"beforeitemhide",[this])||!s.trigger(a,"beforeitemshow",[this,d])){this.index=this.prevIndex,h();return}const l=this._show(d,a,t).then(()=>(d&&s.trigger(d,"itemhidden",[this]),s.trigger(a,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return d&&s.trigger(d,"itemhide",[this]),s.trigger(a,"itemshow",[this]),l},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,{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 X(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function Y(e){return .5*e+300}var G={mixins:[q],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:u,Transitioner:H},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{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)}}},J={mixins:[C,j,T,G],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:$,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=$.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:h="",poster:i,attrs:d={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let r;const a={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|jfif|a?png|gif|svg|webp)($|\?)/i))try{const{width:l,height:m}=await s.getImage(n,d.srcset,d.size);this.setItem(t,w("img",{src:n,width:l,height:m,alt:h,...d}))}catch{this.setError(t)}else if(o==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const l=w("video",{src:n,poster:i,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...d});s.on(l,"loadedmetadata",()=>{s.attr(l,{width:l.videoWidth,height:l.videoHeight}),this.setItem(t,l)}),s.on(l,"error",()=>this.setError(t))}else if(o==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,w("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...d}));else if(r=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,w("iframe",{src:"https://www.youtube"+(r[1]||"")+".com/embed/"+r[2]+(r[3]?"?"+r[3]:""),width:1920,height:1080,...a,...d}));else if(r=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:l,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,w("iframe",{src:"https://player.vimeo.com/video/"+r[1]+(r[2]?"?"+r[2]:""),width:m,height:l,...a,...d}))}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 w(e,t){const n=s.fragment("<"+e+">");return s.attr(n,t),n}var _={install:K,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(E),"source");if(s.isElement(e)){const{source:n}=E(e);e=s.findIndex(t,o=>{let{source:h}=o;return n===h})}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:t}),s.on(this.panel.$el,"hidden",()=>this.panel=!1),this.panel.show(e)},hide(){var e;return(e=this.panel)==null?void 0:e.hide()}}};function K(e,t){e.lightboxPanel||e.component("lightboxPanel",J),s.assign(t.props,e.component("lightboxPanel").options.props)}function E(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",_),_});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.3-dev.68d38eb6d | 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.14.
|
|
1
|
+
/*! UIkit 3.14.3-dev.68d38eb6d | 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.14.
|
|
1
|
+
/*! UIkit 3.14.3-dev.68d38eb6d | 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')) :
|
|
@@ -149,12 +149,17 @@
|
|
|
149
149
|
|
|
150
150
|
computed: {
|
|
151
151
|
props(properties, $el) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
const stops = {};
|
|
153
|
+
for (const prop in properties) {
|
|
154
|
+
if (prop in props && !uikitUtil.isUndefined(properties[prop])) {
|
|
155
|
+
stops[prop] = properties[prop].slice();
|
|
155
156
|
}
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
}
|
|
158
|
+
const result = {};
|
|
159
|
+
for (const prop in stops) {
|
|
160
|
+
result[prop] = props[prop](prop, $el, stops[prop], stops);
|
|
161
|
+
}
|
|
162
|
+
return result;
|
|
158
163
|
} },
|
|
159
164
|
|
|
160
165
|
|
|
@@ -283,58 +288,66 @@
|
|
|
283
288
|
};
|
|
284
289
|
}
|
|
285
290
|
|
|
286
|
-
function backgroundFn(prop, el, stops) {
|
|
291
|
+
function backgroundFn(prop, el, stops, props) {
|
|
287
292
|
if (stops.length === 1) {
|
|
288
293
|
stops.unshift(0);
|
|
289
294
|
}
|
|
290
295
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
296
|
+
const attr = prop === 'bgy' ? 'height' : 'width';
|
|
297
|
+
props[prop] = parseStops(stops, (stop) => uikitUtil.toPx(stop, attr, el));
|
|
298
|
+
|
|
299
|
+
const bgProps = ['bgx', 'bgy'].filter((prop) => prop in props);
|
|
300
|
+
if (bgProps.length === 2 && prop === 'bgx') {
|
|
301
|
+
return uikitUtil.noop;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (getCssValue(el, 'backgroundSize', '') === 'cover') {
|
|
305
|
+
return backgroundCoverFn(prop, el, stops, props);
|
|
306
|
+
}
|
|
294
307
|
|
|
295
|
-
const
|
|
308
|
+
const positions = {};
|
|
309
|
+
for (const prop of bgProps) {
|
|
310
|
+
positions[prop] = getBackgroundPos(el, prop);
|
|
311
|
+
}
|
|
296
312
|
|
|
297
|
-
return
|
|
298
|
-
backgroundCoverFn(prop, el, stops, bgPos, attr) :
|
|
299
|
-
setBackgroundPosFn(prop, stops, bgPos);
|
|
313
|
+
return setBackgroundPosFn(bgProps, positions, props);
|
|
300
314
|
}
|
|
301
315
|
|
|
302
|
-
function backgroundCoverFn(prop, el, stops,
|
|
316
|
+
function backgroundCoverFn(prop, el, stops, props) {
|
|
303
317
|
const dimImage = getBackgroundImageDimensions(el);
|
|
304
318
|
|
|
305
319
|
if (!dimImage.width) {
|
|
306
320
|
return uikitUtil.noop;
|
|
307
321
|
}
|
|
308
322
|
|
|
309
|
-
const values = stops.map((_ref2) => {let [value] = _ref2;return value;});
|
|
310
|
-
const min = Math.min(...values);
|
|
311
|
-
const max = Math.max(...values);
|
|
312
|
-
const down = values.indexOf(min) < values.indexOf(max);
|
|
313
|
-
|
|
314
|
-
const diff = max - min;
|
|
315
|
-
let pos = (down ? -diff : 0) - (down ? min : max);
|
|
316
|
-
|
|
317
323
|
const dimEl = {
|
|
318
324
|
width: el.offsetWidth,
|
|
319
325
|
height: el.offsetHeight };
|
|
320
326
|
|
|
321
327
|
|
|
322
|
-
const
|
|
323
|
-
const span = baseDim[attr] - dimEl[attr];
|
|
328
|
+
const bgProps = ['bgx', 'bgy'].filter((prop) => prop in props);
|
|
324
329
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
const
|
|
330
|
+
const positions = {};
|
|
331
|
+
for (const prop of bgProps) {
|
|
332
|
+
const values = props[prop].map((_ref2) => {let [value] = _ref2;return value;});
|
|
333
|
+
const min = Math.min(...values);
|
|
334
|
+
const max = Math.max(...values);
|
|
335
|
+
const down = values.indexOf(min) < values.indexOf(max);
|
|
336
|
+
const diff = max - min;
|
|
329
337
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
338
|
+
positions[prop] = (down ? -diff : 0) - (down ? min : max) + "px";
|
|
339
|
+
dimEl[prop === 'bgy' ? 'height' : 'width'] += diff;
|
|
333
340
|
}
|
|
334
341
|
|
|
335
342
|
const dim = uikitUtil.Dimensions.cover(dimImage, dimEl);
|
|
336
343
|
|
|
337
|
-
const
|
|
344
|
+
for (const prop of bgProps) {
|
|
345
|
+
const attr = prop === 'bgy' ? 'height' : 'width';
|
|
346
|
+
const overflow = dim[attr] - dimEl[attr];
|
|
347
|
+
positions[prop] = "max(" + getBackgroundPos(el, prop) + ",-" + overflow + "px) + " + positions[prop];
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
const fn = setBackgroundPosFn(bgProps, positions, props);
|
|
338
351
|
return (css, percent) => {
|
|
339
352
|
fn(css, percent);
|
|
340
353
|
css.backgroundSize = dim.width + "px " + dim.height + "px";
|
|
@@ -342,9 +355,16 @@
|
|
|
342
355
|
};
|
|
343
356
|
}
|
|
344
357
|
|
|
345
|
-
function
|
|
358
|
+
function getBackgroundPos(el, prop) {
|
|
359
|
+
return getCssValue(el, "background-position-" + prop.substr(-1), '');
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
function setBackgroundPosFn(bgProps, positions, props) {
|
|
346
363
|
return function (css, percent) {
|
|
347
|
-
|
|
364
|
+
for (const prop of bgProps) {
|
|
365
|
+
const value = getValue(props[prop], percent);
|
|
366
|
+
css["background-position-" + prop.substr(-1)] = "calc(" + positions[prop] + " + " + value + "px)";
|
|
367
|
+
}
|
|
348
368
|
};
|
|
349
369
|
}
|
|
350
370
|
|
|
@@ -530,6 +550,21 @@
|
|
|
530
550
|
|
|
531
551
|
|
|
532
552
|
|
|
553
|
+
/*
|
|
554
|
+
* Inspired by https://gist.github.com/gre/1650294?permalink_comment_id=3477425#gistcomment-3477425
|
|
555
|
+
*
|
|
556
|
+
* linear: 0
|
|
557
|
+
* easeInSine: 0.5
|
|
558
|
+
* easeOutSine: -0.5
|
|
559
|
+
* easeInQuad: 1
|
|
560
|
+
* easeOutQuad: -1
|
|
561
|
+
* easeInCubic: 2
|
|
562
|
+
* easeOutCubic: -2
|
|
563
|
+
* easeInQuart: 3
|
|
564
|
+
* easeOutQuart: -3
|
|
565
|
+
* easeInQuint: 4
|
|
566
|
+
* easeOutQuint: -4
|
|
567
|
+
*/
|
|
533
568
|
function ease(percent, easing) {
|
|
534
569
|
return easing >= 0 ? Math.pow(percent, easing + 1) : 1 - Math.pow(1 - percent, 1 - easing);
|
|
535
570
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.3-dev.68d38eb6d | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],m):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitParallax=m(r.UIkit.util))})(this,function(r){"use strict";var m={connected(){var e;this.registerObserver(r.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},T={connected(){B(this._uid,()=>this.$emit("scroll"))},disconnected(){_(this._uid)}};const y=new Map;let b;function B(e,n){b=b||r.on(window,"scroll",()=>y.forEach(t=>t()),{passive:!0,capture:!0}),y.set(e,n)}function _(e){y.delete(e),b&&!y.size&&(b(),b=null)}var V={props:{media:Boolean},data:{media:!1},connected(){const e=q(this.media);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const n=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{n(),this.$emit("resize")}),n()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function q(e){if(r.isString(e)){if(r.startsWith(e,"@")){const n="breakpoint-"+e.substr(1);e=r.toFloat(r.getCssVar(n))}else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function H(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(n=>{try{return n.getTotalLength()}catch{return 0}})))}const p={x:M,y:M,rotate:M,scale:M,color:P,backgroundColor:P,borderColor:P,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:J,stroke:K,bgx:I,bgy:I},{keys:j}=Object;var A={mixins:[V],props:L(j(p),"list"),data:L(j(p),void 0),computed:{props(e,n){const t={};for(const s in e)s in p&&!r.isUndefined(e[s])&&(t[s]=e[s].slice());const o={};for(const s in t)o[s]=p[s](s,n,t[s],t);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const n={transform:"",filter:""};for(const t in this.props)this.props[t](n,e);return n}}};function M(e,n,t){let o=$(t)||{x:"px",y:"px",rotate:"deg"}[e]||"",s;return e==="x"||e==="y"?(e="translate"+r.ucfirst(e),s=a=>r.toFloat(r.toFloat(a).toFixed(o==="px"?0:6))):e==="scale"&&(o="",s=a=>$([a])?r.toPx(a,"width",n,!0)/n.offsetWidth:a),t.length===1&&t.unshift(e==="scale"?1:0),t=g(t,s),(a,i)=>{a.transform+=" "+e+"("+x(t,i)+o+")"}}function P(e,n,t){return t.length===1&&t.unshift(w(n,e,"")),t=g(t,o=>G(n,o)),(o,s)=>{const[a,i,c]=E(t,s),d=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]="rgba("+d+")"}}function G(e,n){return w(e,"color",n).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,n,t){t.length===1&&t.unshift(0);const o=$(t)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,t=g(t),(s,a)=>{const i=x(t,a);s.filter+=" "+e+"("+(i+o)+")"}}function J(e,n,t){return t.length===1&&t.unshift(w(n,e,"")),t=g(t),(o,s)=>{o[e]=x(t,s)}}function K(e,n,t){t.length===1&&t.unshift(0);const o=$(t),s=H(n);return t=g(t.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),t.some(a=>{let[i]=a;return i})?(r.css(n,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=x(t,i)}):r.noop}function I(e,n,t,o){t.length===1&&t.unshift(0);const s=e==="bgy"?"height":"width";o[e]=g(t,c=>r.toPx(c,s,n));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&e==="bgx")return r.noop;if(w(n,"backgroundSize","")==="cover")return Q(e,n,t,o);const i={};for(const c of a)i[c]=z(n,c);return C(a,i,o)}function Q(e,n,t,o){const s=X(n);if(!s.width)return r.noop;const a={width:n.offsetWidth,height:n.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const h=o[f].map(k=>{let[U]=k;return U}),v=Math.min(...h),S=Math.max(...h),D=h.indexOf(v)<h.indexOf(S),R=S-v;c[f]=(D?-R:0)-(D?v:S)+"px",a[f==="bgy"?"height":"width"]+=R}const d=r.Dimensions.cover(s,a);for(const f of i){const h=f==="bgy"?"height":"width",v=d[h]-a[h];c[f]="max("+z(n,f)+",-"+v+"px) + "+c[f]}const u=C(i,c,o);return(f,h)=>{u(f,h),f.backgroundSize=d.width+"px "+d.height+"px",f.backgroundRepeat="no-repeat"}}function z(e,n){return w(e,"background-position-"+n.substr(-1),"")}function C(e,n,t){return function(o,s){for(const a of e){const i=x(t[a],s);o["background-position-"+a.substr(-1)]="calc("+n[a]+" + "+i+"px)"}}}const F={};function X(e){const n=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[n])return F[n];const t=new Image;return n&&(t.src=n,!t.naturalWidth)?(t.onload=()=>{F[n]=O(t),r.trigger(e,r.createEvent("load",!1))},O(t)):F[n]=O(t)}function O(e){return{width:e.naturalWidth,height:e.naturalHeight}}function g(e,n){n===void 0&&(n=r.toFloat);const t=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(i=n(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&t.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(t.push([i,c]),c=1)),t.push([i,c]),c===null)s++;else if(s){const d=t[a-s-1][1],u=(c-d)/(s+1);for(let f=s;f>0;f--)t[a-f][1]=d+u*(s-f+1);s=0}}return t}function E(e,n){const t=r.findIndex(e.slice(1),o=>{let[,s]=o;return n<=s})+1;return[e[t-1][0],e[t][0],(n-e[t-1][1])/(e[t][1]-e[t-1][1])]}function x(e,n){const[t,o,s]=E(e,n);return r.isNumber(t)?t+Math.abs(t-o)*s*(t<o?1:-1):+o}const Y=/^-?\d+(\S*)/;function $(e,n){for(const t of e){const o=t.match==null?void 0:t.match(Y);if(o)return o[1]}return n}function w(e,n,t){const o=e.style[n],s=r.css(r.css(e,n,t),n);return e.style[n]=o,s}function L(e,n){return e.reduce((t,o)=>(t[o]=n,t),{})}var N={mixins:[A,m,T],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target(e,n){let{target:t}=e;return W(t&&r.query(t,n)||n)},start(e){let{start:n}=e;return r.toPx(n,"height",this.target,!0)},end(e){let{end:n,viewport:t}=e;return r.toPx(n||(t=(1-t)*100)&&t+"vh+"+t+"%","height",this.target,!0)}},update:{read(e,n){let{percent:t}=e;if(n.has("scroll")||(t=!1),!this.matchMedia)return;const o=t;return t=Z(r.scrolledOver(this.target,this.start,this.end),this.easing),{percent:t,style:o===t?!1:this.getCss(t)}},write(e){let{style:n}=e;if(!this.matchMedia){this.reset();return}n&&r.css(this.$el,n)},events:["scroll","resize"]}};function Z(e,n){return n>=0?Math.pow(e,n+1):1-Math.pow(1-e,1-n)}function W(e){return e?"offsetTop"in e?e:W(r.parent(e)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",N),N});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.3-dev.68d38eb6d | 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')) :
|
|
@@ -109,12 +109,17 @@
|
|
|
109
109
|
|
|
110
110
|
computed: {
|
|
111
111
|
props(properties, $el) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
const stops = {};
|
|
113
|
+
for (const prop in properties) {
|
|
114
|
+
if (prop in props && !uikitUtil.isUndefined(properties[prop])) {
|
|
115
|
+
stops[prop] = properties[prop].slice();
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
}
|
|
118
|
+
const result = {};
|
|
119
|
+
for (const prop in stops) {
|
|
120
|
+
result[prop] = props[prop](prop, $el, stops[prop], stops);
|
|
121
|
+
}
|
|
122
|
+
return result;
|
|
118
123
|
} },
|
|
119
124
|
|
|
120
125
|
|
|
@@ -243,58 +248,66 @@
|
|
|
243
248
|
};
|
|
244
249
|
}
|
|
245
250
|
|
|
246
|
-
function backgroundFn(prop, el, stops) {
|
|
251
|
+
function backgroundFn(prop, el, stops, props) {
|
|
247
252
|
if (stops.length === 1) {
|
|
248
253
|
stops.unshift(0);
|
|
249
254
|
}
|
|
250
255
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
256
|
+
const attr = prop === 'bgy' ? 'height' : 'width';
|
|
257
|
+
props[prop] = parseStops(stops, (stop) => uikitUtil.toPx(stop, attr, el));
|
|
258
|
+
|
|
259
|
+
const bgProps = ['bgx', 'bgy'].filter((prop) => prop in props);
|
|
260
|
+
if (bgProps.length === 2 && prop === 'bgx') {
|
|
261
|
+
return uikitUtil.noop;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (getCssValue(el, 'backgroundSize', '') === 'cover') {
|
|
265
|
+
return backgroundCoverFn(prop, el, stops, props);
|
|
266
|
+
}
|
|
254
267
|
|
|
255
|
-
const
|
|
268
|
+
const positions = {};
|
|
269
|
+
for (const prop of bgProps) {
|
|
270
|
+
positions[prop] = getBackgroundPos(el, prop);
|
|
271
|
+
}
|
|
256
272
|
|
|
257
|
-
return
|
|
258
|
-
backgroundCoverFn(prop, el, stops, bgPos, attr) :
|
|
259
|
-
setBackgroundPosFn(prop, stops, bgPos);
|
|
273
|
+
return setBackgroundPosFn(bgProps, positions, props);
|
|
260
274
|
}
|
|
261
275
|
|
|
262
|
-
function backgroundCoverFn(prop, el, stops,
|
|
276
|
+
function backgroundCoverFn(prop, el, stops, props) {
|
|
263
277
|
const dimImage = getBackgroundImageDimensions(el);
|
|
264
278
|
|
|
265
279
|
if (!dimImage.width) {
|
|
266
280
|
return uikitUtil.noop;
|
|
267
281
|
}
|
|
268
282
|
|
|
269
|
-
const values = stops.map((_ref2) => {let [value] = _ref2;return value;});
|
|
270
|
-
const min = Math.min(...values);
|
|
271
|
-
const max = Math.max(...values);
|
|
272
|
-
const down = values.indexOf(min) < values.indexOf(max);
|
|
273
|
-
|
|
274
|
-
const diff = max - min;
|
|
275
|
-
let pos = (down ? -diff : 0) - (down ? min : max);
|
|
276
|
-
|
|
277
283
|
const dimEl = {
|
|
278
284
|
width: el.offsetWidth,
|
|
279
285
|
height: el.offsetHeight };
|
|
280
286
|
|
|
281
287
|
|
|
282
|
-
const
|
|
283
|
-
const span = baseDim[attr] - dimEl[attr];
|
|
288
|
+
const bgProps = ['bgx', 'bgy'].filter((prop) => prop in props);
|
|
284
289
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const
|
|
290
|
+
const positions = {};
|
|
291
|
+
for (const prop of bgProps) {
|
|
292
|
+
const values = props[prop].map((_ref2) => {let [value] = _ref2;return value;});
|
|
293
|
+
const min = Math.min(...values);
|
|
294
|
+
const max = Math.max(...values);
|
|
295
|
+
const down = values.indexOf(min) < values.indexOf(max);
|
|
296
|
+
const diff = max - min;
|
|
289
297
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
298
|
+
positions[prop] = (down ? -diff : 0) - (down ? min : max) + "px";
|
|
299
|
+
dimEl[prop === 'bgy' ? 'height' : 'width'] += diff;
|
|
293
300
|
}
|
|
294
301
|
|
|
295
302
|
const dim = uikitUtil.Dimensions.cover(dimImage, dimEl);
|
|
296
303
|
|
|
297
|
-
const
|
|
304
|
+
for (const prop of bgProps) {
|
|
305
|
+
const attr = prop === 'bgy' ? 'height' : 'width';
|
|
306
|
+
const overflow = dim[attr] - dimEl[attr];
|
|
307
|
+
positions[prop] = "max(" + getBackgroundPos(el, prop) + ",-" + overflow + "px) + " + positions[prop];
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
const fn = setBackgroundPosFn(bgProps, positions, props);
|
|
298
311
|
return (css, percent) => {
|
|
299
312
|
fn(css, percent);
|
|
300
313
|
css.backgroundSize = dim.width + "px " + dim.height + "px";
|
|
@@ -302,9 +315,16 @@
|
|
|
302
315
|
};
|
|
303
316
|
}
|
|
304
317
|
|
|
305
|
-
function
|
|
318
|
+
function getBackgroundPos(el, prop) {
|
|
319
|
+
return getCssValue(el, "background-position-" + prop.substr(-1), '');
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function setBackgroundPosFn(bgProps, positions, props) {
|
|
306
323
|
return function (css, percent) {
|
|
307
|
-
|
|
324
|
+
for (const prop of bgProps) {
|
|
325
|
+
const value = getValue(props[prop], percent);
|
|
326
|
+
css["background-position-" + prop.substr(-1)] = "calc(" + positions[prop] + " + " + value + "px)";
|
|
327
|
+
}
|
|
308
328
|
};
|
|
309
329
|
}
|
|
310
330
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.3-dev.68d38eb6d | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlider_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=E(this.media);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function E(e){if(r.isString(e)){if(r.startsWith(e,"@")){const t="breakpoint-"+e.substr(1);e=r.toFloat(r.getCssVar(t))}else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function R(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const w={x:F,y:F,rotate:F,scale:F,color:I,backgroundColor:I,borderColor:I,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:q,stroke:H,bgx:j,bgy:j},{keys:$}=Object;var V={mixins:[g],props:W($(w),"list"),data:W($(w),void 0),computed:{props(e,t){const n={};for(const s in e)s in w&&!r.isUndefined(e[s])&&(n[s]=e[s].slice());const o={};for(const s in n)o[s]=w[s](s,t,n[s],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t}}};function F(e,t,n){let o=C(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",s;return e==="x"||e==="y"?(e="translate"+r.ucfirst(e),s=a=>r.toFloat(r.toFloat(a).toFixed(o==="px"?0:6))):e==="scale"&&(o="",s=a=>C([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=m(n,s),(a,i)=>{a.transform+=" "+e+"("+b(n,i)+o+")"}}function I(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n,o=>_(t,o)),(o,s)=>{const[a,i,c]=S(n,s),h=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]="rgba("+h+")"}}function _(e,t){return x(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=C(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=m(n),(s,a)=>{const i=b(n,a);s.filter+=" "+e+"("+(i+o)+")"}}function q(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n),(o,s)=>{o[e]=b(n,s)}}function H(e,t,n){n.length===1&&n.unshift(0);const o=C(n),s=R(t);return n=m(n.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),n.some(a=>{let[i]=a;return i})?(r.css(t,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=b(n,i)}):r.noop}function j(e,t,n,o){n.length===1&&n.unshift(0);const s=e==="bgy"?"height":"width";o[e]=m(n,c=>r.toPx(c,s,t));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&e==="bgx")return r.noop;if(x(t,"backgroundSize","")==="cover")return L(e,t,n,o);const i={};for(const c of a)i[c]=p(t,c);return O(a,i,o)}function L(e,t,n,o){const s=A(t);if(!s.width)return r.noop;const a={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const d=o[f].map(J=>{let[K]=J;return K}),y=Math.min(...d),P=Math.max(...d),B=d.indexOf(y)<d.indexOf(P),N=P-y;c[f]=(B?-N:0)-(B?y:P)+"px",a[f==="bgy"?"height":"width"]+=N}const h=r.Dimensions.cover(s,a);for(const f of i){const d=f==="bgy"?"height":"width",y=h[d]-a[d];c[f]="max("+p(t,f)+",-"+y+"px) + "+c[f]}const u=O(i,c,o);return(f,d)=>{u(f,d),f.backgroundSize=h.width+"px "+h.height+"px",f.backgroundRepeat="no-repeat"}}function p(e,t){return x(e,"background-position-"+t.substr(-1),"")}function O(e,t,n){return function(o,s){for(const a of e){const i=b(n[a],s);o["background-position-"+a.substr(-1)]="calc("+t[a]+" + "+i+"px)"}}}const v={};function A(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(v[t])return v[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{v[t]=M(n),r.trigger(e,r.createEvent("load",!1))},M(n)):v[t]=M(n)}function M(e){return{width:e.naturalWidth,height:e.naturalHeight}}function m(e,t){t===void 0&&(t=r.toFloat);const n=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(i=t(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&n.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(n.push([i,c]),c=1)),n.push([i,c]),c===null)s++;else if(s){const h=n[a-s-1][1],u=(c-h)/(s+1);for(let f=s;f>0;f--)n[a-f][1]=h+u*(s-f+1);s=0}}return n}function S(e,t){const n=r.findIndex(e.slice(1),o=>{let[,s]=o;return t<=s})+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function b(e,t){const[n,o,s]=S(e,t);return r.isNumber(n)?n+Math.abs(n-o)*s*(n<o?1:-1):+o}const G=/^-?\d+(\S*)/;function C(e,t){for(const n of e){const o=n.match==null?void 0:n.match(G);if(o)return o[1]}return t}function x(e,t,n){const o=e.style[t],s=r.css(r.css(e,t,n),t);return e.style[t]=o,s}function W(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var T={mixins:[V],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:o,timing:s,dir:a}}=e;r.fastdom.read(()=>{const i=this.getCss(z(t,a,n)),c=this.getCss(D(t)?.5:a>0?1:0);r.fastdom.write(()=>{r.css(this.$el,i),r.Transition.start(this.$el,c,o,s).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:o}}=e;r.fastdom.read(()=>{const s=this.getCss(z(t,o,n));r.fastdom.write(()=>r.css(this.$el,s))})}}]};function D(e){return r.endsWith(e,"in")}function z(e,t,n){return n/=2,D(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",T),T});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.
|
|
1
|
+
/*! UIkit 3.14.3-dev.68d38eb6d | 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')) :
|