uikit 3.15.2 → 3.15.3-dev.45f4472ed
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 +11 -1
- package/dist/css/uikit-core-rtl.css +2 -2
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +2 -2
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +2 -2
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +2 -2
- 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 +102 -109
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +2 -4
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +2 -4
- 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 +4 -2
- 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 +4 -2
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +90 -96
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -3
- 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 +4 -8
- package/dist/js/uikit-core.min.js +2 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +109 -118
- package/dist/js/uikit.min.js +2 -2
- package/package.json +1 -1
- package/src/js/api/state.js +1 -1
- package/src/js/components/filter.js +12 -14
- package/src/js/core/cover.js +1 -1
- package/src/js/core/scrollspy.js +0 -2
- package/src/js/mixin/internal/animate-fade.js +50 -51
- package/src/js/mixin/internal/animate-slide.js +52 -57
- package/src/js/mixin/slider-reactive.js +2 -0
- package/src/js/mixin/slider.js +1 -1
- package/src/js/mixin/togglable.js +0 -2
- package/src/less/components/nav.less +1 -1
- package/src/less/components/navbar.less +2 -1
- package/src/scss/components/nav.scss +1 -1
- package/src/scss/components/navbar.scss +2 -1
- package/src/scss/variables-theme.scss +1 -0
- package/src/scss/variables.scss +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.3-dev.45f4472ed | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.3-dev.45f4472ed | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],i):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=i(e.UIkit.util))})(this,function(e){"use strict";var i={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}};const a=["days","hours","minutes","seconds"];var d={mixins:[i],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 s of a){const o=e.$(this.clsWrapper.replace("%unit%",s),this.$el);if(!o)continue;let t=String(Math.trunc(n[s]));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((h,u)=>o.children[u].textContent=h))}}}};function r(n){const s=n-Date.now();return{total:s,seconds:s/1e3%60,minutes:s/1e3/60%60,hours:s/1e3/60/60%24,days:s/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",d),d});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.3-dev.45f4472ed | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
|
|
82
82
|
const wrapIndexFn = (fn) => () => index === transitionIndex(target) ? fn() : Promise.reject();
|
|
83
83
|
|
|
84
|
-
const leaveFn = wrapIndexFn(() => {
|
|
84
|
+
const leaveFn = wrapIndexFn(async () => {
|
|
85
85
|
uikitUtil.addClass(target, clsLeave);
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
await Promise.all(
|
|
88
88
|
getTransitionNodes(target).map(
|
|
89
89
|
(child, i) =>
|
|
90
90
|
new Promise((resolve) =>
|
|
@@ -93,14 +93,16 @@
|
|
|
93
93
|
uikitUtil.Transition.start(child, propsOut, duration / 2, 'ease').then(
|
|
94
94
|
resolve),
|
|
95
95
|
|
|
96
|
-
i * stagger))))
|
|
96
|
+
i * stagger))));
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
uikitUtil.removeClass(target, clsLeave);
|
|
101
103
|
});
|
|
102
104
|
|
|
103
|
-
const enterFn = wrapIndexFn(() => {
|
|
105
|
+
const enterFn = wrapIndexFn(async () => {
|
|
104
106
|
const oldHeight = uikitUtil.height(target);
|
|
105
107
|
|
|
106
108
|
uikitUtil.addClass(target, clsEnter);
|
|
@@ -109,53 +111,42 @@
|
|
|
109
111
|
uikitUtil.css(uikitUtil.children(target), { opacity: 0 });
|
|
110
112
|
|
|
111
113
|
// Ensure UIkit updates have propagated
|
|
112
|
-
|
|
113
|
-
requestAnimationFrame(() => {
|
|
114
|
-
const nodes = uikitUtil.children(target);
|
|
115
|
-
const newHeight = uikitUtil.height(target);
|
|
116
|
-
|
|
117
|
-
// Ensure Grid cells do not stretch when height is applied
|
|
118
|
-
uikitUtil.css(target, 'alignContent', 'flex-start');
|
|
119
|
-
uikitUtil.height(target, oldHeight);
|
|
114
|
+
await awaitFrame$1();
|
|
120
115
|
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
const nodes = uikitUtil.children(target);
|
|
117
|
+
const newHeight = uikitUtil.height(target);
|
|
123
118
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
setTimeout(
|
|
128
|
-
() =>
|
|
129
|
-
uikitUtil.Transition.start(child, propsIn, duration / 2, 'ease').then(
|
|
130
|
-
resolve),
|
|
131
|
-
|
|
132
|
-
i * stagger)));
|
|
119
|
+
// Ensure Grid cells do not stretch when height is applied
|
|
120
|
+
uikitUtil.css(target, 'alignContent', 'flex-start');
|
|
121
|
+
uikitUtil.height(target, oldHeight);
|
|
133
122
|
|
|
123
|
+
const transitionNodes = getTransitionNodes(target);
|
|
124
|
+
uikitUtil.css(nodes, propsOut);
|
|
134
125
|
|
|
126
|
+
const transitions = transitionNodes.map(async (child, i) => {
|
|
127
|
+
await awaitTimeout(i * stagger);
|
|
128
|
+
await uikitUtil.Transition.start(child, propsIn, duration / 2, 'ease');
|
|
129
|
+
});
|
|
135
130
|
|
|
131
|
+
if (oldHeight !== newHeight) {
|
|
132
|
+
transitions.push(
|
|
133
|
+
uikitUtil.Transition.start(
|
|
134
|
+
target,
|
|
135
|
+
{ height: newHeight },
|
|
136
|
+
duration / 2 + transitionNodes.length * stagger,
|
|
137
|
+
'ease'));
|
|
136
138
|
|
|
137
|
-
if (oldHeight !== newHeight) {
|
|
138
|
-
transitions.push(
|
|
139
|
-
uikitUtil.Transition.start(
|
|
140
|
-
target,
|
|
141
|
-
{ height: newHeight },
|
|
142
|
-
duration / 2 + transitionNodes.length * stagger,
|
|
143
|
-
'ease'));
|
|
144
139
|
|
|
140
|
+
}
|
|
145
141
|
|
|
142
|
+
await Promise.all(transitions).then(() => {
|
|
143
|
+
uikitUtil.removeClass(target, clsEnter);
|
|
144
|
+
if (index === transitionIndex(target)) {
|
|
145
|
+
uikitUtil.css(target, { height: '', alignContent: '' });
|
|
146
|
+
uikitUtil.css(nodes, { opacity: '' });
|
|
147
|
+
delete target.dataset.transition;
|
|
146
148
|
}
|
|
147
|
-
|
|
148
|
-
Promise.all(transitions).then(() => {
|
|
149
|
-
uikitUtil.removeClass(target, clsEnter);
|
|
150
|
-
if (index === transitionIndex(target)) {
|
|
151
|
-
uikitUtil.css(target, { height: '', alignContent: '' });
|
|
152
|
-
uikitUtil.css(nodes, { opacity: '' });
|
|
153
|
-
delete target.dataset.transition;
|
|
154
|
-
}
|
|
155
|
-
resolve();
|
|
156
|
-
});
|
|
157
|
-
}));
|
|
158
|
-
|
|
149
|
+
});
|
|
159
150
|
});
|
|
160
151
|
|
|
161
152
|
return uikitUtil.hasClass(target, clsLeave) ?
|
|
@@ -197,63 +188,62 @@
|
|
|
197
188
|
|
|
198
189
|
}
|
|
199
190
|
|
|
200
|
-
function
|
|
201
|
-
return new Promise((resolve) =>
|
|
202
|
-
|
|
203
|
-
let nodes = uikitUtil.children(target);
|
|
191
|
+
function awaitFrame$1() {
|
|
192
|
+
return new Promise((resolve) => requestAnimationFrame(resolve));
|
|
193
|
+
}
|
|
204
194
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
195
|
+
function awaitTimeout(timeout) {
|
|
196
|
+
return new Promise((resolve) => setTimeout(resolve, timeout));
|
|
197
|
+
}
|
|
208
198
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
nodes.forEach(uikitUtil.Transition.cancel);
|
|
212
|
-
reset(target);
|
|
199
|
+
async function slide (action, target, duration) {
|
|
200
|
+
await awaitFrame();
|
|
213
201
|
|
|
214
|
-
|
|
215
|
-
action();
|
|
202
|
+
let nodes = uikitUtil.children(target);
|
|
216
203
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
// Reset to previous state
|
|
230
|
-
nodes.forEach((el, i) => propsFrom[i] && uikitUtil.css(el, propsFrom[i]));
|
|
231
|
-
uikitUtil.css(target, { display: 'block', ...targetProps });
|
|
232
|
-
|
|
233
|
-
// Start transitions on next frame
|
|
234
|
-
requestAnimationFrame(() => {
|
|
235
|
-
const transitions = nodes.
|
|
236
|
-
map(
|
|
237
|
-
(el, i) =>
|
|
238
|
-
uikitUtil.parent(el) === target &&
|
|
239
|
-
uikitUtil.Transition.start(el, propsTo[i], duration, 'ease')).
|
|
240
|
-
|
|
241
|
-
concat(uikitUtil.Transition.start(target, targetPropsTo, duration, 'ease'));
|
|
242
|
-
|
|
243
|
-
Promise.all(transitions).
|
|
244
|
-
then(() => {
|
|
245
|
-
nodes.forEach(
|
|
246
|
-
(el, i) =>
|
|
247
|
-
uikitUtil.parent(el) === target &&
|
|
248
|
-
uikitUtil.css(el, 'display', propsTo[i].opacity === 0 ? 'none' : ''));
|
|
249
|
-
|
|
250
|
-
reset(target);
|
|
251
|
-
}, uikitUtil.noop).
|
|
252
|
-
then(resolve);
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
}));
|
|
204
|
+
// Get current state
|
|
205
|
+
const currentProps = nodes.map((el) => getProps(el, true));
|
|
206
|
+
const targetProps = uikitUtil.css(target, ['height', 'padding']);
|
|
207
|
+
|
|
208
|
+
// Cancel previous animations
|
|
209
|
+
uikitUtil.Transition.cancel(target);
|
|
210
|
+
nodes.forEach(uikitUtil.Transition.cancel);
|
|
211
|
+
reset(target);
|
|
212
|
+
|
|
213
|
+
// Adding, sorting, removing nodes
|
|
214
|
+
action();
|
|
256
215
|
|
|
216
|
+
// Find new nodes
|
|
217
|
+
nodes = nodes.concat(uikitUtil.children(target).filter((el) => !uikitUtil.includes(nodes, el)));
|
|
218
|
+
|
|
219
|
+
// Wait for update to propagate
|
|
220
|
+
await Promise.resolve();
|
|
221
|
+
|
|
222
|
+
// Force update
|
|
223
|
+
uikitUtil.fastdom.flush();
|
|
224
|
+
|
|
225
|
+
// Get new state
|
|
226
|
+
const targetPropsTo = uikitUtil.css(target, ['height', 'padding']);
|
|
227
|
+
const [propsTo, propsFrom] = getTransitionProps(target, nodes, currentProps);
|
|
228
|
+
|
|
229
|
+
// Reset to previous state
|
|
230
|
+
nodes.forEach((el, i) => propsFrom[i] && uikitUtil.css(el, propsFrom[i]));
|
|
231
|
+
uikitUtil.css(target, { display: 'block', ...targetProps });
|
|
232
|
+
|
|
233
|
+
// Start transitions on next frame
|
|
234
|
+
await awaitFrame();
|
|
235
|
+
|
|
236
|
+
const transitions = nodes.
|
|
237
|
+
map((el, i) => uikitUtil.parent(el) === target && uikitUtil.Transition.start(el, propsTo[i], duration, 'ease')).
|
|
238
|
+
concat(uikitUtil.Transition.start(target, targetPropsTo, duration, 'ease'));
|
|
239
|
+
|
|
240
|
+
await Promise.all(transitions).then(() => {
|
|
241
|
+
nodes.forEach(
|
|
242
|
+
(el, i) =>
|
|
243
|
+
uikitUtil.parent(el) === target && uikitUtil.css(el, 'display', propsTo[i].opacity === 0 ? 'none' : ''));
|
|
244
|
+
|
|
245
|
+
reset(target);
|
|
246
|
+
}, uikitUtil.noop);
|
|
257
247
|
}
|
|
258
248
|
|
|
259
249
|
function getProps(el, opacity) {
|
|
@@ -332,6 +322,10 @@
|
|
|
332
322
|
return { top, left, height, width, marginLeft, marginTop, transform: '' };
|
|
333
323
|
}
|
|
334
324
|
|
|
325
|
+
function awaitFrame() {
|
|
326
|
+
return new Promise((resolve) => requestAnimationFrame(resolve));
|
|
327
|
+
}
|
|
328
|
+
|
|
335
329
|
var Animate = {
|
|
336
330
|
props: {
|
|
337
331
|
duration: Number,
|
|
@@ -389,7 +383,7 @@
|
|
|
389
383
|
},
|
|
390
384
|
|
|
391
385
|
watch() {
|
|
392
|
-
this
|
|
386
|
+
this.$emit();
|
|
393
387
|
|
|
394
388
|
if (this.selActive !== false) {
|
|
395
389
|
const actives = uikitUtil.$$(this.selActive, this.$el);
|
|
@@ -407,7 +401,7 @@
|
|
|
407
401
|
|
|
408
402
|
watch(list, old) {
|
|
409
403
|
if (old && !isEqualList(list, old)) {
|
|
410
|
-
this
|
|
404
|
+
this.$emit();
|
|
411
405
|
}
|
|
412
406
|
},
|
|
413
407
|
|
|
@@ -415,6 +409,12 @@
|
|
|
415
409
|
|
|
416
410
|
|
|
417
411
|
|
|
412
|
+
update: {
|
|
413
|
+
write() {
|
|
414
|
+
this.setState(this.getState(), false);
|
|
415
|
+
} },
|
|
416
|
+
|
|
417
|
+
|
|
418
418
|
events: [
|
|
419
419
|
{
|
|
420
420
|
name: 'click',
|
|
@@ -454,25 +454,18 @@
|
|
|
454
454
|
|
|
455
455
|
uikitUtil.trigger(this.$el, 'beforeFilter', [this, state]);
|
|
456
456
|
|
|
457
|
-
this.toggles
|
|
458
|
-
|
|
459
|
-
|
|
457
|
+
for (const el of this.toggles) {
|
|
458
|
+
uikitUtil.toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state));
|
|
459
|
+
}
|
|
460
460
|
|
|
461
461
|
await Promise.all(
|
|
462
462
|
uikitUtil.$$(this.target, this.$el).map((target) => {
|
|
463
|
-
const filterFn = () =>
|
|
464
|
-
applyState(state, target, uikitUtil.children(target));
|
|
465
|
-
this.$update(this.$el);
|
|
466
|
-
};
|
|
463
|
+
const filterFn = () => applyState(state, target, uikitUtil.children(target));
|
|
467
464
|
return animate ? this.animate(filterFn, target) : filterFn();
|
|
468
465
|
}));
|
|
469
466
|
|
|
470
467
|
|
|
471
468
|
uikitUtil.trigger(this.$el, 'afterFilter', [this]);
|
|
472
|
-
},
|
|
473
|
-
|
|
474
|
-
updateState() {
|
|
475
|
-
uikitUtil.fastdom.write(() => this.setState(this.getState(), false));
|
|
476
469
|
} } };
|
|
477
470
|
|
|
478
471
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.3-dev.45f4472ed | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],m):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=m(n.UIkit.util))})(this,function(n){"use strict";function m(s){return A(s,"top","bottom")}function A(s,e,o){const t=[[]];for(const a of s){if(!n.isVisible(a))continue;let c=l(a);for(let r=t.length-1;r>=0;r--){const f=t[r];if(!f[0]){f.push(a);break}let d;if(f[0].offsetParent===a.offsetParent?d=l(f[0]):(c=l(a,!0),d=l(f[0],!0)),c[e]>=d[o]-1&&c[e]!==d[e]){t.push([a]);break}if(c[o]-1>d[e]||c[e]===d[e]){f.push(a);break}if(r===0){t.unshift([a]);break}}}return t}function l(s,e){e===void 0&&(e=!1);let{offsetTop:o,offsetLeft:t,offsetHeight:a,offsetWidth:c}=s;return e&&([o,t]=n.offsetPosition(s)),{top:o,left:t,bottom:o+a,right:t+c}}const y="uk-transition-leave",g="uk-transition-enter";function v(s,e,o,t){t===void 0&&(t=0);const a=u(e,!0),c={opacity:1},r={opacity:0},f=i=>()=>a===u(e)?i():Promise.reject(),d=f(async()=>{n.addClass(e,y),await Promise.all(I(e).map((i,h)=>new Promise(w=>setTimeout(()=>n.Transition.start(i,r,o/2,"ease").then(w),h*t)))),n.removeClass(e,y)}),p=f(async()=>{const i=n.height(e);n.addClass(e,g),s(),n.css(n.children(e),{opacity:0}),await L();const h=n.children(e),w=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,i);const x=I(e);n.css(h,r);const q=x.map(async(R,G)=>{await z(G*t),await n.Transition.start(R,c,o/2,"ease")});i!==w&&q.push(n.Transition.start(e,{height:w},o/2+x.length*t,"ease")),await Promise.all(q).then(()=>{n.removeClass(e,g),a===u(e)&&(n.css(e,{height:"",alignContent:""}),n.css(h,{opacity:""}),delete e.dataset.transition)})});return n.hasClass(e,y)?T(e).then(p):n.hasClass(e,g)?T(e).then(d).then(p):d().then(p)}function u(s,e){return e&&(s.dataset.transition=1+u(s)),n.toNumber(s.dataset.transition)||0}function T(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 m(n.children(s)).reduce((e,o)=>e.concat(n.sortBy(o.filter(t=>n.isInView(t)),"offsetLeft")),[])}function L(){return new Promise(s=>requestAnimationFrame(s))}function z(s){return new Promise(e=>setTimeout(e,s))}async function B(s,e,o){await P();let t=n.children(e);const a=t.map(i=>F(i,!0)),c=n.css(e,["height","padding"]);n.Transition.cancel(e),t.forEach(n.Transition.cancel),$(e),s(),t=t.concat(n.children(e).filter(i=>!n.includes(t,i))),await Promise.resolve(),n.fastdom.flush();const r=n.css(e,["height","padding"]),[f,d]=V(e,t,a);t.forEach((i,h)=>d[h]&&n.css(i,d[h])),n.css(e,{display:"block",...c}),await P();const p=t.map((i,h)=>n.parent(i)===e&&n.Transition.start(i,f[h],o,"ease")).concat(n.Transition.start(e,r,o,"ease"));await Promise.all(p).then(()=>{t.forEach((i,h)=>n.parent(i)===e&&n.css(i,"display",f[h].opacity===0?"none":"")),$(e)},n.noop)}function F(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,...b(s)}:!1}function V(s,e,o){const t=e.map((c,r)=>n.parent(c)&&r in o?o[r]?n.isVisible(c)?b(c):{opacity:0}:{opacity:n.isVisible(c)?1:0}:!1),a=t.map((c,r)=>{const f=n.parent(e[r])===s&&(o[r]||F(e[r]));if(!f)return!1;if(!c)delete f.opacity;else if(!("opacity"in c)){const{opacity:d}=f;d%1?c.opacity=1:delete f.opacity}return f});return[t,a]}function $(s){n.css(s.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),n.css(s,{height:"",display:"",padding:""})}function b(s){const{height:e,width:o}=n.offset(s),{top:t,left:a}=n.position(s),{marginLeft:c,marginTop:r}=n.css(s,["marginTop","marginLeft"]);return{top:t,left:a,height:e,width:o,marginLeft:c,marginTop:r,transform:""}}function P(){return new Promise(s=>requestAnimationFrame(s))}var N={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e){e===void 0&&(e=this.$el);const o=this.animation;return(o==="fade"?v:o==="delayed-fade"?function(){for(var a=arguments.length,c=new Array(a),r=0;r<a;r++)c[r]=arguments[r];return v(...c,40)}:o?B:()=>(s(),Promise.resolve()))(s,e,this.duration).then(()=>this.$update(e,"resize"),n.noop)}}},S={mixins:[N],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get(s,e){let{attrItem:o}=s;return n.$$("["+o+"],[data-"+o+"]",e)},watch(){if(this.$emit(),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(s,e){let{target:o}=s;return n.$$(o+" > *",e)},watch(s,e){e&&!D(s,e)&&this.$emit()},immediate:!0}},update:{write(){this.setState(this.getState(),!1)}},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());O(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){e===void 0&&(e=!0),s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]);for(const o of this.toggles)n.toggleClass(o,this.cls,!!j(o,this.attrItem,s));await Promise.all(n.$$(this.target,this.$el).map(o=>{const t=()=>H(s,o,n.children(o));return e?this.animate(t,o):t()})),n.trigger(this.$el,"afterFilter",[this])}}};function C(s,e){return n.parseOptions(n.data(s,e),["filter"])}function O(s,e){return["filter","sort"].every(o=>n.isEqual(s[o],e[o]))}function H(s,e,o){const t=W(s);o.forEach(r=>n.css(r,"display",t&&!n.matches(r,t)?"none":""));const[a,c]=s.sort;if(a){const r=M(o,a,c);n.isEqual(r,o)||n.append(e,r)}}function E(s,e,o){const t=C(s,e),{filter:a,group:c,sort:r,order:f="asc"}=t;return(a||n.isUndefined(r))&&(c?a?(delete o.filter[""],o.filter[c]=a):(delete o.filter[c],(n.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":a||""})):o.filter={"":a||""}),n.isUndefined(r)||(o.sort=[r,f]),o}function j(s,e,o){let{filter:t={"":""},sort:[a,c]}=o;const{filter:r="",group:f="",sort:d,order:p="asc"}=C(s,e);return n.isUndefined(d)?f in t&&r===t[f]||!r&&f&&!(f in t)&&!t[""]:a===d&&c===p}function D(s,e){return s.length===e.length&&s.every(o=>e.includes(o))}function W(s){let{filter:e}=s,o="";return n.each(e,t=>o+=t||""),o}function M(s,e,o){return[...s].sort((t,a)=>n.data(t,e).localeCompare(n.data(a,e),void 0,{numeric:!0})*(o==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",S),S});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.3-dev.45f4472ed | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -153,7 +153,6 @@
|
|
|
153
153
|
const done = () => {
|
|
154
154
|
uikitUtil.removeClass(el, cls);
|
|
155
155
|
uikitUtil.trigger(el, show ? 'shown' : 'hidden', [this]);
|
|
156
|
-
this.$update(el);
|
|
157
156
|
};
|
|
158
157
|
|
|
159
158
|
return promise ?
|
|
@@ -198,7 +197,6 @@
|
|
|
198
197
|
|
|
199
198
|
if (changed) {
|
|
200
199
|
uikitUtil.trigger(el, 'toggled', [toggled, this]);
|
|
201
|
-
this.$update(el);
|
|
202
200
|
}
|
|
203
201
|
} } };
|
|
204
202
|
|
|
@@ -1157,7 +1155,7 @@
|
|
|
1157
1155
|
},
|
|
1158
1156
|
|
|
1159
1157
|
watch() {
|
|
1160
|
-
this.$
|
|
1158
|
+
this.$emit('resize');
|
|
1161
1159
|
} },
|
|
1162
1160
|
|
|
1163
1161
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.2 | https://www.getuikit.com | (c) 2014 - 2022 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:y(e*-100)},{transform:y()}]},percent(e){return H(e)},translate(e,t){return[{transform:y(t*-100*e)},{transform:y(t*100*(1-e))}]}}};function H(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function y(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function C(e){return"scale3d("+e+", "+e+", 1)"}var D={...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:C(1-.2)},{opacity:1,transform:C(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:C(1-.2*e)},{opacity:e,transform:C(1-.2+.2*e)}]}}},N={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},Y={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},B={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(e){let{animation:t}=e;return!!t[0]},hasTransition(e){let{animation:t}=e;return["slide","reveal"].some(n=>s.startsWith(t[0],n))}},methods:{toggleElement(e,t,n){return new Promise(r=>Promise.all(s.toNodes(e).map(o=>{const a=s.isBoolean(t)?t:!this.isToggled(o);if(!s.trigger(o,"before"+(a?"show":"hide"),[this]))return Promise.reject();const i=(s.isFunction(n)?n:n===!1||!this.hasAnimation?q(this):this.hasTransition?V(this):X(this))(o,a),d=a?this.clsEnter:this.clsLeave;s.addClass(o,d),s.trigger(o,a?"show":"hide",[this]);const l=()=>{s.removeClass(o,d),s.trigger(o,a?"shown":"hidden",[this]),this.$update(o)};return i?i.then(l,()=>(s.removeClass(o,d),Promise.reject())):l()})).then(r,s.noop))},isToggled(e){return e===void 0&&(e=this.$el),[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]),this.$update(e))}}};function q(e){let{_toggle:t}=e;return(n,r)=>(s.Animation.cancel(n),s.Transition.cancel(n),t(n,r))}function V(e){var t;const[n="reveal",r="top"]=((t=e.animation[0])==null?void 0:t.split("-"))||[],o=[["left","right"],["top","bottom"]],a=o[s.includes(o[0],r)?0:1],i=a[1]===r,l=["width","height"][o.indexOf(a)],c="margin-"+a[0],m="margin-"+r;return async(h,g)=>{let{duration:v,velocity:w,transition:j,_toggle:M}=e,I=s.dimensions(h)[l];const de=s.Transition.inProgress(h);await s.Transition.cancel(h),g&&M(h,!0);const ce=Object.fromEntries(["padding","border","width","height","overflowY","overflowX",c,m].map(F=>[F,h.style[F]])),$=s.dimensions(h),E=s.toFloat(s.css(h,c)),W=s.toFloat(s.css(h,m)),p=$[l]+W;!de&&!g&&(I+=W);const[A]=s.wrapInner(h,"<div>");s.css(A,{boxSizing:"border-box",height:$.height,width:$.width,...s.css(h,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",m])}),s.css(h,{padding:0,border:0,minWidth:0,minHeight:0,[m]:0,width:$.width,height:$.height,overflow:"hidden",[l]:I});const R=I/p;v=(w*p+v)*(g?1-R:R);const L={[l]:g?p:0};i&&(s.css(h,c,p-I+E),L[c]=g?E:p+E),!i^n==="reveal"&&(s.css(A,c,-p+I),s.Transition.start(A,{[c]:g?0:-p},v,j));try{await s.Transition.start(h,L,v,j)}finally{s.css(h,ce),s.unwrap(A.firstChild),g||M(h,!1)}}}function X(e){return(t,n)=>{s.Animation.cancel(t);const{animation:r,duration:o,_toggle:a}=e;return n?(a(t,!0),s.Animation.in(t,r[0],o,e.origin)):s.Animation.out(t,r[1]||r[0],o,e.origin).then(()=>a(t,!1))}}const f=[];var G={mixins:[Y,N,B],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(e,t){let{selPanel:n}=e;return s.$(n,t)},transitionElement(){return this.panel},bgClose(e){let{bgClose:t}=e;return t&&this.panel}},beforeDisconnect(){s.includes(f,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(f,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(f,this))return!1;!this.stack&&f.length?(Promise.all(f.map(t=>t.hide())).then(this.show),e.preventDefault()):f.push(this)}},{name:"show",self:!0,handler(){s.once(this.$el,"hide",s.on(document,"focusin",e=>{s.last(f)===this&&!s.within(e.target,this.$el)&&this.$el.focus()})),this.overlay&&(s.once(this.$el,"hidden",K(this.$el),{self:!0}),s.once(this.$el,"hidden",Q(),{self:!0})),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+f.length),s.addClass(document.documentElement,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,e=>{let{target:t}=e;s.last(f)!==this||this.overlay&&!s.within(t,this.$el)||s.within(t,this.panel)||s.once(document,s.pointerUp+" "+s.pointerCancel+" scroll",n=>{let{defaultPrevented:r,type:o,target:a}=n;!r&&o===s.pointerUp&&t===a&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",e=>{e.keyCode===27&&s.last(f)===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(f,this)&&f.splice(f.indexOf(this),1),s.css(this.$el,"zIndex",""),f.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,O(this))},hide(){return this.toggleElement(this.$el,!1,O(this))}}};function O(e){let{transitionElement:t,_toggle:n}=e;return(r,o)=>new Promise((a,i)=>s.once(r,"show hide",()=>{r._reject==null||r._reject(),r._reject=i,n(r,o);const d=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{d(),a()},J(s.css(t,"transitionDuration")))})).then(()=>delete r._reject)}function J(e){return e?s.endsWith(e,"ms")?s.toFloat(e):s.toFloat(e)*1e3:0}function K(e){if(CSS.supports("overscroll-behavior","contain")){const r=Z(e,o=>/auto|scroll/.test(s.css(o,"overflow")));return s.css(r,"overscrollBehavior","contain"),()=>s.css(r,"overscrollBehavior","")}let t;const n=[s.on(e,"touchstart",r=>{let{targetTouches:o}=r;o.length===1&&(t=o[0].clientY)},{passive:!0}),s.on(e,"touchmove",r=>{if(r.targetTouches.length!==1)return;let[o]=s.scrollParents(r.target,/auto|scroll/);s.within(o,e)||(o=e);const a=r.targetTouches[0].clientY-t,{scrollTop:i,scrollHeight:d,clientHeight:l}=o;(l>=d||i===0&&a>0||d-i<=l&&a<0)&&r.cancelable&&r.preventDefault()},{passive:!1})];return()=>n.forEach(r=>r())}let _;function Q(){if(_)return s.noop;_=!0;const{scrollingElement:e}=document;return s.css(e,{overflowY:"hidden",touchAction:"none",paddingRight:s.width(window)-e.clientWidth}),()=>{_=!1,s.css(e,{overflowY:"",touchAction:"",paddingRight:""})}}function Z(e,t){const n=[];return s.apply(e,r=>{t(r)&&n.push(r)}),n}function k(e,t,n,r){let{animation:o,easing:a}=r;const{percent:i,translate:d,show:l=s.noop}=o,c=l(n),m=new s.Deferred;return{dir:n,show(h,g,v){g===void 0&&(g=0);const w=v?"linear":a;return h-=Math.round(h*s.clamp(g,-1,1)),this.translate(g),T(t,"itemin",{percent:g,duration:h,timing:w,dir:n}),T(e,"itemout",{percent:1-g,duration:h,timing:w,dir:n}),Promise.all([s.Transition.start(t,c[1],h,w),s.Transition.start(e,c[0],h,w)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const h in c[0])s.css([t,e],h,"")},forward(h,g){return g===void 0&&(g=this.percent()),s.Transition.cancel([t,e]),this.show(h,g,!0)},translate(h){this.reset();const g=d(h,n);s.css(t,g[1]),s.css(e,g[0]),T(t,"itemtranslatein",{percent:h,dir:n}),T(e,"itemtranslateout",{percent:1-h,dir:n})},percent(){return i(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function T(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 b={passive:!1,capture:!0},se="touchstart mousedown",P="touchmove mousemove",S="touchend touchcancel mouseup click input";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,delegate(){return this.selSlides},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:P+" "+S,el(){return this.list},handler:s.noop,...b}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,P,this.move,b),s.on(document,S,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,o=Math.abs(t),a=this.getIndex(r+this.dir,r),i=this._getDistance(r,a)||n[r].offsetWidth;for(;a!==r&&o>i;)this.drag-=i*this.dir,r=a,o-=i,a=this.getIndex(r+this.dir,r),i=this._getDistance(r,a)||n[r].offsetWidth;this.percent=o/i;const d=n[r],l=n[a],c=this.index!==a,m=r===a;let h;[this.index,this.prevIndex].filter(g=>!s.includes([a,r],g)).forEach(g=>{s.trigger(n[g],"itemhidden",[this]),m&&(h=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||h)&&s.trigger(n[this.index],"itemshown",[this]),c&&(this.prevIndex=r,this.index=a,!m&&s.trigger(d,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),d,!m&&l),c&&(!m&&s.trigger(d,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,P,this.move,b),s.off(document,S,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!e.children.length&&e.childNodes.length}var re={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},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,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return ie(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,o=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),i=s.hasClass(this.slides,this.clsActive)&&this.slides[a],d=this.getIndex(e,this.index),l=this.slides[d];if(i===l){o();return}if(this.dir=ae(e,a),this.prevIndex=a,this.index=d,i&&!s.trigger(i,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,o();return}const c=this._show(i,l,t).then(()=>(i&&s.trigger(i,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return i&&s.trigger(i,"itemhide",[this]),s.trigger(l,"itemshow",[this]),c},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),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,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const r=this._getTransitioner(t!==n?t:!1,n);return r.translate(e),r},_getTransitioner(e,t,n,r){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),r===void 0&&(r=this.transitionOptions),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 ie(e){return .5*e+300}var he={mixins:[oe],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:u,Transitioner:k},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},z={mixins:[N,G,B,he],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:D,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(e,t){let{selCaption:n}=e;return s.$(n,t)}},events:[{name:s.pointerMove+" "+s.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},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=D.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:o="",poster:a,attrs:i={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let d;const l={frameborder:"0",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:c,height:m}=await s.getImage(n,i.srcset,i.size);this.setItem(t,x("img",{src:n,width:c,height:m,alt:o,...i}))}catch{this.setError(t)}else if(r==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=x("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...i});s.on(c,"loadedmetadata",()=>{s.attr(c,{width:c.videoWidth,height:c.videoHeight}),this.setItem(t,c)}),s.on(c,"error",()=>this.setError(t))}else if(r==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,x("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...i}));else if(d=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,x("iframe",{src:"https://www.youtube"+(d[1]||"")+".com/embed/"+d[2]+(d[3]?"?"+d[3]:""),width:1920,height:1080,...l,...i}));else if(d=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,x("iframe",{src:"https://player.vimeo.com/video/"+d[1]+(d[2]?"?"+d[2]:""),width:m,height:c,...l,...i}))}catch{this.setError(t)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e){return e===void 0&&(e=this.index),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 x(e,t){const n=s.fragment("<"+e+">");return s.attr(n,t),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",z),z});
|
|
1
|
+
/*! UIkit 3.15.3-dev.45f4472ed | https://www.getuikit.com | (c) 2014 - 2022 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:$(e*-100)},{transform:$()}]},percent(e){return H(e)},translate(e,t){return[{transform:$(t*-100*e)},{transform:$(t*100*(1-e))}]}}};function H(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function $(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function C(e){return"scale3d("+e+", "+e+", 1)"}var D={...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:C(1-.2)},{opacity:1,transform:C(1)}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:C(1-.2*e)},{opacity:e,transform:C(1-.2+.2*e)}]}}},N={props:{container:Boolean},data:{container:!0},computed:{container(e){let{container:t}=e;return t===!0&&this.$container||t&&s.$(t)}}},Y={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},B={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(e){let{animation:t}=e;return!!t[0]},hasTransition(e){let{animation:t}=e;return["slide","reveal"].some(n=>s.startsWith(t[0],n))}},methods:{toggleElement(e,t,n){return new Promise(r=>Promise.all(s.toNodes(e).map(o=>{const a=s.isBoolean(t)?t:!this.isToggled(o);if(!s.trigger(o,"before"+(a?"show":"hide"),[this]))return Promise.reject();const i=(s.isFunction(n)?n:n===!1||!this.hasAnimation?q(this):this.hasTransition?V(this):X(this))(o,a),d=a?this.clsEnter:this.clsLeave;s.addClass(o,d),s.trigger(o,a?"show":"hide",[this]);const l=()=>{s.removeClass(o,d),s.trigger(o,a?"shown":"hidden",[this])};return i?i.then(l,()=>(s.removeClass(o,d),Promise.reject())):l()})).then(r,s.noop))},isToggled(e){return e===void 0&&(e=this.$el),[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 q(e){let{_toggle:t}=e;return(n,r)=>(s.Animation.cancel(n),s.Transition.cancel(n),t(n,r))}function V(e){var t;const[n="reveal",r="top"]=((t=e.animation[0])==null?void 0:t.split("-"))||[],o=[["left","right"],["top","bottom"]],a=o[s.includes(o[0],r)?0:1],i=a[1]===r,l=["width","height"][o.indexOf(a)],c="margin-"+a[0],m="margin-"+r;return async(h,g)=>{let{duration:v,velocity:w,transition:j,_toggle:M}=e,I=s.dimensions(h)[l];const de=s.Transition.inProgress(h);await s.Transition.cancel(h),g&&M(h,!0);const ce=Object.fromEntries(["padding","border","width","height","overflowY","overflowX",c,m].map(F=>[F,h.style[F]])),y=s.dimensions(h),E=s.toFloat(s.css(h,c)),W=s.toFloat(s.css(h,m)),p=y[l]+W;!de&&!g&&(I+=W);const[A]=s.wrapInner(h,"<div>");s.css(A,{boxSizing:"border-box",height:y.height,width:y.width,...s.css(h,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",m])}),s.css(h,{padding:0,border:0,minWidth:0,minHeight:0,[m]:0,width:y.width,height:y.height,overflow:"hidden",[l]:I});const R=I/p;v=(w*p+v)*(g?1-R:R);const L={[l]:g?p:0};i&&(s.css(h,c,p-I+E),L[c]=g?E:p+E),!i^n==="reveal"&&(s.css(A,c,-p+I),s.Transition.start(A,{[c]:g?0:-p},v,j));try{await s.Transition.start(h,L,v,j)}finally{s.css(h,ce),s.unwrap(A.firstChild),g||M(h,!1)}}}function X(e){return(t,n)=>{s.Animation.cancel(t);const{animation:r,duration:o,_toggle:a}=e;return n?(a(t,!0),s.Animation.in(t,r[0],o,e.origin)):s.Animation.out(t,r[1]||r[0],o,e.origin).then(()=>a(t,!1))}}const f=[];var G={mixins:[Y,N,B],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(e,t){let{selPanel:n}=e;return s.$(n,t)},transitionElement(){return this.panel},bgClose(e){let{bgClose:t}=e;return t&&this.panel}},beforeDisconnect(){s.includes(f,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return this.selClose},handler(e){e.preventDefault(),this.hide()}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===s.includes(f,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(s.includes(f,this))return!1;!this.stack&&f.length?(Promise.all(f.map(t=>t.hide())).then(this.show),e.preventDefault()):f.push(this)}},{name:"show",self:!0,handler(){s.once(this.$el,"hide",s.on(document,"focusin",e=>{s.last(f)===this&&!s.within(e.target,this.$el)&&this.$el.focus()})),this.overlay&&(s.once(this.$el,"hidden",K(this.$el),{self:!0}),s.once(this.$el,"hidden",Q(),{self:!0})),this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+f.length),s.addClass(document.documentElement,this.clsPage),this.bgClose&&s.once(this.$el,"hide",s.on(document,s.pointerDown,e=>{let{target:t}=e;s.last(f)!==this||this.overlay&&!s.within(t,this.$el)||s.within(t,this.panel)||s.once(document,s.pointerUp+" "+s.pointerCancel+" scroll",n=>{let{defaultPrevented:r,type:o,target:a}=n;!r&&o===s.pointerUp&&t===a&&this.hide()},!0)}),{self:!0}),this.escClose&&s.once(this.$el,"hide",s.on(document,"keydown",e=>{e.keyCode===27&&s.last(f)===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(f,this)&&f.splice(f.indexOf(this),1),s.css(this.$el,"zIndex",""),f.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(this))},hide(){return this.toggleElement(this.$el,!1,z(this))}}};function z(e){let{transitionElement:t,_toggle:n}=e;return(r,o)=>new Promise((a,i)=>s.once(r,"show hide",()=>{r._reject==null||r._reject(),r._reject=i,n(r,o);const d=s.once(t,"transitionstart",()=>{s.once(t,"transitionend transitioncancel",a,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{d(),a()},J(s.css(t,"transitionDuration")))})).then(()=>delete r._reject)}function J(e){return e?s.endsWith(e,"ms")?s.toFloat(e):s.toFloat(e)*1e3:0}function K(e){if(CSS.supports("overscroll-behavior","contain")){const r=Z(e,o=>/auto|scroll/.test(s.css(o,"overflow")));return s.css(r,"overscrollBehavior","contain"),()=>s.css(r,"overscrollBehavior","")}let t;const n=[s.on(e,"touchstart",r=>{let{targetTouches:o}=r;o.length===1&&(t=o[0].clientY)},{passive:!0}),s.on(e,"touchmove",r=>{if(r.targetTouches.length!==1)return;let[o]=s.scrollParents(r.target,/auto|scroll/);s.within(o,e)||(o=e);const a=r.targetTouches[0].clientY-t,{scrollTop:i,scrollHeight:d,clientHeight:l}=o;(l>=d||i===0&&a>0||d-i<=l&&a<0)&&r.cancelable&&r.preventDefault()},{passive:!1})];return()=>n.forEach(r=>r())}let _;function Q(){if(_)return s.noop;_=!0;const{scrollingElement:e}=document;return s.css(e,{overflowY:"hidden",touchAction:"none",paddingRight:s.width(window)-e.clientWidth}),()=>{_=!1,s.css(e,{overflowY:"",touchAction:"",paddingRight:""})}}function Z(e,t){const n=[];return s.apply(e,r=>{t(r)&&n.push(r)}),n}function k(e,t,n,r){let{animation:o,easing:a}=r;const{percent:i,translate:d,show:l=s.noop}=o,c=l(n),m=new s.Deferred;return{dir:n,show(h,g,v){g===void 0&&(g=0);const w=v?"linear":a;return h-=Math.round(h*s.clamp(g,-1,1)),this.translate(g),T(t,"itemin",{percent:g,duration:h,timing:w,dir:n}),T(e,"itemout",{percent:1-g,duration:h,timing:w,dir:n}),Promise.all([s.Transition.start(t,c[1],h,w),s.Transition.start(e,c[0],h,w)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const h in c[0])s.css([t,e],h,"")},forward(h,g){return g===void 0&&(g=this.percent()),s.Transition.cancel([t,e]),this.show(h,g,!0)},translate(h){this.reset();const g=d(h,n);s.css(t,g[1]),s.css(e,g[0]),T(t,"itemtranslatein",{percent:h,dir:n}),T(e,"itemtranslateout",{percent:1-h,dir:n})},percent(){return i(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function T(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 b={passive:!1,capture:!0},se="touchstart mousedown",P="touchmove mousemove",S="touchend touchcancel mouseup click input";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,delegate(){return this.selSlides},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:P+" "+S,el(){return this.list},handler:s.noop,...b}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,P,this.move,b),s.on(document,S,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,o=Math.abs(t),a=this.getIndex(r+this.dir,r),i=this._getDistance(r,a)||n[r].offsetWidth;for(;a!==r&&o>i;)this.drag-=i*this.dir,r=a,o-=i,a=this.getIndex(r+this.dir,r),i=this._getDistance(r,a)||n[r].offsetWidth;this.percent=o/i;const d=n[r],l=n[a],c=this.index!==a,m=r===a;let h;[this.index,this.prevIndex].filter(g=>!s.includes([a,r],g)).forEach(g=>{s.trigger(n[g],"itemhidden",[this]),m&&(h=!0,this.prevIndex=r)}),(this.index===r&&this.prevIndex!==r||h)&&s.trigger(n[this.index],"itemshown",[this]),c&&(this.prevIndex=r,this.index=a,!m&&s.trigger(d,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),d,!m&&l),c&&(!m&&s.trigger(d,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,P,this.move,b),s.off(document,S,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!e.children.length&&e.childNodes.length}var re={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},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,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return ie(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,r=t?0:n.length,o=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const a=this.getIndex(this.index),i=s.hasClass(this.slides,this.clsActive)&&this.slides[a],d=this.getIndex(e,this.index),l=this.slides[d];if(i===l){o();return}if(this.dir=ae(e,a),this.prevIndex=a,this.index=d,i&&!s.trigger(i,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,i])){this.index=this.prevIndex,o();return}const c=this._show(i,l,t).then(()=>(i&&s.trigger(i,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(m=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return i&&s.trigger(i,"itemhide",[this]),s.trigger(l,"itemshow",[this]),c},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),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,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const r=this._getTransitioner(t!==n?t:!1,n);return r.translate(e),r},_getTransitioner(e,t,n,r){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),r===void 0&&(r=this.transitionOptions),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 ie(e){return .5*e+300}var he={mixins:[oe],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:u,Transitioner:k},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},O={mixins:[N,G,B,he],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:D,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(e,t){let{selCaption:n}=e;return s.$(n,t)}},events:[{name:s.pointerMove+" "+s.pointerDown+" keydown",handler:"showControls"},{name:"click",self:!0,delegate(){return this.selSlides},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=D.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:o="",poster:a,attrs:i={}}=t;if(this.setItem(t,"<span uk-spinner></span>"),!n)return;let d;const l={frameborder:"0",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:c,height:m}=await s.getImage(n,i.srcset,i.size);this.setItem(t,x("img",{src:n,width:c,height:m,alt:o,...i}))}catch{this.setError(t)}else if(r==="video"||n.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=x("video",{src:n,poster:a,controls:"",playsinline:"","uk-video":""+this.videoAutoplay,...i});s.on(c,"loadedmetadata",()=>{s.attr(c,{width:c.videoWidth,height:c.videoHeight}),this.setItem(t,c)}),s.on(c,"error",()=>this.setError(t))}else if(r==="iframe"||n.match(/\.(html|php)($|\?)/i))this.setItem(t,x("iframe",{src:n,frameborder:"0",allowfullscreen:"",class:"uk-lightbox-iframe",...i}));else if(d=n.match(/\/\/(?:.*?youtube(-nocookie)?\..*?[?&]v=|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(t,x("iframe",{src:"https://www.youtube"+(d[1]||"")+".com/embed/"+d[2]+(d[3]?"?"+d[3]:""),width:1920,height:1080,...l,...i}));else if(d=n.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:m}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url="+encodeURI(n),{credentials:"omit"})).json();this.setItem(t,x("iframe",{src:"https://player.vimeo.com/video/"+d[1]+(d[2]?"?"+d[2]:""),width:m,height:c,...l,...i}))}catch{this.setError(t)}}}],methods:{loadItem(e){e===void 0&&(e=this.index);const t=this.getItem(e);this.getSlide(t).childElementCount||s.trigger(this.$el,"itemload",[t])},getItem(e){return e===void 0&&(e=this.index),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 x(e,t){const n=s.fragment("<"+e+">");return s.attr(n,t),n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",O),O});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.3-dev.45f4472ed | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -153,7 +153,6 @@
|
|
|
153
153
|
const done = () => {
|
|
154
154
|
uikitUtil.removeClass(el, cls);
|
|
155
155
|
uikitUtil.trigger(el, show ? 'shown' : 'hidden', [this]);
|
|
156
|
-
this.$update(el);
|
|
157
156
|
};
|
|
158
157
|
|
|
159
158
|
return promise ?
|
|
@@ -198,7 +197,6 @@
|
|
|
198
197
|
|
|
199
198
|
if (changed) {
|
|
200
199
|
uikitUtil.trigger(el, 'toggled', [toggled, this]);
|
|
201
|
-
this.$update(el);
|
|
202
200
|
}
|
|
203
201
|
} } };
|
|
204
202
|
|
|
@@ -1157,7 +1155,7 @@
|
|
|
1157
1155
|
},
|
|
1158
1156
|
|
|
1159
1157
|
watch() {
|
|
1160
|
-
this.$
|
|
1158
|
+
this.$emit('resize');
|
|
1161
1159
|
} },
|
|
1162
1160
|
|
|
1163
1161
|
|