uikit 3.16.10 → 3.16.11-dev.55a0fc5b5
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 +7 -0
- 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 +24 -28
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +79 -72
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +90 -84
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +79 -72
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +79 -72
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +14 -18
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +256 -279
- 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 +381 -406
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/computed.js +7 -1
- package/src/js/api/hooks.js +7 -4
- package/src/js/api/observer.js +44 -43
- package/src/js/api/options.js +1 -0
- package/src/js/api/update.js +15 -36
- package/src/js/api/watch.js +33 -20
- package/src/js/components/filter.js +23 -29
- package/src/js/components/lightbox.js +12 -14
- package/src/js/components/sortable.js +13 -19
- package/src/js/core/accordion.js +32 -45
- package/src/js/core/dropnav.js +37 -43
- package/src/js/core/height-match.js +2 -8
- package/src/js/core/navbar.js +3 -12
- package/src/js/core/scrollspy-nav.js +10 -12
- package/src/js/core/scrollspy.js +10 -12
- package/src/js/core/switcher.js +30 -37
- package/src/js/mixin/slider-nav.js +80 -76
- package/src/js/mixin/slider.js +10 -8
- package/src/js/util/fastdom.js +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.11-dev.55a0fc5b5 | 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')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.11-dev.55a0fc5b5 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],s):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitCountdown=s(t.UIkit.util))})(this,function(t){"use strict";var s={connected(){t.addClass(this.$el,this.$options.id)}};const d=["days","hours","minutes","seconds"];var r={mixins:[s],props:{date:String,clsWrapper:String,role:String},data:{date:"",clsWrapper:".uk-countdown-%unit%",role:"timer"},connected(){t.attr(this.$el,"role",this.role),this.date=t.toFloat(Date.parse(this.$props.date)),this.end=!1,this.start()},disconnected(){this.stop()},events:{name:"visibilitychange",el(){return document},handler(){document.hidden?this.stop():this.start()}},methods:{start(){this.stop(),this.update(),this.timer||(t.trigger(this.$el,"countdownstart"),this.timer=setInterval(this.update,1e3))},stop(){this.timer&&(clearInterval(this.timer),t.trigger(this.$el,"countdownstop"),this.timer=null)},update(){const o=a(this.date);o.total||(this.stop(),this.end||(t.trigger(this.$el,"countdownend"),this.end=!0));for(const n of d){const i=t.$(this.clsWrapper.replace("%unit%",n),this.$el);if(!i)continue;let e=String(Math.trunc(o[n]));e=e.length<2?`0${e}`:e,i.textContent!==e&&(e=e.split(""),e.length!==i.children.length&&t.html(i,e.map(()=>"<span></span>").join("")),e.forEach((h,u)=>i.children[u].textContent=h))}}}};function a(o){const n=Math.max(0,o-Date.now())/1e3;return{total:n,seconds:n%60,minutes:n/60%60,hours:n/60/60%24,days:n/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",r),r});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.11-dev.55a0fc5b5 | 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')) :
|
|
@@ -364,35 +364,31 @@
|
|
|
364
364
|
duration: 250
|
|
365
365
|
},
|
|
366
366
|
computed: {
|
|
367
|
-
toggles
|
|
368
|
-
|
|
369
|
-
return uikitUtil.$$(`[${attrItem}],[data-${attrItem}]`, $el);
|
|
370
|
-
},
|
|
371
|
-
watch(toggles) {
|
|
372
|
-
this.updateState();
|
|
373
|
-
const actives = uikitUtil.$$(this.selActive, this.$el);
|
|
374
|
-
for (const toggle of toggles) {
|
|
375
|
-
if (this.selActive !== false) {
|
|
376
|
-
uikitUtil.toggleClass(toggle, this.cls, uikitUtil.includes(actives, toggle));
|
|
377
|
-
}
|
|
378
|
-
const button = findButton(toggle);
|
|
379
|
-
if (uikitUtil.isTag(button, "a")) {
|
|
380
|
-
uikitUtil.attr(button, "role", "button");
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
},
|
|
384
|
-
immediate: true
|
|
367
|
+
toggles({ attrItem }, $el) {
|
|
368
|
+
return uikitUtil.$$(`[${attrItem}],[data-${attrItem}]`, $el);
|
|
385
369
|
},
|
|
386
|
-
children
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
370
|
+
children({ target }, $el) {
|
|
371
|
+
return uikitUtil.$$(`${target} > *`, $el);
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
watch: {
|
|
375
|
+
toggles(toggles) {
|
|
376
|
+
this.updateState();
|
|
377
|
+
const actives = uikitUtil.$$(this.selActive, this.$el);
|
|
378
|
+
for (const toggle of toggles) {
|
|
379
|
+
if (this.selActive !== false) {
|
|
380
|
+
uikitUtil.toggleClass(toggle, this.cls, uikitUtil.includes(actives, toggle));
|
|
381
|
+
}
|
|
382
|
+
const button = findButton(toggle);
|
|
383
|
+
if (uikitUtil.isTag(button, "a")) {
|
|
384
|
+
uikitUtil.attr(button, "role", "button");
|
|
393
385
|
}
|
|
394
|
-
}
|
|
395
|
-
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
children(list, prev) {
|
|
389
|
+
if (prev) {
|
|
390
|
+
this.updateState();
|
|
391
|
+
}
|
|
396
392
|
}
|
|
397
393
|
},
|
|
398
394
|
events: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.11-dev.55a0fc5b5 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],u):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitFilter=u(s.UIkit.util))})(this,function(s){"use strict";function u(n){return b(s.observeResize,n,"resize")}function N(n){return b(s.observeMutation,n)}function b(n,e,o){return{observe:n,handler(){this.$emit(o)},...e}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),u({target:({$el:n})=>[n,...s.toArray(n.children)]});function T(n){return C(n,"top","bottom")}function q(n){const e=[];for(const o of n){const t=C(o,"left","right");for(let r=0;r<t.length;r++)e[r]=e[r]?e[r].concat(t[r]):t[r]}return s.isRtl?e.reverse():e}function C(n,e,o){const t=[[]];for(const r of n){if(!s.isVisible(r))continue;let a=y(r);for(let c=t.length-1;c>=0;c--){const f=t[c];if(!f[0]){f.push(r);break}let h;if(f[0].offsetParent===r.offsetParent?h=y(f[0]):(a=y(r,!0),h=y(f[0],!0)),a[e]>=h[o]-1&&a[e]!==h[e]){t.push([r]);break}if(a[o]-1>h[e]||a[e]===h[e]){f.push(r);break}if(c===0){t.unshift([r]);break}}}return t}function y(n,e=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:r,offsetWidth:a}=n;return e&&([o,t]=s.offsetPosition(n)),{top:o,left:t,bottom:o+r,right:t+a}}const w="uk-transition-leave",v="uk-transition-enter";function $(n,e,o,t=0){const r=g(e,!0),a={opacity:1},c={opacity:0},f=p=>()=>r===g(e)?p():Promise.reject(),h=f(async()=>{s.addClass(e,w),await Promise.all(P(e).map((p,l)=>new Promise(d=>setTimeout(()=>s.Transition.start(p,c,o/2,"ease").then(d),l*t)))),s.removeClass(e,w)}),i=f(async()=>{const p=s.height(e);s.addClass(e,v),n(),s.css(s.children(e),{opacity:0}),await L();const l=s.children(e),d=s.height(e);s.css(e,"alignContent","flex-start"),s.height(e,p);const m=P(e);s.css(l,c);const z=m.map(async(Y,Z)=>{await O(Z*t),await s.Transition.start(Y,a,o/2,"ease")});p!==d&&z.push(s.Transition.start(e,{height:d},o/2+m.length*t,"ease")),await Promise.all(z).then(()=>{s.removeClass(e,v),r===g(e)&&(s.css(e,{height:"",alignContent:""}),s.css(l,{opacity:""}),delete e.dataset.transition)})});return s.hasClass(e,w)?S(e).then(i):s.hasClass(e,v)?S(e).then(h).then(i):h().then(i)}function g(n,e){return e&&(n.dataset.transition=1+g(n)),s.toNumber(n.dataset.transition)||0}function S(n){return Promise.all(s.children(n).filter(s.Transition.inProgress).map(e=>new Promise(o=>s.once(e,"transitionend transitioncanceled",o))))}function P(n){return T(s.children(n)).reduce((e,o)=>e.concat(s.sortBy(o.filter(t=>s.isInView(t)),"offsetLeft")),[])}function L(){return new Promise(n=>requestAnimationFrame(n))}function O(n){return new Promise(e=>setTimeout(e,n))}async function H(n,e,o){await E();let t=s.children(e);const r=t.map(d=>I(d,!0)),a={...s.css(e,["height","padding"]),display:"block"};await Promise.all(t.concat(e).map(s.Transition.cancel)),n(),t=t.concat(s.children(e).filter(d=>!s.includes(t,d))),await Promise.resolve(),s.fastdom.flush();const c=s.attr(e,"style"),f=s.css(e,["height","padding"]),[h,i]=V(e,t,r),p=t.map(d=>({style:s.attr(d,"style")}));t.forEach((d,m)=>i[m]&&s.css(d,i[m])),s.css(e,a),s.trigger(e,"scroll"),s.fastdom.flush(),await E();const l=t.map((d,m)=>s.parent(d)===e&&s.Transition.start(d,h[m],o,"ease")).concat(s.Transition.start(e,f,o,"ease"));try{await Promise.all(l),t.forEach((d,m)=>{s.attr(d,p[m]),s.parent(d)===e&&s.css(d,"display",h[m].opacity===0?"none":"")}),s.attr(e,"style",c)}catch{s.attr(t,"style",""),D(e,a)}}function I(n,e){const o=s.css(n,"zIndex");return s.isVisible(n)?{display:"",opacity:e?s.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?s.index(n):o,...F(n)}:!1}function V(n,e,o){const t=e.map((a,c)=>s.parent(a)&&c in o?o[c]?s.isVisible(a)?F(a):{opacity:0}:{opacity:s.isVisible(a)?1:0}:!1),r=t.map((a,c)=>{const f=s.parent(e[c])===n&&(o[c]||I(e[c]));if(!f)return!1;if(!a)delete f.opacity;else if(!("opacity"in a)){const{opacity:h}=f;h%1?a.opacity=1:delete f.opacity}return f});return[t,r]}function D(n,e){for(const o in e)s.css(n,o,"")}function F(n){const{height:e,width:o}=s.offset(n);return{height:e,width:o,transform:"",...s.position(n),...s.css(n,["marginTop","marginLeft"])}}function E(){return new Promise(n=>requestAnimationFrame(n))}var M={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,e=this.$el){const o=this.animation;return(o==="fade"?$:o==="delayed-fade"?(...r)=>$(...r,40):o?H:()=>(n(),Promise.resolve()))(n,e,this.duration).catch(s.noop)}}};function R(n,e=[]){try{return n?s.startsWith(n,"{")?JSON.parse(n):e.length&&!s.includes(n,":")?{[e[0]]:n}:n.split(";").reduce((o,t)=>{const[r,a]=t.split(/:(.*)/);return r&&!s.isUndefined(a)&&(o[r.trim()]=a.trim()),o},{}):{}}catch{return{}}}const W={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var x={mixins:[M],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles({attrItem:n},e){return s.$$(`[${n}],[data-${n}]`,e)},children({target:n},e){return s.$$(`${n} > *`,e)}},watch:{toggles(n){this.updateState();const e=s.$$(this.selActive,this.$el);for(const o of n){this.selActive!==!1&&s.toggleClass(o,this.cls,s.includes(e,o));const t=X(o);s.isTag(t,"a")&&s.attr(t,"role","button")}},children(n,e){e&&this.updateState()}},events:{name:"click keydown",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(n){n.type==="keydown"&&n.keyCode!==W.SPACE||s.closest(n.target,"a,button")&&(n.preventDefault(),this.apply(n.current))}},methods:{apply(n){const e=this.getState(),o=B(n,this.attrItem,this.getState());j(e,o)||this.setState(o)},getState(){return this.toggles.filter(n=>s.hasClass(n,this.cls)).reduce((n,e)=>B(e,this.attrItem,n),{filter:{"":""},sort:[]})},async setState(n,e=!0){n={filter:{"":""},sort:[],...n},s.trigger(this.$el,"beforeFilter",[this,n]);for(const o of this.toggles)s.toggleClass(o,this.cls,J(o,this.attrItem,n));await Promise.all(s.$$(this.target,this.$el).map(o=>{const t=()=>{G(n,o,s.children(o)),this.$update(this.$el)};return e?this.animate(t,o):t()})),s.trigger(this.$el,"afterFilter",[this])},updateState(){s.fastdom.write(()=>this.setState(this.getState(),!1))}}};function A(n,e){return R(s.data(n,e),["filter"])}function j(n,e){return["filter","sort"].every(o=>s.isEqual(n[o],e[o]))}function G(n,e,o){const t=K(n);o.forEach(c=>s.css(c,"display",t&&!s.matches(c,t)?"none":""));const[r,a]=n.sort;if(r){const c=Q(o,r,a);s.isEqual(c,o)||s.append(e,c)}}function B(n,e,o){const{filter:t,group:r,sort:a,order:c="asc"}=A(n,e);return(t||s.isUndefined(a))&&(r?t?(delete o.filter[""],o.filter[r]=t):(delete o.filter[r],(s.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),s.isUndefined(a)||(o.sort=[a,c]),o}function J(n,e,{filter:o={"":""},sort:[t,r]}){const{filter:a="",group:c="",sort:f,order:h="asc"}=A(n,e);return s.isUndefined(f)?c in o&&a===o[c]||!a&&c&&!(c in o)&&!o[""]:t===f&&r===h}function K({filter:n}){let e="";return s.each(n,o=>e+=o||""),e}function Q(n,e,o){return[...n].sort((t,r)=>s.data(t,e).localeCompare(s.data(r,e),void 0,{numeric:!0})*(o==="asc"||-1))}function X(n){return s.$("a,button",n)||n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",x),x});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.11-dev.55a0fc5b5 | 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')) :
|
|
@@ -1103,28 +1103,81 @@
|
|
|
1103
1103
|
role: "region"
|
|
1104
1104
|
},
|
|
1105
1105
|
computed: {
|
|
1106
|
-
nav
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
util.attr(nav, "role", "tablist");
|
|
1112
|
-
if (prev) {
|
|
1113
|
-
this.$emit();
|
|
1114
|
-
}
|
|
1115
|
-
},
|
|
1116
|
-
immediate: true
|
|
1106
|
+
nav({ selNav }, $el) {
|
|
1107
|
+
return util.$(selNav, $el);
|
|
1108
|
+
},
|
|
1109
|
+
navChildren() {
|
|
1110
|
+
return util.children(this.nav);
|
|
1117
1111
|
},
|
|
1118
1112
|
selNavItem({ attrItem }) {
|
|
1119
1113
|
return `[${attrItem}],[data-${attrItem}]`;
|
|
1120
1114
|
},
|
|
1121
|
-
navItems
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1115
|
+
navItems(_, $el) {
|
|
1116
|
+
return util.$$(this.selNavItem, $el);
|
|
1117
|
+
}
|
|
1118
|
+
},
|
|
1119
|
+
watch: {
|
|
1120
|
+
nav(nav, prev) {
|
|
1121
|
+
util.attr(nav, "role", "tablist");
|
|
1122
|
+
if (prev) {
|
|
1126
1123
|
this.$emit();
|
|
1127
1124
|
}
|
|
1125
|
+
},
|
|
1126
|
+
list(list) {
|
|
1127
|
+
util.attr(list, "role", "presentation");
|
|
1128
|
+
},
|
|
1129
|
+
navChildren(children2) {
|
|
1130
|
+
util.attr(children2, "role", "presentation");
|
|
1131
|
+
},
|
|
1132
|
+
navItems(items) {
|
|
1133
|
+
for (const el of items) {
|
|
1134
|
+
const cmd = util.data(el, this.attrItem);
|
|
1135
|
+
const button = util.$("a,button", el) || el;
|
|
1136
|
+
let ariaLabel;
|
|
1137
|
+
let ariaControls = null;
|
|
1138
|
+
if (util.isNumeric(cmd)) {
|
|
1139
|
+
const item = util.toNumber(cmd);
|
|
1140
|
+
const slide = this.slides[item];
|
|
1141
|
+
if (slide) {
|
|
1142
|
+
if (!slide.id) {
|
|
1143
|
+
slide.id = generateId(this, slide, `-item-${cmd}`);
|
|
1144
|
+
}
|
|
1145
|
+
ariaControls = slide.id;
|
|
1146
|
+
}
|
|
1147
|
+
ariaLabel = this.t("slideX", util.toFloat(cmd) + 1);
|
|
1148
|
+
util.attr(button, "role", "tab");
|
|
1149
|
+
} else {
|
|
1150
|
+
if (this.list) {
|
|
1151
|
+
if (!this.list.id) {
|
|
1152
|
+
this.list.id = generateId(this, this.list, "-items");
|
|
1153
|
+
}
|
|
1154
|
+
ariaControls = this.list.id;
|
|
1155
|
+
}
|
|
1156
|
+
ariaLabel = this.t(cmd);
|
|
1157
|
+
}
|
|
1158
|
+
util.attr(button, {
|
|
1159
|
+
"aria-controls": ariaControls,
|
|
1160
|
+
"aria-label": util.attr(button, "aria-label") || ariaLabel
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
slides(slides) {
|
|
1165
|
+
slides.forEach(
|
|
1166
|
+
(slide, i) => util.attr(slide, {
|
|
1167
|
+
role: this.nav ? "tabpanel" : "group",
|
|
1168
|
+
"aria-label": this.t("slideLabel", i + 1, this.length),
|
|
1169
|
+
"aria-roledescription": this.nav ? null : "slide"
|
|
1170
|
+
})
|
|
1171
|
+
);
|
|
1172
|
+
},
|
|
1173
|
+
length(length) {
|
|
1174
|
+
const navLength = this.navChildren.length;
|
|
1175
|
+
if (this.nav && length !== navLength) {
|
|
1176
|
+
util.empty(this.nav);
|
|
1177
|
+
for (let i = 0; i < length; i++) {
|
|
1178
|
+
util.append(this.nav, `<li ${this.attrItem}="${i}"><a href></a></li>`);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1128
1181
|
}
|
|
1129
1182
|
},
|
|
1130
1183
|
connected() {
|
|
@@ -1134,54 +1187,6 @@
|
|
|
1134
1187
|
});
|
|
1135
1188
|
},
|
|
1136
1189
|
update: [
|
|
1137
|
-
{
|
|
1138
|
-
write() {
|
|
1139
|
-
this.slides.forEach(
|
|
1140
|
-
(slide, i) => util.attr(slide, {
|
|
1141
|
-
role: this.nav ? "tabpanel" : "group",
|
|
1142
|
-
"aria-label": this.t("slideLabel", i + 1, this.length),
|
|
1143
|
-
"aria-roledescription": this.nav ? null : "slide"
|
|
1144
|
-
})
|
|
1145
|
-
);
|
|
1146
|
-
if (this.nav && this.length !== this.nav.children.length) {
|
|
1147
|
-
util.html(
|
|
1148
|
-
this.nav,
|
|
1149
|
-
this.slides.map((_, i) => `<li ${this.attrItem}="${i}"><a href></a></li>`).join("")
|
|
1150
|
-
);
|
|
1151
|
-
}
|
|
1152
|
-
util.attr(util.children(this.nav).concat(this.list), "role", "presentation");
|
|
1153
|
-
for (const el of this.navItems) {
|
|
1154
|
-
const cmd = util.data(el, this.attrItem);
|
|
1155
|
-
const button = util.$("a,button", el) || el;
|
|
1156
|
-
let ariaLabel;
|
|
1157
|
-
let ariaControls = null;
|
|
1158
|
-
if (util.isNumeric(cmd)) {
|
|
1159
|
-
const item = util.toNumber(cmd);
|
|
1160
|
-
const slide = this.slides[item];
|
|
1161
|
-
if (slide) {
|
|
1162
|
-
if (!slide.id) {
|
|
1163
|
-
slide.id = generateId(this, slide, `-item-${cmd}`);
|
|
1164
|
-
}
|
|
1165
|
-
ariaControls = slide.id;
|
|
1166
|
-
}
|
|
1167
|
-
ariaLabel = this.t("slideX", util.toFloat(cmd) + 1);
|
|
1168
|
-
util.attr(button, "role", "tab");
|
|
1169
|
-
} else {
|
|
1170
|
-
if (this.list) {
|
|
1171
|
-
if (!this.list.id) {
|
|
1172
|
-
this.list.id = generateId(this, this.list, "-items");
|
|
1173
|
-
}
|
|
1174
|
-
ariaControls = this.list.id;
|
|
1175
|
-
}
|
|
1176
|
-
ariaLabel = this.t(cmd);
|
|
1177
|
-
}
|
|
1178
|
-
util.attr(button, {
|
|
1179
|
-
"aria-controls": ariaControls,
|
|
1180
|
-
"aria-label": util.attr(button, "aria-label") || ariaLabel
|
|
1181
|
-
});
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
},
|
|
1185
1190
|
{
|
|
1186
1191
|
write() {
|
|
1187
1192
|
this.navItems.concat(this.nav).forEach((el) => el && (el.hidden = !this.maxIndex));
|
|
@@ -1519,18 +1524,20 @@
|
|
|
1519
1524
|
maxIndex() {
|
|
1520
1525
|
return this.length - 1;
|
|
1521
1526
|
},
|
|
1522
|
-
slides
|
|
1523
|
-
|
|
1524
|
-
return util.children(this.list);
|
|
1525
|
-
},
|
|
1526
|
-
watch() {
|
|
1527
|
-
this.$emit();
|
|
1528
|
-
}
|
|
1527
|
+
slides() {
|
|
1528
|
+
return util.children(this.list);
|
|
1529
1529
|
},
|
|
1530
1530
|
length() {
|
|
1531
1531
|
return this.slides.length;
|
|
1532
1532
|
}
|
|
1533
1533
|
},
|
|
1534
|
+
watch: {
|
|
1535
|
+
slides(slides, prev) {
|
|
1536
|
+
if (prev) {
|
|
1537
|
+
this.$emit();
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1534
1541
|
observe: resize(),
|
|
1535
1542
|
methods: {
|
|
1536
1543
|
show(index, force = false) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.10 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,y){typeof exports=="object"&&typeof module<"u"?module.exports=y(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],y):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox_panel=y(s.UIkit.util))})(this,function(s){"use strict";var y={slide:{show(t){return[{transform:S(t*-100)},{transform:S()}]},percent(t){return yt(t)},translate(t,e){return[{transform:S(e*-100*t)},{transform:S(e*100*(1-t))}]}}};function yt(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function S(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function _(t){return`scale3d(${t}, ${t}, 1)`}var et={...y,fade:{show(){return[{opacity:0},{opacity:1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t},{opacity:t}]}},scale:{show(){return[{opacity:0,transform:_(1-.2)},{opacity:1,transform:_(1)}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:_(1-.2*t)},{opacity:t,transform:_(1-.2+.2*t)}]}}},kt={connected(){s.addClass(this.$el,this.$options.id)}},It={props:{container:Boolean},data:{container:!0},computed:{container({container:t}){return t===!0&&this.$container||t&&s.$(t)}}},Ct={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:t}){return!!t[0]},hasTransition({animation:t}){return["slide","reveal"].some(e=>s.startsWith(t[0],e))}},methods:{toggleElement(t,e,i){return new Promise(n=>Promise.all(s.toNodes(t).map(r=>{const o=s.isBoolean(e)?e:!this.isToggled(r);if(!s.trigger(r,`before${o?"show":"hide"}`,[this]))return Promise.reject();const a=(s.isFunction(i)?i:i===!1||!this.hasAnimation?At:this.hasTransition?Tt:Et)(r,o,this),h=o?this.clsEnter:this.clsLeave;s.addClass(r,h),s.trigger(r,o?"show":"hide",[this]);const l=()=>{s.removeClass(r,h),s.trigger(r,o?"shown":"hidden",[this])};return a?a.then(l,()=>(s.removeClass(r,h),Promise.reject())):l()})).then(n,s.noop))},isToggled(t=this.$el){return[t]=s.toNodes(t),s.hasClass(t,this.clsEnter)?!0:s.hasClass(t,this.clsLeave)?!1:this.cls?s.hasClass(t,this.cls.split(" ")[0]):s.isVisible(t)},_toggle(t,e){if(!t)return;e=!!e;let i;this.cls?(i=s.includes(this.cls," ")||e!==s.hasClass(t,this.cls),i&&s.toggleClass(t,this.cls,s.includes(this.cls," ")?void 0:e)):(i=e===t.hidden,i&&(t.hidden=!e)),s.$$("[autofocus]",t).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),i&&s.trigger(t,"toggled",[e,this])}}};function At(t,e,{_toggle:i}){return s.Animation.cancel(t),s.Transition.cancel(t),i(t,e)}async function Tt(t,e,{animation:i,duration:n,velocity:r,transition:o,_toggle:a}){var h;const[l="reveal",c="top"]=((h=i[0])==null?void 0:h.split("-"))||[],d=[["left","right"],["top","bottom"]],u=d[s.includes(d[0],c)?0:1],w=u[1]===c,L=["width","height"][d.indexOf(u)],I=`margin-${u[0]}`,M=`margin-${c}`;let E=s.dimensions(t)[L];const Se=s.Transition.inProgress(t);await s.Transition.cancel(t),e&&a(t,!0);const _e=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",I,M].map($t=>[$t,t.style[$t]])),N=s.dimensions(t),tt=s.toFloat(s.css(t,I)),bt=s.toFloat(s.css(t,M)),$=N[L]+bt;!Se&&!e&&(E+=bt);const[F]=s.wrapInner(t,"<div>");s.css(F,{boxSizing:"border-box",height:N.height,width:N.width,...s.css(t,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",M])}),s.css(t,{padding:0,border:0,minWidth:0,minHeight:0,[M]:0,width:N.width,height:N.height,overflow:"hidden",[L]:E});const wt=E/$;n=(r*$+n)*(e?1-wt:wt);const xt={[L]:e?$:0};w&&(s.css(t,I,$-E+tt),xt[I]=e?tt:$+tt),!w^l==="reveal"&&(s.css(F,I,-$+E),s.Transition.start(F,{[I]:e?0:-$},n,o));try{await s.Transition.start(t,xt,n,o)}finally{s.css(t,_e),s.unwrap(F.firstChild),e||a(t,!1)}}function Et(t,e,i){s.Animation.cancel(t);const{animation:n,duration:r,_toggle:o}=i;return e?(o(t,!0),s.Animation.in(t,n[0],r,i.origin)):s.Animation.out(t,n[1]||n[0],r,i.origin).then(()=>o(t,!1))}const Nt=/\B([A-Z])/g,St=k(t=>t.replace(Nt,"-$1").toLowerCase()),z=k(t=>t.charAt(0).toUpperCase()+t.slice(1));function st(t,e){var i;return(i=t==null?void 0:t.startsWith)==null?void 0:i.call(t,e)}function _t(t,e){var i;return(i=t==null?void 0:t.includes)==null?void 0:i.call(t,e)}function Pt(t,e){var i;return(i=t==null?void 0:t.findIndex)==null?void 0:i.call(t,e)}const{isArray:W,from:Pe}=Array;function R(t){return typeof t=="function"}function P(t){return t!==null&&typeof t=="object"}function C(t){return P(t)&&t===t.window}function it(t){return U(t)===9}function nt(t){return U(t)>=1}function H(t){return U(t)===1}function U(t){return!C(t)&&P(t)&&t.nodeType}function x(t){return typeof t=="string"}function rt(t){return typeof t=="number"}function Dt(t){return rt(t)||x(t)&&!isNaN(t-parseFloat(t))}function j(t){return t===void 0}function v(t){return parseFloat(t)||0}function g(t){return m(t)[0]}function m(t){return nt(t)?[t]:Array.from(t||[]).filter(nt)}function V(t){if(C(t))return t;t=g(t);const e=it(t)?t:t==null?void 0:t.ownerDocument;return(e==null?void 0:e.defaultView)||window}function ot(t,e){for(const i in t)if(e(t[i],i)===!1)return!1;return!0}function Ot(t,e){return t.reduce((i,n)=>i+v(R(e)?e(n):n[e]),0)}function k(t){const e=Object.create(null);return i=>e[i]||(e[i]=t(i))}function q(t,e,i){var n;if(P(e)){for(const r in e)q(t,r,e[r]);return}if(j(i))return(n=g(t))==null?void 0:n.getAttribute(e);for(const r of m(t))R(i)&&(i=i.call(r,q(r,e))),i===null?Bt(r,e):r.setAttribute(e,i)}function Bt(t,e){m(t).forEach(i=>i.removeAttribute(e))}function X(t){var e;return(e=g(t))==null?void 0:e.parentElement}function Lt(t,e){return m(t).filter(i=>D(i,e))}function D(t,e){return m(t).some(i=>i.matches(e))}function O(t,e){return H(t)?t.closest(st(e,">")?e.slice(1):e):m(t).map(i=>O(i,e)).filter(Boolean)}function Mt(t,e){return x(e)?!!O(t,e):g(e).contains(g(t))}function Ft(t,e){const i=[];for(;t=X(t);)(!e||D(t,e))&&i.push(t);return i}function zt(t,e){t=g(t);const i=t?m(t.children):[];return e?Lt(i,e):i}function Wt(t,e){return e?m(t).indexOf(g(e)):zt(X(t)).indexOf(t)}function at(t,e){return m(Vt(t,g(e),"querySelectorAll"))}const Rt=/(^|[^\\],)\s*[!>+~-]/,Ht=k(t=>t.match(Rt)),Ut=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,jt=k(t=>t.replace(Ut,"$1 *"));function Vt(t,e=document,i){if(!t||!x(t))return t;if(t=jt(t),Ht(t)){const n=Xt(t);t="";for(let r of n){let o=e;if(r[0]==="!"){const a=r.substr(1).trim().split(" ");if(o=O(X(e),a[0]),r=a.slice(1).join(" ").trim(),!r.length&&n.length===1)return o}if(r[0]==="-"){const a=r.substr(1).trim().split(" "),h=(o||e).previousElementSibling;o=D(h,r.substr(1))?h:null,r=a.slice(1).join(" ")}o&&(t+=`${t?",":""}${Yt(o)} ${r}`)}e=document}try{return e[i](t)}catch{return null}}const qt=/.*?[^\\](?:,|$)/g,Xt=k(t=>t.match(qt).map(e=>e.replace(/,$/,"").trim()));function Yt(t){const e=[];for(;t.parentNode;){const i=q(t,"id");if(i){e.unshift(`#${Gt(i)}`);break}else{let{tagName:n}=t;n!=="HTML"&&(n+=`:nth-child(${Wt(t)+1})`),e.unshift(n),t=t.parentNode}}return e.join(" > ")}function Gt(t){return x(t)?CSS.escape(t):""}function Jt(...t){let[e,i,n,r,o=!1]=ht(t);r.length>1&&(r=Qt(r)),o!=null&&o.self&&(r=te(r)),n&&(r=Kt(n,r));for(const a of i)for(const h of e)h.addEventListener(a,r,o);return()=>Zt(e,i,r,o)}function Zt(...t){let[e,i,,n,r=!1]=ht(t);for(const o of i)for(const a of e)a.removeEventListener(o,n,r)}function ht(t){return t[0]=se(t[0]),x(t[1])&&(t[1]=t[1].split(" ")),R(t[2])&&t.splice(2,0,!1),t}function Kt(t,e){return i=>{const n=t[0]===">"?at(t,i.currentTarget).reverse().filter(r=>Mt(i.target,r))[0]:O(i.target,t);n&&(i.current=n,e.call(this,i),delete i.current)}}function Qt(t){return e=>W(e.detail)?t(e,...e.detail):t(e)}function te(t){return function(e){if(e.target===e.currentTarget||e.target===e.current)return t.call(null,e)}}function ct(t){return t&&"addEventListener"in t}function ee(t){return ct(t)?t:g(t)}function se(t){return W(t)?t.map(ee).filter(Boolean):x(t)?at(t):ct(t)?[t]:m(t)}const ie={"animation-iteration-count":!0,"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,widows:!0,"z-index":!0,zoom:!0};function f(t,e,i,n){const r=m(t);for(const o of r)if(x(e)){if(e=ne(e),j(i))return getComputedStyle(o).getPropertyValue(e);o.style.setProperty(e,Dt(i)&&!ie[e]?`${i}px`:i||rt(i)?i:"",n)}else if(W(e)){const a={};for(const h of e)a[h]=f(o,h);return a}else P(e)&&(n=i,ot(e,(a,h)=>f(o,h,a,n)));return r[0]}const ne=k(t=>re(t));function re(t){if(st(t,"--"))return t;t=St(t);const{style:e}=document.documentElement;if(t in e)return t;for(const i of["webkit","moz"]){const n=`-${i}-${t}`;if(n in e)return n}}const Y={width:["left","right"],height:["top","bottom"]};function oe(t){const e=H(t)?g(t).getBoundingClientRect():{height:he(t),width:dt(t),top:0,left:0};return{height:e.height,width:e.width,top:e.top,left:e.left,bottom:e.top+e.height,right:e.left+e.width}}function G(t,e){const i=oe(t);if(t){const{scrollY:r,scrollX:o}=V(t),a={height:r,width:o};for(const h in Y)for(const l of Y[h])i[l]+=a[h]}if(!e)return i;const n=f(t,"position");ot(f(t,["left","top"]),(r,o)=>f(t,o,e[o]-i[o]+v(n==="absolute"&&r==="auto"?ae(t)[o]:r)))}function ae(t){let{top:e,left:i}=G(t);const{ownerDocument:{body:n,documentElement:r},offsetParent:o}=g(t);let a=o||r;for(;a&&(a===n||a===r)&&f(a,"position")==="static";)a=a.parentNode;if(H(a)){const h=G(a);e-=h.top+v(f(a,"borderTopWidth")),i-=h.left+v(f(a,"borderLeftWidth"))}return{top:e-v(f(t,"marginTop")),left:i-v(f(t,"marginLeft"))}}const he=lt("height"),dt=lt("width");function lt(t){const e=z(t);return(i,n)=>{if(j(n)){if(C(i))return i[`inner${e}`];if(it(i)){const r=i.documentElement;return Math.max(r[`offset${e}`],r[`scroll${e}`])}return i=g(i),n=f(i,t),n=n==="auto"?i[`offset${e}`]:v(n)||0,n-ft(i,t)}else return f(i,t,!n&&n!==0?"":+n+ft(i,t)+"px")}}function ft(t,e,i="border-box"){return f(t,"boxSizing")===i?Ot(Y[e].map(z),n=>v(f(t,`padding${n}`))+v(f(t,`border${n}Width`))):0}function ce(t,e=!1,i=[]){const n=ut(t);let r=Ft(t).reverse();r=r.slice(r.indexOf(n)+1);const o=Pt(r,a=>f(a,"position")==="fixed");return~o&&(r=r.slice(o)),[n].concat(r.filter(a=>f(a,"overflow").split(" ").some(h=>_t(["auto","scroll",...i],h))&&(!e||a.scrollHeight>de(a).height))).reverse()}function de(t){const e=V(t),{visualViewport:i,document:{documentElement:n}}=e;let r=t===ut(t)?e:t;if(C(r)&&i){let{height:a,width:h,scale:l,pageTop:c,pageLeft:d}=i;return a=Math.round(a*l),h=Math.round(h*l),{height:a,width:h,top:c,left:d,bottom:c+a,right:d+h}}let o=G(r);if(f(r,"display")==="inline")return o;for(let[a,h,l,c]of[["width","x","left","right"],["height","y","top","bottom"]])C(r)?r=n:o[l]+=v(f(r,`border-${l}-width`)),o[a]=o[h]=r[`client${z(a)}`],o[c]=o[a]+o[l];return o}function ut(t){return V(t).document.scrollingElement}let J;function le(t){const e=Jt(t,"touchmove",n=>{if(n.targetTouches.length!==1||D(n.target,'input[type="range"'))return;let[{scrollHeight:r,clientHeight:o}]=ce(n.target);o>=r&&n.cancelable&&n.preventDefault()},{passive:!1});if(J)return e;J=!0;const{scrollingElement:i}=document;return f(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:dt(window)-i.clientWidth||""}),()=>{J=!1,e(),f(i,{overflowY:"",touchAction:"",paddingRight:""})}}const p=[];var fe={mixins:[kt,It,Ct],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel({selPanel:t},e){return s.$(t,e)},transitionElement(){return this.panel},bgClose({bgClose:t}){return t&&this.panel}},connected(){s.attr(this.panel||this.$el,"role",this.role),this.overlay&&s.attr(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){s.includes(p,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(t){const{current:e,defaultPrevented:i}=t,{hash:n}=e;!i&&n&&s.isSameSiteAnchor(e)&&!s.within(n,this.$el)&&s.$(n,document.body)?this.hide():s.matches(e,this.selClose)&&(t.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(t){t.defaultPrevented||(t.preventDefault(),this.isToggled()===s.includes(p,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(t){if(s.includes(p,this))return!1;!this.stack&&p.length?(Promise.all(p.map(e=>e.hide())).then(this.show),t.preventDefault()):p.push(this)}},{name:"show",self:!0,handler(){this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+p.length);const t=[this.overlay&&pe(this),this.overlay&&le(this.$el),this.bgClose&&ge(this),this.escClose&&me(this)];s.once(this.$el,"hidden",()=>t.forEach(e=>e&&e()),{self:!0}),s.addClass(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.matches(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(p,this)&&p.splice(p.indexOf(this),1),s.css(this.$el,"zIndex",""),p.some(t=>t.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(t=>requestAnimationFrame(()=>this.show().then(t)))):this.toggleElement(this.$el,!0,pt)},hide(){return this.toggleElement(this.$el,!1,pt)}}};function pt(t,e,{transitionElement:i,_toggle:n}){return new Promise((r,o)=>s.once(t,"show hide",()=>{var a;(a=t._reject)==null||a.call(t),t._reject=o,n(t,e);const h=s.once(i,"transitionstart",()=>{s.once(i,"transitionend transitioncancel",r,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{h(),r()},ue(s.css(i,"transitionDuration")))})).then(()=>delete t._reject)}function ue(t){return t?s.endsWith(t,"ms")?s.toFloat(t):s.toFloat(t)*1e3:0}function pe(t){return s.on(document,"focusin",e=>{s.last(p)===t&&!s.within(e.target,t.$el)&&t.$el.focus()})}function ge(t){return s.on(document,s.pointerDown,({target:e})=>{s.last(p)!==t||t.overlay&&!s.within(e,t.$el)||s.within(e,t.panel)||s.once(document,`${s.pointerUp} ${s.pointerCancel} scroll`,({defaultPrevented:i,type:n,target:r})=>{!i&&n===s.pointerUp&&e===r&&t.hide()},!0)})}function me(t){return s.on(document,"keydown",e=>{e.keyCode===27&&s.last(p)===t&&t.hide()})}function ve(t,e,i,{animation:n,easing:r}){const{percent:o,translate:a,show:h=s.noop}=n,l=h(i),c=new s.Deferred;return{dir:i,show(d,u=0,w){const T=w?"linear":r;return d-=Math.round(d*s.clamp(u,-1,1)),this.translate(u),B(e,"itemin",{percent:u,duration:d,timing:T,dir:i}),B(t,"itemout",{percent:1-u,duration:d,timing:T,dir:i}),Promise.all([s.Transition.start(e,l[1],d,T),s.Transition.start(t,l[0],d,T)]).then(()=>{this.reset(),c.resolve()},s.noop),c.promise},cancel(){s.Transition.cancel([e,t])},reset(){for(const d in l[0])s.css([e,t],d,"")},forward(d,u=this.percent()){return s.Transition.cancel([e,t]),this.show(d,u,!0)},translate(d){this.reset();const u=a(d,i);s.css(e,u[1]),s.css(t,u[0]),B(e,"itemtranslatein",{percent:d,dir:i}),B(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return o(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function B(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}var be={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,r;let o=0;return((r=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:r.replace(/%s/g,()=>e[o++]||""))||""}}};const b={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function Z(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return s.$(`#${n}`)&&(n=Z(t,e,`${i}-2`)),n}var we={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:{get({selNav:t},e){return s.$(t,e)},watch(t,e){s.attr(t,"role","tablist"),e&&this.$emit()},immediate:!0},selNavItem({attrItem:t}){return`[${t}],[data-${t}]`},navItems:{get(t,e){return s.$$(this.selNavItem,e)},watch(){this.$emit()}}},connected(){s.attr(this.$el,{role:this.role,ariaRoleDescription:"carousel"})},update:[{write(){this.slides.forEach((t,e)=>s.attr(t,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",e+1,this.length),"aria-roledescription":this.nav?null:"slide"})),this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((t,e)=>`<li ${this.attrItem}="${e}"><a href></a></li>`).join("")),s.attr(s.children(this.nav).concat(this.list),"role","presentation");for(const t of this.navItems){const e=s.data(t,this.attrItem),i=s.$("a,button",t)||t;let n,r=null;if(s.isNumeric(e)){const o=s.toNumber(e),a=this.slides[o];a&&(a.id||(a.id=Z(this,a,`-item-${e}`)),r=a.id),n=this.t("slideX",s.toFloat(e)+1),s.attr(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=Z(this,this.list,"-items")),r=this.list.id),n=this.t(e);s.attr(i,{"aria-controls":r,"aria-label":s.attr(i,"aria-label")||n})}}},{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===b.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 r=i===b.HOME?0:i===b.END?"last":i===b.LEFT?"previous":i===b.RIGHT?"next":-1;~r&&(t.preventDefault(),this.show(r))}}],methods:{updateNav(){const t=this.getValidIndex();let e,i;for(const n of this.navItems){const r=s.data(n,this.attrItem),o=s.$("a,button",n)||n;if(s.isNumeric(r)){const h=s.toNumber(r)===t;s.toggleClass(n,this.clsActive,h),s.attr(o,{"aria-selected":h,tabindex:h?null:-1}),h&&(i=o),e=e||s.matches(o,":focus")}else s.toggleClass(n,"uk-invisible",this.finite&&(r==="previous"&&t===0||r==="next"&&t>=this.maxIndex));e&&i&&i.focus()}}}};const K={passive:!1,capture:!0},gt={passive:!0,capture:!0},xe="touchstart mousedown",Q="touchmove mousemove",mt="touchend touchcancel mouseup click input scroll";var $e={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:xe,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&ye(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:Q,el(){return this.list},handler:s.noop,...K}],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,Q,this.move,K),s.on(document,mt,this.end,gt),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;const{slides:i}=this;let{prevIndex:n}=this,r=Math.abs(e),o=this.getIndex(n+this.dir,n),a=this._getDistance(n,o)||i[n].offsetWidth;for(;o!==n&&r>a;)this.drag-=a*this.dir,n=o,r-=a,o=this.getIndex(n+this.dir,n),a=this._getDistance(n,o)||i[n].offsetWidth;this.percent=r/a;const h=i[n],l=i[o],c=this.index!==o,d=n===o;let u;[this.index,this.prevIndex].filter(w=>!s.includes([o,n],w)).forEach(w=>{s.trigger(i[w],"itemhidden",[this]),d&&(u=!0,this.prevIndex=n)}),(this.index===n&&this.prevIndex!==n||u)&&s.trigger(i[this.index],"itemshown",[this]),c&&(this.prevIndex=n,this.index=o,!d&&s.trigger(h,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&l),c&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,Q,this.move,K),s.off(document,mt,this.end,gt),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}}};function ye(t){return s.css(t,"userSelect")!=="none"&&s.toNodes(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}var ke={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)}}};function Ie(t){return Ce(s.observeResize,t,"resize")}function Ce(t,e,i){return{observe:t,handler(){this.$emit(i)},...e}}var Ae={mixins:[ke,$e,we,be],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){return Ee(e.offsetWidth/t)},list({selList:t},e){return s.$(t,e)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit()}},length(){return this.slides.length}},observe:Ie(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,r=e?0:n.length,o=()=>{n.splice(r,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 a=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[a],l=this.getIndex(t,this.index),c=this.slides[l];if(h===c){o();return}if(this.dir=Te(t,a),this.prevIndex=a,this.index=l,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,o();return}const d=this._show(h,c,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(c,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"itemhide",[this]),s.trigger(c,"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)},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_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 Te(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function Ee(t){return .5*t+300}var Ne={mixins:[Ae],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:ve},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)}}},vt={mixins:[fe,Ne],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:et,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const t=s.$(this.template),e=s.$(this.selList,t);this.items.forEach(()=>s.append(e,"<li>"));const i=s.$("[uk-close]",t),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(s.append(this.container,t))},computed:{caption({selCaption:t},e){return s.$(t,e)}},events:[{name:`${s.pointerMove} ${s.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(t){t.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler({keyCode:t}){if(!this.isToggled(this.$el)||!this.draggable)return;let e=-1;t===b.LEFT?e="previous":t===b.RIGHT?e="next":t===b.HOME?e=0:t===b.END&&(e="last"),~e&&this.show(e)}},{name:"beforeitemshow",handler(t){this.isToggled()||(this.draggable=!1,t.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=et.scale,s.removeClass(t.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let t=-this.preload;t<=this.preload;t++)this.loadItem(this.index+t)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(t,e){const{source:i,type:n,alt:r="",poster:o,attrs:a={}}=e;if(this.setItem(e,"<span uk-spinner></span>"),!i)return;let h;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(n==="image"||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const c=A("img",{src:i,alt:r,...a});s.on(c,"load",()=>this.setItem(e,c)),s.on(c,"error",()=>this.setError(e))}else if(n==="video"||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=A("video",{src:i,poster:o,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`,...a});s.on(c,"loadedmetadata",()=>this.setItem(e,c)),s.on(c,"error",()=>this.setError(e))}else if(n==="iframe"||i.match(/\.(html|php)($|\?)/i))this.setItem(e,A("iframe",{src:i,allowfullscreen:"",class:"uk-lightbox-iframe",...a}));else if(h=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(e,A("iframe",{src:`https://www.youtube${h[1]||""}.com/embed/${h[2]}${h[3]?`?${h[3]}`:""}`,width:1920,height:1080,...l,...a}));else if(h=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:d}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`,{credentials:"omit"})).json();this.setItem(e,A("iframe",{src:`https://player.vimeo.com/video/${h[1]}${h[2]?`?${h[2]}`:""}`,width:d,height:c,...l,...a}))}catch{this.setError(e)}}}],methods:{loadItem(t=this.index){const e=this.getItem(t);this.getSlide(e).childElementCount||s.trigger(this.$el,"itemload",[e])},getItem(t=this.index){return this.items[s.getIndex(t,this.slides)]},setItem(t,e){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(t),e)])},getSlide(t){return this.slides[this.items.indexOf(t)]},setError(t){this.setItem(t,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function A(t,e){const i=s.fragment(`<${t}>`);return s.attr(i,e),i}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",vt),vt});
|
|
1
|
+
/*! UIkit 3.16.11-dev.55a0fc5b5 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,y){typeof exports=="object"&&typeof module<"u"?module.exports=y(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],y):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox_panel=y(s.UIkit.util))})(this,function(s){"use strict";var y={slide:{show(t){return[{transform:S(t*-100)},{transform:S()}]},percent(t){return yt(t)},translate(t,e){return[{transform:S(e*-100*t)},{transform:S(e*100*(1-t))}]}}};function yt(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function S(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function _(t){return`scale3d(${t}, ${t}, 1)`}var et={...y,fade:{show(){return[{opacity:0},{opacity:1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t},{opacity:t}]}},scale:{show(){return[{opacity:0,transform:_(1-.2)},{opacity:1,transform:_(1)}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:_(1-.2*t)},{opacity:t,transform:_(1-.2+.2*t)}]}}},kt={connected(){s.addClass(this.$el,this.$options.id)}},It={props:{container:Boolean},data:{container:!0},computed:{container({container:t}){return t===!0&&this.$container||t&&s.$(t)}}},Ct={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:t}){return!!t[0]},hasTransition({animation:t}){return["slide","reveal"].some(e=>s.startsWith(t[0],e))}},methods:{toggleElement(t,e,i){return new Promise(n=>Promise.all(s.toNodes(t).map(r=>{const o=s.isBoolean(e)?e:!this.isToggled(r);if(!s.trigger(r,`before${o?"show":"hide"}`,[this]))return Promise.reject();const a=(s.isFunction(i)?i:i===!1||!this.hasAnimation?At:this.hasTransition?Tt:Et)(r,o,this),h=o?this.clsEnter:this.clsLeave;s.addClass(r,h),s.trigger(r,o?"show":"hide",[this]);const l=()=>{s.removeClass(r,h),s.trigger(r,o?"shown":"hidden",[this])};return a?a.then(l,()=>(s.removeClass(r,h),Promise.reject())):l()})).then(n,s.noop))},isToggled(t=this.$el){return[t]=s.toNodes(t),s.hasClass(t,this.clsEnter)?!0:s.hasClass(t,this.clsLeave)?!1:this.cls?s.hasClass(t,this.cls.split(" ")[0]):s.isVisible(t)},_toggle(t,e){if(!t)return;e=!!e;let i;this.cls?(i=s.includes(this.cls," ")||e!==s.hasClass(t,this.cls),i&&s.toggleClass(t,this.cls,s.includes(this.cls," ")?void 0:e)):(i=e===t.hidden,i&&(t.hidden=!e)),s.$$("[autofocus]",t).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),i&&s.trigger(t,"toggled",[e,this])}}};function At(t,e,{_toggle:i}){return s.Animation.cancel(t),s.Transition.cancel(t),i(t,e)}async function Tt(t,e,{animation:i,duration:n,velocity:r,transition:o,_toggle:a}){var h;const[l="reveal",c="top"]=((h=i[0])==null?void 0:h.split("-"))||[],d=[["left","right"],["top","bottom"]],u=d[s.includes(d[0],c)?0:1],w=u[1]===c,B=["width","height"][d.indexOf(u)],I=`margin-${u[0]}`,M=`margin-${c}`;let E=s.dimensions(t)[B];const Se=s.Transition.inProgress(t);await s.Transition.cancel(t),e&&a(t,!0);const _e=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",I,M].map($t=>[$t,t.style[$t]])),N=s.dimensions(t),tt=s.toFloat(s.css(t,I)),bt=s.toFloat(s.css(t,M)),$=N[B]+bt;!Se&&!e&&(E+=bt);const[F]=s.wrapInner(t,"<div>");s.css(F,{boxSizing:"border-box",height:N.height,width:N.width,...s.css(t,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",M])}),s.css(t,{padding:0,border:0,minWidth:0,minHeight:0,[M]:0,width:N.width,height:N.height,overflow:"hidden",[B]:E});const wt=E/$;n=(r*$+n)*(e?1-wt:wt);const xt={[B]:e?$:0};w&&(s.css(t,I,$-E+tt),xt[I]=e?tt:$+tt),!w^l==="reveal"&&(s.css(F,I,-$+E),s.Transition.start(F,{[I]:e?0:-$},n,o));try{await s.Transition.start(t,xt,n,o)}finally{s.css(t,_e),s.unwrap(F.firstChild),e||a(t,!1)}}function Et(t,e,i){s.Animation.cancel(t);const{animation:n,duration:r,_toggle:o}=i;return e?(o(t,!0),s.Animation.in(t,n[0],r,i.origin)):s.Animation.out(t,n[1]||n[0],r,i.origin).then(()=>o(t,!1))}const Nt=/\B([A-Z])/g,St=k(t=>t.replace(Nt,"-$1").toLowerCase()),z=k(t=>t.charAt(0).toUpperCase()+t.slice(1));function st(t,e){var i;return(i=t==null?void 0:t.startsWith)==null?void 0:i.call(t,e)}function _t(t,e){var i;return(i=t==null?void 0:t.includes)==null?void 0:i.call(t,e)}function Pt(t,e){var i;return(i=t==null?void 0:t.findIndex)==null?void 0:i.call(t,e)}const{isArray:W,from:Pe}=Array;function R(t){return typeof t=="function"}function P(t){return t!==null&&typeof t=="object"}function C(t){return P(t)&&t===t.window}function it(t){return U(t)===9}function nt(t){return U(t)>=1}function H(t){return U(t)===1}function U(t){return!C(t)&&P(t)&&t.nodeType}function x(t){return typeof t=="string"}function rt(t){return typeof t=="number"}function Dt(t){return rt(t)||x(t)&&!isNaN(t-parseFloat(t))}function j(t){return t===void 0}function v(t){return parseFloat(t)||0}function g(t){return m(t)[0]}function m(t){return nt(t)?[t]:Array.from(t||[]).filter(nt)}function V(t){if(C(t))return t;t=g(t);const e=it(t)?t:t==null?void 0:t.ownerDocument;return(e==null?void 0:e.defaultView)||window}function ot(t,e){for(const i in t)if(e(t[i],i)===!1)return!1;return!0}function Ot(t,e){return t.reduce((i,n)=>i+v(R(e)?e(n):n[e]),0)}function k(t){const e=Object.create(null);return i=>e[i]||(e[i]=t(i))}function q(t,e,i){var n;if(P(e)){for(const r in e)q(t,r,e[r]);return}if(j(i))return(n=g(t))==null?void 0:n.getAttribute(e);for(const r of m(t))R(i)&&(i=i.call(r,q(r,e))),i===null?Lt(r,e):r.setAttribute(e,i)}function Lt(t,e){m(t).forEach(i=>i.removeAttribute(e))}function X(t){var e;return(e=g(t))==null?void 0:e.parentElement}function Bt(t,e){return m(t).filter(i=>D(i,e))}function D(t,e){return m(t).some(i=>i.matches(e))}function O(t,e){return H(t)?t.closest(st(e,">")?e.slice(1):e):m(t).map(i=>O(i,e)).filter(Boolean)}function Mt(t,e){return x(e)?!!O(t,e):g(e).contains(g(t))}function Ft(t,e){const i=[];for(;t=X(t);)(!e||D(t,e))&&i.push(t);return i}function zt(t,e){t=g(t);const i=t?m(t.children):[];return e?Bt(i,e):i}function Wt(t,e){return e?m(t).indexOf(g(e)):zt(X(t)).indexOf(t)}function at(t,e){return m(Vt(t,g(e),"querySelectorAll"))}const Rt=/(^|[^\\],)\s*[!>+~-]/,Ht=k(t=>t.match(Rt)),Ut=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,jt=k(t=>t.replace(Ut,"$1 *"));function Vt(t,e=document,i){if(!t||!x(t))return t;if(t=jt(t),Ht(t)){const n=Xt(t);t="";for(let r of n){let o=e;if(r[0]==="!"){const a=r.substr(1).trim().split(" ");if(o=O(X(e),a[0]),r=a.slice(1).join(" ").trim(),!r.length&&n.length===1)return o}if(r[0]==="-"){const a=r.substr(1).trim().split(" "),h=(o||e).previousElementSibling;o=D(h,r.substr(1))?h:null,r=a.slice(1).join(" ")}o&&(t+=`${t?",":""}${Yt(o)} ${r}`)}e=document}try{return e[i](t)}catch{return null}}const qt=/.*?[^\\](?:,|$)/g,Xt=k(t=>t.match(qt).map(e=>e.replace(/,$/,"").trim()));function Yt(t){const e=[];for(;t.parentNode;){const i=q(t,"id");if(i){e.unshift(`#${Gt(i)}`);break}else{let{tagName:n}=t;n!=="HTML"&&(n+=`:nth-child(${Wt(t)+1})`),e.unshift(n),t=t.parentNode}}return e.join(" > ")}function Gt(t){return x(t)?CSS.escape(t):""}function Jt(...t){let[e,i,n,r,o=!1]=ht(t);r.length>1&&(r=Qt(r)),o!=null&&o.self&&(r=te(r)),n&&(r=Kt(n,r));for(const a of i)for(const h of e)h.addEventListener(a,r,o);return()=>Zt(e,i,r,o)}function Zt(...t){let[e,i,,n,r=!1]=ht(t);for(const o of i)for(const a of e)a.removeEventListener(o,n,r)}function ht(t){return t[0]=se(t[0]),x(t[1])&&(t[1]=t[1].split(" ")),R(t[2])&&t.splice(2,0,!1),t}function Kt(t,e){return i=>{const n=t[0]===">"?at(t,i.currentTarget).reverse().filter(r=>Mt(i.target,r))[0]:O(i.target,t);n&&(i.current=n,e.call(this,i),delete i.current)}}function Qt(t){return e=>W(e.detail)?t(e,...e.detail):t(e)}function te(t){return function(e){if(e.target===e.currentTarget||e.target===e.current)return t.call(null,e)}}function ct(t){return t&&"addEventListener"in t}function ee(t){return ct(t)?t:g(t)}function se(t){return W(t)?t.map(ee).filter(Boolean):x(t)?at(t):ct(t)?[t]:m(t)}const ie={"animation-iteration-count":!0,"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,widows:!0,"z-index":!0,zoom:!0};function f(t,e,i,n){const r=m(t);for(const o of r)if(x(e)){if(e=ne(e),j(i))return getComputedStyle(o).getPropertyValue(e);o.style.setProperty(e,Dt(i)&&!ie[e]?`${i}px`:i||rt(i)?i:"",n)}else if(W(e)){const a={};for(const h of e)a[h]=f(o,h);return a}else P(e)&&(n=i,ot(e,(a,h)=>f(o,h,a,n)));return r[0]}const ne=k(t=>re(t));function re(t){if(st(t,"--"))return t;t=St(t);const{style:e}=document.documentElement;if(t in e)return t;for(const i of["webkit","moz"]){const n=`-${i}-${t}`;if(n in e)return n}}const Y={width:["left","right"],height:["top","bottom"]};function oe(t){const e=H(t)?g(t).getBoundingClientRect():{height:he(t),width:dt(t),top:0,left:0};return{height:e.height,width:e.width,top:e.top,left:e.left,bottom:e.top+e.height,right:e.left+e.width}}function G(t,e){const i=oe(t);if(t){const{scrollY:r,scrollX:o}=V(t),a={height:r,width:o};for(const h in Y)for(const l of Y[h])i[l]+=a[h]}if(!e)return i;const n=f(t,"position");ot(f(t,["left","top"]),(r,o)=>f(t,o,e[o]-i[o]+v(n==="absolute"&&r==="auto"?ae(t)[o]:r)))}function ae(t){let{top:e,left:i}=G(t);const{ownerDocument:{body:n,documentElement:r},offsetParent:o}=g(t);let a=o||r;for(;a&&(a===n||a===r)&&f(a,"position")==="static";)a=a.parentNode;if(H(a)){const h=G(a);e-=h.top+v(f(a,"borderTopWidth")),i-=h.left+v(f(a,"borderLeftWidth"))}return{top:e-v(f(t,"marginTop")),left:i-v(f(t,"marginLeft"))}}const he=lt("height"),dt=lt("width");function lt(t){const e=z(t);return(i,n)=>{if(j(n)){if(C(i))return i[`inner${e}`];if(it(i)){const r=i.documentElement;return Math.max(r[`offset${e}`],r[`scroll${e}`])}return i=g(i),n=f(i,t),n=n==="auto"?i[`offset${e}`]:v(n)||0,n-ft(i,t)}else return f(i,t,!n&&n!==0?"":+n+ft(i,t)+"px")}}function ft(t,e,i="border-box"){return f(t,"boxSizing")===i?Ot(Y[e].map(z),n=>v(f(t,`padding${n}`))+v(f(t,`border${n}Width`))):0}function ce(t,e=!1,i=[]){const n=ut(t);let r=Ft(t).reverse();r=r.slice(r.indexOf(n)+1);const o=Pt(r,a=>f(a,"position")==="fixed");return~o&&(r=r.slice(o)),[n].concat(r.filter(a=>f(a,"overflow").split(" ").some(h=>_t(["auto","scroll",...i],h))&&(!e||a.scrollHeight>de(a).height))).reverse()}function de(t){const e=V(t),{visualViewport:i,document:{documentElement:n}}=e;let r=t===ut(t)?e:t;if(C(r)&&i){let{height:a,width:h,scale:l,pageTop:c,pageLeft:d}=i;return a=Math.round(a*l),h=Math.round(h*l),{height:a,width:h,top:c,left:d,bottom:c+a,right:d+h}}let o=G(r);if(f(r,"display")==="inline")return o;for(let[a,h,l,c]of[["width","x","left","right"],["height","y","top","bottom"]])C(r)?r=n:o[l]+=v(f(r,`border-${l}-width`)),o[a]=o[h]=r[`client${z(a)}`],o[c]=o[a]+o[l];return o}function ut(t){return V(t).document.scrollingElement}let J;function le(t){const e=Jt(t,"touchmove",n=>{if(n.targetTouches.length!==1||D(n.target,'input[type="range"'))return;let[{scrollHeight:r,clientHeight:o}]=ce(n.target);o>=r&&n.cancelable&&n.preventDefault()},{passive:!1});if(J)return e;J=!0;const{scrollingElement:i}=document;return f(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:dt(window)-i.clientWidth||""}),()=>{J=!1,e(),f(i,{overflowY:"",touchAction:"",paddingRight:""})}}const p=[];var fe={mixins:[kt,It,Ct],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel({selPanel:t},e){return s.$(t,e)},transitionElement(){return this.panel},bgClose({bgClose:t}){return t&&this.panel}},connected(){s.attr(this.panel||this.$el,"role",this.role),this.overlay&&s.attr(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){s.includes(p,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(t){const{current:e,defaultPrevented:i}=t,{hash:n}=e;!i&&n&&s.isSameSiteAnchor(e)&&!s.within(n,this.$el)&&s.$(n,document.body)?this.hide():s.matches(e,this.selClose)&&(t.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(t){t.defaultPrevented||(t.preventDefault(),this.isToggled()===s.includes(p,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(t){if(s.includes(p,this))return!1;!this.stack&&p.length?(Promise.all(p.map(e=>e.hide())).then(this.show),t.preventDefault()):p.push(this)}},{name:"show",self:!0,handler(){this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+p.length);const t=[this.overlay&&pe(this),this.overlay&&le(this.$el),this.bgClose&&ge(this),this.escClose&&me(this)];s.once(this.$el,"hidden",()=>t.forEach(e=>e&&e()),{self:!0}),s.addClass(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.matches(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(p,this)&&p.splice(p.indexOf(this),1),s.css(this.$el,"zIndex",""),p.some(t=>t.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(t=>requestAnimationFrame(()=>this.show().then(t)))):this.toggleElement(this.$el,!0,pt)},hide(){return this.toggleElement(this.$el,!1,pt)}}};function pt(t,e,{transitionElement:i,_toggle:n}){return new Promise((r,o)=>s.once(t,"show hide",()=>{var a;(a=t._reject)==null||a.call(t),t._reject=o,n(t,e);const h=s.once(i,"transitionstart",()=>{s.once(i,"transitionend transitioncancel",r,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{h(),r()},ue(s.css(i,"transitionDuration")))})).then(()=>delete t._reject)}function ue(t){return t?s.endsWith(t,"ms")?s.toFloat(t):s.toFloat(t)*1e3:0}function pe(t){return s.on(document,"focusin",e=>{s.last(p)===t&&!s.within(e.target,t.$el)&&t.$el.focus()})}function ge(t){return s.on(document,s.pointerDown,({target:e})=>{s.last(p)!==t||t.overlay&&!s.within(e,t.$el)||s.within(e,t.panel)||s.once(document,`${s.pointerUp} ${s.pointerCancel} scroll`,({defaultPrevented:i,type:n,target:r})=>{!i&&n===s.pointerUp&&e===r&&t.hide()},!0)})}function me(t){return s.on(document,"keydown",e=>{e.keyCode===27&&s.last(p)===t&&t.hide()})}function ve(t,e,i,{animation:n,easing:r}){const{percent:o,translate:a,show:h=s.noop}=n,l=h(i),c=new s.Deferred;return{dir:i,show(d,u=0,w){const T=w?"linear":r;return d-=Math.round(d*s.clamp(u,-1,1)),this.translate(u),L(e,"itemin",{percent:u,duration:d,timing:T,dir:i}),L(t,"itemout",{percent:1-u,duration:d,timing:T,dir:i}),Promise.all([s.Transition.start(e,l[1],d,T),s.Transition.start(t,l[0],d,T)]).then(()=>{this.reset(),c.resolve()},s.noop),c.promise},cancel(){s.Transition.cancel([e,t])},reset(){for(const d in l[0])s.css([e,t],d,"")},forward(d,u=this.percent()){return s.Transition.cancel([e,t]),this.show(d,u,!0)},translate(d){this.reset();const u=a(d,i);s.css(e,u[1]),s.css(t,u[0]),L(e,"itemtranslatein",{percent:d,dir:i}),L(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return o(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function L(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}var be={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,r;let o=0;return((r=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:r.replace(/%s/g,()=>e[o++]||""))||""}}};const b={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function Z(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return s.$(`#${n}`)&&(n=Z(t,e,`${i}-2`)),n}var we={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){return s.$(t,e)},navChildren(){return s.children(this.nav)},selNavItem({attrItem:t}){return`[${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 r,o=null;if(s.isNumeric(i)){const a=s.toNumber(i),h=this.slides[a];h&&(h.id||(h.id=Z(this,h,`-item-${i}`)),o=h.id),r=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=Z(this,this.list,"-items")),o=this.list.id),r=this.t(i);s.attr(n,{"aria-controls":o,"aria-label":s.attr(n,"aria-label")||r})}},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,ariaRoleDescription:"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===b.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 r=i===b.HOME?0:i===b.END?"last":i===b.LEFT?"previous":i===b.RIGHT?"next":-1;~r&&(t.preventDefault(),this.show(r))}}],methods:{updateNav(){const t=this.getValidIndex();let e,i;for(const n of this.navItems){const r=s.data(n,this.attrItem),o=s.$("a,button",n)||n;if(s.isNumeric(r)){const h=s.toNumber(r)===t;s.toggleClass(n,this.clsActive,h),s.attr(o,{"aria-selected":h,tabindex:h?null:-1}),h&&(i=o),e=e||s.matches(o,":focus")}else s.toggleClass(n,"uk-invisible",this.finite&&(r==="previous"&&t===0||r==="next"&&t>=this.maxIndex));e&&i&&i.focus()}}}};const K={passive:!1,capture:!0},gt={passive:!0,capture:!0},xe="touchstart mousedown",Q="touchmove mousemove",mt="touchend touchcancel mouseup click input scroll";var $e={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:xe,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&ye(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:Q,el(){return this.list},handler:s.noop,...K}],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,Q,this.move,K),s.on(document,mt,this.end,gt),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;const{slides:i}=this;let{prevIndex:n}=this,r=Math.abs(e),o=this.getIndex(n+this.dir,n),a=this._getDistance(n,o)||i[n].offsetWidth;for(;o!==n&&r>a;)this.drag-=a*this.dir,n=o,r-=a,o=this.getIndex(n+this.dir,n),a=this._getDistance(n,o)||i[n].offsetWidth;this.percent=r/a;const h=i[n],l=i[o],c=this.index!==o,d=n===o;let u;[this.index,this.prevIndex].filter(w=>!s.includes([o,n],w)).forEach(w=>{s.trigger(i[w],"itemhidden",[this]),d&&(u=!0,this.prevIndex=n)}),(this.index===n&&this.prevIndex!==n||u)&&s.trigger(i[this.index],"itemshown",[this]),c&&(this.prevIndex=n,this.index=o,!d&&s.trigger(h,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&l),c&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,Q,this.move,K),s.off(document,mt,this.end,gt),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}}};function ye(t){return s.css(t,"userSelect")!=="none"&&s.toNodes(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}var ke={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)}}};function Ie(t){return Ce(s.observeResize,t,"resize")}function Ce(t,e,i){return{observe:t,handler(){this.$emit(i)},...e}}var Ae={mixins:[ke,$e,we,be],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){return Ee(e.offsetWidth/t)},list({selList:t},e){return 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:Ie(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,r=e?0:n.length,o=()=>{n.splice(r,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 a=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[a],l=this.getIndex(t,this.index),c=this.slides[l];if(h===c){o();return}if(this.dir=Te(t,a),this.prevIndex=a,this.index=l,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,o();return}const d=this._show(h,c,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(c,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"itemhide",[this]),s.trigger(c,"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)},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_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 Te(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function Ee(t){return .5*t+300}var Ne={mixins:[Ae],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:ve},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)}}},vt={mixins:[fe,Ne],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:et,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const t=s.$(this.template),e=s.$(this.selList,t);this.items.forEach(()=>s.append(e,"<li>"));const i=s.$("[uk-close]",t),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(s.append(this.container,t))},computed:{caption({selCaption:t},e){return s.$(t,e)}},events:[{name:`${s.pointerMove} ${s.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(t){t.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler({keyCode:t}){if(!this.isToggled(this.$el)||!this.draggable)return;let e=-1;t===b.LEFT?e="previous":t===b.RIGHT?e="next":t===b.HOME?e=0:t===b.END&&(e="last"),~e&&this.show(e)}},{name:"beforeitemshow",handler(t){this.isToggled()||(this.draggable=!1,t.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=et.scale,s.removeClass(t.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let t=-this.preload;t<=this.preload;t++)this.loadItem(this.index+t)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(t,e){const{source:i,type:n,alt:r="",poster:o,attrs:a={}}=e;if(this.setItem(e,"<span uk-spinner></span>"),!i)return;let h;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(n==="image"||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const c=A("img",{src:i,alt:r,...a});s.on(c,"load",()=>this.setItem(e,c)),s.on(c,"error",()=>this.setError(e))}else if(n==="video"||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=A("video",{src:i,poster:o,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`,...a});s.on(c,"loadedmetadata",()=>this.setItem(e,c)),s.on(c,"error",()=>this.setError(e))}else if(n==="iframe"||i.match(/\.(html|php)($|\?)/i))this.setItem(e,A("iframe",{src:i,allowfullscreen:"",class:"uk-lightbox-iframe",...a}));else if(h=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(e,A("iframe",{src:`https://www.youtube${h[1]||""}.com/embed/${h[2]}${h[3]?`?${h[3]}`:""}`,width:1920,height:1080,...l,...a}));else if(h=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:d}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`,{credentials:"omit"})).json();this.setItem(e,A("iframe",{src:`https://player.vimeo.com/video/${h[1]}${h[2]?`?${h[2]}`:""}`,width:d,height:c,...l,...a}))}catch{this.setError(e)}}}],methods:{loadItem(t=this.index){const e=this.getItem(t);this.getSlide(e).childElementCount||s.trigger(this.$el,"itemload",[e])},getItem(t=this.index){return this.items[s.getIndex(t,this.slides)]},setItem(t,e){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(t),e)])},getSlide(t){return this.slides[this.items.indexOf(t)]},setError(t){this.setItem(t,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function A(t,e){const i=s.fragment(`<${t}>`);return s.attr(i,e),i}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",vt),vt});
|