uikit 3.11.2-dev.ec95eb0c7 → 3.11.2-dev.f2970ffaa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -2
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +32 -25
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +32 -25
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +3 -3
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +32 -25
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +2 -3
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +77 -44
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +137 -98
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/slider.js +2 -2
- package/src/js/components/sortable.js +1 -2
- package/src/js/core/core.js +2 -2
- package/src/js/core/height-viewport.js +2 -2
- package/src/js/core/sticky.js +47 -34
- package/src/js/mixin/parallax.js +32 -21
- package/src/js/util/fastdom.js +2 -2
- package/src/js/util/viewport.js +7 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | 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')) :
|
|
@@ -105,11 +105,9 @@
|
|
|
105
105
|
computed: {
|
|
106
106
|
|
|
107
107
|
props: function(properties, $el) {
|
|
108
|
-
var this$1$1 = this;
|
|
109
|
-
|
|
110
108
|
return keys(props).reduce(function (result, prop) {
|
|
111
109
|
if (!uikitUtil.isUndefined(properties[prop])) {
|
|
112
|
-
result[prop] = props[prop]
|
|
110
|
+
result[prop] = props[prop](prop, $el, properties[prop].slice());
|
|
113
111
|
}
|
|
114
112
|
return result;
|
|
115
113
|
}, {});
|
|
@@ -117,6 +115,12 @@
|
|
|
117
115
|
|
|
118
116
|
},
|
|
119
117
|
|
|
118
|
+
events: {
|
|
119
|
+
bgimageload: function() {
|
|
120
|
+
this.$emit();
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
|
|
120
124
|
methods: {
|
|
121
125
|
|
|
122
126
|
reset: function() {
|
|
@@ -264,15 +268,15 @@
|
|
|
264
268
|
var bgPos = uikitUtil.css(el, 'backgroundPosition').split(' ')[prop === 'x' ? 0 : 1]; // IE 11 can't read background-position-[x|y]
|
|
265
269
|
|
|
266
270
|
return getCssValue(el, 'backgroundSize', '') === 'cover'
|
|
267
|
-
? backgroundCoverFn
|
|
271
|
+
? backgroundCoverFn(prop, el, steps, bgPos, attr)
|
|
268
272
|
: setBackgroundPosFn(prop, steps, bgPos);
|
|
269
273
|
}
|
|
270
274
|
|
|
271
275
|
function backgroundCoverFn(prop, el, steps, bgPos, attr) {
|
|
272
276
|
|
|
273
|
-
var
|
|
277
|
+
var dimImage = getBackgroundImageDimensions(el);
|
|
274
278
|
|
|
275
|
-
if (!
|
|
279
|
+
if (!dimImage.width) {
|
|
276
280
|
return uikitUtil.noop;
|
|
277
281
|
}
|
|
278
282
|
|
|
@@ -288,11 +292,6 @@
|
|
|
288
292
|
height: el.offsetHeight
|
|
289
293
|
};
|
|
290
294
|
|
|
291
|
-
var dimImage = {
|
|
292
|
-
width: image.naturalWidth,
|
|
293
|
-
height: image.naturalHeight
|
|
294
|
-
};
|
|
295
|
-
|
|
296
295
|
var baseDim = uikitUtil.Dimensions.cover(dimImage, dimEl);
|
|
297
296
|
var span = baseDim[attr] - dimEl[attr];
|
|
298
297
|
|
|
@@ -323,26 +322,34 @@
|
|
|
323
322
|
};
|
|
324
323
|
}
|
|
325
324
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
325
|
+
var dimensions = {};
|
|
326
|
+
function getBackgroundImageDimensions(el) {
|
|
329
327
|
var src = uikitUtil.css(el, 'backgroundImage').replace(/^none|url\(["']?(.+?)["']?\)$/, '$1');
|
|
330
328
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
if (data[src]) {
|
|
334
|
-
return data[src];
|
|
329
|
+
if (dimensions[src]) {
|
|
330
|
+
return dimensions[src];
|
|
335
331
|
}
|
|
336
332
|
|
|
333
|
+
var image = new Image();
|
|
337
334
|
if (src) {
|
|
338
|
-
|
|
339
|
-
img.src = src;
|
|
340
|
-
if (!img.naturalWidth) {
|
|
341
|
-
img.onload = function () { return this$1$1.$update(); };
|
|
342
|
-
}
|
|
335
|
+
image.src = src;
|
|
343
336
|
|
|
344
|
-
|
|
337
|
+
if (!image.naturalWidth) {
|
|
338
|
+
image.onload = function () {
|
|
339
|
+
dimensions[src] = toDimensions(image);
|
|
340
|
+
uikitUtil.trigger(el, 'bgimageload');
|
|
341
|
+
};
|
|
342
|
+
}
|
|
345
343
|
}
|
|
344
|
+
|
|
345
|
+
return dimensions[src] = toDimensions(image);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
function toDimensions(image) {
|
|
349
|
+
return {
|
|
350
|
+
width: image.naturalWidth,
|
|
351
|
+
height: image.naturalHeight
|
|
352
|
+
};
|
|
346
353
|
}
|
|
347
354
|
|
|
348
355
|
function getStep(steps, percent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(a,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],g):(a=typeof globalThis<"u"?globalThis:a||self,a.UIkitSlider_parallax=g(a.UIkit.util))})(this,function(a){"use strict";var g={props:{media:Boolean},data:{media:!1},computed:{matchMedia:function(){var r=z(this.media);return!r||window.matchMedia(r).matches}}};function z(r){if(a.isString(r)){if(r[0]==="@"){var e="breakpoint-"+r.substr(1);r=a.toFloat(a.getCssVar(e))}else if(isNaN(r))return r}return r&&!isNaN(r)?"(min-width: "+r+"px)":!1}a.memoize(function(r){return new a.Promise(function(e,n){if(!r){n();return}a.startsWith(r,"data:")?e(decodeURIComponent(r.split(",")[1])):a.ajax(r).then(function(t){return e(t.response)},function(){return n("SVG not found.")})})});function B(r){return Math.ceil(Math.max.apply(Math,[0].concat(a.$$("[stroke]",r).map(function(e){try{return e.getTotalLength()}catch{return 0}}))))}var l={x:b,y:b,rotate:b,scale:b,color:$,backgroundColor:$,borderColor:$,blur:s,hue:s,fopacity:s,grayscale:s,invert:s,saturate:s,sepia:s,opacity:L,stroke:R,bgx:I,bgy:I},x=Object.keys,q={mixins:[g],props:T(x(l),"list"),data:T(x(l),void 0),computed:{props:function(r,e){return x(l).reduce(function(n,t){return a.isUndefined(r[t])||(n[t]=l[t](t,e,r[t].slice())),n},{})}},events:{bgimageload:function(){this.$emit()}},methods:{reset:function(){var r=this;a.each(this.getCss(0),function(e,n){return a.css(r.$el,n,"")})},getCss:function(r){var e=this;return x(this.props).reduce(function(n,t){return e.props[t](n,r),n},{transform:"",filter:""})}}};function b(r,e,n){var t=M(n)||{x:"px",y:"px",rotate:"deg"}[r]||"";return(r==="x"||r==="y")&&(r="translate"+a.ucfirst(r)),n=n.map(a.toFloat),n.length===1&&n.unshift(r==="scale"?1:0),function(o,i){var f=v(n,i);a.startsWith(r,"translate")&&(f=a.toFloat(f).toFixed(t==="px"?0:6)),o.transform+=" "+r+"("+f+t+")"}}function $(r,e,n){return n.length===1&&n.unshift(w(e,r,"")),n=n.map(function(t){return H(e,t)}),function(t,o){var i=S(n,o),f=i[0],u=i[1],m=i[2],c=f.map(function(h,d){return h+=m*(u[d]-h),d===3?a.toFloat(h):parseInt(h,10)}).join(",");t[r]="rgba("+c+")"}}function H(r,e){return w(r,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(a.toFloat)}function s(r,e,n){n.length===1&&n.unshift(0);var t=M(n)||{blur:"px",hue:"deg"}[r]||"%";return r={fopacity:"opacity",hue:"hue-rotate"}[r]||r,n=n.map(a.toFloat),function(o,i){var f=v(n,i);o.filter+=" "+r+"("+(f+t)+")"}}function L(r,e,n){return n.length===1&&n.unshift(w(e,r,"")),n=n.map(a.toFloat),function(t,o){t[r]=v(n,o)}}function R(r,e,n){n.length===1&&n.unshift(0);var t=M(n);if(n=n.map(a.toFloat),!n.some(function(i){return i}))return a.noop;var o=B(e);return a.css(e,"strokeDasharray",o),t==="%"&&(n=n.map(function(i){return i*o/100})),n=n.reverse(),function(i,f){i.strokeDashoffset=v(n,f)}}function I(r,e,n){n.length===1&&n.unshift(0),r=r.substr(-1);var t=r==="y"?"height":"width";n=n.map(function(i){return a.toPx(i,t,e)}),a.css(e,"background-position-"+r,"");var o=a.css(e,"backgroundPosition").split(" ")[r==="x"?0:1];return w(e,"backgroundSize","")==="cover"?E(r,e,n,o,t):P(r,n,o)}function E(r,e,n,t,o){var i=G(e);if(!i.width)return a.noop;var f=Math.min.apply(Math,n),u=Math.max.apply(Math,n),m=n.indexOf(f)<n.indexOf(u),c=u-f,h=(m?-c:0)-(m?f:u),d={width:e.offsetWidth,height:e.offsetHeight},j=a.Dimensions.cover(i,d),F=j[o]-d[o];if(F<c)d[o]=j[o]+c-F;else if(F>c){var O=d[o]/a.toPx(t,o,e,!0);O&&(h-=(F-c)/O)}var V=a.Dimensions.cover(i,d),A=P(r,n,h+"px");return function(C,J){A(C,J),C.backgroundSize=V.width+"px "+V.height+"px",C.backgroundRepeat="no-repeat"}}function P(r,e,n){return function(t,o){t["background-position-"+r]="calc("+n+" + "+v(e,o)+"px)"}}var y={};function G(r){var e=a.css(r,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(y[e])return y[e];var n=new Image;return e&&(n.src=e,n.naturalWidth||(n.onload=function(){y[e]=D(n),a.trigger(r,"bgimageload")})),y[e]=D(n)}function D(r){return{width:r.naturalWidth,height:r.naturalHeight}}function S(r,e){var n=r.length-1,t=Math.min(Math.floor(n*e),n-1);return r.slice(t,t+2).concat(e===1?1:e%(1/n)*n)}function v(r,e){var n=S(r,e),t=n[0],o=n[1],i=n[2];return a.isNumber(t)?t+Math.abs(t-o)*i*(t<o?1:-1):+o}function M(r,e){return r.reduce(function(n,t){return n||a.isString(t)&&t.replace(/[\d-]/g,"").trim()},"")||e}function w(r,e,n){var t=r.style[e],o=a.css(a.css(r,e,n),e);return r.style[e]=t,o}function T(r,e){return r.reduce(function(n,t){return n[t]=e,n},{})}var W={mixins:[q],data:{selItem:"!li"},computed:{item:function(r,e){var n=r.selItem;return a.query(n,e)}},events:[{name:"itemin itemout",self:!0,el:function(){return this.item},handler:function(r){var e=this,n=r.type,t=r.detail,o=t.percent,i=t.duration,f=t.timing,u=t.dir;a.fastdom.read(function(){var m=e.getCss(_(n,u,o)),c=e.getCss(N(n)?.5:u>0?1:0);a.fastdom.write(function(){a.css(e.$el,m),a.Transition.start(e.$el,c,i,f).catch(a.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el:function(){return this.item},handler:function(){a.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el:function(){return this.item},handler:function(r){var e=this,n=r.type,t=r.detail,o=t.percent,i=t.dir;a.fastdom.read(function(){var f=e.getCss(_(n,i,o));a.fastdom.write(function(){return a.css(e.$el,f)})})}}]};function N(r){return a.endsWith(r,"in")}function _(r,e,n){return n/=2,N(r)^e<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",W),W});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | 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')) :
|
|
@@ -887,7 +887,7 @@
|
|
|
887
887
|
finite: function(ref) {
|
|
888
888
|
var finite = ref.finite;
|
|
889
889
|
|
|
890
|
-
return finite || Math.ceil(getWidth(this.list)) < Math.floor(uikitUtil.dimensions(this.list).width + getMaxElWidth(this.list));
|
|
890
|
+
return finite || Math.ceil(getWidth(this.list)) < Math.floor(uikitUtil.dimensions(this.list).width + getMaxElWidth(this.list) + this.center);
|
|
891
891
|
},
|
|
892
892
|
|
|
893
893
|
maxIndex: function() {
|
|
@@ -1075,7 +1075,7 @@
|
|
|
1075
1075
|
var width = uikitUtil.dimensions(this.list).width / 2 - uikitUtil.dimensions(next).width / 2;
|
|
1076
1076
|
var j = 0;
|
|
1077
1077
|
|
|
1078
|
-
while (
|
|
1078
|
+
while (width > 0) {
|
|
1079
1079
|
var slideIndex = this.getIndex(--j + index, index);
|
|
1080
1080
|
var slide = this.slides[slideIndex];
|
|
1081
1081
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.ec95eb0c7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitSlider=p(t.UIkit.util))})(this,function(t){"use strict";var p={connected:function(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},T={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var e=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!e.draggable||!t.$(":focus",e.$el))&&(!e.pauseOnHover||!t.matches(e.$el,":hover"))&&!e.stack.length&&e.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},R={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var e=this;["start","move","end"].forEach(function(s){var n=e[s];e[s]=function(i){var h=t.getEventPos(i).x*(t.isRtl?-1:1);e.prevPos=h!==e.pos?e.pos:e.prevPos,e.pos=h,n(i)}})},events:[{name:t.pointerDown,delegate:function(){return this.selSlides},handler:function(e){!this.draggable||!t.isTouch(e)&&C(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler:function(e){e.preventDefault()}}],methods:{start:function(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,t.on(document,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move:function(e){var s=this,n=this.pos-this.drag;if(!(n===0||this.prevPos===this.pos||!this.dragging&&Math.abs(n)<this.threshold)){t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=n<0?1:-1;for(var i=this,h=i.slides,g=this,r=g.prevIndex,f=Math.abs(n),o=this.getIndex(r+this.dir,r),c=this._getDistance(r,o)||h[r].offsetWidth;o!==r&&f>c;)this.drag-=c*this.dir,r=o,f-=c,o=this.getIndex(r+this.dir,r),c=this._getDistance(r,o)||h[r].offsetWidth;this.percent=f/c;var a=h[r],d=h[o],v=this.index!==o,l=r===o,m;[this.index,this.prevIndex].filter(function(u){return!t.includes([o,r],u)}).forEach(function(u){t.trigger(h[u],"itemhidden",[s]),l&&(m=!0,s.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||m)&&t.trigger(h[this.index],"itemshown",[this]),v&&(this.prevIndex=r,this.index=o,!l&&t.trigger(a,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!l&&d),v&&(!l&&t.trigger(a,"itemhide",[this]),t.trigger(d,"itemshow",[this]))}},end:function(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{var e=(t.isRtl?this.dir*(t.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}t.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function C(e){return!e.children.length&&e.childNodes.length}var D={data:{selNav:!1},computed:{nav:function(e,s){var n=e.selNav;return t.$(n,s)},selNavItem:function(e){var s=e.attrItem;return"["+s+"],[data-"+s+"]"},navItems:function(e,s){return t.$$(this.selNavItem,s)}},update:{write:function(){var e=this;this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map(function(s,n){return"<li "+e.attrItem+'="'+n+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(s){return s&&(s.hidden=!e.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var e=this,s=this.getValidIndex();this.navItems.forEach(function(n){var i=t.data(n,e.attrItem);t.toggleClass(n,e.clsActive,t.toNumber(i)===s),t.toggleClass(n,"uk-invisible",e.finite&&(i==="previous"&&s===0||i==="next"&&s>=e.maxIndex))})}}},W={mixins:[T,R,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){t.removeClass(this.slides,this.clsActive)},computed:{duration:function(e,s){var n=e.velocity;return b(s.offsetWidth/n)},list:function(e,s){var n=e.selList;return t.$(n,s)},maxIndex:function(){return this.length-1},selSlides:function(e){var s=e.selList,n=e.selSlides;return s+" "+(n||"> *")},slides:{get:function(){return t.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(e,s){var n=this;if(s===void 0&&(s=!1),!(this.dragging||!this.length)){var i=this,h=i.stack,g=s?0:h.length,r=function(){h.splice(g,1),h.length&&n.show(h.shift(),!0)};if(h[s?"unshift":"push"](e),!s&&h.length>1){h.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var f=this.getIndex(this.index),o=t.hasClass(this.slides,this.clsActive)&&this.slides[f],c=this.getIndex(e,this.index),a=this.slides[c];if(o===a){r();return}if(this.dir=O(e,f),this.prevIndex=f,this.index=c,o&&!t.trigger(o,"beforeitemhide",[this])||!t.trigger(a,"beforeitemshow",[this,o])){this.index=this.prevIndex,r();return}var d=this._show(o,a,s).then(function(){return o&&t.trigger(o,"itemhidden",[n]),t.trigger(a,"itemshown",[n]),new t.Promise(function(v){t.fastdom.write(function(){h.shift(),h.length?n.show(h.shift(),!0):n._transitioner=null,v()})})});return o&&t.trigger(o,"itemhide",[this]),t.trigger(a,"itemshow",[this]),d}},getIndex:function(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.index),t.clamp(t.getIndex(e,this.slides,s,this.finite),0,this.maxIndex)},getValidIndex:function(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),this.getIndex(e,s)},_show:function(e,s,n){if(this._transitioner=this._getTransitioner(e,s,this.dir,t.assign({easing:n?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing},this.transitionOptions)),!n&&!e)return this._translate(1),t.Promise.resolve();var i=this.stack,h=i.length;return this._transitioner[h>1?"forward":"show"](h>1?Math.min(this.duration,75+75/(h-1)):this.duration,this.percent)},_getDistance:function(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate:function(e,s,n){s===void 0&&(s=this.prevIndex),n===void 0&&(n=this.index);var i=this._getTransitioner(s!==n?s:!1,n);return i.translate(e),i},_getTransitioner:function(e,s,n,i){return e===void 0&&(e=this.prevIndex),s===void 0&&(s=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,n*(t.isRtl?-1:1),i)}}};function O(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function b(e){return .5*e+300}var B={update:{write:function(){if(!(this.stack.length||this.dragging)){var e=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==e)&&this.show(e)}},events:["resize"]}};function _(e,s){return e===void 0&&(e=0),s===void 0&&(s="%"),e+=e?s:"",t.isIE?"translateX("+e+")":"translate3d("+e+", 0, 0)"}function L(e,s,n,i){var h=i.center,g=i.easing,r=i.list,f=new t.Deferred,o=e?x(e,r,h):x(s,r,h)+t.dimensions(s).width*n,c=s?x(s,r,h):o+t.dimensions(e).width*n*(t.isRtl?-1:1);return{dir:n,show:function(a,d,v){d===void 0&&(d=0);var l=v?"linear":g;return a-=Math.round(a*t.clamp(d,-1,1)),this.translate(d),d=e?d:t.clamp(d,0,1),$(this.getItemIn(),"itemin",{percent:d,duration:a,timing:l,dir:n}),e&&$(this.getItemIn(!0),"itemout",{percent:1-d,duration:a,timing:l,dir:n}),t.Transition.start(r,{transform:_(-c*(t.isRtl?-1:1),"px")},a,l).then(f.resolve,t.noop),f.promise},cancel:function(){t.Transition.cancel(r)},reset:function(){t.css(r,"transform","")},forward:function(a,d){return d===void 0&&(d=this.percent()),t.Transition.cancel(r),this.show(a,d,!0)},translate:function(a){var d=this.getDistance()*n*(t.isRtl?-1:1);t.css(r,"transform",_(t.clamp(-c+(d-d*a),-I(r),t.dimensions(r).width)*(t.isRtl?-1:1),"px"));var v=this.getActives(),l=this.getItemIn(),m=this.getItemIn(!0);a=e?t.clamp(a,-1,1):0,t.children(r).forEach(function(u){var N=t.includes(v,u),E=u===l,S=u===m,z=E||!S&&(N||n*(t.isRtl?-1:1)===-1^w(u,r)>w(e||s));$(u,"itemtranslate"+(z?"in":"out"),{dir:n,percent:S?1-a:E?a:N?1:0})})},percent:function(){return Math.abs((t.css(r,"transform").split(",")[4]*(t.isRtl?-1:1)+o)/(c-o))},getDistance:function(){return Math.abs(c-o)},getItemIn:function(a){a===void 0&&(a=!1);var d=this.getActives(),v=A(r,x(s||e,r,h));if(a){var l=d;d=v,v=l}return v[t.findIndex(v,function(m){return!t.includes(d,m)})]},getActives:function(){return A(r,x(e||s,r,h))}}}function x(e,s,n){var i=w(e,s);return n?i-P(e,s):Math.min(i,y(s))}function y(e){return Math.max(0,I(e)-t.dimensions(e).width)}function I(e){return t.children(e).reduce(function(s,n){return t.dimensions(n).width+s},0)}function P(e,s){return t.dimensions(s).width/2-t.dimensions(e).width/2}function w(e,s){return e&&(t.position(e).left+(t.isRtl?t.dimensions(e).width-t.dimensions(s).width:0))*(t.isRtl?-1:1)||0}function A(e,s){s-=1;var n=t.dimensions(e).width,i=s+n+2;return t.children(e).filter(function(h){var g=w(h,e),r=g+Math.min(t.dimensions(h).width,n);return g>=s&&r<=i})}function $(e,s,n){t.trigger(e,t.createEvent(s,!1,!1,n))}var M={mixins:[p,W,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:function(){return I(this.list)/this.length},finite:function(e){var s=e.finite;return s||Math.ceil(I(this.list))<Math.floor(t.dimensions(this.list).width+V(this.list))},maxIndex:function(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return t.last(this.sets);var e=0,s=y(this.list),n=t.findIndex(this.slides,function(i){if(e>=s)return!0;e+=t.dimensions(i).width});return~n?n:this.length-1},sets:function(e){var s=this,n=e.sets;if(!!n){var i=t.dimensions(this.list).width/(this.center?2:1),h=0,g=i,r=0;return n=t.sortBy(this.slides,"offsetLeft").reduce(function(f,o,c){var a=t.dimensions(o).width,d=r+a;if(d>h&&(!s.center&&c>s.maxIndex&&(c=s.maxIndex),!t.includes(f,c))){var v=s.slides[c+1];s.center&&v&&a<g-t.dimensions(v).width/2?g-=a:(g=i,f.push(c),h=r+i+(s.center?a/2:0))}return r+=a,f},[]),!t.isEmpty(n)&&n}},transitionOptions:function(){return{center:this.center,list:this.list}}},connected:function(){t.toggleClass(this.$el,this.clsContainer,!t.$("."+this.clsContainer,this.$el))},update:{write:function(){var e=this;this.navItems.forEach(function(n){var i=t.toNumber(t.data(n,e.attrItem));i!==!1&&(n.hidden=!e.maxIndex||i>e.maxIndex||e.sets&&!t.includes(e.sets,i))}),this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1));var s=this._getTransitioner(this.index).getActives();this.slides.forEach(function(n){return t.toggleClass(n,e.clsActive,t.includes(s,n))}),this.clsActivated&&(!this.sets||t.includes(this.sets,t.toFloat(this.index)))&&this.slides.forEach(function(n){return t.toggleClass(n,e.clsActivated||"",t.includes(s,n))})},events:["resize"]},events:{beforeitemshow:function(e){!this.dragging&&this.sets&&this.stack.length<2&&!t.includes(this.sets,this.index)&&(this.index=this.getValidIndex());var s=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&&s>1){for(var n=0;n<s;n++)this.stack.splice(1,0,this.dir>0?"next":"previous");e.preventDefault();return}var i=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(t.dimensions(this.slides[i]).width/this.avgWidth),this.reorder()},itemshow:function(){~this.prevIndex&&t.addClass(this._getTransitioner().getItemIn(),this.clsActive)}},methods:{reorder:function(){var e=this;if(this.finite){t.css(this.slides,"order","");return}var s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach(function(f,o){return t.css(f,"order",e.dir>0&&o<s?1:e.dir<0&&o>=e.index?-1:"")}),!!this.center)for(var n=this.slides[s],i=t.dimensions(this.list).width/2-t.dimensions(n).width/2,h=0;Math.floor(i)>0;){var g=this.getIndex(--h+s,s),r=this.slides[g];t.css(r,"order",g>s?-2:-1),i-=t.dimensions(r).width}},getValidIndex:function(e,s){if(e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),e=this.getIndex(e,s),!this.sets)return e;var n;do{if(t.includes(this.sets,e))return e;n=e,e=this.getIndex(e+this.dir,s)}while(e!==n);return e}}};function V(e){return Math.max.apply(Math,[0].concat(t.children(e).map(function(s){return t.dimensions(s).width})))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",M),M});
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitSlider=p(t.UIkit.util))})(this,function(t){"use strict";var p={connected:function(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},T={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var e=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!e.draggable||!t.$(":focus",e.$el))&&(!e.pauseOnHover||!t.matches(e.$el,":hover"))&&!e.stack.length&&e.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},R={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var e=this;["start","move","end"].forEach(function(s){var n=e[s];e[s]=function(i){var h=t.getEventPos(i).x*(t.isRtl?-1:1);e.prevPos=h!==e.pos?e.pos:e.prevPos,e.pos=h,n(i)}})},events:[{name:t.pointerDown,delegate:function(){return this.selSlides},handler:function(e){!this.draggable||!t.isTouch(e)&&C(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler:function(e){e.preventDefault()}}],methods:{start:function(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,t.on(document,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move:function(e){var s=this,n=this.pos-this.drag;if(!(n===0||this.prevPos===this.pos||!this.dragging&&Math.abs(n)<this.threshold)){t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=n<0?1:-1;for(var i=this,h=i.slides,g=this,r=g.prevIndex,f=Math.abs(n),o=this.getIndex(r+this.dir,r),c=this._getDistance(r,o)||h[r].offsetWidth;o!==r&&f>c;)this.drag-=c*this.dir,r=o,f-=c,o=this.getIndex(r+this.dir,r),c=this._getDistance(r,o)||h[r].offsetWidth;this.percent=f/c;var a=h[r],d=h[o],v=this.index!==o,l=r===o,m;[this.index,this.prevIndex].filter(function(u){return!t.includes([o,r],u)}).forEach(function(u){t.trigger(h[u],"itemhidden",[s]),l&&(m=!0,s.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||m)&&t.trigger(h[this.index],"itemshown",[this]),v&&(this.prevIndex=r,this.index=o,!l&&t.trigger(a,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!l&&d),v&&(!l&&t.trigger(a,"itemhide",[this]),t.trigger(d,"itemshow",[this]))}},end:function(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{var e=(t.isRtl?this.dir*(t.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}t.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function C(e){return!e.children.length&&e.childNodes.length}var D={data:{selNav:!1},computed:{nav:function(e,s){var n=e.selNav;return t.$(n,s)},selNavItem:function(e){var s=e.attrItem;return"["+s+"],[data-"+s+"]"},navItems:function(e,s){return t.$$(this.selNavItem,s)}},update:{write:function(){var e=this;this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map(function(s,n){return"<li "+e.attrItem+'="'+n+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(s){return s&&(s.hidden=!e.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var e=this,s=this.getValidIndex();this.navItems.forEach(function(n){var i=t.data(n,e.attrItem);t.toggleClass(n,e.clsActive,t.toNumber(i)===s),t.toggleClass(n,"uk-invisible",e.finite&&(i==="previous"&&s===0||i==="next"&&s>=e.maxIndex))})}}},W={mixins:[T,R,D],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){t.removeClass(this.slides,this.clsActive)},computed:{duration:function(e,s){var n=e.velocity;return b(s.offsetWidth/n)},list:function(e,s){var n=e.selList;return t.$(n,s)},maxIndex:function(){return this.length-1},selSlides:function(e){var s=e.selList,n=e.selSlides;return s+" "+(n||"> *")},slides:{get:function(){return t.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(e,s){var n=this;if(s===void 0&&(s=!1),!(this.dragging||!this.length)){var i=this,h=i.stack,g=s?0:h.length,r=function(){h.splice(g,1),h.length&&n.show(h.shift(),!0)};if(h[s?"unshift":"push"](e),!s&&h.length>1){h.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var f=this.getIndex(this.index),o=t.hasClass(this.slides,this.clsActive)&&this.slides[f],c=this.getIndex(e,this.index),a=this.slides[c];if(o===a){r();return}if(this.dir=O(e,f),this.prevIndex=f,this.index=c,o&&!t.trigger(o,"beforeitemhide",[this])||!t.trigger(a,"beforeitemshow",[this,o])){this.index=this.prevIndex,r();return}var d=this._show(o,a,s).then(function(){return o&&t.trigger(o,"itemhidden",[n]),t.trigger(a,"itemshown",[n]),new t.Promise(function(v){t.fastdom.write(function(){h.shift(),h.length?n.show(h.shift(),!0):n._transitioner=null,v()})})});return o&&t.trigger(o,"itemhide",[this]),t.trigger(a,"itemshow",[this]),d}},getIndex:function(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.index),t.clamp(t.getIndex(e,this.slides,s,this.finite),0,this.maxIndex)},getValidIndex:function(e,s){return e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),this.getIndex(e,s)},_show:function(e,s,n){if(this._transitioner=this._getTransitioner(e,s,this.dir,t.assign({easing:n?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing},this.transitionOptions)),!n&&!e)return this._translate(1),t.Promise.resolve();var i=this.stack,h=i.length;return this._transitioner[h>1?"forward":"show"](h>1?Math.min(this.duration,75+75/(h-1)):this.duration,this.percent)},_getDistance:function(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate:function(e,s,n){s===void 0&&(s=this.prevIndex),n===void 0&&(n=this.index);var i=this._getTransitioner(s!==n?s:!1,n);return i.translate(e),i},_getTransitioner:function(e,s,n,i){return e===void 0&&(e=this.prevIndex),s===void 0&&(s=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,n*(t.isRtl?-1:1),i)}}};function O(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function b(e){return .5*e+300}var B={update:{write:function(){if(!(this.stack.length||this.dragging)){var e=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==e)&&this.show(e)}},events:["resize"]}};function _(e,s){return e===void 0&&(e=0),s===void 0&&(s="%"),e+=e?s:"",t.isIE?"translateX("+e+")":"translate3d("+e+", 0, 0)"}function L(e,s,n,i){var h=i.center,g=i.easing,r=i.list,f=new t.Deferred,o=e?x(e,r,h):x(s,r,h)+t.dimensions(s).width*n,c=s?x(s,r,h):o+t.dimensions(e).width*n*(t.isRtl?-1:1);return{dir:n,show:function(a,d,v){d===void 0&&(d=0);var l=v?"linear":g;return a-=Math.round(a*t.clamp(d,-1,1)),this.translate(d),d=e?d:t.clamp(d,0,1),$(this.getItemIn(),"itemin",{percent:d,duration:a,timing:l,dir:n}),e&&$(this.getItemIn(!0),"itemout",{percent:1-d,duration:a,timing:l,dir:n}),t.Transition.start(r,{transform:_(-c*(t.isRtl?-1:1),"px")},a,l).then(f.resolve,t.noop),f.promise},cancel:function(){t.Transition.cancel(r)},reset:function(){t.css(r,"transform","")},forward:function(a,d){return d===void 0&&(d=this.percent()),t.Transition.cancel(r),this.show(a,d,!0)},translate:function(a){var d=this.getDistance()*n*(t.isRtl?-1:1);t.css(r,"transform",_(t.clamp(-c+(d-d*a),-I(r),t.dimensions(r).width)*(t.isRtl?-1:1),"px"));var v=this.getActives(),l=this.getItemIn(),m=this.getItemIn(!0);a=e?t.clamp(a,-1,1):0,t.children(r).forEach(function(u){var N=t.includes(v,u),E=u===l,S=u===m,z=E||!S&&(N||n*(t.isRtl?-1:1)===-1^w(u,r)>w(e||s));$(u,"itemtranslate"+(z?"in":"out"),{dir:n,percent:S?1-a:E?a:N?1:0})})},percent:function(){return Math.abs((t.css(r,"transform").split(",")[4]*(t.isRtl?-1:1)+o)/(c-o))},getDistance:function(){return Math.abs(c-o)},getItemIn:function(a){a===void 0&&(a=!1);var d=this.getActives(),v=A(r,x(s||e,r,h));if(a){var l=d;d=v,v=l}return v[t.findIndex(v,function(m){return!t.includes(d,m)})]},getActives:function(){return A(r,x(e||s,r,h))}}}function x(e,s,n){var i=w(e,s);return n?i-P(e,s):Math.min(i,y(s))}function y(e){return Math.max(0,I(e)-t.dimensions(e).width)}function I(e){return t.children(e).reduce(function(s,n){return t.dimensions(n).width+s},0)}function P(e,s){return t.dimensions(s).width/2-t.dimensions(e).width/2}function w(e,s){return e&&(t.position(e).left+(t.isRtl?t.dimensions(e).width-t.dimensions(s).width:0))*(t.isRtl?-1:1)||0}function A(e,s){s-=1;var n=t.dimensions(e).width,i=s+n+2;return t.children(e).filter(function(h){var g=w(h,e),r=g+Math.min(t.dimensions(h).width,n);return g>=s&&r<=i})}function $(e,s,n){t.trigger(e,t.createEvent(s,!1,!1,n))}var M={mixins:[p,W,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:function(){return I(this.list)/this.length},finite:function(e){var s=e.finite;return s||Math.ceil(I(this.list))<Math.floor(t.dimensions(this.list).width+V(this.list)+this.center)},maxIndex:function(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return t.last(this.sets);var e=0,s=y(this.list),n=t.findIndex(this.slides,function(i){if(e>=s)return!0;e+=t.dimensions(i).width});return~n?n:this.length-1},sets:function(e){var s=this,n=e.sets;if(!!n){var i=t.dimensions(this.list).width/(this.center?2:1),h=0,g=i,r=0;return n=t.sortBy(this.slides,"offsetLeft").reduce(function(f,o,c){var a=t.dimensions(o).width,d=r+a;if(d>h&&(!s.center&&c>s.maxIndex&&(c=s.maxIndex),!t.includes(f,c))){var v=s.slides[c+1];s.center&&v&&a<g-t.dimensions(v).width/2?g-=a:(g=i,f.push(c),h=r+i+(s.center?a/2:0))}return r+=a,f},[]),!t.isEmpty(n)&&n}},transitionOptions:function(){return{center:this.center,list:this.list}}},connected:function(){t.toggleClass(this.$el,this.clsContainer,!t.$("."+this.clsContainer,this.$el))},update:{write:function(){var e=this;this.navItems.forEach(function(n){var i=t.toNumber(t.data(n,e.attrItem));i!==!1&&(n.hidden=!e.maxIndex||i>e.maxIndex||e.sets&&!t.includes(e.sets,i))}),this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1));var s=this._getTransitioner(this.index).getActives();this.slides.forEach(function(n){return t.toggleClass(n,e.clsActive,t.includes(s,n))}),this.clsActivated&&(!this.sets||t.includes(this.sets,t.toFloat(this.index)))&&this.slides.forEach(function(n){return t.toggleClass(n,e.clsActivated||"",t.includes(s,n))})},events:["resize"]},events:{beforeitemshow:function(e){!this.dragging&&this.sets&&this.stack.length<2&&!t.includes(this.sets,this.index)&&(this.index=this.getValidIndex());var s=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&&s>1){for(var n=0;n<s;n++)this.stack.splice(1,0,this.dir>0?"next":"previous");e.preventDefault();return}var i=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(t.dimensions(this.slides[i]).width/this.avgWidth),this.reorder()},itemshow:function(){~this.prevIndex&&t.addClass(this._getTransitioner().getItemIn(),this.clsActive)}},methods:{reorder:function(){var e=this;if(this.finite){t.css(this.slides,"order","");return}var s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach(function(f,o){return t.css(f,"order",e.dir>0&&o<s?1:e.dir<0&&o>=e.index?-1:"")}),!!this.center)for(var n=this.slides[s],i=t.dimensions(this.list).width/2-t.dimensions(n).width/2,h=0;i>0;){var g=this.getIndex(--h+s,s),r=this.slides[g];t.css(r,"order",g>s?-2:-1),i-=t.dimensions(r).width}},getValidIndex:function(e,s){if(e===void 0&&(e=this.index),s===void 0&&(s=this.prevIndex),e=this.getIndex(e,s),!this.sets)return e;var n;do{if(t.includes(this.sets,e))return e;n=e,e=this.getIndex(e+this.dir,s)}while(e!==n);return e}}};function V(e){return Math.max.apply(Math,[0].concat(t.children(e).map(function(s){return t.dimensions(s).width})))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",M),M});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | 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')) :
|
|
@@ -105,11 +105,9 @@
|
|
|
105
105
|
computed: {
|
|
106
106
|
|
|
107
107
|
props: function(properties, $el) {
|
|
108
|
-
var this$1$1 = this;
|
|
109
|
-
|
|
110
108
|
return keys(props).reduce(function (result, prop) {
|
|
111
109
|
if (!uikitUtil.isUndefined(properties[prop])) {
|
|
112
|
-
result[prop] = props[prop]
|
|
110
|
+
result[prop] = props[prop](prop, $el, properties[prop].slice());
|
|
113
111
|
}
|
|
114
112
|
return result;
|
|
115
113
|
}, {});
|
|
@@ -117,6 +115,12 @@
|
|
|
117
115
|
|
|
118
116
|
},
|
|
119
117
|
|
|
118
|
+
events: {
|
|
119
|
+
bgimageload: function() {
|
|
120
|
+
this.$emit();
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
|
|
120
124
|
methods: {
|
|
121
125
|
|
|
122
126
|
reset: function() {
|
|
@@ -264,15 +268,15 @@
|
|
|
264
268
|
var bgPos = uikitUtil.css(el, 'backgroundPosition').split(' ')[prop === 'x' ? 0 : 1]; // IE 11 can't read background-position-[x|y]
|
|
265
269
|
|
|
266
270
|
return getCssValue(el, 'backgroundSize', '') === 'cover'
|
|
267
|
-
? backgroundCoverFn
|
|
271
|
+
? backgroundCoverFn(prop, el, steps, bgPos, attr)
|
|
268
272
|
: setBackgroundPosFn(prop, steps, bgPos);
|
|
269
273
|
}
|
|
270
274
|
|
|
271
275
|
function backgroundCoverFn(prop, el, steps, bgPos, attr) {
|
|
272
276
|
|
|
273
|
-
var
|
|
277
|
+
var dimImage = getBackgroundImageDimensions(el);
|
|
274
278
|
|
|
275
|
-
if (!
|
|
279
|
+
if (!dimImage.width) {
|
|
276
280
|
return uikitUtil.noop;
|
|
277
281
|
}
|
|
278
282
|
|
|
@@ -288,11 +292,6 @@
|
|
|
288
292
|
height: el.offsetHeight
|
|
289
293
|
};
|
|
290
294
|
|
|
291
|
-
var dimImage = {
|
|
292
|
-
width: image.naturalWidth,
|
|
293
|
-
height: image.naturalHeight
|
|
294
|
-
};
|
|
295
|
-
|
|
296
295
|
var baseDim = uikitUtil.Dimensions.cover(dimImage, dimEl);
|
|
297
296
|
var span = baseDim[attr] - dimEl[attr];
|
|
298
297
|
|
|
@@ -323,26 +322,34 @@
|
|
|
323
322
|
};
|
|
324
323
|
}
|
|
325
324
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
325
|
+
var dimensions = {};
|
|
326
|
+
function getBackgroundImageDimensions(el) {
|
|
329
327
|
var src = uikitUtil.css(el, 'backgroundImage').replace(/^none|url\(["']?(.+?)["']?\)$/, '$1');
|
|
330
328
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
if (data[src]) {
|
|
334
|
-
return data[src];
|
|
329
|
+
if (dimensions[src]) {
|
|
330
|
+
return dimensions[src];
|
|
335
331
|
}
|
|
336
332
|
|
|
333
|
+
var image = new Image();
|
|
337
334
|
if (src) {
|
|
338
|
-
|
|
339
|
-
img.src = src;
|
|
340
|
-
if (!img.naturalWidth) {
|
|
341
|
-
img.onload = function () { return this$1$1.$update(); };
|
|
342
|
-
}
|
|
335
|
+
image.src = src;
|
|
343
336
|
|
|
344
|
-
|
|
337
|
+
if (!image.naturalWidth) {
|
|
338
|
+
image.onload = function () {
|
|
339
|
+
dimensions[src] = toDimensions(image);
|
|
340
|
+
uikitUtil.trigger(el, 'bgimageload');
|
|
341
|
+
};
|
|
342
|
+
}
|
|
345
343
|
}
|
|
344
|
+
|
|
345
|
+
return dimensions[src] = toDimensions(image);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
function toDimensions(image) {
|
|
349
|
+
return {
|
|
350
|
+
width: image.naturalWidth,
|
|
351
|
+
height: image.naturalHeight
|
|
352
|
+
};
|
|
346
353
|
}
|
|
347
354
|
|
|
348
355
|
function getStep(steps, percent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(a,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],g):(a=typeof globalThis<"u"?globalThis:a||self,a.UIkitSlideshow_parallax=g(a.UIkit.util))})(this,function(a){"use strict";var g={props:{media:Boolean},data:{media:!1},computed:{matchMedia:function(){var r=z(this.media);return!r||window.matchMedia(r).matches}}};function z(r){if(a.isString(r)){if(r[0]==="@"){var e="breakpoint-"+r.substr(1);r=a.toFloat(a.getCssVar(e))}else if(isNaN(r))return r}return r&&!isNaN(r)?"(min-width: "+r+"px)":!1}a.memoize(function(r){return new a.Promise(function(e,n){if(!r){n();return}a.startsWith(r,"data:")?e(decodeURIComponent(r.split(",")[1])):a.ajax(r).then(function(t){return e(t.response)},function(){return n("SVG not found.")})})});function B(r){return Math.ceil(Math.max.apply(Math,[0].concat(a.$$("[stroke]",r).map(function(e){try{return e.getTotalLength()}catch{return 0}}))))}var l={x:b,y:b,rotate:b,scale:b,color:$,backgroundColor:$,borderColor:$,blur:s,hue:s,fopacity:s,grayscale:s,invert:s,saturate:s,sepia:s,opacity:L,stroke:R,bgx:I,bgy:I},x=Object.keys,q={mixins:[g],props:T(x(l),"list"),data:T(x(l),void 0),computed:{props:function(r,e){return x(l).reduce(function(n,t){return a.isUndefined(r[t])||(n[t]=l[t](t,e,r[t].slice())),n},{})}},events:{bgimageload:function(){this.$emit()}},methods:{reset:function(){var r=this;a.each(this.getCss(0),function(e,n){return a.css(r.$el,n,"")})},getCss:function(r){var e=this;return x(this.props).reduce(function(n,t){return e.props[t](n,r),n},{transform:"",filter:""})}}};function b(r,e,n){var t=M(n)||{x:"px",y:"px",rotate:"deg"}[r]||"";return(r==="x"||r==="y")&&(r="translate"+a.ucfirst(r)),n=n.map(a.toFloat),n.length===1&&n.unshift(r==="scale"?1:0),function(o,i){var f=v(n,i);a.startsWith(r,"translate")&&(f=a.toFloat(f).toFixed(t==="px"?0:6)),o.transform+=" "+r+"("+f+t+")"}}function $(r,e,n){return n.length===1&&n.unshift(w(e,r,"")),n=n.map(function(t){return H(e,t)}),function(t,o){var i=S(n,o),f=i[0],u=i[1],m=i[2],c=f.map(function(h,d){return h+=m*(u[d]-h),d===3?a.toFloat(h):parseInt(h,10)}).join(",");t[r]="rgba("+c+")"}}function H(r,e){return w(r,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(a.toFloat)}function s(r,e,n){n.length===1&&n.unshift(0);var t=M(n)||{blur:"px",hue:"deg"}[r]||"%";return r={fopacity:"opacity",hue:"hue-rotate"}[r]||r,n=n.map(a.toFloat),function(o,i){var f=v(n,i);o.filter+=" "+r+"("+(f+t)+")"}}function L(r,e,n){return n.length===1&&n.unshift(w(e,r,"")),n=n.map(a.toFloat),function(t,o){t[r]=v(n,o)}}function R(r,e,n){n.length===1&&n.unshift(0);var t=M(n);if(n=n.map(a.toFloat),!n.some(function(i){return i}))return a.noop;var o=B(e);return a.css(e,"strokeDasharray",o),t==="%"&&(n=n.map(function(i){return i*o/100})),n=n.reverse(),function(i,f){i.strokeDashoffset=v(n,f)}}function I(r,e,n){n.length===1&&n.unshift(0),r=r.substr(-1);var t=r==="y"?"height":"width";n=n.map(function(i){return a.toPx(i,t,e)}),a.css(e,"background-position-"+r,"");var o=a.css(e,"backgroundPosition").split(" ")[r==="x"?0:1];return w(e,"backgroundSize","")==="cover"?E(r,e,n,o,t):P(r,n,o)}function E(r,e,n,t,o){var i=G(e);if(!i.width)return a.noop;var f=Math.min.apply(Math,n),u=Math.max.apply(Math,n),m=n.indexOf(f)<n.indexOf(u),c=u-f,h=(m?-c:0)-(m?f:u),d={width:e.offsetWidth,height:e.offsetHeight},j=a.Dimensions.cover(i,d),F=j[o]-d[o];if(F<c)d[o]=j[o]+c-F;else if(F>c){var O=d[o]/a.toPx(t,o,e,!0);O&&(h-=(F-c)/O)}var V=a.Dimensions.cover(i,d),A=P(r,n,h+"px");return function(C,J){A(C,J),C.backgroundSize=V.width+"px "+V.height+"px",C.backgroundRepeat="no-repeat"}}function P(r,e,n){return function(t,o){t["background-position-"+r]="calc("+n+" + "+v(e,o)+"px)"}}var y={};function G(r){var e=a.css(r,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(y[e])return y[e];var n=new Image;return e&&(n.src=e,n.naturalWidth||(n.onload=function(){y[e]=D(n),a.trigger(r,"bgimageload")})),y[e]=D(n)}function D(r){return{width:r.naturalWidth,height:r.naturalHeight}}function S(r,e){var n=r.length-1,t=Math.min(Math.floor(n*e),n-1);return r.slice(t,t+2).concat(e===1?1:e%(1/n)*n)}function v(r,e){var n=S(r,e),t=n[0],o=n[1],i=n[2];return a.isNumber(t)?t+Math.abs(t-o)*i*(t<o?1:-1):+o}function M(r,e){return r.reduce(function(n,t){return n||a.isString(t)&&t.replace(/[\d-]/g,"").trim()},"")||e}function w(r,e,n){var t=r.style[e],o=a.css(a.css(r,e,n),e);return r.style[e]=t,o}function T(r,e){return r.reduce(function(n,t){return n[t]=e,n},{})}var W={mixins:[q],data:{selItem:"!li"},computed:{item:function(r,e){var n=r.selItem;return a.query(n,e)}},events:[{name:"itemin itemout",self:!0,el:function(){return this.item},handler:function(r){var e=this,n=r.type,t=r.detail,o=t.percent,i=t.duration,f=t.timing,u=t.dir;a.fastdom.read(function(){var m=e.getCss(_(n,u,o)),c=e.getCss(N(n)?.5:u>0?1:0);a.fastdom.write(function(){a.css(e.$el,m),a.Transition.start(e.$el,c,i,f).catch(a.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el:function(){return this.item},handler:function(){a.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el:function(){return this.item},handler:function(r){var e=this,n=r.type,t=r.detail,o=t.percent,i=t.dir;a.fastdom.read(function(){var f=e.getCss(_(n,i,o));a.fastdom.write(function(){return a.css(e.$el,f)})})}}]};function N(r){return a.endsWith(r,"in")}function _(r,e,n){return n/=2,N(r)^e<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",W),W});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.ec95eb0c7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],g):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitSlideshow=g(n.UIkit.util))})(this,function(n){"use strict";var g={connected:function(){!n.hasClass(this.$el,this.$name)&&n.addClass(this.$el,this.$name)}},$={slide:{show:function(t){return[{transform:h(t*-100)},{transform:h()}]},percent:function(t){return p(t)},translate:function(t,e){return[{transform:h(e*-100*t)},{transform:h(e*100*(1-t))}]}}};function p(t){return Math.abs(n.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function h(t,e){return t===void 0&&(t=0),e===void 0&&(e="%"),t+=t?e:"",n.isIE?"translateX("+t+")":"translate3d("+t+", 0, 0)"}function b(t){return"scale3d("+t+", "+t+", 1)"}function z(t,e,s,a){var i=a.animation,x=a.easing,o=i.percent,v=i.translate,r=i.show;r===void 0&&(r=n.noop);var c=r(s),u=new n.Deferred;return{dir:s,show:function(d,f,m){var w=this;f===void 0&&(f=0);var l=m?"linear":x;return d-=Math.round(d*n.clamp(f,-1,1)),this.translate(f),I(e,"itemin",{percent:f,duration:d,timing:l,dir:s}),I(t,"itemout",{percent:1-f,duration:d,timing:l,dir:s}),n.Promise.all([n.Transition.start(e,c[1],d,l),n.Transition.start(t,c[0],d,l)]).then(function(){w.reset(),u.resolve()},n.noop),u.promise},cancel:function(){n.Transition.cancel([e,t])},reset:function(){for(var d in c[0])n.css([e,t],d,"")},forward:function(d,f){return f===void 0&&(f=this.percent()),n.Transition.cancel([e,t]),this.show(d,f,!0)},translate:function(d){this.reset();var f=v(d,s);n.css(e,f[1]),n.css(t,f[0]),I(e,"itemtranslatein",{percent:d,dir:s}),I(t,"itemtranslateout",{percent:1-d,dir:s})},percent:function(){return o(t||e,e,s)},getDistance:function(){return t&&t.offsetWidth}}}function I(t,e,s){n.trigger(t,n.createEvent(e,!1,!1,s))}var A={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){n.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var t=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!t.draggable||!n.$(":focus",t.$el))&&(!t.pauseOnHover||!n.matches(t.$el,":hover"))&&!t.stack.length&&t.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},_={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var t=this;["start","move","end"].forEach(function(e){var s=t[e];t[e]=function(a){var i=n.getEventPos(a).x*(n.isRtl?-1:1);t.prevPos=i!==t.pos?t.pos:t.prevPos,t.pos=i,s(a)}})},events:[{name:n.pointerDown,delegate:function(){return this.selSlides},handler:function(t){!this.draggable||!n.isTouch(t)&&N(t.target)||n.closest(t.target,n.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler:function(t){t.preventDefault()}}],methods:{start:function(){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,n.on(document,n.pointerMove,this.move,{passive:!1}),n.on(document,n.pointerUp+" "+n.pointerCancel+" input",this.end,!0),n.css(this.list,"userSelect","none")},move:function(t){var e=this,s=this.pos-this.drag;if(!(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)){n.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;for(var a=this,i=a.slides,x=this,o=x.prevIndex,v=Math.abs(s),r=this.getIndex(o+this.dir,o),c=this._getDistance(o,r)||i[o].offsetWidth;r!==o&&v>c;)this.drag-=c*this.dir,o=r,v-=c,r=this.getIndex(o+this.dir,o),c=this._getDistance(o,r)||i[o].offsetWidth;this.percent=v/c;var u=i[o],d=i[r],f=this.index!==r,m=o===r,w;[this.index,this.prevIndex].filter(function(l){return!n.includes([r,o],l)}).forEach(function(l){n.trigger(i[l],"itemhidden",[e]),m&&(w=!0,e.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||w)&&n.trigger(i[this.index],"itemshown",[this]),f&&(this.prevIndex=o,this.index=r,!m&&n.trigger(u,"beforeitemhide",[this]),n.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),u,!m&&d),f&&(!m&&n.trigger(u,"itemhide",[this]),n.trigger(d,"itemshow",[this]))}},end:function(){if(n.off(document,n.pointerMove,this.move,{passive:!1}),n.off(document,n.pointerUp+" "+n.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{var t=(n.isRtl?this.dir*(n.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}n.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function N(t){return!t.children.length&&t.childNodes.length}var S={data:{selNav:!1},computed:{nav:function(t,e){var s=t.selNav;return n.$(s,e)},selNavItem:function(t){var e=t.attrItem;return"["+e+"],[data-"+e+"]"},navItems:function(t,e){return n.$$(this.selNavItem,e)}},update:{write:function(){var t=this;this.nav&&this.length!==this.nav.children.length&&n.html(this.nav,this.slides.map(function(e,s){return"<li "+t.attrItem+'="'+s+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(e){return e&&(e.hidden=!t.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(t){t.preventDefault(),this.show(n.data(t.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var t=this,e=this.getValidIndex();this.navItems.forEach(function(s){var a=n.data(s,t.attrItem);n.toggleClass(s,t.clsActive,n.toNumber(a)===e),n.toggleClass(s,"uk-invisible",t.finite&&(a==="previous"&&e===0||a==="next"&&e>=t.maxIndex))})}}},T={mixins:[A,_,S],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){n.removeClass(this.slides,this.clsActive)},computed:{duration:function(t,e){var s=t.velocity;return H(e.offsetWidth/s)},list:function(t,e){var s=t.selList;return n.$(s,e)},maxIndex:function(){return this.length-1},selSlides:function(t){var e=t.selList,s=t.selSlides;return e+" "+(s||"> *")},slides:{get:function(){return n.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(t,e){var s=this;if(e===void 0&&(e=!1),!(this.dragging||!this.length)){var a=this,i=a.stack,x=e?0:i.length,o=function(){i.splice(x,1),i.length&&s.show(i.shift(),!0)};if(i[e?"unshift":"push"](t),!e&&i.length>1){i.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var v=this.getIndex(this.index),r=n.hasClass(this.slides,this.clsActive)&&this.slides[v],c=this.getIndex(t,this.index),u=this.slides[c];if(r===u){o();return}if(this.dir=D(t,v),this.prevIndex=v,this.index=c,r&&!n.trigger(r,"beforeitemhide",[this])||!n.trigger(u,"beforeitemshow",[this,r])){this.index=this.prevIndex,o();return}var d=this._show(r,u,e).then(function(){return r&&n.trigger(r,"itemhidden",[s]),n.trigger(u,"itemshown",[s]),new n.Promise(function(f){n.fastdom.write(function(){i.shift(),i.length?s.show(i.shift(),!0):s._transitioner=null,f()})})});return r&&n.trigger(r,"itemhide",[this]),n.trigger(u,"itemshow",[this]),d}},getIndex:function(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.index),n.clamp(n.getIndex(t,this.slides,e,this.finite),0,this.maxIndex)},getValidIndex:function(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.prevIndex),this.getIndex(t,e)},_show:function(t,e,s){if(this._transitioner=this._getTransitioner(t,e,this.dir,n.assign({easing:s?e.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)),!s&&!t)return this._translate(1),n.Promise.resolve();var a=this.stack,i=a.length;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance:function(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate:function(t,e,s){e===void 0&&(e=this.prevIndex),s===void 0&&(s=this.index);var a=this._getTransitioner(e!==s?e:!1,s);return a.translate(t),a},_getTransitioner:function(t,e,s,a){return t===void 0&&(t=this.prevIndex),e===void 0&&(e=this.index),s===void 0&&(s=this.dir||1),a===void 0&&(a=this.transitionOptions),new this.Transitioner(n.isNumber(t)?this.slides[t]:t,n.isNumber(e)?this.slides[e]:e,s*(n.isRtl?-1:1),a)}}};function D(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function H(t){return .5*t+300}var M={mixins:[T],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:$,Transitioner:z},computed:{animation:function(t){var e=t.animation,s=t.Animations;return n.assign(s[e]||s.slide,{name:e})},transitionOptions:function(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden":function(t){var e=t.target;this.$update(e)},beforeitemshow:function(t){var e=t.target;n.addClass(e,this.clsActive)},itemshown:function(t){var e=t.target;n.addClass(e,this.clsActivated)},itemhidden:function(t){var e=t.target;n.removeClass(e,this.clsActive,this.clsActivated)}}},C=n.assign({},$,{fade:{show:function(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent:function(t){return 1-n.css(t,"opacity")},translate:function(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show:function(){return[{opacity:0,transform:b(1+.5),zIndex:0},{zIndex:-1}]},percent:function(t){return 1-n.css(t,"opacity")},translate:function(t){return[{opacity:1-t,transform:b(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show:function(t){return t<0?[{transform:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent:function(t,e,s){return s<0?1-p(e):p(t)},translate:function(t,e){return e<0?[{transform:h(30*t),zIndex:-1},{transform:h(-100*(1-t)),zIndex:0}]:[{transform:h(-t*100),zIndex:0},{transform:h(30*(1-t)),zIndex:-1}]}},push:{show:function(t){return t<0?[{transform:h(100),zIndex:0},{transform:h(),zIndex:-1}]:[{transform:h(-30),zIndex:-1},{transform:h(),zIndex:0}]},percent:function(t,e,s){return s>0?1-p(e):p(t)},translate:function(t,e){return e<0?[{transform:h(t*100),zIndex:0},{transform:h(-30*(1-t)),zIndex:-1}]:[{transform:h(-30*t),zIndex:-1},{transform:h(100*(1-t)),zIndex:0}]}}}),E={update:{write:function(){if(!(this.stack.length||this.dragging)){var t=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==t)&&this.show(t)}},events:["resize"]}},y={mixins:[g,M,E],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:C},update:{read:function(){if(!this.list)return!1;var t=this.ratio.split(":").map(Number),e=t[0],s=t[1];return s=s*this.list.offsetWidth/e||0,this.minHeight&&(s=Math.max(this.minHeight,s)),this.maxHeight&&(s=Math.min(this.maxHeight,s)),{height:s-n.boxModelAdjust(this.list,"height","content-box")}},write:function(t){var e=t.height;e>0&&n.css(this.list,"minHeight",e)},events:["resize"]}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",y),y});
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],g):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitSlideshow=g(n.UIkit.util))})(this,function(n){"use strict";var g={connected:function(){!n.hasClass(this.$el,this.$name)&&n.addClass(this.$el,this.$name)}},$={slide:{show:function(t){return[{transform:h(t*-100)},{transform:h()}]},percent:function(t){return p(t)},translate:function(t,e){return[{transform:h(e*-100*t)},{transform:h(e*100*(1-t))}]}}};function p(t){return Math.abs(n.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function h(t,e){return t===void 0&&(t=0),e===void 0&&(e="%"),t+=t?e:"",n.isIE?"translateX("+t+")":"translate3d("+t+", 0, 0)"}function b(t){return"scale3d("+t+", "+t+", 1)"}function z(t,e,s,a){var i=a.animation,x=a.easing,o=i.percent,v=i.translate,r=i.show;r===void 0&&(r=n.noop);var c=r(s),u=new n.Deferred;return{dir:s,show:function(d,f,m){var w=this;f===void 0&&(f=0);var l=m?"linear":x;return d-=Math.round(d*n.clamp(f,-1,1)),this.translate(f),I(e,"itemin",{percent:f,duration:d,timing:l,dir:s}),I(t,"itemout",{percent:1-f,duration:d,timing:l,dir:s}),n.Promise.all([n.Transition.start(e,c[1],d,l),n.Transition.start(t,c[0],d,l)]).then(function(){w.reset(),u.resolve()},n.noop),u.promise},cancel:function(){n.Transition.cancel([e,t])},reset:function(){for(var d in c[0])n.css([e,t],d,"")},forward:function(d,f){return f===void 0&&(f=this.percent()),n.Transition.cancel([e,t]),this.show(d,f,!0)},translate:function(d){this.reset();var f=v(d,s);n.css(e,f[1]),n.css(t,f[0]),I(e,"itemtranslatein",{percent:d,dir:s}),I(t,"itemtranslateout",{percent:1-d,dir:s})},percent:function(){return o(t||e,e,s)},getDistance:function(){return t&&t.offsetWidth}}}function I(t,e,s){n.trigger(t,n.createEvent(e,!1,!1,s))}var A={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected:function(){this.autoplay&&this.startAutoplay()},disconnected:function(){this.stopAutoplay()},update:function(){n.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:function(){return document},filter:function(){return this.autoplay},handler:function(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay:function(){var t=this;this.stopAutoplay(),this.interval=setInterval(function(){return(!t.draggable||!n.$(":focus",t.$el))&&(!t.pauseOnHover||!n.matches(t.$el,":hover"))&&!t.stack.length&&t.show("next")},this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)}}},_={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created:function(){var t=this;["start","move","end"].forEach(function(e){var s=t[e];t[e]=function(a){var i=n.getEventPos(a).x*(n.isRtl?-1:1);t.prevPos=i!==t.pos?t.pos:t.prevPos,t.pos=i,s(a)}})},events:[{name:n.pointerDown,delegate:function(){return this.selSlides},handler:function(t){!this.draggable||!n.isTouch(t)&&N(t.target)||n.closest(t.target,n.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler:function(t){t.preventDefault()}}],methods:{start:function(){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,n.on(document,n.pointerMove,this.move,{passive:!1}),n.on(document,n.pointerUp+" "+n.pointerCancel+" input",this.end,!0),n.css(this.list,"userSelect","none")},move:function(t){var e=this,s=this.pos-this.drag;if(!(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)){n.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;for(var a=this,i=a.slides,x=this,o=x.prevIndex,v=Math.abs(s),r=this.getIndex(o+this.dir,o),c=this._getDistance(o,r)||i[o].offsetWidth;r!==o&&v>c;)this.drag-=c*this.dir,o=r,v-=c,r=this.getIndex(o+this.dir,o),c=this._getDistance(o,r)||i[o].offsetWidth;this.percent=v/c;var u=i[o],d=i[r],f=this.index!==r,m=o===r,w;[this.index,this.prevIndex].filter(function(l){return!n.includes([r,o],l)}).forEach(function(l){n.trigger(i[l],"itemhidden",[e]),m&&(w=!0,e.prevIndex=o)}),(this.index===o&&this.prevIndex!==o||w)&&n.trigger(i[this.index],"itemshown",[this]),f&&(this.prevIndex=o,this.index=r,!m&&n.trigger(u,"beforeitemhide",[this]),n.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),u,!m&&d),f&&(!m&&n.trigger(u,"itemhide",[this]),n.trigger(d,"itemshow",[this]))}},end:function(){if(n.off(document,n.pointerMove,this.move,{passive:!1}),n.off(document,n.pointerUp+" "+n.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{var t=(n.isRtl?this.dir*(n.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}n.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function N(t){return!t.children.length&&t.childNodes.length}var S={data:{selNav:!1},computed:{nav:function(t,e){var s=t.selNav;return n.$(s,e)},selNavItem:function(t){var e=t.attrItem;return"["+e+"],[data-"+e+"]"},navItems:function(t,e){return n.$$(this.selNavItem,e)}},update:{write:function(){var t=this;this.nav&&this.length!==this.nav.children.length&&n.html(this.nav,this.slides.map(function(e,s){return"<li "+t.attrItem+'="'+s+'"><a href></a></li>'}).join("")),this.navItems.concat(this.nav).forEach(function(e){return e&&(e.hidden=!t.maxIndex)}),this.updateNav()},events:["resize"]},events:[{name:"click",delegate:function(){return this.selNavItem},handler:function(t){t.preventDefault(),this.show(n.data(t.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav:function(){var t=this,e=this.getValidIndex();this.navItems.forEach(function(s){var a=n.data(s,t.attrItem);n.toggleClass(s,t.clsActive,n.toNumber(a)===e),n.toggleClass(s,"uk-invisible",t.finite&&(a==="previous"&&e===0||a==="next"&&e>=t.maxIndex))})}}},T={mixins:[A,_,S],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:function(){return{easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}},connected:function(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected:function(){n.removeClass(this.slides,this.clsActive)},computed:{duration:function(t,e){var s=t.velocity;return H(e.offsetWidth/s)},list:function(t,e){var s=t.selList;return n.$(s,e)},maxIndex:function(){return this.length-1},selSlides:function(t){var e=t.selList,s=t.selSlides;return e+" "+(s||"> *")},slides:{get:function(){return n.$$(this.selSlides,this.$el)},watch:function(){this.$reset()}},length:function(){return this.slides.length}},events:{itemshown:function(){this.$update(this.list)}},methods:{show:function(t,e){var s=this;if(e===void 0&&(e=!1),!(this.dragging||!this.length)){var a=this,i=a.stack,x=e?0:i.length,o=function(){i.splice(x,1),i.length&&s.show(i.shift(),!0)};if(i[e?"unshift":"push"](t),!e&&i.length>1){i.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}var v=this.getIndex(this.index),r=n.hasClass(this.slides,this.clsActive)&&this.slides[v],c=this.getIndex(t,this.index),u=this.slides[c];if(r===u){o();return}if(this.dir=D(t,v),this.prevIndex=v,this.index=c,r&&!n.trigger(r,"beforeitemhide",[this])||!n.trigger(u,"beforeitemshow",[this,r])){this.index=this.prevIndex,o();return}var d=this._show(r,u,e).then(function(){return r&&n.trigger(r,"itemhidden",[s]),n.trigger(u,"itemshown",[s]),new n.Promise(function(f){n.fastdom.write(function(){i.shift(),i.length?s.show(i.shift(),!0):s._transitioner=null,f()})})});return r&&n.trigger(r,"itemhide",[this]),n.trigger(u,"itemshow",[this]),d}},getIndex:function(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.index),n.clamp(n.getIndex(t,this.slides,e,this.finite),0,this.maxIndex)},getValidIndex:function(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.prevIndex),this.getIndex(t,e)},_show:function(t,e,s){if(this._transitioner=this._getTransitioner(t,e,this.dir,n.assign({easing:s?e.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)),!s&&!t)return this._translate(1),n.Promise.resolve();var a=this.stack,i=a.length;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance:function(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate:function(t,e,s){e===void 0&&(e=this.prevIndex),s===void 0&&(s=this.index);var a=this._getTransitioner(e!==s?e:!1,s);return a.translate(t),a},_getTransitioner:function(t,e,s,a){return t===void 0&&(t=this.prevIndex),e===void 0&&(e=this.index),s===void 0&&(s=this.dir||1),a===void 0&&(a=this.transitionOptions),new this.Transitioner(n.isNumber(t)?this.slides[t]:t,n.isNumber(e)?this.slides[e]:e,s*(n.isRtl?-1:1),a)}}};function D(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function H(t){return .5*t+300}var M={mixins:[T],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:$,Transitioner:z},computed:{animation:function(t){var e=t.animation,s=t.Animations;return n.assign(s[e]||s.slide,{name:e})},transitionOptions:function(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden":function(t){var e=t.target;this.$update(e)},beforeitemshow:function(t){var e=t.target;n.addClass(e,this.clsActive)},itemshown:function(t){var e=t.target;n.addClass(e,this.clsActivated)},itemhidden:function(t){var e=t.target;n.removeClass(e,this.clsActive,this.clsActivated)}}},C=n.assign({},$,{fade:{show:function(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent:function(t){return 1-n.css(t,"opacity")},translate:function(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show:function(){return[{opacity:0,transform:b(1+.5),zIndex:0},{zIndex:-1}]},percent:function(t){return 1-n.css(t,"opacity")},translate:function(t){return[{opacity:1-t,transform:b(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show:function(t){return t<0?[{transform:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent:function(t,e,s){return s<0?1-p(e):p(t)},translate:function(t,e){return e<0?[{transform:h(30*t),zIndex:-1},{transform:h(-100*(1-t)),zIndex:0}]:[{transform:h(-t*100),zIndex:0},{transform:h(30*(1-t)),zIndex:-1}]}},push:{show:function(t){return t<0?[{transform:h(100),zIndex:0},{transform:h(),zIndex:-1}]:[{transform:h(-30),zIndex:-1},{transform:h(),zIndex:0}]},percent:function(t,e,s){return s>0?1-p(e):p(t)},translate:function(t,e){return e<0?[{transform:h(t*100),zIndex:0},{transform:h(-30*(1-t)),zIndex:-1}]:[{transform:h(-30*t),zIndex:-1},{transform:h(100*(1-t)),zIndex:0}]}}}),E={update:{write:function(){if(!(this.stack.length||this.dragging)){var t=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==t)&&this.show(t)}},events:["resize"]}},y={mixins:[g,M,E],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:C},update:{read:function(){if(!this.list)return!1;var t=this.ratio.split(":").map(Number),e=t[0],s=t[1];return s=s*this.list.offsetWidth/e||0,this.minHeight&&(s=Math.max(this.minHeight,s)),this.maxHeight&&(s=Math.min(this.maxHeight,s)),{height:s-n.boxModelAdjust(this.list,"height","content-box")}},write:function(t){var e=t.height;e>0&&n.css(this.list,"minHeight",e)},events:["resize"]}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",y),y});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | 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')) :
|
|
@@ -595,7 +595,6 @@
|
|
|
595
595
|
|
|
596
596
|
uikitUtil.off(document, uikitUtil.pointerMove, this.move);
|
|
597
597
|
uikitUtil.off(document, uikitUtil.pointerUp, this.end);
|
|
598
|
-
uikitUtil.off(window, 'scroll', this.scroll);
|
|
599
598
|
|
|
600
599
|
if (!this.drag) {
|
|
601
600
|
return;
|
|
@@ -678,7 +677,7 @@
|
|
|
678
677
|
|
|
679
678
|
var x = pos.x;
|
|
680
679
|
var y = pos.y;
|
|
681
|
-
y += window
|
|
680
|
+
y += uikitUtil.scrollTop(window);
|
|
682
681
|
|
|
683
682
|
var dist = (Date.now() - last) * .3;
|
|
684
683
|
last = Date.now();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.ec95eb0c7 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(r){return D(r,"top","bottom")}function D(r,n,o){for(var s=[[]],h=0;h<r.length;h++){var a=r[h];if(!!e.isVisible(a))for(var t=u(a),f=s.length-1;f>=0;f--){var c=s[f];if(!c[0]){c.push(a);break}var d=void 0;if(c[0].offsetParent===a.offsetParent?d=u(c[0]):(t=u(a,!0),d=u(c[0],!0)),t[n]>=d[o]-1&&t[n]!==d[n]){s.push([a]);break}if(t[o]-1>d[n]||t[n]===d[n]){c.push(a);break}if(f===0){s.unshift([a]);break}}}return s}function u(r,n){var o;n===void 0&&(n=!1);var s=r.offsetTop,h=r.offsetLeft,a=r.offsetHeight,t=r.offsetWidth;return n&&(o=e.offsetPosition(r),s=o[0],h=o[1]),{top:s,left:h,bottom:s+a,right:h+t}}var b="uk-transition-leave",w="uk-transition-enter";function y(r,n,o,s){s===void 0&&(s=0);var h=l(n,!0),a={opacity:1},t={opacity:0},f=function(i){return function(){return h===l(n)?i():e.Promise.reject()}},c=f(function(){return e.addClass(n,b),e.Promise.all(C(n).map(function(i,p){return new e.Promise(function(v){return setTimeout(function(){return e.Transition.start(i,t,o/2,"ease").then(v)},p*s)})})).then(function(){return e.removeClass(n,b)})}),d=f(function(){var i=e.height(n);return e.addClass(n,w),r(),e.css(e.children(n),{opacity:0}),new e.Promise(function(p){return requestAnimationFrame(function(){var v=e.children(n),m=e.height(n);e.css(n,"alignContent","flex-start"),e.height(n,i);var L=C(n);e.css(v,t);var B=L.map(function(O,_){return new e.Promise(function(Y){return setTimeout(function(){return e.Transition.start(O,a,o/2,"ease").then(Y)},_*s)})});i!==m&&B.push(e.Transition.start(n,{height:m},o/2+L.length*s,"ease")),e.Promise.all(B).then(function(){e.removeClass(n,w),h===l(n)&&(e.css(n,{height:"",alignContent:""}),e.css(v,{opacity:""}),delete n.dataset.transition),p()})})})});return e.hasClass(n,b)?T(n).then(d):e.hasClass(n,w)?T(n).then(c).then(d):c().then(d)}function l(r,n){return n&&(r.dataset.transition=1+l(r)),e.toNumber(r.dataset.transition)||0}function T(r){return e.Promise.all(e.children(r).filter(e.Transition.inProgress).map(function(n){return new e.Promise(function(o){return e.once(n,"transitionend transitioncanceled",o)})}))}function C(r){return g(e.children(r)).reduce(function(n,o){return n.concat(e.sortBy(o.filter(function(s){return e.isInView(s)}),"offsetLeft"))},[])}function F(r,n,o){return new e.Promise(function(s){return requestAnimationFrame(function(){var h=e.children(n),a=h.map(function(f){return $(f,!0)}),t=e.css(n,["height","padding"]);e.Transition.cancel(n),h.forEach(e.Transition.cancel),P(n),r(),h=h.concat(e.children(n).filter(function(f){return!e.includes(h,f)})),e.Promise.resolve().then(function(){e.fastdom.flush();var f=e.css(n,["height","padding"]),c=R(n,h,a),d=c[0],i=c[1];h.forEach(function(p,v){return i[v]&&e.css(p,i[v])}),e.css(n,e.assign({display:"block"},t)),requestAnimationFrame(function(){var p=h.map(function(v,m){return e.parent(v)===n&&e.Transition.start(v,d[m],o,"ease")}).concat(e.Transition.start(n,f,o,"ease"));e.Promise.all(p).then(function(){h.forEach(function(v,m){return e.parent(v)===n&&e.css(v,"display",d[m].opacity===0?"none":"")}),P(n)},e.noop).then(s)})})})})}function $(r,n){var o=e.css(r,"zIndex");return e.isVisible(r)?e.assign({display:"",opacity:n?e.css(r,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(r):o},x(r)):!1}function R(r,n,o){var s=n.map(function(a,t){return e.parent(a)&&t in o?o[t]?e.isVisible(a)?x(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1}),h=s.map(function(a,t){var f=e.parent(n[t])===r&&(o[t]||$(n[t]));if(!f)return!1;if(!a)delete f.opacity;else if(!("opacity"in a)){var c=f.opacity;c%1?a.opacity=1:delete f.opacity}return f});return[s,h]}function P(r){e.css(r.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),e.css(r,{height:"",display:"",padding:""})}function x(r){var n=e.offset(r),o=n.height,s=n.width,h=e.position(r),a=h.top,t=h.left,f=e.css(r,["marginTop","marginLeft"]),c=f.marginLeft,d=f.marginTop;return{top:a,left:t,height:o,width:s,marginLeft:c,marginTop:d,transform:""}}var H={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate:function(r,n){var o=this;n===void 0&&(n=this.$el);var s=this.animation,h=s==="fade"?y:s==="delayed-fade"?function(){for(var a=[],t=arguments.length;t--;)a[t]=arguments[t];return y.apply(void 0,a.concat([40]))}:s?F:function(){return r(),e.Promise.resolve()};return h(r,n,this.duration).then(function(){return o.$update(n,"resize")},e.noop)}}},z={connected:function(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},S={mixins:[z,H],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created:function(){var r=this;["init","start","move","end"].forEach(function(n){var o=r[n];r[n]=function(s){e.assign(r.pos,e.getEventPos(s)),o(s)}})},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target:function(){return(this.$el.tBodies||[this.$el])[0]},items:function(){return e.children(this.target)},isEmpty:{get:function(){return e.isEmpty(this.items)},watch:function(r){e.toggleClass(this.target,this.clsEmpty,r)},immediate:!0},handles:{get:function(r,n){var o=r.handle;return o?e.$$(o,n):this.items},watch:function(r,n){e.css(n,{touchAction:"",userSelect:""}),e.css(r,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write:function(r){if(!(!this.drag||!e.parent(this.placeholder))){var n=this,o=n.pos,s=o.x,h=o.y,a=n.origin,t=a.offsetTop,f=a.offsetLeft,c=n.placeholder;e.css(this.drag,{top:h-t,left:s-f});var d=this.getSortable(document.elementFromPoint(s,h));if(!!d){var i=d.items;if(!i.some(e.Transition.inProgress)){var p=V(i,{x:s,y:h});if(!(i.length&&(!p||p===c))){var v=this.getSortable(c),m=q(d.target,p,c,s,h,d===v&&r.moved!==p);m!==!1&&(m&&c===m||(d!==v?(v.remove(c),r.moved=p):delete r.moved,d.insert(c,m),this.touched.add(d)))}}}}},events:["move"]},methods:{init:function(r){var n=r.target,o=r.button,s=r.defaultPrevented,h=this.items.filter(function(t){return e.within(n,t)}),a=h[0];!a||s||o>0||e.isInput(n)||e.within(n,"."+this.clsNoDrag)||this.handle&&!e.within(n,this.handle)||(r.preventDefault(),this.touched=new Set([this]),this.placeholder=a,this.origin=e.assign({target:n,index:e.index(a)},this.pos),e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(r))},start:function(r){this.drag=M(this.$container,this.placeholder);var n=this.placeholder.getBoundingClientRect(),o=n.left,s=n.top;e.assign(this.origin,{offsetLeft:this.pos.x-o,offsetTop:this.pos.y-s}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),N(this.pos),this.move(r)},move:function(r){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(r)},end:function(){var r=this;if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),e.off(window,"scroll",this.scroll),!!this.drag){A();var n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null,this.touched.forEach(function(o){var s=o.clsPlaceholder,h=o.clsItem;return r.touched.forEach(function(a){return e.removeClass(a.items,s,h)})}),this.touched=null,e.removeClass(document.documentElement,this.clsDragState)}},insert:function(r,n){var o=this;e.addClass(this.items,this.clsItem);var s=function(){return n?e.before(n,r):e.append(o.target,r)};this.animate(s)},remove:function(r){!e.within(r,this.target)||this.animate(function(){return e.remove(r)})},getSortable:function(r){do{var n=this.$getComponent(r,"sortable");if(n&&(n===this||this.group!==!1&&n.group===this.group))return n}while(r=e.parent(r))}}},I;function N(r){var n=Date.now();I=setInterval(function(){var o=r.x,s=r.y;s+=window.pageYOffset;var h=(Date.now()-n)*.3;n=Date.now(),e.scrollParents(document.elementFromPoint(o,r.y),/auto|scroll/).reverse().some(function(a){var t=a.scrollTop,f=a.scrollHeight,c=e.offset(e.getViewport(a)),d=c.top,i=c.bottom,p=c.height;if(d<s&&d+35>s)t-=h;else if(i>s&&i-35<s)t+=h;else return;if(t>0&&t<f-p)return e.scrollTop(a,t),!0})},15)}function A(){clearInterval(I)}function M(r,n){var o=e.append(r,n.outerHTML.replace(/(^<)(?:li|tr)|(?:li|tr)(\/>$)/g,"$1div$2"));return e.css(o,"margin","0","important"),e.css(o,e.assign({boxSizing:"border-box",width:n.offsetWidth,height:n.offsetHeight},e.css(n,["paddingLeft","paddingRight","paddingTop","paddingBottom"]))),e.height(o.firstElementChild,e.height(n.firstElementChild)),o}function V(r,n){return r[e.findIndex(r,function(o){return e.pointInRect(n,o.getBoundingClientRect())})]}function q(r,n,o,s,h,a){if(!!e.children(r).length){var t=n.getBoundingClientRect();if(!a)return W(r,o)||h<t.top+t.height/2?n:n.nextElementSibling;var f=o.getBoundingClientRect(),c=E([t.top,t.bottom],[f.top,f.bottom]),d=c?s:h,i=c?"width":"height",p=c?"left":"top",v=c?"right":"bottom",m=f[i]<t[i]?t[i]-f[i]:0;return f[p]<t[p]?m&&d<t[p]+m?!1:n.nextElementSibling:m&&d>t[v]-m?!1:n}}function W(r,n){var o=e.children(r).length===1;o&&e.append(r,n);var s=e.children(r),h=s.some(function(a,t){var f=a.getBoundingClientRect();return s.slice(t+1).some(function(c){var d=c.getBoundingClientRect();return!E([f.left,f.right],[d.left,d.right])})});return o&&e.remove(n),h}function E(r,n){return r[1]>n[0]&&n[1]>r[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",S),S});
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(r){return D(r,"top","bottom")}function D(r,n,o){for(var s=[[]],h=0;h<r.length;h++){var a=r[h];if(!!e.isVisible(a))for(var t=u(a),f=s.length-1;f>=0;f--){var c=s[f];if(!c[0]){c.push(a);break}var d=void 0;if(c[0].offsetParent===a.offsetParent?d=u(c[0]):(t=u(a,!0),d=u(c[0],!0)),t[n]>=d[o]-1&&t[n]!==d[n]){s.push([a]);break}if(t[o]-1>d[n]||t[n]===d[n]){c.push(a);break}if(f===0){s.unshift([a]);break}}}return s}function u(r,n){var o;n===void 0&&(n=!1);var s=r.offsetTop,h=r.offsetLeft,a=r.offsetHeight,t=r.offsetWidth;return n&&(o=e.offsetPosition(r),s=o[0],h=o[1]),{top:s,left:h,bottom:s+a,right:h+t}}var b="uk-transition-leave",w="uk-transition-enter";function y(r,n,o,s){s===void 0&&(s=0);var h=l(n,!0),a={opacity:1},t={opacity:0},f=function(i){return function(){return h===l(n)?i():e.Promise.reject()}},c=f(function(){return e.addClass(n,b),e.Promise.all(C(n).map(function(i,p){return new e.Promise(function(v){return setTimeout(function(){return e.Transition.start(i,t,o/2,"ease").then(v)},p*s)})})).then(function(){return e.removeClass(n,b)})}),d=f(function(){var i=e.height(n);return e.addClass(n,w),r(),e.css(e.children(n),{opacity:0}),new e.Promise(function(p){return requestAnimationFrame(function(){var v=e.children(n),m=e.height(n);e.css(n,"alignContent","flex-start"),e.height(n,i);var L=C(n);e.css(v,t);var B=L.map(function(O,_){return new e.Promise(function(G){return setTimeout(function(){return e.Transition.start(O,a,o/2,"ease").then(G)},_*s)})});i!==m&&B.push(e.Transition.start(n,{height:m},o/2+L.length*s,"ease")),e.Promise.all(B).then(function(){e.removeClass(n,w),h===l(n)&&(e.css(n,{height:"",alignContent:""}),e.css(v,{opacity:""}),delete n.dataset.transition),p()})})})});return e.hasClass(n,b)?T(n).then(d):e.hasClass(n,w)?T(n).then(c).then(d):c().then(d)}function l(r,n){return n&&(r.dataset.transition=1+l(r)),e.toNumber(r.dataset.transition)||0}function T(r){return e.Promise.all(e.children(r).filter(e.Transition.inProgress).map(function(n){return new e.Promise(function(o){return e.once(n,"transitionend transitioncanceled",o)})}))}function C(r){return g(e.children(r)).reduce(function(n,o){return n.concat(e.sortBy(o.filter(function(s){return e.isInView(s)}),"offsetLeft"))},[])}function F(r,n,o){return new e.Promise(function(s){return requestAnimationFrame(function(){var h=e.children(n),a=h.map(function(f){return $(f,!0)}),t=e.css(n,["height","padding"]);e.Transition.cancel(n),h.forEach(e.Transition.cancel),P(n),r(),h=h.concat(e.children(n).filter(function(f){return!e.includes(h,f)})),e.Promise.resolve().then(function(){e.fastdom.flush();var f=e.css(n,["height","padding"]),c=R(n,h,a),d=c[0],i=c[1];h.forEach(function(p,v){return i[v]&&e.css(p,i[v])}),e.css(n,e.assign({display:"block"},t)),requestAnimationFrame(function(){var p=h.map(function(v,m){return e.parent(v)===n&&e.Transition.start(v,d[m],o,"ease")}).concat(e.Transition.start(n,f,o,"ease"));e.Promise.all(p).then(function(){h.forEach(function(v,m){return e.parent(v)===n&&e.css(v,"display",d[m].opacity===0?"none":"")}),P(n)},e.noop).then(s)})})})})}function $(r,n){var o=e.css(r,"zIndex");return e.isVisible(r)?e.assign({display:"",opacity:n?e.css(r,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(r):o},x(r)):!1}function R(r,n,o){var s=n.map(function(a,t){return e.parent(a)&&t in o?o[t]?e.isVisible(a)?x(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1}),h=s.map(function(a,t){var f=e.parent(n[t])===r&&(o[t]||$(n[t]));if(!f)return!1;if(!a)delete f.opacity;else if(!("opacity"in a)){var c=f.opacity;c%1?a.opacity=1:delete f.opacity}return f});return[s,h]}function P(r){e.css(r.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),e.css(r,{height:"",display:"",padding:""})}function x(r){var n=e.offset(r),o=n.height,s=n.width,h=e.position(r),a=h.top,t=h.left,f=e.css(r,["marginTop","marginLeft"]),c=f.marginLeft,d=f.marginTop;return{top:a,left:t,height:o,width:s,marginLeft:c,marginTop:d,transform:""}}var H={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate:function(r,n){var o=this;n===void 0&&(n=this.$el);var s=this.animation,h=s==="fade"?y:s==="delayed-fade"?function(){for(var a=[],t=arguments.length;t--;)a[t]=arguments[t];return y.apply(void 0,a.concat([40]))}:s?F:function(){return r(),e.Promise.resolve()};return h(r,n,this.duration).then(function(){return o.$update(n,"resize")},e.noop)}}},z={connected:function(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},S={mixins:[z,H],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created:function(){var r=this;["init","start","move","end"].forEach(function(n){var o=r[n];r[n]=function(s){e.assign(r.pos,e.getEventPos(s)),o(s)}})},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target:function(){return(this.$el.tBodies||[this.$el])[0]},items:function(){return e.children(this.target)},isEmpty:{get:function(){return e.isEmpty(this.items)},watch:function(r){e.toggleClass(this.target,this.clsEmpty,r)},immediate:!0},handles:{get:function(r,n){var o=r.handle;return o?e.$$(o,n):this.items},watch:function(r,n){e.css(n,{touchAction:"",userSelect:""}),e.css(r,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write:function(r){if(!(!this.drag||!e.parent(this.placeholder))){var n=this,o=n.pos,s=o.x,h=o.y,a=n.origin,t=a.offsetTop,f=a.offsetLeft,c=n.placeholder;e.css(this.drag,{top:h-t,left:s-f});var d=this.getSortable(document.elementFromPoint(s,h));if(!!d){var i=d.items;if(!i.some(e.Transition.inProgress)){var p=V(i,{x:s,y:h});if(!(i.length&&(!p||p===c))){var v=this.getSortable(c),m=q(d.target,p,c,s,h,d===v&&r.moved!==p);m!==!1&&(m&&c===m||(d!==v?(v.remove(c),r.moved=p):delete r.moved,d.insert(c,m),this.touched.add(d)))}}}}},events:["move"]},methods:{init:function(r){var n=r.target,o=r.button,s=r.defaultPrevented,h=this.items.filter(function(t){return e.within(n,t)}),a=h[0];!a||s||o>0||e.isInput(n)||e.within(n,"."+this.clsNoDrag)||this.handle&&!e.within(n,this.handle)||(r.preventDefault(),this.touched=new Set([this]),this.placeholder=a,this.origin=e.assign({target:n,index:e.index(a)},this.pos),e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(r))},start:function(r){this.drag=M(this.$container,this.placeholder);var n=this.placeholder.getBoundingClientRect(),o=n.left,s=n.top;e.assign(this.origin,{offsetLeft:this.pos.x-o,offsetTop:this.pos.y-s}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),N(this.pos),this.move(r)},move:function(r){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(r)},end:function(){var r=this;if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!!this.drag){A();var n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null,this.touched.forEach(function(o){var s=o.clsPlaceholder,h=o.clsItem;return r.touched.forEach(function(a){return e.removeClass(a.items,s,h)})}),this.touched=null,e.removeClass(document.documentElement,this.clsDragState)}},insert:function(r,n){var o=this;e.addClass(this.items,this.clsItem);var s=function(){return n?e.before(n,r):e.append(o.target,r)};this.animate(s)},remove:function(r){!e.within(r,this.target)||this.animate(function(){return e.remove(r)})},getSortable:function(r){do{var n=this.$getComponent(r,"sortable");if(n&&(n===this||this.group!==!1&&n.group===this.group))return n}while(r=e.parent(r))}}},I;function N(r){var n=Date.now();I=setInterval(function(){var o=r.x,s=r.y;s+=e.scrollTop(window);var h=(Date.now()-n)*.3;n=Date.now(),e.scrollParents(document.elementFromPoint(o,r.y),/auto|scroll/).reverse().some(function(a){var t=a.scrollTop,f=a.scrollHeight,c=e.offset(e.getViewport(a)),d=c.top,i=c.bottom,p=c.height;if(d<s&&d+35>s)t-=h;else if(i>s&&i-35<s)t+=h;else return;if(t>0&&t<f-p)return e.scrollTop(a,t),!0})},15)}function A(){clearInterval(I)}function M(r,n){var o=e.append(r,n.outerHTML.replace(/(^<)(?:li|tr)|(?:li|tr)(\/>$)/g,"$1div$2"));return e.css(o,"margin","0","important"),e.css(o,e.assign({boxSizing:"border-box",width:n.offsetWidth,height:n.offsetHeight},e.css(n,["paddingLeft","paddingRight","paddingTop","paddingBottom"]))),e.height(o.firstElementChild,e.height(n.firstElementChild)),o}function V(r,n){return r[e.findIndex(r,function(o){return e.pointInRect(n,o.getBoundingClientRect())})]}function q(r,n,o,s,h,a){if(!!e.children(r).length){var t=n.getBoundingClientRect();if(!a)return W(r,o)||h<t.top+t.height/2?n:n.nextElementSibling;var f=o.getBoundingClientRect(),c=E([t.top,t.bottom],[f.top,f.bottom]),d=c?s:h,i=c?"width":"height",p=c?"left":"top",v=c?"right":"bottom",m=f[i]<t[i]?t[i]-f[i]:0;return f[p]<t[p]?m&&d<t[p]+m?!1:n.nextElementSibling:m&&d>t[v]-m?!1:n}}function W(r,n){var o=e.children(r).length===1;o&&e.append(r,n);var s=e.children(r),h=s.some(function(a,t){var f=a.getBoundingClientRect();return s.slice(t+1).some(function(c){var d=c.getBoundingClientRect();return!E([f.left,f.right],[d.left,d.right])})});return o&&e.remove(n),h}function E(r,n){return r[1]>n[0]&&n[1]>r[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",S),S});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,c){typeof exports=="object"&&typeof module<"u"?module.exports=c(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],c):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitTooltip=c(n.UIkit.util))})(this,function(n){"use strict";var c={props:{container:Boolean},data:{container:!0},computed:{container:function(o){var s=o.container;return s===!0&&this.$container||s&&n.$(s)}}},v={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation:function(o){var s=o.animation;return!!s[0]},hasTransition:function(o){var s=o.animation;return this.hasAnimation&&s[0]===!0}},methods:{toggleElement:function(o,s,a){var t=this;return new n.Promise(function(i){return n.Promise.all(n.toNodes(o).map(function(e){var h=n.isBoolean(s)?s:!t.isToggled(e);if(!n.trigger(e,"before"+(h?"show":"hide"),[t]))return n.Promise.reject();var r=(n.isFunction(a)?a:a===!1||!t.hasAnimation?t._toggle:t.hasTransition?w(t):T(t))(e,h),d=h?t.clsEnter:t.clsLeave;n.addClass(e,d),n.trigger(e,h?"show":"hide",[t]);var f=function(){n.removeClass(e,d),n.trigger(e,h?"shown":"hidden",[t]),t.$update(e)};return r?r.then(f,function(){return n.removeClass(e,d),n.Promise.reject()}):f()})).then(i,n.noop)})},isToggled:function(o){var s;return o===void 0&&(o=this.$el),s=n.toNodes(o),o=s[0],n.hasClass(o,this.clsEnter)?!0:n.hasClass(o,this.clsLeave)?!1:this.cls?n.hasClass(o,this.cls.split(" ")[0]):n.isVisible(o)},_toggle:function(o,s){if(!!o){s=Boolean(s);var a;this.cls?(a=n.includes(this.cls," ")||s!==n.hasClass(o,this.cls),a&&n.toggleClass(o,this.cls,n.includes(this.cls," ")?void 0:s)):(a=s===o.hidden,a&&(o.hidden=!s)),n.$$("[autofocus]",o).some(function(t){return n.isVisible(t)?t.focus()||!0:t.blur()}),a&&(n.trigger(o,"toggled",[s,this]),this.$update(o))}}}};function w(o){var s=o.isToggled,a=o.duration,t=o.initProps,i=o.hideProps,e=o.transition,h=o._toggle;return function(r,d){var f=n.Transition.inProgress(r),l=r.hasChildNodes?n.toFloat(n.css(r.firstElementChild,"marginTop"))+n.toFloat(n.css(r.lastElementChild,"marginBottom")):0,g=n.isVisible(r)?n.height(r)+(f?0:l):0;n.Transition.cancel(r),s(r)||h(r,!0),n.height(r,""),n.fastdom.flush();var u=n.height(r)+(f?0:l);return n.height(r,g),(d?n.Transition.start(r,n.assign({},t,{overflow:"hidden",height:u}),Math.round(a*(1-g/u)),e):n.Transition.start(r,i,Math.round(a*(g/u)),e).then(function(){return h(r,!1)})).then(function(){return n.css(r,t)})}}function T(o){return function(s,a){n.Animation.cancel(s);var t=o.animation,i=o.duration,e=o._toggle;return a?(e(s,!0),n.Animation.in(s,t[0],i,o.origin)):n.Animation.out(s,t[1]||t[0],i,o.origin).then(function(){return e(s,!1)})}}var $={props:{pos:String,offset:null,flip:Boolean,clsPos:String},data:{pos:"bottom-"+(n.isRtl?"right":"left"),flip:!0,offset:!1,clsPos:""},computed:{pos:function(o){var s=o.pos;return s.split("-").concat("center").slice(0,2)},dir:function(){return this.pos[0]},align:function(){return this.pos[1]}},methods:{positionAt:function(o,s,a){n.removeClasses(o,this.clsPos+"-(top|bottom|left|right)(-[a-z]+)?");var t=this,i=t.offset,e=this.getAxis();if(!n.isNumeric(i)){var h=n.$(i);i=h?n.offset(h)[e==="x"?"left":"top"]-n.offset(s)[e==="x"?"right":"bottom"]:0}var r=n.positionAt(o,s,e==="x"?n.flipPosition(this.dir)+" "+this.align:this.align+" "+n.flipPosition(this.dir),e==="x"?this.dir+" "+this.align:this.align+" "+this.dir,e==="x"?""+(this.dir==="left"?-i:i):" "+(this.dir==="top"?-i:i),null,this.flip,a).target,d=r.x,f=r.y;this.dir=e==="x"?d:f,this.align=e==="x"?f:d,n.toggleClass(o,this.clsPos+"-"+this.dir+"-"+this.align,this.offset===!1)},getAxis:function(){return this.dir==="top"||this.dir==="bottom"?"y":"x"}}},p,m={mixins:[c,v,$],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active",clsPos:"uk-tooltip"},beforeConnect:function(){this._hasTitle=n.hasAttr(this.$el,"title"),n.attr(this.$el,"title",""),this.updateAria(!1),P(this.$el)},disconnected:function(){this.hide(),n.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show:function(){var o=this;this.isToggled(this.tooltip||null)||!this.title||(this._unbind=n.once(document,"show keydown "+n.pointerDown,this.hide,!1,function(s){return s.type===n.pointerDown&&!n.within(s.target,o.$el)||s.type==="keydown"&&s.keyCode===27||s.type==="show"&&s.detail[0]!==o&&s.detail[0].$name===o.$name}),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},hide:function(){var o=this;n.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),!!this.isToggled(this.tooltip||null)&&this.toggleElement(this.tooltip,!1,!1).then(function(){n.remove(o.tooltip),o.tooltip=null,o._unbind()}))},_show:function(){var o=this;this.tooltip=n.append(this.container,'<div class="'+this.clsPos+'"> <div class="'+this.clsPos+'-inner">'+this.title+"</div> </div>"),n.on(this.tooltip,"toggled",function(s,a){o.updateAria(a),!!a&&(o.positionAt(o.tooltip,o.$el),o.origin=o.getAxis()==="y"?n.flipPosition(o.dir)+"-"+o.align:o.align+"-"+n.flipPosition(o.dir))}),this.toggleElement(this.tooltip,!0)},updateAria:function(o){n.attr(this.$el,"aria-expanded",o)}},events:(p={focus:"show",blur:"hide"},p[n.pointerEnter+" "+n.pointerLeave]=function(o){n.isTouch(o)||this[o.type===n.pointerEnter?"show":"hide"]()},p[n.pointerDown]=function(o){n.isTouch(o)&&this.show()},p)};function P(o){n.isFocusable(o)||n.attr(o,"tabindex","0")}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",m),m});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.f2970ffaa | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],s):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitUpload=s(r.UIkit.util))})(this,function(r){"use strict";var s={props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,msgInvalidMime:String,msgInvalidName:String,msgInvalidSize:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",msgInvalidSize:"Invalid File Size: %s Kilobytes Max",multiple:!1,name:"files[]",params:{},type:"",url:"",abort:r.noop,beforeAll:r.noop,beforeSend:r.noop,complete:r.noop,completeAll:r.noop,error:r.noop,fail:r.noop,load:r.noop,loadEnd:r.noop,loadStart:r.noop,progress:r.noop},events:{change:function(e){!r.matches(e.target,'input[type="file"]')||(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop:function(e){p(e);var n=e.dataTransfer;!n||!n.files||(r.removeClass(this.$el,this.clsDragover),this.upload(n.files))},dragenter:function(e){p(e)},dragover:function(e){p(e),r.addClass(this.$el,this.clsDragover)},dragleave:function(e){p(e),r.removeClass(this.$el,this.clsDragover)}},methods:{upload:function(e){var n=this;if(!!e.length){r.trigger(this.$el,"upload",[e]);for(var o=0;o<e.length;o++){if(this.maxSize&&this.maxSize*1e3<e[o].size){this.fail(this.msgInvalidSize.replace("%s",this.maxSize));return}if(this.allow&&!f(this.allow,e[o].name)){this.fail(this.msgInvalidName.replace("%s",this.allow));return}if(this.mime&&!f(this.mime,e[o].type)){this.fail(this.msgInvalidMime.replace("%s",this.mime));return}}this.multiple||(e=[e[0]]),this.beforeAll(this,e);var t=c(e,this.concurrent),l=function(i){var d=new FormData;i.forEach(function(a){return d.append(n.name,a)});for(var h in n.params)d.append(h,n.params[h]);r.ajax(n.url,{data:d,method:n.method,responseType:n.type,beforeSend:function(a){var m=a.xhr;return m.upload&&r.on(m.upload,"progress",n.progress),["loadStart","load","loadEnd","abort"].forEach(function(u){return r.on(m,u.toLowerCase(),n[u])}),n.beforeSend(a)}}).then(function(a){n.complete(a),t.length?l(t.shift()):n.completeAll(a)},function(a){return n.error(a)})};l(t.shift())}}}};function f(e,n){return n.match(new RegExp("^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function c(e,n){for(var o=[],t=0;t<e.length;t+=n){for(var l=[],i=0;i<n;i++)l.push(e[t+i]);o.push(l)}return o}function p(e){e.preventDefault(),e.stopPropagation()}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",s),s});
|