Project

General

Profile

« Previous | Next » 

Revision 59303

[use-UoaAdminToolsLibrary | Library]: Merge trunk into branch.

View differences:

uikit.js
1
/*! UIkit 3.0.0-beta.22 | http://www.getuikit.com | (c) 2014 - 2017 YOOtheme | MIT License */
1
/*! UIkit 3.2.3 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */
2 2

  
3
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define("uikit",["jquery"],e):t.UIkit=e(t.jQuery)}(this,function(t){"use strict";function e(){return"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll}function i(t){var i=function(){o(document,"DOMContentLoaded",i),o(window,"load",i),t()};e()?t():(n(document,"DOMContentLoaded",i),n(window,"load",i))}function n(t,e,i,n){A(t).addEventListener(e,i,n)}function o(t,e,i,n){A(t).removeEventListener(e,i,n)}function s(t,e,i,n){void 0===i&&(i=400),void 0===n&&(n="linear");var o=w(function(s,r){t=Vt(t);for(var a in e)t.css(a,t.css(a));var l=setTimeout(function(){return t.trigger(we||"transitionend")},i);t.one(we||"transitionend",function(e,i){e.promise=o,clearTimeout(l),t.removeClass("uk-transition").css("transition",""),i?r():s()}).addClass("uk-transition").css("transition","all "+i+"ms "+n).css(e)}).then(null,function(){});return o}function r(t,e,i,n,o){void 0===i&&(i=200);var s=w(function(r){function a(){t.css("animation-duration","").removeClass(l+" "+e)}var l=o?"uk-animation-leave":"uk-animation-enter";t=Vt(t),0===e.lastIndexOf("uk-animation-",0)&&(n&&(e+=" uk-animation-"+n),o&&(e+=" uk-animation-reverse")),a(),t.one(be||"animationend",function(t){t.promise=s,s.then(a),r()}).css("animation-duration",i+"ms").addClass(e).addClass(l),be||ae(function(){return Kt.cancel(t)})});return s}function a(t){return t instanceof Vt}function l(e,i){return e=Vt(e),e.is(i)||!!(k(i)?e.parents(i).length:t.contains(A(i),e[0]))}function h(t,e,i,n){return t=Vt(t),t.attr(e,function(t,e){return e?e.replace(i,n):e})}function c(t,e){return h(t,"class",new RegExp("(^|\\s)"+e+"(?!\\S)","g"),"")}function u(e,i,n,o){if(void 0===i&&(i=!0),void 0===n&&(n=!1),void 0===o&&(o=!1),k(e)){var s=document.createEvent("Event");s.initEvent(e,i,n),e=s}return o&&t.extend(e,o),e}function d(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var n=A(t).getBoundingClientRect();return n.bottom>=-1*e&&n.right>=-1*i&&n.top<=(window.innerHeight||document.documentElement.clientHeight)+e&&n.left<=(window.innerWidth||document.documentElement.clientWidth)+i}function f(t,e,i){void 0===i&&(i=0),e=Vt(e);var n=Vt(e).length;return t=(C(t)?t:"next"===t?i+1:"previous"===t?i-1:k(t)?parseInt(t,10):e.index(t))%n,t<0?t+n:t}function p(t){return te[A(t).tagName.toLowerCase()]}function g(t,e){var i=S(t);return i?i.reduce(function(t,e){return E(e,t)},e):E(t)}function m(t,e){return function(i){var n=arguments.length;return n?n>1?t.apply(e,arguments):t.call(e,i):t.call(e)}}function v(t,e){return ie.call(t,e)}function w(t){if(ce)return new Promise(t);var e=Vt.Deferred();return t(e.resolve,e.reject),e}function y(t){return t.replace(/(?:^|[-_\/])(\w)/g,function(t,e){return e?e.toUpperCase():""})}function b(t){return t.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()}function $(t){return t.replace(ne,x)}function x(t,e){return e?e.toUpperCase():""}function k(t){return"string"==typeof t}function C(t){return"number"==typeof t}function T(t){return void 0===t}function _(t){return k(t)&&t.match(/^[!>+-]/)}function S(t){return _(t)&&t.split(/(?=\s[!>+-])/g).map(function(t){return t.trim()})}function E(t,e){if(!0===t)return null;try{if(e&&_(t)&&">"!==t[0]){var i=oe[t[0]],n=t.substr(1);e=Vt(e),"closest"===i&&(e=e.parent(),n=n||"*"),t=e[i](n)}else t=Vt(t,e)}catch(t){return null}return t.length?t:null}function A(t){return t&&(a(t)?t[0]:t)}function O(t){return"boolean"==typeof t?t:"true"===t||"1"===t||""===t||"false"!==t&&"0"!==t&&t}function D(t){var e=Number(t);return!isNaN(e)&&e}function I(e){return t.isArray(e)?e:k(e)?e.split(",").map(function(t){return O(t.trim())}):[e]}function N(t){if(k(t))if("@"===t[0]){var e="media-"+t.substr(1);t=se[e]||(se[e]=parseFloat(j(e)))}else if(t.match(/^\(min-width:/))return t;return!(!t||isNaN(t))&&"(min-width: "+t+"px)"}function B(t,e,i){return t===Boolean?O(e):t===Number?D(e):"jQuery"===t?g(e,i):"list"===t?I(e):"media"===t?N(e):t?t(e):e}function P(t){return t?"ms"===t.substr(-2)?parseFloat(t):1e3*parseFloat(t):0}function H(t,e,i){return t.replace(new RegExp(e+"|"+i,"mg"),function(t){return t===e?i:e})}function M(t,e,i){return(window.getComputedStyle(t,i)||{})[e]}function j(t){var e,i=document.documentElement,n=i.appendChild(document.createElement("div"));n.classList.add("var-"+t);try{e=M(n,"content",":before").replace(/^["'](.*)["']$/,"$1"),e=JSON.parse(e)}catch(t){}return i.removeChild(n),e||void 0}function L(t,e){var i,n=y(t),o=y(e).toLowerCase(),s=y(e),r=document.body||document.documentElement,a=(i={},i["Webkit"+n]="webkit"+s,i["Moz"+n]=o,i["o"+n]="o"+s+" o"+o,i[t]=o,i);for(t in a)if(void 0!==r.style[t])return a[t]}function F(t){t.scheduled||(t.scheduled=!0,ae(W.bind(null,t)))}function W(t){z(t.reads),z(t.writes.splice(0,t.writes.length)),t.scheduled=!1,(t.reads.length||t.writes.length)&&F(t)}function z(t){for(var e;e=t.shift();)e()}function q(t,e){var i=t.indexOf(e);return!!~i&&!!t.splice(i,1)}function Y(){}function R(t,e){return(e.y-t.y)/(e.x-t.x)}function U(t,e){function i(i){o[i]=(xe[i]||Ee)(t[i],e[i])}var n,o={};if(e.mixins)for(var s=0,r=e.mixins.length;s<r;s++)t=U(t,e.mixins[s]);for(n in t)i(n);for(n in e)v(t,n)||i(n);return o}function V(e,i,n,o,s,r,a,l){n=Z(n),o=Z(o);var h={element:n,target:o};if(!e)return h;var c=X(e),u=X(i),d=u;return J(d,n,c,-1),J(d,o,u,1),s=K(s,c.width,c.height),r=K(r,u.width,u.height),s.x+=r.x,s.y+=r.y,d.left+=s.x,d.top+=s.y,l=X(l||window),a&&t.each(Ae,function(t,e){var i=e[0],r=e[1],f=e[2];if(!0===a||~a.indexOf(t)){var p=n[t]===r?-c[i]:n[t]===f?c[i]:0,g=o[t]===r?u[i]:o[t]===f?-u[i]:0;if(d[r]<l[r]||d[r]+c[i]>l[f]){var m=d[r]+p+g-2*s[t];m>=l[r]&&m+c[i]<=l[f]&&(d[r]=m,["element","target"].forEach(function(e){h[e][t]=p?h[e][t]===Ae[t][1]?Ae[t][2]:Ae[t][1]:h[e][t]}))}}}),Vt(e).offset({left:d.left,top:d.top}),h}function X(t){t=A(t);var e=Q(t),i=e.pageYOffset,n=e.pageXOffset;if(!t.ownerDocument)return{top:i,left:n,height:e.innerHeight,width:e.innerWidth,bottom:i+e.innerHeight,right:n+e.innerWidth};var o=!1;t.offsetHeight||(o=t.style.display,t.style.display="block");var s=t.getBoundingClientRect();return!1!==o&&(t.style.display=o),{height:s.height,width:s.width,top:s.top+i,left:s.left+n,bottom:s.bottom+i,right:s.right+n}}function G(t){return t=A(t),t.getBoundingClientRect().top+Q(t).pageYOffset}function Q(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:window}function J(e,i,n,o){t.each(Ae,function(t,s){var r=s[0],a=s[1],l=s[2];i[t]===l?e[a]+=n[r]*o:"center"===i[t]&&(e[a]+=n[r]*o/2)})}function Z(t){var e=/left|center|right/,i=/top|center|bottom/;return t=(t||"").split(" "),1===t.length&&(t=e.test(t[0])?t.concat(["center"]):i.test(t[0])?["center"].concat(t):["center","center"]),{x:e.test(t[0])?t[0]:"center",y:i.test(t[1])?t[1]:"center"}}function K(t,e,i){return t=(t||"").split(" "),{x:t[0]?parseFloat(t[0])*("%"===t[0][t[0].length-1]?e/100:1):0,y:t[1]?parseFloat(t[1])*("%"===t[1][t[1].length-1]?i/100:1):0}}function tt(t){switch(t){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return t}}function et(t,e,i,n){return Math.abs(t-e)>=Math.abs(i-n)?t-e>0?"Left":"Right":i-n>0?"Up":"Down"}function it(){ke&&clearTimeout(ke),Ce&&clearTimeout(Ce),Te&&clearTimeout(Te),ke=Ce=Te=null,Oe={}}function nt(t){return De||"touch"===(t.originalEvent||t).pointerType}function ot(t){return new Function("return function "+y(t)+" (options) { this._init(options); }")()}function st(t,e){if(t.nodeType===Node.ELEMENT_NODE)for(e(t),t=t.firstChild;t;)st(t,e),t=t.nextSibling}function rt(t,e){if(t)for(var i in t)t[i]._isReady&&t[i]._callUpdate(e)}function at(t,e,i){Object.defineProperty(t,e,{enumerable:!0,get:function(){return v(t._computeds,e)||(t._computeds[e]=i.call(t)),t._computeds[e]},set:function(i){t._computeds[e]=i}})}function lt(e,i,n,o){t.isPlainObject(n)||(n={name:o,handler:n});var s=n.name,r=n.el,a=n.delegate,l=n.self,h=n.filter,c=n.handler,u="."+e.$options.name+"."+e._uid;if(r=r&&r.call(e)||e.$el,s=s.split(" ").map(function(t){return t+"."+u}).join(" "),i)r.off(s);else{if(h&&!h.call(e))return;c=k(c)?e[c]:m(c,e),l&&(c=ht(c,e)),a?r.on(s,k(a)?a:a.call(e),c):r.on(s,c)}}function ht(t,e){return function(i){if(i.target===i.currentTarget)return t.call(e,i)}}function ct(t,e){return t.every(function(t){return!t||!v(t,e)})}function ut(t,e){return T(t)||t===e||a(t)&&a(e)&&t.is(e)}function dt(t){Gt.on((e={},e["click."+t]=function(t){Be&&Be.bgClose&&!t.isDefaultPrevented()&&!l(t.target,Be.panel)&&Be.hide()},e["keydown."+t]=function(t){27===t.keyCode&&Be&&Be.escClose&&(t.preventDefault(),Be.hide())},e));var e}function ft(t){Gt.off("click."+t).off("keydown."+t)}function pt(t){t.component("accordion",{mixins:[He,Me],props:{targets:String,active:null,collapsible:Boolean,multiple:Boolean,toggle:String,content:String,transition:String},defaults:{targets:"> *",active:!1,animation:[!0],collapsible:!0,multiple:!1,clsOpen:"uk-open",toggle:"> .uk-accordion-title",content:"> .uk-accordion-content",transition:"ease"},computed:{items:function(){var t=this,e=Vt(this.targets,this.$el);return this._changed=!this._items||e.length!==this._items.length||e.toArray().some(function(e,i){return e!==t._items.get(i)}),this._items=e}},connected:function(){this.$emitSync()},events:[{name:"click",delegate:function(){return this.targets+" "+this.$props.toggle},handler:function(t){t.preventDefault(),this.toggle(this.items.find(this.$props.toggle).index(t.currentTarget))}}],update:function(){var t=this;if(this.items&&this._changed){this.items.each(function(e,i){i=Vt(i),t.toggleNow(i.find(t.content),i.hasClass(t.clsOpen))});var e=!1!==this.active&&E(this.items.eq(Number(this.active)))||!this.collapsible&&E(this.items.eq(0));e&&!e.hasClass(this.clsOpen)&&this.toggle(e,!1)}},methods:{toggle:function(t,e){var i=this,n=f(t,this.items),o=this.items.filter("."+this.clsOpen);t=this.items.eq(n),t.add(!this.multiple&&o).each(function(n,s){s=Vt(s);var r=s.is(t),a=r&&!s.hasClass(i.clsOpen);if(a||!r||i.collapsible||!(o.length<2)){s.toggleClass(i.clsOpen,a);var l=s[0]._wrapper?s[0]._wrapper.children().first():s.find(i.content);s[0]._wrapper||(s[0]._wrapper=l.wrap("<div>").parent().attr("hidden",a)),i._toggleImmediate(l,!0),i.toggleElement(s[0]._wrapper,a,e).then(function(){s.hasClass(i.clsOpen)===a&&(a||i._toggleImmediate(l,!1),s[0]._wrapper=null,l.unwrap())})}})}}})}function gt(t){t.component("alert",{mixins:[He,Me],args:"animation",props:{close:String},defaults:{animation:[!0],close:".uk-alert-close",duration:150,hideProps:{opacity:0}},events:[{name:"click",delegate:function(){return this.close},handler:function(t){t.preventDefault(),this.closeAlert()}}],methods:{closeAlert:function(){var t=this;this.toggleElement(this.$el).then(function(){return t.$destroy(!0)})}}})}function mt(t){t.component("cover",{mixins:[He],props:{automute:Boolean,width:Number,height:Number},defaults:{automute:!0},computed:{el:function(){return this.$el[0]},parent:function(){return this.$el.parent()[0]}},ready:function(){if(this.$el.is("iframe")&&(this.$el.css("pointerEvents","none"),this.automute)){var t=this.$el.attr("src");this.$el.attr("src",t+(~t.indexOf("?")?"&":"?")+"enablejsapi=1&api=1").on("load",function(t){return t.target.contentWindow.postMessage('{"event": "command", "func": "mute", "method":"setVolume", "value":0}',"*")})}},update:{write:function(){0!==this.el.offsetHeight&&this.$el.css({width:"",height:""}).css(ee.cover({width:this.width||this.el.clientWidth,height:this.height||this.el.clientHeight},{width:this.parent.offsetWidth,height:this.parent.offsetHeight}))},events:["load","resize"]},events:{loadedmetadata:function(){this.$emit()}}})}function vt(t){function e(){n||(n=!0,Gt.on("click",function(t){for(var e;i&&i!==e&&!l(t.target,i.$el)&&(!i.toggle||!l(t.target,i.toggle.$el));)e=i,i.hide(!1)}))}var i;t.component("drop",{mixins:[Le,Me],args:"pos",props:{mode:"list",toggle:Boolean,boundary:"jQuery",boundaryAlign:Boolean,delayShow:Number,delayHide:Number,clsDrop:String},defaults:{mode:["click","hover"],toggle:"- :first",boundary:window,boundaryAlign:!1,delayShow:0,delayHide:800,clsDrop:!1,hoverIdle:200,animation:["uk-animation-fade"],cls:"uk-open"},init:function(){this.tracker=new Y,this.clsDrop=this.clsDrop||"uk-"+this.$options.name,this.clsPos=this.clsDrop,this.$el.addClass(this.clsDrop)},ready:function(){this.updateAria(this.$el),this.toggle&&(this.toggle=t.toggle(g(this.toggle,this.$el),{target:this.$el,mode:this.mode}))},events:[{name:"click",delegate:function(){return"."+this.clsDrop+"-close"},handler:function(t){t.preventDefault(),this.hide(!1)}},{name:"click",delegate:function(){return'a[href^="#"]'},handler:function(t){if(!t.isDefaultPrevented()){var e=Vt(t.target).attr("href");1===e.length&&t.preventDefault(),1!==e.length&&l(e,this.$el)||this.hide(!1)}}},{name:"toggle",handler:function(t,e){e&&!this.$el.is(e.target)||(t.preventDefault(),this.isToggled()?this.hide(!1):this.show(e,!1))}},{name:ge,filter:function(){return~this.mode.indexOf("hover")},handler:function(t){nt(t)||(i&&i!==this&&i.toggle&&~i.toggle.mode.indexOf("hover")&&!l(t.target,i.$el)&&!l(t.target,i.toggle.$el)&&i.hide(!1),t.preventDefault(),this.show(this.toggle))}},{name:"toggleshow",handler:function(t,e){e&&!this.$el.is(e.target)||(t.preventDefault(),this.show(e||this.toggle))}},{name:"togglehide "+me,handler:function(t,e){nt(t)||e&&!this.$el.is(e.target)||(t.preventDefault(),this.toggle&&~this.toggle.mode.indexOf("hover")&&this.hide())}},{name:"beforeshow",self:!0,handler:function(){this.clearTimers()}},{name:"show",self:!0,handler:function(){this.tracker.init(),this.toggle.$el.addClass(this.cls).attr("aria-expanded","true"),e()}},{name:"beforehide",self:!0,handler:function(){this.clearTimers()}},{name:"hide",handler:function(t){var e=t.target;if(!this.$el.is(e))return void(i=null===i&&l(e,this.$el)&&this.isToggled()?this:i);i=this.isActive()?null:i,this.toggle.$el.removeClass(this.cls).attr("aria-expanded","false").blur().find("a, button").blur(),this.tracker.cancel()}}],update:{write:function(){this.isToggled()&&!Kt.inProgress(this.$el)&&this.position()},events:["resize"]},methods:{show:function(t,e){var n=this;void 0===e&&(e=!0);var o=function(){n.isToggled()||(n.position(),n.toggleElement(n.$el,!0))},s=function(){if(n.toggle=t||n.toggle,n.clearTimers(),!n.isActive()){if(e&&i&&i!==n&&i.isDelaying)return void(n.showTimer=setTimeout(n.show,10));if(n.isParentOf(i)){if(!i.hideTimer)return;i.hide(!1)}else if(i&&!n.isChildOf(i)&&!n.isParentOf(i))for(var s;i&&i!==s;)s=i,i.hide(!1);e&&n.delayShow?n.showTimer=setTimeout(o,n.delayShow):o(),i=n}};t&&this.toggle&&!this.toggle.$el.is(t.$el)?(this.$el.one("hide",s),this.hide(!1)):s()},hide:function(t){var e=this;void 0===t&&(t=!0);var i=function(){return e.toggleNow(e.$el,!1)};this.clearTimers(),this.isDelaying=this.tracker.movesTo(this.$el),t&&this.isDelaying?this.hideTimer=setTimeout(this.hide,this.hoverIdle):t&&this.delayHide?this.hideTimer=setTimeout(i,this.delayHide):i()},clearTimers:function(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null,this.isDelaying=!1},isActive:function(){return i===this},isChildOf:function(t){return t&&t!==this&&l(this.$el,t.$el)},isParentOf:function(t){return t&&t!==this&&l(t.$el,this.$el)},position:function(){c(this.$el,this.clsDrop+"-(stack|boundary)").css({top:"",left:""}),this.$el.show().toggleClass(this.clsDrop+"-boundary",this.boundaryAlign);var t=X(this.boundary),e=this.boundaryAlign?t:X(this.toggle.$el);if("justify"===this.align){var i="y"===this.getAxis()?"width":"height";this.$el.css(i,e[i])}else this.$el.outerWidth()>Math.max(t.right-e.left,e.right-t.left)&&(this.$el.addClass(this.clsDrop+"-stack"),this.$el.trigger("stack",[this]));this.positionAt(this.$el,this.boundaryAlign?this.boundary:this.toggle.$el,this.boundary),this.$el[0].style.display=""}}}),t.drop.getActive=function(){return i};var n}function wt(t){t.component("dropdown",t.components.drop.extend({name:"dropdown"}))}function yt(t){t.component("form-custom",{mixins:[He],args:"target",props:{target:Boolean},defaults:{target:!1},computed:{input:function(){return this.$el.find(":input:first")},state:function(){return this.input.next()},target:function(){return this.$props.target&&g(!0===this.$props.target?"> :input:first + :first":this.$props.target,this.$el)}},connected:function(){this.input.trigger("change")},events:[{name:"focusin focusout mouseenter mouseleave",delegate:":input:first",handler:function(t){var e=t.type;this.state.toggleClass("uk-"+(~e.indexOf("focus")?"focus":"hover"),~["focusin","mouseenter"].indexOf(e))}},{name:"change",handler:function(){this.target&&this.target[this.target.is(":input")?"val":"text"](this.input[0].files&&this.input[0].files[0]?this.input[0].files[0].name:this.input.is("select")?this.input.find("option:selected").text():this.input.val())}}]})}function bt(t){t.component("gif",{update:{read:function(){var t=d(this.$el);!this.isInView&&t&&(this.$el[0].src=this.$el[0].src),this.isInView=t},events:["scroll","load","resize"]}})}function $t(t){t.component("grid",t.components.margin.extend({mixins:[He],name:"grid",defaults:{margin:"uk-grid-margin",clsStack:"uk-grid-stack"},update:{write:function(){this.$el.toggleClass(this.clsStack,this.stacks)},events:["load","resize"]}}))}function xt(t){t.component("height-match",{args:"target",props:{target:String,row:Boolean},defaults:{target:"> *",row:!0},computed:{elements:function(){return Vt(this.target,this.$el)}},update:{read:function(){var t=this,e=!1;this.elements.css("minHeight",""),this.rows=this.row?this.elements.toArray().reduce(function(t,i){return e!==i.offsetTop?t.push([i]):t[t.length-1].push(i),e=i.offsetTop,t},[]).map(function(e){return t.match(Vt(e))}):[this.match(this.elements)]},write:function(){this.rows.forEach(function(t){var e=t.height,i=t.elements;return i&&i.each(function(t,i){return i.style.minHeight=e+"px"})})},events:["resize"]},methods:{match:function(t){if(t.length<2)return{};var e=0,i=[];return t=t.each(function(t,n){var o,s,r;0===n.offsetHeight&&(o=Vt(n),s=o.attr("style")||null,r=o.attr("hidden")||null,o.attr({style:s+";display:block !important;",hidden:null})),e=Math.max(e,n.offsetHeight),i.push(n.offsetHeight),o&&o.attr({style:s,hidden:r})}).filter(function(t){return i[t]<e}),{height:e,elements:t}}}})}function kt(e){e.component("height-viewport",{props:{expand:Boolean,offsetTop:Boolean,offsetBottom:Boolean},defaults:{expand:!1,offsetTop:!1,offsetBottom:!1},connected:function(){this.$emitSync()},update:{write:function(){this.$el.css("boxSizing","border-box");var e,i=window.innerHeight,n=0;if(this.expand){this.$el.css({height:"",minHeight:""});var o=i-document.documentElement.offsetHeight;o>0&&this.$el.css("min-height",e=this.$el.outerHeight()+o)}else{var s=G(this.$el);if(s<i&&this.offsetTop&&(n+=s),!0===this.offsetBottom)n+=this.$el.next().outerHeight()||0;else if(t.isNumeric(this.offsetBottom))n+=i/100*this.offsetBottom;else if(this.offsetBottom&&"px"===this.offsetBottom.substr(-2))n+=parseFloat(this.offsetBottom);else if(k(this.offsetBottom)){var r=g(this.offsetBottom,this.$el);n+=r&&r.outerHeight()||0}this.$el.css("min-height",e=n?"calc(100vh - "+n+"px)":"100vh")}this.$el.height(""),e&&i-n>=this.$el.outerHeight()&&this.$el.css("height",e)},events:["load","resize"]}})}function Ct(t){i(function(){if(ue){var e="uk-hover";Qt.on("tap",function(t){var i=t.target;return Vt("."+e).filter(function(t,e){return!l(i,e)}).removeClass(e)}),Object.defineProperty(t,"hoverSelector",{set:function(t){Qt.on("tap",t,function(t){return t.currentTarget.classList.add(e)})}}),t.hoverSelector=".uk-animation-toggle, .uk-transition-toggle, [uk-hover]"}})}function Tt(e){function i(t,i){e.component(t,e.components.icon.extend({name:t,mixins:i?[i]:[],defaults:{icon:t}}))}var n={},o={spinner:Ke,totop:ti,"close-icon":Fe,"close-large":We,"navbar-toggle-icon":ze,"overlay-icon":qe,"pagination-next":Ye,"pagination-previous":Re,"search-icon":Ue,"search-large":Ve,"search-navbar":Xe,"slidenav-next":Ge,"slidenav-next-large":Qe,"slidenav-previous":Je,"slidenav-previous-large":Ze};e.component("icon",e.components.svg.extend({attrs:["icon","ratio"],mixins:[He],name:"icon",args:"icon",props:["icon"],defaults:{exclude:["id","style","class","src"]},init:function(){this.$el.addClass("uk-icon"),Jt&&(this.icon=H(H(this.icon,"left","right"),"previous","next"))},update:{read:function(){if(this.delay){var t=this.getIcon();t&&this.delay(t)}},events:["load"]},methods:{getSvg:function(){var t=this,e=this.getIcon();return e?w.resolve(e):"complete"!==document.readyState?w(function(e){t.delay=e}):w.reject("Icon not found.")},getIcon:function(){return o[this.icon]?(n[this.icon]||(n[this.icon]=this.parse(o[this.icon])),n[this.icon]):null}}})),["navbar-toggle-icon","overlay-icon","pagination-previous","pagination-next","totop"].forEach(function(t){return i(t)}),["slidenav-previous","slidenav-next"].forEach(function(t){return i(t,{init:function(){this.$el.addClass("uk-slidenav"),this.$el.hasClass("uk-slidenav-large")&&(this.icon+="-large")}})}),i("search-icon",{init:function(){this.$el.hasClass("uk-search-icon")&&this.$el.parents(".uk-search-large").length?this.icon="search-large":this.$el.parents(".uk-search-navbar").length&&(this.icon="search-navbar")}}),i("close",{init:function(){this.icon="close-"+(this.$el.hasClass("uk-close-large")?"large":"icon")}}),i("spinner",{connected:function(){var t=this;this.height=this.width=this.$el.width(),this.svg.then(function(e){var i=Vt(e).find("circle"),n=Math.floor(t.width/2);e.setAttribute("viewBox","0 0 "+t.width+" "+t.width),i.attr({cx:n,cy:n,r:n-parseFloat(i.css("stroke-width")||0)})})}}),e.icon.add=function(e){return t.extend(o,e)}}function _t(t){t.component("margin",{props:{margin:String,firstColumn:Boolean},defaults:{margin:"uk-margin-small-top",firstColumn:"uk-first-column"},update:{read:function(){var t=this;if(0===this.$el[0].offsetHeight)return void(this.hidden=!0);this.hidden=!1,this.stacks=!0;var e=this.$el.children().filter(function(t,e){return e.offsetHeight>0});this.rows=[[e.get(0)]],e.slice(1).each(function(e,i){for(var n=Math.ceil(i.offsetTop),o=n+i.offsetHeight,s=t.rows.length-1;s>=0;s--){var r=t.rows[s],a=Math.ceil(r[0].offsetTop);if(n>=a+r[0].offsetHeight){t.rows.push([i]);break}if(o>a){if(t.stacks=!1,i.offsetLeft<r[0].offsetLeft){r.unshift(i);break}r.push(i);break}if(0===s){t.rows.splice(s,0,[i]);break}}})},write:function(){var t=this;this.hidden||this.rows.forEach(function(e,i){return e.forEach(function(e,n){return Vt(e).toggleClass(t.margin,0!==i).toggleClass(t.firstColumn,0===n)})})},events:["load","resize"]}})}function St(e){e.component("modal",{mixins:[je],props:{center:Boolean},defaults:{center:!1,clsPage:"uk-modal-page",clsPanel:"uk-modal-dialog",selClose:".uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full"},update:{write:function(){"block"===this.$el.css("display")&&this.center&&this.$el.removeClass("uk-flex uk-flex-center uk-flex-middle").css("display","block").toggleClass("uk-flex uk-flex-center uk-flex-middle",window.innerHeight>this.panel.outerHeight(!0)).css("display",this.$el.hasClass("uk-flex")?"":"block")},events:["resize"]},events:[{name:"beforeshow",self:!0,handler:function(){this.$el.css("display","block").height()}},{name:"hidden",self:!0,handler:function(){this.$el.css("display","").removeClass("uk-flex uk-flex-center uk-flex-middle")}}]}),e.component("overflow-auto",{mixins:[He],computed:{panel:function(){return this.$el.closest(".uk-modal-dialog")}},connected:function(){this.$el.css("min-height",150)},update:{write:function(){var t=this.$el.css("max-height");this.$el.css("max-height",150).css("max-height",Math.max(150,150-(this.panel.outerHeight(!0)-window.innerHeight))),t!==this.$el.css("max-height")&&this.$el.trigger("resize")},events:["load","resize"]}}),e.modal.dialog=function(t,i){var n=e.modal('<div class="uk-modal">\n                <div class="uk-modal-dialog">'+t+"</div>\n             </div>",i);return n.$el.on("hidden",function(t){t.target===t.currentTarget&&n.$destroy(!0)}),n.show(),n},e.modal.alert=function(i,n){return n=t.extend({bgClose:!1,escClose:!1,labels:e.modal.labels},n),w(function(t){return e.modal.dialog('\n                <div class="uk-modal-body">'+(k(i)?i:Vt(i).html())+'</div>\n                <div class="uk-modal-footer uk-text-right">\n                    <button class="uk-button-default uk-button-primary uk-modal-close" autofocus>'+n.labels.ok+"</button>\n                </div>\n            ",n).$el.on("hide",t)})},e.modal.confirm=function(i,n){return n=t.extend({bgClose:!1,escClose:!1,labels:e.modal.labels},n),w(function(t,o){return e.modal.dialog('\n                <div class="uk-modal-body">'+(k(i)?i:Vt(i).html())+'</div>\n                <div class="uk-modal-footer uk-text-right">\n                    <button class="uk-button-default uk-button-default uk-modal-close">'+n.labels.cancel+'</button>\n                    <button class="uk-button-default uk-button-primary uk-modal-close" autofocus>'+n.labels.ok+"</button>\n                </div>\n            ",n).$el.on("click",".uk-modal-footer button",function(e){return 0===Vt(e.target).index()?o():t()})})},e.modal.prompt=function(i,n,o){return o=t.extend({bgClose:!1,escClose:!1,labels:e.modal.labels},o),w(function(t){var s=!1,r=e.modal.dialog('\n                <form class="-stacked">\n                    <div class="uk-modal-body">\n                        <label>'+(k(i)?i:Vt(i).html())+'</label>\n                        <input class="uk-input" type="text" autofocus>\n                    </div>\n                    <div class="uk-modal-footer uk-text-right">\n                        <button class="uk-button-default uk-button-default uk-modal-close" type="button">'+o.labels.cancel+'</button>\n                        <button class="uk-button-default uk-button-primary" type="submit">'+o.labels.ok+"</button>\n                    </div>\n                </form>\n            ",o),a=r.$el.find("input").val(n);r.$el.on("submit","form",function(e){e.preventDefault(),t(a.val()),s=!0,r.hide()}).on("hide",function(){s||t(null)})})},e.modal.labels={ok:"Ok",cancel:"Cancel"}}function Et(t){t.component("nav",t.components.accordion.extend({name:"nav",defaults:{targets:"> .uk-parent",toggle:"> a",content:"ul:first"}}))}function At(e){e.component("navbar",{mixins:[He],props:{dropdown:String,mode:"list",align:String,offset:Number,boundary:Boolean,boundaryAlign:Boolean,clsDrop:String,delayShow:Number,delayHide:Number,dropbar:Boolean,dropbarMode:String,dropbarAnchor:"jQuery",duration:Number},defaults:{dropdown:".uk-navbar-nav > li",align:Jt?"right":"left",clsDrop:"uk-navbar-dropdown",mode:void 0,offset:void 0,delayShow:void 0,delayHide:void 0,boundaryAlign:void 0,flip:"x",boundary:!0,dropbar:!1,dropbarMode:"slide",dropbarAnchor:!1,duration:200},computed:{boundary:function(){return!0===this.$props.boundary||this.boundaryAlign?this.$el:this.$props.boundary},pos:function(){return"bottom-"+this.align}},ready:function(){this.dropbar&&e.navbarDropbar(g(this.dropbar,this.$el)||Vt("<div></div>").insertAfter(this.dropbarAnchor||this.$el),{clsDrop:this.clsDrop,mode:this.dropbarMode,duration:this.duration,navbar:this})},update:function(){e.drop(Vt(this.dropdown+" ."+this.clsDrop,this.$el),t.extend({},this))},events:[{name:ge,delegate:function(){return this.dropdown},handler:function(t){var e=t.currentTarget,i=this.getActive();i&&i.toggle&&!l(i.toggle.$el,e)&&!i.tracker.movesTo(i.$el)&&i.hide(!1)}}],methods:{getActive:function(){var t=e.drop.getActive();return t&&"click"!==t.mode&&l(t.toggle.$el,this.$el)&&t}}}),e.component("navbar-dropbar",{mixins:[He],defaults:{clsDrop:"",mode:"slide",navbar:null,duration:200},init:function(){"slide"===this.mode&&this.$el.addClass("uk-navbar-dropbar-slide")},events:[{name:"beforeshow",el:function(){return this.navbar.$el},handler:function(t,e){var i=e.$el;if("bottom"===e.dir&&!l(i,this.$el))return i.appendTo(this.$el),e.show(),!1}},{name:"mouseleave",handler:function(){var t=this.navbar.getActive();t&&!this.$el.is(":hover")&&t.hide()}},{name:"beforeshow",handler:function(t,e){var i=e.$el;this.clsDrop&&i.addClass(this.clsDrop+"-dropbar"),this.transitionTo(i.outerHeight(!0))}},{name:"beforehide",handler:function(t,e){var i=e.$el,n=this.navbar.getActive();if(this.$el.is(":hover")&&n&&n.$el.is(i))return!1}},{name:"hide",handler:function(t,e){var i=e.$el,n=this.navbar.getActive();(!n||n&&n.$el.is(i))&&this.transitionTo(0)}}],methods:{transitionTo:function(t){var e=this;return this.$el.height(this.$el[0].offsetHeight?this.$el.height():0),Zt.cancel(this.$el).then(function(){return Zt.start(e.$el,{height:t},e.duration)})}}})}function Ot(t){t.component("offcanvas",{mixins:[je],args:"mode",props:{content:String,mode:String,flip:Boolean,overlay:Boolean},defaults:{content:".uk-offcanvas-content:first",mode:"slide",flip:!1,overlay:!1,clsPage:"uk-offcanvas-page",clsContainer:"uk-offcanvas-container",clsPanel:"uk-offcanvas-bar",clsFlip:"uk-offcanvas-flip",clsContent:"uk-offcanvas-content",clsContentAnimation:"uk-offcanvas-content-animation",clsSidebarAnimation:"uk-offcanvas-bar-animation",clsMode:"uk-offcanvas",clsOverlay:"uk-offcanvas-overlay",selClose:".uk-offcanvas-close"},computed:{content:function(){return Vt(g(this.$props.content,this.$el))},clsFlip:function(){return this.flip?this.$props.clsFlip:""},clsOverlay:function(){return this.overlay?this.$props.clsOverlay:""},clsMode:function(){return this.$props.clsMode+"-"+this.mode},clsSidebarAnimation:function(){return"none"===this.mode||"reveal"===this.mode?"":this.$props.clsSidebarAnimation},clsContentAnimation:function(){return"push"!==this.mode&&"reveal"!==this.mode?"":this.$props.clsContentAnimation},transitionElement:function(){return"reveal"===this.mode?this.panel.parent():this.panel}},update:{write:function(){this.isToggled()&&((this.overlay||this.clsContentAnimation)&&this.content.width(window.innerWidth-this.scrollbarWidth),this.overlay&&(this.content.height(window.innerHeight),Pe&&this.content.scrollTop(Pe.y)))},events:["resize"]},events:[{name:"beforeshow",self:!0,handler:function(){Pe=Pe||{x:window.pageXOffset,y:window.pageYOffset},"reveal"!==this.mode||this.panel.parent().hasClass(this.clsMode)||this.panel.wrap("<div>").parent().addClass(this.clsMode),Qt.css("overflow-y",(!this.clsContentAnimation||this.flip)&&this.scrollbarWidth&&this.overlay?"scroll":""),this.body.addClass(this.clsContainer+" "+this.clsFlip+" "+this.clsOverlay).height(),this.content.addClass(this.clsContentAnimation),this.panel.addClass(this.clsSidebarAnimation+" "+("reveal"!==this.mode?this.clsMode:"")),this.$el.addClass(this.clsOverlay).css("display","block").height()}},{name:"beforehide",self:!0,handler:function(){this.content.removeClass(this.clsContentAnimation),("none"===this.mode||this.getActive()&&this.getActive()!==this)&&this.panel.trigger(we)}},{name:"hidden",self:!0,handler:function(){"reveal"===this.mode&&this.panel.unwrap(),this.overlay||(Pe={x:window.pageXOffset,y:window.pageYOffset}),this.panel.removeClass(this.clsSidebarAnimation+" "+this.clsMode),this.$el.removeClass(this.clsOverlay).css("display",""),this.body.removeClass(this.clsContainer+" "+this.clsFlip+" "+this.clsOverlay).scrollTop(Pe.y),Qt.css("overflow-y",""),this.content.width("").height(""),window.scrollTo(Pe.x,Pe.y),Pe=null}},{name:"swipeLeft swipeRight",handler:function(t){this.isToggled()&&nt(t)&&("swipeLeft"===t.type&&!this.flip||"swipeRight"===t.type&&this.flip)&&this.hide()}}]})}function Dt(t){t.component("responsive",{props:["width","height"],init:function(){this.$el.addClass("uk-responsive-width")},update:{write:function(){this.$el.is(":visible")&&this.width&&this.height&&this.$el.height(ee.fit({height:this.height,width:this.width},{width:this.$el.parent().width(),height:this.height||this.$el.height()}).height)},events:["load","resize"]}})}function It(t){t.component("scroll",{props:{duration:Number,transition:String,offset:Number},defaults:{duration:1e3,
4
transition:"easeOutExpo",offset:0},methods:{scrollToElement:function(t){var e=this;t=Vt(t);var i=G(t)-this.offset,n=document.documentElement.offsetHeight,o=window.innerHeight;i+o>n&&(i=n-o),Vt("html,body").stop().animate({scrollTop:Math.round(i)},this.duration,this.transition).promise().then(function(){return e.$el.trigger("scrolled",[e])})}},events:{click:function(t){t.isDefaultPrevented()||(t.preventDefault(),this.scrollToElement(Vt(this.$el[0].hash).length?this.$el[0].hash:"body"))}}}),Vt.easing.easeOutExpo||(Vt.easing.easeOutExpo=function(t,e,i,n,o){return e===o?i+n:n*(1-Math.pow(2,-10*e/o))+i})}function Nt(t){t.component("scrollspy",{args:"cls",props:{cls:"list",target:String,hidden:Boolean,offsetTop:Number,offsetLeft:Number,repeat:Boolean,delay:Number},defaults:{cls:["uk-scrollspy-inview"],target:!1,hidden:!0,offsetTop:0,offsetLeft:0,repeat:!1,delay:0,inViewClass:"uk-scrollspy-inview"},init:function(){this.$emitSync()},computed:{elements:function(){return this.target&&Vt(this.target,this.$el)||this.$el}},update:[{write:function(){this.hidden&&this.elements.filter(":not(."+this.inViewClass+")").css("visibility","hidden")}},{read:function(){var t=this;this.elements.each(function(e,i){if(!i._scrollspy){var n=Vt(i).attr("uk-scrollspy-class");i._scrollspy={toggles:n&&n.split(",")||t.cls}}i._scrollspy.show=d(i,t.offsetTop,t.offsetLeft)})},write:function(){var t=this,e=1===this.elements.length?1:0;this.elements.each(function(i,n){var o=Vt(n),s=n._scrollspy;s.show?s.inview||s.timer||(s.timer=setTimeout(function(){o.css("visibility","").addClass(t.inViewClass).toggleClass(s.toggles[0]).trigger("inview"),s.inview=!0,delete s.timer},t.delay*e++)):s.inview&&t.repeat&&(s.timer&&(clearTimeout(s.timer),delete s.timer),o.removeClass(t.inViewClass).toggleClass(s.toggles[0]).css("visibility",t.hidden?"hidden":"").trigger("outview"),s.inview=!1),s.toggles.reverse()})},events:["scroll","load","resize"]}]})}function Bt(t){t.component("scrollspy-nav",{props:{cls:String,closest:String,scroll:Boolean,overflow:Boolean,offset:Number},defaults:{cls:"uk-active",closest:!1,scroll:!1,overflow:!0,offset:0},computed:{links:function(){return this.$el.find('a[href^="#"]').filter(function(t,e){return e.hash})},elements:function(){return this.closest?this.links.closest(this.closest):this.links},targets:function(){return Vt(this.links.toArray().map(function(t){return t.hash}).join(","))}},update:[{read:function(){this.scroll&&t.scroll(this.links,{offset:this.offset||0})}},{read:function(){var t=this,e=window.pageYOffset+this.offset,i=document.documentElement.scrollHeight-window.innerHeight+this.offset;this.active=!1,this.targets.each(function(n,o){o=Vt(o);var s=G(o),r=n+1===t.targets.length;if(!t.overflow&&(0===n&&s>e||r&&s+o[0].offsetTop<e))return!1;if(r||!(G(t.targets.eq(n+1))<=e)){if(e>=i)for(var a=t.targets.length-1;a>n;a--)if(d(t.targets.eq(a))){o=t.targets.eq(a);break}return!(t.active=E(t.links.filter('[href="#'+o.attr("id")+'"]')))}})},write:function(){this.links.blur(),this.elements.removeClass(this.cls),this.active&&this.$el.trigger("active",[this.active,(this.closest?this.active.closest(this.closest):this.active).addClass(this.cls)])},events:["scroll","load","resize"]}]})}function Pt(e){e.component("sticky",{mixins:[He],attrs:!0,props:{top:null,bottom:Boolean,offset:Number,animation:String,clsActive:String,clsInactive:String,clsFixed:String,widthElement:"jQuery",showOnUp:Boolean,media:"media",target:Number},defaults:{top:0,bottom:!1,offset:0,animation:"",clsActive:"uk-active",clsInactive:"",clsFixed:"uk-sticky-fixed",widthElement:!1,showOnUp:!1,media:!1,target:!1},connected:function(){this.placeholder=Vt('<div class="uk-sticky-placeholder"></div>'),this.widthElement=this.$props.widthElement||this.placeholder,this.isActive||this.$el.addClass(this.clsInactive)},disconnected:function(){this.isActive&&(this.isActive=!1,this.hide(),this.$el.removeClass(this.clsInactive)),this.placeholder.remove(),this.placeholder=null,this.widthElement=null},ready:function(){var t=this;if(this.target&&location.hash&&window.pageYOffset>0){var e=g(location.hash);e&&ae(function(){var i=G(e),n=G(t.$el),o=t.$el[0].offsetHeight;n+o>=i&&n<=i+e[0].offsetHeight&&window.scrollTo(0,i-o-t.target-t.offset)})}},update:[{write:function(){var e,i=this,n=this.$el[0].offsetHeight;this.placeholder.css("height","absolute"!==this.$el.css("position")?n:"").css(this.$el.css(["marginTop","marginBottom","marginLeft","marginRight"])),document.documentElement.contains(this.placeholder[0])||this.placeholder.insertAfter(this.$el).attr("hidden",!0),this.width=this.widthElement.attr("hidden",null)[0].offsetWidth,this.widthElement.attr("hidden",!this.isActive),this.topOffset=G(this.isActive?this.placeholder:this.$el),this.bottomOffset=this.topOffset+n,["top","bottom"].forEach(function(n){i[n]=i.$props[n],i[n]&&(t.isNumeric(i[n])?i[n]=i[n+"Offset"]+parseFloat(i[n]):k(i[n])&&i[n].match(/^-?\d+vh$/)?i[n]=window.innerHeight*parseFloat(i[n])/100:(e=!0===i[n]?i.$el.parent():g(i[n],i.$el))&&(i[n]=G(e)+e[0].offsetHeight))}),this.top=Math.max(parseFloat(this.top),this.topOffset)-this.offset,this.bottom=this.bottom&&this.bottom-n,this.inactive=this.media&&!window.matchMedia(this.media).matches,this.isActive&&this.update()},events:["load","resize"]},{read:function(){this.offsetTop=G(this.$el)},write:function(t){var e=this;void 0===t&&(t={});var i=t.dir,n=window.pageYOffset;if(!(n<0||!this.$el.is(":visible")||this.disabled||this.showOnUp&&!i))if(this.inactive||n<this.top||this.showOnUp&&(n<=this.top||"down"===i||"up"===i&&!this.isActive&&n<=this.bottomOffset)){if(!this.isActive)return;this.isActive=!1,this.animation&&this.bottomOffset<this.offsetTop?Kt.cancel(this.$el).then(function(){return Kt.out(e.$el,e.animation).then(function(){return e.hide()})}):this.hide()}else this.isActive?this.update():this.animation?Kt.cancel(this.$el).then(function(){e.show(),Kt.in(e.$el,e.animation)}):this.show()},events:["scroll"]}],methods:{show:function(){this.isActive=!0,this.update(),this.$el.trigger("active"),this.placeholder.attr("hidden",null)},hide:function(){this.$el.addClass(this.clsInactive).removeClass(this.clsFixed).removeClass(this.clsActive).css({position:"",top:"",width:""}).trigger("inactive"),this.placeholder.attr("hidden",!0)},update:function(){var t=Math.max(0,this.offset),e=window.pageYOffset,i=e>this.top;this.bottom&&e>this.bottom-this.offset&&(t=this.bottom-e),this.$el.css({position:"fixed",top:t+"px",width:this.width}).addClass(this.clsFixed).toggleClass(this.clsActive,i).toggleClass(this.clsInactive,!i)}}})}function Ht(e){e.component("svg",{attrs:!0,props:{id:String,icon:String,src:String,style:String,width:Number,height:Number,ratio:Number,class:String},defaults:{ratio:1,id:!1,exclude:["src"],class:""},init:function(){this.class+=" uk-svg"},connected:function(){var t=this;if(!this.icon&&this.src&&~this.src.indexOf("#")){var e=this.src.split("#");e.length>1&&(this.src=e[0],this.icon=e[1])}this.width=this.$props.width,this.height=this.$props.height,this.svg=this.getSvg().then(function(e){return w(function(i,n){return $e.mutate(function(){var o,s;if(!e)return void n("SVG not found.");if(t.icon)if(o=e.getElementById(t.icon)){var r=o.outerHTML;if(!r){var a=document.createElement("div");a.appendChild(o.cloneNode(!0)),r=a.innerHTML}r=r.replace(/<symbol/g,"<svg"+(~r.indexOf("xmlns")?"":' xmlns="http://www.w3.org/2000/svg"')).replace(/symbol>/g,"svg>"),s=ii.parseFromString(r,"image/svg+xml").documentElement}else e.querySelector("symbol")||(s=e.documentElement.cloneNode(!0));else s=e.documentElement.cloneNode(!0);if(!s)return void n("SVG not found.");var l=s.getAttribute("viewBox");l&&(l=l.split(" "),t.width=t.width||l[2],t.height=t.height||l[3]),t.width*=t.ratio,t.height*=t.ratio;for(var h in t.$options.props)t[h]&&!~t.exclude.indexOf(h)&&s.setAttribute(h,t[h]);t.id||s.removeAttribute("id"),t.width&&!t.height&&s.removeAttribute("height"),t.height&&!t.width&&s.removeAttribute("width");var c=t.$el[0];p(c)||"CANVAS"===c.tagName?(t.$el.attr({hidden:!0,id:null}),c.nextSibling?c.parentNode.insertBefore(s,c.nextSibling):c.parentNode.appendChild(s)):c.appendChild(s),i(s)})})}).then(null,function(){}),this._isReady||this.$emitSync()},disconnected:function(){p(this.$el)&&this.$el.attr({hidden:null,id:this.id||null}),this.svg&&(this.svg.then(function(t){return t&&t.parentNode&&t.parentNode.removeChild(t)}),this.svg=null)},methods:{getSvg:function(){var e=this;return this.src?ei[this.src]?ei[this.src]:(ei[this.src]=w(function(i,n){0===e.src.lastIndexOf("data:",0)?i(e.parse(decodeURIComponent(e.src.split(",")[1]))):t.ajax(e.src,{dataType:"html"}).then(function(t){i(e.parse(t))},function(){n("SVG not found.")})}),ei[this.src]):w.reject()},parse:function(t){var e=ii.parseFromString(t,"image/svg+xml");return e.documentElement&&"svg"===e.documentElement.nodeName?e:null}}})}function Mt(t){t.component("switcher",{mixins:[Me],args:"connect",props:{connect:String,toggle:String,active:Number,swiping:Boolean},defaults:{connect:!1,toggle:" > *",active:0,swiping:!0,cls:"uk-active",clsContainer:"uk-switcher",attrItem:"uk-switcher-item",queued:!0},connected:function(){this.$emitSync()},computed:{connects:function(){return g(this.connect,this.$el)||Vt(this.$el.next("."+this.clsContainer))},toggles:function(){return Vt(this.toggle,this.$el)}},events:[{name:"click",delegate:function(){return this.toggle+":not(.uk-disabled)"},handler:function(t){t.preventDefault(),this.show(t.currentTarget)}},{name:"click",el:function(){return this.connects},delegate:function(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler:function(t){t.preventDefault(),this.show(Vt(t.currentTarget)[t.currentTarget.hasAttribute(this.attrItem)?"attr":"data"](this.attrItem))}},{name:"swipeRight swipeLeft",filter:function(){return this.swiping},el:function(){return this.connects},handler:function(t){nt(t)&&(t.preventDefault(),window.getSelection().toString()||this.show("swipeLeft"===t.type?"next":"previous"))}}],update:function(){this.updateAria(this.connects.children()),this.show(E(this.toggles.filter("."+this.cls+":first"))||E(this.toggles.eq(this.active))||this.toggles.first())},methods:{show:function(t){for(var e,i=this,n=this.toggles.length,o=this.connects.children("."+this.cls).index(),s=o>=0,r=f(t,this.toggles,o),a="previous"===t?-1:1,l=0;l<n;l++,r=(r+a+n)%n)if(!i.toggles.eq(r).is(".uk-disabled, [disabled]")){e=i.toggles.eq(r);break}!e||o>=0&&e.hasClass(this.cls)||o===r||(this.toggles.removeClass(this.cls).attr("aria-expanded",!1),e.addClass(this.cls).attr("aria-expanded",!0),s?this.toggleElement(this.connects.children(":nth-child("+(o+1)+"),:nth-child("+(r+1)+")")):this.toggleNow(this.connects.children(":nth-child("+(r+1)+")")))}}})}function jt(t){t.component("tab",t.components.switcher.extend({mixins:[He],name:"tab",props:{media:"media"},defaults:{media:960,attrItem:"uk-tab-item"},init:function(){var e=this.$el.hasClass("uk-tab-left")&&"uk-tab-left"||this.$el.hasClass("uk-tab-right")&&"uk-tab-right";e&&t.toggle(this.$el,{cls:e,mode:"media",media:this.media})}}))}function Lt(e){e.component("toggle",{mixins:[e.mixin.togglable],args:"target",props:{href:String,target:null,mode:"list",media:"media"},defaults:{href:!1,target:!1,mode:"click",queued:!0,media:!1},computed:{target:function(){return g(this.$props.target||this.href,this.$el)||this.$el}},events:[{name:ge+" "+me,filter:function(){return~this.mode.indexOf("hover")},handler:function(t){nt(t)||this.toggle("toggle"+(t.type===ge?"show":"hide"))}},{name:"click",filter:function(){return~this.mode.indexOf("click")||ue},handler:function(t){if(nt(t)||~this.mode.indexOf("click")){var e=Vt(t.target).closest("a[href]");(Vt(t.target).closest('a[href="#"], button').length||e.length&&(this.cls||!this.target.is(":visible")||"#"===e.attr("href")[0]&&this.target.is(e.attr("href"))))&&t.preventDefault(),this.toggle()}}}],update:{write:function(){if(~this.mode.indexOf("media")&&this.media){var t=this.isToggled(this.target);(window.matchMedia(this.media).matches?!t:t)&&this.toggle()}},events:["load","resize"]},methods:{toggle:function(e){var i=t.Event(e||"toggle");this.target.triggerHandler(i,[this]),i.isDefaultPrevented()||this.toggleElement(this.target)}}})}function Ft(t){t.component("leader",{mixins:[He],props:{fill:String,media:"media"},defaults:{fill:"",media:!1,clsWrapper:"uk-leader-fill",clsHide:"uk-leader-hide",attrFill:"data-fill"},computed:{fill:function(){return this.$props.fill||j("leader-fill")}},connected:function(){this.wrapper=this.$el.wrapInner('<span class="'+this.clsWrapper+'">').children().first()},disconnected:function(){this.wrapper.contents().unwrap()},update:[{read:function(){var t=this._width;this._width=Math.floor(this.$el[0].offsetWidth/2),this._changed=t!==this._width,this._hide=this.media&&!window.matchMedia(this.media).matches},write:function(){this.wrapper.toggleClass(this.clsHide,this._hide),this._changed&&this.wrapper.attr(this.attrFill,Array(this._width).join(this.fill))},events:["load","resize"]}]})}function Wt(t){function e(t){var e=t-Date.now();return{total:e,seconds:e/1e3%60,minutes:e/1e3/60%60,hours:e/1e3/60/60%24,days:e/1e3/60/60/24}}Wt.installed||t.component("countdown",{mixins:[t.mixin.class],attrs:!0,props:{date:String,clsWrapper:String},defaults:{date:"",clsWrapper:".uk-countdown-%unit%"},computed:{date:function(){return Date.parse(this.$props.date)},days:function(){return this.$el.find(this.clsWrapper.replace("%unit%","days"))},hours:function(){return this.$el.find(this.clsWrapper.replace("%unit%","hours"))},minutes:function(){return this.$el.find(this.clsWrapper.replace("%unit%","minutes"))},seconds:function(){return this.$el.find(this.clsWrapper.replace("%unit%","seconds"))},units:function(){var t=this;return["days","hours","minutes","seconds"].filter(function(e){return t[e].length})}},connected:function(){this.start()},disconnected:function(){var t=this;this.stop(),this.units.forEach(function(e){return t[e].empty()})},update:{write:function(){var t=this,i=e(this.date);i.total<=0&&(this.stop(),i.days=i.hours=i.minutes=i.seconds=0),this.units.forEach(function(e){var n=String(Math.floor(i[e]));if(n=n.length<2?"0"+n:n,t[e].text()!==n){var o=t[e];n=n.split(""),n.length!==o.children().length&&o.empty().append(n.map(function(){return"<span></span>"}).join("")),n.forEach(function(t,e){return o[0].childNodes[e].innerText=t})}})}},methods:{start:function(){var t=this;this.stop(),this.date&&this.units.length&&(this.$emit(),this.timer=setInterval(function(){return t.$emit()},1e3))},stop:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}}})}function zt(t){if(!zt.installed){var e=t.util,i=e.$,n=e.ajax,o=e.doc,s=e.Event,r=e.extend,a=e.Dimensions,l=e.getIndex,h=e.Transition;t.component("lightbox",{name:"lightbox",props:{toggle:String,duration:Number,inverse:Boolean},defaults:{toggle:"a",duration:400,dark:!1,attrItem:"uk-lightbox-item",items:[],index:0},computed:{toggles:function(){var t=this;return i(this.toggle,this.$el).each(function(e,i){return t.items.push({source:i.getAttribute("href"),title:i.getAttribute("title"),type:i.getAttribute("type")})})}},events:[{name:"click",delegate:function(){return this.toggle+":not(.uk-disabled)"},handler:function(t){t.preventDefault(),this.show(this.toggles.index(t.currentTarget))}},{name:"showitem",handler:function(t){this.getItem().content&&(this.$update(),t.stopImmediatePropagation())}}],update:{write:function(){var t=this,e=this.getItem();if(this.modal&&e.content){var n=this.modal.panel,o={width:n.width(),height:n.height()},s={width:window.innerWidth-(n.outerWidth(!0)-o.width),height:window.innerHeight-(n.outerHeight(!0)-o.height)},r=a.fit({width:e.width,height:e.height},s);h.stop(n),h.stop(this.modal.content),this.modal.content&&this.modal.content.remove(),this.modal.content=i(e.content).css("opacity",0).appendTo(n),n.css(o),h.start(n,r,this.duration).then(function(){h.start(t.modal.content,{opacity:1},400).then(function(){n.find("[uk-transition-hide]").show(),n.find("[uk-transition-show]").hide()})})}},events:["resize"]},methods:{show:function(e){var n=this;this.index=l(e,this.items,this.index),this.modal||(this.modal=t.modal.dialog('\n                        <button class="uk-modal-close-outside" uk-transition-hide type="button" uk-close></button>\n                        <span class="uk-position-center" uk-transition-show uk-spinner></span>\n                    ',{center:!0}),this.modal.$el.css("overflow","hidden").addClass("uk-modal-lightbox"),this.modal.panel.css({width:200,height:200}),this.modal.caption=i('<div class="uk-modal-caption" uk-transition-hide></div>').appendTo(this.modal.panel),this.items.length>1&&i('<div class="'+(this.dark?"uk-dark":"uk-light")+'" uk-transition-hide>\n                                <a href="#" class="uk-position-center-left" uk-slidenav-previous uk-lightbox-item="previous"></a>\n                                <a href="#" class="uk-position-center-right" uk-slidenav-next uk-lightbox-item="next"></a>\n                            </div>\n                        ').appendTo(this.modal.panel.addClass("uk-slidenav-position")),this.modal.$el.on("hidden",this.hide).on("click","["+this.attrItem+"]",function(t){t.preventDefault(),n.show(i(t.currentTarget).attr(n.attrItem))}).on("swipeRight swipeLeft",function(t){t.preventDefault(),window.getSelection().toString()||n.show("swipeLeft"===t.type?"next":"previous")})),this.modal.panel.find("[uk-transition-hide]").hide(),this.modal.panel.find("[uk-transition-show]").show(),this.modal.content&&this.modal.content.remove(),this.modal.caption.text(this.getItem().title);var r=s("showitem");this.$el.trigger(r),r.isImmediatePropagationStopped()||this.setError(this.getItem()),o.on("keydown."+this.$options.name,function(t){switch(t.keyCode){case 37:n.show("previous");break;case 39:n.show("next")}})},hide:function(){var t=this;o.off("keydown."+this.$options.name),this.modal.hide().then(function(){t.modal.$destroy(!0),t.modal=null})},getItem:function(){return this.items[this.index]||{source:"",title:"",type:""}},setItem:function(t,e,i,n){void 0===i&&(i=200),void 0===n&&(n=200),r(t,{content:e,width:i,height:n}),this.$update()},setError:function(t){this.setItem(t,'<div class="uk-position-cover uk-flex uk-flex-middle uk-flex-center"><strong>Loading resource failed!</strong></div>',400,300)}}}),t.mixin({events:{showitem:function(t){var e=this,i=this.getItem();if("image"===i.type||!i.source||i.source.match(/\.(jp(e)?g|png|gif|svg)$/i)){var n=new Image;n.onerror=function(){return e.setError(i)},n.onload=function(){return e.setItem(i,'<img class="uk-responsive-width" width="'+n.width+'" height="'+n.height+'" src ="'+i.source+'">',n.width,n.height)},n.src=i.source,t.stopImmediatePropagation()}}}},"lightbox"),t.mixin({events:{showitem:function(t){var e=this,n=this.getItem();if("video"===n.type||!n.source||n.source.match(/\.(mp4|webm|ogv)$/i)){var o=i('<video class="uk-responsive-width" controls></video>').on("loadedmetadata",function(){return e.setItem(n,o.attr({width:o[0].videoWidth,height:o[0].videoHeight}),o[0].videoWidth,o[0].videoHeight)}).attr("src",n.source);t.stopImmediatePropagation()}}}},"lightbox"),t.mixin({events:{showitem:function(t){var e,i=this,n=this.getItem();if((e=n.source.match(/\/\/.*?youtube\.[a-z]+\/watch\?v=([^&]+)&?(.*)/))||n.source.match(/youtu\.be\/(.*)/)){var o=e[1],s=new Image,r=!1,a=function(t,e){return i.setItem(n,'<iframe src="//www.youtube.com/embed/'+o+'" width="'+t+'" height="'+e+'" style="max-width:100%;box-sizing:border-box;"></iframe>',t,e)};s.onerror=function(){return a(640,320)},s.onload=function(){120===s.width&&90===s.height?r?a(640,320):(r=!0,s.src="//img.youtube.com/vi/"+o+"/0.jpg"):a(s.width,s.height)},s.src="//img.youtube.com/vi/"+o+"/maxresdefault.jpg",t.stopImmediatePropagation()}}}},"lightbox"),t.mixin({events:{showitem:function(t){var e,i=this,o=this.getItem();if(e=o.source.match(/(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/)){var s=e[2],r=function(t,e){return i.setItem(o,'<iframe src="//player.vimeo.com/video/'+s+'" width="'+t+'" height="'+e+'" style="max-width:100%;box-sizing:border-box;"></iframe>',t,e)};n({type:"GET",url:"http://vimeo.com/api/oembed.json?url="+encodeURI(o.source),jsonp:"callback",dataType:"jsonp"}).then(function(t){return r(t.width,t.height)}),t.stopImmediatePropagation()}}}},"lightbox")}}function qt(t){if(!qt.installed){var e=t.util,i=e.$,n=e.each,o=e.pointerEnter,s=e.pointerLeave,r=e.Transition,a={};t.component("notification",{functional:!0,args:["message","status"],defaults:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",onClose:null,clsClose:"uk-notification-close"},created:function(){a[this.pos]||(a[this.pos]=i('<div class="uk-notification uk-notification-'+this.pos+'"></div>').appendTo(t.container)),this.$mount(i('<div class="uk-notification-message'+(this.status?" uk-notification-message-"+this.status:"")+'">\n                    <a href="#" class="'+this.clsClose+'" data-uk-close></a>\n                    <div>'+this.message+"</div>\n                </div>").appendTo(a[this.pos].show())[0])},ready:function(){var t=this,e=parseInt(this.$el.css("margin-bottom"),10);r.start(this.$el.css({opacity:0,marginTop:-1*this.$el.outerHeight(),marginBottom:0}),{opacity:1,marginTop:0,marginBottom:e}).then(function(){t.timeout&&(t.timer=setTimeout(t.close,t.timeout),t.$el.on(o,function(){return clearTimeout(t.timer)}).on(s,function(){return t.timer=setTimeout(t.close,t.timeout)}))})},events:{click:function(t){i(t.target).closest('a[href="#"]').length&&t.preventDefault(),this.close()}},methods:{close:function(t){var e=this,i=function(){e.onClose&&e.onClose(),e.$el.trigger("close",[e]).remove(),a[e.pos].children().length||a[e.pos].hide()};this.timer&&clearTimeout(this.timer),t?i():r.start(this.$el,{opacity:0,marginTop:-1*this.$el.outerHeight(),marginBottom:0}).then(i)}}}),t.notification.closeAll=function(e,i){n(t.instances,function(t,n){"notification"!==n.$options.name||e&&e!==n.group||n.close(i)})}}}function Yt(t){function e(i){return t.getComponent(i,"sortable")||i.parentNode&&e(i.parentNode)}function i(){var t=setTimeout(function(){return r.trigger("click")},0),e=function(i){i.preventDefault(),i.stopPropagation(),clearTimeout(t),u(r,"click",e,!0)};c(r,"click",e,!0)}if(!Yt.installed){var n=t.mixin,o=t.util,s=o.$,r=o.docElement,a=o.extend,l=o.getDimensions,h=o.isWithin,c=o.on,u=o.off,d=o.offsetTop,f=o.pointerDown,p=o.pointerMove,g=o.pointerUp,m=o.promise,v=o.win;t.component("sortable",{mixins:[n.class],props:{group:String,animation:Number,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},defaults:{group:!1,animation:150,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},init:function(){var t=this;["init","start","move","end"].forEach(function(e){var i=t[e];t[e]=function(e){e=e.originalEvent||e,t.scrollY=window.scrollY;var n=e.touches&&e.touches[0]||e,o=n.pageX,s=n.pageY;t.pos={x:o,y:s},i(e)}})},events:(w={},w[f]="init",w),update:{write:function(){var t=this;if(this.clsEmpty&&this.$el.toggleClass(this.clsEmpty,!this.$el.children().length),this.drag){this.drag.offset({top:this.pos.y+this.origin.top,left:this.pos.x+this.origin.left});var e=d(this.drag),i=e+this.drag[0].offsetHeight;e>0&&e<this.scrollY?setTimeout(function(){return v.scrollTop(t.scrollY-5)},5):i<r[0].offsetHeight&&i>window.innerHeight+this.scrollY&&setTimeout(function(){return v.scrollTop(t.scrollY+5)},5)}}},methods:{init:function(t){var e=s(t.target),i=this.$el.children().filter(function(e,i){return h(t.target,i)});!i.length||e.is(":input")||this.handle&&!h(e,this.handle)||t.button&&0!==t.button||h(e,"."+this.clsNoDrag)||(t.preventDefault(),t.stopPropagation(),this.touched=[this],this.placeholder=i,this.origin=a({target:e,index:this.placeholder.index()},this.pos),r.on(p,this.move),r.on(g,this.end),v.on("scroll",this.scroll),this.threshold||this.start(t))},start:function(e){this.drag=s(this.placeholder[0].outerHTML.replace(/^<li/i,"<div").replace(/li>$/i,"div>")).attr("uk-no-boot","").addClass(this.clsDrag+" "+this.clsCustom).css({boxSizing:"border-box",width:this.placeholder.outerWidth(),height:this.placeholder.outerHeight()}).css(this.placeholder.css(["paddingLeft","paddingRight","paddingTop","paddingBottom"])).appendTo(t.container),this.drag.children().first().height(this.placeholder.children().height());var i=l(this.placeholder),n=i.left,o=i.top;a(this.origin,{left:n-this.pos.x,top:o-this.pos.y}),this.placeholder.addClass(this.clsPlaceholder),this.$el.children().addClass(this.clsItem),r.addClass(this.clsDragState),this.$el.trigger("start",[this,this.placeholder,this.drag]),this.move(e)},move:function(t){if(!this.drag)return void((Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(t));this.$emit();var i="mousemove"===t.type?t.target:document.elementFromPoint(this.pos.x-document.body.scrollLeft,this.pos.y-document.body.scrollTop),n=e(i),o=e(this.placeholder[0]),r=n!==o;if(n&&!h(i,this.placeholder)&&(!r||n.group&&n.group===o.group)){if(i=n.$el.is(i.parentNode)&&s(i)||n.$el.children().has(i),r)o.remove(this.placeholder);else if(!i.length)return;n.insert(this.placeholder,i),~this.touched.indexOf(n)||this.touched.push(n)}},scroll:function(){var t=window.scrollY;t!==this.scrollY&&(this.pos.y+=t-this.scrollY,this.scrollY=t,this.$emit())},end:function(t){if(r.off(p,this.move),r.off(g,this.end),v.off("scroll",this.scroll),!this.drag)return void("mouseup"!==t.type&&h(t.target,"a[href]")&&(location.href=s(t.target).closest("a[href]").attr("href")));i();var n=e(this.placeholder[0]);this===n?this.origin.index!==this.placeholder.index()&&this.$el.trigger("change",[this,this.placeholder,"moved"]):(n.$el.trigger("change",[n,this.placeholder,"added"]),this.$el.trigger("change",[this,this.placeholder,"removed"])),this.$el.trigger("stop",[this]),this.drag.remove(),this.drag=null,this.touched.forEach(function(t){return t.$el.children().removeClass(t.clsPlaceholder+" "+t.clsItem)}),r.removeClass(this.clsDragState)},insert:function(t,e){var i=this;this.$el.children().addClass(this.clsItem);var n=function(){e.length?!i.$el.has(t).length||t.prevAll().filter(e).length?t.insertBefore(e):t.insertAfter(e):i.$el.append(t)};this.animation?this.animate(n):n()},remove:function(t){this.$el.has(t).length&&(this.animation?this.animate(function(){return t.detach()}):t.detach())},animate:function(t){var e=this,i=[],n=this.$el.children().toArray().map(function(t){return t=s(t),i.push(a({position:"absolute",pointerEvents:"none",width:t.outerWidth(),height:t.outerHeight()},t.position())),t}),o={position:"",width:"",height:"",pointerEvents:"",top:"",left:""};t(),n.forEach(function(t){return t.stop()}),this.$el.children().css(o),this.$updateSync("update",!0),this.$el.css("min-height",this.$el.height());var r=n.map(function(t){return t.position()});m.all(n.map(function(t,n){return t.css(i[n]).animate(r[n],e.animation).promise()})).then(function(){e.$el.css("min-height","").children().css(o),e.$updateSync("update",!0)})}}});var w}}function Rt(t){if(!Rt.installed){var e,i=t.util,n=t.mixin,o=i.$,s=i.doc,r=i.fastdom,a=i.flipPosition,l=i.isTouch,h=i.isWithin,c=i.pointerDown,u=i.pointerEnter,d=i.pointerLeave;t.component("tooltip",{attrs:!0,mixins:[n.togglable,n.position],props:{delay:Number,container:Boolean,title:String},defaults:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active",clsPos:"uk-tooltip",container:!0},computed:{container:function(){return o(!0===this.$props.container&&t.container||this.$props.container||t.container)}},connected:function(){var t=this;r.mutate(function(){return t.$el.removeAttr("title").attr("aria-expanded",!1)})},disconnected:function(){this.hide()},methods:{show:function(){var t=this;e!==this&&(e&&e.hide(),e=this,s.on("click."+this.$options.name,function(e){h(e.target,t.$el)||t.hide()}),clearTimeout(this.showTimer),this.tooltip=o('<div class="'+this.clsPos+'" aria-hidden="true"><div class="'+this.clsPos+'-inner">'+this.title+"</div></div>").appendTo(this.container),this.$el.attr("aria-expanded",!0),this.positionAt(this.tooltip,this.$el),this.origin="y"===this.getAxis()?a(this.dir)+"-"+this.align:this.align+"-"+a(this.dir),this.showTimer=setTimeout(function(){t.toggleElement(t.tooltip,!0),t.hideTimer=setInterval(function(){t.$el.is(":visible")||t.hide()},150)},this.delay))},hide:function(){this.$el.is("input")&&this.$el[0]===document.activeElement||(e=e!==this&&e||!1,clearTimeout(this.showTimer),clearInterval(this.hideTimer),this.$el.attr("aria-expanded",!1),this.toggleElement(this.tooltip,!1),this.tooltip&&this.tooltip.remove(),this.tooltip=!1,s.off("click."+this.$options.name))}},events:(f={blur:"hide"},f["focus "+u+" "+c]=function(t){t.type===c&&l(t)||this.show()},f[d]=function(t){l(t)||this.hide()},f)});var f}}function Ut(t){function e(t,e){return e.match(new RegExp("^"+t.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function i(t,e){for(var i=[],n=0;n<t.length;n+=e){for(var o=[],s=0;s<e;s++)o.push(t[n+s]);i.push(o)}return i}if(!Ut.installed){var n=t.util,o=n.$,s=n.ajax,r=n.on;t.component("upload",{props:{allow:String,clsDragover:String,concurrent:Number,dataType:String,mime:String,msgInvalidMime:String,msgInvalidName:String,multiple:Boolean,name:String,params:Object,type:String,url:String},defaults:{allow:!1,clsDragover:"uk-dragover",concurrent:1,dataType:void 0,mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",multiple:!1,name:"files[]",params:{},type:"POST",url:"",abort:null,beforeAll:null,beforeSend:null,complete:null,completeAll:null,error:null,fail:function(t){alert(t)},load:null,loadEnd:null,loadStart:null,progress:null},events:{change:function(t){o(t.target).is('input[type="file"]')&&(t.preventDefault(),t.target.files&&this.upload(t.target.files),t.target.value="")},drop:function(t){t.preventDefault(),t.stopPropagation();var e=t.originalEvent.dataTransfer;e&&e.files&&(this.$el.removeClass(this.clsDragover),this.upload(e.files))},dragenter:function(t){t.preventDefault(),t.stopPropagation()},dragover:function(t){t.preventDefault(),t.stopPropagation(),this.$el.addClass(this.clsDragover)},dragleave:function(t){t.preventDefault(),t.stopPropagation(),this.$el.removeClass(this.clsDragover)}},methods:{upload:function(t){var n=this;if(t.length){this.$el.trigger("upload",[t]);for(var a=0;a<t.length;a++){if(n.allow&&!e(n.allow,t[a].name))return void n.fail(n.msgInvalidName.replace(/%s/,n.allow));if(n.mime&&!e(n.mime,t[a].type))return void n.fail(n.msgInvalidMime.replace(/%s/,n.mime))}this.multiple||(t=[t[0]]),this.beforeAll&&this.beforeAll(this,t);var l=i(t,this.concurrent),h=function(t){var e=new FormData;t.forEach(function(t){return e.append(n.name,t)});for(var i in n.params)e.append(i,n.params[i]);s({data:e,url:n.url,type:n.type,dataType:n.dataType,beforeSend:n.beforeSend,complete:[n.complete,function(t,e){l.length?h(l.shift()):n.completeAll&&n.completeAll(t),"abort"===e&&n.abort&&n.abort(t)}],cache:!1,contentType:!1,processData:!1,xhr:function(){var t=o.ajaxSettings.xhr();return t.upload&&n.progress&&r(t.upload,"progress",n.progress),["loadStart","load","loadEnd","error","abort"].forEach(function(e){return n[e]&&r(t,e.toLowerCase(),n[e])}),t}})};h(l.shift())}}}})}}var Vt="default"in t?t.default:t,Xt=Vt(window),Gt=Vt(document),Qt=Vt(document.documentElement),Jt="rtl"===Vt("html").attr("dir"),Zt={start:s,stop:function(e,i){var n=t.Event(we||"transitionend");return Vt(e).triggerHandler(n,[i]),n.promise||w.resolve()},cancel:function(t){return this.stop(t,!0)},inProgress:function(t){return Vt(t).hasClass("uk-transition")}},Kt={in:function(t,e,i,n){return r(t,e,i,n,!1)},out:function(t,e,i,n){return r(t,e,i,n,!0)
5
},inProgress:function(t){return Vt(t).hasClass("uk-animation-enter")||Vt(t).hasClass("uk-animation-leave")},cancel:function(e){var i=t.Event(be||"animationend");return Vt(e).triggerHandler(i),i.promise||w.resolve()}},te={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ee={ratio:function(t,e,i){var n="width"===e?"height":"width";return o={},o[n]=Math.round(i*t[n]/t[e]),o[e]=i,o;var o},fit:function(e,i){var n=this;return e=t.extend({},e),t.each(e,function(t){return e=e[t]>i[t]?n.ratio(e,t,i[t]):e}),e},cover:function(e,i){var n=this;return e=this.fit(e,i),t.each(e,function(t){return e=e[t]<i[t]?n.ratio(e,t,i[t]):e}),e}},ie=Object.prototype.hasOwnProperty;w.resolve=function(t){return w(function(e){e(t)})},w.reject=function(t){return w(function(e,i){i(t)})},w.all=function(t){return ce?Promise.all(t):Vt.when.apply(Vt,t)};var ne=/-(\w)/g,oe={"!":"closest","+":"nextAll","-":"prevAll"},se={},re=window.MutationObserver||window.WebKitMutationObserver,ae=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},le="ontouchstart"in window,he=window.PointerEvent,ce="Promise"in window,ue=le||window.DocumentTouch&&document instanceof DocumentTouch||navigator.msPointerEnabled&&navigator.msMaxTouchPoints>0||navigator.pointerEnabled&&navigator.maxTouchPoints>0,de=ue?le?"touchstart":"pointerdown":"mousedown",fe=ue?le?"touchmove":"pointermove":"mousemove",pe=ue?le?"touchend":"pointerup":"mouseup",ge=ue&&he?"pointerenter":"mouseenter",me=ue&&he?"pointerleave":"mouseleave",ve=ue&&le?"touchcancel":"pointercancel",we=L("transition","transition-end"),ye=L("animation","animation-start"),be=L("animation","animation-end"),$e={reads:[],writes:[],measure:function(t){return this.reads.push(t),F(this),t},mutate:function(t){return this.writes.push(t),F(this),t},clear:function(t){return q(this.reads,t)||q(this.writes,t)}};Y.prototype={positions:[],position:null,init:function(){var t=this;this.positions=[],this.position=null;var e=!1;this.handler=function(i){e||setTimeout(function(){var n=Date.now(),o=t.positions.length;o&&n-t.positions[o-1].time>100&&t.positions.splice(0,o),t.positions.push({time:n,x:i.pageX,y:i.pageY}),t.positions.length>5&&t.positions.shift(),e=!1},5),e=!0},Gt.on("mousemove",this.handler)},cancel:function(){this.handler&&Gt.off("mousemove",this.handler)},movesTo:function(t){if(this.positions.length<2)return!1;var e=X(t),i=this.positions[this.positions.length-1],n=this.positions[0];if(e.left<=i.x&&i.x<=e.right&&e.top<=i.y&&i.y<=e.bottom)return!1;var o=[[{x:e.left,y:e.top},{x:e.right,y:e.bottom}],[{x:e.right,y:e.top},{x:e.left,y:e.bottom}]];return e.right<=i.x||(e.left>=i.x?(o[0].reverse(),o[1].reverse()):e.bottom<=i.y?o[0].reverse():e.top>=i.y&&o[1].reverse()),!!o.reduce(function(t,e){return t+(R(n,e[0])<R(i,e[0])&&R(n,e[1])>R(i,e[1]))},0)}};var xe={};xe.args=xe.created=xe.events=xe.init=xe.ready=xe.connected=xe.disconnected=xe.destroy=function(e,i){return e=e&&!t.isArray(e)?[e]:e,i?e?e.concat(i):t.isArray(i)?i:[i]:e},xe.update=function(e,i){return xe.args(e,t.isFunction(i)?{write:i}:i)},xe.props=function(e,i){return t.isArray(i)&&(i=i.reduce(function(t,e){return t[e]=String,t},{})),xe.methods(e,i)},xe.computed=xe.defaults=xe.methods=function(e,i){return i?e?t.extend(!0,{},e,i):i:e};var ke,Ce,Te,_e,Se,Ee=function(t,e){return T(e)?t:e},Ae={x:["width","left","right"],y:["height","top","bottom"]},Oe={};i(function(){var e,i,o,s=0,r=0;"MSGesture"in window&&(_e=new MSGesture,_e.target=document.body),n(document,"click",function(){return Se=!0},!0);var a=function(t){var e=t.velocityX>1?"Right":t.velocityX<-1?"Left":t.velocityY>1?"Down":t.velocityY<-1?"Up":null;e&&void 0!==Oe.el&&(Oe.el.trigger("swipe"),Oe.el.trigger("swipe"+e))};n(document,"MSGestureEnd",a),n(document,"gestureend",a),n(document,de,function(t){o=t.touches?t.touches[0]:t,e=Date.now(),i=e-(Oe.last||e),Oe.el=Vt("tagName"in o.target?o.target:o.target.parentNode),ke&&clearTimeout(ke),Oe.x1=o.pageX,Oe.y1=o.pageY,i>0&&i<=250&&(Oe.isDoubleTap=!0),Oe.last=e,!_e||"pointerdown"!==t.type&&"touchstart"!==t.type||_e.addPointer(t.pointerId),Se=t.button>0}),n(document,fe,function(t){o=t.touches?t.touches[0]:t,Oe.x2=o.pageX,Oe.y2=o.pageY,s+=Math.abs(Oe.x1-Oe.x2),r+=Math.abs(Oe.y1-Oe.y2)}),n(document,pe,function(){Oe.x2&&Math.abs(Oe.x1-Oe.x2)>30||Oe.y2&&Math.abs(Oe.y1-Oe.y2)>30?Te=setTimeout(function(){void 0!==Oe.el&&(Oe.el.trigger("swipe"),Oe.el.trigger("swipe"+et(Oe.x1,Oe.x2,Oe.y1,Oe.y2))),Oe={}},0):"last"in Oe&&(isNaN(s)||s<30&&r<30?Ce=setTimeout(function(){var e=t.Event("tap");e.cancelTouch=it,void 0!==Oe.el&&Oe.el.trigger(e),Oe.isDoubleTap?(void 0!==Oe.el&&Oe.el.trigger("doubleTap"),Oe={}):ke=setTimeout(function(){ke=null,void 0!==Oe.el&&(Oe.el.trigger("singleTap"),Se||Oe.el.trigger("click")),Oe={}},300)}):Oe={},s=r=0)}),n(document,ve,it),n(window,"scroll",it)});var De=!1;n(document,"touchstart",function(){return De=!0},!0),n(document,"click",function(){De=!1}),n(document,"touchcancel",function(){return De=!1},!0);var Ie=Object.freeze({win:Xt,doc:Gt,docElement:Qt,isRtl:Jt,isReady:e,ready:i,on:n,off:o,transition:s,Transition:Zt,animate:r,Animation:Kt,isJQuery:a,isWithin:l,attrFilter:h,removeClass:c,createEvent:u,isInView:d,getIndex:f,isVoidElement:p,Dimensions:ee,query:g,Observer:re,requestAnimationFrame:ae,hasPromise:ce,hasTouch:ue,pointerDown:de,pointerMove:fe,pointerUp:pe,pointerEnter:ge,pointerLeave:me,pointerCancel:ve,transitionend:we,animationstart:ye,animationend:be,getStyle:M,getCssVar:j,fastdom:$e,$:Vt,bind:m,hasOwn:v,promise:w,classify:y,hyphenate:b,camelize:$,isString:k,isNumber:C,isUndefined:T,isContextSelector:_,getContextSelectors:S,toJQuery:E,toNode:A,toBoolean:O,toNumber:D,toList:I,toMedia:N,coerce:B,toMs:P,swap:H,ajax:t.ajax,contains:t.contains,each:t.each,Event:t.Event,extend:t.extend,map:t.map,merge:t.merge,isArray:t.isArray,isNumeric:t.isNumeric,isFunction:t.isFunction,isPlainObject:t.isPlainObject,MouseTracker:Y,mergeOptions:U,position:V,getDimensions:X,offsetTop:G,flipPosition:tt,isTouch:nt}),Ne=function(t){this._init(t)};Ne.util=Ie,Ne.data="__uikit__",Ne.prefix="uk-",Ne.options={},Ne.instances={},Ne.elements=[],function(t){var e=t.data;t.use=function(t){if(!t.installed)return t.call(null,this),t.installed=!0,this},t.mixin=function(e,i){i=(k(i)?t.components[i]:i)||this,e=U({},e),e.mixins=i.options.mixins,delete i.options.mixins,i.options=U(e,i.options)},t.extend=function(t){t=t||{};var e=this,i=t.name||e.options.name,n=ot(i||"UIkitComponent");return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.options=U(e.options,t),n.super=e,n.extend=e.extend,n},t.update=function(i,n,o){if(void 0===o&&(o=!1),i=u(i||"update"),!n)return void rt(t.instances,i);if(n=A(n),o)do{rt(n[e],i),n=n.parentNode}while(n);else st(n,function(t){return rt(t[e],i)})};var i;Object.defineProperty(t,"container",{get:function(){return i||document.body},set:function(t){i=t}})}(Ne),function(t){t.prototype._callHook=function(t){var e=this,i=this.$options[t];i&&i.forEach(function(t){return t.call(e)})},t.prototype._callReady=function(){this._isReady||(this._isReady=!0,this._callHook("ready"),this._callUpdate())},t.prototype._callConnected=function(){var e=this;this._connected||(~t.elements.indexOf(this.$options.el)||t.elements.push(this.$options.el),t.instances[this._uid]=this,this._initEvents(),this._callHook("connected"),this._connected=!0,this._initObserver(),this._isReady||i(function(){return e._callReady()}),this._callUpdate())},t.prototype._callDisconnected=function(){if(this._connected){this._observer&&(this._observer.disconnect(),this._observer=null);var e=t.elements.indexOf(this.$options.el);~e&&t.elements.splice(e,1),delete t.instances[this._uid],this._initEvents(!0),this._callHook("disconnected"),this._connected=!1}},t.prototype._callUpdate=function(t){var e=this;t=u(t||"update"),"update"===t.type&&(this._computeds={});var i=this.$options.update;i&&i.forEach(function(i,n){if("update"===t.type||i.events&&~i.events.indexOf(t.type)){if(t.sync)return i.read&&i.read.call(e,t),void(i.write&&i.write.call(e,t));i.read&&!~$e.reads.indexOf(e._frames.reads[n])&&(e._frames.reads[n]=$e.measure(function(){i.read.call(e,t),delete e._frames.reads[n]})),i.write&&!~$e.writes.indexOf(e._frames.writes[n])&&(e._frames.writes[n]=$e.mutate(function(){i.write.call(e,t),delete e._frames.writes[n]}))}})}}(Ne),function(e){var i=0;e.prototype.props={},e.prototype._init=function(t){t=t||{},t=this.$options=U(this.constructor.options,t,this),this.$el=null,this.$name=e.prefix+b(this.$options.name),this.$props={},this._uid=i++,this._initData(),this._initMethods(),this._initComputeds(),this._callHook("created"),this._frames={reads:{},writes:{}},t.el&&this.$mount(t.el)},e.prototype._initData=function(){var e=this,i=t.extend(!0,{},this.$options.defaults),n=this.$options.data||{},o=this.$options.args||[],s=this.$options.props||{};if(i){o.length&&t.isArray(n)&&(n=n.slice(0,o.length).reduce(function(e,i,n){return t.isPlainObject(i)?t.extend(e,i):e[o[n]]=i,e},{}));for(var r in i)e.$props[r]=e[r]=v(n,r)?B(s[r],n[r],e.$options.el):i[r]}},e.prototype._initMethods=function(){var t=this,e=this.$options.methods;if(e)for(var i in e)t[i]=m(e[i],t)},e.prototype._initComputeds=function(){var t=this,e=this.$options.computed;if(this._computeds={},e)for(var i in e)at(t,i,e[i])},e.prototype._initProps=function(e){var i=this;this._computeds={},t.extend(this.$props,e||this._getProps());var n=[this.$options.computed,this.$options.methods];for(var o in i.$props)ct(n,o)&&(i[o]=i.$props[o])},e.prototype._initEvents=function(t){var e=this,i=this.$options.events;i&&i.forEach(function(i){if(v(i,"handler"))lt(e,t,i);else for(var n in i)lt(e,t,i[n],n)})},e.prototype._initObserver=function(){var e=this;if(!this._observer&&this.$options.props&&this.$options.attrs&&re){var i=t.isArray(this.$options.attrs)?this.$options.attrs:Object.keys(this.$options.props).map(function(t){return b(t)});this._observer=new re(function(){var t=e._getProps();i.some(function(i){return!ut(t[i],e.$props[i])})&&e.$reset(t)}),this._observer.observe(this.$options.el,{attributes:!0,attributeFilter:i.concat([this.$name,"data-"+this.$name])})}},e.prototype._getProps=function(){var t,e,i={},n=this.$el[0],o=this.$options.args||[],s=this.$options.props||{},r=n.getAttribute(this.$name)||n.getAttribute("data-"+this.$name);if(!s)return i;for(t in s)if(e=b(t),n.hasAttribute(e)){var a=B(s[t],n.getAttribute(e),n);if("target"===e&&(!a||0===a.lastIndexOf("_",0)))continue;i[t]=a}if(!r)return i;if("{"===r[0])try{r=JSON.parse(r)}catch(t){console.warn("Invalid JSON."),r={}}else if(o.length&&!~r.indexOf(":")){l={},l[o[0]]=r,r=l;var l}else{var h={};r.split(";").forEach(function(t){var e=t.split(/:(.+)/),i=e[0],n=e[1];i&&n&&(h[i.trim()]=n.trim())}),r=h}for(t in r||{})e=$(t),void 0!==s[e]&&(i[e]=B(s[e],r[t],n));return i}}(Ne),function(t){var e=t.data;t.prototype.$mount=function(t){var i=this.$options.name;if(t[e]||(t[e]={}),t[e][i])return void console.warn('Component "'+i+'" is already mounted on element: ',t);t[e][i]=this,this.$el=Vt(t),this._initProps(),this._callHook("init"),document.documentElement.contains(t)&&this._callConnected()},t.prototype.$emit=function(t){this._callUpdate(t)},t.prototype.$emitSync=function(t){this._callUpdate(u(t||"update",!0,!1,{sync:!0}))},t.prototype.$update=function(e,i){t.update(e,this.$el,i)},t.prototype.$updateSync=function(t,e){this.$update(u(t||"update",!0,!1,{sync:!0}),e)},t.prototype.$reset=function(t){this._callDisconnected(),this._initProps(t),this._callConnected()},t.prototype.$destroy=function(t){void 0===t&&(t=!1);var i=this.$options.el;i&&this._callDisconnected(),this._callHook("destroy"),i&&i[e]&&(delete i[e][this.$options.name],Object.keys(i[e]).length||delete i[e],t&&this.$el.remove())}}(Ne),function(e){var i=e.data;e.components={},e.component=function(i,n){var o=$(i);return t.isPlainObject(n)?(n.name=o,n=e.extend(n)):n.options.name=o,e.components[o]=n,e[o]=function(i,n){for(var s=arguments.length,r=Array(s);s--;)r[s]=arguments[s];return t.isPlainObject(i)?new e.components[o]({data:i}):e.components[o].options.functional?new e.components[o]({data:[].concat(r)}):Vt(i).toArray().map(function(t){return e.getComponent(t,o)||new e.components[o]({el:t,data:n||{}})})[0]},e._initialized&&!n.options.functional&&$e.measure(function(){return e[o]("[uk-"+i+"],[data-uk-"+i+"]")}),e.components[o]},e.getComponents=function(t){return t&&(t=a(t)?t[0]:t)&&t[i]||{}},e.getComponent=function(t,i){return e.getComponents(t)[i]},e.connect=function(t){var n;if(t[i])for(n in t[i])t[i][n]._callConnected();for(var o=0;o<t.attributes.length;o++)n=t.attributes[o].name,0!==n.lastIndexOf("uk-",0)&&0!==n.lastIndexOf("data-uk-",0)||(n=$(n.replace("data-uk-","").replace("uk-","")),e[n]&&e[n](t))},e.disconnect=function(t){for(var e in t[i])t[i][e]._callDisconnected()}}(Ne);var Be,Pe,He={init:function(){this.$el.addClass(this.$name)}},Me={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String,queued:Boolean},defaults:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",queued:!1,initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation:function(){return!!this.animation[0]},hasTransition:function(){return this.hasAnimation&&!0===this.animation[0]}},methods:{toggleElement:function(t,e,i){var n,o=this,s=document.body,r=s.scrollTop,a=function(t){return w.all(t.toArray().map(function(t){return o._toggleElement(t,e,i)})).then(null,function(){})},l=function(t){var e=a(t);return o._queued=null,s.scrollTop=r,e};return t=Vt(t),!this.hasAnimation||!this.queued||t.length<2?a(t):this._queued?l(t.not(this._queued)):(this._queued=t.not(n=t.filter(function(t,e){return o.isToggled(e)})),a(n).then(function(){return o._queued&&l(o._queued)}))},toggleNow:function(t,e){var i=this;return w.all(Vt(t).toArray().map(function(t){return i._toggleElement(t,e,!1)})).then(null,function(){})},isToggled:function(t){return t=t&&Vt(t)||this.$el,this.cls?t.hasClass(this.cls.split(" ")[0]):!t.attr("hidden")},updateAria:function(t){!1===this.cls&&t.attr("aria-hidden",!this.isToggled(t))},_toggleElement:function(e,i,n){var o=this;if(e=Vt(e),Kt.inProgress(e))return Kt.cancel(e).then(function(){return o._toggleElement(e,i,n)});i="boolean"==typeof i?i:!this.isToggled(e);var s=t.Event("before"+(i?"show":"hide"));if(e.trigger(s,[this]),!1===s.result)return w.reject();var r=(!1!==n&&this.hasAnimation?this.hasTransition?this._toggleHeight:this._toggleAnimation:this._toggleImmediate)(e,i);return e.trigger(i?"show":"hide",[this]),r.then(function(){return e.trigger(i?"shown":"hidden",[o])})},_toggle:function(t,e){t=Vt(t),this.cls?t.toggleClass(this.cls,~this.cls.indexOf(" ")?void 0:e):t.attr("hidden",!e),t.find("[autofocus]:visible").focus(),this.updateAria(t),Ne.update(null,t)},_toggleImmediate:function(t,e){return this._toggle(t,e),w.resolve()},_toggleHeight:function(e,i){var n,o=this,s=Zt.inProgress(e),r=parseFloat(e.children().first().css("margin-top"))+parseFloat(e.children().last().css("margin-bottom")),a=e[0].offsetHeight?e.height()+(s?0:r):0;return Zt.cancel(e).then(function(){return o.isToggled(e)||o._toggle(e,!0),e.height(""),w(function(l){return ae(function(){n=e.height()+(s?0:r),e.height(a),(i?Zt.start(e,t.extend(o.initProps,{overflow:"hidden",height:n}),Math.round(o.duration*(1-a/n)),o.transition):Zt.start(e,o.hideProps,Math.round(o.duration*(a/n)),o.transition).then(function(){o._toggle(e,!1),e.css(o.initProps)})).then(l)})})})},_toggleAnimation:function(t,e){var i=this;return e?(this._toggle(t,!0),Kt.in(t,this.animation[0],this.duration,this.origin)):Kt.out(t,this.animation[1]||this.animation[0],this.duration,this.origin).then(function(){return i._toggle(t,!1)})}}},je={mixins:[He,Me],props:{clsPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,container:Boolean},defaults:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,container:!0},computed:{body:function(){return Vt(document.body)},panel:function(){return this.$el.find("."+this.clsPanel)},container:function(){var t=!0===this.$props.container&&Ne.container||this.$props.container&&E(this.$props.container);return t&&A(t)},transitionElement:function(){return this.panel},transitionDuration:function(){return P(this.transitionElement.css("transition-duration"))}},events:[{name:"click",delegate:function(){return this.selClose},handler:function(t){t.preventDefault(),this.hide()}},{name:"toggle",handler:function(t){t.preventDefault(),this.toggle()}},{name:"beforeshow",self:!0,handler:function(){var t=this;if(this.isToggled())return!1;var e=Be&&Be!==this&&Be;if(Be=this,e){if(!this.stack)return e.hide().then(this.show),!1;this.prev=e}else ae(function(){return dt(t.$options.name)});e||(this.scrollbarWidth=window.innerWidth-Qt[0].offsetWidth,this.body.css("overflow-y",this.scrollbarWidth&&this.overlay?"scroll":"")),Qt.addClass(this.clsPage)}},{name:"beforehide",self:!0,handler:function(){if(!this.isToggled())return!1;(Be=Be&&Be!==this&&Be||this.prev)||ft(this.$options.name)}},{name:"hidden",self:!0,handler:function(){Be||(Qt.removeClass(this.clsPage),this.body.css("overflow-y",""))}}],methods:{toggle:function(){return this.isToggled()?this.hide():this.show()},show:function(){var t=this;return this.container&&!this.$el.parent().is(this.container)?(this.container.appendChild(this.$el[0]),w(function(e){return ae(function(){return e(t.show())})})):this.toggleNow(this.$el,!0)},hide:function(){return this.toggleNow(this.$el,!1)},getActive:function(){return Be},_toggleImmediate:function(t,e){var i=this;return this._toggle(t,e),this.transitionDuration?w(function(t,e){i._transition&&(i.transitionElement.off(we,i._transition.handler),i._transition.reject()),i._transition={reject:e,handler:function(){t(),i._transition=null}},i.transitionElement.one(we,i._transition.handler)}):w.resolve()}}},Le={props:{pos:String,offset:null,flip:Boolean,clsPos:String},defaults:{pos:Jt?"bottom-right":"bottom-left",flip:!0,offset:!1,clsPos:""},computed:{pos:function(){return(this.$props.pos+(~this.$props.pos.indexOf("-")?"":"-center")).split("-")},dir:function(){return this.pos[0]},align:function(){return this.pos[1]}},methods:{positionAt:function(t,e,i){c(t,this.clsPos+"-(top|bottom|left|right)(-[a-z]+)?").css({top:"",left:""});var n=D(this.offset)||0,o=this.getAxis(),s=V(t,e,"x"===o?tt(this.dir)+" "+this.align:this.align+" "+tt(this.dir),"x"===o?this.dir+" "+this.align:this.align+" "+this.dir,"x"===o?""+("left"===this.dir?-1*n:n):" "+("top"===this.dir?-1*n:n),null,this.flip,i);this.dir="x"===o?s.target.x:s.target.y,this.align="x"===o?s.target.y:s.target.x,t.toggleClass(this.clsPos+"-"+this.dir+"-"+this.align,!1===this.offset)},getAxis:function(){return"top"===this.dir||"bottom"===this.dir?"y":"x"}}},Fe='<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg>',We='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><line fill="none" stroke="#000" stroke-width="1.4" x1="1" y1="1" x2="19" y2="19"></line><line fill="none" stroke="#000" stroke-width="1.4" x1="19" y1="1" x2="1" y2="19"></line></svg>',ze='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect y="9" width="20" height="2"></rect><rect y="3" width="20" height="2"></rect><rect y="15" width="20" height="2"></rect></svg>',qe='<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><rect x="19" y="0" width="1" height="40"></rect><rect x="0" y="19" width="40" height="1"></rect></svg>',Ye='<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 1 6 6 1 11"></polyline></svg>',Re='<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.2" points="6 1 1 6 6 11"></polyline></svg>',Ue='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>',Ve='<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" stroke-width="1.8" cx="17.5" cy="17.5" r="16.5"></circle><line fill="none" stroke="#000" stroke-width="1.8" x1="38" y1="39" x2="29" y2="30"></line></svg>',Xe='<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" stroke-width="1.1" cx="10.5" cy="10.5" r="9.5"/><line fill="none" stroke="#000" stroke-width="1.1" x1="23" y1="23" x2="17" y2="17"/></svg>',Ge='<svg width="11" height="20" viewBox="0 0 11 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 1 10 10 1 19"></polyline></svg>',Qe='<svg width="18" height="34" viewBox="0 0 18 34" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.4" points="1 1 17 17 1 33"></polyline></svg>',Je='<svg width="11" height="20" viewBox="0 0 11 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.2" points="10 1 1 10 10 19"></polyline></svg>',Ze='<svg width="18" height="34" viewBox="0 0 18 34" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.4" points="17 1 1 17 17 33"></polyline></svg>',Ke='<svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" cx="15" cy="15" r="14"></circle></svg>',ti='<svg width="18" height="10" viewBox="0 0 18 10" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 9 9 1 17 9 "></polyline></svg>',ei={},ii=new DOMParser;return Ne.version="3.0.0-beta.22",function(t){t.mixin.class=He,t.mixin.modal=je,t.mixin.position=Le,t.mixin.togglable=Me}(Ne),function(t){var e,i,o,s=null,r=0;Xt.on("load",t.update).on("resize",function(e){o||(ae(function(){t.update(e),o=!1}),o=!0)}).on("scroll",function(n){null===s&&(s=0),s!==window.pageYOffset&&(e=s<window.pageYOffset,s=window.pageYOffset,i||(ae(function(){n.dir=e?"down":"up",t.update(n),i=!1}),i=!0))}),n(document,ye,function(t){var e=t.target;(M(e,"animationName")||"").match(/^uk-.*(left|right)/)&&(r++,document.body.style.overflowX="hidden",setTimeout(function(){--r||(document.body.style.overflowX="")},P(M(e,"animationDuration"))+100))},!0),t.use(Lt),t.use(pt),t.use(gt),t.use(mt),t.use(vt),t.use(wt),t.use(yt),t.use(xt),t.use(kt),t.use(Ct),t.use(_t),t.use(bt),t.use($t),t.use(Ft),t.use(St),t.use(Et),t.use(At),t.use(Ot),t.use(Dt),t.use(It),t.use(Nt),t.use(Bt),t.use(Pt),t.use(Ht),t.use(Tt),t.use(Mt),t.use(jt)}(Ne),Ne.use(Wt),Ne.use(zt),Ne.use(qt),Ne.use(Yt),Ne.use(Rt),Ne.use(Ut),function(t){function e(){o(document.body,t.connect),new re(function(e){return e.forEach(function(e){for(var i=e.addedNodes,n=e.removedNodes,s=e.target,r=0;r<i.length;r++)o(i[r],t.connect);for(r=0;r<n.length;r++)o(n[r],t.disconnect);t.update("update",s,!0)})}).observe(document.documentElement,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["href"]}),t._initialized=!0}function o(t,e){if(t.nodeType===Node.ELEMENT_NODE&&!t.hasAttribute("uk-no-boot"))for(e(t),t=t.firstChild;t;){var i=t.nextSibling;o(t,e),t=i}}re?document.body?e():new re(function(){document.body&&(this.disconnect(),e())}).observe(document.documentElement,{childList:!0,subtree:!0}):i(function(){o(document.body,t.connect),n(document.documentElement,"DOMNodeInserted",function(e){return o(e.target,t.connect)}),n(document.documentElement,"DOMNodeRemoved",function(e){return o(e.target,t.disconnect)})})}(Ne),Ne});
3
(function (global, factory) {
4
    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
5
    typeof define === 'function' && define.amd ? define('uikit', factory) :
6
    (global = global || self, global.UIkit = factory());
7
}(this, function () { 'use strict';
8

  
9
    var objPrototype = Object.prototype;
10
    var hasOwnProperty = objPrototype.hasOwnProperty;
11

  
12
    function hasOwn(obj, key) {
13
        return hasOwnProperty.call(obj, key);
14
    }
15

  
16
    var hyphenateCache = {};
17
    var hyphenateRe = /([a-z\d])([A-Z])/g;
18

  
19
    function hyphenate(str) {
20

  
21
        if (!(str in hyphenateCache)) {
22
            hyphenateCache[str] = str
23
                .replace(hyphenateRe, '$1-$2')
24
                .toLowerCase();
25
        }
26

  
27
        return hyphenateCache[str];
28
    }
29

  
30
    var camelizeRe = /-(\w)/g;
31

  
32
    function camelize(str) {
33
        return str.replace(camelizeRe, toUpper);
34
    }
35

  
36
    function toUpper(_, c) {
37
        return c ? c.toUpperCase() : '';
38
    }
39

  
40
    function ucfirst(str) {
41
        return str.length ? toUpper(null, str.charAt(0)) + str.slice(1) : '';
42
    }
43

  
44
    var strPrototype = String.prototype;
45
    var startsWithFn = strPrototype.startsWith || function (search) { return this.lastIndexOf(search, 0) === 0; };
46

  
47
    function startsWith(str, search) {
48
        return startsWithFn.call(str, search);
49
    }
50

  
51
    var endsWithFn = strPrototype.endsWith || function (search) { return this.substr(-search.length) === search; };
52

  
53
    function endsWith(str, search) {
54
        return endsWithFn.call(str, search);
55
    }
56

  
57
    var arrPrototype = Array.prototype;
58

  
59
    var includesFn = function (search, i) { return ~this.indexOf(search, i); };
60
    var includesStr = strPrototype.includes || includesFn;
61
    var includesArray = arrPrototype.includes || includesFn;
62

  
63
    function includes(obj, search) {
64
        return obj && (isString(obj) ? includesStr : includesArray).call(obj, search);
65
    }
66

  
67
    var findIndexFn = arrPrototype.findIndex || function (predicate) {
68
        var arguments$1 = arguments;
69

  
70
        for (var i = 0; i < this.length; i++) {
71
            if (predicate.call(arguments$1[1], this[i], i, this)) {
72
                return i;
73
            }
74
        }
75
        return -1;
76
    };
77

  
78
    function findIndex(array, predicate) {
79
        return findIndexFn.call(array, predicate);
80
    }
81

  
82
    var isArray = Array.isArray;
83

  
84
    function isFunction(obj) {
85
        return typeof obj === 'function';
86
    }
87

  
88
    function isObject(obj) {
89
        return obj !== null && typeof obj === 'object';
90
    }
91

  
92
    var toString = objPrototype.toString;
93
    function isPlainObject(obj) {
94
        return toString.call(obj) === '[object Object]';
95
    }
96

  
97
    function isWindow(obj) {
98
        return isObject(obj) && obj === obj.window;
99
    }
100

  
101
    function isDocument(obj) {
102
        return isObject(obj) && obj.nodeType === 9;
103
    }
104

  
105
    function isJQuery(obj) {
106
        return isObject(obj) && !!obj.jquery;
107
    }
108

  
109
    function isNode(obj) {
110
        return obj instanceof Node || isObject(obj) && obj.nodeType >= 1;
111
    }
112

  
113
    function isNodeCollection(obj) {
114
        return toString.call(obj).match(/^\[object (NodeList|HTMLCollection)\]$/);
115
    }
116

  
117
    function isBoolean(value) {
118
        return typeof value === 'boolean';
119
    }
120

  
121
    function isString(value) {
122
        return typeof value === 'string';
123
    }
124

  
125
    function isNumber(value) {
126
        return typeof value === 'number';
127
    }
128

  
129
    function isNumeric(value) {
130
        return isNumber(value) || isString(value) && !isNaN(value - parseFloat(value));
131
    }
132

  
133
    function isEmpty(obj) {
134
        return !(isArray(obj)
135
            ? obj.length
136
            : isObject(obj)
137
                ? Object.keys(obj).length
138
                : false
139
        );
140
    }
141

  
142
    function isUndefined(value) {
143
        return value === void 0;
144
    }
145

  
146
    function toBoolean(value) {
147
        return isBoolean(value)
148
            ? value
149
            : value === 'true' || value === '1' || value === ''
150
                ? true
151
                : value === 'false' || value === '0'
152
                    ? false
153
                    : value;
154
    }
155

  
156
    function toNumber(value) {
157
        var number = Number(value);
158
        return !isNaN(number) ? number : false;
159
    }
160

  
161
    function toFloat(value) {
162
        return parseFloat(value) || 0;
163
    }
164

  
165
    function toNode(element) {
166
        return isNode(element) || isWindow(element) || isDocument(element)
167
            ? element
168
            : isNodeCollection(element) || isJQuery(element)
169
                ? element[0]
170
                : isArray(element)
171
                    ? toNode(element[0])
172
                    : null;
173
    }
174

  
175
    function toNodes(element) {
176
        return isNode(element)
177
            ? [element]
178
            : isNodeCollection(element)
179
                ? arrPrototype.slice.call(element)
180
                : isArray(element)
181
                    ? element.map(toNode).filter(Boolean)
182
                    : isJQuery(element)
183
                        ? element.toArray()
184
                        : [];
185
    }
186

  
187
    function toList(value) {
188
        return isArray(value)
189
            ? value
190
            : isString(value)
191
                ? value.split(/,(?![^(]*\))/).map(function (value) { return isNumeric(value)
192
                    ? toNumber(value)
193
                    : toBoolean(value.trim()); })
194
                : [value];
195
    }
196

  
197
    function toMs(time) {
198
        return !time
199
            ? 0
200
            : endsWith(time, 'ms')
201
                ? toFloat(time)
202
                : toFloat(time) * 1000;
203
    }
204

  
205
    function isEqual(value, other) {
206
        return value === other
207
            || isObject(value)
208
            && isObject(other)
209
            && Object.keys(value).length === Object.keys(other).length
210
            && each(value, function (val, key) { return val === other[key]; });
211
    }
212

  
213
    function swap(value, a, b) {
214
        return value.replace(new RegExp((a + "|" + b), 'mg'), function (match) {
215
            return match === a ? b : a;
216
        });
217
    }
218

  
219
    var assign = Object.assign || function (target) {
220
        var args = [], len = arguments.length - 1;
221
        while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
222

  
223
        target = Object(target);
224
        for (var i = 0; i < args.length; i++) {
225
            var source = args[i];
226
            if (source !== null) {
227
                for (var key in source) {
228
                    if (hasOwn(source, key)) {
229
                        target[key] = source[key];
230
                    }
231
                }
232
            }
233
        }
234
        return target;
235
    };
236

  
237
    function last(array) {
238
        return array[array.length - 1];
239
    }
240

  
241
    function each(obj, cb) {
242
        for (var key in obj) {
243
            if (false === cb(obj[key], key)) {
244
                return false;
245
            }
246
        }
247
        return true;
248
    }
249

  
250
    function sortBy(array, prop) {
251
        return array.sort(function (ref, ref$1) {
252
                var propA = ref[prop]; if ( propA === void 0 ) propA = 0;
253
                var propB = ref$1[prop]; if ( propB === void 0 ) propB = 0;
254

  
255
                return propA > propB
256
                ? 1
257
                : propB > propA
258
                    ? -1
259
                    : 0;
260
        }
261
        );
262
    }
263

  
264
    function uniqueBy(array, prop) {
265
        var seen = new Set();
266
        return array.filter(function (ref) {
267
            var check = ref[prop];
268

  
269
            return seen.has(check)
270
            ? false
271
            : seen.add(check) || true;
272
        } // IE 11 does not return the Set object
273
        );
274
    }
275

  
276
    function clamp(number, min, max) {
277
        if ( min === void 0 ) min = 0;
278
        if ( max === void 0 ) max = 1;
279

  
280
        return Math.min(Math.max(toNumber(number) || 0, min), max);
281
    }
282

  
283
    function noop() {}
284

  
285
    function intersectRect(r1, r2) {
286
        return r1.left < r2.right &&
287
            r1.right > r2.left &&
288
            r1.top < r2.bottom &&
289
            r1.bottom > r2.top;
290
    }
291

  
292
    function pointInRect(point, rect) {
293
        return point.x <= rect.right &&
294
            point.x >= rect.left &&
295
            point.y <= rect.bottom &&
296
            point.y >= rect.top;
297
    }
298

  
299
    var Dimensions = {
300

  
301
        ratio: function(dimensions, prop, value) {
302
            var obj;
303

  
304

  
305
            var aProp = prop === 'width' ? 'height' : 'width';
306

  
307
            return ( obj = {}, obj[aProp] = dimensions[prop] ? Math.round(value * dimensions[aProp] / dimensions[prop]) : dimensions[aProp], obj[prop] = value, obj );
308
        },
309

  
310
        contain: function(dimensions, maxDimensions) {
311
            var this$1 = this;
312

  
313
            dimensions = assign({}, dimensions);
314

  
315
            each(dimensions, function (_, prop) { return dimensions = dimensions[prop] > maxDimensions[prop]
316
                ? this$1.ratio(dimensions, prop, maxDimensions[prop])
317
                : dimensions; }
318
            );
319

  
320
            return dimensions;
321
        },
322

  
323
        cover: function(dimensions, maxDimensions) {
324
            var this$1 = this;
325

  
326
            dimensions = this.contain(dimensions, maxDimensions);
327

  
328
            each(dimensions, function (_, prop) { return dimensions = dimensions[prop] < maxDimensions[prop]
329
                ? this$1.ratio(dimensions, prop, maxDimensions[prop])
330
                : dimensions; }
331
            );
332

  
333
            return dimensions;
334
        }
335

  
336
    };
337

  
338
    function attr(element, name, value) {
339

  
340
        if (isObject(name)) {
341
            for (var key in name) {
342
                attr(element, key, name[key]);
343
            }
344
            return;
345
        }
346

  
347
        if (isUndefined(value)) {
348
            element = toNode(element);
349
            return element && element.getAttribute(name);
350
        } else {
351
            toNodes(element).forEach(function (element) {
352

  
353
                if (isFunction(value)) {
354
                    value = value.call(element, attr(element, name));
355
                }
356

  
357
                if (value === null) {
358
                    removeAttr(element, name);
359
                } else {
360
                    element.setAttribute(name, value);
361
                }
362
            });
363
        }
364

  
365
    }
366

  
367
    function hasAttr(element, name) {
368
        return toNodes(element).some(function (element) { return element.hasAttribute(name); });
369
    }
370

  
371
    function removeAttr(element, name) {
372
        element = toNodes(element);
373
        name.split(' ').forEach(function (name) { return element.forEach(function (element) { return element.hasAttribute(name) && element.removeAttribute(name); }
374
            ); }
375
        );
376
    }
377

  
378
    function data(element, attribute) {
379
        for (var i = 0, attrs = [attribute, ("data-" + attribute)]; i < attrs.length; i++) {
380
            if (hasAttr(element, attrs[i])) {
381
                return attr(element, attrs[i]);
382
            }
383
        }
384
    }
385

  
386
    /* global DocumentTouch */
387

  
388
    var isIE = /msie|trident/i.test(window.navigator.userAgent);
389
    var isRtl = attr(document.documentElement, 'dir') === 'rtl';
390

  
391
    var hasTouchEvents = 'ontouchstart' in window;
392
    var hasPointerEvents = window.PointerEvent;
393
    var hasTouch = hasTouchEvents
394
        || window.DocumentTouch && document instanceof DocumentTouch
395
        || navigator.maxTouchPoints; // IE >=11
396

  
397
    var pointerDown = hasPointerEvents ? 'pointerdown' : hasTouchEvents ? 'touchstart' : 'mousedown';
398
    var pointerMove = hasPointerEvents ? 'pointermove' : hasTouchEvents ? 'touchmove' : 'mousemove';
399
    var pointerUp = hasPointerEvents ? 'pointerup' : hasTouchEvents ? 'touchend' : 'mouseup';
400
    var pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouchEvents ? '' : 'mouseenter';
401
    var pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouchEvents ? '' : 'mouseleave';
402
    var pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
403

  
404
    function query(selector, context) {
405
        return toNode(selector) || find(selector, getContext(selector, context));
406
    }
407

  
408
    function queryAll(selector, context) {
409
        var nodes = toNodes(selector);
410
        return nodes.length && nodes || findAll(selector, getContext(selector, context));
411
    }
412

  
413
    function getContext(selector, context) {
414
        if ( context === void 0 ) context = document;
415

  
416
        return isContextSelector(selector) || isDocument(context)
417
            ? context
418
            : context.ownerDocument;
419
    }
420

  
421
    function find(selector, context) {
422
        return toNode(_query(selector, context, 'querySelector'));
423
    }
424

  
425
    function findAll(selector, context) {
426
        return toNodes(_query(selector, context, 'querySelectorAll'));
427
    }
428

  
429
    function _query(selector, context, queryFn) {
430
        if ( context === void 0 ) context = document;
431

  
432

  
433
        if (!selector || !isString(selector)) {
434
            return null;
435
        }
436

  
437
        selector = selector.replace(contextSanitizeRe, '$1 *');
438

  
439
        var removes;
440

  
441
        if (isContextSelector(selector)) {
442

  
443
            removes = [];
444

  
445
            selector = splitSelector(selector).map(function (selector, i) {
446

  
447
                var ctx = context;
448

  
449
                if (selector[0] === '!') {
450

  
451
                    var selectors = selector.substr(1).trim().split(' ');
452
                    ctx = closest(context.parentNode, selectors[0]);
453
                    selector = selectors.slice(1).join(' ').trim();
454

  
455
                }
456

  
457
                if (selector[0] === '-') {
458

  
459
                    var selectors$1 = selector.substr(1).trim().split(' ');
460
                    var prev = (ctx || context).previousElementSibling;
461
                    ctx = matches(prev, selector.substr(1)) ? prev : null;
462
                    selector = selectors$1.slice(1).join(' ');
463

  
464
                }
465

  
466
                if (!ctx) {
467
                    return null;
468
                }
469

  
470
                if (!ctx.id) {
471
                    ctx.id = "uk-" + (Date.now()) + i;
472
                    removes.push(function () { return removeAttr(ctx, 'id'); });
473
                }
474

  
475
                return ("#" + (escape(ctx.id)) + " " + selector);
476

  
477
            }).filter(Boolean).join(',');
478

  
479
            context = document;
480

  
481
        }
482

  
483
        try {
484

  
485
            return context[queryFn](selector);
486

  
487
        } catch (e) {
488

  
489
            return null;
490

  
491
        } finally {
492

  
493
            removes && removes.forEach(function (remove) { return remove(); });
494

  
495
        }
496

  
497
    }
498

  
499
    var contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
500
    var contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
501

  
502
    function isContextSelector(selector) {
503
        return isString(selector) && selector.match(contextSelectorRe);
504
    }
505

  
506
    var selectorRe = /.*?[^\\](?:,|$)/g;
507

  
508
    function splitSelector(selector) {
509
        return selector.match(selectorRe).map(function (selector) { return selector.replace(/,$/, '').trim(); });
510
    }
511

  
512
    var elProto = Element.prototype;
513
    var matchesFn = elProto.matches || elProto.webkitMatchesSelector || elProto.msMatchesSelector;
514

  
515
    function matches(element, selector) {
516
        return toNodes(element).some(function (element) { return matchesFn.call(element, selector); });
517
    }
518

  
519
    var closestFn = elProto.closest || function (selector) {
520
        var ancestor = this;
521

  
522
        do {
523

  
524
            if (matches(ancestor, selector)) {
525
                return ancestor;
526
            }
527

  
528
            ancestor = ancestor.parentNode;
529

  
530
        } while (ancestor && ancestor.nodeType === 1);
531
    };
532

  
533
    function closest(element, selector) {
534

  
535
        if (startsWith(selector, '>')) {
536
            selector = selector.slice(1);
537
        }
538

  
539
        return isNode(element)
540
            ? closestFn.call(element, selector)
541
            : toNodes(element).map(function (element) { return closest(element, selector); }).filter(Boolean);
542
    }
543

  
544
    function parents(element, selector) {
545
        var elements = [];
546
        element = toNode(element);
547

  
548
        while ((element = element.parentNode) && element.nodeType === 1) {
549
            if (matches(element, selector)) {
550
                elements.push(element);
551
            }
552
        }
553

  
554
        return elements;
555
    }
556

  
557
    var escapeFn = window.CSS && CSS.escape || function (css) { return css.replace(/([^\x7f-\uFFFF\w-])/g, function (match) { return ("\\" + match); }); };
558
    function escape(css) {
559
        return isString(css) ? escapeFn.call(null, css) : '';
560
    }
561

  
562
    var voidElements = {
563
        area: true,
564
        base: true,
565
        br: true,
566
        col: true,
567
        embed: true,
568
        hr: true,
569
        img: true,
570
        input: true,
571
        keygen: true,
572
        link: true,
573
        menuitem: true,
574
        meta: true,
575
        param: true,
576
        source: true,
577
        track: true,
578
        wbr: true
579
    };
580
    function isVoidElement(element) {
581
        return toNodes(element).some(function (element) { return voidElements[element.tagName.toLowerCase()]; });
582
    }
583

  
584
    function isVisible(element) {
585
        return toNodes(element).some(function (element) { return element.offsetWidth || element.offsetHeight || element.getClientRects().length; });
586
    }
587

  
588
    var selInput = 'input,select,textarea,button';
589
    function isInput(element) {
590
        return toNodes(element).some(function (element) { return matches(element, selInput); });
591
    }
592

  
593
    function filter(element, selector) {
594
        return toNodes(element).filter(function (element) { return matches(element, selector); });
595
    }
596

  
597
    function within(element, selector) {
598
        return !isString(selector)
599
            ? element === selector || (isDocument(selector)
600
                ? selector.documentElement
601
                : toNode(selector)).contains(toNode(element)) // IE 11 document does not implement contains
602
            : matches(element, selector) || closest(element, selector);
603
    }
604

  
605
    function on() {
606
        var args = [], len = arguments.length;
607
        while ( len-- ) args[ len ] = arguments[ len ];
608

  
609

  
610
        var ref = getArgs(args);
611
        var targets = ref[0];
612
        var type = ref[1];
613
        var selector = ref[2];
614
        var listener = ref[3];
615
        var useCapture = ref[4];
616

  
617
        targets = toEventTargets(targets);
618

  
619
        if (listener.length > 1) {
620
            listener = detail(listener);
621
        }
622

  
623
        if (useCapture && useCapture.self) {
624
            listener = selfFilter(listener);
625
        }
626

  
627
        if (selector) {
628
            listener = delegate(targets, selector, listener);
629
        }
630

  
631
        useCapture = useCaptureFilter(useCapture);
632

  
633
        type.split(' ').forEach(function (type) { return targets.forEach(function (target) { return target.addEventListener(type, listener, useCapture); }
634
            ); }
635
        );
636
        return function () { return off(targets, type, listener, useCapture); };
637
    }
638

  
639
    function off(targets, type, listener, useCapture) {
640
        if ( useCapture === void 0 ) useCapture = false;
641

  
642
        useCapture = useCaptureFilter(useCapture);
643
        targets = toEventTargets(targets);
644
        type.split(' ').forEach(function (type) { return targets.forEach(function (target) { return target.removeEventListener(type, listener, useCapture); }
645
            ); }
646
        );
647
    }
648

  
649
    function once() {
650
        var args = [], len = arguments.length;
651
        while ( len-- ) args[ len ] = arguments[ len ];
652

  
653

  
654
        var ref = getArgs(args);
655
        var element = ref[0];
656
        var type = ref[1];
657
        var selector = ref[2];
658
        var listener = ref[3];
659
        var useCapture = ref[4];
660
        var condition = ref[5];
661
        var off = on(element, type, selector, function (e) {
662
            var result = !condition || condition(e);
663
            if (result) {
664
                off();
665
                listener(e, result);
666
            }
667
        }, useCapture);
668

  
669
        return off;
670
    }
671

  
672
    function trigger(targets, event, detail) {
673
        return toEventTargets(targets).reduce(function (notCanceled, target) { return notCanceled && target.dispatchEvent(createEvent(event, true, true, detail)); }
674
            , true);
675
    }
676

  
677
    function createEvent(e, bubbles, cancelable, detail) {
678
        if ( bubbles === void 0 ) bubbles = true;
679
        if ( cancelable === void 0 ) cancelable = false;
680

  
681
        if (isString(e)) {
682
            var event = document.createEvent('CustomEvent'); // IE 11
683
            event.initCustomEvent(e, bubbles, cancelable, detail);
684
            e = event;
685
        }
686

  
687
        return e;
688
    }
689

  
690
    function getArgs(args) {
691
        if (isFunction(args[2])) {
692
            args.splice(2, 0, false);
693
        }
694
        return args;
695
    }
696

  
697
    function delegate(delegates, selector, listener) {
698
        var this$1 = this;
699

  
700
        return function (e) {
701

  
702
            delegates.forEach(function (delegate) {
703

  
704
                var current = selector[0] === '>'
705
                    ? findAll(selector, delegate).reverse().filter(function (element) { return within(e.target, element); })[0]
706
                    : closest(e.target, selector);
707

  
708
                if (current) {
709
                    e.delegate = delegate;
710
                    e.current = current;
711

  
712
                    listener.call(this$1, e);
713
                }
714

  
715
            });
716

  
717
        };
718
    }
719

  
720
    function detail(listener) {
721
        return function (e) { return isArray(e.detail) ? listener.apply(void 0, [e].concat(e.detail)) : listener(e); };
722
    }
723

  
724
    function selfFilter(listener) {
725
        return function (e) {
726
            if (e.target === e.currentTarget || e.target === e.current) {
727
                return listener.call(null, e);
728
            }
729
        };
730
    }
731

  
732
    function useCaptureFilter(options) {
733
        return options && isIE && !isBoolean(options)
734
            ? !!options.capture
735
            : options;
736
    }
737

  
738
    function isEventTarget(target) {
739
        return target && 'addEventListener' in target;
740
    }
741

  
742
    function toEventTarget(target) {
743
        return isEventTarget(target) ? target : toNode(target);
744
    }
745

  
746
    function toEventTargets(target) {
747
        return isArray(target)
748
                ? target.map(toEventTarget).filter(Boolean)
749
                : isString(target)
750
                    ? findAll(target)
751
                    : isEventTarget(target)
752
                        ? [target]
753
                        : toNodes(target);
754
    }
755

  
756
    function isTouch(e) {
757
        return e.pointerType === 'touch' || !!e.touches;
758
    }
759

  
760
    function getEventPos(e, prop) {
761
        if ( prop === void 0 ) prop = 'client';
762

  
763
        var touches = e.touches;
764
        var changedTouches = e.changedTouches;
765
        var ref = touches && touches[0] || changedTouches && changedTouches[0] || e;
766
        var x = ref[(prop + "X")];
767
        var y = ref[(prop + "Y")];
768

  
769
        return {x: x, y: y};
770
    }
771

  
772
    /* global setImmediate */
773

  
774
    var Promise = 'Promise' in window ? window.Promise : PromiseFn;
775

  
776
    var Deferred = function() {
777
        var this$1 = this;
778

  
779
        this.promise = new Promise(function (resolve, reject) {
780
            this$1.reject = reject;
781
            this$1.resolve = resolve;
782
        });
783
    };
784

  
785
    /**
786
     * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)
787
     */
788

  
789
    var RESOLVED = 0;
790
    var REJECTED = 1;
791
    var PENDING = 2;
792

  
793
    var async = 'setImmediate' in window ? setImmediate : setTimeout;
794

  
795
    function PromiseFn(executor) {
796

  
797
        this.state = PENDING;
798
        this.value = undefined;
799
        this.deferred = [];
800

  
801
        var promise = this;
802

  
803
        try {
804
            executor(
805
                function (x) {
806
                    promise.resolve(x);
807
                },
808
                function (r) {
809
                    promise.reject(r);
810
                }
811
            );
812
        } catch (e) {
813
            promise.reject(e);
814
        }
815
    }
816

  
817
    PromiseFn.reject = function (r) {
818
        return new PromiseFn(function (resolve, reject) {
819
            reject(r);
820
        });
821
    };
822

  
823
    PromiseFn.resolve = function (x) {
824
        return new PromiseFn(function (resolve, reject) {
825
            resolve(x);
826
        });
827
    };
828

  
829
    PromiseFn.all = function all(iterable) {
830
        return new PromiseFn(function (resolve, reject) {
831
            var result = [];
832
            var count = 0;
833

  
834
            if (iterable.length === 0) {
835
                resolve(result);
836
            }
837

  
838
            function resolver(i) {
839
                return function (x) {
840
                    result[i] = x;
841
                    count += 1;
842

  
843
                    if (count === iterable.length) {
844
                        resolve(result);
845
                    }
846
                };
847
            }
848

  
849
            for (var i = 0; i < iterable.length; i += 1) {
850
                PromiseFn.resolve(iterable[i]).then(resolver(i), reject);
851
            }
852
        });
853
    };
854

  
855
    PromiseFn.race = function race(iterable) {
856
        return new PromiseFn(function (resolve, reject) {
857
            for (var i = 0; i < iterable.length; i += 1) {
858
                PromiseFn.resolve(iterable[i]).then(resolve, reject);
859
            }
860
        });
861
    };
862

  
863
    var p = PromiseFn.prototype;
864

  
865
    p.resolve = function resolve(x) {
866
        var promise = this;
867

  
868
        if (promise.state === PENDING) {
869
            if (x === promise) {
870
                throw new TypeError('Promise settled with itself.');
871
            }
872

  
873
            var called = false;
874

  
875
            try {
876
                var then = x && x.then;
877

  
878
                if (x !== null && isObject(x) && isFunction(then)) {
879
                    then.call(
880
                        x,
881
                        function (x) {
882
                            if (!called) {
883
                                promise.resolve(x);
884
                            }
885
                            called = true;
886
                        },
887
                        function (r) {
888
                            if (!called) {
889
                                promise.reject(r);
890
                            }
891
                            called = true;
892
                        }
893
                    );
894
                    return;
895
                }
896
            } catch (e) {
897
                if (!called) {
898
                    promise.reject(e);
899
                }
900
                return;
901
            }
902

  
903
            promise.state = RESOLVED;
904
            promise.value = x;
905
            promise.notify();
906
        }
907
    };
908

  
909
    p.reject = function reject(reason) {
910
        var promise = this;
911

  
912
        if (promise.state === PENDING) {
913
            if (reason === promise) {
914
                throw new TypeError('Promise settled with itself.');
915
            }
916

  
917
            promise.state = REJECTED;
918
            promise.value = reason;
919
            promise.notify();
920
        }
921
    };
922

  
923
    p.notify = function notify() {
924
        var this$1 = this;
925

  
926
        async(function () {
927
            if (this$1.state !== PENDING) {
928
                while (this$1.deferred.length) {
929
                    var ref = this$1.deferred.shift();
930
                    var onResolved = ref[0];
931
                    var onRejected = ref[1];
932
                    var resolve = ref[2];
933
                    var reject = ref[3];
934

  
935
                    try {
936
                        if (this$1.state === RESOLVED) {
937
                            if (isFunction(onResolved)) {
938
                                resolve(onResolved.call(undefined, this$1.value));
939
                            } else {
940
                                resolve(this$1.value);
941
                            }
942
                        } else if (this$1.state === REJECTED) {
943
                            if (isFunction(onRejected)) {
944
                                resolve(onRejected.call(undefined, this$1.value));
945
                            } else {
946
                                reject(this$1.value);
947
                            }
948
                        }
949
                    } catch (e) {
950
                        reject(e);
951
                    }
952
                }
953
            }
954
        });
955
    };
956

  
957
    p.then = function then(onResolved, onRejected) {
958
        var this$1 = this;
959

  
960
        return new PromiseFn(function (resolve, reject) {
961
            this$1.deferred.push([onResolved, onRejected, resolve, reject]);
962
            this$1.notify();
963
        });
964
    };
965

  
966
    p.catch = function (onRejected) {
967
        return this.then(undefined, onRejected);
968
    };
969

  
970
    function ajax(url, options) {
971
        return new Promise(function (resolve, reject) {
972

  
973
            var env = assign({
974
                data: null,
975
                method: 'GET',
976
                headers: {},
977
                xhr: new XMLHttpRequest(),
978
                beforeSend: noop,
979
                responseType: ''
980
            }, options);
981

  
982
            env.beforeSend(env);
983

  
984
            var xhr = env.xhr;
985

  
986
            for (var prop in env) {
987
                if (prop in xhr) {
988
                    try {
989

  
990
                        xhr[prop] = env[prop];
991

  
992
                    } catch (e) {}
993
                }
994
            }
995

  
996
            xhr.open(env.method.toUpperCase(), url);
997

  
998
            for (var header in env.headers) {
999
                xhr.setRequestHeader(header, env.headers[header]);
1000
            }
1001

  
1002
            on(xhr, 'load', function () {
1003

  
1004
                if (xhr.status === 0 || xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {
1005
                    resolve(xhr);
1006
                } else {
1007
                    reject(assign(Error(xhr.statusText), {
1008
                        xhr: xhr,
1009
                        status: xhr.status
1010
                    }));
1011
                }
1012

  
1013
            });
1014

  
1015
            on(xhr, 'error', function () { return reject(assign(Error('Network Error'), {xhr: xhr})); });
1016
            on(xhr, 'timeout', function () { return reject(assign(Error('Network Timeout'), {xhr: xhr})); });
1017

  
1018
            xhr.send(env.data);
1019
        });
1020
    }
1021

  
1022
    function getImage(src, srcset, sizes) {
1023

  
1024
        return new Promise(function (resolve, reject) {
1025
            var img = new Image();
1026

  
1027
            img.onerror = reject;
1028
            img.onload = function () { return resolve(img); };
1029

  
1030
            sizes && (img.sizes = sizes);
1031
            srcset && (img.srcset = srcset);
1032
            img.src = src;
1033
        });
1034

  
1035
    }
1036

  
1037
    function ready(fn) {
1038

  
1039
        if (document.readyState !== 'loading') {
1040
            fn();
1041
            return;
1042
        }
1043

  
1044
        var unbind = on(document, 'DOMContentLoaded', function () {
1045
            unbind();
1046
            fn();
1047
        });
1048
    }
1049

  
1050
    function index(element, ref) {
1051
        return ref
1052
            ? toNodes(element).indexOf(toNode(ref))
1053
            : toNodes((element = toNode(element)) && element.parentNode.children).indexOf(element);
1054
    }
1055

  
1056
    function getIndex(i, elements, current, finite) {
1057
        if ( current === void 0 ) current = 0;
1058
        if ( finite === void 0 ) finite = false;
1059

  
1060

  
1061
        elements = toNodes(elements);
1062

  
1063
        var length = elements.length;
1064

  
1065
        i = isNumeric(i)
1066
            ? toNumber(i)
1067
            : i === 'next'
1068
                ? current + 1
1069
                : i === 'previous'
1070
                    ? current - 1
1071
                    : index(elements, i);
1072

  
1073
        if (finite) {
1074
            return clamp(i, 0, length - 1);
1075
        }
1076

  
1077
        i %= length;
1078

  
1079
        return i < 0 ? i + length : i;
1080
    }
1081

  
1082
    function empty(element) {
1083
        element = $(element);
1084
        element.innerHTML = '';
1085
        return element;
1086
    }
1087

  
1088
    function html(parent, html) {
1089
        parent = $(parent);
1090
        return isUndefined(html)
1091
            ? parent.innerHTML
1092
            : append(parent.hasChildNodes() ? empty(parent) : parent, html);
1093
    }
1094

  
1095
    function prepend(parent, element) {
1096

  
1097
        parent = $(parent);
1098

  
1099
        if (!parent.hasChildNodes()) {
1100
            return append(parent, element);
1101
        } else {
1102
            return insertNodes(element, function (element) { return parent.insertBefore(element, parent.firstChild); });
1103
        }
1104
    }
1105

  
1106
    function append(parent, element) {
1107
        parent = $(parent);
1108
        return insertNodes(element, function (element) { return parent.appendChild(element); });
1109
    }
1110

  
1111
    function before(ref, element) {
1112
        ref = $(ref);
1113
        return insertNodes(element, function (element) { return ref.parentNode.insertBefore(element, ref); });
1114
    }
1115

  
1116
    function after(ref, element) {
1117
        ref = $(ref);
1118
        return insertNodes(element, function (element) { return ref.nextSibling
1119
            ? before(ref.nextSibling, element)
1120
            : append(ref.parentNode, element); }
1121
        );
1122
    }
1123

  
1124
    function insertNodes(element, fn) {
1125
        element = isString(element) ? fragment(element) : element;
1126
        return element
1127
            ? 'length' in element
1128
                ? toNodes(element).map(fn)
1129
                : fn(element)
1130
            : null;
1131
    }
1132

  
1133
    function remove(element) {
1134
        toNodes(element).map(function (element) { return element.parentNode && element.parentNode.removeChild(element); });
1135
    }
1136

  
1137
    function wrapAll(element, structure) {
1138

  
1139
        structure = toNode(before(element, structure));
1140

  
1141
        while (structure.firstChild) {
1142
            structure = structure.firstChild;
1143
        }
1144

  
1145
        append(structure, element);
1146

  
1147
        return structure;
1148
    }
1149

  
1150
    function wrapInner(element, structure) {
1151
        return toNodes(toNodes(element).map(function (element) { return element.hasChildNodes ? wrapAll(toNodes(element.childNodes), structure) : append(element, structure); }
1152
        ));
1153
    }
1154

  
1155
    function unwrap(element) {
1156
        toNodes(element)
1157
            .map(function (element) { return element.parentNode; })
1158
            .filter(function (value, index, self) { return self.indexOf(value) === index; })
1159
            .forEach(function (parent) {
1160
                before(parent, parent.childNodes);
1161
                remove(parent);
1162
            });
1163
    }
1164

  
1165
    var fragmentRe = /^\s*<(\w+|!)[^>]*>/;
1166
    var singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
1167

  
1168
    function fragment(html) {
1169

  
1170
        var matches = singleTagRe.exec(html);
1171
        if (matches) {
1172
            return document.createElement(matches[1]);
1173
        }
1174

  
1175
        var container = document.createElement('div');
1176
        if (fragmentRe.test(html)) {
1177
            container.insertAdjacentHTML('beforeend', html.trim());
1178
        } else {
1179
            container.textContent = html;
1180
        }
1181

  
1182
        return container.childNodes.length > 1 ? toNodes(container.childNodes) : container.firstChild;
1183

  
1184
    }
1185

  
1186
    function apply(node, fn) {
1187

  
1188
        if (!node || node.nodeType !== 1) {
1189
            return;
1190
        }
1191

  
1192
        fn(node);
1193
        node = node.firstElementChild;
1194
        while (node) {
1195
            apply(node, fn);
1196
            node = node.nextElementSibling;
1197
        }
1198
    }
1199

  
1200
    function $(selector, context) {
1201
        return !isString(selector)
1202
            ? toNode(selector)
1203
            : isHtml(selector)
1204
                ? toNode(fragment(selector))
1205
                : find(selector, context);
1206
    }
1207

  
1208
    function $$(selector, context) {
1209
        return !isString(selector)
1210
            ? toNodes(selector)
1211
            : isHtml(selector)
1212
                ? toNodes(fragment(selector))
1213
                : findAll(selector, context);
1214
    }
1215

  
1216
    function isHtml(str) {
1217
        return str[0] === '<' || str.match(/^\s*</);
1218
    }
1219

  
1220
    function addClass(element) {
1221
        var args = [], len = arguments.length - 1;
1222
        while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1223

  
1224
        apply$1(element, args, 'add');
1225
    }
1226

  
1227
    function removeClass(element) {
1228
        var args = [], len = arguments.length - 1;
1229
        while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1230

  
1231
        apply$1(element, args, 'remove');
1232
    }
1233

  
1234
    function removeClasses(element, cls) {
1235
        attr(element, 'class', function (value) { return (value || '').replace(new RegExp(("\\b" + cls + "\\b"), 'g'), ''); });
1236
    }
1237

  
1238
    function replaceClass(element) {
1239
        var args = [], len = arguments.length - 1;
1240
        while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1241

  
1242
        args[0] && removeClass(element, args[0]);
1243
        args[1] && addClass(element, args[1]);
1244
    }
1245

  
1246
    function hasClass(element, cls) {
1247
        return cls && toNodes(element).some(function (element) { return element.classList.contains(cls.split(' ')[0]); });
1248
    }
1249

  
1250
    function toggleClass(element) {
1251
        var args = [], len = arguments.length - 1;
1252
        while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1253

  
1254

  
1255
        if (!args.length) {
1256
            return;
1257
        }
1258

  
1259
        args = getArgs$1(args);
1260

  
1261
        var force = !isString(last(args)) ? args.pop() : []; // in iOS 9.3 force === undefined evaluates to false
1262

  
1263
        args = args.filter(Boolean);
1264

  
1265
        toNodes(element).forEach(function (ref) {
1266
            var classList = ref.classList;
1267

  
1268
            for (var i = 0; i < args.length; i++) {
1269
                supports.Force
1270
                    ? classList.toggle.apply(classList, [args[i]].concat(force))
1271
                    : (classList[(!isUndefined(force) ? force : !classList.contains(args[i])) ? 'add' : 'remove'](args[i]));
1272
            }
1273
        });
1274

  
1275
    }
1276

  
1277
    function apply$1(element, args, fn) {
1278
        args = getArgs$1(args).filter(Boolean);
1279

  
1280
        args.length && toNodes(element).forEach(function (ref) {
1281
            var classList = ref.classList;
1282

  
1283
            supports.Multiple
1284
                ? classList[fn].apply(classList, args)
1285
                : args.forEach(function (cls) { return classList[fn](cls); });
1286
        });
1287
    }
1288

  
1289
    function getArgs$1(args) {
1290
        return args.reduce(function (args, arg) { return args.concat.call(args, isString(arg) && includes(arg, ' ') ? arg.trim().split(' ') : arg); }
1291
            , []);
1292
    }
1293

  
1294
    // IE 11
1295
    var supports = {
1296

  
1297
        get Multiple() {
1298
            return this.get('_multiple');
1299
        },
1300

  
1301
        get Force() {
1302
            return this.get('_force');
1303
        },
1304

  
1305
        get: function(key) {
1306

  
1307
            if (!hasOwn(this, key)) {
1308
                var ref = document.createElement('_');
1309
                var classList = ref.classList;
1310
                classList.add('a', 'b');
1311
                classList.toggle('c', false);
1312
                this._multiple = classList.contains('b');
1313
                this._force = !classList.contains('c');
1314
            }
1315

  
1316
            return this[key];
1317
        }
1318

  
1319
    };
1320

  
1321
    var cssNumber = {
1322
        'animation-iteration-count': true,
1323
        'column-count': true,
1324
        'fill-opacity': true,
1325
        'flex-grow': true,
1326
        'flex-shrink': true,
1327
        'font-weight': true,
1328
        'line-height': true,
1329
        'opacity': true,
1330
        'order': true,
1331
        'orphans': true,
1332
        'stroke-dasharray': true,
1333
        'stroke-dashoffset': true,
1334
        'widows': true,
1335
        'z-index': true,
1336
        'zoom': true
1337
    };
1338

  
1339
    function css(element, property, value) {
1340

  
1341
        return toNodes(element).map(function (element) {
1342

  
1343
            if (isString(property)) {
1344

  
1345
                property = propName(property);
1346

  
1347
                if (isUndefined(value)) {
1348
                    return getStyle(element, property);
1349
                } else if (!value && !isNumber(value)) {
1350
                    element.style.removeProperty(property);
1351
                } else {
1352
                    element.style[property] = isNumeric(value) && !cssNumber[property] ? (value + "px") : value;
1353
                }
1354

  
1355
            } else if (isArray(property)) {
1356

  
1357
                var styles = getStyles(element);
1358

  
1359
                return property.reduce(function (props, property) {
1360
                    props[property] = styles[propName(property)];
1361
                    return props;
1362
                }, {});
1363

  
1364
            } else if (isObject(property)) {
1365
                each(property, function (value, property) { return css(element, property, value); });
1366
            }
1367

  
1368
            return element;
1369

  
1370
        })[0];
1371

  
1372
    }
1373

  
1374
    function getStyles(element, pseudoElt) {
1375
        element = toNode(element);
1376
        return element.ownerDocument.defaultView.getComputedStyle(element, pseudoElt);
1377
    }
1378

  
1379
    function getStyle(element, property, pseudoElt) {
1380
        return getStyles(element, pseudoElt)[property];
1381
    }
1382

  
1383
    var vars = {};
1384

  
1385
    function getCssVar(name) {
1386

  
1387
        var docEl = document.documentElement;
1388

  
1389
        if (!isIE) {
1390
            return getStyles(docEl).getPropertyValue(("--uk-" + name));
1391
        }
1392

  
1393
        if (!(name in vars)) {
1394

  
1395
            /* usage in css: .uk-name:before { content:"xyz" } */
1396

  
1397
            var element = append(docEl, document.createElement('div'));
1398

  
1399
            addClass(element, ("uk-" + name));
1400

  
1401
            vars[name] = getStyle(element, 'content', ':before').replace(/^["'](.*)["']$/, '$1');
1402

  
1403
            remove(element);
1404

  
1405
        }
1406

  
1407
        return vars[name];
1408

  
1409
    }
1410

  
1411
    var cssProps = {};
1412

  
1413
    function propName(name) {
1414

  
1415
        var ret = cssProps[name];
1416
        if (!ret) {
1417
            ret = cssProps[name] = vendorPropName(name) || name;
1418
        }
1419
        return ret;
1420
    }
1421

  
1422
    var cssPrefixes = ['webkit', 'moz', 'ms'];
1423

  
1424
    function vendorPropName(name) {
1425

  
1426
        name = hyphenate(name);
1427

  
1428
        var ref = document.documentElement;
1429
        var style = ref.style;
1430

  
1431
        if (name in style) {
1432
            return name;
1433
        }
1434

  
1435
        var i = cssPrefixes.length, prefixedName;
1436

  
1437
        while (i--) {
1438
            prefixedName = "-" + (cssPrefixes[i]) + "-" + name;
1439
            if (prefixedName in style) {
1440
                return prefixedName;
1441
            }
1442
        }
1443
    }
1444

  
1445
    function transition(element, props, duration, timing) {
1446
        if ( duration === void 0 ) duration = 400;
1447
        if ( timing === void 0 ) timing = 'linear';
1448

  
1449

  
1450
        return Promise.all(toNodes(element).map(function (element) { return new Promise(function (resolve, reject) {
1451

  
1452
                for (var name in props) {
1453
                    var value = css(element, name);
1454
                    if (value === '') {
1455
                        css(element, name, value);
1456
                    }
1457
                }
1458

  
1459
                var timer = setTimeout(function () { return trigger(element, 'transitionend'); }, duration);
1460

  
1461
                once(element, 'transitionend transitioncanceled', function (ref) {
1462
                    var type = ref.type;
1463

  
1464
                    clearTimeout(timer);
1465
                    removeClass(element, 'uk-transition');
1466
                    css(element, {
1467
                        'transition-property': '',
1468
                        'transition-duration': '',
1469
                        'transition-timing-function': ''
1470
                    });
1471
                    type === 'transitioncanceled' ? reject() : resolve();
1472
                }, {self: true});
1473

  
1474
                addClass(element, 'uk-transition');
1475
                css(element, assign({
1476
                    'transition-property': Object.keys(props).map(propName).join(','),
1477
                    'transition-duration': (duration + "ms"),
1478
                    'transition-timing-function': timing
1479
                }, props));
1480

  
1481
            }); }
1482
        ));
1483

  
1484
    }
1485

  
1486
    var Transition = {
1487

  
1488
        start: transition,
1489

  
1490
        stop: function(element) {
1491
            trigger(element, 'transitionend');
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff