You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5 lines
84 KiB

/*! UIkit 3.0.0-beta.20 | http://www.getuikit.com | (c) 2014 - 2017 YOOtheme | MIT License */
!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){E(t).addEventListener(e,i,n)}function o(t,e,i,n){E(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=Kt(t);for(var a in e)t.css(a,t.css(a));var l=setTimeout(function(){return t.trigger(_e||"transitionend")},i);t.one(_e||"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=Kt(t),0===e.lastIndexOf("uk-animation-",0)&&(n&&(e+=" uk-animation-"+n),o&&(e+=" uk-animation-reverse")),a(),fe(function(){return t.one(Ae||"animationend",function(t){t.promise=s,s.then(a),r()}).css("animation-duration",i+"ms").addClass(e).addClass(l)}),Ae||fe(function(){return se.cancel(t)})});return s}function a(t){return t instanceof Kt}function l(t,e){return t=Kt(t),t.is(e)||!!(k(e)?t.parents(e).length:Kt.contains(E(e),t[0]))}function h(t,e,i,n){return t=Kt(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(t,e,i,n){if(void 0===e&&(e=!0),void 0===i&&(i=!1),void 0===n&&(n=!1),k(t)){var o=document.createEvent("Event");o.initEvent(t,e,i),t=o}return n&&Kt.extend(t,n),t}function d(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var n=E(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=Kt(e);var n=Kt(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 re[E(t).tagName.toLowerCase()]}function g(t,e){var i=S(t);return i?i.reduce(function(t,e){return A(e,t)},e):A(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 le.call(t,e)}function w(t){if(ve)return new Promise(t);var e=Kt.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(he,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 A(t,e){if(t===!0)return null;try{if(e&&_(t)&&">"!==t[0]){var i=ce[t[0]],n=t.substr(1);e=Kt(e),"closest"===i&&(e=e.parent(),n=n||"*"),t=e[i](n)}else t=Kt(t,e)}catch(t){return null}return t.length?t:null}function E(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=ue[e]||(ue[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
})},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:Kt(i).html())+'</div>\n <div class="uk-modal-footer uk-text-right">\n <button class="uk-button uk-button-default uk-modal-close">'+n.labels.cancel+'</button>\n <button class="uk-button 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===Kt(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="uk-form-stacked">\n <div class="uk-modal-body">\n <label>'+(k(i)?i:Kt(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 uk-button-default uk-modal-close" type="button">'+o.labels.cancel+'</button>\n <button class="uk-button 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 Bt(t){t.component("nav",t.components.accordion.extend({name:"nav",defaults:{targets:"> .uk-parent",toggle:"> a",content:"ul:first"}}))}function Pt(e){e.component("navbar",{mixins:[Ye],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:ne?"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 this.$props.boundary===!0||this.boundaryAlign?this.$el:this.$props.boundary},pos:function(){return"bottom-"+this.align}},ready:function(){this.dropbar&&e.navbarDropbar(g(this.dropbar,this.$el)||Kt("<div></div>").insertAfter(this.dropbarAnchor||this.$el),{clsDrop:this.clsDrop,mode:this.dropbarMode,duration:this.duration,navbar:this})},update:function(){e.drop(Kt(this.dropdown+" ."+this.clsDrop,this.$el),t.extend({},this))},events:[{name:xe,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:[Ye],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,n=e.dir;"bottom"!==n||l(i,this.$el)||(i.appendTo(this.$el),this.$el.trigger("beforeshow",[{$el:i}]))}},{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),oe.cancel(this.$el).then(function(){retu
}},scroll:function t(){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,i){var n=this;this.$el.children().addClass(this.clsItem);var t=function(){i.length?!n.$el.has(e).length||e.prevAll().filter(i).length?e.insertBefore(i):e.insertAfter(i):n.$el.append(e)};this.animation?this.animate(t):t()},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 Jt(t){if(!Jt.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,f=i.toJQuery;s.on("click",function(t){e&&!h(t.target,e.$el)&&e.hide()}),t.component("tooltip",{attrs:!0,mixins:[n.toggable,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},init:function(){this.container=this.container===!0&&t.container||this.container&&f(this.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,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)}},events:(p={blur:"hide"},p["focus "+u+" "+c]=function(t){t.type===c&&l(t)||this.show()},p[d]=function(t){l(t)||this.hide()},p)});var p}}function Zt(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(!Zt.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:Strin