uikit 3.16.6 → 3.16.7-dev.fcb5a4616
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 +6 -0
- package/README.md +2 -0
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +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 +5 -414
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +194 -1996
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +205 -1993
- 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 +3 -248
- 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 +143 -2429
- 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 +97 -2383
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -408
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +81 -2367
- 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 +85 -78
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +85 -78
- package/dist/js/uikit.min.js +1 -1
- package/package.json +9 -8
- package/src/js/api/app.js +1 -1
- package/src/js/api/boot.js +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/api/computed.js +1 -1
- package/src/js/api/events.js +1 -1
- package/src/js/api/global.js +43 -43
- package/src/js/api/index.js +5 -5
- package/src/js/api/instance.js +42 -41
- package/src/js/api/observables.js +1 -1
- package/src/js/api/observer.js +9 -1
- package/src/js/api/options.js +1 -1
- package/src/js/api/props.js +1 -1
- package/src/js/api/state.js +1 -1
- package/src/js/api/update.js +1 -1
- package/src/js/api/watch.js +1 -1
- package/src/less/components/dropdown.less +1 -1
- package/src/less/theme/dropdown.less +2 -0
- package/src/scss/components/dropdown.scss +1 -1
- package/src/scss/theme/dropdown.scss +2 -0
- package/src/scss/variables-theme.scss +2 -2
- package/src/scss/variables.scss +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.7-dev.fcb5a4616 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.7-dev.fcb5a4616 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],s):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitCountdown=s(t.UIkit.util))})(this,function(t){"use strict";var s={connected(){t.addClass(this.$el,this.$options.id)}};const d=["days","hours","minutes","seconds"];var r={mixins:[s],props:{date:String,clsWrapper:String,role:String},data:{date:"",clsWrapper:".uk-countdown-%unit%",role:"timer"},connected(){t.attr(this.$el,"role",this.role),this.date=t.toFloat(Date.parse(this.$props.date)),this.end=!1,this.start()},disconnected(){this.stop()},events:{name:"visibilitychange",el(){return document},handler(){document.hidden?this.stop():this.start()}},methods:{start(){this.stop(),this.update(),this.timer||(t.trigger(this.$el,"countdownstart"),this.timer=setInterval(this.update,1e3))},stop(){this.timer&&(clearInterval(this.timer),t.trigger(this.$el,"countdownstop"),this.timer=null)},update(){const o=a(this.date);o.total||(this.stop(),this.end||(t.trigger(this.$el,"countdownend"),this.end=!0));for(const n of d){const i=t.$(this.clsWrapper.replace("%unit%",n),this.$el);if(!i)continue;let e=String(Math.trunc(o[n]));e=e.length<2?`0${e}`:e,i.textContent!==e&&(e=e.split(""),e.length!==i.children.length&&t.html(i,e.map(()=>"<span></span>").join("")),e.forEach((h,u)=>i.children[u].textContent=h))}}}};function a(o){const n=Math.max(0,o-Date.now())/1e3;return{total:n,seconds:n%60,minutes:n/60%60,hours:n/60/60%24,days:n/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",r),r});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.7-dev.fcb5a4616 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -6,420 +6,11 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitFilter = factory(global.UIkit.util));
|
|
7
7
|
})(this, (function (uikitUtil) { 'use strict';
|
|
8
8
|
|
|
9
|
-
const hyphenateRe = /\B([A-Z])/g;
|
|
10
|
-
const hyphenate = memoize((str) => str.replace(hyphenateRe, "-$1").toLowerCase());
|
|
11
|
-
const ucfirst = memoize((str) => str.charAt(0).toUpperCase() + str.slice(1));
|
|
12
|
-
function startsWith(str, search) {
|
|
13
|
-
var _a;
|
|
14
|
-
return (_a = str == null ? void 0 : str.startsWith) == null ? void 0 : _a.call(str, search);
|
|
15
|
-
}
|
|
16
|
-
function includes(obj, search) {
|
|
17
|
-
var _a;
|
|
18
|
-
return (_a = obj == null ? void 0 : obj.includes) == null ? void 0 : _a.call(obj, search);
|
|
19
|
-
}
|
|
20
|
-
const { isArray, from: toArray } = Array;
|
|
21
|
-
function isFunction(obj) {
|
|
22
|
-
return typeof obj === "function";
|
|
23
|
-
}
|
|
24
|
-
function isObject(obj) {
|
|
25
|
-
return obj !== null && typeof obj === "object";
|
|
26
|
-
}
|
|
27
|
-
function isWindow(obj) {
|
|
28
|
-
return isObject(obj) && obj === obj.window;
|
|
29
|
-
}
|
|
30
|
-
function isDocument(obj) {
|
|
31
|
-
return nodeType(obj) === 9;
|
|
32
|
-
}
|
|
33
|
-
function isNode(obj) {
|
|
34
|
-
return nodeType(obj) >= 1;
|
|
35
|
-
}
|
|
36
|
-
function isElement(obj) {
|
|
37
|
-
return nodeType(obj) === 1;
|
|
38
|
-
}
|
|
39
|
-
function nodeType(obj) {
|
|
40
|
-
return !isWindow(obj) && isObject(obj) && obj.nodeType;
|
|
41
|
-
}
|
|
42
|
-
function isString(value) {
|
|
43
|
-
return typeof value === "string";
|
|
44
|
-
}
|
|
45
|
-
function isNumber(value) {
|
|
46
|
-
return typeof value === "number";
|
|
47
|
-
}
|
|
48
|
-
function isNumeric(value) {
|
|
49
|
-
return isNumber(value) || isString(value) && !isNaN(value - parseFloat(value));
|
|
50
|
-
}
|
|
51
|
-
function isUndefined(value) {
|
|
52
|
-
return value === void 0;
|
|
53
|
-
}
|
|
54
|
-
function toFloat(value) {
|
|
55
|
-
return parseFloat(value) || 0;
|
|
56
|
-
}
|
|
57
|
-
function toNode(element) {
|
|
58
|
-
return toNodes(element)[0];
|
|
59
|
-
}
|
|
60
|
-
function toNodes(element) {
|
|
61
|
-
return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
|
|
62
|
-
}
|
|
63
|
-
function each(obj, cb) {
|
|
64
|
-
for (const key in obj) {
|
|
65
|
-
if (false === cb(obj[key], key)) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
function sumBy(array, iteratee) {
|
|
72
|
-
return array.reduce(
|
|
73
|
-
(sum, item) => sum + toFloat(isFunction(iteratee) ? iteratee(item) : item[iteratee]),
|
|
74
|
-
0
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
function noop() {
|
|
78
|
-
}
|
|
79
|
-
function memoize(fn) {
|
|
80
|
-
const cache = /* @__PURE__ */ Object.create(null);
|
|
81
|
-
return (key) => cache[key] || (cache[key] = fn(key));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function attr(element, name, value) {
|
|
85
|
-
var _a;
|
|
86
|
-
if (isObject(name)) {
|
|
87
|
-
for (const key in name) {
|
|
88
|
-
attr(element, key, name[key]);
|
|
89
|
-
}
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
if (isUndefined(value)) {
|
|
93
|
-
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
94
|
-
} else {
|
|
95
|
-
for (const el of toNodes(element)) {
|
|
96
|
-
if (isFunction(value)) {
|
|
97
|
-
value = value.call(el, attr(el, name));
|
|
98
|
-
}
|
|
99
|
-
if (value === null) {
|
|
100
|
-
removeAttr(el, name);
|
|
101
|
-
} else {
|
|
102
|
-
el.setAttribute(name, value);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function removeAttr(element, name) {
|
|
108
|
-
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function parent(element) {
|
|
112
|
-
var _a;
|
|
113
|
-
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
114
|
-
}
|
|
115
|
-
function filter(element, selector) {
|
|
116
|
-
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
117
|
-
}
|
|
118
|
-
function matches(element, selector) {
|
|
119
|
-
return toNodes(element).some((element2) => element2.matches(selector));
|
|
120
|
-
}
|
|
121
|
-
function closest(element, selector) {
|
|
122
|
-
return isElement(element) ? element.closest(startsWith(selector, ">") ? selector.slice(1) : selector) : toNodes(element).map((element2) => closest(element2, selector)).filter(Boolean);
|
|
123
|
-
}
|
|
124
|
-
function within(element, selector) {
|
|
125
|
-
return isString(selector) ? !!closest(element, selector) : toNode(selector).contains(toNode(element));
|
|
126
|
-
}
|
|
127
|
-
function children(element, selector) {
|
|
128
|
-
element = toNode(element);
|
|
129
|
-
const children2 = element ? toNodes(element.children) : [];
|
|
130
|
-
return selector ? filter(children2, selector) : children2;
|
|
131
|
-
}
|
|
132
|
-
function index(element, ref) {
|
|
133
|
-
return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function findAll(selector, context) {
|
|
137
|
-
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
138
|
-
}
|
|
139
|
-
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
140
|
-
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
141
|
-
const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
142
|
-
const sanatize = memoize((selector) => selector.replace(contextSanitizeRe, "$1 *"));
|
|
143
|
-
function _query(selector, context = document, queryFn) {
|
|
144
|
-
if (!selector || !isString(selector)) {
|
|
145
|
-
return selector;
|
|
146
|
-
}
|
|
147
|
-
selector = sanatize(selector);
|
|
148
|
-
if (isContextSelector(selector)) {
|
|
149
|
-
const split = splitSelector(selector);
|
|
150
|
-
selector = "";
|
|
151
|
-
for (let sel of split) {
|
|
152
|
-
let ctx = context;
|
|
153
|
-
if (sel[0] === "!") {
|
|
154
|
-
const selectors = sel.substr(1).trim().split(" ");
|
|
155
|
-
ctx = closest(parent(context), selectors[0]);
|
|
156
|
-
sel = selectors.slice(1).join(" ").trim();
|
|
157
|
-
if (!sel.length && split.length === 1) {
|
|
158
|
-
return ctx;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if (sel[0] === "-") {
|
|
162
|
-
const selectors = sel.substr(1).trim().split(" ");
|
|
163
|
-
const prev = (ctx || context).previousElementSibling;
|
|
164
|
-
ctx = matches(prev, sel.substr(1)) ? prev : null;
|
|
165
|
-
sel = selectors.slice(1).join(" ");
|
|
166
|
-
}
|
|
167
|
-
if (ctx) {
|
|
168
|
-
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
context = document;
|
|
172
|
-
}
|
|
173
|
-
try {
|
|
174
|
-
return context[queryFn](selector);
|
|
175
|
-
} catch (e) {
|
|
176
|
-
return null;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
const selectorRe = /.*?[^\\](?:,|$)/g;
|
|
180
|
-
const splitSelector = memoize(
|
|
181
|
-
(selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
|
|
182
|
-
);
|
|
183
|
-
function domPath(element) {
|
|
184
|
-
const names = [];
|
|
185
|
-
while (element.parentNode) {
|
|
186
|
-
const id = attr(element, "id");
|
|
187
|
-
if (id) {
|
|
188
|
-
names.unshift(`#${escape(id)}`);
|
|
189
|
-
break;
|
|
190
|
-
} else {
|
|
191
|
-
let { tagName } = element;
|
|
192
|
-
if (tagName !== "HTML") {
|
|
193
|
-
tagName += `:nth-child(${index(element) + 1})`;
|
|
194
|
-
}
|
|
195
|
-
names.unshift(tagName);
|
|
196
|
-
element = element.parentNode;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return names.join(" > ");
|
|
200
|
-
}
|
|
201
|
-
function escape(css) {
|
|
202
|
-
return isString(css) ? CSS.escape(css) : "";
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function on(...args) {
|
|
206
|
-
let [targets, types, selector, listener, useCapture = false] = getArgs(args);
|
|
207
|
-
if (listener.length > 1) {
|
|
208
|
-
listener = detail(listener);
|
|
209
|
-
}
|
|
210
|
-
if (useCapture == null ? void 0 : useCapture.self) {
|
|
211
|
-
listener = selfFilter(listener);
|
|
212
|
-
}
|
|
213
|
-
if (selector) {
|
|
214
|
-
listener = delegate(selector, listener);
|
|
215
|
-
}
|
|
216
|
-
for (const type of types) {
|
|
217
|
-
for (const target of targets) {
|
|
218
|
-
target.addEventListener(type, listener, useCapture);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
return () => off(targets, types, listener, useCapture);
|
|
222
|
-
}
|
|
223
|
-
function off(...args) {
|
|
224
|
-
let [targets, types, , listener, useCapture = false] = getArgs(args);
|
|
225
|
-
for (const type of types) {
|
|
226
|
-
for (const target of targets) {
|
|
227
|
-
target.removeEventListener(type, listener, useCapture);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
function getArgs(args) {
|
|
232
|
-
args[0] = toEventTargets(args[0]);
|
|
233
|
-
if (isString(args[1])) {
|
|
234
|
-
args[1] = args[1].split(" ");
|
|
235
|
-
}
|
|
236
|
-
if (isFunction(args[2])) {
|
|
237
|
-
args.splice(2, 0, false);
|
|
238
|
-
}
|
|
239
|
-
return args;
|
|
240
|
-
}
|
|
241
|
-
function delegate(selector, listener) {
|
|
242
|
-
return (e) => {
|
|
243
|
-
const current = selector[0] === ">" ? findAll(selector, e.currentTarget).reverse().filter((element) => within(e.target, element))[0] : closest(e.target, selector);
|
|
244
|
-
if (current) {
|
|
245
|
-
e.current = current;
|
|
246
|
-
listener.call(this, e);
|
|
247
|
-
delete e.current;
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
function detail(listener) {
|
|
252
|
-
return (e) => isArray(e.detail) ? listener(e, ...e.detail) : listener(e);
|
|
253
|
-
}
|
|
254
|
-
function selfFilter(listener) {
|
|
255
|
-
return function(e) {
|
|
256
|
-
if (e.target === e.currentTarget || e.target === e.current) {
|
|
257
|
-
return listener.call(null, e);
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
function isEventTarget(target) {
|
|
262
|
-
return target && "addEventListener" in target;
|
|
263
|
-
}
|
|
264
|
-
function toEventTarget(target) {
|
|
265
|
-
return isEventTarget(target) ? target : toNode(target);
|
|
266
|
-
}
|
|
267
|
-
function toEventTargets(target) {
|
|
268
|
-
return isArray(target) ? target.map(toEventTarget).filter(Boolean) : isString(target) ? findAll(target) : isEventTarget(target) ? [target] : toNodes(target);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
const cssNumber = {
|
|
272
|
-
"animation-iteration-count": true,
|
|
273
|
-
"column-count": true,
|
|
274
|
-
"fill-opacity": true,
|
|
275
|
-
"flex-grow": true,
|
|
276
|
-
"flex-shrink": true,
|
|
277
|
-
"font-weight": true,
|
|
278
|
-
"line-height": true,
|
|
279
|
-
opacity: true,
|
|
280
|
-
order: true,
|
|
281
|
-
orphans: true,
|
|
282
|
-
"stroke-dasharray": true,
|
|
283
|
-
"stroke-dashoffset": true,
|
|
284
|
-
widows: true,
|
|
285
|
-
"z-index": true,
|
|
286
|
-
zoom: true
|
|
287
|
-
};
|
|
288
|
-
function css(element, property, value, priority) {
|
|
289
|
-
const elements = toNodes(element);
|
|
290
|
-
for (const element2 of elements) {
|
|
291
|
-
if (isString(property)) {
|
|
292
|
-
property = propName(property);
|
|
293
|
-
if (isUndefined(value)) {
|
|
294
|
-
return getComputedStyle(element2).getPropertyValue(property);
|
|
295
|
-
} else {
|
|
296
|
-
element2.style.setProperty(
|
|
297
|
-
property,
|
|
298
|
-
isNumeric(value) && !cssNumber[property] ? `${value}px` : value || isNumber(value) ? value : "",
|
|
299
|
-
priority
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
} else if (isArray(property)) {
|
|
303
|
-
const props = {};
|
|
304
|
-
for (const prop of property) {
|
|
305
|
-
props[prop] = css(element2, prop);
|
|
306
|
-
}
|
|
307
|
-
return props;
|
|
308
|
-
} else if (isObject(property)) {
|
|
309
|
-
priority = value;
|
|
310
|
-
each(property, (value2, property2) => css(element2, property2, value2, priority));
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
return elements[0];
|
|
314
|
-
}
|
|
315
|
-
const propName = memoize((name) => vendorPropName(name));
|
|
316
|
-
function vendorPropName(name) {
|
|
317
|
-
if (startsWith(name, "--")) {
|
|
318
|
-
return name;
|
|
319
|
-
}
|
|
320
|
-
name = hyphenate(name);
|
|
321
|
-
const { style } = document.documentElement;
|
|
322
|
-
if (name in style) {
|
|
323
|
-
return name;
|
|
324
|
-
}
|
|
325
|
-
for (const prefix of ["webkit", "moz"]) {
|
|
326
|
-
const prefixedName = `-${prefix}-${name}`;
|
|
327
|
-
if (prefixedName in style) {
|
|
328
|
-
return prefixedName;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
const dirs = {
|
|
334
|
-
width: ["left", "right"],
|
|
335
|
-
height: ["top", "bottom"]
|
|
336
|
-
};
|
|
337
|
-
dimension("height");
|
|
338
|
-
dimension("width");
|
|
339
|
-
function dimension(prop) {
|
|
340
|
-
const propName = ucfirst(prop);
|
|
341
|
-
return (element, value) => {
|
|
342
|
-
if (isUndefined(value)) {
|
|
343
|
-
if (isWindow(element)) {
|
|
344
|
-
return element[`inner${propName}`];
|
|
345
|
-
}
|
|
346
|
-
if (isDocument(element)) {
|
|
347
|
-
const doc = element.documentElement;
|
|
348
|
-
return Math.max(doc[`offset${propName}`], doc[`scroll${propName}`]);
|
|
349
|
-
}
|
|
350
|
-
element = toNode(element);
|
|
351
|
-
value = css(element, prop);
|
|
352
|
-
value = value === "auto" ? element[`offset${propName}`] : toFloat(value) || 0;
|
|
353
|
-
return value - boxModelAdjust(element, prop);
|
|
354
|
-
} else {
|
|
355
|
-
return css(
|
|
356
|
-
element,
|
|
357
|
-
prop,
|
|
358
|
-
!value && value !== 0 ? "" : +value + boxModelAdjust(element, prop) + "px"
|
|
359
|
-
);
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
function boxModelAdjust(element, prop, sizing = "border-box") {
|
|
364
|
-
return css(element, "boxSizing") === sizing ? sumBy(
|
|
365
|
-
dirs[prop].map(ucfirst),
|
|
366
|
-
(prop2) => toFloat(css(element, `padding${prop2}`)) + toFloat(css(element, `border${prop2}Width`))
|
|
367
|
-
) : 0;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
const inBrowser = typeof window !== "undefined";
|
|
371
|
-
|
|
372
|
-
const hasResizeObserver = inBrowser && window.ResizeObserver;
|
|
373
|
-
function observeResize(targets, cb, options = { box: "border-box" }) {
|
|
374
|
-
if (hasResizeObserver) {
|
|
375
|
-
return observe$1(ResizeObserver, targets, cb, options);
|
|
376
|
-
}
|
|
377
|
-
initResizeListener();
|
|
378
|
-
listeners.add(cb);
|
|
379
|
-
return {
|
|
380
|
-
observe: noop,
|
|
381
|
-
unobserve: noop,
|
|
382
|
-
disconnect() {
|
|
383
|
-
listeners.delete(cb);
|
|
384
|
-
}
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
let listeners;
|
|
388
|
-
function initResizeListener() {
|
|
389
|
-
if (listeners) {
|
|
390
|
-
return;
|
|
391
|
-
}
|
|
392
|
-
listeners = /* @__PURE__ */ new Set();
|
|
393
|
-
let pendingResize;
|
|
394
|
-
const handleResize = () => {
|
|
395
|
-
if (pendingResize) {
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
pendingResize = true;
|
|
399
|
-
requestAnimationFrame(() => pendingResize = false);
|
|
400
|
-
for (const listener of listeners) {
|
|
401
|
-
listener();
|
|
402
|
-
}
|
|
403
|
-
};
|
|
404
|
-
on(window, "load resize", handleResize);
|
|
405
|
-
on(document, "loadedmetadata load", handleResize, true);
|
|
406
|
-
}
|
|
407
|
-
function observeMutation(targets, cb, options) {
|
|
408
|
-
return observe$1(MutationObserver, targets, cb, options);
|
|
409
|
-
}
|
|
410
|
-
function observe$1(Observer, targets, cb, options) {
|
|
411
|
-
const observer = new Observer(cb);
|
|
412
|
-
for (const el of toNodes(targets)) {
|
|
413
|
-
observer.observe(el, options);
|
|
414
|
-
}
|
|
415
|
-
return observer;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
9
|
function resize(options) {
|
|
419
|
-
return observe(observeResize, options, "resize");
|
|
10
|
+
return observe(uikitUtil.observeResize, options, "resize");
|
|
420
11
|
}
|
|
421
12
|
function mutation(options) {
|
|
422
|
-
return observe(observeMutation, options);
|
|
13
|
+
return observe(uikitUtil.observeMutation, options);
|
|
423
14
|
}
|
|
424
15
|
function observe(observe2, options, emit) {
|
|
425
16
|
return {
|
|
@@ -734,9 +325,9 @@
|
|
|
734
325
|
|
|
735
326
|
function parseOptions(options, args = []) {
|
|
736
327
|
try {
|
|
737
|
-
return options ? startsWith(options, "{") ? JSON.parse(options) : args.length && !includes(options, ":") ? { [args[0]]: options } : options.split(";").reduce((options2, option) => {
|
|
328
|
+
return options ? uikitUtil.startsWith(options, "{") ? JSON.parse(options) : args.length && !uikitUtil.includes(options, ":") ? { [args[0]]: options } : options.split(";").reduce((options2, option) => {
|
|
738
329
|
const [key, value] = option.split(/:(.*)/);
|
|
739
|
-
if (key && !isUndefined(value)) {
|
|
330
|
+
if (key && !uikitUtil.isUndefined(value)) {
|
|
740
331
|
options2[key.trim()] = value.trim();
|
|
741
332
|
}
|
|
742
333
|
return options2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.6 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(o,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],$):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitFilter=$(o.UIkit.util))})(this,function(o){"use strict";const $=/\B([A-Z])/g,an=w(n=>n.replace($,"-$1").toLowerCase()),R=w(n=>n.charAt(0).toUpperCase()+n.slice(1));function P(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}function un(n,e){var t;return(t=n==null?void 0:n.includes)==null?void 0:t.call(n,e)}const{isArray:F,from:ae}=Array;function N(n){return typeof n=="function"}function S(n){return n!==null&&typeof n=="object"}function L(n){return S(n)&&n===n.window}function dn(n){return z(n)===9}function q(n){return z(n)>=1}function ln(n){return z(n)===1}function z(n){return!L(n)&&S(n)&&n.nodeType}function m(n){return typeof n=="string"}function M(n){return typeof n=="number"}function hn(n){return M(n)||m(n)&&!isNaN(n-parseFloat(n))}function T(n){return n===void 0}function C(n){return parseFloat(n)||0}function h(n){return d(n)[0]}function d(n){return q(n)?[n]:Array.from(n||[]).filter(q)}function pn(n,e){for(const t in n)if(e(n[t],t)===!1)return!1;return!0}function mn(n,e){return n.reduce((t,r)=>t+C(N(e)?e(r):r[e]),0)}function W(){}function w(n){const e=Object.create(null);return t=>e[t]||(e[t]=n(t))}function I(n,e,t){var r;if(S(e)){for(const s in e)I(n,s,e[s]);return}if(T(t))return(r=h(n))==null?void 0:r.getAttribute(e);for(const s of d(n))N(t)&&(t=t.call(s,I(s,e))),t===null?yn(s,e):s.setAttribute(e,t)}function yn(n,e){d(n).forEach(t=>t.removeAttribute(e))}function H(n){var e;return(e=h(n))==null?void 0:e.parentElement}function wn(n,e){return d(n).filter(t=>V(t,e))}function V(n,e){return d(n).some(t=>t.matches(e))}function x(n,e){return ln(n)?n.closest(P(e,">")?e.slice(1):e):d(n).map(t=>x(t,e)).filter(Boolean)}function gn(n,e){return m(e)?!!x(n,e):h(e).contains(h(n))}function bn(n,e){n=h(n);const t=n?d(n.children):[];return e?wn(t,e):t}function $n(n,e){return e?d(n).indexOf(h(e)):bn(H(n)).indexOf(n)}function D(n,e){return d(xn(n,h(e),"querySelectorAll"))}const vn=/(^|[^\\],)\s*[!>+~-]/,Sn=w(n=>n.match(vn)),Tn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,Cn=w(n=>n.replace(Tn,"$1 *"));function xn(n,e=document,t){if(!n||!m(n))return n;if(n=Cn(n),Sn(n)){const r=An(n);n="";for(let s of r){let c=e;if(s[0]==="!"){const i=s.substr(1).trim().split(" ");if(c=x(H(e),i[0]),s=i.slice(1).join(" ").trim(),!s.length&&r.length===1)return c}if(s[0]==="-"){const i=s.substr(1).trim().split(" "),f=(c||e).previousElementSibling;c=V(f,s.substr(1))?f:null,s=i.slice(1).join(" ")}c&&(n+=`${n?",":""}${Pn(c)} ${s}`)}e=document}try{return e[t](n)}catch{return null}}const En=/.*?[^\\](?:,|$)/g,An=w(n=>n.match(En).map(e=>e.replace(/,$/,"").trim()));function Pn(n){const e=[];for(;n.parentNode;){const t=I(n,"id");if(t){e.unshift(`#${Fn(t)}`);break}else{let{tagName:r}=n;r!=="HTML"&&(r+=`:nth-child(${$n(n)+1})`),e.unshift(r),n=n.parentNode}}return e.join(" > ")}function Fn(n){return m(n)?CSS.escape(n):""}function _(...n){let[e,t,r,s,c=!1]=j(n);s.length>1&&(s=In(s)),c!=null&&c.self&&(s=Bn(s)),r&&(s=zn(r,s));for(const i of t)for(const f of e)f.addEventListener(i,s,c);return()=>Nn(e,t,s,c)}function Nn(...n){let[e,t,,r,s=!1]=j(n);for(const c of t)for(const i of e)i.removeEventListener(c,r,s)}function j(n){return n[0]=Rn(n[0]),m(n[1])&&(n[1]=n[1].split(" ")),N(n[2])&&n.splice(2,0,!1),n}function zn(n,e){return t=>{const r=n[0]===">"?D(n,t.currentTarget).reverse().filter(s=>gn(t.target,s))[0]:x(t.target,n);r&&(t.current=r,e.call(this,t),delete t.current)}}function In(n){return e=>F(e.detail)?n(e,...e.detail):n(e)}function Bn(n){return function(e){if(e.target===e.currentTarget||e.target===e.current)return n.call(null,e)}}function G(n){return n&&"addEventListener"in n}function On(n){return G(n)?n:h(n)}function Rn(n){return F(n)?n.map(On).filter(Boolean):m(n)?D(n):G(n)?[n]:d(n)}const Ln={"animation-iteration-count":!0,"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,widows:!0,"z-index":!0,zoom:!0};function y(n,e,t,r){const s=d(n);for(const c of s)if(m(e)){if(e=qn(e),T(t))return getComputedStyle(c).getPropertyValue(e);c.style.setProperty(e,hn(t)&&!Ln[e]?`${t}px`:t||M(t)?t:"",r)}else if(F(e)){const i={};for(const f of e)i[f]=y(c,f);return i}else S(e)&&(r=t,pn(e,(i,f)=>y(c,f,i,r)));return s[0]}const qn=w(n=>Mn(n));function Mn(n){if(P(n,"--"))return n;n=an(n);const{style:e}=document.documentElement;if(n in e)return n;for(const t of["webkit","moz"]){const r=`-${t}-${n}`;if(r in e)return r}}const Wn={width:["left","right"],height:["top","bottom"]};J("height"),J("width");function J(n){const e=R(n);return(t,r)=>{if(T(r)){if(L(t))return t[`inner${e}`];if(dn(t)){const s=t.documentElement;return Math.max(s[`offset${e}`],s[`scroll${e}`])}return t=h(t),r=y(t,n),r=r==="auto"?t[`offset${e}`]:C(r)||0,r-Z(t,n)}else return y(t,n,!r&&r!==0?"":+r+Z(t,n)+"px")}}function Z(n,e,t="border-box"){return y(n,"boxSizing")===t?mn(Wn[e].map(R),r=>C(y(n,`padding${r}`))+C(y(n,`border${r}Width`))):0}const Hn=typeof window<"u"&&window.ResizeObserver;function Vn(n,e,t={box:"border-box"}){return Hn?K(ResizeObserver,n,e,t):(Dn(),v.add(e),{observe:W,unobserve:W,disconnect(){v.delete(e)}})}let v;function Dn(){if(v)return;v=new Set;let n;const e=()=>{if(!n){n=!0,requestAnimationFrame(()=>n=!1);for(const t of v)t()}};_(window,"load resize",e),_(document,"loadedmetadata load",e,!0)}function _n(n,e,t){return K(MutationObserver,n,e,t)}function K(n,e,t,r){const s=new n(t);for(const c of d(e))s.observe(c,r);return s}function jn(n){return Q(Vn,n,"resize")}function Gn(n){return Q(_n,n)}function Q(n,e,t){return{observe:n,handler(){this.$emit(t)},...e}}Gn({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),jn({target:({$el:n})=>[n,...o.toArray(n.children)]});function X(n){return Y(n,"top","bottom")}function Jn(n){const e=[];for(const t of n){const r=Y(t,"left","right");for(let s=0;s<r.length;s++)e[s]=e[s]?e[s].concat(r[s]):r[s]}return o.isRtl?e.reverse():e}function Y(n,e,t){const r=[[]];for(const s of n){if(!o.isVisible(s))continue;let c=E(s);for(let i=r.length-1;i>=0;i--){const f=r[i];if(!f[0]){f.push(s);break}let u;if(f[0].offsetParent===s.offsetParent?u=E(f[0]):(c=E(s,!0),u=E(f[0],!0)),c[e]>=u[t]-1&&c[e]!==u[e]){r.push([s]);break}if(c[t]-1>u[e]||c[e]===u[e]){f.push(s);break}if(i===0){r.unshift([s]);break}}}return r}function E(n,e=!1){let{offsetTop:t,offsetLeft:r,offsetHeight:s,offsetWidth:c}=n;return e&&([t,r]=o.offsetPosition(n)),{top:t,left:r,bottom:t+s,right:r+c}}const B="uk-transition-leave",O="uk-transition-enter";function k(n,e,t,r=0){const s=A(e,!0),c={opacity:1},i={opacity:0},f=p=>()=>s===A(e)?p():Promise.reject(),u=f(async()=>{o.addClass(e,B),await Promise.all(nn(e).map((p,b)=>new Promise(a=>setTimeout(()=>o.Transition.start(p,i,t/2,"ease").then(a),b*r)))),o.removeClass(e,B)}),g=f(async()=>{const p=o.height(e);o.addClass(e,O),n(),o.css(o.children(e),{opacity:0}),await Zn();const b=o.children(e),a=o.height(e);o.css(e,"alignContent","flex-start"),o.height(e,p);const l=nn(e);o.css(b,i);const fn=l.map(async(ie,fe)=>{await Kn(fe*r),await o.Transition.start(ie,c,t/2,"ease")});p!==a&&fn.push(o.Transition.start(e,{height:a},t/2+l.length*r,"ease")),await Promise.all(fn).then(()=>{o.removeClass(e,O),s===A(e)&&(o.css(e,{height:"",alignContent:""}),o.css(b,{opacity:""}),delete e.dataset.transition)})});return o.hasClass(e,B)?U(e).then(g):o.hasClass(e,O)?U(e).then(u).then(g):u().then(g)}function A(n,e){return e&&(n.dataset.transition=1+A(n)),o.toNumber(n.dataset.transition)||0}function U(n){return Promise.all(o.children(n).filter(o.Transition.inProgress).map(e=>new Promise(t=>o.once(e,"transitionend transitioncanceled",t))))}function nn(n){return X(o.children(n)).reduce((e,t)=>e.concat(o.sortBy(t.filter(r=>o.isInView(r)),"offsetLeft")),[])}function Zn(){return new Promise(n=>requestAnimationFrame(n))}function Kn(n){return new Promise(e=>setTimeout(e,n))}async function Qn(n,e,t){await rn();let r=o.children(e);const s=r.map(a=>en(a,!0)),c={...o.css(e,["height","padding"]),display:"block"};await Promise.all(r.concat(e).map(o.Transition.cancel)),n(),r=r.concat(o.children(e).filter(a=>!o.includes(r,a))),await Promise.resolve(),o.fastdom.flush();const i=o.attr(e,"style"),f=o.css(e,["height","padding"]),[u,g]=Xn(e,r,s),p=r.map(a=>({style:o.attr(a,"style")}));r.forEach((a,l)=>g[l]&&o.css(a,g[l])),o.css(e,c),o.trigger(e,"scroll"),o.fastdom.flush(),await rn();const b=r.map((a,l)=>o.parent(a)===e&&o.Transition.start(a,u[l],t,"ease")).concat(o.Transition.start(e,f,t,"ease"));try{await Promise.all(b),r.forEach((a,l)=>{o.attr(a,p[l]),o.parent(a)===e&&o.css(a,"display",u[l].opacity===0?"none":"")}),o.attr(e,"style",i)}catch{o.attr(r,"style",""),Yn(e,c)}}function en(n,e){const t=o.css(n,"zIndex");return o.isVisible(n)?{display:"",opacity:e?o.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:t==="auto"?o.index(n):t,...tn(n)}:!1}function Xn(n,e,t){const r=e.map((c,i)=>o.parent(c)&&i in t?t[i]?o.isVisible(c)?tn(c):{opacity:0}:{opacity:o.isVisible(c)?1:0}:!1),s=r.map((c,i)=>{const f=o.parent(e[i])===n&&(t[i]||en(e[i]));if(!f)return!1;if(!c)delete f.opacity;else if(!("opacity"in c)){const{opacity:u}=f;u%1?c.opacity=1:delete f.opacity}return f});return[r,s]}function Yn(n,e){for(const t in e)o.css(n,t,"")}function tn(n){const{height:e,width:t}=o.offset(n);return{height:e,width:t,transform:"",...o.position(n),...o.css(n,["marginTop","marginLeft"])}}function rn(){return new Promise(n=>requestAnimationFrame(n))}var kn={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,e=this.$el){const t=this.animation;return(t==="fade"?k:t==="delayed-fade"?(...s)=>k(...s,40):t?Qn:()=>(n(),Promise.resolve()))(n,e,this.duration).catch(o.noop)}}};function Un(n,e=[]){try{return n?P(n,"{")?JSON.parse(n):e.length&&!un(n,":")?{[e[0]]:n}:n.split(";").reduce((t,r)=>{const[s,c]=r.split(/:(.*)/);return s&&!T(c)&&(t[s.trim()]=c.trim()),t},{}):{}}catch{return{}}}const ne={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var on={mixins:[kn],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get({attrItem:n},e){return o.$$(`[${n}],[data-${n}]`,e)},watch(n){this.updateState();const e=o.$$(this.selActive,this.$el);for(const t of n){this.selActive!==!1&&o.toggleClass(t,this.cls,o.includes(e,t));const r=ce(t);o.isTag(r,"a")&&o.attr(r,"role","button")}},immediate:!0},children:{get({target:n},e){return o.$$(`${n} > *`,e)},watch(n,e){e&&this.updateState()},immediate:!0}},events:{name:"click keydown",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(n){n.type==="keydown"&&n.keyCode!==ne.SPACE||o.closest(n.target,"a,button")&&(n.preventDefault(),this.apply(n.current))}},methods:{apply(n){const e=this.getState(),t=cn(n,this.attrItem,this.getState());ee(e,t)||this.setState(t)},getState(){return this.toggles.filter(n=>o.hasClass(n,this.cls)).reduce((n,e)=>cn(e,this.attrItem,n),{filter:{"":""},sort:[]})},async setState(n,e=!0){n={filter:{"":""},sort:[],...n},o.trigger(this.$el,"beforeFilter",[this,n]);for(const t of this.toggles)o.toggleClass(t,this.cls,re(t,this.attrItem,n));await Promise.all(o.$$(this.target,this.$el).map(t=>{const r=()=>{te(n,t,o.children(t)),this.$update(this.$el)};return e?this.animate(r,t):r()})),o.trigger(this.$el,"afterFilter",[this])},updateState(){o.fastdom.write(()=>this.setState(this.getState(),!1))}}};function sn(n,e){return Un(o.data(n,e),["filter"])}function ee(n,e){return["filter","sort"].every(t=>o.isEqual(n[t],e[t]))}function te(n,e,t){const r=oe(n);t.forEach(i=>o.css(i,"display",r&&!o.matches(i,r)?"none":""));const[s,c]=n.sort;if(s){const i=se(t,s,c);o.isEqual(i,t)||o.append(e,i)}}function cn(n,e,t){const{filter:r,group:s,sort:c,order:i="asc"}=sn(n,e);return(r||o.isUndefined(c))&&(s?r?(delete t.filter[""],t.filter[s]=r):(delete t.filter[s],(o.isEmpty(t.filter)||""in t.filter)&&(t.filter={"":r||""})):t.filter={"":r||""}),o.isUndefined(c)||(t.sort=[c,i]),t}function re(n,e,{filter:t={"":""},sort:[r,s]}){const{filter:c="",group:i="",sort:f,order:u="asc"}=sn(n,e);return o.isUndefined(f)?i in t&&c===t[i]||!c&&i&&!(i in t)&&!t[""]:r===f&&s===u}function oe({filter:n}){let e="";return o.each(n,t=>e+=t||""),e}function se(n,e,t){return[...n].sort((r,s)=>o.data(r,e).localeCompare(o.data(s,e),void 0,{numeric:!0})*(t==="asc"||-1))}function ce(n){return o.$("a,button",n)||n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",on),on});
|
|
1
|
+
/*! UIkit 3.16.7-dev.fcb5a4616 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],u):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitFilter=u(s.UIkit.util))})(this,function(s){"use strict";function u(n){return b(s.observeResize,n,"resize")}function N(n){return b(s.observeMutation,n)}function b(n,e,o){return{observe:n,handler(){this.$emit(o)},...e}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),u({target:({$el:n})=>[n,...s.toArray(n.children)]});function T(n){return C(n,"top","bottom")}function q(n){const e=[];for(const o of n){const t=C(o,"left","right");for(let r=0;r<t.length;r++)e[r]=e[r]?e[r].concat(t[r]):t[r]}return s.isRtl?e.reverse():e}function C(n,e,o){const t=[[]];for(const r of n){if(!s.isVisible(r))continue;let a=y(r);for(let c=t.length-1;c>=0;c--){const f=t[c];if(!f[0]){f.push(r);break}let h;if(f[0].offsetParent===r.offsetParent?h=y(f[0]):(a=y(r,!0),h=y(f[0],!0)),a[e]>=h[o]-1&&a[e]!==h[e]){t.push([r]);break}if(a[o]-1>h[e]||a[e]===h[e]){f.push(r);break}if(c===0){t.unshift([r]);break}}}return t}function y(n,e=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:r,offsetWidth:a}=n;return e&&([o,t]=s.offsetPosition(n)),{top:o,left:t,bottom:o+r,right:t+a}}const w="uk-transition-leave",v="uk-transition-enter";function $(n,e,o,t=0){const r=g(e,!0),a={opacity:1},c={opacity:0},f=p=>()=>r===g(e)?p():Promise.reject(),h=f(async()=>{s.addClass(e,w),await Promise.all(P(e).map((p,l)=>new Promise(d=>setTimeout(()=>s.Transition.start(p,c,o/2,"ease").then(d),l*t)))),s.removeClass(e,w)}),i=f(async()=>{const p=s.height(e);s.addClass(e,v),n(),s.css(s.children(e),{opacity:0}),await L();const l=s.children(e),d=s.height(e);s.css(e,"alignContent","flex-start"),s.height(e,p);const m=P(e);s.css(l,c);const z=m.map(async(Y,Z)=>{await O(Z*t),await s.Transition.start(Y,a,o/2,"ease")});p!==d&&z.push(s.Transition.start(e,{height:d},o/2+m.length*t,"ease")),await Promise.all(z).then(()=>{s.removeClass(e,v),r===g(e)&&(s.css(e,{height:"",alignContent:""}),s.css(l,{opacity:""}),delete e.dataset.transition)})});return s.hasClass(e,w)?S(e).then(i):s.hasClass(e,v)?S(e).then(h).then(i):h().then(i)}function g(n,e){return e&&(n.dataset.transition=1+g(n)),s.toNumber(n.dataset.transition)||0}function S(n){return Promise.all(s.children(n).filter(s.Transition.inProgress).map(e=>new Promise(o=>s.once(e,"transitionend transitioncanceled",o))))}function P(n){return T(s.children(n)).reduce((e,o)=>e.concat(s.sortBy(o.filter(t=>s.isInView(t)),"offsetLeft")),[])}function L(){return new Promise(n=>requestAnimationFrame(n))}function O(n){return new Promise(e=>setTimeout(e,n))}async function H(n,e,o){await E();let t=s.children(e);const r=t.map(d=>I(d,!0)),a={...s.css(e,["height","padding"]),display:"block"};await Promise.all(t.concat(e).map(s.Transition.cancel)),n(),t=t.concat(s.children(e).filter(d=>!s.includes(t,d))),await Promise.resolve(),s.fastdom.flush();const c=s.attr(e,"style"),f=s.css(e,["height","padding"]),[h,i]=V(e,t,r),p=t.map(d=>({style:s.attr(d,"style")}));t.forEach((d,m)=>i[m]&&s.css(d,i[m])),s.css(e,a),s.trigger(e,"scroll"),s.fastdom.flush(),await E();const l=t.map((d,m)=>s.parent(d)===e&&s.Transition.start(d,h[m],o,"ease")).concat(s.Transition.start(e,f,o,"ease"));try{await Promise.all(l),t.forEach((d,m)=>{s.attr(d,p[m]),s.parent(d)===e&&s.css(d,"display",h[m].opacity===0?"none":"")}),s.attr(e,"style",c)}catch{s.attr(t,"style",""),D(e,a)}}function I(n,e){const o=s.css(n,"zIndex");return s.isVisible(n)?{display:"",opacity:e?s.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?s.index(n):o,...F(n)}:!1}function V(n,e,o){const t=e.map((a,c)=>s.parent(a)&&c in o?o[c]?s.isVisible(a)?F(a):{opacity:0}:{opacity:s.isVisible(a)?1:0}:!1),r=t.map((a,c)=>{const f=s.parent(e[c])===n&&(o[c]||I(e[c]));if(!f)return!1;if(!a)delete f.opacity;else if(!("opacity"in a)){const{opacity:h}=f;h%1?a.opacity=1:delete f.opacity}return f});return[t,r]}function D(n,e){for(const o in e)s.css(n,o,"")}function F(n){const{height:e,width:o}=s.offset(n);return{height:e,width:o,transform:"",...s.position(n),...s.css(n,["marginTop","marginLeft"])}}function E(){return new Promise(n=>requestAnimationFrame(n))}var M={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,e=this.$el){const o=this.animation;return(o==="fade"?$:o==="delayed-fade"?(...r)=>$(...r,40):o?H:()=>(n(),Promise.resolve()))(n,e,this.duration).catch(s.noop)}}};function R(n,e=[]){try{return n?s.startsWith(n,"{")?JSON.parse(n):e.length&&!s.includes(n,":")?{[e[0]]:n}:n.split(";").reduce((o,t)=>{const[r,a]=t.split(/:(.*)/);return r&&!s.isUndefined(a)&&(o[r.trim()]=a.trim()),o},{}):{}}catch{return{}}}const W={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var x={mixins:[M],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get({attrItem:n},e){return s.$$(`[${n}],[data-${n}]`,e)},watch(n){this.updateState();const e=s.$$(this.selActive,this.$el);for(const o of n){this.selActive!==!1&&s.toggleClass(o,this.cls,s.includes(e,o));const t=X(o);s.isTag(t,"a")&&s.attr(t,"role","button")}},immediate:!0},children:{get({target:n},e){return s.$$(`${n} > *`,e)},watch(n,e){e&&this.updateState()},immediate:!0}},events:{name:"click keydown",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(n){n.type==="keydown"&&n.keyCode!==W.SPACE||s.closest(n.target,"a,button")&&(n.preventDefault(),this.apply(n.current))}},methods:{apply(n){const e=this.getState(),o=B(n,this.attrItem,this.getState());j(e,o)||this.setState(o)},getState(){return this.toggles.filter(n=>s.hasClass(n,this.cls)).reduce((n,e)=>B(e,this.attrItem,n),{filter:{"":""},sort:[]})},async setState(n,e=!0){n={filter:{"":""},sort:[],...n},s.trigger(this.$el,"beforeFilter",[this,n]);for(const o of this.toggles)s.toggleClass(o,this.cls,J(o,this.attrItem,n));await Promise.all(s.$$(this.target,this.$el).map(o=>{const t=()=>{G(n,o,s.children(o)),this.$update(this.$el)};return e?this.animate(t,o):t()})),s.trigger(this.$el,"afterFilter",[this])},updateState(){s.fastdom.write(()=>this.setState(this.getState(),!1))}}};function A(n,e){return R(s.data(n,e),["filter"])}function j(n,e){return["filter","sort"].every(o=>s.isEqual(n[o],e[o]))}function G(n,e,o){const t=K(n);o.forEach(c=>s.css(c,"display",t&&!s.matches(c,t)?"none":""));const[r,a]=n.sort;if(r){const c=Q(o,r,a);s.isEqual(c,o)||s.append(e,c)}}function B(n,e,o){const{filter:t,group:r,sort:a,order:c="asc"}=A(n,e);return(t||s.isUndefined(a))&&(r?t?(delete o.filter[""],o.filter[r]=t):(delete o.filter[r],(s.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),s.isUndefined(a)||(o.sort=[a,c]),o}function J(n,e,{filter:o={"":""},sort:[t,r]}){const{filter:a="",group:c="",sort:f,order:h="asc"}=A(n,e);return s.isUndefined(f)?c in o&&a===o[c]||!a&&c&&!(c in o)&&!o[""]:t===f&&r===h}function K({filter:n}){let e="";return s.each(n,o=>e+=o||""),e}function Q(n,e,o){return[...n].sort((t,r)=>s.data(t,e).localeCompare(s.data(r,e),void 0,{numeric:!0})*(o==="asc"||-1))}function X(n){return s.$("a,button",n)||n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",x),x});
|