uikit 3.11.2-dev.3dfa2c50b → 3.11.2-dev.45194f70c

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