uikit 3.11.2-dev.2b60845fb → 3.11.2-dev.2f4ac8e16

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.
Files changed (130) hide show
  1. package/CHANGELOG.md +32 -18
  2. package/dist/css/uikit-core-rtl.css +80 -186
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +80 -186
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +82 -192
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +82 -192
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +6 -8
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +26 -55
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +27 -57
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +85 -68
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +85 -68
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +60 -12
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +85 -68
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +52 -16
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +5 -7
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +2 -2
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +215 -220
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +397 -355
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/component.js +2 -11
  44. package/src/js/api/hooks.js +1 -1
  45. package/src/js/api/state.js +1 -1
  46. package/src/js/components/filter.js +2 -3
  47. package/src/js/components/internal/lightbox-animations.js +4 -3
  48. package/src/js/components/internal/slider-preload.js +37 -0
  49. package/src/js/components/internal/slideshow-animations.js +4 -3
  50. package/src/js/components/lightbox-panel.js +34 -58
  51. package/src/js/components/lightbox.js +1 -2
  52. package/src/js/components/slider.js +21 -1
  53. package/src/js/components/slideshow.js +8 -1
  54. package/src/js/components/sortable.js +1 -1
  55. package/src/js/core/alert.js +1 -2
  56. package/src/js/core/img.js +129 -114
  57. package/src/js/core/modal.js +1 -2
  58. package/src/js/core/navbar.js +3 -3
  59. package/src/js/core/sticky.js +1 -1
  60. package/src/js/core/svg.js +10 -6
  61. package/src/js/core/toggle.js +2 -1
  62. package/src/js/mixin/internal/animate-slide.js +9 -12
  63. package/src/js/mixin/parallax.js +85 -68
  64. package/src/js/mixin/slider.js +8 -16
  65. package/src/js/mixin/slideshow.js +2 -2
  66. package/src/js/mixin/togglable.js +1 -2
  67. package/src/js/util/ajax.js +9 -12
  68. package/src/js/util/animation.js +7 -12
  69. package/src/js/util/dom.js +27 -30
  70. package/src/js/util/lang.js +7 -6
  71. package/src/js/util/options.js +2 -11
  72. package/src/js/util/player.js +5 -4
  73. package/src/js/util/selector.js +12 -18
  74. package/src/js/util/style.js +4 -4
  75. package/src/less/components/base.less +10 -33
  76. package/src/less/components/form-range.less +52 -97
  77. package/src/less/components/form.less +0 -1
  78. package/src/less/components/leader.less +0 -1
  79. package/src/less/components/lightbox.less +0 -1
  80. package/src/less/components/modal.less +3 -7
  81. package/src/less/components/progress.less +14 -36
  82. package/src/less/components/slider.less +0 -3
  83. package/src/less/components/slideshow.less +0 -3
  84. package/src/less/components/text.less +16 -32
  85. package/src/scss/components/base.scss +10 -33
  86. package/src/scss/components/form-range.scss +52 -97
  87. package/src/scss/components/form.scss +0 -1
  88. package/src/scss/components/leader.scss +0 -1
  89. package/src/scss/components/lightbox.scss +0 -1
  90. package/src/scss/components/modal.scss +3 -7
  91. package/src/scss/components/progress.scss +14 -36
  92. package/src/scss/components/slider.scss +0 -3
  93. package/src/scss/components/slideshow.scss +0 -3
  94. package/src/scss/components/text.scss +16 -32
  95. package/src/scss/mixins-theme.scss +1 -1
  96. package/src/scss/mixins.scss +1 -1
  97. package/src/scss/variables-theme.scss +3 -3
  98. package/src/scss/variables.scss +3 -3
  99. package/tests/align.html +10 -10
  100. package/tests/animation.html +2 -2
  101. package/tests/article.html +2 -2
  102. package/tests/base.html +3 -3
  103. package/tests/card.html +10 -10
  104. package/tests/column.html +3 -3
  105. package/tests/comment.html +9 -9
  106. package/tests/dotnav.html +3 -3
  107. package/tests/image.html +296 -64
  108. package/tests/images/image-type.avif +0 -0
  109. package/tests/images/image-type.jpeg +0 -0
  110. package/tests/images/image-type.webp +0 -0
  111. package/tests/index.html +8 -8
  112. package/tests/lightbox.html +10 -10
  113. package/tests/marker.html +2 -2
  114. package/tests/modal.html +8 -9
  115. package/tests/navbar.html +2 -2
  116. package/tests/overlay.html +7 -7
  117. package/tests/parallax.html +14 -5
  118. package/tests/position.html +12 -12
  119. package/tests/slidenav.html +12 -12
  120. package/tests/slider.html +20 -20
  121. package/tests/sortable.html +1 -1
  122. package/tests/sticky-parallax.html +47 -62
  123. package/tests/svg.html +6 -6
  124. package/tests/table.html +11 -11
  125. package/tests/thumbnav.html +12 -12
  126. package/tests/transition.html +30 -30
  127. package/tests/utility.html +33 -33
  128. package/tests/video.html +1 -1
  129. package/tests/width.html +1 -1
  130. package/tests/images/animated.gif +0 -0
@@ -1 +1 @@
1
- /*! UIkit 3.11.2-dev.2b60845fb | 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.2f4ac8e16 | 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.2b60845fb | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.2f4ac8e16 | 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.2b60845fb | 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
+ /*! UIkit 3.11.2-dev.2f4ac8e16 | 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.2b60845fb | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.2f4ac8e16 | 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')) :
@@ -127,39 +127,35 @@
127
127
 
128
128
 
129
129
 
130
- function transformFn(prop, el, steps) {
131
- const unit = getUnit(steps) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
130
+ function transformFn(prop, el, stops) {
131
+ const unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
132
+ let transformFn;
132
133
 
133
134
  if (prop === 'x' || prop === 'y') {
134
135
  prop = "translate" + uikitUtil.ucfirst(prop);
136
+ transformFn = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
135
137
  }
136
138
 
137
- steps = steps.map(uikitUtil.toFloat);
138
-
139
- if (steps.length === 1) {
140
- steps.unshift(prop === 'scale' ? 1 : 0);
139
+ if (stops.length === 1) {
140
+ stops.unshift(prop === 'scale' ? 1 : 0);
141
141
  }
142
142
 
143
- return (css, percent) => {
144
- let value = getValue(steps, percent);
143
+ stops = parseStops(stops, transformFn);
145
144
 
146
- if (uikitUtil.startsWith(prop, 'translate')) {
147
- value = uikitUtil.toFloat(value).toFixed(unit === 'px' ? 0 : 6);
148
- }
149
-
150
- css.transform += " " + prop + "(" + value + unit + ")";
145
+ return (css, percent) => {
146
+ css.transform += " " + prop + "(" + getValue(stops, percent) + unit + ")";
151
147
  };
152
148
  }
153
149
 
154
- function colorFn(prop, el, steps) {
155
- if (steps.length === 1) {
156
- steps.unshift(getCssValue(el, prop, ''));
150
+ function colorFn(prop, el, stops) {
151
+ if (stops.length === 1) {
152
+ stops.unshift(getCssValue(el, prop, ''));
157
153
  }
158
154
 
159
- steps = steps.map((step) => parseColor(el, step));
155
+ stops = parseStops(stops, (stop) => parseColor(el, stop));
160
156
 
161
157
  return (css, percent) => {
162
- const [start, end, p] = getStep(steps, percent);
158
+ const [start, end, p] = getStop(stops, percent);
163
159
  const value = start.
164
160
  map((value, i) => {
165
161
  value += p * (end[i] - value);
@@ -179,85 +175,83 @@
179
175
  map(uikitUtil.toFloat);
180
176
  }
181
177
 
182
- function filterFn(prop, el, steps) {
183
- if (steps.length === 1) {
184
- steps.unshift(0);
178
+ function filterFn(prop, el, stops) {
179
+ if (stops.length === 1) {
180
+ stops.unshift(0);
185
181
  }
186
182
 
187
- const unit = getUnit(steps) || { blur: 'px', hue: 'deg' }[prop] || '%';
183
+ const unit = getUnit(stops) || { blur: 'px', hue: 'deg' }[prop] || '%';
188
184
  prop = { fopacity: 'opacity', hue: 'hue-rotate' }[prop] || prop;
189
- steps = steps.map(uikitUtil.toFloat);
185
+ stops = parseStops(stops);
190
186
 
191
187
  return (css, percent) => {
192
- const value = getValue(steps, percent);
188
+ const value = getValue(stops, percent);
193
189
  css.filter += " " + prop + "(" + (value + unit) + ")";
194
190
  };
195
191
  }
196
192
 
197
- function cssPropFn(prop, el, steps) {
198
- if (steps.length === 1) {
199
- steps.unshift(getCssValue(el, prop, ''));
193
+ function cssPropFn(prop, el, stops) {
194
+ if (stops.length === 1) {
195
+ stops.unshift(getCssValue(el, prop, ''));
200
196
  }
201
197
 
202
- steps = steps.map(uikitUtil.toFloat);
198
+ stops = parseStops(stops);
203
199
 
204
200
  return (css, percent) => {
205
- css[prop] = getValue(steps, percent);
201
+ css[prop] = getValue(stops, percent);
206
202
  };
207
203
  }
208
204
 
209
- function strokeFn(prop, el, steps) {
210
- if (steps.length === 1) {
211
- steps.unshift(0);
205
+ function strokeFn(prop, el, stops) {
206
+ if (stops.length === 1) {
207
+ stops.unshift(0);
212
208
  }
213
209
 
214
- const unit = getUnit(steps);
215
- steps = steps.map(uikitUtil.toFloat);
210
+ const unit = getUnit(stops);
211
+ const length = getMaxPathLength(el);
212
+ stops = parseStops(stops.reverse(), (stop) => {
213
+ stop = uikitUtil.toFloat(stop);
214
+ return unit === '%' ? stop * length / 100 : stop;
215
+ });
216
216
 
217
- if (!steps.some((step) => step)) {
217
+ if (!stops.some((_ref) => {let [value] = _ref;return value;})) {
218
218
  return uikitUtil.noop;
219
219
  }
220
220
 
221
- const length = getMaxPathLength(el);
222
221
  uikitUtil.css(el, 'strokeDasharray', length);
223
222
 
224
- if (unit === '%') {
225
- steps = steps.map((step) => step * length / 100);
226
- }
227
-
228
- steps = steps.reverse();
229
-
230
223
  return (css, percent) => {
231
- css.strokeDashoffset = getValue(steps, percent);
224
+ css.strokeDashoffset = getValue(stops, percent);
232
225
  };
233
226
  }
234
227
 
235
- function backgroundFn(prop, el, steps) {
236
- if (steps.length === 1) {
237
- steps.unshift(0);
228
+ function backgroundFn(prop, el, stops) {
229
+ if (stops.length === 1) {
230
+ stops.unshift(0);
238
231
  }
239
232
 
240
233
  prop = prop.substr(-1);
241
234
  const attr = prop === 'y' ? 'height' : 'width';
242
- steps = steps.map((step) => uikitUtil.toPx(step, attr, el));
235
+ stops = parseStops(stops, (stop) => uikitUtil.toPx(stop, attr, el));
243
236
 
244
237
  const bgPos = getCssValue(el, "background-position-" + prop, '');
245
238
 
246
239
  return getCssValue(el, 'backgroundSize', '') === 'cover' ?
247
- backgroundCoverFn(prop, el, steps, bgPos, attr) :
248
- setBackgroundPosFn(prop, steps, bgPos);
240
+ backgroundCoverFn(prop, el, stops, bgPos, attr) :
241
+ setBackgroundPosFn(prop, stops, bgPos);
249
242
  }
250
243
 
251
- function backgroundCoverFn(prop, el, steps, bgPos, attr) {
244
+ function backgroundCoverFn(prop, el, stops, bgPos, attr) {
252
245
  const dimImage = getBackgroundImageDimensions(el);
253
246
 
254
247
  if (!dimImage.width) {
255
248
  return uikitUtil.noop;
256
249
  }
257
250
 
258
- const min = Math.min(...steps);
259
- const max = Math.max(...steps);
260
- const down = steps.indexOf(min) < steps.indexOf(max);
251
+ const values = stops.map((_ref2) => {let [value] = _ref2;return value;});
252
+ const min = Math.min(...values);
253
+ const max = Math.max(...values);
254
+ const down = values.indexOf(min) < values.indexOf(max);
261
255
 
262
256
  const diff = max - min;
263
257
  let pos = (down ? -diff : 0) - (down ? min : max);
@@ -282,7 +276,7 @@
282
276
 
283
277
  const dim = uikitUtil.Dimensions.cover(dimImage, dimEl);
284
278
 
285
- const fn = setBackgroundPosFn(prop, steps, pos + "px");
279
+ const fn = setBackgroundPosFn(prop, stops, pos + "px");
286
280
  return (css, percent) => {
287
281
  fn(css, percent);
288
282
  css.backgroundSize = dim.width + "px " + dim.height + "px";
@@ -290,9 +284,9 @@
290
284
  };
291
285
  }
292
286
 
293
- function setBackgroundPosFn(prop, steps, pos) {
287
+ function setBackgroundPosFn(prop, stops, pos) {
294
288
  return function (css, percent) {
295
- css["background-position-" + prop] = "calc(" + pos + " + " + getValue(steps, percent) + "px)";
289
+ css["background-position-" + prop] = "calc(" + pos + " + " + getValue(stops, percent) + "px)";
296
290
  };
297
291
  }
298
292
 
@@ -326,24 +320,47 @@
326
320
 
327
321
  }
328
322
 
329
- function getStep(steps, percent) {
330
- const count = steps.length - 1;
331
- const index = Math.min(Math.floor(count * percent), count - 1);
323
+ function parseStops(stops, fn) {if (fn === void 0) {fn = uikitUtil.toFloat;}
324
+ const result = [];
325
+ for (const stop of stops) {
326
+ const [value, percent] = uikitUtil.isString(stop) ? stop.trim().split(' ') : [stop];
327
+ result.push([fn(value), percent ? uikitUtil.toFloat(percent) / 100 : null]);
328
+ }
329
+
330
+ const { length } = result;
331
+ result[0][1] = 0;
332
+ result[length - 1][1] = 1;
333
+ for (let i = 1; i < length - 1; i++) {
334
+ if (result[i] === null) {
335
+ const nextIndex = uikitUtil.findIndex(result.slice(i + 1), (_ref3) => {let [, percent] = _ref3;return percent !== null;}) + 1;
336
+ const percent = (result[i + nextIndex] - result[i - 1][1]) / (nextIndex + 1);
337
+ for (let j = 0; j < nextIndex; j++) {
338
+ result[i + j][1] = percent * j + 1;
339
+ }
340
+ }
341
+ }
342
+
343
+ return result;
344
+ }
345
+
346
+ function getStop(stops, percent) {
347
+ const index = uikitUtil.findIndex(stops.slice(1), (_ref4) => {let [, targetPercent] = _ref4;return percent <= targetPercent;}) + 1;
348
+ return [
349
+ stops[index - 1][0],
350
+ stops[index][0],
351
+ (percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])];
332
352
 
333
- return steps.
334
- slice(index, index + 2).
335
- concat(percent === 1 ? 1 : percent % (1 / count) * count);
336
353
  }
337
354
 
338
- function getValue(steps, percent) {
339
- const [start, end, p] = getStep(steps, percent);
355
+ function getValue(stops, percent) {
356
+ const [start, end, p] = getStop(stops, percent);
340
357
  return uikitUtil.isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
341
358
  }
342
359
 
343
- function getUnit(steps, defaultUnit) {
360
+ function getUnit(stops, defaultUnit) {
344
361
  return (
345
- steps.reduce(
346
- (unit, step) => unit || uikitUtil.isString(step) && step.replace(/[\d-]/g, '').trim(),
362
+ stops.reduce(
363
+ (unit, stop) => unit || uikitUtil.isString(stop) && stop.replace(/[\d-]/g, '').trim(),
347
364
  '') ||
348
365
  defaultUnit);
349
366
 
@@ -1 +1 @@
1
- /*! UIkit 3.11.2-dev.2b60845fb | 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
+ /*! UIkit 3.11.2-dev.2f4ac8e16 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],l):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitParallax=l(r.UIkit.util))})(this,function(r){"use strict";var l={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const e=V(this.media);return!e||window.matchMedia(e).matches}}};function V(e){if(r.isString(e)){if(e[0]==="@"){const t="breakpoint-"+e.substr(1);e=r.toFloat(r.getCssVar(t))}else if(isNaN(e))return e}return e&&!isNaN(e)?"(min-width: "+e+"px)":!1}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function q(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const y={x:v,y:v,rotate:v,scale:v,color:P,backgroundColor:P,borderColor:P,blur:d,hue:d,fopacity:d,grayscale:d,invert:d,saturate:d,sepia:d,opacity:R,stroke:_,bgx:D,bgy:D},{keys:F}=Object;var H={mixins:[l],props:$(F(y),"list"),data:$(F(y),void 0),computed:{props(e,t){return F(y).reduce((n,a)=>(r.isUndefined(e[a])||(n[a]=y[a](a,t,e[a].slice())),n),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){r.each(this.getCss(0),(e,t)=>r.css(this.$el,t,""))},getCss(e){return F(this.props).reduce((t,n)=>(this.props[n](t,e),t),{transform:"",filter:""})}}};function v(e,t,n){const a=C(n)||{x:"px",y:"px",rotate:"deg"}[e]||"";let o;return(e==="x"||e==="y")&&(e="translate"+r.ucfirst(e),o=c=>r.toFloat(r.toFloat(c).toFixed(a==="px"?0:6))),n.length===1&&n.unshift(e==="scale"?1:0),n=m(n,o),(c,s)=>{c.transform+=" "+e+"("+x(n,s)+a+")"}}function P(e,t,n){return n.length===1&&n.unshift(b(t,e,"")),n=m(n,a=>L(t,a)),(a,o)=>{const[c,s,i]=O(n,o),h=c.map((g,f)=>(g+=i*(s[f]-g),f===3?r.toFloat(g):parseInt(g,10))).join(",");a[e]="rgba("+h+")"}}function L(e,t){return b(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function d(e,t,n){n.length===1&&n.unshift(0);const a=C(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=m(n),(o,c)=>{const s=x(n,c);o.filter+=" "+e+"("+(s+a)+")"}}function R(e,t,n){return n.length===1&&n.unshift(b(t,e,"")),n=m(n),(a,o)=>{a[e]=x(n,o)}}function _(e,t,n){n.length===1&&n.unshift(0);const a=C(n),o=q(t);return n=m(n.reverse(),c=>(c=r.toFloat(c),a==="%"?c*o/100:c)),n.some(c=>{let[s]=c;return s})?(r.css(t,"strokeDasharray",o),(c,s)=>{c.strokeDashoffset=x(n,s)}):r.noop}function D(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const a=e==="y"?"height":"width";n=m(n,c=>r.toPx(c,a,t));const o=b(t,"background-position-"+e,"");return b(t,"backgroundSize","")==="cover"?A(e,t,n,o,a):N(e,n,o)}function A(e,t,n,a,o){const c=G(t);if(!c.width)return r.noop;const s=n.map(u=>{let[S]=u;return S}),i=Math.min(...s),h=Math.max(...s),g=s.indexOf(i)<s.indexOf(h),f=h-i;let W=(g?-f:0)-(g?i:h);const w={width:t.offsetWidth,height:t.offsetHeight},B=r.Dimensions.cover(c,w),I=B[o]-w[o];if(I<f)w[o]=B[o]+f-I;else if(I>f){const u=w[o]/r.toPx(a,o,t,!0);u&&(W-=(I-f)/u)}const E=r.Dimensions.cover(c,w),K=N(e,n,W+"px");return(u,S)=>{K(u,S),u.backgroundSize=E.width+"px "+E.height+"px",u.backgroundRepeat="no-repeat"}}function N(e,t,n){return function(a,o){a["background-position-"+e]="calc("+n+" + "+x(t,o)+"px)"}}const M={};function G(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(M[t])return M[t];const n=new Image;return t&&(n.src=t,n.naturalWidth||(n.onload=()=>{M[t]=j(n),r.trigger(e,"bgimageload")})),M[t]=j(n)}function j(e){return{width:e.naturalWidth,height:e.naturalHeight}}function m(e,t){t===void 0&&(t=r.toFloat);const n=[];for(const o of e){const[c,s]=r.isString(o)?o.trim().split(" "):[o];n.push([t(c),s?r.toFloat(s)/100:null])}const{length:a}=n;n[0][1]=0,n[a-1][1]=1;for(let o=1;o<a-1;o++)if(n[o]===null){const c=r.findIndex(n.slice(o+1),i=>{let[,h]=i;return h!==null})+1,s=(n[o+c]-n[o-1][1])/(c+1);for(let i=0;i<c;i++)n[o+i][1]=s*i+1}return n}function O(e,t){const n=r.findIndex(e.slice(1),a=>{let[,o]=a;return t<=o})+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function x(e,t){const[n,a,o]=O(e,t);return r.isNumber(n)?n+Math.abs(n-a)*o*(n<a?1:-1):+a}function C(e,t){return e.reduce((n,a)=>n||r.isString(a)&&a.replace(/[\d-]/g,"").trim(),"")||t}function b(e,t,n){const a=e.style[t],o=r.css(r.css(e,t,n),t);return e.style[t]=a,o}function $(e,t){return e.reduce((n,a)=>(n[a]=t,n),{})}var z={mixins:[H],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,t){let{target:n}=e;return T(n&&r.query(n,t)||t)},start(e){let{start:t}=e;return r.toPx(t,"height",this.target,!0)},end(e){let{end:t,viewport:n}=e;return r.toPx(t||(n=(1-n)*100)&&n+"vh+"+n+"%","height",this.target,!0)}},update:{read(e,t){let{percent:n}=e;if(t.has("scroll")||(n=!1),!this.matchMedia)return;const a=n;return n=J(r.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:a===n?!1:this.getCss(n)}},write(e){let{style:t}=e;if(!this.matchMedia){this.reset();return}t&&r.css(this.$el,t)},events:["scroll","resize"]}};function J(e,t){return t>=0?Math.pow(e,t+1):1-Math.pow(1-e,-t+1)}function T(e){return e?"offsetTop"in e?e:T(r.parent(e)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",z),z});