uikit 3.11.2-dev.3dfa2c50b → 3.11.2-dev.4274bc35b

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 (131) hide show
  1. package/CHANGELOG.md +32 -18
  2. package/dist/css/uikit-core-rtl.css +80 -186
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +80 -186
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +82 -192
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +82 -192
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +6 -8
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +26 -55
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +27 -57
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +91 -72
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +91 -72
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +60 -12
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +91 -72
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +52 -16
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +5 -7
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +2 -2
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +215 -220
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +405 -361
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/component.js +2 -11
  44. package/src/js/api/hooks.js +1 -1
  45. package/src/js/api/state.js +1 -1
  46. package/src/js/components/filter.js +2 -3
  47. package/src/js/components/internal/lightbox-animations.js +4 -3
  48. package/src/js/components/internal/slider-preload.js +37 -0
  49. package/src/js/components/internal/slideshow-animations.js +4 -3
  50. package/src/js/components/lightbox-panel.js +34 -58
  51. package/src/js/components/lightbox.js +1 -2
  52. package/src/js/components/slider.js +21 -1
  53. package/src/js/components/slideshow.js +8 -1
  54. package/src/js/components/sortable.js +1 -1
  55. package/src/js/core/alert.js +1 -2
  56. package/src/js/core/img.js +129 -114
  57. package/src/js/core/modal.js +1 -2
  58. package/src/js/core/navbar.js +3 -3
  59. package/src/js/core/sticky.js +1 -1
  60. package/src/js/core/svg.js +10 -6
  61. package/src/js/core/toggle.js +2 -1
  62. package/src/js/mixin/internal/animate-slide.js +9 -12
  63. package/src/js/mixin/parallax.js +91 -72
  64. package/src/js/mixin/slider.js +8 -16
  65. package/src/js/mixin/slideshow.js +2 -2
  66. package/src/js/mixin/togglable.js +1 -2
  67. package/src/js/util/ajax.js +9 -12
  68. package/src/js/util/animation.js +7 -12
  69. package/src/js/util/dom.js +27 -30
  70. package/src/js/util/lang.js +7 -6
  71. package/src/js/util/options.js +2 -11
  72. package/src/js/util/player.js +5 -4
  73. package/src/js/util/selector.js +12 -18
  74. package/src/js/util/style.js +4 -4
  75. package/src/less/components/base.less +10 -33
  76. package/src/less/components/form-range.less +52 -97
  77. package/src/less/components/form.less +0 -1
  78. package/src/less/components/leader.less +0 -1
  79. package/src/less/components/lightbox.less +0 -1
  80. package/src/less/components/modal.less +3 -7
  81. package/src/less/components/progress.less +14 -36
  82. package/src/less/components/slider.less +0 -3
  83. package/src/less/components/slideshow.less +0 -3
  84. package/src/less/components/text.less +16 -32
  85. package/src/scss/components/base.scss +10 -33
  86. package/src/scss/components/form-range.scss +52 -97
  87. package/src/scss/components/form.scss +0 -1
  88. package/src/scss/components/leader.scss +0 -1
  89. package/src/scss/components/lightbox.scss +0 -1
  90. package/src/scss/components/modal.scss +3 -7
  91. package/src/scss/components/progress.scss +14 -36
  92. package/src/scss/components/slider.scss +0 -3
  93. package/src/scss/components/slideshow.scss +0 -3
  94. package/src/scss/components/text.scss +16 -32
  95. package/src/scss/mixins-theme.scss +1 -1
  96. package/src/scss/mixins.scss +1 -1
  97. package/src/scss/variables-theme.scss +3 -3
  98. package/src/scss/variables.scss +3 -3
  99. package/tests/align.html +10 -10
  100. package/tests/animation.html +2 -2
  101. package/tests/article.html +2 -2
  102. package/tests/base.html +3 -3
  103. package/tests/card.html +10 -10
  104. package/tests/column.html +3 -3
  105. package/tests/comment.html +9 -9
  106. package/tests/dotnav.html +3 -3
  107. package/tests/image.html +296 -64
  108. package/tests/images/image-type.avif +0 -0
  109. package/tests/images/image-type.jpeg +0 -0
  110. package/tests/images/image-type.webp +0 -0
  111. package/tests/index.html +8 -8
  112. package/tests/lightbox.html +10 -10
  113. package/tests/marker.html +2 -2
  114. package/tests/modal.html +8 -9
  115. package/tests/navbar.html +2 -2
  116. package/tests/overlay.html +7 -7
  117. package/tests/parallax.html +14 -5
  118. package/tests/position.html +12 -12
  119. package/tests/slidenav.html +12 -12
  120. package/tests/slider.html +20 -20
  121. package/tests/sortable.html +1 -1
  122. package/tests/sticky-parallax.html +47 -62
  123. package/tests/svg.html +6 -6
  124. package/tests/table.html +11 -11
  125. package/tests/thumbnav.html +12 -12
  126. package/tests/transition.html +30 -30
  127. package/tests/utility.html +33 -33
  128. package/tests/video.html +1 -1
  129. package/tests/width.html +1 -1
  130. package/src/js/util/promise.js +0 -0
  131. package/tests/images/animated.gif +0 -0
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.3dfa2c50b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.4274bc35b | 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')) :
@@ -127,39 +127,35 @@
127
127
 
128
128
 
129
129
 
130
- function transformFn(prop, el, steps) {
131
- const unit = getUnit(steps) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
130
+ function transformFn(prop, el, stops) {
131
+ const unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
132
+ let transformFn;
132
133
 
133
134
  if (prop === 'x' || prop === 'y') {
134
135
  prop = "translate" + uikitUtil.ucfirst(prop);
136
+ transformFn = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
135
137
  }
136
138
 
137
- steps = steps.map(uikitUtil.toFloat);
138
-
139
- if (steps.length === 1) {
140
- steps.unshift(prop === 'scale' ? 1 : 0);
139
+ if (stops.length === 1) {
140
+ stops.unshift(prop === 'scale' ? 1 : 0);
141
141
  }
142
142
 
143
- return (css, percent) => {
144
- let value = getValue(steps, percent);
143
+ stops = parseStops(stops, transformFn);
145
144
 
146
- if (uikitUtil.startsWith(prop, 'translate')) {
147
- value = uikitUtil.toFloat(value).toFixed(unit === 'px' ? 0 : 6);
148
- }
149
-
150
- css.transform += " " + prop + "(" + value + unit + ")";
145
+ return (css, percent) => {
146
+ css.transform += " " + prop + "(" + getValue(stops, percent) + unit + ")";
151
147
  };
152
148
  }
153
149
 
154
- function colorFn(prop, el, steps) {
155
- if (steps.length === 1) {
156
- steps.unshift(getCssValue(el, prop, ''));
150
+ function colorFn(prop, el, stops) {
151
+ if (stops.length === 1) {
152
+ stops.unshift(getCssValue(el, prop, ''));
157
153
  }
158
154
 
159
- steps = steps.map((step) => parseColor(el, step));
155
+ stops = parseStops(stops, (stop) => parseColor(el, stop));
160
156
 
161
157
  return (css, percent) => {
162
- const [start, end, p] = getStep(steps, percent);
158
+ const [start, end, p] = getStop(stops, percent);
163
159
  const value = start.
164
160
  map((value, i) => {
165
161
  value += p * (end[i] - value);
@@ -179,85 +175,83 @@
179
175
  map(uikitUtil.toFloat);
180
176
  }
181
177
 
182
- function filterFn(prop, el, steps) {
183
- if (steps.length === 1) {
184
- steps.unshift(0);
178
+ function filterFn(prop, el, stops) {
179
+ if (stops.length === 1) {
180
+ stops.unshift(0);
185
181
  }
186
182
 
187
- const unit = getUnit(steps) || { blur: 'px', hue: 'deg' }[prop] || '%';
183
+ const unit = getUnit(stops) || { blur: 'px', hue: 'deg' }[prop] || '%';
188
184
  prop = { fopacity: 'opacity', hue: 'hue-rotate' }[prop] || prop;
189
- steps = steps.map(uikitUtil.toFloat);
185
+ stops = parseStops(stops);
190
186
 
191
187
  return (css, percent) => {
192
- const value = getValue(steps, percent);
188
+ const value = getValue(stops, percent);
193
189
  css.filter += " " + prop + "(" + (value + unit) + ")";
194
190
  };
195
191
  }
196
192
 
197
- function cssPropFn(prop, el, steps) {
198
- if (steps.length === 1) {
199
- steps.unshift(getCssValue(el, prop, ''));
193
+ function cssPropFn(prop, el, stops) {
194
+ if (stops.length === 1) {
195
+ stops.unshift(getCssValue(el, prop, ''));
200
196
  }
201
197
 
202
- steps = steps.map(uikitUtil.toFloat);
198
+ stops = parseStops(stops);
203
199
 
204
200
  return (css, percent) => {
205
- css[prop] = getValue(steps, percent);
201
+ css[prop] = getValue(stops, percent);
206
202
  };
207
203
  }
208
204
 
209
- function strokeFn(prop, el, steps) {
210
- if (steps.length === 1) {
211
- steps.unshift(0);
205
+ function strokeFn(prop, el, stops) {
206
+ if (stops.length === 1) {
207
+ stops.unshift(0);
212
208
  }
213
209
 
214
- const unit = getUnit(steps);
215
- steps = steps.map(uikitUtil.toFloat);
210
+ const unit = getUnit(stops);
211
+ const length = getMaxPathLength(el);
212
+ stops = parseStops(stops.reverse(), (stop) => {
213
+ stop = uikitUtil.toFloat(stop);
214
+ return unit === '%' ? stop * length / 100 : stop;
215
+ });
216
216
 
217
- if (!steps.some((step) => step)) {
217
+ if (!stops.some((_ref) => {let [value] = _ref;return value;})) {
218
218
  return uikitUtil.noop;
219
219
  }
220
220
 
221
- const length = getMaxPathLength(el);
222
221
  uikitUtil.css(el, 'strokeDasharray', length);
223
222
 
224
- if (unit === '%') {
225
- steps = steps.map((step) => step * length / 100);
226
- }
227
-
228
- steps = steps.reverse();
229
-
230
223
  return (css, percent) => {
231
- css.strokeDashoffset = getValue(steps, percent);
224
+ css.strokeDashoffset = getValue(stops, percent);
232
225
  };
233
226
  }
234
227
 
235
- function backgroundFn(prop, el, steps) {
236
- if (steps.length === 1) {
237
- steps.unshift(0);
228
+ function backgroundFn(prop, el, stops) {
229
+ if (stops.length === 1) {
230
+ stops.unshift(0);
238
231
  }
239
232
 
240
233
  prop = prop.substr(-1);
241
234
  const attr = prop === 'y' ? 'height' : 'width';
242
- steps = steps.map((step) => uikitUtil.toPx(step, attr, el));
235
+ stops = parseStops(stops, (stop) => uikitUtil.toPx(stop, attr, el));
243
236
 
244
237
  const bgPos = getCssValue(el, "background-position-" + prop, '');
245
238
 
246
239
  return getCssValue(el, 'backgroundSize', '') === 'cover' ?
247
- backgroundCoverFn(prop, el, steps, bgPos, attr) :
248
- setBackgroundPosFn(prop, steps, bgPos);
240
+ backgroundCoverFn(prop, el, stops, bgPos, attr) :
241
+ setBackgroundPosFn(prop, stops, bgPos);
249
242
  }
250
243
 
251
- function backgroundCoverFn(prop, el, steps, bgPos, attr) {
244
+ function backgroundCoverFn(prop, el, stops, bgPos, attr) {
252
245
  const dimImage = getBackgroundImageDimensions(el);
253
246
 
254
247
  if (!dimImage.width) {
255
248
  return uikitUtil.noop;
256
249
  }
257
250
 
258
- const min = Math.min(...steps);
259
- const max = Math.max(...steps);
260
- const down = steps.indexOf(min) < steps.indexOf(max);
251
+ const values = stops.map((_ref2) => {let [value] = _ref2;return value;});
252
+ const min = Math.min(...values);
253
+ const max = Math.max(...values);
254
+ const down = values.indexOf(min) < values.indexOf(max);
261
255
 
262
256
  const diff = max - min;
263
257
  let pos = (down ? -diff : 0) - (down ? min : max);
@@ -282,7 +276,7 @@
282
276
 
283
277
  const dim = uikitUtil.Dimensions.cover(dimImage, dimEl);
284
278
 
285
- const fn = setBackgroundPosFn(prop, steps, pos + "px");
279
+ const fn = setBackgroundPosFn(prop, stops, pos + "px");
286
280
  return (css, percent) => {
287
281
  fn(css, percent);
288
282
  css.backgroundSize = dim.width + "px " + dim.height + "px";
@@ -290,9 +284,9 @@
290
284
  };
291
285
  }
292
286
 
293
- function setBackgroundPosFn(prop, steps, pos) {
287
+ function setBackgroundPosFn(prop, stops, pos) {
294
288
  return function (css, percent) {
295
- css["background-position-" + prop] = "calc(" + pos + " + " + getValue(steps, percent) + "px)";
289
+ css["background-position-" + prop] = "calc(" + pos + " + " + getValue(stops, percent) + "px)";
296
290
  };
297
291
  }
298
292
 
@@ -326,27 +320,52 @@
326
320
 
327
321
  }
328
322
 
329
- function getStep(steps, percent) {
330
- const count = steps.length - 1;
331
- const index = Math.min(Math.floor(count * percent), count - 1);
323
+ function parseStops(stops, fn) {if (fn === void 0) {fn = uikitUtil.toFloat;}
324
+ const result = [];
325
+ for (const stop of stops) {
326
+ const [value, percent] = uikitUtil.isString(stop) ? stop.trim().split(' ') : [stop];
327
+ result.push([fn(value), percent ? uikitUtil.toFloat(percent) / 100 : null]);
328
+ }
332
329
 
333
- return steps.
334
- slice(index, index + 2).
335
- concat(percent === 1 ? 1 : percent % (1 / count) * count);
330
+ const { length } = result;
331
+ result[0][1] = 0;
332
+ result[length - 1][1] = 1;
333
+ for (let i = 1; i < length - 1; i++) {
334
+ if (result[i] === null) {
335
+ const nextIndex = uikitUtil.findIndex(result.slice(i + 1), (_ref3) => {let [, percent] = _ref3;return percent !== null;}) + 1;
336
+ const percent = (result[i + nextIndex] - result[i - 1][1]) / (nextIndex + 1);
337
+ for (let j = 0; j < nextIndex; j++) {
338
+ result[i + j][1] = percent * j + 1;
339
+ }
340
+ }
341
+ }
342
+
343
+ return result;
336
344
  }
337
345
 
338
- function getValue(steps, percent) {
339
- const [start, end, p] = getStep(steps, percent);
340
- return uikitUtil.isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
346
+ function getStop(stops, percent) {
347
+ const index = uikitUtil.findIndex(stops.slice(1), (_ref4) => {let [, targetPercent] = _ref4;return percent <= targetPercent;}) + 1;
348
+ return [
349
+ stops[index - 1][0],
350
+ stops[index][0],
351
+ (percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])];
352
+
341
353
  }
342
354
 
343
- function getUnit(steps, defaultUnit) {
344
- return (
345
- steps.reduce(
346
- (unit, step) => unit || uikitUtil.isString(step) && step.replace(/[\d-]/g, '').trim(),
347
- '') ||
348
- defaultUnit);
355
+ function getValue(stops, percent) {
356
+ const [start, end, p] = getStop(stops, percent);
357
+ return uikitUtil.isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
358
+ }
349
359
 
360
+ const unitRe = /^[\d-]+([^\s]+)/;
361
+ function getUnit(stops, defaultUnit) {
362
+ for (const stop of stops) {
363
+ const match = stop.match == null ? void 0 : stop.match(unitRe);
364
+ if (match) {
365
+ return match[1];
366
+ }
367
+ }
368
+ return defaultUnit;
350
369
  }
351
370
 
352
371
  function getCssValue(el, prop, value) {
@@ -1 +1 @@
1
- /*! UIkit 3.11.2-dev.3dfa2c50b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],u):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitSlideshow_parallax=u(o.UIkit.util))})(this,function(o){"use strict";var u={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const e=B(this.media);return!e||window.matchMedia(e).matches}}};function B(e){if(o.isString(e)){if(e[0]==="@"){const t="breakpoint-"+e.substr(1);e=o.toFloat(o.getCssVar(t))}else if(isNaN(e))return e}return e&&!isNaN(e)?"(min-width: "+e+"px)":!1}o.memoize(async e=>e?o.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function V(e){return Math.ceil(Math.max(0,...o.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const b={x:y,y,rotate:y,scale:y,color:M,backgroundColor:M,borderColor:M,blur:d,hue:d,fopacity:d,grayscale:d,invert:d,saturate:d,sepia:d,opacity:H,stroke:L,bgx:$,bgy:$},{keys:w}=Object;var _={mixins:[u],props:W(w(b),"list"),data:W(w(b),void 0),computed:{props(e,t){return w(b).reduce((n,r)=>(o.isUndefined(e[r])||(n[r]=b[r](r,t,e[r].slice())),n),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){o.each(this.getCss(0),(e,t)=>o.css(this.$el,t,""))},getCss(e){return w(this.props).reduce((t,n)=>(this.props[n](t,e),t),{transform:"",filter:""})}}};function y(e,t,n){const r=P(n)||{x:"px",y:"px",rotate:"deg"}[e]||"";return(e==="x"||e==="y")&&(e="translate"+o.ucfirst(e)),n=n.map(o.toFloat),n.length===1&&n.unshift(e==="scale"?1:0),(a,c)=>{let s=m(n,c);o.startsWith(e,"translate")&&(s=o.toFloat(s).toFixed(r==="px"?0:6)),a.transform+=" "+e+"("+s+r+")"}}function M(e,t,n){return n.length===1&&n.unshift(g(t,e,"")),n=n.map(r=>q(t,r)),(r,a)=>{const[c,s,f]=T(n,a),C=c.map((i,l)=>(i+=f*(s[l]-i),l===3?o.toFloat(i):parseInt(i,10))).join(",");r[e]="rgba("+C+")"}}function q(e,t){return g(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(o.toFloat)}function d(e,t,n){n.length===1&&n.unshift(0);const r=P(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=n.map(o.toFloat),(a,c)=>{const s=m(n,c);a.filter+=" "+e+"("+(s+r)+")"}}function H(e,t,n){return n.length===1&&n.unshift(g(t,e,"")),n=n.map(o.toFloat),(r,a)=>{r[e]=m(n,a)}}function L(e,t,n){n.length===1&&n.unshift(0);const r=P(n);if(n=n.map(o.toFloat),!n.some(c=>c))return o.noop;const a=V(t);return o.css(t,"strokeDasharray",a),r==="%"&&(n=n.map(c=>c*a/100)),n=n.reverse(),(c,s)=>{c.strokeDashoffset=m(n,s)}}function $(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const r=e==="y"?"height":"width";n=n.map(c=>o.toPx(c,r,t));const a=g(t,"background-position-"+e,"");return g(t,"backgroundSize","")==="cover"?R(e,t,n,a,r):D(e,n,a)}function R(e,t,n,r,a){const c=E(t);if(!c.width)return o.noop;const s=Math.min(...n),f=Math.max(...n),C=n.indexOf(s)<n.indexOf(f),i=f-s;let l=(C?-i:0)-(C?s:f);const x={width:t.offsetWidth,height:t.offsetHeight},O=o.Dimensions.cover(c,x),I=O[a]-x[a];if(I<i)x[a]=O[a]+i-I;else if(I>i){const h=x[a]/o.toPx(r,a,t,!0);h&&(l-=(I-i)/h)}const z=o.Dimensions.cover(c,x),A=D(e,n,l+"px");return(h,G)=>{A(h,G),h.backgroundSize=z.width+"px "+z.height+"px",h.backgroundRepeat="no-repeat"}}function D(e,t,n){return function(r,a){r["background-position-"+e]="calc("+n+" + "+m(t,a)+"px)"}}const F={};function E(e){const t=o.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[t])return F[t];const n=new Image;return t&&(n.src=t,n.naturalWidth||(n.onload=()=>{F[t]=S(n),o.trigger(e,"bgimageload")})),F[t]=S(n)}function S(e){return{width:e.naturalWidth,height:e.naturalHeight}}function T(e,t){const n=e.length-1,r=Math.min(Math.floor(n*t),n-1);return e.slice(r,r+2).concat(t===1?1:t%(1/n)*n)}function m(e,t){const[n,r,a]=T(e,t);return o.isNumber(n)?n+Math.abs(n-r)*a*(n<r?1:-1):+r}function P(e,t){return e.reduce((n,r)=>n||o.isString(r)&&r.replace(/[\d-]/g,"").trim(),"")||t}function g(e,t,n){const r=e.style[t],a=o.css(o.css(e,t,n),t);return e.style[t]=r,a}function W(e,t){return e.reduce((n,r)=>(n[r]=t,n),{})}var j={mixins:[_],data:{selItem:"!li"},computed:{item(e,t){let{selItem:n}=e;return o.query(n,t)}},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:r,timing:a,dir:c}}=e;o.fastdom.read(()=>{const s=this.getCss(N(t,c,n)),f=this.getCss(v(t)?.5:c>0?1:0);o.fastdom.write(()=>{o.css(this.$el,s),o.Transition.start(this.$el,f,r,a).catch(o.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){o.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:r}}=e;o.fastdom.read(()=>{const a=this.getCss(N(t,r,n));o.fastdom.write(()=>o.css(this.$el,a))})}}]};function v(e){return o.endsWith(e,"in")}function N(e,t,n){return n/=2,v(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",j),j});
1
+ /*! UIkit 3.11.2-dev.4274bc35b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlideshow_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},computed:{matchMedia(){const n=_(this.media);return!n||window.matchMedia(n).matches}}};function _(n){if(r.isString(n)){if(n[0]==="@"){const t="breakpoint-"+n.substr(1);n=r.toFloat(r.getCssVar(t))}else if(isNaN(n))return n}return n&&!isNaN(n)?"(min-width: "+n+"px)":!1}r.memoize(async n=>n?r.startsWith(n,"data:")?decodeURIComponent(n.split(",")[1]):(await fetch(n)).text():Promise.reject());function q(n){return Math.ceil(Math.max(0,...r.$$("[stroke]",n).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const y={x:I,y:I,rotate:I,scale:I,color:v,backgroundColor:v,borderColor:v,blur:u,hue:u,fopacity:u,grayscale:u,invert:u,saturate:u,sepia:u,opacity:E,stroke:A,bgx:D,bgy:D},{keys:F}=Object;var H={mixins:[g],props:N(F(y),"list"),data:N(F(y),void 0),computed:{props(n,t){return F(y).reduce((e,o)=>(r.isUndefined(n[o])||(e[o]=y[o](o,t,n[o].slice())),e),{})}},events:{bgimageload(){this.$emit()}},methods:{reset(){r.each(this.getCss(0),(n,t)=>r.css(this.$el,t,""))},getCss(n){return F(this.props).reduce((t,e)=>(this.props[e](t,n),t),{transform:"",filter:""})}}};function I(n,t,e){const o=M(e)||{x:"px",y:"px",rotate:"deg"}[n]||"";let a;return(n==="x"||n==="y")&&(n="translate"+r.ucfirst(n),a=s=>r.toFloat(r.toFloat(s).toFixed(o==="px"?0:6))),e.length===1&&e.unshift(n==="scale"?1:0),e=l(e,a),(s,c)=>{s.transform+=" "+n+"("+x(e,c)+o+")"}}function v(n,t,e){return e.length===1&&e.unshift(b(t,n,"")),e=l(e,o=>L(t,o)),(o,a)=>{const[s,c,i]=T(e,a),h=s.map((m,d)=>(m+=i*(c[d]-m),d===3?r.toFloat(m):parseInt(m,10))).join(",");o[n]="rgba("+h+")"}}function L(n,t){return b(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function u(n,t,e){e.length===1&&e.unshift(0);const o=M(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=l(e),(a,s)=>{const c=x(e,s);a.filter+=" "+n+"("+(c+o)+")"}}function E(n,t,e){return e.length===1&&e.unshift(b(t,n,"")),e=l(e),(o,a)=>{o[n]=x(e,a)}}function A(n,t,e){e.length===1&&e.unshift(0);const o=M(e),a=q(t);return e=l(e.reverse(),s=>(s=r.toFloat(s),o==="%"?s*a/100:s)),e.some(s=>{let[c]=s;return c})?(r.css(t,"strokeDasharray",a),(s,c)=>{s.strokeDashoffset=x(e,c)}):r.noop}function D(n,t,e){e.length===1&&e.unshift(0),n=n.substr(-1);const o=n==="y"?"height":"width";e=l(e,s=>r.toPx(s,o,t));const a=b(t,"background-position-"+n,"");return b(t,"backgroundSize","")==="cover"?G(n,t,e,a,o):S(n,e,a)}function G(n,t,e,o,a){const s=J(t);if(!s.width)return r.noop;const c=e.map(f=>{let[$]=f;return $}),i=Math.min(...c),h=Math.max(...c),m=c.indexOf(i)<c.indexOf(h),d=h-i;let B=(m?-d:0)-(m?i:h);const w={width:t.offsetWidth,height:t.offsetHeight},R=r.Dimensions.cover(s,w),P=R[a]-w[a];if(P<d)w[a]=R[a]+d-P;else if(P>d){const f=w[a]/r.toPx(o,a,t,!0);f&&(B-=(P-d)/f)}const V=r.Dimensions.cover(s,w),Q=S(n,e,B+"px");return(f,$)=>{Q(f,$),f.backgroundSize=V.width+"px "+V.height+"px",f.backgroundRepeat="no-repeat"}}function S(n,t,e){return function(o,a){o["background-position-"+n]="calc("+e+" + "+x(t,a)+"px)"}}const C={};function J(n){const t=r.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(C[t])return C[t];const e=new Image;return t&&(e.src=t,e.naturalWidth||(e.onload=()=>{C[t]=j(e),r.trigger(n,"bgimageload")})),C[t]=j(e)}function j(n){return{width:n.naturalWidth,height:n.naturalHeight}}function l(n,t){t===void 0&&(t=r.toFloat);const e=[];for(const a of n){const[s,c]=r.isString(a)?a.trim().split(" "):[a];e.push([t(s),c?r.toFloat(c)/100:null])}const{length:o}=e;e[0][1]=0,e[o-1][1]=1;for(let a=1;a<o-1;a++)if(e[a]===null){const s=r.findIndex(e.slice(a+1),i=>{let[,h]=i;return h!==null})+1,c=(e[a+s]-e[a-1][1])/(s+1);for(let i=0;i<s;i++)e[a+i][1]=c*i+1}return e}function T(n,t){const e=r.findIndex(n.slice(1),o=>{let[,a]=o;return t<=a})+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function x(n,t){const[e,o,a]=T(n,t);return r.isNumber(e)?e+Math.abs(e-o)*a*(e<o?1:-1):+o}const K=/^[\d-]+([^\s]+)/;function M(n,t){for(const e of n){const o=e.match==null?void 0:e.match(K);if(o)return o[1]}return t}function b(n,t,e){const o=n.style[t],a=r.css(r.css(n,t,e),t);return n.style[t]=o,a}function N(n,t){return n.reduce((e,o)=>(e[o]=t,e),{})}var W={mixins:[H],data:{selItem:"!li"},computed:{item(n,t){let{selItem:e}=n;return r.query(e,t)}},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(n){let{type:t,detail:{percent:e,duration:o,timing:a,dir:s}}=n;r.fastdom.read(()=>{const c=this.getCss(z(t,s,e)),i=this.getCss(O(t)?.5:s>0?1:0);r.fastdom.write(()=>{r.css(this.$el,c),r.Transition.start(this.$el,i,o,a).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(n){let{type:t,detail:{percent:e,dir:o}}=n;r.fastdom.read(()=>{const a=this.getCss(z(t,o,e));r.fastdom.write(()=>r.css(this.$el,a))})}}]};function O(n){return r.endsWith(n,"in")}function z(n,t,e){return e/=2,O(n)^t<0?e:1-e}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",W),W});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.3dfa2c50b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.4274bc35b | 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')) :
@@ -602,20 +602,13 @@
602
602
  },
603
603
 
604
604
  _show(prev, next, force) {
605
- this._transitioner = this._getTransitioner(
606
- prev,
607
- next,
608
- this.dir,
609
- uikitUtil.assign(
610
- {
605
+ this._transitioner = this._getTransitioner(prev, next, this.dir, {
611
606
  easing: force ?
612
607
  next.offsetWidth < 600 ?
613
608
  'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */ :
614
609
  'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */ :
615
- this.easing },
616
-
617
- this.transitionOptions));
618
-
610
+ this.easing,
611
+ ...this.transitionOptions });
619
612
 
620
613
 
621
614
  if (!force && !prev) {
@@ -680,7 +673,7 @@
680
673
 
681
674
  computed: {
682
675
  animation(_ref) {let { animation, Animations } = _ref;
683
- return uikitUtil.assign(Animations[animation] || Animations.slide, { name: animation });
676
+ return { ...(Animations[animation] || Animations.slide), name: animation };
684
677
  },
685
678
 
686
679
  transitionOptions() {
@@ -705,7 +698,8 @@
705
698
  uikitUtil.removeClass(target, this.clsActive, this.clsActivated);
706
699
  } } };
707
700
 
708
- var Animations = uikitUtil.assign({}, Animations$1, {
701
+ var Animations = {
702
+ ...Animations$1,
709
703
  fade: {
710
704
  show() {
711
705
  return [{ opacity: 0, zIndex: 0 }, { zIndex: -1 }];
@@ -794,7 +788,7 @@
794
788
  { transform: translate(-30 * percent), zIndex: -1 },
795
789
  { transform: translate(100 * (1 - percent)), zIndex: 0 }];
796
790
 
797
- } } });
791
+ } } };
798
792
 
799
793
  var SliderReactive = {
800
794
  update: {
@@ -812,8 +806,44 @@
812
806
 
813
807
  events: ['resize'] } };
814
808
 
809
+ var SliderPreload = {
810
+ connected() {
811
+ if (window.IntersectionObserver) {
812
+ this.observer = new IntersectionObserver(
813
+ (entries) => {
814
+ if (entries.some((entry) => entry.isIntersecting)) {
815
+ removeLazyLoad(this.getAdjacentSlides());
816
+ }
817
+ },
818
+ { rootMargin: '50% 50%' });
819
+
820
+ this.observer.observe(this.$el);
821
+ }
822
+ },
823
+
824
+ disconnected() {
825
+ this.observer && this.observer.disconnect();
826
+ },
827
+
828
+ update: {
829
+ read() {
830
+ if (uikitUtil.isVisible(this.$el)) {
831
+ removeLazyLoad(this.getAdjacentSlides());
832
+ }
833
+ },
834
+
835
+ events: ['resize'] } };
836
+
837
+
838
+
839
+ function removeLazyLoad(elements) {if (elements === void 0) {elements = [];}
840
+ for (const el of elements) {
841
+ el && uikitUtil.$$('img[loading="lazy"]', el).forEach((el) => uikitUtil.removeAttr(el, 'loading'));
842
+ }
843
+ }
844
+
815
845
  var Component = {
816
- mixins: [Class, Slideshow, SliderReactive],
846
+ mixins: [Class, Slideshow, SliderReactive, SliderPreload],
817
847
 
818
848
  props: {
819
849
  ratio: String,
@@ -856,7 +886,13 @@
856
886
  height > 0 && uikitUtil.css(this.list, 'minHeight', height);
857
887
  },
858
888
 
859
- events: ['resize'] } };
889
+ events: ['resize'] },
890
+
891
+
892
+ methods: {
893
+ getAdjacentSlides() {
894
+ return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);
895
+ } } };
860
896
 
861
897
  if (typeof window !== 'undefined' && window.UIkit) {
862
898
  window.UIkit.component('slideshow', Component);
@@ -1 +1 @@
1
- /*! UIkit 3.11.2-dev.3dfa2c50b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},I={slide:{show(t){return[{transform:r(t*-100)},{transform:r()}]},percent(t){return v(t)},translate(t,e){return[{transform:r(e*-100*t)},{transform:r(e*100*(1-t))}]}}};function v(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function r(t,e){return t===void 0&&(t=0),e===void 0&&(e="%"),t+=t?e:"","translate3d("+t+", 0, 0)"}function w(t){return"scale3d("+t+", "+t+", 1)"}function y(t,e,n,i){let{animation:m,easing:d}=i;const{percent:a,translate:f,show:l=s.noop}=m,g=l(n),c=new s.Deferred;return{dir:n,show(h,o,M){o===void 0&&(o=0);const x=M?"linear":d;return h-=Math.round(h*s.clamp(o,-1,1)),this.translate(o),u(e,"itemin",{percent:o,duration:h,timing:x,dir:n}),u(t,"itemout",{percent:1-o,duration:h,timing:x,dir:n}),Promise.all([s.Transition.start(e,g[1],h,x),s.Transition.start(t,g[0],h,x)]).then(()=>{this.reset(),c.resolve()},s.noop),c.promise},cancel(){s.Transition.cancel([e,t])},reset(){for(const h in g[0])s.css([e,t],h,"")},forward(h,o){return o===void 0&&(o=this.percent()),s.Transition.cancel([e,t]),this.show(h,o,!0)},translate(h){this.reset();const o=f(h,n);s.css(e,o[1]),s.css(t,o[0]),u(e,"itemtranslatein",{percent:h,dir:n}),u(t,"itemtranslateout",{percent:1-h,dir:n})},percent(){return a(t||e,e,n)},getDistance(){return t==null?void 0:t.offsetWidth}}}function u(t,e,n){s.trigger(t,s.createEvent(e,!1,!1,n))}var z={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)}}},_={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=n=>{const i=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,e(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(t){!this.draggable||!s.isTouch(t)&&A(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}}],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,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,m=Math.abs(e),d=this.getIndex(i+this.dir,i),a=this._getDistance(i,d)||n[i].offsetWidth;for(;d!==i&&m>a;)this.drag-=a*this.dir,i=d,m-=a,d=this.getIndex(i+this.dir,i),a=this._getDistance(i,d)||n[i].offsetWidth;this.percent=m/a;const f=n[i],l=n[d],g=this.index!==d,c=i===d;let h;[this.index,this.prevIndex].filter(o=>!s.includes([d,i],o)).forEach(o=>{s.trigger(n[o],"itemhidden",[this]),c&&(h=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||h)&&s.trigger(n[this.index],"itemshown",[this]),g&&(this.prevIndex=i,this.index=d,!c&&s.trigger(f,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),f,!c&&l),g&&(!c&&s.trigger(f,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function A(t){return!t.children.length&&t.childNodes.length}var N={data:{selNav:!1},computed:{nav(t,e){let{selNav:n}=t;return s.$(n,e)},selNavItem(t){let{attrItem:e}=t;return"["+e+"],[data-"+e+"]"},navItems(t,e){return s.$$(this.selNavItem,e)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((t,e)=>"<li "+this.attrItem+'="'+e+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(t){t.preventDefault(),this.show(s.data(t.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const n=s.data(e,this.attrItem);s.toggleClass(e,this.clsActive,s.toNumber(n)===t),s.toggleClass(e,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},S={mixins:[z,_,N],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(t,e){let{velocity:n}=t;return T(e.offsetWidth/n)},list(t,e){let{selList:n}=t;return s.$(n,e)},maxIndex(){return this.length-1},selSlides(t){let{selList:e,selSlides:n}=t;return e+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},events:{itemshown(){this.$update(this.list)}},methods:{show(t,e){if(e===void 0&&(e=!1),this.dragging||!this.length)return;const{stack:n}=this,i=e?0:n.length,m=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const d=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[d],f=this.getIndex(t,this.index),l=this.slides[f];if(a===l){m();return}if(this.dir=$(t,d),this.prevIndex=d,this.index=f,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,a])){this.index=this.prevIndex,m();return}const g=this._show(a,l,e).then(()=>(a&&s.trigger(a,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(c=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,c()})})));return a&&s.trigger(a,"itemhide",[this]),s.trigger(l,"itemshow",[this]),g},getIndex(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.index),s.clamp(s.getIndex(t,this.slides,e,this.finite),0,this.maxIndex)},getValidIndex(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.prevIndex),this.getIndex(t,e)},_show(t,e,n){if(this._transitioner=this._getTransitioner(t,e,this.dir,s.assign({easing:n?e.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing},this.transitionOptions)),!n&&!t)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate(t,e,n){e===void 0&&(e=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(e!==n?e:!1,n);return i.translate(t),i},_getTransitioner(t,e,n,i){return t===void 0&&(t=this.prevIndex),e===void 0&&(e=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,n*(s.isRtl?-1:1),i)}}};function $(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function T(t){return .5*t+300}var C={mixins:[S],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:I,Transitioner:y},computed:{animation(t){let{animation:e,Animations:n}=t;return s.assign(n[e]||n.slide,{name:e})},transitionOptions(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden"(t){let{target:e}=t;this.$update(e)},beforeitemshow(t){let{target:e}=t;s.addClass(e,this.clsActive)},itemshown(t){let{target:e}=t;s.addClass(e,this.clsActivated)},itemhidden(t){let{target:e}=t;s.removeClass(e,this.clsActive,this.clsActivated)}}},D=s.assign({},I,{fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:w(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:w(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:r(30),zIndex:-1},{transform:r(),zIndex:0}]:[{transform:r(-100),zIndex:0},{transform:r(),zIndex:-1}]},percent(t,e,n){return n<0?1-v(e):v(t)},translate(t,e){return e<0?[{transform:r(30*t),zIndex:-1},{transform:r(-100*(1-t)),zIndex:0}]:[{transform:r(-t*100),zIndex:0},{transform:r(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:r(100),zIndex:0},{transform:r(),zIndex:-1}]:[{transform:r(-30),zIndex:-1},{transform:r(),zIndex:0}]},percent(t,e,n){return n>0?1-v(e):v(t)},translate(t,e){return e<0?[{transform:r(t*100),zIndex:0},{transform:r(-30*(1-t)),zIndex:-1}]:[{transform:r(-30*t),zIndex:-1},{transform:r(100*(1-t)),zIndex:0}]}}}),H={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==t)&&this.show(t)},events:["resize"]}},b={mixins:[p,C,H],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:D},update:{read(){if(!this.list)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write(t){let{height:e}=t;e>0&&s.css(this.list,"minHeight",e)},events:["resize"]}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",b),b});
1
+ /*! UIkit 3.11.2-dev.4274bc35b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},I={slide:{show(e){return[{transform:r(e*-100)},{transform:r()}]},percent(e){return v(e)},translate(e,t){return[{transform:r(t*-100*e)},{transform:r(t*100*(1-e))}]}}};function v(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function r(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function w(e){return"scale3d("+e+", "+e+", 1)"}function z(e,t,n,i){let{animation:f,easing:d}=i;const{percent:a,translate:g,show:l=s.noop}=f,m=l(n),c=new s.Deferred;return{dir:n,show(h,o,P){o===void 0&&(o=0);const x=P?"linear":d;return h-=Math.round(h*s.clamp(o,-1,1)),this.translate(o),u(t,"itemin",{percent:o,duration:h,timing:x,dir:n}),u(e,"itemout",{percent:1-o,duration:h,timing:x,dir:n}),Promise.all([s.Transition.start(t,m[1],h,x),s.Transition.start(e,m[0],h,x)]).then(()=>{this.reset(),c.resolve()},s.noop),c.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const h in m[0])s.css([t,e],h,"")},forward(h,o){return o===void 0&&(o=this.percent()),s.Transition.cancel([t,e]),this.show(h,o,!0)},translate(h){this.reset();const o=g(h,n);s.css(t,o[1]),s.css(e,o[0]),u(t,"itemtranslatein",{percent:h,dir:n}),u(e,"itemtranslateout",{percent:1-h,dir:n})},percent(){return a(e||t,t,n)},getDistance(){return e==null?void 0:e.offsetWidth}}}function u(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var A={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)}}},_={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const i=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&S(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}}],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,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),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:i}=this,f=Math.abs(t),d=this.getIndex(i+this.dir,i),a=this._getDistance(i,d)||n[i].offsetWidth;for(;d!==i&&f>a;)this.drag-=a*this.dir,i=d,f-=a,d=this.getIndex(i+this.dir,i),a=this._getDistance(i,d)||n[i].offsetWidth;this.percent=f/a;const g=n[i],l=n[d],m=this.index!==d,c=i===d;let h;[this.index,this.prevIndex].filter(o=>!s.includes([d,i],o)).forEach(o=>{s.trigger(n[o],"itemhidden",[this]),c&&(h=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||h)&&s.trigger(n[this.index],"itemshown",[this]),m&&(this.prevIndex=i,this.index=d,!c&&s.trigger(g,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),g,!c&&l),m&&(!c&&s.trigger(g,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{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 S(e){return!e.children.length&&e.childNodes.length}var $={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))}}}},N={mixins:[A,_,$],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 C(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}},events:{itemshown(){this.$update(this.list)}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,f=()=>{n.splice(i,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 d=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[d],g=this.getIndex(e,this.index),l=this.slides[g];if(a===l){f();return}if(this.dir=T(e,d),this.prevIndex=d,this.index=g,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,a])){this.index=this.prevIndex,f();return}const m=this._show(a,l,t).then(()=>(a&&s.trigger(a,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),new Promise(c=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,c()})})));return a&&s.trigger(a,"itemhide",[this]),s.trigger(l,"itemshow",[this]),m},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:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-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 i=this._getTransitioner(t!==n?t:!1,n);return i.translate(e),i},_getTransitioner(e,t,n,i){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),i)}}};function T(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function C(e){return .5*e+300}var D={mixins:[N],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:I,Transitioner:z},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{"itemshow itemhide itemshown itemhidden"(e){let{target:t}=e;this.$update(t)},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)}}},M={...I,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:w(1+.5),zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:w(1+.5*e),zIndex:0},{zIndex:-1}]}},pull:{show(e){return e<0?[{transform:r(30),zIndex:-1},{transform:r(),zIndex:0}]:[{transform:r(-100),zIndex:0},{transform:r(),zIndex:-1}]},percent(e,t,n){return n<0?1-v(t):v(e)},translate(e,t){return t<0?[{transform:r(30*e),zIndex:-1},{transform:r(-100*(1-e)),zIndex:0}]:[{transform:r(-e*100),zIndex:0},{transform:r(30*(1-e)),zIndex:-1}]}},push:{show(e){return e<0?[{transform:r(100),zIndex:0},{transform:r(),zIndex:-1}]:[{transform:r(-30),zIndex:-1},{transform:r(),zIndex:0}]},percent(e,t,n){return n>0?1-v(t):v(e)},translate(e,t){return t<0?[{transform:r(e*100),zIndex:0},{transform:r(-30*(1-e)),zIndex:-1}]:[{transform:r(-30*e),zIndex:-1},{transform:r(100*(1-e)),zIndex:0}]}}},H={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==e)&&this.show(e)},events:["resize"]}},O={connected(){window.IntersectionObserver&&(this.observer=new IntersectionObserver(e=>{e.some(t=>t.isIntersecting)&&b(this.getAdjacentSlides())},{rootMargin:"50% 50%"}),this.observer.observe(this.$el))},disconnected(){this.observer&&this.observer.disconnect()},update:{read(){s.isVisible(this.$el)&&b(this.getAdjacentSlides())},events:["resize"]}};function b(e){e===void 0&&(e=[]);for(const t of e)t&&s.$$('img[loading="lazy"]',t).forEach(n=>s.removeAttr(n,"loading"))}var y={mixins:[p,D,H,O],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:M},update:{read(){if(!this.list)return!1;let[e,t]=this.ratio.split(":").map(Number);return t=t*this.list.offsetWidth/e||0,this.minHeight&&(t=Math.max(this.minHeight,t)),this.maxHeight&&(t=Math.min(this.maxHeight,t)),{height:t-s.boxModelAdjust(this.list,"height","content-box")}},write(e){let{height:t}=e;t>0&&s.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(e=>this.slides[this.getIndex(this.index+e)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",y),y});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.3dfa2c50b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.4274bc35b | 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')) :
@@ -228,7 +228,7 @@
228
228
 
229
229
  // Reset to previous state
230
230
  nodes.forEach((el, i) => propsFrom[i] && uikitUtil.css(el, propsFrom[i]));
231
- uikitUtil.css(target, uikitUtil.assign({ display: 'block' }, targetProps));
231
+ uikitUtil.css(target, { display: 'block', ...targetProps });
232
232
 
233
233
  // Start transitions on next frame
234
234
  requestAnimationFrame(() => {
@@ -260,15 +260,13 @@
260
260
  const zIndex = uikitUtil.css(el, 'zIndex');
261
261
 
262
262
  return uikitUtil.isVisible(el) ?
263
- uikitUtil.assign(
264
263
  {
265
264
  display: '',
266
265
  opacity: opacity ? uikitUtil.css(el, 'opacity') : '0',
267
266
  pointerEvents: 'none',
268
267
  position: 'absolute',
269
- zIndex: zIndex === 'auto' ? uikitUtil.index(el) : zIndex },
270
-
271
- getPositionWithMargin(el)) :
268
+ zIndex: zIndex === 'auto' ? uikitUtil.index(el) : zIndex,
269
+ ...getPositionWithMargin(el) } :
272
270
 
273
271
  false;
274
272
  }
@@ -542,7 +540,7 @@
542
540
 
543
541
  this.touched = new Set([this]);
544
542
  this.placeholder = placeholder;
545
- this.origin = uikitUtil.assign({ target, index: uikitUtil.index(placeholder) }, this.pos);
543
+ this.origin = { target, index: uikitUtil.index(placeholder), ...this.pos };
546
544
 
547
545
  uikitUtil.on(document, uikitUtil.pointerMove, this.move);
548
546
  uikitUtil.on(document, uikitUtil.pointerUp, this.end);
@@ -1 +1 @@
1
- /*! UIkit 3.11.2-dev.3dfa2c50b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(n){return F(n,"top","bottom")}function F(n,s,o){const a=[[]];for(const r of n){if(!e.isVisible(r))continue;let c=v(r);for(let t=a.length-1;t>=0;t--){const h=a[t];if(!h[0]){h.push(r);break}let d;if(h[0].offsetParent===r.offsetParent?d=v(h[0]):(c=v(r,!0),d=v(h[0],!0)),c[s]>=d[o]-1&&c[s]!==d[s]){a.push([r]);break}if(c[o]-1>d[s]||c[s]===d[s]){h.push(r);break}if(t===0){a.unshift([r]);break}}}return a}function v(n,s){s===void 0&&(s=!1);let{offsetTop:o,offsetLeft:a,offsetHeight:r,offsetWidth:c}=n;return s&&([o,a]=e.offsetPosition(n)),{top:o,left:a,bottom:o+r,right:a+c}}const u="uk-transition-leave",w="uk-transition-enter";function y(n,s,o,a){a===void 0&&(a=0);const r=b(s,!0),c={opacity:1},t={opacity:0},h=f=>()=>r===b(s)?f():Promise.reject(),d=h(()=>(e.addClass(s,u),Promise.all(C(s).map((f,i)=>new Promise(m=>setTimeout(()=>e.Transition.start(f,t,o/2,"ease").then(m),i*a)))).then(()=>e.removeClass(s,u)))),p=h(()=>{const f=e.height(s);return e.addClass(s,w),n(),e.css(e.children(s),{opacity:0}),new Promise(i=>requestAnimationFrame(()=>{const m=e.children(s),l=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,f);const E=C(s);e.css(m,t);const B=E.map((j,O)=>new Promise(G=>setTimeout(()=>e.Transition.start(j,c,o/2,"ease").then(G),O*a)));f!==l&&B.push(e.Transition.start(s,{height:l},o/2+E.length*a,"ease")),Promise.all(B).then(()=>{e.removeClass(s,w),r===b(s)&&(e.css(s,{height:"",alignContent:""}),e.css(m,{opacity:""}),delete s.dataset.transition),i()})}))});return e.hasClass(s,u)?T(s).then(p):e.hasClass(s,w)?T(s).then(d).then(p):d().then(p)}function b(n,s){return s&&(n.dataset.transition=1+b(n)),e.toNumber(n.dataset.transition)||0}function T(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function C(n){return g(e.children(n)).reduce((s,o)=>s.concat(e.sortBy(o.filter(a=>e.isInView(a)),"offsetLeft")),[])}function R(n,s,o){return new Promise(a=>requestAnimationFrame(()=>{let r=e.children(s);const c=r.map(h=>P(h,!0)),t=e.css(s,["height","padding"]);e.Transition.cancel(s),r.forEach(e.Transition.cancel),S(s),n(),r=r.concat(e.children(s).filter(h=>!e.includes(r,h))),Promise.resolve().then(()=>{e.fastdom.flush();const h=e.css(s,["height","padding"]),[d,p]=L(s,r,c);r.forEach((f,i)=>p[i]&&e.css(f,p[i])),e.css(s,e.assign({display:"block"},t)),requestAnimationFrame(()=>{const f=r.map((i,m)=>e.parent(i)===s&&e.Transition.start(i,d[m],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));Promise.all(f).then(()=>{r.forEach((i,m)=>e.parent(i)===s&&e.css(i,"display",d[m].opacity===0?"none":"")),S(s)},e.noop).then(a)})})}))}function P(n,s){const o=e.css(n,"zIndex");return e.isVisible(n)?e.assign({display:"",opacity:s?e.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(n):o},x(n)):!1}function L(n,s,o){const a=s.map((c,t)=>e.parent(c)&&t in o?o[t]?e.isVisible(c)?x(c):{opacity:0}:{opacity:e.isVisible(c)?1:0}:!1),r=a.map((c,t)=>{const h=e.parent(s[t])===n&&(o[t]||P(s[t]));if(!h)return!1;if(!c)delete h.opacity;else if(!("opacity"in c)){const{opacity:d}=h;d%1?c.opacity=1:delete h.opacity}return h});return[a,r]}function S(n){e.css(n.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),e.css(n,{height:"",display:"",padding:""})}function x(n){const{height:s,width:o}=e.offset(n),{top:a,left:r}=e.position(n),{marginLeft:c,marginTop:t}=e.css(n,["marginTop","marginLeft"]);return{top:a,left:r,height:s,width:o,marginLeft:c,marginTop:t,transform:""}}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s){s===void 0&&(s=this.$el);const o=this.animation;return(o==="fade"?y:o==="delayed-fade"?function(){for(var r=arguments.length,c=new Array(r),t=0;t<r;t++)c[t]=arguments[t];return y(...c,40)}:o?R:()=>(n(),Promise.resolve()))(n,s,this.duration).then(()=>this.$update(s,"resize"),e.noop)}}},H={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},I={mixins:[H,z],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const n of["init","start","move","end"]){const s=this[n];this[n]=o=>{e.assign(this.pos,e.getEventPos(o)),s(o)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return e.children(this.target)},isEmpty:{get(){return e.isEmpty(this.items)},watch(n){e.toggleClass(this.target,this.clsEmpty,n)},immediate:!0},handles:{get(n,s){let{handle:o}=n;return o?e.$$(o,s):this.items},watch(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:a,offsetLeft:r},placeholder:c}=this;e.css(this.drag,{top:o-a,left:s-r});const t=this.getSortable(document.elementFromPoint(s,o));if(!t)return;const{items:h}=t;if(h.some(e.Transition.inProgress))return;const d=V(h,{x:s,y:o});if(h.length&&(!d||d===c))return;const p=this.getSortable(c),f=q(t.target,d,c,s,o,t===p&&n.moved!==d);f!==!1&&(f&&c===f||(t!==p?(p.remove(c),n.moved=d):delete n.moved,t.insert(c,f),this.touched.add(t)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:a}=n,[r]=this.items.filter(c=>e.within(s,c));!r||a||o>0||e.isInput(s)||e.within(s,"."+this.clsNoDrag)||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=r,this.origin=e.assign({target:s,index:e.index(r)},this.pos),e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(n))},start(n){this.drag=M(this.$container,this.placeholder);const{left:s,top:o}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-o}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),N(this.pos),this.move(n)},move(n){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(n)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;A();const n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:o}of this.touched)for(const a of this.touched)e.removeClass(a.items,s,o);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(n,s){e.addClass(this.items,this.clsItem);const o=()=>s?e.before(s,n):e.append(this.target,n);this.animate(o)},remove(n){!e.within(n,this.target)||this.animate(()=>e.remove(n))},getSortable(n){do{const s=this.$getComponent(n,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(n=e.parent(n))}}};let $;function N(n){let s=Date.now();$=setInterval(()=>{let{x:o,y:a}=n;a+=e.scrollTop(window);const r=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y),/auto|scroll/).reverse().some(c=>{let{scrollTop:t,scrollHeight:h}=c;const{top:d,bottom:p,height:f}=e.offset(e.getViewport(c));if(d<a&&d+35>a)t-=r;else if(p>a&&p-35<a)t+=r;else return;if(t>0&&t<h-f)return e.scrollTop(c,t),!0})},15)}function A(){clearInterval($)}function M(n,s){const o=e.append(n,s.outerHTML.replace(/(^<)(?:li|tr)|(?:li|tr)(\/>$)/g,"$1div$2"));return e.css(o,"margin","0","important"),e.css(o,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(o.firstElementChild,e.height(s.firstElementChild)),o}function V(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function q(n,s,o,a,r,c){if(!e.children(n).length)return;const t=s.getBoundingClientRect();if(!c)return W(n,o)||r<t.top+t.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=D([t.top,t.bottom],[h.top,h.bottom]),p=d?a:r,f=d?"width":"height",i=d?"left":"top",m=d?"right":"bottom",l=h[f]<t[f]?t[f]-h[f]:0;return h[i]<t[i]?l&&p<t[i]+l?!1:s.nextElementSibling:l&&p>t[m]-l?!1:s}function W(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const a=e.children(n),r=a.some((c,t)=>{const h=c.getBoundingClientRect();return a.slice(t+1).some(d=>{const p=d.getBoundingClientRect();return!D([h.left,h.right],[p.left,p.right])})});return o&&e.remove(s),r}function D(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",I),I});
1
+ /*! UIkit 3.11.2-dev.4274bc35b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(n){return F(n,"top","bottom")}function F(n,s,o){const a=[[]];for(const r of n){if(!e.isVisible(r))continue;let c=v(r);for(let t=a.length-1;t>=0;t--){const h=a[t];if(!h[0]){h.push(r);break}let d;if(h[0].offsetParent===r.offsetParent?d=v(h[0]):(c=v(r,!0),d=v(h[0],!0)),c[s]>=d[o]-1&&c[s]!==d[s]){a.push([r]);break}if(c[o]-1>d[s]||c[s]===d[s]){h.push(r);break}if(t===0){a.unshift([r]);break}}}return a}function v(n,s){s===void 0&&(s=!1);let{offsetTop:o,offsetLeft:a,offsetHeight:r,offsetWidth:c}=n;return s&&([o,a]=e.offsetPosition(n)),{top:o,left:a,bottom:o+r,right:a+c}}const u="uk-transition-leave",w="uk-transition-enter";function y(n,s,o,a){a===void 0&&(a=0);const r=b(s,!0),c={opacity:1},t={opacity:0},h=f=>()=>r===b(s)?f():Promise.reject(),d=h(()=>(e.addClass(s,u),Promise.all(C(s).map((f,i)=>new Promise(m=>setTimeout(()=>e.Transition.start(f,t,o/2,"ease").then(m),i*a)))).then(()=>e.removeClass(s,u)))),p=h(()=>{const f=e.height(s);return e.addClass(s,w),n(),e.css(e.children(s),{opacity:0}),new Promise(i=>requestAnimationFrame(()=>{const m=e.children(s),l=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,f);const E=C(s);e.css(m,t);const B=E.map((j,O)=>new Promise(G=>setTimeout(()=>e.Transition.start(j,c,o/2,"ease").then(G),O*a)));f!==l&&B.push(e.Transition.start(s,{height:l},o/2+E.length*a,"ease")),Promise.all(B).then(()=>{e.removeClass(s,w),r===b(s)&&(e.css(s,{height:"",alignContent:""}),e.css(m,{opacity:""}),delete s.dataset.transition),i()})}))});return e.hasClass(s,u)?T(s).then(p):e.hasClass(s,w)?T(s).then(d).then(p):d().then(p)}function b(n,s){return s&&(n.dataset.transition=1+b(n)),e.toNumber(n.dataset.transition)||0}function T(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function C(n){return g(e.children(n)).reduce((s,o)=>s.concat(e.sortBy(o.filter(a=>e.isInView(a)),"offsetLeft")),[])}function R(n,s,o){return new Promise(a=>requestAnimationFrame(()=>{let r=e.children(s);const c=r.map(h=>P(h,!0)),t=e.css(s,["height","padding"]);e.Transition.cancel(s),r.forEach(e.Transition.cancel),S(s),n(),r=r.concat(e.children(s).filter(h=>!e.includes(r,h))),Promise.resolve().then(()=>{e.fastdom.flush();const h=e.css(s,["height","padding"]),[d,p]=L(s,r,c);r.forEach((f,i)=>p[i]&&e.css(f,p[i])),e.css(s,{display:"block",...t}),requestAnimationFrame(()=>{const f=r.map((i,m)=>e.parent(i)===s&&e.Transition.start(i,d[m],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));Promise.all(f).then(()=>{r.forEach((i,m)=>e.parent(i)===s&&e.css(i,"display",d[m].opacity===0?"none":"")),S(s)},e.noop).then(a)})})}))}function P(n,s){const o=e.css(n,"zIndex");return e.isVisible(n)?{display:"",opacity:s?e.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(n):o,...x(n)}:!1}function L(n,s,o){const a=s.map((c,t)=>e.parent(c)&&t in o?o[t]?e.isVisible(c)?x(c):{opacity:0}:{opacity:e.isVisible(c)?1:0}:!1),r=a.map((c,t)=>{const h=e.parent(s[t])===n&&(o[t]||P(s[t]));if(!h)return!1;if(!c)delete h.opacity;else if(!("opacity"in c)){const{opacity:d}=h;d%1?c.opacity=1:delete h.opacity}return h});return[a,r]}function S(n){e.css(n.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),e.css(n,{height:"",display:"",padding:""})}function x(n){const{height:s,width:o}=e.offset(n),{top:a,left:r}=e.position(n),{marginLeft:c,marginTop:t}=e.css(n,["marginTop","marginLeft"]);return{top:a,left:r,height:s,width:o,marginLeft:c,marginTop:t,transform:""}}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s){s===void 0&&(s=this.$el);const o=this.animation;return(o==="fade"?y:o==="delayed-fade"?function(){for(var r=arguments.length,c=new Array(r),t=0;t<r;t++)c[t]=arguments[t];return y(...c,40)}:o?R:()=>(n(),Promise.resolve()))(n,s,this.duration).then(()=>this.$update(s,"resize"),e.noop)}}},H={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},I={mixins:[H,z],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const n of["init","start","move","end"]){const s=this[n];this[n]=o=>{e.assign(this.pos,e.getEventPos(o)),s(o)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return e.children(this.target)},isEmpty:{get(){return e.isEmpty(this.items)},watch(n){e.toggleClass(this.target,this.clsEmpty,n)},immediate:!0},handles:{get(n,s){let{handle:o}=n;return o?e.$$(o,s):this.items},watch(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:a,offsetLeft:r},placeholder:c}=this;e.css(this.drag,{top:o-a,left:s-r});const t=this.getSortable(document.elementFromPoint(s,o));if(!t)return;const{items:h}=t;if(h.some(e.Transition.inProgress))return;const d=V(h,{x:s,y:o});if(h.length&&(!d||d===c))return;const p=this.getSortable(c),f=q(t.target,d,c,s,o,t===p&&n.moved!==d);f!==!1&&(f&&c===f||(t!==p?(p.remove(c),n.moved=d):delete n.moved,t.insert(c,f),this.touched.add(t)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:a}=n,[r]=this.items.filter(c=>e.within(s,c));!r||a||o>0||e.isInput(s)||e.within(s,"."+this.clsNoDrag)||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=r,this.origin={target:s,index:e.index(r),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(n))},start(n){this.drag=M(this.$container,this.placeholder);const{left:s,top:o}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-o}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),N(this.pos),this.move(n)},move(n){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(n)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;A();const n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:o}of this.touched)for(const a of this.touched)e.removeClass(a.items,s,o);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(n,s){e.addClass(this.items,this.clsItem);const o=()=>s?e.before(s,n):e.append(this.target,n);this.animate(o)},remove(n){!e.within(n,this.target)||this.animate(()=>e.remove(n))},getSortable(n){do{const s=this.$getComponent(n,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(n=e.parent(n))}}};let $;function N(n){let s=Date.now();$=setInterval(()=>{let{x:o,y:a}=n;a+=e.scrollTop(window);const r=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y),/auto|scroll/).reverse().some(c=>{let{scrollTop:t,scrollHeight:h}=c;const{top:d,bottom:p,height:f}=e.offset(e.getViewport(c));if(d<a&&d+35>a)t-=r;else if(p>a&&p-35<a)t+=r;else return;if(t>0&&t<h-f)return e.scrollTop(c,t),!0})},15)}function A(){clearInterval($)}function M(n,s){const o=e.append(n,s.outerHTML.replace(/(^<)(?:li|tr)|(?:li|tr)(\/>$)/g,"$1div$2"));return e.css(o,"margin","0","important"),e.css(o,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(o.firstElementChild,e.height(s.firstElementChild)),o}function V(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function q(n,s,o,a,r,c){if(!e.children(n).length)return;const t=s.getBoundingClientRect();if(!c)return W(n,o)||r<t.top+t.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=D([t.top,t.bottom],[h.top,h.bottom]),p=d?a:r,f=d?"width":"height",i=d?"left":"top",m=d?"right":"bottom",l=h[f]<t[f]?t[f]-h[f]:0;return h[i]<t[i]?l&&p<t[i]+l?!1:s.nextElementSibling:l&&p>t[m]-l?!1:s}function W(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const a=e.children(n),r=a.some((c,t)=>{const h=c.getBoundingClientRect();return a.slice(t+1).some(d=>{const p=d.getBoundingClientRect();return!D([h.left,h.right],[p.left,p.right])})});return o&&e.remove(s),r}function D(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",I),I});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.3dfa2c50b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.4274bc35b | 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')) :
@@ -175,7 +175,7 @@
175
175
  show ?
176
176
  uikitUtil.Transition.start(
177
177
  el,
178
- uikitUtil.assign({}, initProps, { overflow: 'hidden', height: endHeight }),
178
+ { ...initProps, overflow: 'hidden', height: endHeight },
179
179
  Math.round(duration * (1 - currentHeight / endHeight)),
180
180
  transition) :
181
181