uikit 3.17.9-dev.73842811 → 3.17.9-dev.77c1d012a
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 +16 -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 +2 -2
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +9 -9
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +9 -9
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +2 -2
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +21 -25
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +21 -25
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +6 -6
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +21 -25
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +6 -6
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +4 -4
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +41 -33
- 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 +64 -67
- 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 +94 -103
- package/dist/js/uikit.min.js +1 -1
- package/package.json +12 -12
- package/src/js/api/component.js +2 -2
- package/src/js/api/events.js +1 -6
- package/src/js/api/instance.js +5 -5
- package/src/js/api/observables.js +2 -2
- package/src/js/api/options.js +15 -14
- package/src/js/api/props.js +13 -15
- package/src/js/components/filter.js +1 -2
- package/src/js/components/notification.js +1 -2
- package/src/js/components/sortable.js +4 -5
- package/src/js/components/tooltip.js +30 -35
- package/src/js/core/accordion.js +1 -2
- package/src/js/core/drop.js +23 -20
- package/src/js/core/dropnav.js +2 -3
- package/src/js/core/form-custom.js +5 -5
- package/src/js/core/icon.js +5 -6
- package/src/js/core/navbar.js +1 -2
- package/src/js/core/overflow-auto.js +3 -3
- package/src/js/core/scroll.js +1 -2
- package/src/js/core/scrollspy-nav.js +1 -2
- package/src/js/core/sticky.js +2 -5
- package/src/js/core/switcher.js +10 -12
- package/src/js/core/tab.js +2 -2
- package/src/js/core/toggle.js +3 -5
- package/src/js/mixin/animate.js +7 -7
- package/src/js/mixin/internal/animate-fade.js +2 -2
- package/src/js/mixin/modal.js +4 -6
- package/src/js/mixin/slider-drag.js +1 -2
- package/src/js/mixin/slider-nav.js +7 -8
- package/src/js/mixin/togglable.js +8 -8
- package/src/js/util/dimensions.js +4 -4
- package/src/js/util/event.js +6 -7
- package/src/js/util/lang.js +10 -10
- package/src/js/util/position.js +1 -2
- package/src/js/util/selector.js +2 -2
- package/src/js/util/style.js +2 -2
- package/src/js/util/viewport.js +18 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],b):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitParallax=b(s.UIkit.util))})(this,function(s){"use strict";function b(n,t="update"){n._connected&&n._updates.length&&(n._queued||(n._queued=new Set,s.fastdom.read(()=>{n._connected&&J(n,n._queued),delete n._queued})),n._queued.add(t.type||t))}function J(n,t){for(const{read:e,write:o,events:r=[]}of n._updates){if(!t.has("update")&&!r.some(i=>t.has(i)))continue;let c;e&&(c=e.call(n,n._data,t),c&&s.isPlainObject(c)&&s.assign(n._data,c)),o&&c!==!1&&s.fastdom.write(()=>{n._connected&&o.call(n,n._data,t)})}}function K(n){return _(s.observeResize,n,"resize")}function Q(n){return _((t,e)=>s.observeViewportResize(e),n)}function X(n){return _((t,e)=>({disconnect:s.on(Y(t),"scroll",e,{passive:!0})}),n,"scroll")}function _(n,t,e){return{observe:n,handler(){b(this,e)},...t}}function Y(n){return s.toNodes(n).map(t=>{const{ownerDocument:e}=t,o=s.scrollParent(t,!0);return o===e.scrollingElement?e:o})}var Z={props:{media:Boolean},data:{media:!1},connected(){const n=k(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function k(n,t){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(t,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function U(n,t){var e;return(e=n==null?void 0:n.startsWith)==null?void 0:e.call(n,t)}const{isArray:An,from:nn}=Array;function tn(n){return typeof n=="function"}function M(n){return n!==null&&typeof n=="object"}function en(n){return M(n)&&n===n.window}function E(n){return rn(n)>=1}function rn(n){return!en(n)&&M(n)&&n.nodeType}function O(n){return typeof n=="string"}function on(n){return n===void 0}function x(n){return d(n)[0]}function d(n){return E(n)?[n]:Array.from(n||[]).filter(E)}function P(n){const t=Object.create(null);return(e,...o)=>t[e]||(t[e]=n(e,...o))}function j(n,t,e){var o;if(M(t)){for(const r in t)j(n,r,t[r]);return}if(on(e))return(o=x(n))==null?void 0:o.getAttribute(t);for(const r of d(n))tn(e)&&(e=e.call(r,j(r,t))),e===null?cn(r,t):r.setAttribute(t,e)}function cn(n,t){d(n).forEach(e=>e.removeAttribute(t))}function I(n){var t;return(t=x(n))==null?void 0:t.parentElement}function sn(n,t){return d(n).filter(e=>A(e,t))}function A(n,t){return d(n).some(e=>e.matches(t))}function an(n,t){n=x(n);const e=n?nn(n.children):[];return t?sn(e,t):e}function fn(n,t){return t?d(n).indexOf(x(t)):an(I(n)).indexOf(n)}function un(n,t){return d(mn(n,x(t),"querySelectorAll"))}const dn=/(^|[^\\],)\s*[!>+~-]/,hn=P(n=>n.match(dn)),ln=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,gn=P(n=>n.replace(ln,"$1 *"));function mn(n,t=document,e){if(!n||!O(n))return n;if(n=gn(n),hn(n)){const o=xn(n);n="";for(let r of o){let c=t;if(r[0]==="!"){const i=r.substr(1).trim().split(" ");if(c=I(t).closest(i[0]),r=i.slice(1).join(" ").trim(),!r.length&&o.length===1)return c}if(r[0]==="-"){const i=r.substr(1).trim().split(" "),a=(c||t).previousElementSibling;c=A(a,r.substr(1))?a:null,r=i.slice(1).join(" ")}c&&(n+=`${n?",":""}${$n(c)} ${r}`)}t=document}try{return t[e](n)}catch{return null}}const bn=/.*?[^\\](?:,|$)/g,xn=P(n=>n.match(bn).map(t=>t.replace(/,$/,"").trim()));function $n(n){const t=[];for(;n.parentNode;){const e=j(n,"id");if(e){t.unshift(`#${pn(e)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${fn(n)+1})`),t.unshift(o),n=n.parentNode}}return t.join(" > ")}function pn(n){return O(n)?CSS.escape(n):""}const wn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function vn(n){const t=wn.exec(n);if(t)return document.createElement(t[1]);const e=document.createElement("template");return e.innerHTML=n.trim(),yn(e.content.childNodes)}function yn(n){return n.length>1?n:n[0]}function Sn(n,t){return Fn(n)?d(vn(n)):un(n,t)}function Fn(n){return O(n)&&U(n.trim(),"<")}function _n(n){return Math.ceil(Math.max(0,...Sn("[stroke]",n).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const v={x:y,y,rotate:y,scale:y,color:N,backgroundColor:N,borderColor:N,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Pn,stroke:jn,bgx:q,bgy:q},{keys:T}=Object;var Mn={mixins:[Z],props:H(T(v),"list"),data:H(T(v),void 0),computed:{props(n,t){const e={};for(const r in n)r in v&&!s.isUndefined(n[r])&&(e[r]=n[r].slice());const o={};for(const r in e)o[r]=v[r](r,t,e[r],e);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const t={};for(const e in this.props)this.props[e](t,s.clamp(n));return t.willChange=Object.keys(t).map(s.propName).join(","),t}}};function y(n,t,e){let o=F(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",r;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,r=c=>s.toFloat(s.toFloat(c).toFixed(o==="px"?0:6))):n==="scale"&&(o="",r=c=>{var i;return F([c])?s.toPx(c,"width",t,!0)/t[`offset${(i=c.endsWith)!=null&&i.call(c,"vh")?"Height":"Width"}`]:s.toFloat(c)}),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,r),(c,i)=>{c.transform=`${c.transform||""} ${n}(${$(e,i)}${o})`}}function N(n,t,e){return e.length===1&&e.unshift(p(t,n,"")),e=m(e,o=>On(t,o)),(o,r)=>{const[c,i,a]=D(e,r),h=c.map((l,f)=>(l+=a*(i[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function On(n,t){return p(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function g(n,t,e){e.length===1&&e.unshift(0);const o=F(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(r,c)=>{const i=$(e,c);r.filter=`${r.filter||""} ${n}(${i+o})`}}function Pn(n,t,e){return e.length===1&&e.unshift(p(t,n,"")),e=m(e),(o,r)=>{o[n]=$(e,r)}}function jn(n,t,e){e.length===1&&e.unshift(0);const o=F(e),r=_n(t);return e=m(e.reverse(),c=>(c=s.toFloat(c),o==="%"?c*r/100:c)),e.some(([c])=>c)?(s.css(t,"strokeDasharray",r),(c,i)=>{c.strokeDashoffset=$(e,i)}):s.noop}function q(n,t,e,o){e.length===1&&e.unshift(0);const r=n==="bgy"?"height":"width";o[n]=m(e,a=>s.toPx(a,r,t));const c=["bgx","bgy"].filter(a=>a in o);if(c.length===2&&n==="bgx")return s.noop;if(p(t,"backgroundSize","")==="cover")return Nn(n,t,e,o);const i={};for(const a of c)i[a]=W(t,a);return R(c,i,o)}function Nn(n,t,e,o){const r=Cn(t);if(!r.width)return s.noop;const c={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),a={};for(const f of i){const u=o[f].map(([In])=>In),w=Math.min(...u),z=Math.max(...u),V=u.indexOf(w)<u.indexOf(z),G=z-w;a[f]=`${(V?-G:0)-(V?w:z)}px`,c[f==="bgy"?"height":"width"]+=G}const h=s.Dimensions.cover(r,c);for(const f of i){const u=f==="bgy"?"height":"width",w=h[u]-c[u];a[f]=`max(${W(t,f)},-${w}px) + ${a[f]}`}const l=R(i,a,o);return(f,u)=>{l(f,u),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function W(n,t){return p(n,`background-position-${t.substr(-1)}`,"")}function R(n,t,e){return function(o,r){for(const c of n){const i=$(e[c],r);o[`background-position-${c.substr(-1)}`]=`calc(${t[c]} + ${i}px)`}}}const S={};function Cn(n){const t=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[t])return S[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth)?(e.onload=()=>{S[t]=C(e),s.trigger(n,s.createEvent("load",!1))},C(e)):S[t]=C(e)}function C(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=s.toFloat){const e=[],{length:o}=n;let r=0;for(let c=0;c<o;c++){let[i,a]=s.isString(n[c])?n[c].trim().split(/ (?![^(]*\))/):[n[c]];if(i=t(i),a=a?s.toFloat(a)/100:null,c===0?a===null?a=0:a&&e.push([i,0]):c===o-1&&(a===null?a=1:a!==1&&(e.push([i,a]),a=1)),e.push([i,a]),a===null)r++;else if(r){const h=e[c-r-1][1],l=(a-h)/(r+1);for(let f=r;f>0;f--)e[c-f][1]=h+l*(r-f+1);r=0}}return e}function D(n,t){const e=s.findIndex(n.slice(1),([,o])=>t<=o)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function $(n,t){const[e,o,r]=D(n,t);return e+Math.abs(e-o)*r*(e<o?1:-1)}const zn=/^-?\d+(?:\.\d+)?(\S+)?/;function F(n,t){var e;for(const o of n){const r=(e=o.match)==null?void 0:e.call(o,zn);if(r)return r[1]}return t}function p(n,t,e){const o=n.style[t],r=s.css(s.css(n,t,e),t);return n.style[t]=o,r}function H(n,t){return n.reduce((e,o)=>(e[o]=t,e),{})}var B={mixins:[Mn],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target:({target:n},t)=>L(n&&s.query(n,t)||t),start({start:n}){return s.toPx(n,"height",this.target,!0)},end({end:n,viewport:t}){return s.toPx(n||(t=(1-t)*100)&&`${t}vh+${t}%`,"height",this.target,!0)}},observe:[Q(),X({target:({target:n})=>n}),K({target:({$el:n,target:t})=>[n,t,s.scrollParent(t,!0)]})],update:{read({percent:n},t){if(t.has("scroll")||(n=!1),!s.isVisible(this.$el))return!1;if(!this.matchMedia)return;const e=n;return n=En(s.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:e===n?!1:this.getCss(n)}},write({style:n}){if(!this.matchMedia){this.reset();return}n&&s.css(this.$el,n)},events:["scroll","resize"]}};function En(n,t){return t>=0?Math.pow(n,t+1):1-Math.pow(1-n,1-t)}function L(n){return n?"offsetTop"in n?n:L(s.parent(n)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",B),B});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -82,29 +82,6 @@
|
|
|
82
82
|
return (key, ...args) => cache[key] || (cache[key] = fn(key, ...args));
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
function parent(element) {
|
|
86
|
-
var _a;
|
|
87
|
-
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
88
|
-
}
|
|
89
|
-
function filter(element, selector) {
|
|
90
|
-
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
91
|
-
}
|
|
92
|
-
function matches(element, selector) {
|
|
93
|
-
return toNodes(element).some((element2) => element2.matches(selector));
|
|
94
|
-
}
|
|
95
|
-
function closest(element, selector) {
|
|
96
|
-
var _a;
|
|
97
|
-
return (_a = toNode(element)) == null ? void 0 : _a.closest(startsWith(selector, ">") ? selector.slice(1) : selector);
|
|
98
|
-
}
|
|
99
|
-
function children(element, selector) {
|
|
100
|
-
element = toNode(element);
|
|
101
|
-
const children2 = element ? toArray(element.children) : [];
|
|
102
|
-
return selector ? filter(children2, selector) : children2;
|
|
103
|
-
}
|
|
104
|
-
function index(element, ref) {
|
|
105
|
-
return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
85
|
function attr(element, name, value) {
|
|
109
86
|
var _a;
|
|
110
87
|
if (isObject(name)) {
|
|
@@ -132,6 +109,25 @@
|
|
|
132
109
|
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
133
110
|
}
|
|
134
111
|
|
|
112
|
+
function parent(element) {
|
|
113
|
+
var _a;
|
|
114
|
+
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
115
|
+
}
|
|
116
|
+
function filter(element, selector) {
|
|
117
|
+
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
118
|
+
}
|
|
119
|
+
function matches(element, selector) {
|
|
120
|
+
return toNodes(element).some((element2) => element2.matches(selector));
|
|
121
|
+
}
|
|
122
|
+
function children(element, selector) {
|
|
123
|
+
element = toNode(element);
|
|
124
|
+
const children2 = element ? toArray(element.children) : [];
|
|
125
|
+
return selector ? filter(children2, selector) : children2;
|
|
126
|
+
}
|
|
127
|
+
function index(element, ref) {
|
|
128
|
+
return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
|
|
129
|
+
}
|
|
130
|
+
|
|
135
131
|
function findAll(selector, context) {
|
|
136
132
|
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
137
133
|
}
|
|
@@ -151,7 +147,7 @@
|
|
|
151
147
|
let ctx = context;
|
|
152
148
|
if (sel[0] === "!") {
|
|
153
149
|
const selectors = sel.substr(1).trim().split(" ");
|
|
154
|
-
ctx =
|
|
150
|
+
ctx = parent(context).closest(selectors[0]);
|
|
155
151
|
sel = selectors.slice(1).join(" ").trim();
|
|
156
152
|
if (!sel.length && split.length === 1) {
|
|
157
153
|
return ctx;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(c,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],b):(c=typeof globalThis<"u"?globalThis:c||self,c.UIkitSlider_parallax=b(c.UIkit.util))})(this,function(c){"use strict";var b={props:{media:Boolean},data:{media:!1},connected(){const n=J(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const e=()=>{this.matchMedia=this.mediaObj.matches,c.trigger(this.$el,c.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=c.on(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function J(n,e){if(c.isString(n)){if(c.startsWith(n,"@"))n=c.toFloat(c.css(e,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&c.isNumeric(n)?`(min-width: ${n}px)`:""}function K(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}const{isArray:jn,from:Q}=Array;function X(n){return typeof n=="function"}function M(n){return n!==null&&typeof n=="object"}function Y(n){return M(n)&&n===n.window}function T(n){return Z(n)>=1}function Z(n){return!Y(n)&&M(n)&&n.nodeType}function C(n){return typeof n=="string"}function k(n){return n===void 0}function $(n){return d(n)[0]}function d(n){return T(n)?[n]:Array.from(n||[]).filter(T)}function O(n){const e=Object.create(null);return(t,...o)=>e[t]||(e[t]=n(t,...o))}function j(n,e,t){var o;if(M(e)){for(const r in e)j(n,r,e[r]);return}if(k(t))return(o=$(n))==null?void 0:o.getAttribute(e);for(const r of d(n))X(t)&&(t=t.call(r,j(r,e))),t===null?U(r,e):r.setAttribute(e,t)}function U(n,e){d(n).forEach(t=>t.removeAttribute(e))}function A(n){var e;return(e=$(n))==null?void 0:e.parentElement}function nn(n,e){return d(n).filter(t=>W(t,e))}function W(n,e){return d(n).some(t=>t.matches(e))}function tn(n,e){n=$(n);const t=n?Q(n.children):[];return e?nn(t,e):t}function en(n,e){return e?d(n).indexOf($(e)):tn(A(n)).indexOf(n)}function rn(n,e){return d(fn(n,$(e),"querySelectorAll"))}const on=/(^|[^\\],)\s*[!>+~-]/,cn=O(n=>n.match(on)),sn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,an=O(n=>n.replace(sn,"$1 *"));function fn(n,e=document,t){if(!n||!C(n))return n;if(n=an(n),cn(n)){const o=dn(n);n="";for(let r of o){let i=e;if(r[0]==="!"){const s=r.substr(1).trim().split(" ");if(i=A(e).closest(s[0]),r=s.slice(1).join(" ").trim(),!r.length&&o.length===1)return i}if(r[0]==="-"){const s=r.substr(1).trim().split(" "),a=(i||e).previousElementSibling;i=W(a,r.substr(1))?a:null,r=s.slice(1).join(" ")}i&&(n+=`${n?",":""}${hn(i)} ${r}`)}e=document}try{return e[t](n)}catch{return null}}const un=/.*?[^\\](?:,|$)/g,dn=O(n=>n.match(un).map(e=>e.replace(/,$/,"").trim()));function hn(n){const e=[];for(;n.parentNode;){const t=j(n,"id");if(t){e.unshift(`#${ln(t)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${en(n)+1})`),e.unshift(o),n=n.parentNode}}return e.join(" > ")}function ln(n){return C(n)?CSS.escape(n):""}const mn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function gn(n){const e=mn.exec(n);if(e)return document.createElement(e[1]);const t=document.createElement("template");return t.innerHTML=n.trim(),bn(t.content.childNodes)}function bn(n){return n.length>1?n:n[0]}function $n(n,e){return xn(n)?d(gn(n)):rn(n,e)}function xn(n){return C(n)&&K(n.trim(),"<")}function yn(n){return Math.ceil(Math.max(0,...$n("[stroke]",n).map(e=>{try{return e.getTotalLength()}catch{return 0}})))}const w={x:v,y:v,rotate:v,scale:v,color:I,backgroundColor:I,borderColor:I,blur:m,hue:m,fopacity:m,grayscale:m,invert:m,saturate:m,sepia:m,opacity:vn,stroke:Fn,bgx:E,bgy:E},{keys:_}=Object;var pn={mixins:[b],props:D(_(w),"list"),data:D(_(w),void 0),computed:{props(n,e){const t={};for(const r in n)r in w&&!c.isUndefined(n[r])&&(t[r]=n[r].slice());const o={};for(const r in t)o[r]=w[r](r,e,t[r],t);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))c.css(this.$el,n,"")},getCss(n){const e={};for(const t in this.props)this.props[t](e,c.clamp(n));return e.willChange=Object.keys(e).map(c.propName).join(","),e}}};function v(n,e,t){let o=S(t)||{x:"px",y:"px",rotate:"deg"}[n]||"",r;return n==="x"||n==="y"?(n=`translate${c.ucfirst(n)}`,r=i=>c.toFloat(c.toFloat(i).toFixed(o==="px"?0:6))):n==="scale"&&(o="",r=i=>{var s;return S([i])?c.toPx(i,"width",e,!0)/e[`offset${(s=i.endsWith)!=null&&s.call(i,"vh")?"Height":"Width"}`]:c.toFloat(i)}),t.length===1&&t.unshift(n==="scale"?1:0),t=g(t,r),(i,s)=>{i.transform=`${i.transform||""} ${n}(${x(t,s)}${o})`}}function I(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=g(t,o=>wn(e,o)),(o,r)=>{const[i,s,a]=R(t,r),h=i.map((l,f)=>(l+=a*(s[f]-l),f===3?c.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function wn(n,e){return y(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(c.toFloat)}function m(n,e,t){t.length===1&&t.unshift(0);const o=S(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=g(t),(r,i)=>{const s=x(t,i);r.filter=`${r.filter||""} ${n}(${s+o})`}}function vn(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=g(t),(o,r)=>{o[n]=x(t,r)}}function Fn(n,e,t){t.length===1&&t.unshift(0);const o=S(t),r=yn(e);return t=g(t.reverse(),i=>(i=c.toFloat(i),o==="%"?i*r/100:i)),t.some(([i])=>i)?(c.css(e,"strokeDasharray",r),(i,s)=>{i.strokeDashoffset=x(t,s)}):c.noop}function E(n,e,t,o){t.length===1&&t.unshift(0);const r=n==="bgy"?"height":"width";o[n]=g(t,a=>c.toPx(a,r,e));const i=["bgx","bgy"].filter(a=>a in o);if(i.length===2&&n==="bgx")return c.noop;if(y(e,"backgroundSize","")==="cover")return Sn(n,e,t,o);const s={};for(const a of i)s[a]=z(e,a);return H(i,s,o)}function Sn(n,e,t,o){const r=Mn(e);if(!r.width)return c.noop;const i={width:e.offsetWidth,height:e.offsetHeight},s=["bgx","bgy"].filter(f=>f in o),a={};for(const f of s){const u=o[f].map(([On])=>On),p=Math.min(...u),N=Math.max(...u),V=u.indexOf(p)<u.indexOf(N),G=N-p;a[f]=`${(V?-G:0)-(V?p:N)}px`,i[f==="bgy"?"height":"width"]+=G}const h=c.Dimensions.cover(r,i);for(const f of s){const u=f==="bgy"?"height":"width",p=h[u]-i[u];a[f]=`max(${z(e,f)},-${p}px) + ${a[f]}`}const l=H(s,a,o);return(f,u)=>{l(f,u),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function z(n,e){return y(n,`background-position-${e.substr(-1)}`,"")}function H(n,e,t){return function(o,r){for(const i of n){const s=x(t[i],r);o[`background-position-${i.substr(-1)}`]=`calc(${e[i]} + ${s}px)`}}}const F={};function Mn(n){const e=c.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[e])return F[e];const t=new Image;return e&&(t.src=e,!t.naturalWidth)?(t.onload=()=>{F[e]=P(t),c.trigger(n,c.createEvent("load",!1))},P(t)):F[e]=P(t)}function P(n){return{width:n.naturalWidth,height:n.naturalHeight}}function g(n,e=c.toFloat){const t=[],{length:o}=n;let r=0;for(let i=0;i<o;i++){let[s,a]=c.isString(n[i])?n[i].trim().split(/ (?![^(]*\))/):[n[i]];if(s=e(s),a=a?c.toFloat(a)/100:null,i===0?a===null?a=0:a&&t.push([s,0]):i===o-1&&(a===null?a=1:a!==1&&(t.push([s,a]),a=1)),t.push([s,a]),a===null)r++;else if(r){const h=t[i-r-1][1],l=(a-h)/(r+1);for(let f=r;f>0;f--)t[i-f][1]=h+l*(r-f+1);r=0}}return t}function R(n,e){const t=c.findIndex(n.slice(1),([,o])=>e<=o)+1;return[n[t-1][0],n[t][0],(e-n[t-1][1])/(n[t][1]-n[t-1][1])]}function x(n,e){const[t,o,r]=R(n,e);return t+Math.abs(t-o)*r*(t<o?1:-1)}const Cn=/^-?\d+(?:\.\d+)?(\S+)?/;function S(n,e){var t;for(const o of n){const r=(t=o.match)==null?void 0:t.call(o,Cn);if(r)return r[1]}return e}function y(n,e,t){const o=n.style[e],r=c.css(c.css(n,e,t),e);return n.style[e]=o,r}function D(n,e){return n.reduce((t,o)=>(t[o]=e,t),{})}var q={mixins:[pn],data:{selItem:"!li"},beforeConnect(){this.item=c.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,duration:t,timing:o,dir:r}}){c.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(L(n,r,e)),s=this.getCss(B(n)?.5:r>0?1:0);c.fastdom.write(()=>{c.css(this.$el,i),c.Transition.start(this.$el,s,t,o).catch(c.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){c.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,dir:t}}){c.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(L(n,t,e));c.fastdom.write(()=>c.css(this.$el,o))})}}]};function B(n){return c.endsWith(n,"in")}function L(n,e,t){return t/=2,B(n)^e<0?t:1-t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",q),q});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
return `${this.selList} > *`;
|
|
188
188
|
},
|
|
189
189
|
handler(e) {
|
|
190
|
-
if (!this.draggable || !util.isTouch(e) && hasSelectableText(e.target) ||
|
|
190
|
+
if (!this.draggable || !util.isTouch(e) && hasSelectableText(e.target) || e.target.closest(util.selInput) || e.button > 0 || this.length < 2) {
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
this.start(e);
|
|
@@ -316,16 +316,16 @@
|
|
|
316
316
|
return { attributes, filter };
|
|
317
317
|
});
|
|
318
318
|
|
|
319
|
-
const ids =
|
|
319
|
+
const ids = /* @__PURE__ */ Object.create(null);
|
|
320
320
|
function generateId(instance, el = instance.$el, postfix = "") {
|
|
321
321
|
if (el.id) {
|
|
322
322
|
return el.id;
|
|
323
323
|
}
|
|
324
324
|
let id = `${instance.$options.id}-${instance._uid}${postfix}`;
|
|
325
|
-
if (
|
|
325
|
+
if (ids[id]) {
|
|
326
326
|
id = generateId(instance, el, `${postfix}-2`);
|
|
327
327
|
}
|
|
328
|
-
ids
|
|
328
|
+
ids[id] = true;
|
|
329
329
|
return id;
|
|
330
330
|
}
|
|
331
331
|
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
return this.selNavItem;
|
|
450
450
|
},
|
|
451
451
|
handler(e) {
|
|
452
|
-
if (
|
|
452
|
+
if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
|
|
453
453
|
e.preventDefault();
|
|
454
454
|
this.show(util.data(e.current, this.attrItem));
|
|
455
455
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.73842811 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=p(e.UIkit.util))})(this,function(e){"use strict";function p(t,s="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,e.fastdom.read(()=>{t._connected&&z(t,t._queued),delete t._queued})),t._queued.add(s.type||s))}function z(t,s){for(const{read:n,write:i,events:h=[]}of t._updates){if(!s.has("update")&&!h.some(o=>s.has(o)))continue;let r;n&&(r=n.call(t,t._data,s),r&&e.isPlainObject(r)&&e.assign(t._data,r)),i&&r!==!1&&e.fastdom.write(()=>{t._connected&&i.call(t,t._data,s)})}}function A(t){return k(e.observeResize,t,"resize")}function L(t){return k(e.observeIntersection,t)}function U(t={}){return L({handler:function(s,n){const{targets:i=this.$el,preload:h=5}=t;for(const r of e.toNodes(e.isFunction(i)?i(this):i))e.$$('[loading="lazy"]',r).slice(0,h-1).forEach(o=>e.removeAttr(o,"loading"));for(const r of s.filter(({isIntersecting:o})=>o).map(({target:o})=>o))n.unobserve(r)},...t})}function k(t,s,n){return{observe:t,handler(){p(this,n)},...s}}var B={connected(){e.addClass(this.$el,this.$options.id)}},j={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var n,i,h;let r=0;return((h=((n=this.i18n)==null?void 0:n[t])||((i=this.$options.i18n)==null?void 0:i[t]))==null?void 0:h.replace(/%s/g,()=>s[r++]||""))||""}}},V={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const b={passive:!1,capture:!0},C={passive:!0,capture:!0},q="touchstart mousedown",_="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var F={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,s(n)}}},events:[{name:q,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&H(t.target)||e.closest(t.target,e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:_,el(){return this.list},handler:e.noop,...b}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,_,this.move,b),e.on(document,N,this.end,C),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:n,prevIndex:i}=this,h=Math.abs(s),r=this.getIndex(i+this.dir),o=this._getDistance(i,r);for(;r!==i&&h>o;)this.drag-=o*this.dir,i=r,h-=o,r=this.getIndex(i+this.dir),o=this._getDistance(i,r);this.percent=h/o;const a=n[i],l=n[r],d=this.index!==r,c=i===r;let f;for(const g of[this.index,this.prevIndex])e.includes([r,i],g)||(e.trigger(n[g],"itemhidden",[this]),c&&(f=!0,this.prevIndex=i));(this.index===i&&this.prevIndex!==i||f)&&e.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=i,this.index=r,!c&&e.trigger(a,"beforeitemhide",[this]),e.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!c&&l),d&&(!c&&e.trigger(a,"itemhide",[this]),e.trigger(l,"itemshow",[this]))},end(){if(e.off(document,_,this.move,b),e.off(document,N,this.end,C),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(e.isRtl?this.dir*(e.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)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function H(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}e.memoize((t,s)=>{const n=Object.keys(s),i=n.concat(t).map(h=>[e.hyphenate(h),`data-${e.hyphenate(h)}`]).flat();return{attributes:n,filter:i}});const M=[];function $(t,s=t.$el,n=""){if(s.id)return s.id;let i=`${t.$options.id}-${t._uid}${n}`;return e.includes(M,i)&&(i=$(t,s,`${n}-2`)),M.push(i),i}const v={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var G={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},s)=>e.$(t,s),navChildren(){return e.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;let h,r=null;if(e.isNumeric(n)){const o=e.toNumber(n),a=this.slides[o];a&&(a.id||(a.id=$(this,a,`-item-${n}`)),r=a.id),h=this.t("slideX",e.toFloat(n)+1),e.attr(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=$(this,this.list,"-items")),r=this.list.id),h=this.t(n);e.attr(i,{"aria-controls":r,"aria-label":e.attr(i,"aria-label")||h})}},slides(t){t.forEach((s,n)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",n+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let n=0;n<t;n++)e.append(this.nav,`<li ${this.attrItem}="${n}"><a href></a></li>`)}}},connected(){e.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){e.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===v.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:n}=t,i=e.data(s,this.attrItem);if(!e.isNumeric(i))return;let h=n===v.HOME?0:n===v.END?"last":n===v.LEFT?"previous":n===v.RIGHT?"next":-1;~h&&(t.preventDefault(),this.show(h))}}],methods:{updateNav(){const t=this.getValidIndex();for(const s of this.navItems){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;if(e.isNumeric(n)){const r=e.toNumber(n)===t;e.toggleClass(s,this.clsActive,r),e.attr(i,{"aria-selected":r,tabindex:r?null:-1}),r&&i&&e.matches(e.parent(s),":focus-within")&&i.focus()}else e.toggleClass(s,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},X={mixins:[V,F,G,j],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},s)=>S(s.offsetWidth/t),list:({selList:t},s)=>e.$(t,s),maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:A(),methods:{show(t,s=!1){var n;if(this.dragging||!this.length)return;const{stack:i}=this,h=s?0:i.length,r=()=>{i.splice(h,1),i.length&&this.show(i.shift(),!0)};if(i[s?"unshift":"push"](t),!s&&i.length>1){i.length===2&&((n=this._transitioner)==null||n.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),a=e.hasClass(this.slides,this.clsActive)&&this.slides[o],l=this.getIndex(t,this.index),d=this.slides[l];if(a===d){r();return}if(this.dir=J(t,o),this.prevIndex=o,this.index=l,a&&!e.trigger(a,"beforeitemhide",[this])||!e.trigger(d,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const c=this._show(a,d,s).then(()=>{a&&e.trigger(a,"itemhidden",[this]),e.trigger(d,"itemshown",[this]),i.shift(),this._transitioner=null,requestAnimationFrame(()=>i.length&&this.show(i.shift(),!0))});return a&&e.trigger(a,"itemhide",[this]),e.trigger(d,"itemshow",[this]),c},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,n){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:n?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!t)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,n=this.index){const i=this._getTransitioner(s===n?!1:s,n);return i.translate(t),i},_getTransitioner(t=this.prevIndex,s=this.index,n=this.dir||1,i=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,n*(e.isRtl?-1:1),i)}}};function J(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function S(t){return .5*t+300}var K={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},Q={observe:U({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})};function T(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function Y(t,s,n,{center:i,easing:h,list:r}){const o=t?x(t,r,i):x(s,r,i)+e.dimensions(s).width*n,a=s?x(s,r,i):o+e.dimensions(t).width*n*(e.isRtl?-1:1);let l;return{dir:n,show(d,c=0,f){const g=f?"linear":h;return d-=Math.round(d*e.clamp(c,-1,1)),this.translate(c),c=t?c:e.clamp(c,0,1),y(this.getItemIn(),"itemin",{percent:c,duration:d,timing:g,dir:n}),t&&y(this.getItemIn(!0),"itemout",{percent:1-c,duration:d,timing:g,dir:n}),new Promise(m=>{l||(l=m),e.Transition.start(r,{transform:T(-a*(e.isRtl?-1:1),"px")},d,g).then(l,e.noop)})},cancel(){return e.Transition.cancel(r)},reset(){e.css(r,"transform","")},async forward(d,c=this.percent()){return await this.cancel(),this.show(d,c,!0)},translate(d){const c=this.getDistance()*n*(e.isRtl?-1:1);e.css(r,"transform",T(e.clamp(-a+(c-c*d),-I(r),e.dimensions(r).width)*(e.isRtl?-1:1),"px"));const f=this.getActives(),g=this.getItemIn(),m=this.getItemIn(!0);d=t?e.clamp(d,-1,1):0;for(const u of e.children(r)){const R=e.includes(f,u),W=u===g,P=u===m,st=W||!P&&(R||n*(e.isRtl?-1:1)===-1^w(u,r)>w(t||s));y(u,`itemtranslate${st?"in":"out"}`,{dir:n,percent:P?1-d:W?d:R?1:0})}},percent(){return Math.abs((e.css(r,"transform").split(",")[4]*(e.isRtl?-1:1)+o)/(a-o))},getDistance(){return Math.abs(a-o)},getItemIn(d=!1){let c=this.getActives(),f=D(r,x(s||t,r,i));if(d){const g=c;c=f,f=g}return f[e.findIndex(f,g=>!e.includes(c,g))]},getActives(){return D(r,x(t||s,r,i))}}}function x(t,s,n){const i=w(t,s);return n?i-Z(t,s):Math.min(i,E(s))}function E(t){return Math.max(0,I(t)-e.dimensions(t).width)}function I(t){return e.sumBy(e.children(t),s=>e.dimensions(s).width)}function Z(t,s){return e.dimensions(s).width/2-e.dimensions(t).width/2}function w(t,s){return t&&(e.position(t).left+(e.isRtl?e.dimensions(t).width-e.dimensions(s).width:0))*(e.isRtl?-1:1)||0}function D(t,s){s-=1;const n=e.dimensions(t).width,i=s+n+2;return e.children(t).filter(h=>{const r=w(h,t),o=r+Math.min(e.dimensions(h).width,n);return r>=s&&o<=i})}function y(t,s,n){e.trigger(t,e.createEvent(s,!1,!1,n))}var O={mixins:[B,X,K,Q],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:Y},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:t}){return t||tt(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let t=0;const s=E(this.list),n=e.findIndex(this.slides,i=>{if(t>=s)return!0;t+=e.dimensions(i).width});return~n?n:this.length-1},sets({sets:t}){if(!t)return;let s=0;const n=[],i=e.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=e.dimensions(this.slides[h]).width;s+r>i&&(s=0),this.center?s<i/2&&s+r+e.dimensions(e.getIndex(+h+1,this.slides)).width/2>i/2&&(n.push(+h),s=i/2-r/2):s===0&&n.push(Math.min(+h,this.maxIndex)),s+=r}if(n.length)return n},transitionOptions(){return{center:this.center,list:this.list}},slides(){return e.children(this.list).filter(e.isVisible)}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$(`.${this.clsContainer}`,this.$el))},observe:A({target:({slides:t})=>t}),update:{write(){for(const t of this.navItems){const s=e.toNumber(e.data(t,this.attrItem));s!==!1&&(t.hidden=!this.maxIndex||s>this.maxIndex||this.sets&&!e.includes(this.sets,s))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const 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(let i=0;i<s;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");t.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=S(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((h,r)=>e.css(h,"order",this.dir>0&&r<t?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const s=this.slides[t];let n=e.dimensions(this.list).width/2-e.dimensions(s).width/2,i=0;for(;n>0;){const h=this.getIndex(--i+t,t),r=this.slides[h];e.css(r,"order",h>t?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const t=this._getTransitioner(this.index).getActives(),s=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides){const i=e.includes(t,n);e.toggleClass(n,s,i),e.attr(n,"aria-hidden",!i);for(const h of e.$$(e.selFocusable,n))e.hasOwn(h,"_tabindex")||(h._tabindex=e.attr(h,"tabindex")),e.attr(h,"tabindex",i?h._tabindex:-1)}},getValidIndex(t=this.index,s=this.prevIndex){if(t=this.getIndex(t,s),!this.sets)return t;let n;do{if(e.includes(this.sets,t))return t;n=t,t=this.getIndex(t+this.dir,s)}while(t!==n);return t},getAdjacentSlides(){const{width:t}=e.dimensions(this.list),s=-t,n=t*2,i=e.dimensions(this.slides[this.index]).width,h=this.center?t/2-i/2:0,r=new Set;for(const o of[-1,1]){let a=h+(o>0?i:0),l=0;do{const d=this.slides[this.getIndex(this.index+o+l++*o)];a+=e.dimensions(d).width*o,r.add(d)}while(this.length>l&&a>s&&a<n)}return Array.from(r)}}};function tt(t,s){if(!t||t.length<2)return!0;const{width:n}=e.dimensions(t);if(!s)return Math.ceil(I(t))<Math.trunc(n+et(t));const i=e.children(t),h=Math.trunc(n/2);for(const r in i){const o=i[r],a=e.dimensions(o).width,l=new Set([o]);let d=0;for(const c of[-1,1]){let f=a/2,g=0;for(;f<h;){const m=i[e.getIndex(+r+c+g++*c,i)];if(l.has(m))return!0;f+=e.dimensions(m).width,l.add(m)}d=Math.max(d,a/2+e.dimensions(i[e.getIndex(+r+c,i)]).width/2-(f-h))}if(d>e.sumBy(i.filter(c=>!l.has(c)),c=>e.dimensions(c).width))return!0}return!1}function et(t){return Math.max(0,...e.children(t).map(s=>e.dimensions(s).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",O),O});
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=p(e.UIkit.util))})(this,function(e){"use strict";function p(t,s="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,e.fastdom.read(()=>{t._connected&&z(t,t._queued),delete t._queued})),t._queued.add(s.type||s))}function z(t,s){for(const{read:n,write:i,events:h=[]}of t._updates){if(!s.has("update")&&!h.some(o=>s.has(o)))continue;let r;n&&(r=n.call(t,t._data,s),r&&e.isPlainObject(r)&&e.assign(t._data,r)),i&&r!==!1&&e.fastdom.write(()=>{t._connected&&i.call(t,t._data,s)})}}function A(t){return k(e.observeResize,t,"resize")}function L(t){return k(e.observeIntersection,t)}function U(t={}){return L({handler:function(s,n){const{targets:i=this.$el,preload:h=5}=t;for(const r of e.toNodes(e.isFunction(i)?i(this):i))e.$$('[loading="lazy"]',r).slice(0,h-1).forEach(o=>e.removeAttr(o,"loading"));for(const r of s.filter(({isIntersecting:o})=>o).map(({target:o})=>o))n.unobserve(r)},...t})}function k(t,s,n){return{observe:t,handler(){p(this,n)},...s}}var j={connected(){e.addClass(this.$el,this.$options.id)}},B={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var n,i,h;let r=0;return((h=((n=this.i18n)==null?void 0:n[t])||((i=this.$options.i18n)==null?void 0:i[t]))==null?void 0:h.replace(/%s/g,()=>s[r++]||""))||""}}},V={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const b={passive:!1,capture:!0},C={passive:!0,capture:!0},q="touchstart mousedown",_="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var F={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,s(n)}}},events:[{name:q,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&H(t.target)||t.target.closest(e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:_,el(){return this.list},handler:e.noop,...b}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,_,this.move,b),e.on(document,N,this.end,C),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:n,prevIndex:i}=this,h=Math.abs(s),r=this.getIndex(i+this.dir),o=this._getDistance(i,r);for(;r!==i&&h>o;)this.drag-=o*this.dir,i=r,h-=o,r=this.getIndex(i+this.dir),o=this._getDistance(i,r);this.percent=h/o;const a=n[i],l=n[r],d=this.index!==r,c=i===r;let f;for(const g of[this.index,this.prevIndex])e.includes([r,i],g)||(e.trigger(n[g],"itemhidden",[this]),c&&(f=!0,this.prevIndex=i));(this.index===i&&this.prevIndex!==i||f)&&e.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=i,this.index=r,!c&&e.trigger(a,"beforeitemhide",[this]),e.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!c&&l),d&&(!c&&e.trigger(a,"itemhide",[this]),e.trigger(l,"itemshow",[this]))},end(){if(e.off(document,_,this.move,b),e.off(document,N,this.end,C),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(e.isRtl?this.dir*(e.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)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function H(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}e.memoize((t,s)=>{const n=Object.keys(s),i=n.concat(t).map(h=>[e.hyphenate(h),`data-${e.hyphenate(h)}`]).flat();return{attributes:n,filter:i}});const M=Object.create(null);function $(t,s=t.$el,n=""){if(s.id)return s.id;let i=`${t.$options.id}-${t._uid}${n}`;return M[i]&&(i=$(t,s,`${n}-2`)),M[i]=!0,i}const v={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var G={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},s)=>e.$(t,s),navChildren(){return e.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;let h,r=null;if(e.isNumeric(n)){const o=e.toNumber(n),a=this.slides[o];a&&(a.id||(a.id=$(this,a,`-item-${n}`)),r=a.id),h=this.t("slideX",e.toFloat(n)+1),e.attr(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=$(this,this.list,"-items")),r=this.list.id),h=this.t(n);e.attr(i,{"aria-controls":r,"aria-label":e.attr(i,"aria-label")||h})}},slides(t){t.forEach((s,n)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",n+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let n=0;n<t;n++)e.append(this.nav,`<li ${this.attrItem}="${n}"><a href></a></li>`)}}},connected(){e.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){t.target.closest("a,button")&&(t.type==="click"||t.keyCode===v.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:n}=t,i=e.data(s,this.attrItem);if(!e.isNumeric(i))return;let h=n===v.HOME?0:n===v.END?"last":n===v.LEFT?"previous":n===v.RIGHT?"next":-1;~h&&(t.preventDefault(),this.show(h))}}],methods:{updateNav(){const t=this.getValidIndex();for(const s of this.navItems){const n=e.data(s,this.attrItem),i=e.$("a,button",s)||s;if(e.isNumeric(n)){const r=e.toNumber(n)===t;e.toggleClass(s,this.clsActive,r),e.attr(i,{"aria-selected":r,tabindex:r?null:-1}),r&&i&&e.matches(e.parent(s),":focus-within")&&i.focus()}else e.toggleClass(s,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},X={mixins:[V,F,G,B],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},s)=>S(s.offsetWidth/t),list:({selList:t},s)=>e.$(t,s),maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:A(),methods:{show(t,s=!1){var n;if(this.dragging||!this.length)return;const{stack:i}=this,h=s?0:i.length,r=()=>{i.splice(h,1),i.length&&this.show(i.shift(),!0)};if(i[s?"unshift":"push"](t),!s&&i.length>1){i.length===2&&((n=this._transitioner)==null||n.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),a=e.hasClass(this.slides,this.clsActive)&&this.slides[o],l=this.getIndex(t,this.index),d=this.slides[l];if(a===d){r();return}if(this.dir=J(t,o),this.prevIndex=o,this.index=l,a&&!e.trigger(a,"beforeitemhide",[this])||!e.trigger(d,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const c=this._show(a,d,s).then(()=>{a&&e.trigger(a,"itemhidden",[this]),e.trigger(d,"itemshown",[this]),i.shift(),this._transitioner=null,requestAnimationFrame(()=>i.length&&this.show(i.shift(),!0))});return a&&e.trigger(a,"itemhide",[this]),e.trigger(d,"itemshow",[this]),c},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,n){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:n?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!t)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,n=this.index){const i=this._getTransitioner(s===n?!1:s,n);return i.translate(t),i},_getTransitioner(t=this.prevIndex,s=this.index,n=this.dir||1,i=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,n*(e.isRtl?-1:1),i)}}};function J(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function S(t){return .5*t+300}var K={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},Q={observe:U({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})};function T(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function Y(t,s,n,{center:i,easing:h,list:r}){const o=t?x(t,r,i):x(s,r,i)+e.dimensions(s).width*n,a=s?x(s,r,i):o+e.dimensions(t).width*n*(e.isRtl?-1:1);let l;return{dir:n,show(d,c=0,f){const g=f?"linear":h;return d-=Math.round(d*e.clamp(c,-1,1)),this.translate(c),c=t?c:e.clamp(c,0,1),y(this.getItemIn(),"itemin",{percent:c,duration:d,timing:g,dir:n}),t&&y(this.getItemIn(!0),"itemout",{percent:1-c,duration:d,timing:g,dir:n}),new Promise(m=>{l||(l=m),e.Transition.start(r,{transform:T(-a*(e.isRtl?-1:1),"px")},d,g).then(l,e.noop)})},cancel(){return e.Transition.cancel(r)},reset(){e.css(r,"transform","")},async forward(d,c=this.percent()){return await this.cancel(),this.show(d,c,!0)},translate(d){const c=this.getDistance()*n*(e.isRtl?-1:1);e.css(r,"transform",T(e.clamp(-a+(c-c*d),-I(r),e.dimensions(r).width)*(e.isRtl?-1:1),"px"));const f=this.getActives(),g=this.getItemIn(),m=this.getItemIn(!0);d=t?e.clamp(d,-1,1):0;for(const u of e.children(r)){const R=e.includes(f,u),W=u===g,P=u===m,st=W||!P&&(R||n*(e.isRtl?-1:1)===-1^w(u,r)>w(t||s));y(u,`itemtranslate${st?"in":"out"}`,{dir:n,percent:P?1-d:W?d:R?1:0})}},percent(){return Math.abs((e.css(r,"transform").split(",")[4]*(e.isRtl?-1:1)+o)/(a-o))},getDistance(){return Math.abs(a-o)},getItemIn(d=!1){let c=this.getActives(),f=O(r,x(s||t,r,i));if(d){const g=c;c=f,f=g}return f[e.findIndex(f,g=>!e.includes(c,g))]},getActives(){return O(r,x(t||s,r,i))}}}function x(t,s,n){const i=w(t,s);return n?i-Z(t,s):Math.min(i,E(s))}function E(t){return Math.max(0,I(t)-e.dimensions(t).width)}function I(t){return e.sumBy(e.children(t),s=>e.dimensions(s).width)}function Z(t,s){return e.dimensions(s).width/2-e.dimensions(t).width/2}function w(t,s){return t&&(e.position(t).left+(e.isRtl?e.dimensions(t).width-e.dimensions(s).width:0))*(e.isRtl?-1:1)||0}function O(t,s){s-=1;const n=e.dimensions(t).width,i=s+n+2;return e.children(t).filter(h=>{const r=w(h,t),o=r+Math.min(e.dimensions(h).width,n);return r>=s&&o<=i})}function y(t,s,n){e.trigger(t,e.createEvent(s,!1,!1,n))}var D={mixins:[j,X,K,Q],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:Y},computed:{avgWidth(){return I(this.list)/this.length},finite({finite:t}){return t||tt(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let t=0;const s=E(this.list),n=e.findIndex(this.slides,i=>{if(t>=s)return!0;t+=e.dimensions(i).width});return~n?n:this.length-1},sets({sets:t}){if(!t)return;let s=0;const n=[],i=e.dimensions(this.list).width;for(let h=0;h<this.length;h++){const r=e.dimensions(this.slides[h]).width;s+r>i&&(s=0),this.center?s<i/2&&s+r+e.dimensions(e.getIndex(+h+1,this.slides)).width/2>i/2&&(n.push(+h),s=i/2-r/2):s===0&&n.push(Math.min(+h,this.maxIndex)),s+=r}if(n.length)return n},transitionOptions(){return{center:this.center,list:this.list}},slides(){return e.children(this.list).filter(e.isVisible)}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$(`.${this.clsContainer}`,this.$el))},observe:A({target:({slides:t})=>t}),update:{write(){for(const t of this.navItems){const s=e.toNumber(e.data(t,this.attrItem));s!==!1&&(t.hidden=!this.maxIndex||s>this.maxIndex||this.sets&&!e.includes(this.sets,s))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const 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(let i=0;i<s;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");t.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=S(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((h,r)=>e.css(h,"order",this.dir>0&&r<t?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const s=this.slides[t];let n=e.dimensions(this.list).width/2-e.dimensions(s).width/2,i=0;for(;n>0;){const h=this.getIndex(--i+t,t),r=this.slides[h];e.css(r,"order",h>t?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const t=this._getTransitioner(this.index).getActives(),s=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides){const i=e.includes(t,n);e.toggleClass(n,s,i),e.attr(n,"aria-hidden",!i);for(const h of e.$$(e.selFocusable,n))e.hasOwn(h,"_tabindex")||(h._tabindex=e.attr(h,"tabindex")),e.attr(h,"tabindex",i?h._tabindex:-1)}},getValidIndex(t=this.index,s=this.prevIndex){if(t=this.getIndex(t,s),!this.sets)return t;let n;do{if(e.includes(this.sets,t))return t;n=t,t=this.getIndex(t+this.dir,s)}while(t!==n);return t},getAdjacentSlides(){const{width:t}=e.dimensions(this.list),s=-t,n=t*2,i=e.dimensions(this.slides[this.index]).width,h=this.center?t/2-i/2:0,r=new Set;for(const o of[-1,1]){let a=h+(o>0?i:0),l=0;do{const d=this.slides[this.getIndex(this.index+o+l++*o)];a+=e.dimensions(d).width*o,r.add(d)}while(this.length>l&&a>s&&a<n)}return Array.from(r)}}};function tt(t,s){if(!t||t.length<2)return!0;const{width:n}=e.dimensions(t);if(!s)return Math.ceil(I(t))<Math.trunc(n+et(t));const i=e.children(t),h=Math.trunc(n/2);for(const r in i){const o=i[r],a=e.dimensions(o).width,l=new Set([o]);let d=0;for(const c of[-1,1]){let f=a/2,g=0;for(;f<h;){const m=i[e.getIndex(+r+c+g++*c,i)];if(l.has(m))return!0;f+=e.dimensions(m).width,l.add(m)}d=Math.max(d,a/2+e.dimensions(i[e.getIndex(+r+c,i)]).width/2-(f-h))}if(d>e.sumBy(i.filter(c=>!l.has(c)),c=>e.dimensions(c).width))return!0}return!1}function et(t){return Math.max(0,...e.children(t).map(s=>e.dimensions(s).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",D),D});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -82,29 +82,6 @@
|
|
|
82
82
|
return (key, ...args) => cache[key] || (cache[key] = fn(key, ...args));
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
function parent(element) {
|
|
86
|
-
var _a;
|
|
87
|
-
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
88
|
-
}
|
|
89
|
-
function filter(element, selector) {
|
|
90
|
-
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
91
|
-
}
|
|
92
|
-
function matches(element, selector) {
|
|
93
|
-
return toNodes(element).some((element2) => element2.matches(selector));
|
|
94
|
-
}
|
|
95
|
-
function closest(element, selector) {
|
|
96
|
-
var _a;
|
|
97
|
-
return (_a = toNode(element)) == null ? void 0 : _a.closest(startsWith(selector, ">") ? selector.slice(1) : selector);
|
|
98
|
-
}
|
|
99
|
-
function children(element, selector) {
|
|
100
|
-
element = toNode(element);
|
|
101
|
-
const children2 = element ? toArray(element.children) : [];
|
|
102
|
-
return selector ? filter(children2, selector) : children2;
|
|
103
|
-
}
|
|
104
|
-
function index(element, ref) {
|
|
105
|
-
return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
85
|
function attr(element, name, value) {
|
|
109
86
|
var _a;
|
|
110
87
|
if (isObject(name)) {
|
|
@@ -132,6 +109,25 @@
|
|
|
132
109
|
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
133
110
|
}
|
|
134
111
|
|
|
112
|
+
function parent(element) {
|
|
113
|
+
var _a;
|
|
114
|
+
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
115
|
+
}
|
|
116
|
+
function filter(element, selector) {
|
|
117
|
+
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
118
|
+
}
|
|
119
|
+
function matches(element, selector) {
|
|
120
|
+
return toNodes(element).some((element2) => element2.matches(selector));
|
|
121
|
+
}
|
|
122
|
+
function children(element, selector) {
|
|
123
|
+
element = toNode(element);
|
|
124
|
+
const children2 = element ? toArray(element.children) : [];
|
|
125
|
+
return selector ? filter(children2, selector) : children2;
|
|
126
|
+
}
|
|
127
|
+
function index(element, ref) {
|
|
128
|
+
return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
|
|
129
|
+
}
|
|
130
|
+
|
|
135
131
|
function findAll(selector, context) {
|
|
136
132
|
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
137
133
|
}
|
|
@@ -151,7 +147,7 @@
|
|
|
151
147
|
let ctx = context;
|
|
152
148
|
if (sel[0] === "!") {
|
|
153
149
|
const selectors = sel.substr(1).trim().split(" ");
|
|
154
|
-
ctx =
|
|
150
|
+
ctx = parent(context).closest(selectors[0]);
|
|
155
151
|
sel = selectors.slice(1).join(" ").trim();
|
|
156
152
|
if (!sel.length && split.length === 1) {
|
|
157
153
|
return ctx;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],b):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow_parallax=b(s.UIkit.util))})(this,function(s){"use strict";var b={props:{media:Boolean},data:{media:!1},connected(){const n=J(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const e=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function J(n,e){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(e,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function K(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}const{isArray:jn,from:Q}=Array;function X(n){return typeof n=="function"}function M(n){return n!==null&&typeof n=="object"}function Y(n){return M(n)&&n===n.window}function T(n){return Z(n)>=1}function Z(n){return!Y(n)&&M(n)&&n.nodeType}function C(n){return typeof n=="string"}function k(n){return n===void 0}function $(n){return d(n)[0]}function d(n){return T(n)?[n]:Array.from(n||[]).filter(T)}function O(n){const e=Object.create(null);return(t,...o)=>e[t]||(e[t]=n(t,...o))}function j(n,e,t){var o;if(M(e)){for(const r in e)j(n,r,e[r]);return}if(k(t))return(o=$(n))==null?void 0:o.getAttribute(e);for(const r of d(n))X(t)&&(t=t.call(r,j(r,e))),t===null?U(r,e):r.setAttribute(e,t)}function U(n,e){d(n).forEach(t=>t.removeAttribute(e))}function A(n){var e;return(e=$(n))==null?void 0:e.parentElement}function nn(n,e){return d(n).filter(t=>W(t,e))}function W(n,e){return d(n).some(t=>t.matches(e))}function tn(n,e){n=$(n);const t=n?Q(n.children):[];return e?nn(t,e):t}function en(n,e){return e?d(n).indexOf($(e)):tn(A(n)).indexOf(n)}function rn(n,e){return d(fn(n,$(e),"querySelectorAll"))}const on=/(^|[^\\],)\s*[!>+~-]/,sn=O(n=>n.match(on)),cn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,an=O(n=>n.replace(cn,"$1 *"));function fn(n,e=document,t){if(!n||!C(n))return n;if(n=an(n),sn(n)){const o=dn(n);n="";for(let r of o){let i=e;if(r[0]==="!"){const c=r.substr(1).trim().split(" ");if(i=A(e).closest(c[0]),r=c.slice(1).join(" ").trim(),!r.length&&o.length===1)return i}if(r[0]==="-"){const c=r.substr(1).trim().split(" "),a=(i||e).previousElementSibling;i=W(a,r.substr(1))?a:null,r=c.slice(1).join(" ")}i&&(n+=`${n?",":""}${hn(i)} ${r}`)}e=document}try{return e[t](n)}catch{return null}}const un=/.*?[^\\](?:,|$)/g,dn=O(n=>n.match(un).map(e=>e.replace(/,$/,"").trim()));function hn(n){const e=[];for(;n.parentNode;){const t=j(n,"id");if(t){e.unshift(`#${ln(t)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${en(n)+1})`),e.unshift(o),n=n.parentNode}}return e.join(" > ")}function ln(n){return C(n)?CSS.escape(n):""}const mn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function gn(n){const e=mn.exec(n);if(e)return document.createElement(e[1]);const t=document.createElement("template");return t.innerHTML=n.trim(),bn(t.content.childNodes)}function bn(n){return n.length>1?n:n[0]}function $n(n,e){return xn(n)?d(gn(n)):rn(n,e)}function xn(n){return C(n)&&K(n.trim(),"<")}function yn(n){return Math.ceil(Math.max(0,...$n("[stroke]",n).map(e=>{try{return e.getTotalLength()}catch{return 0}})))}const p={x:v,y:v,rotate:v,scale:v,color:I,backgroundColor:I,borderColor:I,blur:m,hue:m,fopacity:m,grayscale:m,invert:m,saturate:m,sepia:m,opacity:vn,stroke:Fn,bgx:E,bgy:E},{keys:_}=Object;var wn={mixins:[b],props:D(_(p),"list"),data:D(_(p),void 0),computed:{props(n,e){const t={};for(const r in n)r in p&&!s.isUndefined(n[r])&&(t[r]=n[r].slice());const o={};for(const r in t)o[r]=p[r](r,e,t[r],t);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const e={};for(const t in this.props)this.props[t](e,s.clamp(n));return e.willChange=Object.keys(e).map(s.propName).join(","),e}}};function v(n,e,t){let o=S(t)||{x:"px",y:"px",rotate:"deg"}[n]||"",r;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,r=i=>s.toFloat(s.toFloat(i).toFixed(o==="px"?0:6))):n==="scale"&&(o="",r=i=>{var c;return S([i])?s.toPx(i,"width",e,!0)/e[`offset${(c=i.endsWith)!=null&&c.call(i,"vh")?"Height":"Width"}`]:s.toFloat(i)}),t.length===1&&t.unshift(n==="scale"?1:0),t=g(t,r),(i,c)=>{i.transform=`${i.transform||""} ${n}(${x(t,c)}${o})`}}function I(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=g(t,o=>pn(e,o)),(o,r)=>{const[i,c,a]=R(t,r),h=i.map((l,f)=>(l+=a*(c[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function pn(n,e){return y(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function m(n,e,t){t.length===1&&t.unshift(0);const o=S(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=g(t),(r,i)=>{const c=x(t,i);r.filter=`${r.filter||""} ${n}(${c+o})`}}function vn(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=g(t),(o,r)=>{o[n]=x(t,r)}}function Fn(n,e,t){t.length===1&&t.unshift(0);const o=S(t),r=yn(e);return t=g(t.reverse(),i=>(i=s.toFloat(i),o==="%"?i*r/100:i)),t.some(([i])=>i)?(s.css(e,"strokeDasharray",r),(i,c)=>{i.strokeDashoffset=x(t,c)}):s.noop}function E(n,e,t,o){t.length===1&&t.unshift(0);const r=n==="bgy"?"height":"width";o[n]=g(t,a=>s.toPx(a,r,e));const i=["bgx","bgy"].filter(a=>a in o);if(i.length===2&&n==="bgx")return s.noop;if(y(e,"backgroundSize","")==="cover")return Sn(n,e,t,o);const c={};for(const a of i)c[a]=z(e,a);return H(i,c,o)}function Sn(n,e,t,o){const r=Mn(e);if(!r.width)return s.noop;const i={width:e.offsetWidth,height:e.offsetHeight},c=["bgx","bgy"].filter(f=>f in o),a={};for(const f of c){const u=o[f].map(([On])=>On),w=Math.min(...u),N=Math.max(...u),V=u.indexOf(w)<u.indexOf(N),G=N-w;a[f]=`${(V?-G:0)-(V?w:N)}px`,i[f==="bgy"?"height":"width"]+=G}const h=s.Dimensions.cover(r,i);for(const f of c){const u=f==="bgy"?"height":"width",w=h[u]-i[u];a[f]=`max(${z(e,f)},-${w}px) + ${a[f]}`}const l=H(c,a,o);return(f,u)=>{l(f,u),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function z(n,e){return y(n,`background-position-${e.substr(-1)}`,"")}function H(n,e,t){return function(o,r){for(const i of n){const c=x(t[i],r);o[`background-position-${i.substr(-1)}`]=`calc(${e[i]} + ${c}px)`}}}const F={};function Mn(n){const e=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[e])return F[e];const t=new Image;return e&&(t.src=e,!t.naturalWidth)?(t.onload=()=>{F[e]=P(t),s.trigger(n,s.createEvent("load",!1))},P(t)):F[e]=P(t)}function P(n){return{width:n.naturalWidth,height:n.naturalHeight}}function g(n,e=s.toFloat){const t=[],{length:o}=n;let r=0;for(let i=0;i<o;i++){let[c,a]=s.isString(n[i])?n[i].trim().split(/ (?![^(]*\))/):[n[i]];if(c=e(c),a=a?s.toFloat(a)/100:null,i===0?a===null?a=0:a&&t.push([c,0]):i===o-1&&(a===null?a=1:a!==1&&(t.push([c,a]),a=1)),t.push([c,a]),a===null)r++;else if(r){const h=t[i-r-1][1],l=(a-h)/(r+1);for(let f=r;f>0;f--)t[i-f][1]=h+l*(r-f+1);r=0}}return t}function R(n,e){const t=s.findIndex(n.slice(1),([,o])=>e<=o)+1;return[n[t-1][0],n[t][0],(e-n[t-1][1])/(n[t][1]-n[t-1][1])]}function x(n,e){const[t,o,r]=R(n,e);return t+Math.abs(t-o)*r*(t<o?1:-1)}const Cn=/^-?\d+(?:\.\d+)?(\S+)?/;function S(n,e){var t;for(const o of n){const r=(t=o.match)==null?void 0:t.call(o,Cn);if(r)return r[1]}return e}function y(n,e,t){const o=n.style[e],r=s.css(s.css(n,e,t),e);return n.style[e]=o,r}function D(n,e){return n.reduce((t,o)=>(t[o]=e,t),{})}var q={mixins:[wn],data:{selItem:"!li"},beforeConnect(){this.item=s.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,duration:t,timing:o,dir:r}}){s.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(L(n,r,e)),c=this.getCss(B(n)?.5:r>0?1:0);s.fastdom.write(()=>{s.css(this.$el,i),s.Transition.start(this.$el,c,t,o).catch(s.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){s.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,dir:t}}){s.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(L(n,t,e));s.fastdom.write(()=>s.css(this.$el,o))})}}]};function B(n){return s.endsWith(n,"in")}function L(n,e,t){return t/=2,B(n)^e<0?t:1-t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",q),q});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
return `${this.selList} > *`;
|
|
287
287
|
},
|
|
288
288
|
handler(e) {
|
|
289
|
-
if (!this.draggable || !util.isTouch(e) && hasSelectableText(e.target) ||
|
|
289
|
+
if (!this.draggable || !util.isTouch(e) && hasSelectableText(e.target) || e.target.closest(util.selInput) || e.button > 0 || this.length < 2) {
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
292
|
this.start(e);
|
|
@@ -415,16 +415,16 @@
|
|
|
415
415
|
return { attributes, filter };
|
|
416
416
|
});
|
|
417
417
|
|
|
418
|
-
const ids =
|
|
418
|
+
const ids = /* @__PURE__ */ Object.create(null);
|
|
419
419
|
function generateId(instance, el = instance.$el, postfix = "") {
|
|
420
420
|
if (el.id) {
|
|
421
421
|
return el.id;
|
|
422
422
|
}
|
|
423
423
|
let id = `${instance.$options.id}-${instance._uid}${postfix}`;
|
|
424
|
-
if (
|
|
424
|
+
if (ids[id]) {
|
|
425
425
|
id = generateId(instance, el, `${postfix}-2`);
|
|
426
426
|
}
|
|
427
|
-
ids
|
|
427
|
+
ids[id] = true;
|
|
428
428
|
return id;
|
|
429
429
|
}
|
|
430
430
|
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
return this.selNavItem;
|
|
549
549
|
},
|
|
550
550
|
handler(e) {
|
|
551
|
-
if (
|
|
551
|
+
if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
|
|
552
552
|
e.preventDefault();
|
|
553
553
|
this.show(util.data(e.current, this.attrItem));
|
|
554
554
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.73842811 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],m):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=m(s.UIkit.util))})(this,function(s){"use strict";var m={connected(){s.addClass(this.$el,this.$options.id)}},H={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},y={slide:{show(t){return[{transform:c(t*-100)},{transform:c()}]},percent(t){return g(t)},translate(t,e){return[{transform:c(e*-100*t)},{transform:c(e*100*(1-t))}]}}};function g(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)}function c(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function z(t){return`scale3d(${t}, ${t}, 1)`}function T(t,e,i,{animation:n,easing:a}){const{percent:r,translate:o,show:h=s.noop}=n,p=h(i);let l;return{dir:i,show(d,f=0,x){const I=x?"linear":a;return d-=Math.round(d*s.clamp(f,-1,1)),this.translate(f),v(e,"itemin",{percent:f,duration:d,timing:I,dir:i}),v(t,"itemout",{percent:1-f,duration:d,timing:I,dir:i}),new Promise(K=>{l||(l=K),Promise.all([s.Transition.start(e,p[1],d,I),s.Transition.start(t,p[0],d,I)]).then(()=>{this.reset(),l()},s.noop)})},cancel(){return s.Transition.cancel([e,t])},reset(){for(const d in p[0])s.css([e,t],d,"")},async forward(d,f=this.percent()){return await this.cancel(),this.show(d,f,!0)},translate(d){this.reset();const f=o(d,i);s.css(e,f[1]),s.css(t,f[0]),v(e,"itemtranslatein",{percent:d,dir:i}),v(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return r(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function v(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}function D(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,s.fastdom.read(()=>{t._connected&&E(t,t._queued),delete t._queued})),t._queued.add(e.type||e))}function E(t,e){for(const{read:i,write:n,events:a=[]}of t._updates){if(!e.has("update")&&!a.some(o=>e.has(o)))continue;let r;i&&(r=i.call(t,t._data,e),r&&s.isPlainObject(r)&&s.assign(t._data,r)),n&&r!==!1&&s.fastdom.write(()=>{t._connected&&n.call(t,t._data,e)})}}function M(t){return $(s.observeResize,t,"resize")}function O(t){return $(s.observeIntersection,t)}function P(t={}){return O({handler:function(e,i){const{targets:n=this.$el,preload:a=5}=t;for(const r of s.toNodes(s.isFunction(n)?n(this):n))s.$$('[loading="lazy"]',r).slice(0,a-1).forEach(o=>s.removeAttr(o,"loading"));for(const r of e.filter(({isIntersecting:o})=>o).map(({target:o})=>o))i.unobserve(r)},...t})}function $(t,e,i){return{observe:t,handler(){D(this,i)},...e}}var U={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,a;let r=0;return((a=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:a.replace(/%s/g,()=>e[r++]||""))||""}}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&s.matches(this.$el,":focus-within")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},W="touchstart mousedown",b="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var q={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=i=>{const n=s.getEventPos(i).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,e(i)}}},events:[{name:W,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&L(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:b,el(){return this.list},handler:s.noop,...w}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,b,this.move,w),s.on(document,N,this.end,A),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;let{slides:i,prevIndex:n}=this,a=Math.abs(e),r=this.getIndex(n+this.dir),o=this._getDistance(n,r);for(;r!==n&&a>o;)this.drag-=o*this.dir,n=r,a-=o,r=this.getIndex(n+this.dir),o=this._getDistance(n,r);this.percent=a/o;const h=i[n],p=i[r],l=this.index!==r,d=n===r;let f;for(const x of[this.index,this.prevIndex])s.includes([r,n],x)||(s.trigger(i[x],"itemhidden",[this]),d&&(f=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||f)&&s.trigger(i[this.index],"itemshown",[this]),l&&(this.prevIndex=n,this.index=r,!d&&s.trigger(h,"beforeitemhide",[this]),s.trigger(p,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&p),l&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(p,"itemshow",[this]))},end(){if(s.off(document,b,this.move,w),s.off(document,N,this.end,A),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(s.isRtl?this.dir*(s.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)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}}};function L(t){return s.css(t,"userSelect")!=="none"&&s.toArray(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}s.memoize((t,e)=>{const i=Object.keys(e),n=i.concat(t).map(a=>[s.hyphenate(a),`data-${s.hyphenate(a)}`]).flat();return{attributes:i,filter:n}});const k=[];function _(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return s.includes(k,n)&&(n=_(t,e,`${i}-2`)),k.push(n),n}const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var j={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},e)=>s.$(t,e),navChildren(){return s.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,e){return s.$$(this.selNavItem,e)}},watch:{nav(t,e){s.attr(t,"role","tablist"),e&&this.$emit()},list(t){s.attr(t,"role","presentation")},navChildren(t){s.attr(t,"role","presentation")},navItems(t){for(const e of t){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;let a,r=null;if(s.isNumeric(i)){const o=s.toNumber(i),h=this.slides[o];h&&(h.id||(h.id=_(this,h,`-item-${i}`)),r=h.id),a=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=_(this,this.list,"-items")),r=this.list.id),a=this.t(i);s.attr(n,{"aria-controls":r,"aria-label":s.attr(n,"aria-label")||a})}},slides(t){t.forEach((e,i)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const e=this.navChildren.length;if(this.nav&&t!==e){s.empty(this.nav);for(let i=0;i<t;i++)s.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){s.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){s.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===u.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let a=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~a&&(t.preventDefault(),this.show(a))}}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;if(s.isNumeric(i)){const r=s.toNumber(i)===t;s.toggleClass(e,this.clsActive,r),s.attr(n,{"aria-selected":r,tabindex:r?null:-1}),r&&n&&s.matches(s.parent(e),":focus-within")&&n.focus()}else s.toggleClass(e,"uk-invisible",this.finite&&(i==="previous"&&t===0||i==="next"&&t>=this.maxIndex))}}}},B={mixins:[R,q,j,U],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},e)=>V(e.offsetWidth/t),list:({selList:t},e)=>s.$(t,e),maxIndex(){return this.length-1},slides(){return s.children(this.list)},length(){return this.slides.length}},watch:{slides(t,e){e&&this.$emit()}},observe:M(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,a=e?0:n.length,r=()=>{n.splice(a,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[o],p=this.getIndex(t,this.index),l=this.slides[p];if(h===l){r();return}if(this.dir=F(t,o),this.prevIndex=o,this.index=p,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,h])){this.index=this.prevIndex,r();return}const d=this._show(h,l,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(t=this.index,e=this.index){return s.clamp(s.getIndex(t,this.slides,e,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,e=this.prevIndex){return this.getIndex(t,e)},_show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?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}),!i&&!t)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,e=this.prevIndex,i=this.index){const n=this._getTransitioner(e===i?!1:e,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,e=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,i*(s.isRtl?-1:1),n)}}};function F(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function V(t){return .5*t+300}var G={mixins:[B],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:T},computed:{animation({animation:t,Animations:e}){return{...e[t]||e.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){s.addClass(t,this.clsActive)},itemshown({target:t}){s.addClass(t,this.clsActivated)},itemhidden({target:t}){s.removeClass(t,this.clsActive,this.clsActivated)}}},X={observe:P({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},J={...y,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:z(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:c(30),zIndex:-1},{transform:c(),zIndex:0}]:[{transform:c(-100),zIndex:0},{transform:c(),zIndex:-1}]},percent(t,e,i){return i<0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(30*t),zIndex:-1},{transform:c(-100*(1-t)),zIndex:0}]:[{transform:c(-t*100),zIndex:0},{transform:c(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:c(100),zIndex:0},{transform:c(),zIndex:-1}]:[{transform:c(-30),zIndex:-1},{transform:c(),zIndex:0}]},percent(t,e,i){return i>0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(t*100),zIndex:0},{transform:c(-30*(1-t)),zIndex:-1}]:[{transform:c(-30*t),zIndex:-1},{transform:c(100*(1-t)),zIndex:0}]}}};const S=s.inBrowser&&CSS.supports("aspect-ratio","1/1");var C={mixins:[m,G,H,X],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:J},watch:{list(t){t&&S&&s.css(t,{aspectRatio:this.ratio.replace(":","/"),minHeight:this.minHeight||"",maxHeight:this.maxHeight||"",minWidth:"100%",maxWidth:"100%"})}},update:{read(){if(!this.list||S)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&s.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",C),C});
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){s.addClass(this.$el,this.$options.id)}},H={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},y={slide:{show(t){return[{transform:c(t*-100)},{transform:c()}]},percent(t){return g(t)},translate(t,e){return[{transform:c(e*-100*t)},{transform:c(e*100*(1-t))}]}}};function g(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)}function c(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function z(t){return`scale3d(${t}, ${t}, 1)`}function T(t,e,i,{animation:n,easing:a}){const{percent:r,translate:o,show:h=s.noop}=n,m=h(i);let l;return{dir:i,show(d,f=0,x){const I=x?"linear":a;return d-=Math.round(d*s.clamp(f,-1,1)),this.translate(f),v(e,"itemin",{percent:f,duration:d,timing:I,dir:i}),v(t,"itemout",{percent:1-f,duration:d,timing:I,dir:i}),new Promise(K=>{l||(l=K),Promise.all([s.Transition.start(e,m[1],d,I),s.Transition.start(t,m[0],d,I)]).then(()=>{this.reset(),l()},s.noop)})},cancel(){return s.Transition.cancel([e,t])},reset(){for(const d in m[0])s.css([e,t],d,"")},async forward(d,f=this.percent()){return await this.cancel(),this.show(d,f,!0)},translate(d){this.reset();const f=o(d,i);s.css(e,f[1]),s.css(t,f[0]),v(e,"itemtranslatein",{percent:d,dir:i}),v(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return r(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function v(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}function D(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,s.fastdom.read(()=>{t._connected&&E(t,t._queued),delete t._queued})),t._queued.add(e.type||e))}function E(t,e){for(const{read:i,write:n,events:a=[]}of t._updates){if(!e.has("update")&&!a.some(o=>e.has(o)))continue;let r;i&&(r=i.call(t,t._data,e),r&&s.isPlainObject(r)&&s.assign(t._data,r)),n&&r!==!1&&s.fastdom.write(()=>{t._connected&&n.call(t,t._data,e)})}}function O(t){return $(s.observeResize,t,"resize")}function M(t){return $(s.observeIntersection,t)}function P(t={}){return M({handler:function(e,i){const{targets:n=this.$el,preload:a=5}=t;for(const r of s.toNodes(s.isFunction(n)?n(this):n))s.$$('[loading="lazy"]',r).slice(0,a-1).forEach(o=>s.removeAttr(o,"loading"));for(const r of e.filter(({isIntersecting:o})=>o).map(({target:o})=>o))i.unobserve(r)},...t})}function $(t,e,i){return{observe:t,handler(){D(this,i)},...e}}var U={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,a;let r=0;return((a=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:a.replace(/%s/g,()=>e[r++]||""))||""}}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&s.matches(this.$el,":focus-within")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},W="touchstart mousedown",b="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var j={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=i=>{const n=s.getEventPos(i).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,e(i)}}},events:[{name:W,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&q(t.target)||t.target.closest(s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:b,el(){return this.list},handler:s.noop,...w}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,b,this.move,w),s.on(document,N,this.end,A),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;let{slides:i,prevIndex:n}=this,a=Math.abs(e),r=this.getIndex(n+this.dir),o=this._getDistance(n,r);for(;r!==n&&a>o;)this.drag-=o*this.dir,n=r,a-=o,r=this.getIndex(n+this.dir),o=this._getDistance(n,r);this.percent=a/o;const h=i[n],m=i[r],l=this.index!==r,d=n===r;let f;for(const x of[this.index,this.prevIndex])s.includes([r,n],x)||(s.trigger(i[x],"itemhidden",[this]),d&&(f=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||f)&&s.trigger(i[this.index],"itemshown",[this]),l&&(this.prevIndex=n,this.index=r,!d&&s.trigger(h,"beforeitemhide",[this]),s.trigger(m,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&m),l&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(m,"itemshow",[this]))},end(){if(s.off(document,b,this.move,w),s.off(document,N,this.end,A),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(s.isRtl?this.dir*(s.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)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}}};function q(t){return s.css(t,"userSelect")!=="none"&&s.toArray(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}s.memoize((t,e)=>{const i=Object.keys(e),n=i.concat(t).map(a=>[s.hyphenate(a),`data-${s.hyphenate(a)}`]).flat();return{attributes:i,filter:n}});const k=Object.create(null);function _(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return k[n]&&(n=_(t,e,`${i}-2`)),k[n]=!0,n}const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var L={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},e)=>s.$(t,e),navChildren(){return s.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,e){return s.$$(this.selNavItem,e)}},watch:{nav(t,e){s.attr(t,"role","tablist"),e&&this.$emit()},list(t){s.attr(t,"role","presentation")},navChildren(t){s.attr(t,"role","presentation")},navItems(t){for(const e of t){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;let a,r=null;if(s.isNumeric(i)){const o=s.toNumber(i),h=this.slides[o];h&&(h.id||(h.id=_(this,h,`-item-${i}`)),r=h.id),a=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=_(this,this.list,"-items")),r=this.list.id),a=this.t(i);s.attr(n,{"aria-controls":r,"aria-label":s.attr(n,"aria-label")||a})}},slides(t){t.forEach((e,i)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const e=this.navChildren.length;if(this.nav&&t!==e){s.empty(this.nav);for(let i=0;i<t;i++)s.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){s.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){t.target.closest("a,button")&&(t.type==="click"||t.keyCode===u.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let a=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~a&&(t.preventDefault(),this.show(a))}}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;if(s.isNumeric(i)){const r=s.toNumber(i)===t;s.toggleClass(e,this.clsActive,r),s.attr(n,{"aria-selected":r,tabindex:r?null:-1}),r&&n&&s.matches(s.parent(e),":focus-within")&&n.focus()}else s.toggleClass(e,"uk-invisible",this.finite&&(i==="previous"&&t===0||i==="next"&&t>=this.maxIndex))}}}},B={mixins:[R,j,L,U],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},e)=>V(e.offsetWidth/t),list:({selList:t},e)=>s.$(t,e),maxIndex(){return this.length-1},slides(){return s.children(this.list)},length(){return this.slides.length}},watch:{slides(t,e){e&&this.$emit()}},observe:O(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,a=e?0:n.length,r=()=>{n.splice(a,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[o],m=this.getIndex(t,this.index),l=this.slides[m];if(h===l){r();return}if(this.dir=F(t,o),this.prevIndex=o,this.index=m,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,h])){this.index=this.prevIndex,r();return}const d=this._show(h,l,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(t=this.index,e=this.index){return s.clamp(s.getIndex(t,this.slides,e,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,e=this.prevIndex){return this.getIndex(t,e)},_show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?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}),!i&&!t)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,e=this.prevIndex,i=this.index){const n=this._getTransitioner(e===i?!1:e,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,e=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,i*(s.isRtl?-1:1),n)}}};function F(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function V(t){return .5*t+300}var G={mixins:[B],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:T},computed:{animation({animation:t,Animations:e}){return{...e[t]||e.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){s.addClass(t,this.clsActive)},itemshown({target:t}){s.addClass(t,this.clsActivated)},itemhidden({target:t}){s.removeClass(t,this.clsActive,this.clsActivated)}}},X={observe:P({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},J={...y,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:z(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:c(30),zIndex:-1},{transform:c(),zIndex:0}]:[{transform:c(-100),zIndex:0},{transform:c(),zIndex:-1}]},percent(t,e,i){return i<0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(30*t),zIndex:-1},{transform:c(-100*(1-t)),zIndex:0}]:[{transform:c(-t*100),zIndex:0},{transform:c(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:c(100),zIndex:0},{transform:c(),zIndex:-1}]:[{transform:c(-30),zIndex:-1},{transform:c(),zIndex:0}]},percent(t,e,i){return i>0?1-g(e):g(t)},translate(t,e){return e<0?[{transform:c(t*100),zIndex:0},{transform:c(-30*(1-t)),zIndex:-1}]:[{transform:c(-30*t),zIndex:-1},{transform:c(100*(1-t)),zIndex:0}]}}};const S=s.inBrowser&&CSS.supports("aspect-ratio","1/1");var C={mixins:[p,G,H,X],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:J},watch:{list(t){t&&S&&s.css(t,{aspectRatio:this.ratio.replace(":","/"),minHeight:this.minHeight||"",maxHeight:this.maxHeight||"",minWidth:"100%",maxWidth:"100%"})}},update:{read(){if(!this.list||S)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&s.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",C),C});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -469,8 +469,8 @@
|
|
|
469
469
|
methods: {
|
|
470
470
|
init(e) {
|
|
471
471
|
const { target, button, defaultPrevented } = e;
|
|
472
|
-
const [placeholder] = this.items.filter((el) =>
|
|
473
|
-
if (!placeholder || defaultPrevented || button > 0 || uikitUtil.isInput(target) ||
|
|
472
|
+
const [placeholder] = this.items.filter((el) => el.contains(target));
|
|
473
|
+
if (!placeholder || defaultPrevented || button > 0 || uikitUtil.isInput(target) || target.closest(`.${this.clsNoDrag}`) || this.handle && !target.closest(this.handle)) {
|
|
474
474
|
return;
|
|
475
475
|
}
|
|
476
476
|
e.preventDefault();
|
|
@@ -535,7 +535,7 @@
|
|
|
535
535
|
this.animate(insert);
|
|
536
536
|
},
|
|
537
537
|
remove(element) {
|
|
538
|
-
if (!
|
|
538
|
+
if (!this.target.contains(element)) {
|
|
539
539
|
return;
|
|
540
540
|
}
|
|
541
541
|
this.animate(() => uikitUtil.remove(element));
|