uikit 3.15.17 → 3.15.18-dev.014d8e608

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 (50) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/build/util.js +2 -3
  3. package/dist/css/uikit-core-rtl.css +1 -1
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +1 -1
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +1 -1
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +1 -1
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +2 -2
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +15 -15
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +77 -84
  16. package/dist/js/components/lightbox-panel.min.js +9 -1
  17. package/dist/js/components/lightbox.js +80 -87
  18. package/dist/js/components/lightbox.min.js +9 -1
  19. package/dist/js/components/notification.js +14 -14
  20. package/dist/js/components/notification.min.js +4 -1
  21. package/dist/js/components/parallax.js +22 -22
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +18 -18
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +93 -45
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +18 -18
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +33 -38
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +7 -7
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +24 -24
  34. package/dist/js/components/tooltip.min.js +3 -1
  35. package/dist/js/components/upload.js +7 -7
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +303 -282
  38. package/dist/js/uikit-core.min.js +21 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +499 -432
  42. package/dist/js/uikit.min.js +34 -1
  43. package/package.json +1 -1
  44. package/src/js/components/lightbox-panel.js +3 -5
  45. package/src/js/components/slider.js +62 -7
  46. package/src/js/core/sticky.js +26 -9
  47. package/src/js/mixin/slider-drag.js +1 -1
  48. package/src/js/mixin/slider.js +2 -7
  49. package/src/js/util/viewport.js +4 -0
  50. package/tests/tooltip.html +1 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.17 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.18-dev.014d8e608 | 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')) :
@@ -126,7 +126,7 @@
126
126
  passive: true,
127
127
 
128
128
  delegate() {
129
- return this.selSlides;
129
+ return `${this.selList} > *`;
130
130
  },
131
131
 
132
132
  handler(e) {
@@ -314,12 +314,12 @@
314
314
  },
315
315
 
316
316
  computed: {
317
- nav(_ref, $el) {let { selNav } = _ref;
317
+ nav({ selNav }, $el) {
318
318
  return uikitUtil.$(selNav, $el);
319
319
  },
320
320
 
321
- selNavItem(_ref2) {let { attrItem } = _ref2;
322
- return "[" + attrItem + "],[data-" + attrItem + "]";
321
+ selNavItem({ attrItem }) {
322
+ return `[${attrItem}],[data-${attrItem}]`;
323
323
  },
324
324
 
325
325
  navItems(_, $el) {
@@ -333,7 +333,7 @@
333
333
  uikitUtil.html(
334
334
  this.nav,
335
335
  this.slides.
336
- map((_, i) => "<li " + this.attrItem + "=\"" + i + "\"><a href></a></li>").
336
+ map((_, i) => `<li ${this.attrItem}="${i}"><a href></a></li>`).
337
337
  join(''));
338
338
 
339
339
  }
@@ -392,8 +392,7 @@
392
392
  easing: String,
393
393
  index: Number,
394
394
  finite: Boolean,
395
- velocity: Number,
396
- selSlides: String
395
+ velocity: Number
397
396
  },
398
397
 
399
398
  data: () => ({
@@ -421,11 +420,11 @@
421
420
  },
422
421
 
423
422
  computed: {
424
- duration(_ref, $el) {let { velocity } = _ref;
423
+ duration({ velocity }, $el) {
425
424
  return speedUp($el.offsetWidth / velocity);
426
425
  },
427
426
 
428
- list(_ref2, $el) {let { selList } = _ref2;
427
+ list({ selList }, $el) {
429
428
  return uikitUtil.$(selList, $el);
430
429
  },
431
430
 
@@ -433,13 +432,9 @@
433
432
  return this.length - 1;
434
433
  },
435
434
 
436
- selSlides(_ref3) {let { selList, selSlides } = _ref3;
437
- return selList + " " + (selSlides || '> *');
438
- },
439
-
440
435
  slides: {
441
436
  get() {
442
- return uikitUtil.$$(this.selSlides, this.$el);
437
+ return uikitUtil.children(this.list);
443
438
  },
444
439
 
445
440
  watch() {
@@ -453,7 +448,7 @@
453
448
  },
454
449
 
455
450
  methods: {
456
- show(index, force) {if (force === void 0) {force = false;}
451
+ show(index, force = false) {
457
452
  if (this.dragging || !this.length) {
458
453
  return;
459
454
  }
@@ -524,11 +519,11 @@
524
519
  return promise;
525
520
  },
526
521
 
527
- getIndex(index, prev) {if (index === void 0) {index = this.index;}if (prev === void 0) {prev = this.index;}
522
+ getIndex(index = this.index, prev = this.index) {
528
523
  return uikitUtil.clamp(uikitUtil.getIndex(index, this.slides, prev, this.finite), 0, this.maxIndex);
529
524
  },
530
525
 
531
- getValidIndex(index, prevIndex) {if (index === void 0) {index = this.index;}if (prevIndex === void 0) {prevIndex = this.prevIndex;}
526
+ getValidIndex(index = this.index, prevIndex = this.prevIndex) {
532
527
  return this.getIndex(index, prevIndex);
533
528
  },
534
529
 
@@ -558,18 +553,18 @@
558
553
  return this._getTransitioner(prev, prev !== next && next).getDistance();
559
554
  },
560
555
 
561
- _translate(percent, prev, next) {if (prev === void 0) {prev = this.prevIndex;}if (next === void 0) {next = this.index;}
556
+ _translate(percent, prev = this.prevIndex, next = this.index) {
562
557
  const transitioner = this._getTransitioner(prev !== next ? prev : false, next);
563
558
  transitioner.translate(percent);
564
559
  return transitioner;
565
560
  },
566
561
 
567
562
  _getTransitioner(
568
- prev,
569
- next,
570
- dir,
571
- options)
572
- {if (prev === void 0) {prev = this.prevIndex;}if (next === void 0) {next = this.index;}if (dir === void 0) {dir = this.dir || 1;}if (options === void 0) {options = this.transitionOptions;}
563
+ prev = this.prevIndex,
564
+ next = this.index,
565
+ dir = this.dir || 1,
566
+ options = this.transitionOptions)
567
+ {
573
568
  return new this.Transitioner(
574
569
  uikitUtil.isNumber(prev) ? this.slides[prev] : prev,
575
570
  uikitUtil.isNumber(next) ? this.slides[next] : next,
@@ -614,7 +609,7 @@
614
609
  },
615
610
 
616
611
  methods: {
617
- lazyload(observeTargets, targets) {if (observeTargets === void 0) {observeTargets = this.$el;}if (targets === void 0) {targets = this.$el;}
612
+ lazyload(observeTargets = this.$el, targets = this.$el) {
618
613
  this.registerObserver(
619
614
  uikitUtil.observeIntersection(observeTargets, (entries, observer) => {
620
615
  for (const el of uikitUtil.toNodes(uikitUtil.isFunction(targets) ? targets() : targets)) {
@@ -624,8 +619,8 @@
624
619
  }
625
620
 
626
621
  for (const el of entries.
627
- filter((_ref) => {let { isIntersecting } = _ref;return isIntersecting;}).
628
- map((_ref2) => {let { target } = _ref2;return target;})) {
622
+ filter(({ isIntersecting }) => isIntersecting).
623
+ map(({ target }) => target)) {
629
624
  observer.unobserve(el);
630
625
  }
631
626
  }));
@@ -642,12 +637,12 @@
642
637
  }
643
638
  };
644
639
 
645
- function translate(value, unit) {if (value === void 0) {value = 0;}if (unit === void 0) {unit = '%';}
640
+ function translate(value = 0, unit = '%') {
646
641
  value += value ? unit : '';
647
- return "translate3d(" + value + ", 0, 0)";
642
+ return `translate3d(${value}, 0, 0)`;
648
643
  }
649
644
 
650
- function Transitioner (prev, next, dir, _ref) {let { center, easing, list } = _ref;
645
+ function Transitioner (prev, next, dir, { center, easing, list }) {
651
646
  const deferred = new uikitUtil.Deferred();
652
647
 
653
648
  const from = prev ?
@@ -660,7 +655,7 @@
660
655
  return {
661
656
  dir,
662
657
 
663
- show(duration, percent, linear) {if (percent === void 0) {percent = 0;}
658
+ show(duration, percent = 0, linear) {
664
659
  const timing = linear ? 'linear' : easing;
665
660
  duration -= Math.round(duration * uikitUtil.clamp(percent, -1, 1));
666
661
 
@@ -694,7 +689,7 @@
694
689
  uikitUtil.css(list, 'transform', '');
695
690
  },
696
691
 
697
- forward(duration, percent) {if (percent === void 0) {percent = this.percent();}
692
+ forward(duration, percent = this.percent()) {
698
693
  uikitUtil.Transition.cancel(list);
699
694
  return this.show(duration, percent, true);
700
695
  },
@@ -732,7 +727,7 @@
732
727
  dir * (uikitUtil.isRtl ? -1 : 1) === -1 ^
733
728
  getElLeft(slide, list) > getElLeft(prev || next));
734
729
 
735
- triggerUpdate(slide, "itemtranslate" + (translateIn ? 'in' : 'out'), {
730
+ triggerUpdate(slide, `itemtranslate${translateIn ? 'in' : 'out'}`, {
736
731
  dir,
737
732
  percent: isOut ? 1 - percent : isIn ? percent : isActive ? 1 : 0
738
733
  });
@@ -749,7 +744,7 @@
749
744
  return Math.abs(to - from);
750
745
  },
751
746
 
752
- getItemIn(out) {if (out === void 0) {out = false;}
747
+ getItemIn(out = false) {
753
748
  let actives = this.getActives();
754
749
  let nextActives = inView(list, getLeft(next || prev, list, center));
755
750
 
@@ -835,12 +830,8 @@
835
830
  return getWidth(this.list) / this.length;
836
831
  },
837
832
 
838
- finite(_ref) {let { finite } = _ref;
839
- return (
840
- finite ||
841
- Math.ceil(getWidth(this.list)) <
842
- Math.trunc(uikitUtil.dimensions(this.list).width + getMaxElWidth(this.list) + this.center));
843
-
833
+ finite({ finite }) {
834
+ return finite || isFinite(this.list, this.center);
844
835
  },
845
836
 
846
837
  maxIndex() {
@@ -865,7 +856,7 @@
865
856
  return ~index ? index : this.length - 1;
866
857
  },
867
858
 
868
- sets(_ref2) {let { sets: enabled } = _ref2;
859
+ sets({ sets: enabled }) {
869
860
  if (!enabled) {
870
861
  return;
871
862
  }
@@ -873,7 +864,7 @@
873
864
  let left = 0;
874
865
  const sets = [];
875
866
  const width = uikitUtil.dimensions(this.list).width;
876
- for (let i = 0; i < this.slides.length; i++) {
867
+ for (let i = 0; i < this.length; i++) {
877
868
  const slideWidth = uikitUtil.dimensions(this.slides[i]).width;
878
869
 
879
870
  if (left + slideWidth > width) {
@@ -909,7 +900,7 @@
909
900
  },
910
901
 
911
902
  connected() {
912
- uikitUtil.toggleClass(this.$el, this.clsContainer, !uikitUtil.$("." + this.clsContainer, this.$el));
903
+ uikitUtil.toggleClass(this.$el, this.clsContainer, !uikitUtil.$(`.${this.clsContainer}`, this.$el));
913
904
  },
914
905
 
915
906
  update: {
@@ -1030,7 +1021,7 @@
1030
1021
  }
1031
1022
  },
1032
1023
 
1033
- getValidIndex(index, prevIndex) {if (index === void 0) {index = this.index;}if (prevIndex === void 0) {prevIndex = this.prevIndex;}
1024
+ getValidIndex(index = this.index, prevIndex = this.prevIndex) {
1034
1025
  index = this.getIndex(index, prevIndex);
1035
1026
 
1036
1027
  if (!this.sets) {
@@ -1065,13 +1056,70 @@
1065
1056
  const slide = this.slides[this.getIndex(this.index + i + j++ * i)];
1066
1057
  currentLeft += uikitUtil.dimensions(slide).width * i;
1067
1058
  slides.add(slide);
1068
- } while (this.slides.length > j && currentLeft > left && currentLeft < right);
1059
+ } while (this.length > j && currentLeft > left && currentLeft < right);
1069
1060
  }
1070
1061
  return Array.from(slides);
1071
1062
  }
1072
1063
  }
1073
1064
  };
1074
1065
 
1066
+ function isFinite(list, center) {
1067
+ const { length } = list;
1068
+
1069
+ if (length < 2) {
1070
+ return true;
1071
+ }
1072
+
1073
+ const { width: listWidth } = uikitUtil.dimensions(list);
1074
+ if (!center) {
1075
+ return Math.ceil(getWidth(list)) < Math.trunc(listWidth + getMaxElWidth(list));
1076
+ }
1077
+
1078
+ const slides = uikitUtil.children(list);
1079
+ const listHalf = Math.trunc(listWidth / 2);
1080
+ for (const index in slides) {
1081
+ const slide = slides[index];
1082
+ const slideWidth = uikitUtil.dimensions(slide).width;
1083
+ const slidesInView = new Set([slide]);
1084
+
1085
+ let diff = 0;
1086
+ for (const i of [-1, 1]) {
1087
+ let left = slideWidth / 2;
1088
+
1089
+ let j = 0;
1090
+
1091
+ while (left < listHalf) {
1092
+ const nextSlide = slides[uikitUtil.getIndex(+index + i + j++ * i, slides)];
1093
+
1094
+ if (slidesInView.has(nextSlide)) {
1095
+ return true;
1096
+ }
1097
+
1098
+ left += uikitUtil.dimensions(nextSlide).width;
1099
+ slidesInView.add(nextSlide);
1100
+ }
1101
+ diff = Math.max(
1102
+ diff,
1103
+ slideWidth / 2 +
1104
+ uikitUtil.dimensions(slides[uikitUtil.getIndex(+index + i, slides)]).width / 2 - (
1105
+ left - listHalf));
1106
+
1107
+ }
1108
+
1109
+ if (
1110
+ diff >
1111
+ uikitUtil.sumBy(
1112
+ slides.filter((slide) => !slidesInView.has(slide)),
1113
+ (slide) => uikitUtil.dimensions(slide).width))
1114
+
1115
+ {
1116
+ return true;
1117
+ }
1118
+ }
1119
+
1120
+ return false;
1121
+ }
1122
+
1075
1123
  function getMaxElWidth(list) {
1076
1124
  return Math.max(0, ...uikitUtil.children(list).map((el) => uikitUtil.dimensions(el).width));
1077
1125
  }
@@ -1 +1 @@
1
- /*! UIkit 3.15.17 | 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.addClass(this.$el,this.$options.id)}},D={connected(){var s;this.registerObserver(e.observeResize(((s=this.$options.resizeTargets)==null?void 0:s.call(this))||this.$el,()=>this.$emit("resize")))}},O={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)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},W="touchstart mousedown",b="touchmove mousemove",_="touchend touchcancel mouseup click input scroll";var E={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:W,passive:!0,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&B(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}},{name:b,el(){return this.list},handler:e.noop,...w}],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,b,this.move,w),e.on(document,_,this.end,A),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,o=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&o>h;)this.drag-=h*this.dir,i=r,o-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=o/h;const l=n[i],c=n[r],f=this.index!==r,d=i===r;let a;[this.index,this.prevIndex].filter(g=>!e.includes([r,i],g)).forEach(g=>{e.trigger(n[g],"itemhidden",[this]),d&&(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,!d&&e.trigger(l,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!d&&c),f&&(!d&&e.trigger(l,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,b,this.move,w),e.off(document,_,this.end,A),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 B(s){return e.css(s,"userSelect")!=="none"&&e.toNodes(s.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var P={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))}}}},L={mixins:[O,E,P,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return $(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.$emit("resize")}},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,o=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],l=this.getIndex(s,this.index),c=this.slides[l];if(h===c){o();return}if(this.dir=V(s,r),this.prevIndex=r,this.index=l,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,o();return}const f=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(d=>{requestAnimationFrame(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,d()})})));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 V(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function $(s){return .5*s+300}var j={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);!~this.prevIndex||this.index!==s?this.show(s):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},q={data:{preload:5},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 o of e.toNodes(e.isFunction(t)?t():t))e.$$('[loading="lazy"]',o).slice(0,this.preload-1).forEach(r=>e.removeAttr(r,"loading"));for(const o of n.filter(r=>{let{isIntersecting:h}=r;return h}).map(r=>{let{target:h}=r;return h}))i.unobserve(o)}))}}},F={mixins:[q],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function S(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function H(s,t,n,i){let{center:o,easing:r,list:h}=i;const l=new e.Deferred,c=s?p(s,h,o):p(t,h,o)+e.dimensions(t).width*n,f=t?p(t,h,o):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(d,a,g){a===void 0&&(a=0);const m=g?"linear":r;return d-=Math.round(d*e.clamp(a,-1,1)),this.translate(a),a=s?a:e.clamp(a,0,1),y(this.getItemIn(),"itemin",{percent:a,duration:d,timing:m,dir:n}),s&&y(this.getItemIn(!0),"itemout",{percent:1-a,duration:d,timing:m,dir:n}),e.Transition.start(h,{transform:S(-f*(e.isRtl?-1:1),"px")},d,m).then(l.resolve,e.noop),l.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(d,a){return a===void 0&&(a=this.percent()),e.Transition.cancel(h),this.show(d,a,!0)},translate(d){const a=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",S(e.clamp(-f+(a-a*d),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const g=this.getActives(),m=this.getItemIn(),K=this.getItemIn(!0);d=s?e.clamp(d,-1,1):0;for(const x of e.children(h)){const R=e.includes(g,x),T=x===m,z=x===K,Q=T||!z&&(R||n*(e.isRtl?-1:1)===-1^u(x,h)>u(s||t));y(x,"itemtranslate"+(Q?"in":"out"),{dir:n,percent:z?1-d:T?d:R?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(d){d===void 0&&(d=!1);let a=this.getActives(),g=C(h,p(t||s,h,o));if(d){const m=a;a=g,g=m}return g[e.findIndex(g,m=>!e.includes(a,m))]},getActives(){return C(h,p(s||t,h,o))}}}function p(s,t,n){const i=u(s,t);return n?i-G(s,t):Math.min(i,N(t))}function N(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.sumBy(e.children(s),t=>e.dimensions(t).width)}function G(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function u(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 C(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(o=>{const r=u(o,s),h=r+Math.min(e.dimensions(o).width,n);return r>=t&&h<=i})}function y(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var M={mixins:[v,L,j,F],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:H},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=N(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=[],o=e.dimensions(this.list).width;for(let r=0;r<this.slides.length;r++){const h=e.dimensions(this.slides[r]).width;n+h>o&&(n=0),this.center?n<o/2&&n+h+e.dimensions(this.slides[+r+1]).width/2>o/2&&(i.push(+r),n=o/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=$(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((o,r)=>e.css(o,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const o=this.getIndex(--i+s,s),r=this.slides[o];e.css(r,"order",o>s?-2:-1),n-=e.dimensions(r).width}},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,o=this.center?s/2-i/2:0,r=new Set;for(const h of[-1,1]){let l=o+(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",M),M});
1
+ /*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){s.addClass(this.$el,this.$options.id)}},D={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},W={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)}}};const u={passive:!1,capture:!0},y={passive:!0,capture:!0},O="touchstart mousedown",w="touchmove mousemove",A="touchend touchcancel mouseup click input scroll";var E={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const i=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:O,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&B(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:w,el(){return this.list},handler:s.noop,...u}],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,w,this.move,u),s.on(document,A,this.end,y),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:i}=this,h=Math.abs(t),r=this.getIndex(i+this.dir,i),o=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&h>o;)this.drag-=o*this.dir,i=r,h-=o,r=this.getIndex(i+this.dir,i),o=this._getDistance(i,r)||n[i].offsetWidth;this.percent=h/o;const g=n[i],c=n[r],d=this.index!==r,a=i===r;let l;[this.index,this.prevIndex].filter(f=>!s.includes([r,i],f)).forEach(f=>{s.trigger(n[f],"itemhidden",[this]),a&&(l=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||l)&&s.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=i,this.index=r,!a&&s.trigger(g,"beforeitemhide",[this]),s.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),g,!a&&c),d&&(!a&&s.trigger(g,"itemhide",[this]),s.trigger(c,"itemshow",[this]))},end(){if(s.off(document,w,this.move,u),s.off(document,A,this.end,y),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 B(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var P={data:{selNav:!1},computed:{nav({selNav:e},t){return s.$(e,t)},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},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))}}}},V={mixins:[W,E,P,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},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({velocity:e},t){return _(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,t=!1){if(this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,h=()=>{n.splice(i,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 r=this.getIndex(this.index),o=s.hasClass(this.slides,this.clsActive)&&this.slides[r],g=this.getIndex(e,this.index),c=this.slides[g];if(o===c){h();return}if(this.dir=j(e,r),this.prevIndex=r,this.index=g,o&&!s.trigger(o,"beforeitemhide",[this])||!s.trigger(c,"beforeitemshow",[this,o])){this.index=this.prevIndex,h();return}const d=this._show(o,c,t).then(()=>(o&&s.trigger(o,"itemhidden",[this]),s.trigger(c,"itemshown",[this]),new Promise(a=>{requestAnimationFrame(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,a()})})));return o&&s.trigger(o,"itemhide",[this]),s.trigger(c,"itemshow",[this]),d},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,t=this.prevIndex){return this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length: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(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t=this.prevIndex,n=this.index){const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(e),i},_getTransitioner(e=this.prevIndex,t=this.index,n=this.dir||1,i=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),i)}}};function j(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function _(e){return .5*e+300}var L={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);!~this.prevIndex||this.index!==e?this.show(e):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},F={data:{preload:5},methods:{lazyload(e=this.$el,t=this.$el){this.registerObserver(s.observeIntersection(e,(n,i)=>{for(const h of s.toNodes(s.isFunction(t)?t():t))s.$$('[loading="lazy"]',h).slice(0,this.preload-1).forEach(r=>s.removeAttr(r,"loading"));for(const h of n.filter(({isIntersecting:r})=>r).map(({target:r})=>r))i.unobserve(h)}))}}},H={mixins:[F],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function M(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function q(e,t,n,{center:i,easing:h,list:r}){const o=new s.Deferred,g=e?v(e,r,i):v(t,r,i)+s.dimensions(t).width*n,c=t?v(t,r,i):g+s.dimensions(e).width*n*(s.isRtl?-1:1);return{dir:n,show(d,a=0,l){const f=l?"linear":h;return d-=Math.round(d*s.clamp(a,-1,1)),this.translate(a),a=e?a:s.clamp(a,0,1),b(this.getItemIn(),"itemin",{percent:a,duration:d,timing:f,dir:n}),e&&b(this.getItemIn(!0),"itemout",{percent:1-a,duration:d,timing:f,dir:n}),s.Transition.start(r,{transform:M(-c*(s.isRtl?-1:1),"px")},d,f).then(o.resolve,s.noop),o.promise},cancel(){s.Transition.cancel(r)},reset(){s.css(r,"transform","")},forward(d,a=this.percent()){return s.Transition.cancel(r),this.show(d,a,!0)},translate(d){const a=this.getDistance()*n*(s.isRtl?-1:1);s.css(r,"transform",M(s.clamp(-c+(a-a*d),-x(r),s.dimensions(r).width)*(s.isRtl?-1:1),"px"));const l=this.getActives(),f=this.getItemIn(),$=this.getItemIn(!0);d=e?s.clamp(d,-1,1):0;for(const m of s.children(r)){const T=s.includes(l,m),R=m===f,z=m===$,Q=R||!z&&(T||n*(s.isRtl?-1:1)===-1^I(m,r)>I(e||t));b(m,`itemtranslate${Q?"in":"out"}`,{dir:n,percent:z?1-d:R?d:T?1:0})}},percent(){return Math.abs((s.css(r,"transform").split(",")[4]*(s.isRtl?-1:1)+g)/(c-g))},getDistance(){return Math.abs(c-g)},getItemIn(d=!1){let a=this.getActives(),l=N(r,v(t||e,r,i));if(d){const f=a;a=l,l=f}return l[s.findIndex(l,f=>!s.includes(a,f))]},getActives(){return N(r,v(e||t,r,i))}}}function v(e,t,n){const i=I(e,t);return n?i-G(e,t):Math.min(i,C(t))}function C(e){return Math.max(0,x(e)-s.dimensions(e).width)}function x(e){return s.sumBy(s.children(e),t=>s.dimensions(t).width)}function G(e,t){return s.dimensions(t).width/2-s.dimensions(e).width/2}function I(e,t){return e&&(s.position(e).left+(s.isRtl?s.dimensions(e).width-s.dimensions(t).width:0))*(s.isRtl?-1:1)||0}function N(e,t){t-=1;const n=s.dimensions(e).width,i=t+n+2;return s.children(e).filter(h=>{const r=I(h,e),o=r+Math.min(s.dimensions(h).width,n);return r>=t&&o<=i})}function b(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var S={mixins:[p,V,L,H],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:q},computed:{avgWidth(){return x(this.list)/this.length},finite({finite:e}){return e||J(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return s.last(this.sets);let e=0;const t=C(this.list),n=s.findIndex(this.slides,i=>{if(e>=t)return!0;e+=s.dimensions(i).width});return~n?n:this.length-1},sets({sets:e}){if(!e)return;let t=0;const n=[],i=s.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=s.dimensions(this.slides[h]).width;t+r>i&&(t=0),this.center?t<i/2&&t+r+s.dimensions(this.slides[+h+1]).width/2>i/2&&(n.push(+h),t=i/2-r/2):t===0&&n.push(Math.min(+h,this.maxIndex)),t+=r}if(n.length)return n},transitionOptions(){return{center:this.center,list:this.list}}},connected(){s.toggleClass(this.$el,this.clsContainer,!s.$(`.${this.clsContainer}`,this.$el))},update:{write(){for(const e of this.navItems){const t=s.toNumber(s.data(e,this.attrItem));t!==!1&&(e.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!s.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(e){!this.dragging&&this.sets&&this.stack.length<2&&!s.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");e.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=_(this.avgWidth/this.velocity)*(s.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&s.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){s.css(this.slides,"order","");return}const e=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((h,r)=>s.css(h,"order",this.dir>0&&r<e?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[e];let n=s.dimensions(this.list).width/2-s.dimensions(t).width/2,i=0;for(;n>0;){const h=this.getIndex(--i+e,e),r=this.slides[h];s.css(r,"order",h>e?-2:-1),n-=s.dimensions(r).width}},updateActiveClasses(){const e=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||s.includes(this.sets,s.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)s.toggleClass(n,t,s.includes(e,n))},getValidIndex(e=this.index,t=this.prevIndex){if(e=this.getIndex(e,t),!this.sets)return e;let n;do{if(s.includes(this.sets,e))return e;n=e,e=this.getIndex(e+this.dir,t)}while(e!==n);return e},getAdjacentSlides(){const{width:e}=s.dimensions(this.list),t=-e,n=e*2,i=s.dimensions(this.slides[this.index]).width,h=this.center?e/2-i/2:0,r=new Set;for(const o of[-1,1]){let g=h+(o>0?i:0),c=0;do{const d=this.slides[this.getIndex(this.index+o+c++*o)];g+=s.dimensions(d).width*o,r.add(d)}while(this.length>c&&g>t&&g<n)}return Array.from(r)}}};function J(e,t){const{length:n}=e;if(n<2)return!0;const{width:i}=s.dimensions(e);if(!t)return Math.ceil(x(e))<Math.trunc(i+K(e));const h=s.children(e),r=Math.trunc(i/2);for(const o in h){const g=h[o],c=s.dimensions(g).width,d=new Set([g]);let a=0;for(const l of[-1,1]){let f=c/2,$=0;for(;f<r;){const m=h[s.getIndex(+o+l+$++*l,h)];if(d.has(m))return!0;f+=s.dimensions(m).width,d.add(m)}a=Math.max(a,c/2+s.dimensions(h[s.getIndex(+o+l,h)]).width/2-(f-r))}if(a>s.sumBy(h.filter(l=>!d.has(l)),l=>s.dimensions(l).width))return!0}return!1}function K(e){return Math.max(0,...s.children(e).map(t=>s.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",S),S});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.17 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.18-dev.014d8e608 | 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')) :
@@ -40,13 +40,13 @@
40
40
  function toMedia(value, element) {
41
41
  if (uikitUtil.isString(value)) {
42
42
  if (uikitUtil.startsWith(value, '@')) {
43
- value = uikitUtil.toFloat(uikitUtil.css(element, "--uk-breakpoint-" + value.substr(1)));
43
+ value = uikitUtil.toFloat(uikitUtil.css(element, `--uk-breakpoint-${value.substr(1)}`));
44
44
  } else if (isNaN(value)) {
45
45
  return value;
46
46
  }
47
47
  }
48
48
 
49
- return value && uikitUtil.isNumeric(value) ? "(min-width: " + value + "px)" : '';
49
+ return value && uikitUtil.isNumeric(value) ? `(min-width: ${value}px)` : '';
50
50
  }
51
51
 
52
52
  uikitUtil.memoize(async (src) => {
@@ -153,7 +153,7 @@
153
153
  let transformFn;
154
154
 
155
155
  if (prop === 'x' || prop === 'y') {
156
- prop = "translate" + uikitUtil.ucfirst(prop);
156
+ prop = `translate${uikitUtil.ucfirst(prop)}`;
157
157
  transformFn = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
158
158
  } else if (prop === 'scale') {
159
159
  unit = '';
@@ -168,7 +168,7 @@
168
168
  stops = parseStops(stops, transformFn);
169
169
 
170
170
  return (css, percent) => {
171
- css.transform += " " + prop + "(" + getValue(stops, percent) + unit + ")";
171
+ css.transform += ` ${prop}(${getValue(stops, percent)}${unit})`;
172
172
  };
173
173
  }
174
174
 
@@ -187,7 +187,7 @@
187
187
  return i === 3 ? uikitUtil.toFloat(value) : parseInt(value, 10);
188
188
  }).
189
189
  join(',');
190
- css[prop] = "rgba(" + value + ")";
190
+ css[prop] = `rgba(${value})`;
191
191
  };
192
192
  }
193
193
 
@@ -211,7 +211,7 @@
211
211
 
212
212
  return (css, percent) => {
213
213
  const value = getValue(stops, percent);
214
- css.filter += " " + prop + "(" + (value + unit) + ")";
214
+ css.filter += ` ${prop}(${value + unit})`;
215
215
  };
216
216
  }
217
217
 
@@ -239,7 +239,7 @@
239
239
  return unit === '%' ? stop * length / 100 : stop;
240
240
  });
241
241
 
242
- if (!stops.some((_ref) => {let [value] = _ref;return value;})) {
242
+ if (!stops.some(([value]) => value)) {
243
243
  return uikitUtil.noop;
244
244
  }
245
245
 
@@ -291,13 +291,13 @@
291
291
 
292
292
  const positions = {};
293
293
  for (const prop of bgProps) {
294
- const values = props[prop].map((_ref2) => {let [value] = _ref2;return value;});
294
+ const values = props[prop].map(([value]) => value);
295
295
  const min = Math.min(...values);
296
296
  const max = Math.max(...values);
297
297
  const down = values.indexOf(min) < values.indexOf(max);
298
298
  const diff = max - min;
299
299
 
300
- positions[prop] = (down ? -diff : 0) - (down ? min : max) + "px";
300
+ positions[prop] = `${(down ? -diff : 0) - (down ? min : max)}px`;
301
301
  dimEl[prop === 'bgy' ? 'height' : 'width'] += diff;
302
302
  }
303
303
 
@@ -306,26 +306,26 @@
306
306
  for (const prop of bgProps) {
307
307
  const attr = prop === 'bgy' ? 'height' : 'width';
308
308
  const overflow = dim[attr] - dimEl[attr];
309
- positions[prop] = "max(" + getBackgroundPos(el, prop) + ",-" + overflow + "px) + " + positions[prop];
309
+ positions[prop] = `max(${getBackgroundPos(el, prop)},-${overflow}px) + ${positions[prop]}`;
310
310
  }
311
311
 
312
312
  const fn = setBackgroundPosFn(bgProps, positions, props);
313
313
  return (css, percent) => {
314
314
  fn(css, percent);
315
- css.backgroundSize = dim.width + "px " + dim.height + "px";
315
+ css.backgroundSize = `${dim.width}px ${dim.height}px`;
316
316
  css.backgroundRepeat = 'no-repeat';
317
317
  };
318
318
  }
319
319
 
320
320
  function getBackgroundPos(el, prop) {
321
- return getCssValue(el, "background-position-" + prop.substr(-1), '');
321
+ return getCssValue(el, `background-position-${prop.substr(-1)}`, '');
322
322
  }
323
323
 
324
324
  function setBackgroundPosFn(bgProps, positions, props) {
325
325
  return function (css, percent) {
326
326
  for (const prop of bgProps) {
327
327
  const value = getValue(props[prop], percent);
328
- css["background-position-" + prop.substr(-1)] = "calc(" + positions[prop] + " + " + value + "px)";
328
+ css[`background-position-${prop.substr(-1)}`] = `calc(${positions[prop]} + ${value}px)`;
329
329
  }
330
330
  };
331
331
  }
@@ -361,7 +361,7 @@
361
361
  };
362
362
  }
363
363
 
364
- function parseStops(stops, fn) {if (fn === void 0) {fn = uikitUtil.toFloat;}
364
+ function parseStops(stops, fn = uikitUtil.toFloat) {
365
365
  const result = [];
366
366
  const { length } = stops;
367
367
  let nullIndex = 0;
@@ -404,7 +404,7 @@
404
404
  }
405
405
 
406
406
  function getStop(stops, percent) {
407
- const index = uikitUtil.findIndex(stops.slice(1), (_ref3) => {let [, targetPercent] = _ref3;return percent <= targetPercent;}) + 1;
407
+ const index = uikitUtil.findIndex(stops.slice(1), ([, targetPercent]) => percent <= targetPercent) + 1;
408
408
  return [
409
409
  stops[index - 1][0],
410
410
  stops[index][0],
@@ -467,7 +467,7 @@
467
467
  return this.item;
468
468
  },
469
469
 
470
- handler(_ref) {let { type, detail: { percent, duration, timing, dir } } = _ref;
470
+ handler({ type, detail: { percent, duration, timing, dir } }) {
471
471
  uikitUtil.fastdom.read(() => {
472
472
  if (!this.matchMedia) {
473
473
  return;
@@ -506,7 +506,7 @@
506
506
  return this.item;
507
507
  },
508
508
 
509
- handler(_ref2) {let { type, detail: { percent, dir } } = _ref2;
509
+ handler({ type, detail: { percent, dir } }) {
510
510
  uikitUtil.fastdom.read(() => {
511
511
  if (!this.matchMedia) {
512
512
  this.reset();
@@ -1 +1 @@
1
- /*! UIkit 3.15.17 | 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("uikitslideshow_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlideshow_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=E(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function E(e,t){if(r.isString(e)){if(r.startsWith(e,"@"))e=r.toFloat(r.css(t,"--uk-breakpoint-"+e.substr(1)));else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function R(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const y={x:F,y:F,rotate:F,scale:F,color:v,backgroundColor:v,borderColor:v,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:H,stroke:L,bgx:P,bgy:P},{keys:$}=Object;var _={mixins:[g],props:W($(y),"list"),data:W($(y),void 0),computed:{props(e,t){const n={};for(const s in e)s in y&&!r.isUndefined(e[s])&&(n[s]=e[s].slice());const o={};for(const s in n)o[s]=y[s](s,t,n[s],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t.willChange=Object.keys(t).filter(n=>t[n]!=="").join(","),t}}};function F(e,t,n){let o=j(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=>j([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=m(n,s),(a,i)=>{a.transform+=" "+e+"("+b(n,i)+o+")"}}function v(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n,o=>q(t,o)),(o,s)=>{const[a,i,c]=S(n,s),d=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]="rgba("+d+")"}}function q(e,t){return x(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=j(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=m(n),(s,a)=>{const i=b(n,a);s.filter+=" "+e+"("+(i+o)+")"}}function H(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n),(o,s)=>{o[e]=b(n,s)}}function L(e,t,n){n.length===1&&n.unshift(0);const o=j(n),s=R(t);return n=m(n.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),n.some(a=>{let[i]=a;return i})?(r.css(t,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=b(n,i)}):r.noop}function P(e,t,n,o){n.length===1&&n.unshift(0);const s=e==="bgy"?"height":"width";o[e]=m(n,c=>r.toPx(c,s,t));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&e==="bgx")return r.noop;if(x(t,"backgroundSize","")==="cover")return V(e,t,n,o);const i={};for(const c of a)i[c]=p(t,c);return O(a,i,o)}function V(e,t,n,o){const s=A(t);if(!s.width)return r.noop;const a={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const h=o[f].map(J=>{let[K]=J;return K}),w=Math.min(...h),I=Math.max(...h),B=h.indexOf(w)<h.indexOf(I),N=I-w;c[f]=(B?-N:0)-(B?w:I)+"px",a[f==="bgy"?"height":"width"]+=N}const d=r.Dimensions.cover(s,a);for(const f of i){const h=f==="bgy"?"height":"width",w=d[h]-a[h];c[f]="max("+p(t,f)+",-"+w+"px) + "+c[f]}const u=O(i,c,o);return(f,h)=>{u(f,h),f.backgroundSize=d.width+"px "+d.height+"px",f.backgroundRepeat="no-repeat"}}function p(e,t){return x(e,"background-position-"+t.substr(-1),"")}function O(e,t,n){return function(o,s){for(const a of e){const i=b(n[a],s);o["background-position-"+a.substr(-1)]="calc("+t[a]+" + "+i+"px)"}}}const M={};function A(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(M[t])return M[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{M[t]=C(n),r.trigger(e,r.createEvent("load",!1))},C(n)):M[t]=C(n)}function C(e){return{width:e.naturalWidth,height:e.naturalHeight}}function m(e,t){t===void 0&&(t=r.toFloat);const n=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(i=t(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&n.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(n.push([i,c]),c=1)),n.push([i,c]),c===null)s++;else if(s){const d=n[a-s-1][1],u=(c-d)/(s+1);for(let f=s;f>0;f--)n[a-f][1]=d+u*(s-f+1);s=0}}return n}function S(e,t){const n=r.findIndex(e.slice(1),o=>{let[,s]=o;return t<=s})+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function b(e,t){const[n,o,s]=S(e,t);return r.isNumber(n)?n+Math.abs(n-o)*s*(n<o?1:-1):+o}const G=/^-?\d+(\S+)?/;function j(e,t){for(const n of e){const o=n.match==null?void 0:n.match(G);if(o)return o[1]}return t}function x(e,t,n){const o=e.style[t],s=r.css(r.css(e,t,n),t);return e.style[t]=o,s}function W(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var T={mixins:[_],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:o,timing:s,dir:a}}=e;r.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(z(t,a,n)),c=this.getCss(D(t)?.5:a>0?1:0);r.fastdom.write(()=>{r.css(this.$el,i),r.Transition.start(this.$el,c,o,s).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:o}}=e;r.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const s=this.getCss(z(t,o,n));r.fastdom.write(()=>r.css(this.$el,s))})}}]};function D(e){return r.endsWith(e,"in")}function z(e,t,n){return n/=2,D(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",T),T});
1
+ /*! UIkit 3.15.18-dev.014d8e608 | 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("uikitslideshow_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlideshow_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=E(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function E(e,t){if(r.isString(e)){if(r.startsWith(e,"@"))e=r.toFloat(r.css(t,`--uk-breakpoint-${e.substr(1)}`));else if(isNaN(e))return e}return e&&r.isNumeric(e)?`(min-width: ${e}px)`:""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function R(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const w={x:y,y,rotate:y,scale:y,color:j,backgroundColor:j,borderColor:j,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:H,stroke:L,bgx:v,bgy:v},{keys:P}=Object;var _={mixins:[g],props:W(P(w),"list"),data:W(P(w),void 0),computed:{props(e,t){const n={};for(const s in e)s in w&&!r.isUndefined(e[s])&&(n[s]=e[s].slice());const o={};for(const s in n)o[s]=w[s](s,t,n[s],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t.willChange=Object.keys(t).filter(n=>t[n]!=="").join(","),t}}};function y(e,t,n){let o=M(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=>M([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=m(n,s),(a,i)=>{a.transform+=` ${e}(${b(n,i)}${o})`}}function j(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n,o=>q(t,o)),(o,s)=>{const[a,i,c]=S(n,s),d=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]=`rgba(${d})`}}function q(e,t){return x(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=M(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=m(n),(s,a)=>{const i=b(n,a);s.filter+=` ${e}(${i+o})`}}function H(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n),(o,s)=>{o[e]=b(n,s)}}function L(e,t,n){n.length===1&&n.unshift(0);const o=M(n),s=R(t);return n=m(n.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),n.some(([a])=>a)?(r.css(t,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=b(n,i)}):r.noop}function v(e,t,n,o){n.length===1&&n.unshift(0);const s=e==="bgy"?"height":"width";o[e]=m(n,c=>r.toPx(c,s,t));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&e==="bgx")return r.noop;if(x(t,"backgroundSize","")==="cover")return V(e,t,n,o);const i={};for(const c of a)i[c]=O(t,c);return p(a,i,o)}function V(e,t,n,o){const s=A(t);if(!s.width)return r.noop;const a={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const h=o[f].map(([J])=>J),$=Math.min(...h),I=Math.max(...h),B=h.indexOf($)<h.indexOf(I),N=I-$;c[f]=`${(B?-N:0)-(B?$:I)}px`,a[f==="bgy"?"height":"width"]+=N}const d=r.Dimensions.cover(s,a);for(const f of i){const h=f==="bgy"?"height":"width",$=d[h]-a[h];c[f]=`max(${O(t,f)},-${$}px) + ${c[f]}`}const u=p(i,c,o);return(f,h)=>{u(f,h),f.backgroundSize=`${d.width}px ${d.height}px`,f.backgroundRepeat="no-repeat"}}function O(e,t){return x(e,`background-position-${t.substr(-1)}`,"")}function p(e,t,n){return function(o,s){for(const a of e){const i=b(n[a],s);o[`background-position-${a.substr(-1)}`]=`calc(${t[a]} + ${i}px)`}}}const F={};function A(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[t])return F[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{F[t]=C(n),r.trigger(e,r.createEvent("load",!1))},C(n)):F[t]=C(n)}function C(e){return{width:e.naturalWidth,height:e.naturalHeight}}function m(e,t=r.toFloat){const n=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(i=t(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&n.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(n.push([i,c]),c=1)),n.push([i,c]),c===null)s++;else if(s){const d=n[a-s-1][1],u=(c-d)/(s+1);for(let f=s;f>0;f--)n[a-f][1]=d+u*(s-f+1);s=0}}return n}function S(e,t){const n=r.findIndex(e.slice(1),([,o])=>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,o,s]=S(e,t);return r.isNumber(n)?n+Math.abs(n-o)*s*(n<o?1:-1):+o}const G=/^-?\d+(\S+)?/;function M(e,t){for(const n of e){const o=n.match==null?void 0:n.match(G);if(o)return o[1]}return t}function x(e,t,n){const o=e.style[t],s=r.css(r.css(e,t,n),t);return e.style[t]=o,s}function W(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var T={mixins:[_],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({type:e,detail:{percent:t,duration:n,timing:o,dir:s}}){r.fastdom.read(()=>{if(!this.matchMedia)return;const a=this.getCss(z(e,s,t)),i=this.getCss(D(e)?.5:s>0?1:0);r.fastdom.write(()=>{r.css(this.$el,a),r.Transition.start(this.$el,i,n,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({type:e,detail:{percent:t,dir:n}}){r.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(z(e,n,t));r.fastdom.write(()=>r.css(this.$el,o))})}}]};function D(e){return r.endsWith(e,"in")}function z(e,t,n){return n/=2,D(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",T),T});