(function(l, i, v, e) { v = l.createElement(i); v.async = 1; v.src = '//' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; e = l.getElementsByTagName(i)[0]; e.parentNode.insertBefore(v, e)})(document, 'script'); (function (fp, shortid, _, compilerUtil, lunr, safeBuffer) { 'use strict'; var ___default = 'default' in _ ? _['default'] : _; lunr = lunr && lunr.hasOwnProperty('default') ? lunr['default'] : lunr; function noop() { } function assign(tar, src) { // @ts-ignore for (const k in src) tar[k] = src[k]; return tar; } function is_promise(value) { return value && typeof value === 'object' && typeof value.then === 'function'; } function add_location(element, file, line, column, char) { element.__svelte_meta = { loc: { file, line, column, char } }; } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); } function validate_store(store, name) { if (!store || typeof store.subscribe !== 'function') { throw new Error(`'${name}' is not a store with a 'subscribe' method`); } } function subscribe(component, store, callback) { const unsub = store.subscribe(callback); component.$$.on_destroy.push(unsub.unsubscribe ? () => unsub.unsubscribe() : unsub); } function create_slot(definition, ctx, fn) { if (definition) { const slot_ctx = get_slot_context(definition, ctx, fn); return definition[0](slot_ctx); } } function get_slot_context(definition, ctx, fn) { return definition[1] ? assign({}, assign(ctx.$$scope.ctx, definition[1](fn ? fn(ctx) : {}))) : ctx.$$scope.ctx; } function get_slot_changes(definition, ctx, changed, fn) { return definition[1] ? assign({}, assign(ctx.$$scope.changed || {}, definition[1](fn ? fn(changed) : {}))) : ctx.$$scope.changed || {}; } function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { target.insertBefore(node, anchor || null); } function detach(node) { node.parentNode.removeChild(node); } function detach_before(after) { while (after.previousSibling) { after.parentNode.removeChild(after.previousSibling); } } function destroy_each(iterations, detaching) { for (let i = 0; i < iterations.length; i += 1) { if (iterations[i]) iterations[i].d(detaching); } } function element(name) { return document.createElement(name); } function text(data) { return document.createTextNode(data); } function space() { return text(' '); } function empty() { return text(''); } function listen(node, event, handler, options) { node.addEventListener(event, handler, options); return () => node.removeEventListener(event, handler, options); } function stop_propagation(fn) { return function (event) { event.stopPropagation(); // @ts-ignore return fn.call(this, event); }; } function attr(node, attribute, value) { if (value == null) node.removeAttribute(attribute); else node.setAttribute(attribute, value); } function children(element) { return Array.from(element.childNodes); } function set_data(text, data) { data = '' + data; if (text.data !== data) text.data = data; } function set_style(node, key, value) { node.style.setProperty(key, value); } function select_option(select, value) { for (let i = 0; i < select.options.length; i += 1) { const option = select.options[i]; if (option.__value === value) { option.selected = true; return; } } } function select_options(select, value) { for (let i = 0; i < select.options.length; i += 1) { const option = select.options[i]; option.selected = ~value.indexOf(option.__value); } } function select_value(select) { const selected_option = select.querySelector(':checked') || select.options[0]; return selected_option && selected_option.__value; } function select_multiple_value(select) { return [].map.call(select.querySelectorAll(':checked'), option => option.__value); } let current_component; function set_current_component(component) { current_component = component; } function get_current_component() { if (!current_component) throw new Error(`Function called outside component initialization`); return current_component; } function onMount(fn) { get_current_component().$$.on_mount.push(fn); } // TODO figure out if we still want to support // shorthand events, or if we want to implement // a real bubbling mechanism function bubble(component, event) { const callbacks = component.$$.callbacks[event.type]; if (callbacks) { callbacks.slice().forEach(fn => fn(event)); } } const dirty_components = []; const binding_callbacks = []; const render_callbacks = []; const flush_callbacks = []; const resolved_promise = Promise.resolve(); let update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } function add_flush_callback(fn) { flush_callbacks.push(fn); } function flush() { const seen_callbacks = new Set(); do { // first, call beforeUpdate functions // and update components while (dirty_components.length) { const component = dirty_components.shift(); set_current_component(component); update(component.$$); } while (binding_callbacks.length) binding_callbacks.pop()(); // then, once components are updated, call // afterUpdate functions. This may cause // subsequent updates... for (let i = 0; i < render_callbacks.length; i += 1) { const callback = render_callbacks[i]; if (!seen_callbacks.has(callback)) { callback(); // ...so guard against infinite loops seen_callbacks.add(callback); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; } function update($$) { if ($$.fragment) { $$.update($$.dirty); run_all($$.before_update); $$.fragment.p($$.dirty, $$.ctx); $$.dirty = null; $$.after_update.forEach(add_render_callback); } } const outroing = new Set(); let outros; function group_outros() { outros = { r: 0, c: [], p: outros // parent group }; } function check_outros() { if (!outros.r) { run_all(outros.c); } outros = outros.p; } function transition_in(block, local) { if (block && block.i) { outroing.delete(block); block.i(local); } } function transition_out(block, local, detach, callback) { if (block && block.o) { if (outroing.has(block)) return; outroing.add(block); outros.c.push(() => { outroing.delete(block); if (callback) { if (detach) block.d(1); callback(); } }); block.o(local); } } function handle_promise(promise, info) { const token = info.token = {}; function update(type, index, key, value) { if (info.token !== token) return; info.resolved = key && { [key]: value }; const child_ctx = assign(assign({}, info.ctx), info.resolved); const block = type && (info.current = type)(child_ctx); if (info.block) { if (info.blocks) { info.blocks.forEach((block, i) => { if (i !== index && block) { group_outros(); transition_out(block, 1, 1, () => { info.blocks[i] = null; }); check_outros(); } }); } else { info.block.d(1); } block.c(); transition_in(block, 1); block.m(info.mount(), info.anchor); flush(); } info.block = block; if (info.blocks) info.blocks[index] = block; } if (is_promise(promise)) { promise.then(value => { update(info.then, 1, info.value, value); }, error => { update(info.catch, 2, info.error, error); }); // if we previously had a then/catch block, destroy it if (info.current !== info.pending) { update(info.pending, 0); return true; } } else { if (info.current !== info.then) { update(info.then, 1, info.value, promise); return true; } info.resolved = { [info.value]: promise }; } } function bind(component, name, callback) { if (component.$$.props.indexOf(name) === -1) return; component.$$.bound[name] = callback; callback(component.$$.ctx[name]); } function mount_component(component, target, anchor) { const { fragment, on_mount, on_destroy, after_update } = component.$$; fragment.m(target, anchor); // onMount happens before the initial afterUpdate add_render_callback(() => { const new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push(...new_on_destroy); } else { // Edge case - component was destroyed immediately, // most likely as a result of a binding initialising run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { if (component.$$.fragment) { run_all(component.$$.on_destroy); component.$$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to // preserve final state?) component.$$.on_destroy = component.$$.fragment = null; component.$$.ctx = {}; } } function make_dirty(component, key) { if (!component.$$.dirty) { dirty_components.push(component); schedule_update(); component.$$.dirty = blank_object(); } component.$$.dirty[key] = true; } function init(component, options, instance, create_fragment, not_equal, prop_names) { const parent_component = current_component; set_current_component(component); const props = options.props || {}; const $$ = component.$$ = { fragment: null, ctx: null, // state props: prop_names, update: noop, not_equal, bound: blank_object(), // lifecycle on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), // everything else callbacks: blank_object(), dirty: null }; let ready = false; $$.ctx = instance ? instance(component, props, (key, value) => { if ($$.ctx && not_equal($$.ctx[key], $$.ctx[key] = value)) { if ($$.bound[key]) $$.bound[key](value); if (ready) make_dirty(component, key); } }) : props; $$.update(); ready = true; run_all($$.before_update); $$.fragment = create_fragment($$.ctx); if (options.target) { if (options.hydrate) { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment.l(children(options.target)); } else { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } class SvelteComponent { $destroy() { destroy_component(this, 1); this.$destroy = noop; } $on(type, callback) { const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); callbacks.push(callback); return () => { const index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } $set() { // overridden by instance, if it has props } } class SvelteComponentDev extends SvelteComponent { constructor(options) { if (!options || (!options.target && !options.$$inline)) { throw new Error(`'target' is a required option`); } super(); } $destroy() { super.$destroy(); this.$destroy = () => { console.warn(`Component was already destroyed`); // eslint-disable-line no-console }; } } /* src\common\Button.svelte generated by Svelte v3.6.9 */ const file = "src\\common\\Button.svelte"; function create_fragment(ctx) { var button, button_class_value, current, dispose; const default_slot_1 = ctx.$$slots.default; const default_slot = create_slot(default_slot_1, ctx, null); return { c: function create() { button = element("button"); if (default_slot) default_slot.c(); attr(button, "class", button_class_value = "" + ctx.color + " " + ctx.className + " " + ctx.borderClass + " " + (ctx.grouped ? "grouped" : "") + " svelte-7rfkdx"); attr(button, "style", ctx.style); add_location(button, file, 14, 0, 260); dispose = listen(button, "click", ctx.click_handler); }, l: function claim(nodes) { if (default_slot) default_slot.l(button_nodes); throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); }, m: function mount(target, anchor) { insert(target, button, anchor); if (default_slot) { default_slot.m(button, null); } current = true; }, p: function update(changed, ctx) { if (default_slot && default_slot.p && changed.$$scope) { default_slot.p(get_slot_changes(default_slot_1, ctx, changed, null), get_slot_context(default_slot_1, ctx, null)); } if ((!current || changed.color || changed.className || changed.borderClass || changed.grouped) && button_class_value !== (button_class_value = "" + ctx.color + " " + ctx.className + " " + ctx.borderClass + " " + (ctx.grouped ? "grouped" : "") + " svelte-7rfkdx")) { attr(button, "class", button_class_value); } if (!current || changed.style) { attr(button, "style", ctx.style); } }, i: function intro(local) { if (current) return; transition_in(default_slot, local); current = true; }, o: function outro(local) { transition_out(default_slot, local); current = false; }, d: function destroy(detaching) { if (detaching) { detach(button); } if (default_slot) default_slot.d(detaching); dispose(); } }; } function instance($$self, $$props, $$invalidate) { let { color = "primary", className = "", style = "", groupPosition = "", grouped = false } = $$props; const writable_props = ['color', 'className', 'style', 'groupPosition', 'grouped']; Object.keys($$props).forEach(key => { if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(` "), options).$el, 'hide', resolve); } ); }; UIkit.modal.confirm = function (message, options) { options = assign({bgClose: false, escClose: true, labels: UIkit.modal.labels}, options); return new Promise(function (resolve, reject) { var confirm = UIkit.modal.dialog(("
" + (isString(message) ? message : html(message)) + "
"), options); var resolved = false; on(confirm.$el, 'submit', 'form', function (e) { e.preventDefault(); resolve(); resolved = true; confirm.hide(); }); on(confirm.$el, 'hide', function () { if (!resolved) { reject(); } }); }); }; UIkit.modal.prompt = function (message, value, options) { options = assign({bgClose: false, escClose: true, labels: UIkit.modal.labels}, options); return new Promise(function (resolve) { var prompt = UIkit.modal.dialog(("
"), options), input = $('input', prompt.$el); input.value = value; var resolved = false; on(prompt.$el, 'submit', 'form', function (e) { e.preventDefault(); resolve(input.value); resolved = true; prompt.hide(); }); on(prompt.$el, 'hide', function () { if (!resolved) { resolve(null); } }); }); }; UIkit.modal.labels = { ok: 'Ok', cancel: 'Cancel' }; } var Nav = { extends: Accordion, data: { targets: '> .uk-parent', toggle: '> a', content: '> ul' } }; var Navbar = { mixins: [Class, FlexBug], props: { dropdown: String, mode: 'list', align: String, offset: Number, boundary: Boolean, boundaryAlign: Boolean, clsDrop: String, delayShow: Number, delayHide: Number, dropbar: Boolean, dropbarMode: String, dropbarAnchor: Boolean, duration: Number }, data: { dropdown: '.uk-navbar-nav > li', align: !isRtl ? 'left' : 'right', clsDrop: 'uk-navbar-dropdown', mode: undefined, offset: undefined, delayShow: undefined, delayHide: undefined, boundaryAlign: undefined, flip: 'x', boundary: true, dropbar: false, dropbarMode: 'slide', dropbarAnchor: false, duration: 200, forceHeight: true, selMinHeight: '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle' }, computed: { boundary: function(ref, $el) { var boundary = ref.boundary; var boundaryAlign = ref.boundaryAlign; return (boundary === true || boundaryAlign) ? $el : boundary; }, dropbarAnchor: function(ref, $el) { var dropbarAnchor = ref.dropbarAnchor; return query(dropbarAnchor, $el); }, pos: function(ref) { var align = ref.align; return ("bottom-" + align); }, dropdowns: function(ref, $el) { var dropdown = ref.dropdown; var clsDrop = ref.clsDrop; return $$((dropdown + " ." + clsDrop), $el); } }, beforeConnect: function() { var ref = this.$props; var dropbar = ref.dropbar; this.dropbar = dropbar && (query(dropbar, this.$el) || $('+ .uk-navbar-dropbar', this.$el) || $('
')); if (this.dropbar) { addClass(this.dropbar, 'uk-navbar-dropbar'); if (this.dropbarMode === 'slide') { addClass(this.dropbar, 'uk-navbar-dropbar-slide'); } } }, disconnected: function() { this.dropbar && remove(this.dropbar); }, update: function() { var this$1 = this; this.$create( 'drop', this.dropdowns.filter(function (el) { return !this$1.getDropdown(el); }), assign({}, this.$props, {boundary: this.boundary, pos: this.pos, offset: this.dropbar || this.offset}) ); }, events: [ { name: 'mouseover', delegate: function() { return this.dropdown; }, handler: function(ref) { var current = ref.current; var active = this.getActive(); if (active && active.toggle && !within(active.toggle.$el, current) && !active.tracker.movesTo(active.$el)) { active.hide(false); } } }, { name: 'mouseleave', el: function() { return this.dropbar; }, handler: function() { var active = this.getActive(); if (active && !this.dropdowns.some(function (el) { return matches(el, ':hover'); })) { active.hide(); } } }, { name: 'beforeshow', capture: true, filter: function() { return this.dropbar; }, handler: function() { if (!this.dropbar.parentNode) { after(this.dropbarAnchor || this.$el, this.dropbar); } } }, { name: 'show', capture: true, filter: function() { return this.dropbar; }, handler: function(_, drop) { var $el = drop.$el; var dir = drop.dir; this.clsDrop && addClass($el, ((this.clsDrop) + "-dropbar")); if (dir === 'bottom') { this.transitionTo($el.offsetHeight + toFloat(css($el, 'marginTop')) + toFloat(css($el, 'marginBottom')), $el); } } }, { name: 'beforehide', filter: function() { return this.dropbar; }, handler: function(e, ref) { var $el = ref.$el; var active = this.getActive(); if (matches(this.dropbar, ':hover') && active && active.$el === $el) { e.preventDefault(); } } }, { name: 'hide', filter: function() { return this.dropbar; }, handler: function(_, ref) { var $el = ref.$el; var active = this.getActive(); if (!active || active && active.$el === $el) { this.transitionTo(0); } } } ], methods: { getActive: function() { var ref = this.dropdowns.map(this.getDropdown).filter(function (drop) { return drop && drop.isActive(); }); var active = ref[0]; return active && includes(active.mode, 'hover') && within(active.toggle.$el, this.$el) && active; }, transitionTo: function(newHeight, el) { var this$1 = this; var ref = this; var dropbar = ref.dropbar; var oldHeight = isVisible(dropbar) ? height(dropbar) : 0; el = oldHeight < newHeight && el; css(el, 'clip', ("rect(0," + (el.offsetWidth) + "px," + oldHeight + "px,0)")); height(dropbar, oldHeight); Transition.cancel([el, dropbar]); return Promise.all([ Transition.start(dropbar, {height: newHeight}, this.duration), Transition.start(el, {clip: ("rect(0," + (el.offsetWidth) + "px," + newHeight + "px,0)")}, this.duration) ]) .catch(noop) .then(function () { css(el, {clip: ''}); this$1.$update(dropbar); }); }, getDropdown: function(el) { return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown'); } } }; var Offcanvas = { mixins: [Modal], args: 'mode', props: { mode: String, flip: Boolean, overlay: Boolean }, data: { mode: 'slide', flip: false, overlay: false, clsPage: 'uk-offcanvas-page', clsContainer: 'uk-offcanvas-container', selPanel: '.uk-offcanvas-bar', clsFlip: 'uk-offcanvas-flip', clsContainerAnimation: 'uk-offcanvas-container-animation', clsSidebarAnimation: 'uk-offcanvas-bar-animation', clsMode: 'uk-offcanvas', clsOverlay: 'uk-offcanvas-overlay', selClose: '.uk-offcanvas-close' }, computed: { clsFlip: function(ref) { var flip = ref.flip; var clsFlip = ref.clsFlip; return flip ? clsFlip : ''; }, clsOverlay: function(ref) { var overlay = ref.overlay; var clsOverlay = ref.clsOverlay; return overlay ? clsOverlay : ''; }, clsMode: function(ref) { var mode = ref.mode; var clsMode = ref.clsMode; return (clsMode + "-" + mode); }, clsSidebarAnimation: function(ref) { var mode = ref.mode; var clsSidebarAnimation = ref.clsSidebarAnimation; return mode === 'none' || mode === 'reveal' ? '' : clsSidebarAnimation; }, clsContainerAnimation: function(ref) { var mode = ref.mode; var clsContainerAnimation = ref.clsContainerAnimation; return mode !== 'push' && mode !== 'reveal' ? '' : clsContainerAnimation; }, transitionElement: function(ref) { var mode = ref.mode; return mode === 'reveal' ? this.panel.parentNode : this.panel; } }, events: [ { name: 'click', delegate: function() { return 'a[href^="#"]'; }, handler: function(ref) { var current = ref.current; if (current.hash && $(current.hash, document.body)) { this.hide(); } } }, { name: 'touchstart', passive: true, el: function() { return this.panel; }, handler: function(ref) { var targetTouches = ref.targetTouches; if (targetTouches.length === 1) { this.clientY = targetTouches[0].clientY; } } }, { name: 'touchmove', self: true, passive: false, filter: function() { return this.overlay; }, handler: function(e) { e.cancelable && e.preventDefault(); } }, { name: 'touchmove', passive: false, el: function() { return this.panel; }, handler: function(e) { if (e.targetTouches.length !== 1) { return; } var clientY = event.targetTouches[0].clientY - this.clientY; var ref = this.panel; var scrollTop = ref.scrollTop; var scrollHeight = ref.scrollHeight; var clientHeight = ref.clientHeight; if (clientHeight >= scrollHeight || scrollTop === 0 && clientY > 0 || scrollHeight - scrollTop <= clientHeight && clientY < 0 ) { e.cancelable && e.preventDefault(); } } }, { name: 'show', self: true, handler: function() { if (this.mode === 'reveal' && !hasClass(this.panel.parentNode, this.clsMode)) { wrapAll(this.panel, '
'); addClass(this.panel.parentNode, this.clsMode); } css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : ''); addClass(document.body, this.clsContainer, this.clsFlip); css(this.$el, 'display', 'block'); addClass(this.$el, this.clsOverlay); addClass(this.panel, this.clsSidebarAnimation, this.mode !== 'reveal' ? this.clsMode : ''); height(document.body); // force reflow addClass(document.body, this.clsContainerAnimation); this.clsContainerAnimation && suppressUserScale(); } }, { name: 'hide', self: true, handler: function() { removeClass(document.body, this.clsContainerAnimation); var active = this.getActive(); if (this.mode === 'none' || active && active !== this && active !== this.prev) { trigger(this.panel, 'transitionend'); } } }, { name: 'hidden', self: true, handler: function() { this.clsContainerAnimation && resumeUserScale(); if (this.mode === 'reveal') { unwrap(this.panel); } removeClass(this.panel, this.clsSidebarAnimation, this.clsMode); removeClass(this.$el, this.clsOverlay); css(this.$el, 'display', ''); removeClass(document.body, this.clsContainer, this.clsFlip); css(document.documentElement, 'overflowY', ''); } }, { name: 'swipeLeft swipeRight', handler: function(e) { if (this.isToggled() && endsWith(e.type, 'Left') ^ this.flip) { this.hide(); } } } ] }; // Chrome in responsive mode zooms page upon opening offcanvas function suppressUserScale() { getViewport().content += ',user-scalable=0'; } function resumeUserScale() { var viewport = getViewport(); viewport.content = viewport.content.replace(/,user-scalable=0$/, ''); } function getViewport() { return $('meta[name="viewport"]', document.head) || append(document.head, ''); } var OverflowAuto = { mixins: [Class], props: { selContainer: String, selContent: String }, data: { selContainer: '.uk-modal', selContent: '.uk-modal-dialog' }, computed: { container: function(ref, $el) { var selContainer = ref.selContainer; return closest($el, selContainer); }, content: function(ref, $el) { var selContent = ref.selContent; return closest($el, selContent); } }, connected: function() { css(this.$el, 'minHeight', 150); }, update: { read: function() { if (!this.content || !this.container) { return false; } return { current: toFloat(css(this.$el, 'maxHeight')), max: Math.max(150, height(this.container) - (offset(this.content).height - height(this.$el))) }; }, write: function(ref) { var current = ref.current; var max = ref.max; css(this.$el, 'maxHeight', max); if (Math.round(current) !== Math.round(max)) { trigger(this.$el, 'resize'); } }, events: ['resize'] } }; var Responsive = { props: ['width', 'height'], connected: function() { addClass(this.$el, 'uk-responsive-width'); }, update: { read: function() { return isVisible(this.$el) && this.width && this.height ? {width: width(this.$el.parentNode), height: this.height} : false; }, write: function(dim) { height(this.$el, Dimensions.contain({ height: this.height, width: this.width }, dim).height); }, events: ['resize'] } }; var Scroll = { props: { duration: Number, offset: Number }, data: { duration: 1000, offset: 0 }, methods: { scrollTo: function(el) { var this$1 = this; el = el && $(el) || document.body; var docHeight = height(document); var winHeight = height(window); var target = offset(el).top - this.offset; if (target + winHeight > docHeight) { target = docHeight - winHeight; } if (!trigger(this.$el, 'beforescroll', [this, el])) { return; } var start = Date.now(); var startY = window.pageYOffset; var step = function () { var currentY = startY + (target - startY) * ease(clamp((Date.now() - start) / this$1.duration)); scrollTop(window, currentY); // scroll more if we have not reached our destination if (currentY !== target) { requestAnimationFrame(step); } else { trigger(this$1.$el, 'scrolled', [this$1, el]); } }; step(); } }, events: { click: function(e) { if (e.defaultPrevented) { return; } e.preventDefault(); this.scrollTo(escape(decodeURIComponent(this.$el.hash)).substr(1)); } } }; function ease(k) { return 0.5 * (1 - Math.cos(Math.PI * k)); } var Scrollspy = { args: 'cls', props: { cls: String, target: String, hidden: Boolean, offsetTop: Number, offsetLeft: Number, repeat: Boolean, delay: Number }, data: function () { return ({ cls: false, target: false, hidden: true, offsetTop: 0, offsetLeft: 0, repeat: false, delay: 0, inViewClass: 'uk-scrollspy-inview' }); }, computed: { elements: function(ref, $el) { var target = ref.target; return target ? $$(target, $el) : [$el]; } }, update: [ { write: function() { if (this.hidden) { css(filter(this.elements, (":not(." + (this.inViewClass) + ")")), 'visibility', 'hidden'); } } }, { read: function(ref) { var this$1 = this; var update = ref.update; if (!update) { return; } this.elements.forEach(function (el) { var state = el._ukScrollspyState; if (!state) { state = {cls: data(el, 'uk-scrollspy-class') || this$1.cls}; } state.show = isInView(el, this$1.offsetTop, this$1.offsetLeft); el._ukScrollspyState = state; }); }, write: function(data) { var this$1 = this; // Let child components be applied at least once first if (!data.update) { this.$emit(); return data.update = true; } this.elements.forEach(function (el) { var state = el._ukScrollspyState; var cls = state.cls; if (state.show && !state.inview && !state.queued) { var show = function () { css(el, 'visibility', ''); addClass(el, this$1.inViewClass); toggleClass(el, cls); trigger(el, 'inview'); this$1.$update(el); state.inview = true; state.abort && state.abort(); }; if (this$1.delay) { state.queued = true; data.promise = (data.promise || Promise.resolve()).then(function () { return !state.inview && new Promise(function (resolve) { var timer = setTimeout(function () { show(); resolve(); }, data.promise || this$1.elements.length === 1 ? this$1.delay : 0); state.abort = function () { clearTimeout(timer); resolve(); state.queued = false; }; }); }); } else { show(); } } else if (!state.show && (state.inview || state.queued) && this$1.repeat) { state.abort && state.abort(); if (!state.inview) { return; } css(el, 'visibility', this$1.hidden ? 'hidden' : ''); removeClass(el, this$1.inViewClass); toggleClass(el, cls); trigger(el, 'outview'); this$1.$update(el); state.inview = false; } }); }, events: ['scroll', 'resize'] } ] }; var ScrollspyNav = { props: { cls: String, closest: String, scroll: Boolean, overflow: Boolean, offset: Number }, data: { cls: 'uk-active', closest: false, scroll: false, overflow: true, offset: 0 }, computed: { links: function(_, $el) { return $$('a[href^="#"]', $el).filter(function (el) { return el.hash; }); }, elements: function(ref) { var selector = ref.closest; return closest(this.links, selector || '*'); }, targets: function() { return $$(this.links.map(function (el) { return escape(el.hash).substr(1); }).join(',')); } }, update: [ { read: function() { if (this.scroll) { this.$create('scroll', this.links, {offset: this.offset || 0}); } } }, { read: function(data) { var this$1 = this; var scroll = window.pageYOffset + this.offset + 1; var max = height(document) - height(window) + this.offset; data.active = false; this.targets.every(function (el, i) { var ref = offset(el); var top = ref.top; var last = i + 1 === this$1.targets.length; if (!this$1.overflow && (i === 0 && top > scroll || last && top + el.offsetTop < scroll)) { return false; } if (!last && offset(this$1.targets[i + 1]).top <= scroll) { return true; } if (scroll >= max) { for (var j = this$1.targets.length - 1; j > i; j--) { if (isInView(this$1.targets[j])) { el = this$1.targets[j]; break; } } } return !(data.active = $(filter(this$1.links, ("[href=\"#" + (el.id) + "\"]")))); }); }, write: function(ref) { var active = ref.active; this.links.forEach(function (el) { return el.blur(); }); removeClass(this.elements, this.cls); if (active) { trigger(this.$el, 'active', [active, addClass(this.closest ? closest(active, this.closest) : active, this.cls)]); } }, events: ['scroll', 'resize'] } ] }; var Sticky = { mixins: [Class, Media], props: { top: null, bottom: Boolean, offset: Number, animation: String, clsActive: String, clsInactive: String, clsFixed: String, clsBelow: String, selTarget: String, widthElement: Boolean, showOnUp: Boolean, targetOffset: Number }, data: { top: 0, bottom: false, offset: 0, animation: '', clsActive: 'uk-active', clsInactive: '', clsFixed: 'uk-sticky-fixed', clsBelow: 'uk-sticky-below', selTarget: '', widthElement: false, showOnUp: false, targetOffset: false }, computed: { selTarget: function(ref, $el) { var selTarget = ref.selTarget; return selTarget && $(selTarget, $el) || $el; }, widthElement: function(ref, $el) { var widthElement = ref.widthElement; return query(widthElement, $el) || this.placeholder; }, isActive: { get: function() { return hasClass(this.selTarget, this.clsActive); }, set: function(value) { if (value && !this.isActive) { replaceClass(this.selTarget, this.clsInactive, this.clsActive); trigger(this.$el, 'active'); } else if (!value && !hasClass(this.selTarget, this.clsInactive)) { replaceClass(this.selTarget, this.clsActive, this.clsInactive); trigger(this.$el, 'inactive'); } } } }, connected: function() { this.placeholder = $('+ .uk-sticky-placeholder', this.$el) || $('
'); this.isFixed = false; this.isActive = false; }, disconnected: function() { if (this.isFixed) { this.hide(); removeClass(this.selTarget, this.clsInactive); } remove(this.placeholder); this.placeholder = null; this.widthElement = null; }, events: [ { name: 'load hashchange popstate', el: window, handler: function() { var this$1 = this; if (!(this.targetOffset !== false && location.hash && window.pageYOffset > 0)) { return; } var target = $(location.hash); if (target) { fastdom.read(function () { var ref = offset(target); var top = ref.top; var elTop = offset(this$1.$el).top; var elHeight = this$1.$el.offsetHeight; if (this$1.isFixed && elTop + elHeight >= top && elTop <= top + target.offsetHeight) { scrollTop(window, top - elHeight - (isNumeric(this$1.targetOffset) ? this$1.targetOffset : 0) - this$1.offset); } }); } } } ], update: [ { read: function(ref, type) { var height = ref.height; if (this.isActive && type !== 'update') { this.hide(); height = this.$el.offsetHeight; this.show(); } height = !this.isActive ? this.$el.offsetHeight : height; this.topOffset = offset(this.isFixed ? this.placeholder : this.$el).top; this.bottomOffset = this.topOffset + height; var bottom = parseProp('bottom', this); this.top = Math.max(toFloat(parseProp('top', this)), this.topOffset) - this.offset; this.bottom = bottom && bottom - height; this.inactive = !this.matchMedia; return { lastScroll: false, height: height, margins: css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight']) }; }, write: function(ref) { var height = ref.height; var margins = ref.margins; var ref$1 = this; var placeholder = ref$1.placeholder; css(placeholder, assign({height: height}, margins)); if (!within(placeholder, document)) { after(this.$el, placeholder); attr(placeholder, 'hidden', ''); } // ensure active/inactive classes are applied this.isActive = this.isActive; }, events: ['resize'] }, { read: function(ref) { var scroll = ref.scroll; if ( scroll === void 0 ) scroll = 0; this.width = (isVisible(this.widthElement) ? this.widthElement : this.$el).offsetWidth; this.scroll = window.pageYOffset; return { dir: scroll <= this.scroll ? 'down' : 'up', scroll: this.scroll, visible: isVisible(this.$el), top: offsetPosition(this.placeholder)[0] }; }, write: function(data, type) { var this$1 = this; var initTimestamp = data.initTimestamp; if ( initTimestamp === void 0 ) initTimestamp = 0; var dir = data.dir; var lastDir = data.lastDir; var lastScroll = data.lastScroll; var scroll = data.scroll; var top = data.top; var visible = data.visible; var now = performance.now(); data.lastScroll = scroll; if (scroll < 0 || scroll === lastScroll || !visible || this.disabled || this.showOnUp && type !== 'scroll') { return; } if (now - initTimestamp > 300 || dir !== lastDir) { data.initScroll = scroll; data.initTimestamp = now; } data.lastDir = dir; if (this.showOnUp && Math.abs(data.initScroll - scroll) <= 30 && Math.abs(lastScroll - scroll) <= 10) { return; } if (this.inactive || scroll < this.top || this.showOnUp && (scroll <= this.top || dir === 'down' || dir === 'up' && !this.isFixed && scroll <= this.bottomOffset) ) { if (!this.isFixed) { if (Animation.inProgress(this.$el) && top > scroll) { Animation.cancel(this.$el); this.hide(); } return; } this.isFixed = false; if (this.animation && scroll > this.topOffset) { Animation.cancel(this.$el); Animation.out(this.$el, this.animation).then(function () { return this$1.hide(); }, noop); } else { this.hide(); } } else if (this.isFixed) { this.update(); } else if (this.animation) { Animation.cancel(this.$el); this.show(); Animation.in(this.$el, this.animation).catch(noop); } else { this.show(); } }, events: ['resize', 'scroll'] } ], methods: { show: function() { this.isFixed = true; this.update(); attr(this.placeholder, 'hidden', null); }, hide: function() { this.isActive = false; removeClass(this.$el, this.clsFixed, this.clsBelow); css(this.$el, {position: '', top: '', width: ''}); attr(this.placeholder, 'hidden', ''); }, update: function() { var active = this.top !== 0 || this.scroll > this.top; var top = Math.max(0, this.offset); if (this.bottom && this.scroll > this.bottom - this.offset) { top = this.bottom - this.scroll; } css(this.$el, { position: 'fixed', top: (top + "px"), width: this.width }); this.isActive = active; toggleClass(this.$el, this.clsBelow, this.scroll > this.bottomOffset); addClass(this.$el, this.clsFixed); } } }; function parseProp(prop, ref) { var $props = ref.$props; var $el = ref.$el; var propOffset = ref[(prop + "Offset")]; var value = $props[prop]; if (!value) { return; } if (isNumeric(value)) { return propOffset + toFloat(value); } else if (isString(value) && value.match(/^-?\d+vh$/)) { return height(window) * toFloat(value) / 100; } else { var el = value === true ? $el.parentNode : query(value, $el); if (el) { return offset(el).top + el.offsetHeight; } } } var Switcher = { mixins: [Togglable], args: 'connect', props: { connect: String, toggle: String, active: Number, swiping: Boolean }, data: { connect: '~.uk-switcher', toggle: '> * > :first-child', active: 0, swiping: true, cls: 'uk-active', clsContainer: 'uk-switcher', attrItem: 'uk-switcher-item', queued: true }, computed: { connects: function(ref, $el) { var connect = ref.connect; return queryAll(connect, $el); }, toggles: function(ref, $el) { var toggle = ref.toggle; return $$(toggle, $el); } }, events: [ { name: 'click', delegate: function() { return ((this.toggle) + ":not(.uk-disabled)"); }, handler: function(e) { e.preventDefault(); this.show(toNodes(this.$el.children).filter(function (el) { return within(e.current, el); })[0]); } }, { name: 'click', el: function() { return this.connects; }, delegate: function() { return ("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]"); }, handler: function(e) { e.preventDefault(); this.show(data(e.current, this.attrItem)); } }, { name: 'swipeRight swipeLeft', filter: function() { return this.swiping; }, el: function() { return this.connects; }, handler: function(ref) { var type = ref.type; this.show(endsWith(type, 'Left') ? 'next' : 'previous'); } } ], update: function() { var this$1 = this; this.connects.forEach(function (list) { return this$1.updateAria(list.children); }); var ref = this.$el; var children = ref.children; this.show(filter(children, ("." + (this.cls)))[0] || children[this.active] || children[0]); }, methods: { index: function() { return !isEmpty(this.connects) && index(filter(this.connects[0].children, ("." + (this.cls)))[0]); }, show: function(item) { var this$1 = this; var ref = this.$el; var children = ref.children; var length = children.length; var prev = this.index(); var hasPrev = prev >= 0; var dir = item === 'previous' ? -1 : 1; var toggle, active, next = getIndex(item, children, prev); for (var i = 0; i < length; i++, next = (next + dir + length) % length) { if (!matches(this.toggles[next], '.uk-disabled *, .uk-disabled, [disabled]')) { toggle = this.toggles[next]; active = children[next]; break; } } if (!active || prev >= 0 && hasClass(active, this.cls) || prev === next) { return; } removeClass(children, this.cls); addClass(active, this.cls); attr(this.toggles, 'aria-expanded', false); attr(toggle, 'aria-expanded', true); this.connects.forEach(function (list) { if (!hasPrev) { this$1.toggleNow(list.children[next]); } else { this$1.toggleElement([list.children[prev], list.children[next]]); } }); } } }; var Tab = { mixins: [Class], extends: Switcher, props: { media: Boolean }, data: { media: 960, attrItem: 'uk-tab-item' }, connected: function() { var cls = hasClass(this.$el, 'uk-tab-left') ? 'uk-tab-left' : hasClass(this.$el, 'uk-tab-right') ? 'uk-tab-right' : false; if (cls) { this.$create('toggle', this.$el, {cls: cls, mode: 'media', media: this.media}); } } }; var Toggle = { mixins: [Media, Togglable], args: 'target', props: { href: String, target: null, mode: 'list' }, data: { href: false, target: false, mode: 'click', queued: true }, computed: { target: function(ref, $el) { var href = ref.href; var target = ref.target; target = queryAll(target || href, $el); return target.length && target || [$el]; } }, connected: function() { trigger(this.target, 'updatearia', [this]); }, events: [ { name: (pointerEnter + " " + pointerLeave), filter: function() { return includes(this.mode, 'hover'); }, handler: function(e) { if (!isTouch(e)) { this.toggle(("toggle" + (e.type === pointerEnter ? 'show' : 'hide'))); } } }, { name: 'click', filter: function() { return includes(this.mode, 'click') || hasTouch && includes(this.mode, 'hover'); }, handler: function(e) { // TODO better isToggled handling var link; if (closest(e.target, 'a[href="#"], a[href=""]') || (link = closest(e.target, 'a[href]')) && ( this.cls || !isVisible(this.target) || link.hash && matches(this.target, link.hash) ) ) { e.preventDefault(); } this.toggle(); } } ], update: { read: function() { return includes(this.mode, 'media') && this.media ? {match: this.matchMedia} : false; }, write: function(ref) { var match = ref.match; var toggled = this.isToggled(this.target); if (match ? !toggled : toggled) { this.toggle(); } }, events: ['resize'] }, methods: { toggle: function(type) { if (trigger(this.target, type || 'toggle', [this])) { this.toggleElement(this.target); } } } }; function core (UIkit) { // core components UIkit.component('accordion', Accordion); UIkit.component('alert', Alert); UIkit.component('cover', Cover); UIkit.component('drop', Drop); UIkit.component('dropdown', Dropdown); UIkit.component('formCustom', FormCustom); UIkit.component('gif', Gif); UIkit.component('grid', Grid); UIkit.component('heightMatch', HeightMatch); UIkit.component('heightViewport', HeightViewport); UIkit.component('icon', Icon); UIkit.component('img', Img); UIkit.component('leader', Leader); UIkit.component('margin', Margin); UIkit.component('modal', Modal$1); UIkit.component('nav', Nav); UIkit.component('navbar', Navbar); UIkit.component('offcanvas', Offcanvas); UIkit.component('overflowAuto', OverflowAuto); UIkit.component('responsive', Responsive); UIkit.component('scroll', Scroll); UIkit.component('scrollspy', Scrollspy); UIkit.component('scrollspyNav', ScrollspyNav); UIkit.component('sticky', Sticky); UIkit.component('svg', Svg); UIkit.component('switcher', Switcher); UIkit.component('tab', Tab); UIkit.component('toggle', Toggle); UIkit.component('video', Video); // Icon components UIkit.component('close', Close); UIkit.component('marker', IconComponent); UIkit.component('navbarToggleIcon', IconComponent); UIkit.component('overlayIcon', IconComponent); UIkit.component('paginationNext', IconComponent); UIkit.component('paginationPrevious', IconComponent); UIkit.component('searchIcon', Search); UIkit.component('slidenavNext', Slidenav); UIkit.component('slidenavPrevious', Slidenav); UIkit.component('spinner', Spinner); UIkit.component('totop', IconComponent); // core functionality UIkit.use(Core); } UIkit.version = '3.1.6'; core(UIkit); var Countdown = { mixins: [Class], props: { date: String, clsWrapper: String }, data: { date: '', clsWrapper: '.uk-countdown-%unit%' }, computed: { date: function(ref) { var date = ref.date; return Date.parse(date); }, days: function(ref, $el) { var clsWrapper = ref.clsWrapper; return $(clsWrapper.replace('%unit%', 'days'), $el); }, hours: function(ref, $el) { var clsWrapper = ref.clsWrapper; return $(clsWrapper.replace('%unit%', 'hours'), $el); }, minutes: function(ref, $el) { var clsWrapper = ref.clsWrapper; return $(clsWrapper.replace('%unit%', 'minutes'), $el); }, seconds: function(ref, $el) { var clsWrapper = ref.clsWrapper; return $(clsWrapper.replace('%unit%', 'seconds'), $el); }, units: function() { var this$1 = this; return ['days', 'hours', 'minutes', 'seconds'].filter(function (unit) { return this$1[unit]; }); } }, connected: function() { this.start(); }, disconnected: function() { var this$1 = this; this.stop(); this.units.forEach(function (unit) { return empty(this$1[unit]); }); }, events: [ { name: 'visibilitychange', el: document, handler: function() { if (document.hidden) { this.stop(); } else { this.start(); } } } ], update: { write: function() { var this$1 = this; var timespan = getTimeSpan(this.date); if (timespan.total <= 0) { this.stop(); timespan.days = timespan.hours = timespan.minutes = timespan.seconds = 0; } this.units.forEach(function (unit) { var digits = String(Math.floor(timespan[unit])); digits = digits.length < 2 ? ("0" + digits) : digits; var el = this$1[unit]; if (el.textContent !== digits) { digits = digits.split(''); if (digits.length !== el.children.length) { html(el, digits.map(function () { return ''; }).join('')); } digits.forEach(function (digit, i) { return el.children[i].textContent = digit; }); } }); } }, methods: { start: function() { var this$1 = this; this.stop(); if (this.date && this.units.length) { this.$emit(); this.timer = setInterval(function () { return this$1.$emit(); }, 1000); } }, stop: function() { if (this.timer) { clearInterval(this.timer); this.timer = null; } } } }; function getTimeSpan(date) { var total = date - Date.now(); return { total: total, seconds: total / 1000 % 60, minutes: total / 1000 / 60 % 60, hours: total / 1000 / 60 / 60 % 24, days: total / 1000 / 60 / 60 / 24 }; } var targetClass = 'uk-animation-target'; var Animate = { props: { animation: Number }, data: { animation: 150 }, computed: { target: function() { return this.$el; } }, methods: { animate: function(action) { var this$1 = this; addStyle(); var children = toNodes(this.target.children); var propsFrom = children.map(function (el) { return getProps(el, true); }); var oldHeight = height(this.target); var oldScrollY = window.pageYOffset; action(); Transition.cancel(this.target); children.forEach(Transition.cancel); reset(this.target); this.$update(this.target); fastdom.flush(); var newHeight = height(this.target); children = children.concat(toNodes(this.target.children).filter(function (el) { return !includes(children, el); })); var propsTo = children.map(function (el, i) { return el.parentNode && i in propsFrom ? propsFrom[i] ? isVisible(el) ? getPositionWithMargin(el) : {opacity: 0} : {opacity: isVisible(el) ? 1 : 0} : false; } ); propsFrom = propsTo.map(function (props, i) { var from = children[i].parentNode === this$1.target ? propsFrom[i] || getProps(children[i]) : false; if (from) { if (!props) { delete from.opacity; } else if (!('opacity' in props)) { var opacity = from.opacity; if (opacity % 1) { props.opacity = 1; } else { delete from.opacity; } } } return from; }); addClass(this.target, targetClass); children.forEach(function (el, i) { return propsFrom[i] && css(el, propsFrom[i]); }); css(this.target, 'height', oldHeight); scrollTop(window, oldScrollY); return Promise.all(children.map(function (el, i) { return propsFrom[i] && propsTo[i] ? Transition.start(el, propsTo[i], this$1.animation, 'ease') : Promise.resolve(); } ).concat(Transition.start(this.target, {height: newHeight}, this.animation, 'ease'))).then(function () { children.forEach(function (el, i) { return css(el, {display: propsTo[i].opacity === 0 ? 'none' : '', zIndex: ''}); }); reset(this$1.target); this$1.$update(this$1.target); fastdom.flush(); // needed for IE11 }, noop); } } }; function getProps(el, opacity) { var zIndex = css(el, 'zIndex'); return isVisible(el) ? assign({ display: '', opacity: opacity ? css(el, 'opacity') : '0', pointerEvents: 'none', position: 'absolute', zIndex: zIndex === 'auto' ? index(el) : zIndex }, getPositionWithMargin(el)) : false; } function reset(el) { css(el.children, { height: '', left: '', opacity: '', pointerEvents: '', position: '', top: '', width: '' }); removeClass(el, targetClass); css(el, 'height', ''); } function getPositionWithMargin(el) { var ref = el.getBoundingClientRect(); var height = ref.height; var width = ref.width; var ref$1 = position(el); var top = ref$1.top; var left = ref$1.left; top += toFloat(css(el, 'marginTop')); return {top: top, left: left, height: height, width: width}; } var style; function addStyle() { if (style) { return; } style = append(document.head, '