uikit 3.15.24 → 3.15.25-dev.c6f5a4c4e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/publishDev.js +3 -3
  3. package/build/release.js +3 -3
  4. package/dist/css/uikit-core-rtl.css +1 -1
  5. package/dist/css/uikit-core-rtl.min.css +1 -1
  6. package/dist/css/uikit-core.css +1 -1
  7. package/dist/css/uikit-core.min.css +1 -1
  8. package/dist/css/uikit-rtl.css +1 -1
  9. package/dist/css/uikit-rtl.min.css +1 -1
  10. package/dist/css/uikit.css +1 -1
  11. package/dist/css/uikit.min.css +1 -1
  12. package/dist/js/components/countdown.js +6 -6
  13. package/dist/js/components/countdown.min.js +1 -1
  14. package/dist/js/components/filter.js +5 -1
  15. package/dist/js/components/filter.min.js +1 -1
  16. package/dist/js/components/lightbox-panel.js +59 -76
  17. package/dist/js/components/lightbox-panel.min.js +1 -1
  18. package/dist/js/components/lightbox.js +59 -76
  19. package/dist/js/components/lightbox.min.js +1 -1
  20. package/dist/js/components/notification.js +1 -1
  21. package/dist/js/components/notification.min.js +1 -1
  22. package/dist/js/components/parallax.js +1 -1
  23. package/dist/js/components/parallax.min.js +1 -1
  24. package/dist/js/components/slider-parallax.js +1 -1
  25. package/dist/js/components/slider-parallax.min.js +1 -1
  26. package/dist/js/components/slider.js +2 -2
  27. package/dist/js/components/slider.min.js +1 -1
  28. package/dist/js/components/slideshow-parallax.js +1 -1
  29. package/dist/js/components/slideshow-parallax.min.js +1 -1
  30. package/dist/js/components/slideshow.js +2 -2
  31. package/dist/js/components/slideshow.min.js +1 -1
  32. package/dist/js/components/sortable.js +8 -5
  33. package/dist/js/components/sortable.min.js +1 -1
  34. package/dist/js/components/tooltip.js +2 -7
  35. package/dist/js/components/tooltip.min.js +1 -1
  36. package/dist/js/components/upload.js +2 -2
  37. package/dist/js/components/upload.min.js +1 -1
  38. package/dist/js/uikit-core.js +127 -138
  39. package/dist/js/uikit-core.min.js +1 -1
  40. package/dist/js/uikit-icons.js +5 -1
  41. package/dist/js/uikit-icons.min.js +1 -1
  42. package/dist/js/uikit.js +149 -173
  43. package/dist/js/uikit.min.js +1 -1
  44. package/package.json +65 -65
  45. package/src/images/icons/android-robot.svg +6 -0
  46. package/src/images/icons/android.svg +3 -0
  47. package/src/images/icons/apple.svg +3 -0
  48. package/src/images/icons/microsoft.svg +3 -0
  49. package/src/js/components/countdown.js +5 -5
  50. package/src/js/components/lightbox-panel.js +6 -18
  51. package/src/js/components/sortable.js +3 -4
  52. package/src/js/components/tooltip.js +3 -8
  53. package/src/js/components/upload.js +1 -1
  54. package/src/js/core/drop.js +62 -50
  55. package/src/js/core/navbar.js +11 -29
  56. package/src/js/mixin/internal/animate-slide.js +5 -0
  57. package/src/js/mixin/modal.js +52 -58
  58. package/src/js/mixin/slider-autoplay.js +1 -1
  59. package/src/js/util/mouse.js +1 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.24 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.25-dev.c6f5a4c4e | 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')) :
@@ -100,14 +100,14 @@
100
100
  };
101
101
 
102
102
  function getTimeSpan(date) {
103
- const total = date - Date.now();
103
+ const total = (date - Date.now()) / 1000;
104
104
 
105
105
  return {
106
106
  total,
107
- seconds: total / 1000 % 60,
108
- minutes: total / 1000 / 60 % 60,
109
- hours: total / 1000 / 60 / 60 % 24,
110
- days: total / 1000 / 60 / 60 / 24
107
+ seconds: total % 60,
108
+ minutes: total / 60 % 60,
109
+ hours: total / 60 / 60 % 24,
110
+ days: total / 60 / 60 / 24
111
111
  };
112
112
  }
113
113
 
@@ -1 +1 @@
1
- /*! UIkit 3.15.24 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=s(e.UIkit.util))})(this,function(e){"use strict";var s={connected(){e.addClass(this.$el,this.$options.id)}};const a=["days","hours","minutes","seconds"];var d={mixins:[s],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},connected(){this.date=Date.parse(this.$props.date),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=setInterval(this.update,1e3)},stop(){clearInterval(this.timer)},update(){const n=r(this.date);(!this.date||n.total<=0)&&(this.stop(),n.days=n.hours=n.minutes=n.seconds=0);for(const i of a){const o=e.$(this.clsWrapper.replace("%unit%",i),this.$el);if(!o)continue;let t=String(Math.trunc(n[i]));t=t.length<2?`0${t}`:t,o.textContent!==t&&(t=t.split(""),t.length!==o.children.length&&e.html(o,t.map(()=>"<span></span>").join("")),t.forEach((u,h)=>o.children[h].textContent=u))}}}};function r(n){const i=n-Date.now();return{total:i,seconds:i/1e3%60,minutes:i/1e3/60%60,hours:i/1e3/60/60%24,days:i/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",d),d});
1
+ /*! UIkit 3.15.25-dev.c6f5a4c4e | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=s(e.UIkit.util))})(this,function(e){"use strict";var s={connected(){e.addClass(this.$el,this.$options.id)}};const a=["days","hours","minutes","seconds"];var d={mixins:[s],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},connected(){this.date=Date.parse(this.$props.date),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=setInterval(this.update,1e3)},stop(){clearInterval(this.timer)},update(){const n=r(this.date);(!this.date||n.total<=0)&&(this.stop(),n.days=n.hours=n.minutes=n.seconds=0);for(const i of a){const o=e.$(this.clsWrapper.replace("%unit%",i),this.$el);if(!o)continue;let t=String(Math.trunc(n[i]));t=t.length<2?`0${t}`:t,o.textContent!==t&&(t=t.split(""),t.length!==o.children.length&&e.html(o,t.map(()=>"<span></span>").join("")),t.forEach((u,h)=>o.children[h].textContent=u))}}}};function r(n){const i=(n-Date.now())/1e3;return{total:i,seconds:i%60,minutes:i/60%60,hours:i/60/60%24,days:i/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",d),d});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.24 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.25-dev.c6f5a4c4e | 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')) :
@@ -225,6 +225,10 @@
225
225
  nodes.forEach((el, i) => propsFrom[i] && uikitUtil.css(el, propsFrom[i]));
226
226
  uikitUtil.css(target, targetProps);
227
227
 
228
+ // Trigger update in e.g. parallax component
229
+ uikitUtil.trigger(target, 'scroll');
230
+ uikitUtil.fastdom.flush();
231
+
228
232
  // Start transitions on next frame
229
233
  await awaitFrame();
230
234
 
@@ -1 +1 @@
1
- /*! UIkit 3.15.24 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(n,y){typeof exports=="object"&&typeof module<"u"?module.exports=y(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],y):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=y(n.UIkit.util))})(this,function(n){"use strict";function y(s){return q(s,"top","bottom")}function q(s,e,o){const t=[[]];for(const r of s){if(!n.isVisible(r))continue;let a=u(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=u(f[0]):(a=u(r,!0),h=u(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 u(s,e=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:r,offsetWidth:a}=s;return e&&([o,t]=n.offsetPosition(s)),{top:o,left:t,bottom:o+r,right:t+a}}const g="uk-transition-leave",v="uk-transition-enter";function T(s,e,o,t=0){const r=w(e,!0),a={opacity:1},c={opacity:0},f=i=>()=>r===w(e)?i():Promise.reject(),h=f(async()=>{n.addClass(e,g),await Promise.all(I(e).map((i,l)=>new Promise(d=>setTimeout(()=>n.Transition.start(i,c,o/2,"ease").then(d),l*t)))),n.removeClass(e,g)}),m=f(async()=>{const i=n.height(e);n.addClass(e,v),s(),n.css(n.children(e),{opacity:0}),await A();const l=n.children(e),d=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,i);const p=I(e);n.css(l,c);const x=p.map(async(R,G)=>{await L(G*t),await n.Transition.start(R,a,o/2,"ease")});i!==d&&x.push(n.Transition.start(e,{height:d},o/2+p.length*t,"ease")),await Promise.all(x).then(()=>{n.removeClass(e,v),r===w(e)&&(n.css(e,{height:"",alignContent:""}),n.css(l,{opacity:""}),delete e.dataset.transition)})});return n.hasClass(e,g)?$(e).then(m):n.hasClass(e,v)?$(e).then(h).then(m):h().then(m)}function w(s,e){return e&&(s.dataset.transition=1+w(s)),n.toNumber(s.dataset.transition)||0}function $(s){return Promise.all(n.children(s).filter(n.Transition.inProgress).map(e=>new Promise(o=>n.once(e,"transitionend transitioncanceled",o))))}function I(s){return y(n.children(s)).reduce((e,o)=>e.concat(n.sortBy(o.filter(t=>n.isInView(t)),"offsetLeft")),[])}function A(){return new Promise(s=>requestAnimationFrame(s))}function L(s){return new Promise(e=>setTimeout(e,s))}async function V(s,e,o){await b();let t=n.children(e);const r=t.map(d=>P(d,!0)),a={...n.css(e,["height","padding"]),display:"block"};await Promise.all(t.concat(e).map(n.Transition.cancel)),s(),t=t.concat(n.children(e).filter(d=>!n.includes(t,d))),await Promise.resolve(),n.fastdom.flush();const c=n.attr(e,"style"),f=n.css(e,["height","padding"]),[h,m]=B(e,t,r),i=t.map(d=>({style:n.attr(d,"style")}));t.forEach((d,p)=>m[p]&&n.css(d,m[p])),n.css(e,a),await b();const l=t.map((d,p)=>n.parent(d)===e&&n.Transition.start(d,h[p],o,"ease")).concat(n.Transition.start(e,f,o,"ease"));try{await Promise.all(l),t.forEach((d,p)=>{n.attr(d,i[p]),n.parent(d)===e&&n.css(d,"display",h[p].opacity===0?"none":"")}),n.attr(e,"style",c)}catch{n.attr(t,"style",""),N(e,a)}}function P(s,e){const o=n.css(s,"zIndex");return n.isVisible(s)?{display:"",opacity:e?n.css(s,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?n.index(s):o,...S(s)}:!1}function B(s,e,o){const t=e.map((a,c)=>n.parent(a)&&c in o?o[c]?n.isVisible(a)?S(a):{opacity:0}:{opacity:n.isVisible(a)?1:0}:!1),r=t.map((a,c)=>{const f=n.parent(e[c])===s&&(o[c]||P(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 N(s,e){for(const o in e)n.css(s,o,"")}function S(s){const{height:e,width:o}=n.offset(s);return{height:e,width:o,transform:"",...n.position(s),...n.css(s,["marginTop","marginLeft"])}}function b(){return new Promise(s=>requestAnimationFrame(s))}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e=this.$el){const o=this.animation;return(o==="fade"?T:o==="delayed-fade"?(...r)=>T(...r,40):o?V:()=>(s(),Promise.resolve()))(s,e,this.duration).catch(n.noop)}}},F={mixins:[z],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get({attrItem:s},e){return n.$$(`[${s}],[data-${s}]`,e)},watch(){if(this.updateState(),this.selActive!==!1){const s=n.$$(this.selActive,this.$el);this.toggles.forEach(e=>n.toggleClass(e,this.cls,n.includes(s,e)))}},immediate:!0},children:{get({target:s},e){return n.$$(`${s} > *`,e)},watch(s,e){e&&!D(s,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(s){s.preventDefault(),this.apply(s.current)}}],methods:{apply(s){const e=this.getState(),o=E(s,this.attrItem,this.getState());H(e,o)||this.setState(o)},getState(){return this.toggles.filter(s=>n.hasClass(s,this.cls)).reduce((s,e)=>E(e,this.attrItem,s),{filter:{"":""},sort:[]})},async setState(s,e=!0){s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]),this.toggles.forEach(o=>n.toggleClass(o,this.cls,!!j(o,this.attrItem,s))),await Promise.all(n.$$(this.target,this.$el).map(o=>{const t=()=>{O(s,o,n.children(o)),this.$update(this.$el)};return e?this.animate(t,o):t()})),n.trigger(this.$el,"afterFilter",[this])},updateState(){n.fastdom.write(()=>this.setState(this.getState(),!1))}}};function C(s,e){return n.parseOptions(n.data(s,e),["filter"])}function H(s,e){return["filter","sort"].every(o=>n.isEqual(s[o],e[o]))}function O(s,e,o){const t=W(s);o.forEach(c=>n.css(c,"display",t&&!n.matches(c,t)?"none":""));const[r,a]=s.sort;if(r){const c=M(o,r,a);n.isEqual(c,o)||n.append(e,c)}}function E(s,e,o){const{filter:t,group:r,sort:a,order:c="asc"}=C(s,e);return(t||n.isUndefined(a))&&(r?t?(delete o.filter[""],o.filter[r]=t):(delete o.filter[r],(n.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),n.isUndefined(a)||(o.sort=[a,c]),o}function j(s,e,{filter:o={"":""},sort:[t,r]}){const{filter:a="",group:c="",sort:f,order:h="asc"}=C(s,e);return n.isUndefined(f)?c in o&&a===o[c]||!a&&c&&!(c in o)&&!o[""]:t===f&&r===h}function D(s,e){return s.length===e.length&&s.every(o=>e.includes(o))}function W({filter:s}){let e="";return n.each(s,o=>e+=o||""),e}function M(s,e,o){return[...s].sort((t,r)=>n.data(t,e).localeCompare(n.data(r,e),void 0,{numeric:!0})*(o==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",F),F});
1
+ /*! UIkit 3.15.25-dev.c6f5a4c4e | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(n,y){typeof exports=="object"&&typeof module<"u"?module.exports=y(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],y):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=y(n.UIkit.util))})(this,function(n){"use strict";function y(s){return q(s,"top","bottom")}function q(s,e,o){const t=[[]];for(const r of s){if(!n.isVisible(r))continue;let a=w(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=w(f[0]):(a=w(r,!0),h=w(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 w(s,e=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:r,offsetWidth:a}=s;return e&&([o,t]=n.offsetPosition(s)),{top:o,left:t,bottom:o+r,right:t+a}}const g="uk-transition-leave",v="uk-transition-enter";function T(s,e,o,t=0){const r=u(e,!0),a={opacity:1},c={opacity:0},f=m=>()=>r===u(e)?m():Promise.reject(),h=f(async()=>{n.addClass(e,g),await Promise.all(I(e).map((m,l)=>new Promise(d=>setTimeout(()=>n.Transition.start(m,c,o/2,"ease").then(d),l*t)))),n.removeClass(e,g)}),i=f(async()=>{const m=n.height(e);n.addClass(e,v),s(),n.css(n.children(e),{opacity:0}),await A();const l=n.children(e),d=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,m);const p=I(e);n.css(l,c);const x=p.map(async(R,G)=>{await L(G*t),await n.Transition.start(R,a,o/2,"ease")});m!==d&&x.push(n.Transition.start(e,{height:d},o/2+p.length*t,"ease")),await Promise.all(x).then(()=>{n.removeClass(e,v),r===u(e)&&(n.css(e,{height:"",alignContent:""}),n.css(l,{opacity:""}),delete e.dataset.transition)})});return n.hasClass(e,g)?$(e).then(i):n.hasClass(e,v)?$(e).then(h).then(i):h().then(i)}function u(s,e){return e&&(s.dataset.transition=1+u(s)),n.toNumber(s.dataset.transition)||0}function $(s){return Promise.all(n.children(s).filter(n.Transition.inProgress).map(e=>new Promise(o=>n.once(e,"transitionend transitioncanceled",o))))}function I(s){return y(n.children(s)).reduce((e,o)=>e.concat(n.sortBy(o.filter(t=>n.isInView(t)),"offsetLeft")),[])}function A(){return new Promise(s=>requestAnimationFrame(s))}function L(s){return new Promise(e=>setTimeout(e,s))}async function V(s,e,o){await b();let t=n.children(e);const r=t.map(d=>P(d,!0)),a={...n.css(e,["height","padding"]),display:"block"};await Promise.all(t.concat(e).map(n.Transition.cancel)),s(),t=t.concat(n.children(e).filter(d=>!n.includes(t,d))),await Promise.resolve(),n.fastdom.flush();const c=n.attr(e,"style"),f=n.css(e,["height","padding"]),[h,i]=B(e,t,r),m=t.map(d=>({style:n.attr(d,"style")}));t.forEach((d,p)=>i[p]&&n.css(d,i[p])),n.css(e,a),n.trigger(e,"scroll"),n.fastdom.flush(),await b();const l=t.map((d,p)=>n.parent(d)===e&&n.Transition.start(d,h[p],o,"ease")).concat(n.Transition.start(e,f,o,"ease"));try{await Promise.all(l),t.forEach((d,p)=>{n.attr(d,m[p]),n.parent(d)===e&&n.css(d,"display",h[p].opacity===0?"none":"")}),n.attr(e,"style",c)}catch{n.attr(t,"style",""),N(e,a)}}function P(s,e){const o=n.css(s,"zIndex");return n.isVisible(s)?{display:"",opacity:e?n.css(s,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?n.index(s):o,...S(s)}:!1}function B(s,e,o){const t=e.map((a,c)=>n.parent(a)&&c in o?o[c]?n.isVisible(a)?S(a):{opacity:0}:{opacity:n.isVisible(a)?1:0}:!1),r=t.map((a,c)=>{const f=n.parent(e[c])===s&&(o[c]||P(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 N(s,e){for(const o in e)n.css(s,o,"")}function S(s){const{height:e,width:o}=n.offset(s);return{height:e,width:o,transform:"",...n.position(s),...n.css(s,["marginTop","marginLeft"])}}function b(){return new Promise(s=>requestAnimationFrame(s))}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e=this.$el){const o=this.animation;return(o==="fade"?T:o==="delayed-fade"?(...r)=>T(...r,40):o?V:()=>(s(),Promise.resolve()))(s,e,this.duration).catch(n.noop)}}},F={mixins:[z],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get({attrItem:s},e){return n.$$(`[${s}],[data-${s}]`,e)},watch(){if(this.updateState(),this.selActive!==!1){const s=n.$$(this.selActive,this.$el);this.toggles.forEach(e=>n.toggleClass(e,this.cls,n.includes(s,e)))}},immediate:!0},children:{get({target:s},e){return n.$$(`${s} > *`,e)},watch(s,e){e&&!D(s,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(s){s.preventDefault(),this.apply(s.current)}}],methods:{apply(s){const e=this.getState(),o=E(s,this.attrItem,this.getState());H(e,o)||this.setState(o)},getState(){return this.toggles.filter(s=>n.hasClass(s,this.cls)).reduce((s,e)=>E(e,this.attrItem,s),{filter:{"":""},sort:[]})},async setState(s,e=!0){s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]),this.toggles.forEach(o=>n.toggleClass(o,this.cls,!!j(o,this.attrItem,s))),await Promise.all(n.$$(this.target,this.$el).map(o=>{const t=()=>{O(s,o,n.children(o)),this.$update(this.$el)};return e?this.animate(t,o):t()})),n.trigger(this.$el,"afterFilter",[this])},updateState(){n.fastdom.write(()=>this.setState(this.getState(),!1))}}};function C(s,e){return n.parseOptions(n.data(s,e),["filter"])}function H(s,e){return["filter","sort"].every(o=>n.isEqual(s[o],e[o]))}function O(s,e,o){const t=W(s);o.forEach(c=>n.css(c,"display",t&&!n.matches(c,t)?"none":""));const[r,a]=s.sort;if(r){const c=M(o,r,a);n.isEqual(c,o)||n.append(e,c)}}function E(s,e,o){const{filter:t,group:r,sort:a,order:c="asc"}=C(s,e);return(t||n.isUndefined(a))&&(r?t?(delete o.filter[""],o.filter[r]=t):(delete o.filter[r],(n.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),n.isUndefined(a)||(o.sort=[a,c]),o}function j(s,e,{filter:o={"":""},sort:[t,r]}){const{filter:a="",group:c="",sort:f,order:h="asc"}=C(s,e);return n.isUndefined(f)?c in o&&a===o[c]||!a&&c&&!(c in o)&&!o[""]:t===f&&r===h}function D(s,e){return s.length===e.length&&s.every(o=>e.includes(o))}function W({filter:s}){let e="";return n.each(s,o=>e+=o||""),e}function M(s,e,o){return[...s].sort((t,r)=>n.data(t,e).localeCompare(n.data(r,e),void 0,{numeric:!0})*(o==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",F),F});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.24 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.25-dev.c6f5a4c4e | 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')) :
@@ -442,70 +442,25 @@
442
442
  self: true,
443
443
 
444
444
  handler() {
445
- uikitUtil.once(
446
- this.$el,
447
- 'hide',
448
- uikitUtil.on(document, 'focusin', (e) => {
449
- if (uikitUtil.last(active) === this && !uikitUtil.within(e.target, this.$el)) {
450
- this.$el.focus();
451
- }
452
- }));
453
-
454
-
455
- if (this.overlay) {
456
- uikitUtil.once(this.$el, 'hidden', preventBackgroundScroll(this.$el), { self: true });
457
- }
458
-
459
445
  if (this.stack) {
460
446
  uikitUtil.css(this.$el, 'zIndex', uikitUtil.toFloat(uikitUtil.css(this.$el, 'zIndex')) + active.length);
461
447
  }
462
448
 
463
- uikitUtil.addClass(document.documentElement, this.clsPage);
464
-
465
- if (this.bgClose) {
466
- uikitUtil.once(
467
- this.$el,
468
- 'hide',
469
- uikitUtil.on(document, uikitUtil.pointerDown, ({ target }) => {
470
- if (
471
- uikitUtil.last(active) !== this ||
472
- this.overlay && !uikitUtil.within(target, this.$el) ||
473
- uikitUtil.within(target, this.panel))
474
- {
475
- return;
476
- }
477
-
478
- uikitUtil.once(
479
- document,
480
- `${uikitUtil.pointerUp} ${uikitUtil.pointerCancel} scroll`,
481
- ({ defaultPrevented, type, target: newTarget }) => {
482
- if (
483
- !defaultPrevented &&
484
- type === uikitUtil.pointerUp &&
485
- target === newTarget)
486
- {
487
- this.hide();
488
- }
489
- },
490
- true);
449
+ const handlers = [
450
+ this.overlay && preventBackgroundFocus(this),
451
+ this.overlay && preventBackgroundScroll(this.$el),
452
+ this.bgClose && listenForBackgroundClose(this),
453
+ this.escClose && listenForEscClose(this)];
491
454
 
492
- }),
493
- { self: true });
494
455
 
495
- }
456
+ uikitUtil.once(
457
+ this.$el,
458
+ 'hidden',
459
+ () => handlers.forEach((handler) => handler && handler()),
460
+ { self: true });
496
461
 
497
- if (this.escClose) {
498
- uikitUtil.once(
499
- this.$el,
500
- 'hide',
501
- uikitUtil.on(document, 'keydown', (e) => {
502
- if (e.keyCode === 27 && uikitUtil.last(active) === this) {
503
- this.hide();
504
- }
505
- }),
506
- { self: true });
507
462
 
508
- }
463
+ uikitUtil.addClass(document.documentElement, this.clsPage);
509
464
  }
510
465
  },
511
466
 
@@ -596,6 +551,45 @@
596
551
  return time ? uikitUtil.endsWith(time, 'ms') ? uikitUtil.toFloat(time) : uikitUtil.toFloat(time) * 1000 : 0;
597
552
  }
598
553
 
554
+ function preventBackgroundFocus(modal) {
555
+ return uikitUtil.on(document, 'focusin', (e) => {
556
+ if (uikitUtil.last(active) === modal && !uikitUtil.within(e.target, modal.$el)) {
557
+ modal.$el.focus();
558
+ }
559
+ });
560
+ }
561
+
562
+ function listenForBackgroundClose(modal) {
563
+ return uikitUtil.on(document, uikitUtil.pointerDown, ({ target }) => {
564
+ if (
565
+ uikitUtil.last(active) !== modal ||
566
+ modal.overlay && !uikitUtil.within(target, modal.$el) ||
567
+ uikitUtil.within(target, modal.panel))
568
+ {
569
+ return;
570
+ }
571
+
572
+ uikitUtil.once(
573
+ document,
574
+ `${uikitUtil.pointerUp} ${uikitUtil.pointerCancel} scroll`,
575
+ ({ defaultPrevented, type, target: newTarget }) => {
576
+ if (!defaultPrevented && type === uikitUtil.pointerUp && target === newTarget) {
577
+ modal.hide();
578
+ }
579
+ },
580
+ true);
581
+
582
+ });
583
+ }
584
+
585
+ function listenForEscClose(modal) {
586
+ return uikitUtil.on(document, 'keydown', (e) => {
587
+ if (e.keyCode === 27 && uikitUtil.last(active) === modal) {
588
+ modal.hide();
589
+ }
590
+ });
591
+ }
592
+
599
593
  let prevented;
600
594
  function preventBackgroundScroll(el) {
601
595
  // 'overscroll-behavior: contain' only works consistently if el overflows (Safari)
@@ -775,7 +769,7 @@
775
769
  },
776
770
 
777
771
  stopAutoplay() {
778
- this.interval && clearInterval(this.interval);
772
+ clearInterval(this.interval);
779
773
  }
780
774
  }
781
775
  };
@@ -1493,12 +1487,9 @@
1493
1487
  type === 'image' ||
1494
1488
  src.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))
1495
1489
  {
1496
- try {
1497
- const { width, height } = await uikitUtil.getImage(src, attrs.srcset, attrs.size);
1498
- this.setItem(item, createEl('img', { src, width, height, alt, ...attrs }));
1499
- } catch (e) {
1500
- this.setError(item);
1501
- }
1490
+ const img = createEl('img', { src, alt, ...attrs });
1491
+ uikitUtil.on(img, 'load', () => this.setItem(item, img));
1492
+ uikitUtil.on(img, 'error', () => this.setError(item));
1502
1493
 
1503
1494
  // Video
1504
1495
  } else if (type === 'video' || src.match(/\.(mp4|webm|ogv)($|\?)/i)) {
@@ -1507,17 +1498,11 @@
1507
1498
  poster,
1508
1499
  controls: '',
1509
1500
  playsinline: '',
1510
- 'uk-video': `${this.videoAutoplay}`
1501
+ 'uk-video': `${this.videoAutoplay}`,
1502
+ ...attrs
1511
1503
  });
1512
1504
 
1513
- uikitUtil.on(video, 'loadedmetadata', () => {
1514
- uikitUtil.attr(video, {
1515
- width: video.videoWidth,
1516
- height: video.videoHeight,
1517
- ...attrs
1518
- });
1519
- this.setItem(item, video);
1520
- });
1505
+ uikitUtil.on(video, 'loadedmetadata', () => this.setItem(item, video));
1521
1506
  uikitUtil.on(video, 'error', () => this.setError(item));
1522
1507
 
1523
1508
  // Iframe
@@ -1559,9 +1544,7 @@
1559
1544
  `https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(
1560
1545
  src)
1561
1546
  }`,
1562
- {
1563
- credentials: 'omit'
1564
- })).
1547
+ { credentials: 'omit' })).
1565
1548
 
1566
1549
  json();
1567
1550
 
@@ -1 +1 @@
1
- /*! UIkit 3.15.24 | 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("uikitlightbox_panel",["uikit-util"],u):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox_panel=u(s.UIkit.util))})(this,function(s){"use strict";var u={slide:{show(e){return[{transform:I(e*-100)},{transform:I()}]},percent(e){return H(e)},translate(e,t){return[{transform:I(t*-100*e)},{transform:I(t*100*(1-e))}]}}};function H(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function I(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function y(e){return`scale3d(${e}, ${e}, 1)`}var N={...u,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:y(1-.2)},{opacity:1,transform:y(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:y(1-.2*e)},{opacity:e,transform:y(1-.2+.2*e)}]}}},L={connected(){s.addClass(this.$el,this.$options.id)}},q={props:{container:Boolean},data:{container:!0},computed:{container({container:e}){return e===!0&&this.$container||e&&s.$(e)}}},V={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:e}){return!!e[0]},hasTransition({animation:e}){return["slide","reveal"].some(t=>s.startsWith(e[0],t))}},methods:{toggleElement(e,t,n){return new Promise(r=>Promise.all(s.toNodes(e).map(h=>{const a=s.isBoolean(t)?t:!this.isToggled(h);if(!s.trigger(h,`before${a?"show":"hide"}`,[this]))return Promise.reject();const c=(s.isFunction(n)?n:n===!1||!this.hasAnimation?Y:this.hasTransition?X:G)(h,a,this),o=a?this.clsEnter:this.clsLeave;s.addClass(h,o),s.trigger(h,a?"show":"hide",[this]);const l=()=>{s.removeClass(h,o),s.trigger(h,a?"shown":"hidden",[this])};return c?c.then(l,()=>(s.removeClass(h,o),Promise.reject())):l()})).then(r,s.noop))},isToggled(e=this.$el){return[e]=s.toNodes(e),s.hasClass(e,this.clsEnter)?!0:s.hasClass(e,this.clsLeave)?!1:this.cls?s.hasClass(e,this.cls.split(" ")[0]):s.isVisible(e)},_toggle(e,t){if(!e)return;t=Boolean(t);let n;this.cls?(n=s.includes(this.cls," ")||t!==s.hasClass(e,this.cls),n&&s.toggleClass(e,this.cls,s.includes(this.cls," ")?void 0:t)):(n=t===e.hidden,n&&(e.hidden=!t)),s.$$("[autofocus]",e).some(r=>s.isVisible(r)?r.focus()||!0:r.blur()),n&&s.trigger(e,"toggled",[t,this])}}};function Y(e,t,{_toggle:n}){return s.Animation.cancel(e),s.Transition.cancel(e),n(e,t)}async function X(e,t,{animation:n,duration:r,velocity:h,transition:a,_toggle:c}){var o;const[l="reveal",d="top"]=((o=n[0])==null?void 0:o.split("-"))||[],i=[["left","right"],["top","bottom"]],m=i[s.includes(i[0],d)?0:1],p=m[1]===d,T=["width","height"][i.indexOf(m)],v=`margin-${m[0]}`,A=`margin-${d}`;let x=s.dimensions(e)[T];const de=s.Transition.inProgress(e);await s.Transition.cancel(e),t&&c(e,!0);const ce=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",v,A].map(F=>[F,e.style[F]])),$=s.dimensions(e),E=s.toFloat(s.css(e,v)),M=s.toFloat(s.css(e,A)),f=$[T]+M;!de&&!t&&(x+=M);const[_]=s.wrapInner(e,"<div>");s.css(_,{boxSizing:"border-box",height:$.height,width:$.width,...s.css(e,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",A])}),s.css(e,{padding:0,border:0,minWidth:0,minHeight:0,[A]:0,width:$.width,height:$.height,overflow:"hidden",[T]:x});const W=x/f;r=(h*f+r)*(t?1-W:W);const R={[T]:t?f:0};p&&(s.css(e,v,f-x+E),R[v]=t?E:f+E),!p^l==="reveal"&&(s.css(_,v,-f+x),s.Transition.start(_,{[v]:t?0:-f},r,a));try{await s.Transition.start(e,R,r,a)}finally{s.css(e,ce),s.unwrap(_.firstChild),t||c(e,!1)}}function G(e,t,n){s.Animation.cancel(e);const{animation:r,duration:h,_toggle:a}=n;return t?(a(e,!0),s.Animation.in(e,r[0],h,n.origin)):s.Animation.out(e,r[1]||r[0],h,n.origin).then(()=>a(e,!1))}const g=[];var J={mixins:[L,q,V],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel({selPanel:e},t){return s.$(e,t)},transitionElement(){return this.panel},bgClose({bgClose:e}){return e&&this.panel}},beforeDisconnect(){s.includes(g,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(e){const{current:t,defaultPrevented:n}=e,{hash:r}=t;!n&&r&&Z(t)&&!s.within(r,this.$el)&&s.$(r,document.body)?this.hide():s.matches(t,this.selClose)&&(e.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(g,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(g,this))return!1;!this.stack&&g.length?(Promise.all(g.map(t=>t.hide())).then(this.show),e.preventDefault()):g.push(this)}},{name:"show",self:!0,handler(){s.once(this.$el,"hide",s.on(document,"focusin",e=>{s.last(g)===this&&!s.within(e.target,this.$el)&&this.$el.focus()})),this.overlay&&s.once(this.$el,"hidden",Q(this.$el),{self:!0}),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+g.length),s.addClass(document.documentElement,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,({target:e})=>{s.last(g)!==this||this.overlay&&!s.within(e,this.$el)||s.within(e,this.panel)||s.once(document,`${s.pointerUp} ${s.pointerCancel} scroll`,({defaultPrevented:t,type:n,target:r})=>{!t&&n===s.pointerUp&&e===r&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",e=>{e.keyCode===27&&s.last(g)===this&&this.hide()}),{self:!0})}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.$(":focus",this.$el)||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(g,this)&&g.splice(g.indexOf(this),1),s.css(this.$el,"zIndex",""),g.some(e=>e.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(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,z)},hide(){return this.toggleElement(this.$el,!1,z)}}};function z(e,t,{transitionElement:n,_toggle:r}){return new Promise((h,a)=>s.once(e,"show hide",()=>{e._reject==null||e._reject(),e._reject=a,r(e,t);const c=s.once(n,"transitionstart",()=>{s.once(n,"transitionend transitioncancel",h,{self:!0}),clearTimeout(o)},{self:!0}),o=setTimeout(()=>{c(),h()},K(s.css(n,"transitionDuration")))})).then(()=>delete e._reject)}function K(e){return e?s.endsWith(e,"ms")?s.toFloat(e):s.toFloat(e)*1e3:0}let P;function Q(e){const t=s.on(e,"touchmove",r=>{if(r.targetTouches.length!==1)return;let[{scrollHeight:h,clientHeight:a}]=s.scrollParents(r.target);a>=h&&r.cancelable&&r.preventDefault()},{passive:!1});if(P)return t;P=!0;const{scrollingElement:n}=document;return s.css(n,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:s.width(window)-n.clientWidth||""}),()=>{P=!1,t(),s.css(n,{overflowY:"",touchAction:"",paddingRight:""})}}function Z(e){return["origin","pathname","search"].every(t=>e[t]===location[t])}function k(e,t,n,{animation:r,easing:h}){const{percent:a,translate:c,show:o=s.noop}=r,l=o(n),d=new s.Deferred;return{dir:n,show(i,m=0,p){const w=p?"linear":h;return i-=Math.round(i*s.clamp(m,-1,1)),this.translate(m),C(t,"itemin",{percent:m,duration:i,timing:w,dir:n}),C(e,"itemout",{percent:1-m,duration:i,timing:w,dir:n}),Promise.all([s.Transition.start(t,l[1],i,w),s.Transition.start(e,l[0],i,w)]).then(()=>{this.reset(),d.resolve()},s.noop),d.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const i in l[0])s.css([t,e],i,"")},forward(i,m=this.percent()){return s.Transition.cancel([t,e]),this.show(i,m,!0)},translate(i){this.reset();const m=c(i,n);s.css(t,m[1]),s.css(e,m[0]),C(t,"itemtranslatein",{percent:i,dir:n}),C(e,"itemtranslateout",{percent:1-i,dir:n})},percent(){return a(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function C(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var U={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},ee={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}};const S={passive:!1,capture:!0},B={passive:!0,capture:!0},se="touchstart mousedown",D="touchmove mousemove",O="touchend touchcancel mouseup click input scroll";var te={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const r=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=r===this.pos?this.prevPos:this.pos,this.pos=r,t(n)}}},events:[{name:se,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&ne(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:D,el(){return this.list},handler:s.noop,...S}],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,D,this.move,S),s.on(document,O,this.end,B),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:r}=this,h=Math.abs(t),a=this.getIndex(r+this.dir,r),c=this._getDistance(r,a)||n[r].offsetWidth;for(;a!==r&&h>c;)this.drag-=c*this.dir,r=a,h-=c,a=this.getIndex(r+this.dir,r),c=this._getDistance(r,a)||n[r].offsetWidth;this.percent=h/c;const o=n[r],l=n[a],d=this.index!==a,i=r===a;let m;[this.index,this.prevIndex].filter(p=>!s.includes([a,r],p)).forEach(p=>{s.trigger(n[p],"itemhidden",[this]),i&&(m=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||m)&&s.trigger(n[this.index],"itemshown",[this]),d&&(this.prevIndex=r,this.index=a,!i&&s.trigger(o,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),o,!i&&l),d&&(!i&&s.trigger(o,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,D,this.move,S),s.off(document,O,this.end,B),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function ne(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var re={data:{selNav:!1},computed:{nav({selNav:e},t){return s.$(e,t)},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>`<li ${this.attrItem}="${t}"><a href></a></li>`).join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},oe={mixins:[ee,te,re,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:e},t){return he(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,t=!1){if(this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,h=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){if(n.length===2){var a;(a=this._transitioner)==null||a.forward(Math.min(this.duration,200))}return}const c=this.getIndex(this.index),o=s.hasClass(this.slides,this.clsActive)&&this.slides[c],l=this.getIndex(e,this.index),d=this.slides[l];if(o===d){h();return}if(this.dir=ae(e,c),this.prevIndex=c,this.index=l,o&&!s.trigger(o,"beforeitemhide",[this])||!s.trigger(d,"beforeitemshow",[this,o])){this.index=this.prevIndex,h();return}const i=this._show(o,d,t).then(()=>{o&&s.trigger(o,"itemhidden",[this]),s.trigger(d,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return o&&s.trigger(o,"itemhide",[this]),s.trigger(d,"itemshow",[this]),i},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,t=this.prevIndex){return this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:r}=this.stack;return this._transitioner[r>1?"forward":"show"](r>1?Math.min(this.duration,75+75/(r-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t=this.prevIndex,n=this.index){const r=this._getTransitioner(t!==n?t:!1,n);return r.translate(e),r},_getTransitioner(e=this.prevIndex,t=this.index,n=this.dir||1,r=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),r)}}};function ae(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function he(e){return .5*e+300}var ie={mixins:[oe],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:u,Transitioner:k},computed:{animation({animation:e,Animations:t}){return{...t[e]||t.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){s.addClass(e,this.clsActive)},itemshown({target:e}){s.addClass(e,this.clsActivated)},itemhidden({target:e}){s.removeClass(e,this.clsActive,this.clsActivated)}}},j={mixins:[J,ie],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:N,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 e=s.$(this.template),t=s.$(this.selList,e);this.items.forEach(()=>s.append(t,"<li>")),this.$mount(s.append(this.container,e))},computed:{caption({selCaption:e},t){return s.$(e,t)}},events:[{name:`${s.pointerMove} ${s.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(e){e.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(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=N.scale,s.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:n,type:r,alt:h="",poster:a,attrs:c={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let o;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(r==="image"||n.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))try{const{width:d,height:i}=await s.getImage(n,c.srcset,c.size);this.setItem(t,b("img",{src:n,width:d,height:i,alt:h,...c}))}catch{this.setError(t)}else if(r==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const d=b("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`});s.on(d,"loadedmetadata",()=>{s.attr(d,{width:d.videoWidth,height:d.videoHeight,...c}),this.setItem(t,d)}),s.on(d,"error",()=>this.setError(t))}else if(r==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,b("iframe",{src:n,allowfullscreen:"",class:"uk-lightbox-iframe",...c}));else if(o=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,b("iframe",{src:`https://www.youtube${o[1]||""}.com/embed/${o[2]}${o[3]?`?${o[3]}`:""}`,width:1920,height:1080,...l,...c}));else if(o=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:d,width:i}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(n)}`,{credentials:"omit"})).json();this.setItem(t,b("iframe",{src:`https://player.vimeo.com/video/${o[1]}${o[2]?`?${o[2]}`:""}`,width:i,height:d,...l,...c}))}catch{this.setError(t)}}}],methods:{loadItem(e=this.index){const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e=this.index){return this.items[s.getIndex(e,this.slides)]},setItem(e,t){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<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 b(e,t){const n=s.fragment(`<${e}>`);return s.attr(n,t),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",j),j});
1
+ /*! UIkit 3.15.25-dev.c6f5a4c4e | 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("uikitlightbox_panel",["uikit-util"],u):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox_panel=u(s.UIkit.util))})(this,function(s){"use strict";var u={slide:{show(e){return[{transform:I(e*-100)},{transform:I()}]},percent(e){return L(e)},translate(e,t){return[{transform:I(t*-100*e)},{transform:I(t*100*(1-e))}]}}};function L(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function I(e=0,t="%"){return e+=e?t:"",`translate3d(${e}, 0, 0)`}function y(e){return`scale3d(${e}, ${e}, 1)`}var N={...u,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:y(1-.2)},{opacity:1,transform:y(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:y(1-.2*e)},{opacity:e,transform:y(1-.2+.2*e)}]}}},H={connected(){s.addClass(this.$el,this.$options.id)}},q={props:{container:Boolean},data:{container:!0},computed:{container({container:e}){return e===!0&&this.$container||e&&s.$(e)}}},V={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:e}){return!!e[0]},hasTransition({animation:e}){return["slide","reveal"].some(t=>s.startsWith(e[0],t))}},methods:{toggleElement(e,t,n){return new Promise(r=>Promise.all(s.toNodes(e).map(h=>{const a=s.isBoolean(t)?t:!this.isToggled(h);if(!s.trigger(h,`before${a?"show":"hide"}`,[this]))return Promise.reject();const d=(s.isFunction(n)?n:n===!1||!this.hasAnimation?Y:this.hasTransition?X:G)(h,a,this),o=a?this.clsEnter:this.clsLeave;s.addClass(h,o),s.trigger(h,a?"show":"hide",[this]);const l=()=>{s.removeClass(h,o),s.trigger(h,a?"shown":"hidden",[this])};return d?d.then(l,()=>(s.removeClass(h,o),Promise.reject())):l()})).then(r,s.noop))},isToggled(e=this.$el){return[e]=s.toNodes(e),s.hasClass(e,this.clsEnter)?!0:s.hasClass(e,this.clsLeave)?!1:this.cls?s.hasClass(e,this.cls.split(" ")[0]):s.isVisible(e)},_toggle(e,t){if(!e)return;t=Boolean(t);let n;this.cls?(n=s.includes(this.cls," ")||t!==s.hasClass(e,this.cls),n&&s.toggleClass(e,this.cls,s.includes(this.cls," ")?void 0:t)):(n=t===e.hidden,n&&(e.hidden=!t)),s.$$("[autofocus]",e).some(r=>s.isVisible(r)?r.focus()||!0:r.blur()),n&&s.trigger(e,"toggled",[t,this])}}};function Y(e,t,{_toggle:n}){return s.Animation.cancel(e),s.Transition.cancel(e),n(e,t)}async function X(e,t,{animation:n,duration:r,velocity:h,transition:a,_toggle:d}){var o;const[l="reveal",c="top"]=((o=n[0])==null?void 0:o.split("-"))||[],i=[["left","right"],["top","bottom"]],m=i[s.includes(i[0],c)?0:1],g=m[1]===c,T=["width","height"][i.indexOf(m)],v=`margin-${m[0]}`,A=`margin-${c}`;let x=s.dimensions(e)[T];const me=s.Transition.inProgress(e);await s.Transition.cancel(e),t&&d(e,!0);const pe=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",v,A].map(R=>[R,e.style[R]])),$=s.dimensions(e),D=s.toFloat(s.css(e,v)),F=s.toFloat(s.css(e,A)),f=$[T]+F;!me&&!t&&(x+=F);const[_]=s.wrapInner(e,"<div>");s.css(_,{boxSizing:"border-box",height:$.height,width:$.width,...s.css(e,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",A])}),s.css(e,{padding:0,border:0,minWidth:0,minHeight:0,[A]:0,width:$.width,height:$.height,overflow:"hidden",[T]:x});const M=x/f;r=(h*f+r)*(t?1-M:M);const W={[T]:t?f:0};g&&(s.css(e,v,f-x+D),W[v]=t?D:f+D),!g^l==="reveal"&&(s.css(_,v,-f+x),s.Transition.start(_,{[v]:t?0:-f},r,a));try{await s.Transition.start(e,W,r,a)}finally{s.css(e,pe),s.unwrap(_.firstChild),t||d(e,!1)}}function G(e,t,n){s.Animation.cancel(e);const{animation:r,duration:h,_toggle:a}=n;return t?(a(e,!0),s.Animation.in(e,r[0],h,n.origin)):s.Animation.out(e,r[1]||r[0],h,n.origin).then(()=>a(e,!1))}const p=[];var J={mixins:[H,q,V],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1},computed:{panel({selPanel:e},t){return s.$(e,t)},transitionElement(){return this.panel},bgClose({bgClose:e}){return e&&this.panel}},beforeDisconnect(){s.includes(p,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(e){const{current:t,defaultPrevented:n}=e,{hash:r}=t;!n&&r&&ee(t)&&!s.within(r,this.$el)&&s.$(r,document.body)?this.hide():s.matches(t,this.selClose)&&(e.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(p,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(p,this))return!1;!this.stack&&p.length?(Promise.all(p.map(t=>t.hide())).then(this.show),e.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 e=[this.overlay&&Q(this),this.overlay&&U(this.$el),this.bgClose&&Z(this),this.escClose&&k(this)];s.once(this.$el,"hidden",()=>e.forEach(t=>t&&t()),{self:!0}),s.addClass(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.$(":focus",this.$el)||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(e=>e.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(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,B)},hide(){return this.toggleElement(this.$el,!1,B)}}};function B(e,t,{transitionElement:n,_toggle:r}){return new Promise((h,a)=>s.once(e,"show hide",()=>{e._reject==null||e._reject(),e._reject=a,r(e,t);const d=s.once(n,"transitionstart",()=>{s.once(n,"transitionend transitioncancel",h,{self:!0}),clearTimeout(o)},{self:!0}),o=setTimeout(()=>{d(),h()},K(s.css(n,"transitionDuration")))})).then(()=>delete e._reject)}function K(e){return e?s.endsWith(e,"ms")?s.toFloat(e):s.toFloat(e)*1e3:0}function Q(e){return s.on(document,"focusin",t=>{s.last(p)===e&&!s.within(t.target,e.$el)&&e.$el.focus()})}function Z(e){return s.on(document,s.pointerDown,({target:t})=>{s.last(p)!==e||e.overlay&&!s.within(t,e.$el)||s.within(t,e.panel)||s.once(document,`${s.pointerUp} ${s.pointerCancel} scroll`,({defaultPrevented:n,type:r,target:h})=>{!n&&r===s.pointerUp&&t===h&&e.hide()},!0)})}function k(e){return s.on(document,"keydown",t=>{t.keyCode===27&&s.last(p)===e&&e.hide()})}let P;function U(e){const t=s.on(e,"touchmove",r=>{if(r.targetTouches.length!==1)return;let[{scrollHeight:h,clientHeight:a}]=s.scrollParents(r.target);a>=h&&r.cancelable&&r.preventDefault()},{passive:!1});if(P)return t;P=!0;const{scrollingElement:n}=document;return s.css(n,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:s.width(window)-n.clientWidth||""}),()=>{P=!1,t(),s.css(n,{overflowY:"",touchAction:"",paddingRight:""})}}function ee(e){return["origin","pathname","search"].every(t=>e[t]===location[t])}function se(e,t,n,{animation:r,easing:h}){const{percent:a,translate:d,show:o=s.noop}=r,l=o(n),c=new s.Deferred;return{dir:n,show(i,m=0,g){const w=g?"linear":h;return i-=Math.round(i*s.clamp(m,-1,1)),this.translate(m),C(t,"itemin",{percent:m,duration:i,timing:w,dir:n}),C(e,"itemout",{percent:1-m,duration:i,timing:w,dir:n}),Promise.all([s.Transition.start(t,l[1],i,w),s.Transition.start(e,l[0],i,w)]).then(()=>{this.reset(),c.resolve()},s.noop),c.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const i in l[0])s.css([t,e],i,"")},forward(i,m=this.percent()){return s.Transition.cancel([t,e]),this.show(i,m,!0)},translate(i){this.reset();const m=d(i,n);s.css(t,m[1]),s.css(e,m[0]),C(t,"itemtranslatein",{percent:i,dir:n}),C(e,"itemtranslateout",{percent:1-i,dir:n})},percent(){return a(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function C(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var te={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},ne={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const S={passive:!1,capture:!0},z={passive:!0,capture:!0},re="touchstart mousedown",E="touchmove mousemove",O="touchend touchcancel mouseup click input scroll";var oe={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const r=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=r===this.pos?this.prevPos:this.pos,this.pos=r,t(n)}}},events:[{name:re,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!s.isTouch(e)&&ae(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:E,el(){return this.list},handler:s.noop,...S}],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,E,this.move,S),s.on(document,O,this.end,z),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:r}=this,h=Math.abs(t),a=this.getIndex(r+this.dir,r),d=this._getDistance(r,a)||n[r].offsetWidth;for(;a!==r&&h>d;)this.drag-=d*this.dir,r=a,h-=d,a=this.getIndex(r+this.dir,r),d=this._getDistance(r,a)||n[r].offsetWidth;this.percent=h/d;const o=n[r],l=n[a],c=this.index!==a,i=r===a;let m;[this.index,this.prevIndex].filter(g=>!s.includes([a,r],g)).forEach(g=>{s.trigger(n[g],"itemhidden",[this]),i&&(m=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||m)&&s.trigger(n[this.index],"itemshown",[this]),c&&(this.prevIndex=r,this.index=a,!i&&s.trigger(o,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),o,!i&&l),c&&(!i&&s.trigger(o,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,E,this.move,S),s.off(document,O,this.end,z),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function ae(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var he={data:{selNav:!1},computed:{nav({selNav:e},t){return s.$(e,t)},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>`<li ${this.attrItem}="${t}"><a href></a></li>`).join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},ie={mixins:[ne,oe,he,te],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:e},t){return de(t.offsetWidth/e)},list({selList:e},t){return s.$(e,t)},maxIndex(){return this.length-1},slides:{get(){return s.children(this.list)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,t=!1){if(this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,h=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){if(n.length===2){var a;(a=this._transitioner)==null||a.forward(Math.min(this.duration,200))}return}const d=this.getIndex(this.index),o=s.hasClass(this.slides,this.clsActive)&&this.slides[d],l=this.getIndex(e,this.index),c=this.slides[l];if(o===c){h();return}if(this.dir=ce(e,d),this.prevIndex=d,this.index=l,o&&!s.trigger(o,"beforeitemhide",[this])||!s.trigger(c,"beforeitemshow",[this,o])){this.index=this.prevIndex,h();return}const i=this._show(o,c,t).then(()=>{o&&s.trigger(o,"itemhidden",[this]),s.trigger(c,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return o&&s.trigger(o,"itemhide",[this]),s.trigger(c,"itemshow",[this]),i},getIndex(e=this.index,t=this.index){return s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e=this.index,t=this.prevIndex){return this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:r}=this.stack;return this._transitioner[r>1?"forward":"show"](r>1?Math.min(this.duration,75+75/(r-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t=this.prevIndex,n=this.index){const r=this._getTransitioner(t!==n?t:!1,n);return r.translate(e),r},_getTransitioner(e=this.prevIndex,t=this.index,n=this.dir||1,r=this.transitionOptions){return new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),r)}}};function ce(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function de(e){return .5*e+300}var le={mixins:[ie],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:u,Transitioner:se},computed:{animation({animation:e,Animations:t}){return{...t[e]||t.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){s.addClass(e,this.clsActive)},itemshown({target:e}){s.addClass(e,this.clsActivated)},itemhidden({target:e}){s.removeClass(e,this.clsActive,this.clsActivated)}}},j={mixins:[J,le],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:N,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 e=s.$(this.template),t=s.$(this.selList,e);this.items.forEach(()=>s.append(t,"<li>")),this.$mount(s.append(this.container,e))},computed:{caption({selCaption:e},t){return s.$(e,t)}},events:[{name:`${s.pointerMove} ${s.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(e){e.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(e){if(!(!this.isToggled(this.$el)||!this.draggable))switch(e.keyCode){case 37:this.show("previous");break;case 39:this.show("next");break}}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=N.scale,s.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,t){const{source:n,type:r,alt:h="",poster:a,attrs:d={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let o;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(r==="image"||n.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const c=b("img",{src:n,alt:h,...d});s.on(c,"load",()=>this.setItem(t,c)),s.on(c,"error",()=>this.setError(t))}else if(r==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=b("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`,...d});s.on(c,"loadedmetadata",()=>this.setItem(t,c)),s.on(c,"error",()=>this.setError(t))}else if(r==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,b("iframe",{src:n,allowfullscreen:"",class:"uk-lightbox-iframe",...d}));else if(o=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,b("iframe",{src:`https://www.youtube${o[1]||""}.com/embed/${o[2]}${o[3]?`?${o[3]}`:""}`,width:1920,height:1080,...l,...d}));else if(o=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:i}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(n)}`,{credentials:"omit"})).json();this.setItem(t,b("iframe",{src:`https://player.vimeo.com/video/${o[1]}${o[2]?`?${o[2]}`:""}`,width:i,height:c,...l,...d}))}catch{this.setError(t)}}}],methods:{loadItem(e=this.index){const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e=this.index){return this.items[s.getIndex(e,this.slides)]},setItem(e,t){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(e),t)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<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 b(e,t){const n=s.fragment(`<${e}>`);return s.attr(n,t),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",j),j});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.24 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.25-dev.c6f5a4c4e | 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')) :
@@ -442,70 +442,25 @@
442
442
  self: true,
443
443
 
444
444
  handler() {
445
- uikitUtil.once(
446
- this.$el,
447
- 'hide',
448
- uikitUtil.on(document, 'focusin', (e) => {
449
- if (uikitUtil.last(active) === this && !uikitUtil.within(e.target, this.$el)) {
450
- this.$el.focus();
451
- }
452
- }));
453
-
454
-
455
- if (this.overlay) {
456
- uikitUtil.once(this.$el, 'hidden', preventBackgroundScroll(this.$el), { self: true });
457
- }
458
-
459
445
  if (this.stack) {
460
446
  uikitUtil.css(this.$el, 'zIndex', uikitUtil.toFloat(uikitUtil.css(this.$el, 'zIndex')) + active.length);
461
447
  }
462
448
 
463
- uikitUtil.addClass(document.documentElement, this.clsPage);
464
-
465
- if (this.bgClose) {
466
- uikitUtil.once(
467
- this.$el,
468
- 'hide',
469
- uikitUtil.on(document, uikitUtil.pointerDown, ({ target }) => {
470
- if (
471
- uikitUtil.last(active) !== this ||
472
- this.overlay && !uikitUtil.within(target, this.$el) ||
473
- uikitUtil.within(target, this.panel))
474
- {
475
- return;
476
- }
477
-
478
- uikitUtil.once(
479
- document,
480
- `${uikitUtil.pointerUp} ${uikitUtil.pointerCancel} scroll`,
481
- ({ defaultPrevented, type, target: newTarget }) => {
482
- if (
483
- !defaultPrevented &&
484
- type === uikitUtil.pointerUp &&
485
- target === newTarget)
486
- {
487
- this.hide();
488
- }
489
- },
490
- true);
449
+ const handlers = [
450
+ this.overlay && preventBackgroundFocus(this),
451
+ this.overlay && preventBackgroundScroll(this.$el),
452
+ this.bgClose && listenForBackgroundClose(this),
453
+ this.escClose && listenForEscClose(this)];
491
454
 
492
- }),
493
- { self: true });
494
455
 
495
- }
456
+ uikitUtil.once(
457
+ this.$el,
458
+ 'hidden',
459
+ () => handlers.forEach((handler) => handler && handler()),
460
+ { self: true });
496
461
 
497
- if (this.escClose) {
498
- uikitUtil.once(
499
- this.$el,
500
- 'hide',
501
- uikitUtil.on(document, 'keydown', (e) => {
502
- if (e.keyCode === 27 && uikitUtil.last(active) === this) {
503
- this.hide();
504
- }
505
- }),
506
- { self: true });
507
462
 
508
- }
463
+ uikitUtil.addClass(document.documentElement, this.clsPage);
509
464
  }
510
465
  },
511
466
 
@@ -596,6 +551,45 @@
596
551
  return time ? uikitUtil.endsWith(time, 'ms') ? uikitUtil.toFloat(time) : uikitUtil.toFloat(time) * 1000 : 0;
597
552
  }
598
553
 
554
+ function preventBackgroundFocus(modal) {
555
+ return uikitUtil.on(document, 'focusin', (e) => {
556
+ if (uikitUtil.last(active) === modal && !uikitUtil.within(e.target, modal.$el)) {
557
+ modal.$el.focus();
558
+ }
559
+ });
560
+ }
561
+
562
+ function listenForBackgroundClose(modal) {
563
+ return uikitUtil.on(document, uikitUtil.pointerDown, ({ target }) => {
564
+ if (
565
+ uikitUtil.last(active) !== modal ||
566
+ modal.overlay && !uikitUtil.within(target, modal.$el) ||
567
+ uikitUtil.within(target, modal.panel))
568
+ {
569
+ return;
570
+ }
571
+
572
+ uikitUtil.once(
573
+ document,
574
+ `${uikitUtil.pointerUp} ${uikitUtil.pointerCancel} scroll`,
575
+ ({ defaultPrevented, type, target: newTarget }) => {
576
+ if (!defaultPrevented && type === uikitUtil.pointerUp && target === newTarget) {
577
+ modal.hide();
578
+ }
579
+ },
580
+ true);
581
+
582
+ });
583
+ }
584
+
585
+ function listenForEscClose(modal) {
586
+ return uikitUtil.on(document, 'keydown', (e) => {
587
+ if (e.keyCode === 27 && uikitUtil.last(active) === modal) {
588
+ modal.hide();
589
+ }
590
+ });
591
+ }
592
+
599
593
  let prevented;
600
594
  function preventBackgroundScroll(el) {
601
595
  // 'overscroll-behavior: contain' only works consistently if el overflows (Safari)
@@ -775,7 +769,7 @@
775
769
  },
776
770
 
777
771
  stopAutoplay() {
778
- this.interval && clearInterval(this.interval);
772
+ clearInterval(this.interval);
779
773
  }
780
774
  }
781
775
  };
@@ -1493,12 +1487,9 @@
1493
1487
  type === 'image' ||
1494
1488
  src.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))
1495
1489
  {
1496
- try {
1497
- const { width, height } = await uikitUtil.getImage(src, attrs.srcset, attrs.size);
1498
- this.setItem(item, createEl('img', { src, width, height, alt, ...attrs }));
1499
- } catch (e) {
1500
- this.setError(item);
1501
- }
1490
+ const img = createEl('img', { src, alt, ...attrs });
1491
+ uikitUtil.on(img, 'load', () => this.setItem(item, img));
1492
+ uikitUtil.on(img, 'error', () => this.setError(item));
1502
1493
 
1503
1494
  // Video
1504
1495
  } else if (type === 'video' || src.match(/\.(mp4|webm|ogv)($|\?)/i)) {
@@ -1507,17 +1498,11 @@
1507
1498
  poster,
1508
1499
  controls: '',
1509
1500
  playsinline: '',
1510
- 'uk-video': `${this.videoAutoplay}`
1501
+ 'uk-video': `${this.videoAutoplay}`,
1502
+ ...attrs
1511
1503
  });
1512
1504
 
1513
- uikitUtil.on(video, 'loadedmetadata', () => {
1514
- uikitUtil.attr(video, {
1515
- width: video.videoWidth,
1516
- height: video.videoHeight,
1517
- ...attrs
1518
- });
1519
- this.setItem(item, video);
1520
- });
1505
+ uikitUtil.on(video, 'loadedmetadata', () => this.setItem(item, video));
1521
1506
  uikitUtil.on(video, 'error', () => this.setError(item));
1522
1507
 
1523
1508
  // Iframe
@@ -1559,9 +1544,7 @@
1559
1544
  `https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(
1560
1545
  src)
1561
1546
  }`,
1562
- {
1563
- credentials: 'omit'
1564
- })).
1547
+ { credentials: 'omit' })).
1565
1548
 
1566
1549
  json();
1567
1550