uikit 3.14.1-dev.dadc910c0 → 3.14.1-dev.e15dd286c

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 (49) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  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 +2 -2
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  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 +60 -60
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +60 -60
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +60 -60
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +1 -1
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  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 +12 -9
  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 +72 -69
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/filter.js +1 -1
  44. package/src/js/core/margin.js +1 -1
  45. package/src/js/core/scrollspy.js +9 -6
  46. package/src/js/mixin/parallax.js +59 -59
  47. package/src/js/mixin/position.js +1 -1
  48. package/tests/notification.html +1 -1
  49. package/tests/parallax.html +7 -7
@@ -1 +1 @@
1
- /*! UIkit 3.14.1-dev.dadc910c0 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],m):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitParallax=m(r.UIkit.util))})(this,function(r){"use strict";var m={connected(){var e;this.registerObserver(r.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},B={connected(){V(this._uid,()=>this.$emit("scroll"))},disconnected(){q(this._uid)}};const y=new Map;let x;function V(e,t){x=x||r.on(window,"scroll",()=>y.forEach(n=>n()),{passive:!0,capture:!0}),y.set(e,t)}function q(e){y.delete(e),x&&!y.size&&(x(),x=null)}var H={props:{media:Boolean},data:{media:!1},connected(){const e=A(this.media);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function A(e){if(r.isString(e)){if(r.startsWith(e,"@")){const t="breakpoint-"+e.substr(1);e=r.toFloat(r.getCssVar(t))}else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function G(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const M={x:F,y:F,rotate:F,scale:F,color:S,backgroundColor:S,borderColor:S,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:Q,stroke:X,bgx:C,bgy:C},{keys:j}=Object;var J={mixins:[H],props:L(j(M),"list"),data:L(j(M),void 0),computed:{props(e,t){return j(M).reduce((n,o)=>(r.isUndefined(e[o])||(n[o]=M[o](o,t,e[o].slice())),n),{})}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t}}};function F(e,t,n){let o=P(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",s;return e==="x"||e==="y"?(e="translate"+r.ucfirst(e),s=a=>r.toFloat(r.toFloat(a).toFixed(o==="px"?0:6))):e==="scale"&&(o="",s=a=>P([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=g(n,s),(a,c)=>{a.transform+=" "+e+"("+b(n,c)+o+")"}}function S(e,t,n){return n.length===1&&n.unshift(v(t,e,"")),n=g(n,o=>K(t,o)),(o,s)=>{const[a,c,i]=E(n,s),h=a.map((d,f)=>(d+=i*(c[f]-d),f===3?r.toFloat(d):parseInt(d,10))).join(",");o[e]="rgba("+h+")"}}function K(e,t){return v(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=P(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=g(n),(s,a)=>{const c=b(n,a);s.filter+=" "+e+"("+(c+o)+")"}}function Q(e,t,n){return n.length===1&&n.unshift(v(t,e,"")),n=g(n),(o,s)=>{o[e]=b(n,s)}}function X(e,t,n){n.length===1&&n.unshift(0);const o=P(n),s=G(t);return n=g(n.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),n.some(a=>{let[c]=a;return c})?(r.css(t,"strokeDasharray",s),(a,c)=>{a.strokeDashoffset=b(n,c)}):r.noop}function C(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const o=e==="y"?"height":"width";n=g(n,a=>r.toPx(a,o,t));const s=v(t,"background-position-"+e,"");return v(t,"backgroundSize","")==="cover"?Y(e,t,n,s,o):D(e,n,s)}function Y(e,t,n,o,s){const a=Z(t);if(!a.width)return r.noop;const c=n.map(u=>{let[z]=u;return z}),i=Math.min(...c),h=Math.max(...c),d=c.indexOf(i)<c.indexOf(h),f=h-i;let R=(d?-f:0)-(d?i:h);const w={width:t.offsetWidth,height:t.offsetHeight},T=r.Dimensions.cover(a,w),O=T[s]-w[s];if(O<f)w[s]=T[s]+f-O;else if(O>f){const u=w[s]/r.toPx(o,s,t,!0);u&&(R-=(O-f)/u)}const _=r.Dimensions.cover(a,w),U=D(e,n,R+"px");return(u,z)=>{U(u,z),u.backgroundSize=_.width+"px "+_.height+"px",u.backgroundRepeat="no-repeat"}}function D(e,t,n){return function(o,s){o["background-position-"+e]="calc("+n+" + "+b(t,s)+"px)"}}const $={};function Z(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if($[t])return $[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{$[t]=I(n),r.trigger(e,r.createEvent("load",!1))},I(n)):$[t]=I(n)}function I(e){return{width:e.naturalWidth,height:e.naturalHeight}}function g(e,t){t===void 0&&(t=r.toFloat);const n=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[c,i]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(c=t(c),i=i?r.toFloat(i)/100:null,a===0?i===null?i=0:i&&n.push([c,0]):a===o-1&&(i===null?i=1:i!==1&&(n.push([c,i]),i=1)),n.push([c,i]),i===null)s++;else if(s){const h=n[a-s-1][1],d=(i-h)/(s+1);for(let f=s;f>0;f--)n[a-f][1]=h+d*(s-f+1);s=0}}return n}function E(e,t){const n=r.findIndex(e.slice(1),o=>{let[,s]=o;return t<=s})+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function b(e,t){const[n,o,s]=E(e,t);return r.isNumber(n)?n+Math.abs(n-o)*s*(n<o?1:-1):+o}const p=/^-?\d+([^\s]*)/;function P(e,t){for(const n of e){const o=n.match==null?void 0:n.match(p);if(o)return o[1]}return t}function v(e,t,n){const o=e.style[t],s=r.css(r.css(e,t,n),t);return e.style[t]=o,s}function L(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var N={mixins:[J,m,B],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 W(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 o=n;return n=k(r.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:o===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 k(e,t){return t>=0?Math.pow(e,t+1):1-Math.pow(1-e,-t+1)}function W(e){return e?"offsetTop"in e?e:W(r.parent(e)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",N),N});
1
+ /*! UIkit 3.14.1-dev.e15dd286c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],m):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitParallax=m(r.UIkit.util))})(this,function(r){"use strict";var m={connected(){var e;this.registerObserver(r.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},B={connected(){V(this._uid,()=>this.$emit("scroll"))},disconnected(){q(this._uid)}};const y=new Map;let x;function V(e,t){x=x||r.on(window,"scroll",()=>y.forEach(n=>n()),{passive:!0,capture:!0}),y.set(e,t)}function q(e){y.delete(e),x&&!y.size&&(x(),x=null)}var H={props:{media:Boolean},data:{media:!1},connected(){const e=A(this.media);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function A(e){if(r.isString(e)){if(r.startsWith(e,"@")){const t="breakpoint-"+e.substr(1);e=r.toFloat(r.getCssVar(t))}else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function G(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const M={x:F,y:F,rotate:F,scale:F,color:j,backgroundColor:j,borderColor:j,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:Q,stroke:X,bgx:C,bgy:C},{keys:S}=Object;var J={mixins:[H],props:L(S(M),"list"),data:L(S(M),void 0),computed:{props(e,t){return S(M).reduce((n,s)=>(r.isUndefined(e[s])||(n[s]=M[s](s,t,e[s].slice())),n),{})}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t}}};function F(e,t,n){let s=P(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",o;return e==="x"||e==="y"?(e="translate"+r.ucfirst(e),o=a=>r.toFloat(r.toFloat(a).toFixed(s==="px"?0:6))):e==="scale"&&(s="",o=a=>P([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=g(n,o),(a,c)=>{a.transform+=" "+e+"("+b(n,c)+s+")"}}function j(e,t,n){return n.length===1&&n.unshift(v(t,e,"")),n=g(n,s=>K(t,s)),(s,o)=>{const[a,c,i]=E(n,o),h=a.map((d,f)=>(d+=i*(c[f]-d),f===3?r.toFloat(d):parseInt(d,10))).join(",");s[e]="rgba("+h+")"}}function K(e,t){return v(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const s=P(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=g(n),(o,a)=>{const c=b(n,a);o.filter+=" "+e+"("+(c+s)+")"}}function Q(e,t,n){return n.length===1&&n.unshift(v(t,e,"")),n=g(n),(s,o)=>{s[e]=b(n,o)}}function X(e,t,n){n.length===1&&n.unshift(0);const s=P(n),o=G(t);return n=g(n.reverse(),a=>(a=r.toFloat(a),s==="%"?a*o/100:a)),n.some(a=>{let[c]=a;return c})?(r.css(t,"strokeDasharray",o),(a,c)=>{a.strokeDashoffset=b(n,c)}):r.noop}function C(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const s=e==="y"?"height":"width";n=g(n,a=>r.toPx(a,s,t));const o=v(t,"background-position-"+e,"");return v(t,"backgroundSize","")==="cover"?Y(e,t,n,o,s):D(e,n,o)}function Y(e,t,n,s,o){const a=Z(t);if(!a.width)return r.noop;const c=n.map(u=>{let[z]=u;return z}),i=Math.min(...c),h=Math.max(...c),d=c.indexOf(i)<c.indexOf(h),f=h-i;let R=(d?-f:0)-(d?i:h);const w={width:t.offsetWidth,height:t.offsetHeight},T=r.Dimensions.cover(a,w),O=T[o]-w[o];if(O<f)w[o]=T[o]+f-O;else if(O>f){const u=w[o]/r.toPx(s,o,t,!0);u&&(R-=(O-f)/u)}const _=r.Dimensions.cover(a,w),U=D(e,n,R+"px");return(u,z)=>{U(u,z),u.backgroundSize=_.width+"px "+_.height+"px",u.backgroundRepeat="no-repeat"}}function D(e,t,n){return function(s,o){s["background-position-"+e]="calc("+n+" + "+b(t,o)+"px)"}}const $={};function Z(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if($[t])return $[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{$[t]=I(n),r.trigger(e,r.createEvent("load",!1))},I(n)):$[t]=I(n)}function I(e){return{width:e.naturalWidth,height:e.naturalHeight}}function g(e,t){t===void 0&&(t=r.toFloat);const n=[],{length:s}=e;let o=0;for(let a=0;a<s;a++){let[c,i]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(c=t(c),i=i?r.toFloat(i)/100:null,a===0?i===null?i=0:i&&n.push([c,0]):a===s-1&&(i===null?i=1:i!==1&&(n.push([c,i]),i=1)),n.push([c,i]),i===null)o++;else if(o){const h=n[a-o-1][1],d=(i-h)/(o+1);for(let f=o;f>0;f--)n[a-f][1]=h+d*(o-f+1);o=0}}return n}function E(e,t){const n=r.findIndex(e.slice(1),s=>{let[,o]=s;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 b(e,t){const[n,s,o]=E(e,t);return r.isNumber(n)?n+Math.abs(n-s)*o*(n<s?1:-1):+s}const p=/^-?\d+(\S*)/;function P(e,t){for(const n of e){const s=n.match==null?void 0:n.match(p);if(s)return s[1]}return t}function v(e,t,n){const s=e.style[t],o=r.css(r.css(e,t,n),t);return e.style[t]=s,o}function L(e,t){return e.reduce((n,s)=>(n[s]=t,n),{})}var N={mixins:[J,m,B],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 W(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 s=n;return n=k(r.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:s===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 k(e,t){return t>=0?Math.pow(e,t+1):1-Math.pow(1-e,-t+1)}function W(e){return e?"offsetTop"in e?e:W(r.parent(e)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",N),N});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.1-dev.dadc910c0 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.1-dev.e15dd286c | 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')) :
@@ -141,39 +141,39 @@
141
141
 
142
142
 
143
143
 
144
- function transformFn(prop, el, steps) {
145
- let unit = getUnit(steps) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
144
+ function transformFn(prop, el, stops) {
145
+ let unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
146
146
  let transformFn;
147
147
 
148
148
  if (prop === 'x' || prop === 'y') {
149
149
  prop = "translate" + uikitUtil.ucfirst(prop);
150
- transformFn = (step) => uikitUtil.toFloat(uikitUtil.toFloat(step).toFixed(unit === 'px' ? 0 : 6));
150
+ transformFn = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
151
151
  } else if (prop === 'scale') {
152
152
  unit = '';
153
- transformFn = (step) =>
154
- getUnit([step]) ? uikitUtil.toPx(step, 'width', el, true) / el.offsetWidth : step;
153
+ transformFn = (stop) =>
154
+ getUnit([stop]) ? uikitUtil.toPx(stop, 'width', el, true) / el.offsetWidth : stop;
155
155
  }
156
156
 
157
- if (steps.length === 1) {
158
- steps.unshift(prop === 'scale' ? 1 : 0);
157
+ if (stops.length === 1) {
158
+ stops.unshift(prop === 'scale' ? 1 : 0);
159
159
  }
160
160
 
161
- steps = parseSteps(steps, transformFn);
161
+ stops = parseStops(stops, transformFn);
162
162
 
163
163
  return (css, percent) => {
164
- css.transform += " " + prop + "(" + getValue(steps, percent) + unit + ")";
164
+ css.transform += " " + prop + "(" + getValue(stops, percent) + unit + ")";
165
165
  };
166
166
  }
167
167
 
168
- function colorFn(prop, el, steps) {
169
- if (steps.length === 1) {
170
- steps.unshift(getCssValue(el, prop, ''));
168
+ function colorFn(prop, el, stops) {
169
+ if (stops.length === 1) {
170
+ stops.unshift(getCssValue(el, prop, ''));
171
171
  }
172
172
 
173
- steps = parseSteps(steps, (step) => parseColor(el, step));
173
+ stops = parseStops(stops, (stop) => parseColor(el, stop));
174
174
 
175
175
  return (css, percent) => {
176
- const [start, end, p] = getStep(steps, percent);
176
+ const [start, end, p] = getStop(stops, percent);
177
177
  const value = start.
178
178
  map((value, i) => {
179
179
  value += p * (end[i] - value);
@@ -193,80 +193,80 @@
193
193
  map(uikitUtil.toFloat);
194
194
  }
195
195
 
196
- function filterFn(prop, el, steps) {
197
- if (steps.length === 1) {
198
- steps.unshift(0);
196
+ function filterFn(prop, el, stops) {
197
+ if (stops.length === 1) {
198
+ stops.unshift(0);
199
199
  }
200
200
 
201
- const unit = getUnit(steps) || { blur: 'px', hue: 'deg' }[prop] || '%';
201
+ const unit = getUnit(stops) || { blur: 'px', hue: 'deg' }[prop] || '%';
202
202
  prop = { fopacity: 'opacity', hue: 'hue-rotate' }[prop] || prop;
203
- steps = parseSteps(steps);
203
+ stops = parseStops(stops);
204
204
 
205
205
  return (css, percent) => {
206
- const value = getValue(steps, percent);
206
+ const value = getValue(stops, percent);
207
207
  css.filter += " " + prop + "(" + (value + unit) + ")";
208
208
  };
209
209
  }
210
210
 
211
- function cssPropFn(prop, el, steps) {
212
- if (steps.length === 1) {
213
- steps.unshift(getCssValue(el, prop, ''));
211
+ function cssPropFn(prop, el, stops) {
212
+ if (stops.length === 1) {
213
+ stops.unshift(getCssValue(el, prop, ''));
214
214
  }
215
215
 
216
- steps = parseSteps(steps);
216
+ stops = parseStops(stops);
217
217
 
218
218
  return (css, percent) => {
219
- css[prop] = getValue(steps, percent);
219
+ css[prop] = getValue(stops, percent);
220
220
  };
221
221
  }
222
222
 
223
- function strokeFn(prop, el, steps) {
224
- if (steps.length === 1) {
225
- steps.unshift(0);
223
+ function strokeFn(prop, el, stops) {
224
+ if (stops.length === 1) {
225
+ stops.unshift(0);
226
226
  }
227
227
 
228
- const unit = getUnit(steps);
228
+ const unit = getUnit(stops);
229
229
  const length = getMaxPathLength(el);
230
- steps = parseSteps(steps.reverse(), (step) => {
231
- step = uikitUtil.toFloat(step);
232
- return unit === '%' ? step * length / 100 : step;
230
+ stops = parseStops(stops.reverse(), (stop) => {
231
+ stop = uikitUtil.toFloat(stop);
232
+ return unit === '%' ? stop * length / 100 : stop;
233
233
  });
234
234
 
235
- if (!steps.some((_ref) => {let [value] = _ref;return value;})) {
235
+ if (!stops.some((_ref) => {let [value] = _ref;return value;})) {
236
236
  return uikitUtil.noop;
237
237
  }
238
238
 
239
239
  uikitUtil.css(el, 'strokeDasharray', length);
240
240
 
241
241
  return (css, percent) => {
242
- css.strokeDashoffset = getValue(steps, percent);
242
+ css.strokeDashoffset = getValue(stops, percent);
243
243
  };
244
244
  }
245
245
 
246
- function backgroundFn(prop, el, steps) {
247
- if (steps.length === 1) {
248
- steps.unshift(0);
246
+ function backgroundFn(prop, el, stops) {
247
+ if (stops.length === 1) {
248
+ stops.unshift(0);
249
249
  }
250
250
 
251
251
  prop = prop.substr(-1);
252
252
  const attr = prop === 'y' ? 'height' : 'width';
253
- steps = parseSteps(steps, (step) => uikitUtil.toPx(step, attr, el));
253
+ stops = parseStops(stops, (stop) => uikitUtil.toPx(stop, attr, el));
254
254
 
255
255
  const bgPos = getCssValue(el, "background-position-" + prop, '');
256
256
 
257
257
  return getCssValue(el, 'backgroundSize', '') === 'cover' ?
258
- backgroundCoverFn(prop, el, steps, bgPos, attr) :
259
- setBackgroundPosFn(prop, steps, bgPos);
258
+ backgroundCoverFn(prop, el, stops, bgPos, attr) :
259
+ setBackgroundPosFn(prop, stops, bgPos);
260
260
  }
261
261
 
262
- function backgroundCoverFn(prop, el, steps, bgPos, attr) {
262
+ function backgroundCoverFn(prop, el, stops, bgPos, attr) {
263
263
  const dimImage = getBackgroundImageDimensions(el);
264
264
 
265
265
  if (!dimImage.width) {
266
266
  return uikitUtil.noop;
267
267
  }
268
268
 
269
- const values = steps.map((_ref2) => {let [value] = _ref2;return value;});
269
+ const values = stops.map((_ref2) => {let [value] = _ref2;return value;});
270
270
  const min = Math.min(...values);
271
271
  const max = Math.max(...values);
272
272
  const down = values.indexOf(min) < values.indexOf(max);
@@ -294,7 +294,7 @@
294
294
 
295
295
  const dim = uikitUtil.Dimensions.cover(dimImage, dimEl);
296
296
 
297
- const fn = setBackgroundPosFn(prop, steps, pos + "px");
297
+ const fn = setBackgroundPosFn(prop, stops, pos + "px");
298
298
  return (css, percent) => {
299
299
  fn(css, percent);
300
300
  css.backgroundSize = dim.width + "px " + dim.height + "px";
@@ -302,9 +302,9 @@
302
302
  };
303
303
  }
304
304
 
305
- function setBackgroundPosFn(prop, steps, pos) {
305
+ function setBackgroundPosFn(prop, stops, pos) {
306
306
  return function (css, percent) {
307
- css["background-position-" + prop] = "calc(" + pos + " + " + getValue(steps, percent) + "px)";
307
+ css["background-position-" + prop] = "calc(" + pos + " + " + getValue(stops, percent) + "px)";
308
308
  };
309
309
  }
310
310
 
@@ -339,12 +339,12 @@
339
339
 
340
340
  }
341
341
 
342
- function parseSteps(steps, fn) {if (fn === void 0) {fn = uikitUtil.toFloat;}
342
+ function parseStops(stops, fn) {if (fn === void 0) {fn = uikitUtil.toFloat;}
343
343
  const result = [];
344
- const { length } = steps;
344
+ const { length } = stops;
345
345
  let nullIndex = 0;
346
346
  for (let i = 0; i < length; i++) {
347
- let [value, percent] = uikitUtil.isString(steps[i]) ? steps[i].trim().split(' ') : [steps[i]];
347
+ let [value, percent] = uikitUtil.isString(stops[i]) ? stops[i].trim().split(' ') : [stops[i]];
348
348
  value = fn(value);
349
349
  percent = percent ? uikitUtil.toFloat(percent) / 100 : null;
350
350
 
@@ -381,24 +381,24 @@
381
381
  return result;
382
382
  }
383
383
 
384
- function getStep(steps, percent) {
385
- const index = uikitUtil.findIndex(steps.slice(1), (_ref3) => {let [, targetPercent] = _ref3;return percent <= targetPercent;}) + 1;
384
+ function getStop(stops, percent) {
385
+ const index = uikitUtil.findIndex(stops.slice(1), (_ref3) => {let [, targetPercent] = _ref3;return percent <= targetPercent;}) + 1;
386
386
  return [
387
- steps[index - 1][0],
388
- steps[index][0],
389
- (percent - steps[index - 1][1]) / (steps[index][1] - steps[index - 1][1])];
387
+ stops[index - 1][0],
388
+ stops[index][0],
389
+ (percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])];
390
390
 
391
391
  }
392
392
 
393
- function getValue(steps, percent) {
394
- const [start, end, p] = getStep(steps, percent);
393
+ function getValue(stops, percent) {
394
+ const [start, end, p] = getStop(stops, percent);
395
395
  return uikitUtil.isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
396
396
  }
397
397
 
398
- const unitRe = /^-?\d+([^\s]*)/;
399
- function getUnit(steps, defaultUnit) {
400
- for (const step of steps) {
401
- const match = step.match == null ? void 0 : step.match(unitRe);
398
+ const unitRe = /^-?\d+(\S*)/;
399
+ function getUnit(stops, defaultUnit) {
400
+ for (const stop of stops) {
401
+ const match = stop.match == null ? void 0 : stop.match(unitRe);
402
402
  if (match) {
403
403
  return match[1];
404
404
  }
@@ -1 +1 @@
1
- /*! UIkit 3.14.1-dev.dadc910c0 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlider_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const n=V(this.media);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function V(n){if(r.isString(n)){if(r.startsWith(n,"@")){const t="breakpoint-"+n.substr(1);n=r.toFloat(r.getCssVar(t))}else if(isNaN(n))return n}return n&&r.isNumeric(n)?"(min-width: "+n+"px)":""}r.memoize(async n=>n?r.startsWith(n,"data:")?decodeURIComponent(n.split(",")[1]):(await fetch(n)).text():Promise.reject());function _(n){return Math.ceil(Math.max(0,...r.$$("[stroke]",n).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const w={x:F,y:F,rotate:F,scale:F,color:P,backgroundColor:P,borderColor:P,blur:m,hue:m,fopacity:m,grayscale:m,invert:m,saturate:m,sepia:m,opacity:L,stroke:A,bgx:O,bgy:O},{keys:M}=Object;var q={mixins:[g],props:W(M(w),"list"),data:W(M(w),void 0),computed:{props(n,t){return M(w).reduce((e,o)=>(r.isUndefined(n[o])||(e[o]=w[o](o,t,n[o].slice())),e),{})}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))r.css(this.$el,n,"")},getCss(n){const t={transform:"",filter:""};for(const e in this.props)this.props[e](t,n);return t}}};function F(n,t,e){let o=I(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",a;return n==="x"||n==="y"?(n="translate"+r.ucfirst(n),a=s=>r.toFloat(r.toFloat(s).toFixed(o==="px"?0:6))):n==="scale"&&(o="",a=s=>I([s])?r.toPx(s,"width",t,!0)/t.offsetWidth:s),e.length===1&&e.unshift(n==="scale"?1:0),e=l(e,a),(s,c)=>{s.transform+=" "+n+"("+x(e,c)+o+")"}}function P(n,t,e){return e.length===1&&e.unshift(b(t,n,"")),e=l(e,o=>H(t,o)),(o,a)=>{const[s,c,i]=S(e,a),h=s.map((d,f)=>(d+=i*(c[f]-d),f===3?r.toFloat(d):parseInt(d,10))).join(",");o[n]="rgba("+h+")"}}function H(n,t){return b(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function m(n,t,e){e.length===1&&e.unshift(0);const o=I(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=l(e),(a,s)=>{const c=x(e,s);a.filter+=" "+n+"("+(c+o)+")"}}function L(n,t,e){return e.length===1&&e.unshift(b(t,n,"")),e=l(e),(o,a)=>{o[n]=x(e,a)}}function A(n,t,e){e.length===1&&e.unshift(0);const o=I(e),a=_(t);return e=l(e.reverse(),s=>(s=r.toFloat(s),o==="%"?s*a/100:s)),e.some(s=>{let[c]=s;return c})?(r.css(t,"strokeDasharray",a),(s,c)=>{s.strokeDashoffset=x(e,c)}):r.noop}function O(n,t,e){e.length===1&&e.unshift(0),n=n.substr(-1);const o=n==="y"?"height":"width";e=l(e,s=>r.toPx(s,o,t));const a=b(t,"background-position-"+n,"");return b(t,"backgroundSize","")==="cover"?G(n,t,e,a,o):D(n,e,a)}function G(n,t,e,o,a){const s=J(t);if(!s.width)return r.noop;const c=e.map(u=>{let[j]=u;return j}),i=Math.min(...c),h=Math.max(...c),d=c.indexOf(i)<c.indexOf(h),f=h-i;let B=(d?-f:0)-(d?i:h);const y={width:t.offsetWidth,height:t.offsetHeight},E=r.Dimensions.cover(s,y),v=E[a]-y[a];if(v<f)y[a]=E[a]+f-v;else if(v>f){const u=y[a]/r.toPx(o,a,t,!0);u&&(B-=(v-f)/u)}const R=r.Dimensions.cover(s,y),Q=D(n,e,B+"px");return(u,j)=>{Q(u,j),u.backgroundSize=R.width+"px "+R.height+"px",u.backgroundRepeat="no-repeat"}}function D(n,t,e){return function(o,a){o["background-position-"+n]="calc("+e+" + "+x(t,a)+"px)"}}const C={};function J(n){const t=r.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(C[t])return C[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth)?(e.onload=()=>{C[t]=$(e),r.trigger(n,r.createEvent("load",!1))},$(e)):C[t]=$(e)}function $(n){return{width:n.naturalWidth,height:n.naturalHeight}}function l(n,t){t===void 0&&(t=r.toFloat);const e=[],{length:o}=n;let a=0;for(let s=0;s<o;s++){let[c,i]=r.isString(n[s])?n[s].trim().split(" "):[n[s]];if(c=t(c),i=i?r.toFloat(i)/100:null,s===0?i===null?i=0:i&&e.push([c,0]):s===o-1&&(i===null?i=1:i!==1&&(e.push([c,i]),i=1)),e.push([c,i]),i===null)a++;else if(a){const h=e[s-a-1][1],d=(i-h)/(a+1);for(let f=a;f>0;f--)e[s-f][1]=h+d*(a-f+1);a=0}}return e}function S(n,t){const e=r.findIndex(n.slice(1),o=>{let[,a]=o;return t<=a})+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function x(n,t){const[e,o,a]=S(n,t);return r.isNumber(e)?e+Math.abs(e-o)*a*(e<o?1:-1):+o}const K=/^-?\d+([^\s]*)/;function I(n,t){for(const e of n){const o=e.match==null?void 0:e.match(K);if(o)return o[1]}return t}function b(n,t,e){const o=n.style[t],a=r.css(r.css(n,t,e),t);return n.style[t]=o,a}function W(n,t){return n.reduce((e,o)=>(e[o]=t,e),{})}var T={mixins:[q],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(n){let{type:t,detail:{percent:e,duration:o,timing:a,dir:s}}=n;r.fastdom.read(()=>{const c=this.getCss(N(t,s,e)),i=this.getCss(z(t)?.5:s>0?1:0);r.fastdom.write(()=>{r.css(this.$el,c),r.Transition.start(this.$el,i,o,a).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(n){let{type:t,detail:{percent:e,dir:o}}=n;r.fastdom.read(()=>{const a=this.getCss(N(t,o,e));r.fastdom.write(()=>r.css(this.$el,a))})}}]};function z(n){return r.endsWith(n,"in")}function N(n,t,e){return e/=2,z(n)^t<0?e:1-e}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",T),T});
1
+ /*! UIkit 3.14.1-dev.e15dd286c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlider_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=V(this.media);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function V(e){if(r.isString(e)){if(r.startsWith(e,"@")){const t="breakpoint-"+e.substr(1);e=r.toFloat(r.getCssVar(t))}else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function _(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const w={x:F,y:F,rotate:F,scale:F,color:P,backgroundColor:P,borderColor:P,blur:m,hue:m,fopacity:m,grayscale:m,invert:m,saturate:m,sepia:m,opacity:L,stroke:A,bgx:O,bgy:O},{keys:M}=Object;var q={mixins:[g],props:W(M(w),"list"),data:W(M(w),void 0),computed:{props(e,t){return M(w).reduce((n,a)=>(r.isUndefined(e[a])||(n[a]=w[a](a,t,e[a].slice())),n),{})}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t}}};function F(e,t,n){let a=I(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",o;return e==="x"||e==="y"?(e="translate"+r.ucfirst(e),o=s=>r.toFloat(r.toFloat(s).toFixed(a==="px"?0:6))):e==="scale"&&(a="",o=s=>I([s])?r.toPx(s,"width",t,!0)/t.offsetWidth:s),n.length===1&&n.unshift(e==="scale"?1:0),n=l(n,o),(s,c)=>{s.transform+=" "+e+"("+x(n,c)+a+")"}}function P(e,t,n){return n.length===1&&n.unshift(b(t,e,"")),n=l(n,a=>H(t,a)),(a,o)=>{const[s,c,i]=D(n,o),h=s.map((d,f)=>(d+=i*(c[f]-d),f===3?r.toFloat(d):parseInt(d,10))).join(",");a[e]="rgba("+h+")"}}function H(e,t){return b(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function m(e,t,n){n.length===1&&n.unshift(0);const a=I(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=l(n),(o,s)=>{const c=x(n,s);o.filter+=" "+e+"("+(c+a)+")"}}function L(e,t,n){return n.length===1&&n.unshift(b(t,e,"")),n=l(n),(a,o)=>{a[e]=x(n,o)}}function A(e,t,n){n.length===1&&n.unshift(0);const a=I(n),o=_(t);return n=l(n.reverse(),s=>(s=r.toFloat(s),a==="%"?s*o/100:s)),n.some(s=>{let[c]=s;return c})?(r.css(t,"strokeDasharray",o),(s,c)=>{s.strokeDashoffset=x(n,c)}):r.noop}function O(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const a=e==="y"?"height":"width";n=l(n,s=>r.toPx(s,a,t));const o=b(t,"background-position-"+e,"");return b(t,"backgroundSize","")==="cover"?G(e,t,n,o,a):S(e,n,o)}function G(e,t,n,a,o){const s=J(t);if(!s.width)return r.noop;const c=n.map(u=>{let[j]=u;return j}),i=Math.min(...c),h=Math.max(...c),d=c.indexOf(i)<c.indexOf(h),f=h-i;let B=(d?-f:0)-(d?i:h);const y={width:t.offsetWidth,height:t.offsetHeight},E=r.Dimensions.cover(s,y),v=E[o]-y[o];if(v<f)y[o]=E[o]+f-v;else if(v>f){const u=y[o]/r.toPx(a,o,t,!0);u&&(B-=(v-f)/u)}const R=r.Dimensions.cover(s,y),Q=S(e,n,B+"px");return(u,j)=>{Q(u,j),u.backgroundSize=R.width+"px "+R.height+"px",u.backgroundRepeat="no-repeat"}}function S(e,t,n){return function(a,o){a["background-position-"+e]="calc("+n+" + "+x(t,o)+"px)"}}const C={};function J(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(C[t])return C[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{C[t]=$(n),r.trigger(e,r.createEvent("load",!1))},$(n)):C[t]=$(n)}function $(e){return{width:e.naturalWidth,height:e.naturalHeight}}function l(e,t){t===void 0&&(t=r.toFloat);const n=[],{length:a}=e;let o=0;for(let s=0;s<a;s++){let[c,i]=r.isString(e[s])?e[s].trim().split(" "):[e[s]];if(c=t(c),i=i?r.toFloat(i)/100:null,s===0?i===null?i=0:i&&n.push([c,0]):s===a-1&&(i===null?i=1:i!==1&&(n.push([c,i]),i=1)),n.push([c,i]),i===null)o++;else if(o){const h=n[s-o-1][1],d=(i-h)/(o+1);for(let f=o;f>0;f--)n[s-f][1]=h+d*(o-f+1);o=0}}return n}function D(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]=D(e,t);return r.isNumber(n)?n+Math.abs(n-a)*o*(n<a?1:-1):+a}const K=/^-?\d+(\S*)/;function I(e,t){for(const n of e){const a=n.match==null?void 0:n.match(K);if(a)return a[1]}return 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 W(e,t){return e.reduce((n,a)=>(n[a]=t,n),{})}var T={mixins:[q],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:a,timing:o,dir:s}}=e;r.fastdom.read(()=>{const c=this.getCss(N(t,s,n)),i=this.getCss(z(t)?.5:s>0?1:0);r.fastdom.write(()=>{r.css(this.$el,c),r.Transition.start(this.$el,i,a,o).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:a}}=e;r.fastdom.read(()=>{const o=this.getCss(N(t,a,n));r.fastdom.write(()=>r.css(this.$el,o))})}}]};function z(e){return r.endsWith(e,"in")}function N(e,t,n){return n/=2,z(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",T),T});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.1-dev.dadc910c0 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.1-dev.e15dd286c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -1 +1 @@
1
- /*! UIkit 3.14.1-dev.dadc910c0 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=v(e.UIkit.util))})(this,function(e){"use strict";var v={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},S={connected(){var s;this.registerObserver(e.observeResize(((s=this.$options.resizeTargets)==null?void 0:s.call(this))||this.$el,()=>this.$emit("resize")))}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!e.$(":focus",this.$el))&&(!this.pauseOnHover||!e.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},D={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const s of["start","move","end"]){const t=this[s];this[s]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:e.pointerDown,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&T(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,e.pointerMove,this.move,{passive:!1}),e.on(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,d=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&d>h;)this.drag-=h*this.dir,i=r,d-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=d/h;const l=n[i],c=n[r],f=this.index!==r,o=i===r;let a;[this.index,this.prevIndex].filter(g=>!e.includes([r,i],g)).forEach(g=>{e.trigger(n[g],"itemhidden",[this]),o&&(a=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||a)&&e.trigger(n[this.index],"itemshown",[this]),f&&(this.prevIndex=i,this.index=r,!o&&e.trigger(l,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!o&&c),f&&(!o&&e.trigger(l,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,e.pointerMove,this.move,{passive:!1}),e.off(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const s=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=s?this.index:this.prevIndex,s&&(this.percent=1-this.percent),this.show(this.dir>0&&!s||this.dir<0&&s?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function T(s){return!s.children.length&&s.childNodes.length}var z={data:{selNav:!1},computed:{nav(s,t){let{selNav:n}=s;return e.$(n,t)},selNavItem(s){let{attrItem:t}=s;return"["+t+"],[data-"+t+"]"},navItems(s,t){return e.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((s,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(s=>s&&(s.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(s){s.preventDefault(),this.show(e.data(s.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const s=this.getValidIndex();for(const t of this.navItems){const n=e.data(t,this.attrItem);e.toggleClass(t,this.clsActive,e.toNumber(n)===s),e.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&s===0||n==="next"&&s>=this.maxIndex))}}}},O={mixins:[R,D,z,S],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return b(t.offsetWidth/n)},list(s,t){let{selList:n}=s;return e.$(n,t)},maxIndex(){return this.length-1},selSlides(s){let{selList:t,selSlides:n}=s;return t+" "+(n||"> *")},slides:{get(){return e.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(s,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,d=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],l=this.getIndex(s,this.index),c=this.slides[l];if(h===c){d();return}if(this.dir=W(s,r),this.prevIndex=r,this.index=l,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,d();return}const f=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(o=>{e.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,o()})})));return h&&e.trigger(h,"itemhide",[this]),e.trigger(c,"itemshow",[this]),f},getIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.index),e.clamp(e.getIndex(s,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(s,t)},_show(s,t,n){if(this._transitioner=this._getTransitioner(s,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!s)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(s,t){return this._getTransitioner(s,s!==t&&t).getDistance()},_translate(s,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(s),i},_getTransitioner(s,t,n,i){return s===void 0&&(s=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(e.isNumber(s)?this.slides[s]:s,e.isNumber(t)?this.slides[t]:t,n*(e.isRtl?-1:1),i)}}};function W(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function b(s){return .5*s+300}var E={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==s)&&this.show(s)},events:["resize"]}},P={methods:{lazyload(s,t){s===void 0&&(s=this.$el),t===void 0&&(t=this.$el),this.registerObserver(e.observeIntersection(s,(n,i)=>{for(const d of e.toNodes(e.isFunction(t)?t():t))e.$$('[loading="lazy"]',d).forEach(r=>e.removeAttr(r,"loading"));for(const d of n.filter(r=>{let{isIntersecting:h}=r;return h}).map(r=>{let{target:h}=r;return h}))i.unobserve(d)}))}}},B={mixins:[P],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function y(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function L(s,t,n,i){let{center:d,easing:r,list:h}=i;const l=new e.Deferred,c=s?p(s,h,d):p(t,h,d)+e.dimensions(t).width*n,f=t?p(t,h,d):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(o,a,g){a===void 0&&(a=0);const m=g?"linear":r;return o-=Math.round(o*e.clamp(a,-1,1)),this.translate(a),a=s?a:e.clamp(a,0,1),u(this.getItemIn(),"itemin",{percent:a,duration:o,timing:m,dir:n}),s&&u(this.getItemIn(!0),"itemout",{percent:1-a,duration:o,timing:m,dir:n}),e.Transition.start(h,{transform:y(-f*(e.isRtl?-1:1),"px")},o,m).then(l.resolve,e.noop),l.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(o,a){return a===void 0&&(a=this.percent()),e.Transition.cancel(h),this.show(o,a,!0)},translate(o){const a=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",y(e.clamp(-f+(a-a*o),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const g=this.getActives(),m=this.getItemIn(),H=this.getItemIn(!0);o=s?e.clamp(o,-1,1):0;for(const x of e.children(h)){const C=e.includes(g,x),M=x===m,N=x===H,q=M||!N&&(C||n*(e.isRtl?-1:1)===-1^w(x,h)>w(s||t));u(x,"itemtranslate"+(q?"in":"out"),{dir:n,percent:N?1-o:M?o:C?1:0})}},percent(){return Math.abs((e.css(h,"transform").split(",")[4]*(e.isRtl?-1:1)+c)/(f-c))},getDistance(){return Math.abs(f-c)},getItemIn(o){o===void 0&&(o=!1);let a=this.getActives(),g=_(h,p(t||s,h,d));if(o){const m=a;a=g,g=m}return g[e.findIndex(g,m=>!e.includes(a,m))]},getActives(){return _(h,p(s||t,h,d))}}}function p(s,t,n){const i=w(s,t);return n?i-V(s,t):Math.min(i,A(t))}function A(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.children(s).reduce((t,n)=>e.dimensions(n).width+t,0)}function V(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function w(s,t){return s&&(e.position(s).left+(e.isRtl?e.dimensions(s).width-e.dimensions(t).width:0))*(e.isRtl?-1:1)||0}function _(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(d=>{const r=w(d,s),h=r+Math.min(e.dimensions(d).width,n);return r>=t&&h<=i})}function u(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var $={mixins:[v,O,E,B],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:L},computed:{avgWidth(){return I(this.list)/this.length},finite(s){let{finite:t}=s;return t||Math.ceil(I(this.list))<Math.trunc(e.dimensions(this.list).width+j(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let s=0;const t=A(this.list),n=e.findIndex(this.slides,i=>{if(s>=t)return!0;s+=e.dimensions(i).width});return~n?n:this.length-1},sets(s){let{sets:t}=s;if(!t)return;let n=0;const i=[],d=e.dimensions(this.list).width;for(let r=0;r<this.slides.length;r++){const h=e.dimensions(this.slides[r]).width;n+h>d&&(n=0),this.center?n<d/2&&n+h+e.dimensions(this.slides[+r+1]).width/2>d/2&&(i.push(+r),n=d/2-h/2):n===0&&i.push(Math.min(+r,this.maxIndex)),n+=h}if(i.length)return i},transitionOptions(){return{center:this.center,list:this.list}}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$("."+this.clsContainer,this.$el))},update:{write(){for(const s of this.navItems){const t=e.toNumber(e.data(s,this.attrItem));t!==!1&&(s.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!e.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(s){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");s.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((d,r)=>e.css(d,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const d=this.getIndex(--i+s,s),r=this.slides[d];e.css(r,"order",d>s?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const s=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)e.toggleClass(n,t,e.includes(s,n))},getValidIndex(s,t){if(s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),s=this.getIndex(s,t),!this.sets)return s;let n;do{if(e.includes(this.sets,s))return s;n=s,s=this.getIndex(s+this.dir,t)}while(s!==n);return s},getAdjacentSlides(){const{width:s}=e.dimensions(this.list),t=-s,n=s*2,i=e.dimensions(this.slides[this.index]).width,d=this.center?s/2-i/2:0,r=new Set;for(const h of[-1,1]){let l=d+(h>0?i:0),c=0;do{const f=this.slides[this.getIndex(this.index+h+c++*h)];l+=e.dimensions(f).width*h,r.add(f)}while(this.slides.length>c&&l>t&&l<n)}return Array.from(r)}}};function j(s){return Math.max(0,...e.children(s).map(t=>e.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",$),$});
1
+ /*! UIkit 3.14.1-dev.e15dd286c | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=v(e.UIkit.util))})(this,function(e){"use strict";var v={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},S={connected(){var s;this.registerObserver(e.observeResize(((s=this.$options.resizeTargets)==null?void 0:s.call(this))||this.$el,()=>this.$emit("resize")))}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!e.$(":focus",this.$el))&&(!this.pauseOnHover||!e.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},D={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const s of["start","move","end"]){const t=this[s];this[s]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:e.pointerDown,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&T(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,e.pointerMove,this.move,{passive:!1}),e.on(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,d=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&d>h;)this.drag-=h*this.dir,i=r,d-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=d/h;const l=n[i],c=n[r],f=this.index!==r,o=i===r;let a;[this.index,this.prevIndex].filter(g=>!e.includes([r,i],g)).forEach(g=>{e.trigger(n[g],"itemhidden",[this]),o&&(a=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||a)&&e.trigger(n[this.index],"itemshown",[this]),f&&(this.prevIndex=i,this.index=r,!o&&e.trigger(l,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!o&&c),f&&(!o&&e.trigger(l,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,e.pointerMove,this.move,{passive:!1}),e.off(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const s=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=s?this.index:this.prevIndex,s&&(this.percent=1-this.percent),this.show(this.dir>0&&!s||this.dir<0&&s?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function T(s){return!s.children.length&&s.childNodes.length}var z={data:{selNav:!1},computed:{nav(s,t){let{selNav:n}=s;return e.$(n,t)},selNavItem(s){let{attrItem:t}=s;return"["+t+"],[data-"+t+"]"},navItems(s,t){return e.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((s,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(s=>s&&(s.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(s){s.preventDefault(),this.show(e.data(s.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const s=this.getValidIndex();for(const t of this.navItems){const n=e.data(t,this.attrItem);e.toggleClass(t,this.clsActive,e.toNumber(n)===s),e.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&s===0||n==="next"&&s>=this.maxIndex))}}}},O={mixins:[R,D,z,S],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return b(t.offsetWidth/n)},list(s,t){let{selList:n}=s;return e.$(n,t)},maxIndex(){return this.length-1},selSlides(s){let{selList:t,selSlides:n}=s;return t+" "+(n||"> *")},slides:{get(){return e.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(s,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,d=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],l=this.getIndex(s,this.index),c=this.slides[l];if(h===c){d();return}if(this.dir=W(s,r),this.prevIndex=r,this.index=l,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,d();return}const f=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(o=>{e.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,o()})})));return h&&e.trigger(h,"itemhide",[this]),e.trigger(c,"itemshow",[this]),f},getIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.index),e.clamp(e.getIndex(s,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(s,t)},_show(s,t,n){if(this._transitioner=this._getTransitioner(s,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!s)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(s,t){return this._getTransitioner(s,s!==t&&t).getDistance()},_translate(s,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(s),i},_getTransitioner(s,t,n,i){return s===void 0&&(s=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(e.isNumber(s)?this.slides[s]:s,e.isNumber(t)?this.slides[t]:t,n*(e.isRtl?-1:1),i)}}};function W(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function b(s){return .5*s+300}var E={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==s)&&this.show(s)},events:["resize"]}},P={methods:{lazyload(s,t){s===void 0&&(s=this.$el),t===void 0&&(t=this.$el),this.registerObserver(e.observeIntersection(s,(n,i)=>{for(const d of e.toNodes(e.isFunction(t)?t():t))e.$$('[loading="lazy"]',d).forEach(r=>e.removeAttr(r,"loading"));for(const d of n.filter(r=>{let{isIntersecting:h}=r;return h}).map(r=>{let{target:h}=r;return h}))i.unobserve(d)}))}}},B={mixins:[P],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function y(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function L(s,t,n,i){let{center:d,easing:r,list:h}=i;const l=new e.Deferred,c=s?p(s,h,d):p(t,h,d)+e.dimensions(t).width*n,f=t?p(t,h,d):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(o,a,g){a===void 0&&(a=0);const m=g?"linear":r;return o-=Math.round(o*e.clamp(a,-1,1)),this.translate(a),a=s?a:e.clamp(a,0,1),u(this.getItemIn(),"itemin",{percent:a,duration:o,timing:m,dir:n}),s&&u(this.getItemIn(!0),"itemout",{percent:1-a,duration:o,timing:m,dir:n}),e.Transition.start(h,{transform:y(-f*(e.isRtl?-1:1),"px")},o,m).then(l.resolve,e.noop),l.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(o,a){return a===void 0&&(a=this.percent()),e.Transition.cancel(h),this.show(o,a,!0)},translate(o){const a=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",y(e.clamp(-f+(a-a*o),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const g=this.getActives(),m=this.getItemIn(),H=this.getItemIn(!0);o=s?e.clamp(o,-1,1):0;for(const x of e.children(h)){const C=e.includes(g,x),M=x===m,N=x===H,q=M||!N&&(C||n*(e.isRtl?-1:1)===-1^w(x,h)>w(s||t));u(x,"itemtranslate"+(q?"in":"out"),{dir:n,percent:N?1-o:M?o:C?1:0})}},percent(){return Math.abs((e.css(h,"transform").split(",")[4]*(e.isRtl?-1:1)+c)/(f-c))},getDistance(){return Math.abs(f-c)},getItemIn(o){o===void 0&&(o=!1);let a=this.getActives(),g=_(h,p(t||s,h,d));if(o){const m=a;a=g,g=m}return g[e.findIndex(g,m=>!e.includes(a,m))]},getActives(){return _(h,p(s||t,h,d))}}}function p(s,t,n){const i=w(s,t);return n?i-V(s,t):Math.min(i,A(t))}function A(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.children(s).reduce((t,n)=>e.dimensions(n).width+t,0)}function V(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function w(s,t){return s&&(e.position(s).left+(e.isRtl?e.dimensions(s).width-e.dimensions(t).width:0))*(e.isRtl?-1:1)||0}function _(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(d=>{const r=w(d,s),h=r+Math.min(e.dimensions(d).width,n);return r>=t&&h<=i})}function u(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var $={mixins:[v,O,E,B],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:L},computed:{avgWidth(){return I(this.list)/this.length},finite(s){let{finite:t}=s;return t||Math.ceil(I(this.list))<Math.trunc(e.dimensions(this.list).width+j(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let s=0;const t=A(this.list),n=e.findIndex(this.slides,i=>{if(s>=t)return!0;s+=e.dimensions(i).width});return~n?n:this.length-1},sets(s){let{sets:t}=s;if(!t)return;let n=0;const i=[],d=e.dimensions(this.list).width;for(let r=0;r<this.slides.length;r++){const h=e.dimensions(this.slides[r]).width;n+h>d&&(n=0),this.center?n<d/2&&n+h+e.dimensions(this.slides[+r+1]).width/2>d/2&&(i.push(+r),n=d/2-h/2):n===0&&i.push(Math.min(+r,this.maxIndex)),n+=h}if(i.length)return i},transitionOptions(){return{center:this.center,list:this.list}}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$("."+this.clsContainer,this.$el))},update:{write(){for(const s of this.navItems){const t=e.toNumber(e.data(s,this.attrItem));t!==!1&&(s.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!e.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(s){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");s.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((d,r)=>e.css(d,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const d=this.getIndex(--i+s,s),r=this.slides[d];e.css(r,"order",d>s?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const s=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)e.toggleClass(n,t,e.includes(s,n))},getValidIndex(s,t){if(s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),s=this.getIndex(s,t),!this.sets)return s;let n;do{if(e.includes(this.sets,s))return s;n=s,s=this.getIndex(s+this.dir,t)}while(s!==n);return s},getAdjacentSlides(){const{width:s}=e.dimensions(this.list),t=-s,n=s*2,i=e.dimensions(this.slides[this.index]).width,d=this.center?s/2-i/2:0,r=new Set;for(const h of[-1,1]){let l=d+(h>0?i:0),c=0;do{const f=this.slides[this.getIndex(this.index+h+c++*h)];l+=e.dimensions(f).width*h,r.add(f)}while(this.slides.length>c&&l>t&&l<n)}return Array.from(r)}}};function j(s){return Math.max(0,...e.children(s).map(t=>e.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",$),$});