EasyImages2.0/public/static/zui/js/zui.lite.min.js

15 lines
48 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*!
* ZUI: Lite edition - v1.9.2 - 2020-07-09
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2020 cnezsoft.com; Licensed MIT
*/
/*! Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
!function(t,e,i){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");t.zui||(t.zui=function(e){t.isPlainObject(e)&&t.extend(t.zui,e)});var o={all:-1,left:0,middle:1,right:2},n=0;t.zui({uuid:function(t){var e=1e8*(Date.now()-1580890015292)+1e3*Math.floor(1e5*Math.random())+n++%1e3;return t?e:e.toString(36)},callEvent:function(e,o,n){if(t.isFunction(e)){n!==i&&(e=t.proxy(e,n));var a=e(o);return o&&(o.result=a),!(a!==i&&!a)}return 1},strCode:function(t){var e=0;if(t&&t.length)for(var i=0;i<t.length;++i)e+=i*t.charCodeAt(i);return e},getMouseButtonCode:function(t){return"number"!=typeof t&&(t=o[t]),t!==i&&null!==t||(t=-1),t},defaultLang:"en",clientLang:function(){var i,o=e.config;if("undefined"!=typeof o&&o.clientLang&&(i=o.clientLang),!i){var n=t("html").attr("lang");i=n?n:navigator.userLanguage||navigator.userLanguage||t.zui.defaultLang}return i.replace("-","_").toLowerCase()},langDataMap:{},addLangData:function(e,i,o){var n={};o&&i&&e?(n[i]={},n[i][e]=o):e&&i&&!o?(o=i,t.each(o,function(t){n[t]={},n[t][e]=o[t]})):!e||i||o||t.each(o,function(e){var i=o[e];t.each(i,function(t){n[t]||(n[t]={}),n[t][e]=i[t]})}),t.extend(!0,t.zui.langDataMap,n)},getLangData:function(e,i,o){if(!arguments.length)return t.extend({},t.zui.langDataMap);if(1===arguments.length)return t.extend({},t.zui.langDataMap[e]);if(2===arguments.length){var n=t.zui.langDataMap[e];return n?i?n[i]:n:{}}if(3===arguments.length){i=i||t.zui.clientLang();var n=t.zui.langDataMap[e],a=n?n[i]:{};return t.extend(!0,{},o[i]||o.en||o.zh_cn,a)}return null},lang:function(){return arguments.length&&t.isPlainObject(arguments[arguments.length-1])?t.zui.addLangData.apply(null,arguments):t.zui.getLangData.apply(null,arguments)},_scrollbarWidth:0,checkBodyScrollbar:function(){if(document.body.clientWidth>=e.innerWidth)return 0;if(!t.zui._scrollbarWidth){var i=document.createElement("div");i.className="scrollbar-measure",document.body.appendChild(i),t.zui._scrollbarWidth=i.offsetWidth-i.clientWidth,document.body.removeChild(i)}return t.zui._scrollbarWidth},fixBodyScrollbar:function(){if(t.zui.checkBodyScrollbar()){var e=t("body"),i=parseInt(e.css("padding-right")||0,10);return t.zui._scrollbarWidth&&e.css({paddingRight:i+t.zui._scrollbarWidth,overflowY:"hidden"}),!0}},resetBodyScrollbar:function(){t("body").css({paddingRight:"",overflowY:""})}}),t.fn.callEvent=function(e,o,n){var a=t(this),r=e.indexOf(".zui."),s=r<0?e:e.substring(0,r),l=t.Event(s,o);if(n===i&&r>0&&(n=a.data(e.substring(r+1))),n&&n.options){var d=n.options[s];t.isFunction(d)&&(l.result=t.zui.callEvent(d,l,n))}return a.trigger(l),l},t.fn.callComEvent=function(e,o,n){n===i||t.isArray(n)||(n=[n]);var a,r=this;r.trigger(o,n);var s=e.options[o];return s&&(a=s.apply(e,n)),a}}(jQuery,window,void 0),function(t){"use strict";t.fn.fixOlPd=function(e){return e=e||10,this.each(function(){var i=t(this);i.css("paddingLeft",Math.ceil(Math.log10(i.children().length))*e+10)})},t(function(){t(".ol-pd-fix,.article ol").fixOlPd()})}(jQuery),+function(t){"use strict";var e='[data-dismiss="alert"]',i="zui.alert",o=function(i){t(i).on("click",e,this.close)};o.prototype.close=function(e){function o(){r.trigger("closed."+i).remove()}var n=t(this),a=n.attr("data-target");a||(a=n.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,""));var r=t(a);e&&e.preventDefault(),r.length||(r=n.hasClass("alert")?n:n.parent()),r.trigger(e=t.Event("close."+i)),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one(t.support.transition.end,o).emulateTransitionEnd(150):o())};var n=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var n=t(this),a=n.data(i);a||n.data(i,a=new o(this)),"string"==typeof e&&a[e].call(n)})},t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click."+i+".data-api",e,o.prototype.close)}(window.jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(t){"use strict";var e="zui.collapse",i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var o=this.$parent&&this.$parent.find(".in");if(o&&o.length){var n=o.data(e);if(n&&n.transitioning)return;o.collapse("hide"),n||o.data(e,null)}var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("in")[a]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return r.call(this);var s=t.camelCase(["scroll",a].join("-"));this.$element.one(t.support.transition.end,t.proxy(r,this)).emulateTransitionEnd(350)[a](this.$element[0][s])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var i=t.Event("hide."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var o=this.dimension();this.$element[o](this.$element[o]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.trigger("hidden."+e).removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[o](0).one(t.support.transition.end,t.proxy(n,this)).emulateTransitionEnd(350):n.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var o=t.fn.collapse;t.fn.collapse=function(o){return this.each(function(){var n=t(this),a=n.data(e),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof o&&o);a||n.data(e,a=new i(this,r)),"string"==typeof o&&a[o]()})},t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(i){var o,n=t(this),a=n.attr("data-target")||i.preventDefault()||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""),r=t(a),s=r.data(e),l=s?"toggle":n.data(),d=n.attr("data-parent"),h=d&&t(d);s&&s.transitioning||(h&&h.find('[data-toggle=collapse][data-parent="'+d+'"]').not(n).addClass("collapsed"),n[r.hasClass("in")?"addClass":"removeClass"]("collapsed")),r.collapse(l)})}(window.jQuery),function(t,e){"use strict";var i=1200,o=992,n=768,a=e(t),r=function(){var t=a.width();e("html").toggleClass("screen-desktop",t>=o&&t<i).toggleClass("screen-desktop-wide",t>=i).toggleClass("screen-tablet",t>=n&&t<o).toggleClass("screen-phone",t<n).toggleClass("device-mobile",t<o).toggleClass("device-desktop",t>=o)},s="",l=navigator.userAgent;l.match(/(iPad|iPhone|iPod)/i)?s+=" os-ios":l.match(/android/i)?s+=" os-android":l.match(/Win/i)?s+=" os-windows":l.match(/Mac/i)?s+=" os-mac":l.match(/Linux/i)?s+=" os-linux":l.match(/X11/i)&&(s+=" os-unix"),"ontouchstart"in document.documentElement&&(s+=" is-touchable"),e("html").addClass(s),a.resize(r),r()}(window,jQuery),function(t){"use strict";var e={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 <a href="https://browsehappy.com/" target="_blank" class="alert-link">了解更多...</a>',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。<a href="https://browsehappy.com/" target="_blank" class="alert-link">了解更多...</a>',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. <a href="https://browsehappy.com/" target="_blank" class="alert-link">Learn more...</a>'},i=function(){for(var t=!1,e=11;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};i.prototype.cssHelper=function(){var e=this.ie,i=t("html");i.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&i.addClass("ie-"+e).toggleClass("gt-ie-7 gte-ie-8 support-ie",e>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",e<8).toggleClass("gt-ie-8 gte-ie-9",e>=9).toggleClass("lte-ie-8 lt-ie-9",e<9).toggleClass("gt-ie-9 gte-ie-10",e>=10).toggleClass("lte-ie-9 lt-ie-10",e<10).toggleClass("gt-ie-10 gte-ie-11",e>=11).toggleClass("lte-ie-10 lt-ie-11",e<11)},i.prototype.tip=function(i){var o=t("#browseHappyTip");o.length||(o=t('<div id="browseHappyTip" class="alert alert-dismissable alert-danger-inverse alert-block" style="position: relative; z-index: 99999"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><div class="container"><div class="content text-center"></div></div></div>'),o.prependTo("body")),i||(i=t.zui.getLangData("zui.browser",t.zui.clientLang(),e),"object"==typeof i&&(i=i.tip)),o.find(".content").html(i)},i.prototype.isIE=function(t){if(11===t)return this.isIE11();if(10===t)return this.isIE10();if(!t&&(this.isIE11()||this.isIE10()))return!0;var e=document.createElement("b");return e.innerHTML="<!--[if IE "+(t||"")+"]><i></i><![endif]-->",1===e.getElementsByTagName("i").length},i.prototype.isIE10=function(){return navigator.appVersion.indexOf("MSIE 10")!==-1},i.prototype.isIE11=function(){var t=navigator.userAgent;return t.indexOf("Trident")!==-1&&t.indexOf("rv:11")!==-1},t.zui({browser:new i}),t(function(){t("body").hasClass("disabled-browser-tip")||t.zui.browser.ie&&t.zui.browser.ie<8&&t.zui.browser.tip()})}(jQuery),function(t){"use strict";const e=864e5,i=function(t){return t instanceof Date||("number"==typeof t&&t<1e10&&(t*=1e3),t=new Date(t)),t},o=function(t){return i(t).getTime()},n=function(t,e){t=i(t),void 0===e&&(e="yyyy-MM-dd hh:mm:ss");var o={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),"S+":t.getMilliseconds()};/(y+)/i.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in o)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?o[n]:("00"+o[n]).substr((""+o[n]).length)));return e},a=function(t,e){return t.setTime(t.getTime()+e),t},r=function(t,i){return a(t,i*e)},s=function(t){return new Date(i(t).getTime())},l=function(t){return t%4===0&&t%100!==0||t%400===0},d=function(t,e){return[31,l(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},h=function(t){return d(t.getFullYear(),t.getMonth())},c=function(t){return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t},u=function(t,e){var i=t.getDate();return t.setDate(1),t.setMonth(t.getMonth()+e),t.setDate(Math.min(i,h(t))),t},p=function(t,e){e=e||1;for(var i=new Date(t.getTime());i.getDay()!=e;)i=r(i,-1);return c(i)},f=function(t,e){return t.toDateString()===e.toDateString()},g=function(t,e){var i=p(t),o=r(s(i),7);return e>=i&&e<o},m=function(t,e){return t.getFullYear()===e.getFullYear()},v={formatDate:n,createDate:i,date:{ONEDAY_TICKS:e,create:i,getTimestamp:o,format:n,addMilliseconds:a,addDays:r,cloneDate:s,isLeapYear:l,getDaysInMonth:d,getDaysOfThisMonth:h,clearTime:c,addMonths:u,getLastWeekday:p,isSameDay:f,isSameWeek:g,isSameYear:m}};t.$&&t.$.zui?$.zui(v):t.dateHelper=v.date,t.noDatePrototypeHelper||(Date.ONEDAY_TICKS=e,Date.prototype.format||(Date.prototype.format=function(t){return n(this,t)}),Date.prototype.addMilliseconds||(Date.prototype.addMilliseconds=function(t){return a(this,t)}),Date.prototype.addDays||(Date.prototype.addDays=function(t){return r(this,t)}),Date.prototype.clone||(Date.prototype.clone=function(){return s(this)}),Date.isLeapYear||(Date.isLeapYear=function(t){return l(t)}),Date.getDaysInMonth||(Date.getDaysInMonth=function(t,e){return d(t,e)}),Date.prototype.isLeapYear||(Date.prototype.isLeapYear=function(){return l(this.getFullYear())}),Date.prototype.clearTime||(Date.prototype.clearTime=function(){return c(this)}),Date.prototype.getDaysInMonth||(Date.prototype.getDaysInMonth=function(){return h(this)}),Date.prototype.addMonths||(Date.prototype.addMonths=function(t){return u(this,t)}),Date.prototype.getLastWeekday||(Date.prototype.getLastWeekday=function(t){return p(this,t)}),Date.prototype.isSameDay||(Date.prototype.isSameDay=function(t){return f(t,this)}),Date.prototype.isSameWeek||(Date.prototype.isSameWeek=function(t){return g(t,this)}),Date.prototype.isSameYear||(Date.prototype.isSameYear=function(t){return m(this,t)}),Date.create||(Date.create=function(t){return i(t)}),Date.timestamp||(Date.timestamp=function(t){return o(t)}))}(window),function(){"use strict";const t=function(t,e){if(arguments.length>1){var i;if(2==arguments.length&&"object"==typeof e)for(var o in e)void 0!==e[o]&&(i=new RegExp("({"+o+"})","g"),t=t.replace(i,e[o]));else for(var n=1;n<arguments.length;n++)void 0!==arguments[n]&&(i=new RegExp("({["+(n-1)+"]})","g"),t=t.replace(i,arguments[n]))}return t},e=function(t){if(null!==t){var e,i;return i=/\d*/i,e=t.match(i),e==t}return!1},i={formatString:t,string:{format:t,isNum:e}};window.$&&window.$.zui?$.zui(i):window.stringHelper=i.string,window.noStringPrototypeHelper||(String.prototype.format||(String.prototype.format=function(){var e=[].slice.call(arguments);return e.unshift(this),t.apply(this,e)}),String.prototype.isNum||(String.prototype.isNum=function(){return e(this)}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){return(void 0===e||e>this.length)&&(e=this.length),this.substring(e-t.length,e)===t}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(t,e){return e=!e||e<0?0:+e,this.substring(e,e+t.length)===t}}),String.prototype.includes||(String.prototype.includes=function(){return String.prototype.indexOf.apply(this,arguments)!==-1}))}(),/*!
* jQuery resize event - v1.1
* http://benalman.com/projects/jquery-resize-plugin/
* Copyright (c) 2010 "Cowboy" Ben Alman
* MIT & GPL http://benalman.com/about/license/
*/
function(t,e,i){"$:nomunge";function o(){n=e[s](function(){a.each(function(){var e=t(this),i=e.width(),o=e.height(),n=t.data(this,d);i===n.w&&o===n.h||e.trigger(l,[n.w=i,n.h=o])}),o()},r[h])}var n,a=t([]),r=t.resize=t.extend(t.resize,{}),s="setTimeout",l="resize",d=l+"-special-event",h="delay",c="throttleWindow";r[h]=250,r[c]=!0,t.event.special[l]={setup:function(){if(!r[c]&&this[s])return!1;var e=t(this);a=a.add(e),t.data(this,d,{w:e.width(),h:e.height()}),1===a.length&&o()},teardown:function(){if(!r[c]&&this[s])return!1;var e=t(this);a=a.not(e),e.removeData(d),a.length||clearTimeout(n)},add:function(e){function o(e,o,a){var r=t(this),s=t.data(this,d)||{};s.w=o!==i?o:r.width(),s.h=a!==i?a:r.height(),n.apply(this,arguments)}if(!r[c]&&this[s])return!1;var n;return t.isFunction(e)?(n=e,o):(n=e.handler,void(e.handler=o))}}}(jQuery,this),function(t,e){"use strict";var i,o,n="localStorage",a="page_"+t.location.pathname+t.location.search,r=function(){this.silence=!0;try{n in t&&t[n]&&t[n].setItem&&(this.enable=!0,i=t[n])}catch(r){}this.enable||(o={},i={getLength:function(){var t=0;return e.each(o,function(){t++}),t},key:function(t){var i,n=0;return e.each(o,function(e){return n===t?(i=e,!1):void n++}),i},removeItem:function(t){delete o[t]},getItem:function(t){return o[t]},setItem:function(t,e){o[t]=e},clear:function(){o={}}}),this.storage=i,this.page=this.get(a,{})};r.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(a);else{var t,i=[];for(t in this.page){var o=this.page[t];null===o&&i.push(t)}for(t=i.length-1;t>=0;t--)delete this.page[i[t]];this.set(a,this.page)}},r.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},r.prototype.pageClear=function(){this.page={},this.pageSave()},r.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},r.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},r.prototype.check=function(){if(!this.enable&&!this.silence)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},r.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},r.prototype.removeItem=function(t){return i.removeItem(t),this},r.prototype.remove=function(t){return this.removeItem(t)},r.prototype.getItem=function(t){return i.getItem(t)},r.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},r.prototype.key=function(t){return i.key(t)},r.prototype.setItem=function(t,e){return i.setItem(t,e),this},r.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},r.prototype.clear=function(){return i.clear(),this},r.prototype.forEach=function(t){for(var e=this.length(),o=e-1;o>=0;o--){var n=i.key(o);t(n,this.get(n))}return this},r.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},r.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},r.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new r})}(window,jQuery),+function(t){"use strict";var e="zui.tab",i=function(e){this.element=t(e)};i.prototype.show=function(){var i=this.element,o=i.closest("ul:not(.dropdown-menu)"),n=i.attr("data-target")||i.attr("data-tab");if(n||(n=i.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!i.parent("li").hasClass("active")){var a=o.find(".active:last a")[0],r=t.Event("show."+e,{relatedTarget:a});if(i.trigger(r),!r.isDefaultPrevented()){var s=t(n);this.activate(i.parent("li"),o),this.activate(s,s.parent(),function(){i.trigger({type:"shown."+e,relatedTarget:a})})}}},i.prototype.activate=function(e,i,o){function n(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),o&&o()}var a=i.find("> .active"),r=o&&t.support.transition&&a.hasClass("fade");r?a.one(t.support.transition.end,n).emulateTransitionEnd(150):n(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=function(o){return this.each(function(){var n=t(this),a=n.data(e);a||n.data(e,a=new i(this)),"string"==typeof o&&a[o]()})},t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this},t(document).on("click.zui.tab.data-api",'[data-toggle="tab"], [data-tab]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),+function(t,e){"use strict";function i(e,i,a){return this.each(function(){var r=t(this),s=r.data(o),l=t.extend({},n.DEFAULTS,r.data(),"object"==typeof e&&e);s||r.data(o,s=new n(this,l)),"string"==typeof e?s[e](i,a):l.show&&s.show(i,a)})}var o="zui.modal",n=function(i,n){var a=this;a.options=n,a.$body=t(document.body),a.$element=t(i),a.$backdrop=a.isShown=null,a.scrollbarWidth=0,n.moveable===e&&(a.options.moveable=a.$element.hasClass("modal-moveable")),n.remote&&a.$element.find(".modal-content").load(n.remote,function(){a.$element.trigger("loaded."+o)}),n.scrollInside&&t(window).on("resize."+o,function(){a.isShown&&a.adjustPosition()})};n.VERSION="3.2.0",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var a=function(e,i){var o=t(window);i.left=Math.max(0,Math.min(i.left,o.width()-e.outerWidth())),i.top=Math.max(0,Math.min(i.top,o.height()-e.outerHeight())),e.css(i)};n.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},n.prototype.adjustPosition=function(i){var n=this,r=n.options;if(i===e&&(i=r.position),i!==e&&null!==i){t.isFunction(i)&&(i=i(n));var s=n.$element.find(".modal-dialog"),l=t(window).height(),d={maxHeight:"initial",overflow:"visible"},h=s.find(".modal-body").css(d);if(r.scrollInside&&h.length){var c=r.headerHeight,u=r.footerHeight,p=s.find(".modal-header"),f=s.find(".modal-footer");c="number"!=typeof c&&p.length?p.outerHeight():t.isFunction(c)?c(p):0,u="number"!=typeof u&&f.length?f.outerHeight():t.isFunction(u)?u(f):0,d.maxHeight=l-c-u,d.overflow=h[0].scrollHeight>d.maxHeight?"auto":"visible",h.css(d)}var g=Math.max(0,(l-s.outerHeight())/2);if("fit"===i?i={top:g>50?Math.floor(2*g/3):g}:"center"===i?i={top:g}:t.isPlainObject(i)||(i={top:i}),s.hasClass("modal-moveable")){var m=null,v=r.rememberPos;v&&(v===!0?m=n.$element.data("modal-pos"):t.zui.store&&(m=t.zui.store.pageGet(o+".rememberPos."+v))),i=t.extend(i,{left:Math.max(0,(t(window).width()-s.outerWidth())/2)},m),"inside"===r.moveable?a(s,i):s.css(i)}else s.css(i)}},n.prototype.setMoveable=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,i=e.options,n=e.$element.find(".modal-dialog").removeClass("modal-dragged");n.toggleClass("modal-moveable",!!i.moveable),e.$element.data("modal-moveable-setup")||n.draggable({container:e.$element,handle:".modal-header",before:function(){var t=n.css("margin-top");t&&"0px"!==t&&n.css("top",t).css("margin-top","").addClass("modal-dragged")},finish:function(n){var a=i.rememberPos;a&&(e.$element.data("modal-pos",n.pos),t.zui.store&&a!==!0&&t.zui.store.pageSet(o+".rememberPos."+a,n.pos))},move:"inside"!==i.moveable||function(t){a(n,t)}})},n.prototype.show=function(e,i){var a=this,r=t.Event("show."+o,{relatedTarget:e});a.$element.trigger(r),a.$element.toggleClass("modal-scroll-inside",!!a.options.scrollInside),a.isShown||r.isDefaultPrevented()||(a.isShown=!0,a.options.moveable&&a.setMoveable(),a.options.backdrop!==!1&&(a.$body.addClass("modal-open"),a.setScrollbar()),a.escape(),a.$element.on("click.dismiss."+o,'[data-dismiss="modal"]',function(t){a.hide(),t.stopPropagation()}),a.backdrop(function(){var r=t.support.transition&&a.$element.hasClass("fade");a.$element.parent().length||a.$element.appendTo(a.$body),a.$element.show().scrollTop(0),r&&a.$element[0].offsetWidth,a.$element.addClass("in").attr("aria-hidden",!1),a.adjustPosition(i),a.enforceFocus();var s=t.Event("shown."+o,{relatedTarget:e});r?a.$element.find(".modal-dialog").one("bsTransitionEnd",function(){a.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(n.TRANSITION_DURATION):a.$element.trigger("focus").trigger(s)}))},n.prototype.hide=function(e){e&&e.preventDefault&&e.preventDefault();var i=this;e=t.Event("hide."+o),i.$element.trigger(e),i.isShown&&!e.isDefaultPrevented()&&(i.isShown=!1,i.options.backdrop!==!1&&(i.$body.removeClass("modal-open"),i.resetScrollbar()),i.escape(),t(document).off("focusin."+o),i.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+o),t.support.transition&&i.$element.hasClass("fade")?i.$element.one("bsTransitionEnd",t.proxy(i.hideModal,i)).emulateTransitionEnd(n.TRANSITION_DURATION):i.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin."+o).on("focusin."+o,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+o,t.proxy(function(i){if(27==i.which){var n=t.Event("escaping."+o),a=this.$element.triggerHandler(n,"esc");if(a!=e&&!a)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+o)},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+o)})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,a=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&a;if(this.$backdrop=t('<div class="modal-backdrop '+a+'" />').appendTo(this.$body),this.$element.on("mousedown.dismiss."+o,t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;r?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},n.prototype.setScrollbar=function(){t.zui.fixBodyScrollbar()&&this.options.onSetScrollbar&&this.options.onSetScrollbar(paddingRight)},n.prototype.resetScrollbar=function(){t.zui.resetBodyScrollbar(),this.options.onSetScrollbar&&this.options.onSetScrollbar("")},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var r=t.fn.modal;t.fn.modal=i,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=r,this},t(document).on("click."+o+".data-api",'[data-toggle="modal"]',function(e){var n=t(this),a=n.attr("href"),r=null;try{r=t(n.attr("data-target")||a&&a.replace(/.*(?=#[^\s]+$)/,""))}catch(s){return}if(r.length){var l=r.data(o)?"toggle":t.extend({remote:!/#/.test(a)&&a},r.data(),n.data());n.is("a")&&e.preventDefault(),r.one("show."+o,function(t){t.isDefaultPrevented()||r.one("hidden."+o,function(){n.is(":visible")&&n.trigger("focus")})}),i.call(r,l,this,n.data("position"))}})}(jQuery,void 0),function(t,e,i){"use strict";if(!t.fn.modal)throw new Error("Modal trigger requires modal.js");var o="zui.modaltrigger",n="ajax",a=".zui.modal",r="string",s=function(e,i){e=t.extend({},s.DEFAULTS,t.ModalTriggerDefaults,i?i.data():null,e),this.isShown,this.$trigger=i,this.options=e,this.id=t.zui.uuid()};s.DEFAULTS={type:"custom",height:"auto",name:"triggerModal",fade:!0,position:"fit",showHeader:!0,delay:0,backdrop:!0,keyboard:!0,waittime:0,loadingIcon:"icon-spinner-indicator",scrollInside:!1},s.prototype.initOptions=function(i){if(i.url&&(!i.type||i.type!=n&&"iframe"!=i.type)&&(i.type=n),i.remote)i.type=n,typeof i.remote===r&&(i.url=i.remote);else if(i.iframe)i.type="iframe",typeof i.iframe===r&&(i.url=i.iframe);else if(i.custom&&(i.type="custom",typeof i.custom===r)){var o;try{o=t(i.custom)}catch(a){}o&&o.length?i.custom=o:t.isFunction(e[i.custom])&&(i.custom=e[i.custom])}return i},s.prototype.init=function(e){var i=this,n=t("#"+e.name);n.length&&(i.isShown||n.off(a),n.remove()),n=t('<div id="'+e.name+'" class="modal modal-trigger '+(e.className||"")+'">'+("string"==typeof e.loadingIcon&&0===e.loadingIcon.indexOf("icon-")?'<div class="icon icon-spin loader '+e.loadingIcon+'"></div>':e.loadingIcon)+'<div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button class="close" data-dismiss="modal">×</button><h4 class="modal-title"><i class="modal-icon"></i> <span class="modal-title-name"></span></h4></div><div class="modal-body"></div></div></div></div>').appendTo("body").data(o,i);var r=function(i,o){var r=e[i];t.isFunction(r)&&n.on(o+a,r)};r("onShow","show"),r("shown","shown"),r("onHide","hide"),r("hidden","hidden"),r("loaded","loaded"),n.on("shown"+a,function(){i.isShown=!0}).on("hidden"+a,function(){i.isShown=!1}),this.$modal=n,this.$dialog=n.find(".modal-dialog"),e.mergeOptions&&(this.options=e)},s.prototype.show=function(i){var a=this,l=t.extend({},s.DEFAULTS,a.options,{url:a.$trigger?a.$trigger.attr("href")||a.$trigger.attr("data-url")||a.$trigger.data("url"):a.options.url},i),d=a.isShown;l=a.initOptions(l),d||a.init(l);var h=a.$modal,c=h.find(".modal-dialog"),u=l.custom,p=c.find(".modal-body").css("padding","").toggleClass("load-indicator loading",!!d),f=c.find(".modal-header"),g=c.find(".modal-content");h.toggleClass("fade",l.fade).addClass(l.className).toggleClass("modal-loading",!d).toggleClass("modal-scroll-inside",!!l.scrollInside),c.toggleClass("modal-md","md"===l.size).toggleClass("modal-sm","sm"===l.size).toggleClass("modal-lg","lg"===l.size).toggleClass("modal-fullscreen","fullscreen"===l.size),f.toggle(l.showHeader),f.find(".modal-icon").attr("class","modal-icon icon-"+l.icon),f.find(".modal-title-name").text(l.title||""),l.size&&"fullscreen"===l.size&&(l.width="",l.height="");var m=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){a.adjustPosition(l.position)},100)},v=function(t,e){return"undefined"==typeof t&&(t=l.delay),setTimeout(function(){c=h.find(".modal-dialog"),l.width&&"auto"!=l.width&&c.css("width",l.width),l.height&&"auto"!=l.height&&(c.css("height",l.height),"iframe"===l.type&&p.css("height",c.height()-f.outerHeight())),a.adjustPosition(l.position),h.removeClass("modal-loading").removeClass("modal-updating"),d&&p.removeClass("loading"),"iframe"!=l.type&&(p=c.off("resize."+o).find(".modal-body").off("resize."+o),(p.length?p:c).on("resize."+o,m)),e&&e()},t)};if("custom"===l.type&&u)if(t.isFunction(u)){var y=u({modal:h,options:l,modalTrigger:a,ready:v});typeof y===r&&(p.html(y),v())}else u instanceof t?(p.html(t("<div>").append(u.clone()).html()),v()):(p.html(u),v());else if(l.url){var w=function(){var t=h.callComEvent(a,"broken");"string"==typeof t&&p.html(t),v()};if(h.attr("ref",l.url),"iframe"===l.type){h.addClass("modal-iframe"),this.firstLoad=!0;var b="iframe-"+l.name;f.detach(),p.detach(),g.empty().append(f).append(p),p.css("padding",0).html('<iframe id="'+b+'" name="'+b+'" src="'+l.url+'" frameborder="no" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true" scrolling="auto" style="width: 100%; height: 100%; left: 0px;"></iframe>'),l.waittime>0&&(a.waitTimeout=v(l.waittime,w));var C=document.getElementById(b);C.onload=C.onreadystatechange=function(i){var n=!!l.scrollInside;if(a.firstLoad&&h.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){a.firstLoad=!1,l.waittime>0&&clearTimeout(a.waitTimeout);try{h.attr("ref",C.contentWindow.location.href);var r=e.frames[b].$;if(r&&"auto"===l.height&&"fullscreen"!=l.size){var s=r("body").addClass("body-modal").toggleClass("body-modal-scroll-inside",n);l.iframeBodyClass&&s.addClass(l.iframeBodyClass);var d=[],c=function(i){h.removeClass("fade");var o=s.outerHeight();if(i===!0&&l.onlyIncreaseHeight&&(o=Math.max(o,p.data("minModalHeight")||0),p.data("minModalHeight",o)),n){var a=l.headerHeight;"number"!=typeof a?a=f.outerHeight():t.isFunction(a)&&(a=a(f));var r=t(e).height();o=Math.min(o,r-a)}for(d.length>1&&o===d[0]&&(o=Math.max(o,d[1])),d.push(o);d.length>2;)d.shift();p.css("height",o),l.fade&&h.addClass("fade"),v()};h.callComEvent(a,"loaded",{modalType:"iframe",jQuery:r}),setTimeout(c,100),s.off("resize."+o).on("resize."+o,c),n&&t(e).off("resize."+o).on("resize."+o,c)}else v();var u=l.handleLinkInIframe;u&&r("body").on("click","string"==typeof u?u:"a[href]",function(){t(this).is('[data-toggle="modal"]')||h.addClass("modal-updating")}),l.iframeStyle&&r("head").append("<style>"+l.iframeStyle+"</style>")}catch(i){v()}}}}else t.ajax(t.extend({url:l.url,success:function(i){try{var r=t(i);r.filter(".modal-dialog").length?c.parent().empty().append(r):r.filter(".modal-content").length?c.find(".modal-content").replaceWith(r):p.wrapInner(r)}catch(s){e.console&&e.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:s,data:i}),h.html(i)}h.callComEvent(a,"loaded",{modalType:n}),v(),l.scrollInside&&t(e).off("resize."+o).on("resize."+o,m)},error:w},l.ajaxOptions))}d||h.modal({show:"show",backdrop:l.backdrop,moveable:l.moveable,rememberPos:l.rememberPos,keyboard:l.keyboard,scrollInside:l.scrollInside})},s.prototype.close=function(i,o){var n=this;(i||o)&&n.$modal.on("hidden"+a,function(){t.isFunction(i)&&i(),typeof o===r&&o.length&&!n.$modal.data("cancel-reload")&&("this"===o?e.location.reload():e.location=o)}),n.$modal.modal("hide")},s.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},s.prototype.adjustPosition=function(e){e=e===i?this.options.position:e,t.isFunction(e)&&(e=e(this)),this.$modal.modal("adjustPosition",e)},t.zui({ModalTrigger:s,modalTrigger:new s}),t.fn.modalTrigger=function(e,i){return t(this).each(function(){var n=t(this),a=n.data(o),l=t.extend({title:n.attr("title")||n.text(),url:n.attr("href"),type:n.hasClass("iframe")?"iframe":""},n.data(),t.isPlainObject(e)&&e);a||n.data(o,a=new s(l,n)),typeof e==r?a[e](i):l.show&&a.show(i),n.on((l.trigger||"click")+".toggle."+o,function(e){l=t.extend(l,{url:n.attr("href")||n.attr("data-url")||n.data("url")||l.url}),a.toggle(l),n.is("a")&&e.preventDefault()})})};var l=t.fn.modal;t.fn.modal=function(e,i){return t(this).each(function(){var o=t(this);o.hasClass("modal")?l.call(o,e,i):o.modalTrigger(e,i)})},t.fn.modal.bs=l;var d=function(e){return e?e=t(e):(e=t(".modal.modal-trigger"),!e.length),e&&e instanceof t?e:null},h=function(i,n,a){var r=i;if(t.isFunction(i)){var s=a;a=n,n=i,i=s}i=d(i),i&&i.length?i.each(function(){t(this).data(o).close(n,a)}):t("body").hasClass("modal-open")||t(".modal.in").length||t("body").hasClass("body-modal")&&e.parent.$.zui.closeModal(r,n,a)},c=function(t,e){e=d(e),e&&e.length&&e.modal("adjustPosition",t)},u=function(e,i){"string"==typeof e&&(e={url:e});var n=d(i);n&&n.length&&n.each(function(){t(this).data(o).show(e)})};t.zui({reloadModal:u,closeModal:h,ajustModalPosition:c,adjustModalPosition:c}),t(document).on("click."+o+".data-api",'[data-toggle="modal"]',function(e){var i=t(this),n=i.attr("href"),a=null;try{a=t(i.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,""))}catch(r){}a&&a.length||(i.data(o)?i.trigger(".toggle."+o):i.modalTrigger({show:!0})),i.is("a")&&e.preventDefault()}).on("click."+o+".data-api",'[data-dismiss="modal"]',function(){t.zui.closeModal()})}(window.jQuery,window,void 0),+function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,o){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o);for(var n=this.options.trigger.split(" "),a=n.length;a--;){var r=n[a];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var s="hover"==r?"mouseenter":"focus",l="hover"==r?"mouseleave":"blur";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if((e||this.hasContent())&&this.enabled){var o=this;if(o.$element.trigger(i),i.isDefaultPrevented())return;var n=o.tip();o.setContent(e),o.options.animation&&n.addClass("fade");var a="function"==typeof o.options.placement?o.options.placement.call(o,n[0],o.$element[0]):o.options.placement,r=/\s?auto?\s?/i,s=r.test(a);s&&(a=a.replace(r,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(a),o.options.container?n.appendTo(o.options.container):n.insertAfter(o.$element);var l=o.getPosition(),d=n[0].offsetWidth,h=n[0].offsetHeight;if(s){var c=o.$element.parent(),u=a,p=document.documentElement.scrollTop||document.body.scrollTop,f="body"==o.options.container?window.innerWidth:c.outerWidth(),g="body"==o.options.container?window.innerHeight:c.outerHeight(),m="body"==o.options.container?0:c.offset().left;a="bottom"==a&&l.top+l.height+h-p>g?"top":"top"==a&&l.top-p-h<0?"bottom":"right"==a&&l.right+d>f?"left":"left"==a&&l.left-d<m?"right":a,n.removeClass(u).addClass(a)}var v=o.getCalculatedOffset(a,l,d,h);o.applyPlacement(v,a);var y=function(){var t=o.hoverState;o.$element.trigger("shown.zui."+o.type),o.hoverState=null,"out"==t&&o.leave(o)};t.support.transition&&o.$tip.hasClass("fade")?n.one("bsTransitionEnd",y).emulateTransitionEnd(150):y()}},e.prototype.applyPlacement=function(t,e){var i,o=this.tip(),n=o[0].offsetWidth,a=o[0].offsetHeight,r=parseInt(o.css("margin-top"),10),s=parseInt(o.css("margin-left"),10);isNaN(r)&&(r=0),isNaN(s)&&(s=0),t.top=t.top+r,t.left=t.left+s,o.offset(t).addClass("in");var l=o[0].offsetWidth,d=o[0].offsetHeight;if("top"==e&&d!=a&&(i=!0,t.top=t.top+a-d),/bottom|top/.test(e)){var h=0;t.left<0&&(h=t.left*-2,t.left=0,o.offset(t),l=o[0].offsetWidth,d=o[0].offsetHeight),this.replaceArrow(h-n+l,l,"left")}else this.replaceArrow(d-a,d,"top");i&&o.offset(t)},e.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},e.prototype.setContent=function(t){var e=this.tip(),i=t||this.getTitle();this.options.tipId&&e.attr("id",this.options.tipId),this.options.tipClass&&e.addClass(this.options.tipClass),e.find(".tooltip-inner")[this.options.html?"html":"text"](i),e.removeClass("fade in top bottom left right")},e.prototype.hide=function(){function e(){"in"!=i.hoverState&&o.detach()}var i=this,o=this.tip(),n=t.Event("hide.zui."+this.type);if(this.$element.trigger(n),!n.isDefaultPrevented())return o.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?o.one(t.support.transition.end,e).emulateTransitionEnd(150):e(),this.$element.trigger("hidden.zui."+this.type),this},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(){var e=this.$element[0];return t.extend({},"function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight},this.$element.offset())},e.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},e.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},e.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.prototype.toggle=function(e){var i=e?t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type):this;i.tip().hasClass("in")?i.leave(i):i.enter(i)},e.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("zui."+this.type)};var i=t.fn.tooltip;t.fn.tooltip=function(i,o){return this.each(function(){var n=t(this),a=n.data("zui.tooltip"),r="object"==typeof i&&i;a||n.data("zui.tooltip",a=new e(this,r)),"string"==typeof i&&a[i](o)})},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(window.jQuery),+function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),o=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](o),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,o=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return!!o&&("$next"==o?e.next(".popover"):t(o))},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var o=t(this),n=o.data("zui.popover"),a="object"==typeof i&&i;n||o.data("zui.popover",n=new e(this,a)),"string"==typeof i&&n[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),+function(t){"use strict";function e(){t(n).remove(),t(a).each(function(e){var n=i(t(this));n.hasClass("open")&&(n.trigger(e=t.Event("hide."+o)),e.isDefaultPrevented()||n.removeClass("open").trigger("hidden."+o))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o;try{o=i&&t(i)}catch(n){}return o&&o.length?o:e.parent()}var o="zui.dropdown",n=".dropdown-backdrop",a="[data-toggle=dropdown]",r=function(e){t(e).on("click."+o,this.toggle)};r.prototype.toggle=function(n){var a=t(this);if(!a.is(".disabled, :disabled")){var r=i(a),s=r.hasClass("open");if(e(),!s){if("ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e),r.trigger(n=t.Event("show."+o)),n.isDefaultPrevented())return;r.toggleClass("open").trigger("shown."+o),a.focus()}return!1}},r.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var o=t(this);if(e.preventDefault(),e.stopPropagation(),!o.is(".disabled, :disabled")){var n=i(o),r=n.hasClass("open");if(!r||r&&27==e.keyCode)return 27==e.which&&n.find(a).focus(),o.click();var s=t("[role=menu] li:not(.divider):visible a",n);if(s.length){var l=s.index(s.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l<s.length-1&&l++,~l||(l=0),s.eq(l).focus()}}}};var s=t.fn.dropdown;t.fn.dropdown=function(e){return this.each(function(){var i=t(this),o=i.data("dropdown");o||i.data("dropdown",o=new r(this)),"string"==typeof e&&o[e].call(i)})},t.fn.dropdown.Constructor=r,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this};var l=o+".data-api";t(document).on("click."+l,e).on("click."+l,".dropdown form",function(t){t.stopPropagation()}).on("click."+l,a,r.prototype.toggle).on("keydown."+l,a+", [role=menu]",r.prototype.keydown)}(window.jQuery),+function(t){"use strict";var e=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",t.proxy(this.pause,this)).on("mouseleave",t.proxy(this.cycle,this))};e.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,touchable:!0},e.prototype.touchable=function(){function e(e){var e=e||window.event;e.originalEvent&&(e=e.originalEvent);var a=t(this);switch(e.type){case"touchstart":o=e.touches[0].pageX,n=e.touches[0].pageY;break;case"touchend":var r=e.changedTouches[0].pageX-o,s=e.changedTouches[0].pageY-n;if(Math.abs(r)>Math.abs(s))i(a,r),Math.abs(r)>10&&e.preventDefault();else{var l=t(window);t("body,html").animate({scrollTop:l.scrollTop()-s},400)}}}function i(t,e){e>10?a.prev():e<-10&&a.next()}if(this.options.touchable){this.$element.on("touchstart touchmove touchend",e);var o,n,a=this}},e.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},e.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},e.prototype.to=function(e){var i=this,o=this.getActiveIndex();if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid",function(){i.to(e)}):o==e?this.pause().cycle():this.slide(e>o?"next":"prev",t(this.$items[e]))},e.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),
this.cycle(!0)),this.interval=clearInterval(this.interval),this},e.prototype.next=function(){if(!this.sliding)return this.slide("next")},e.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},e.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),n=i||o[e](),a=this.interval,r="next"==e?"left":"right",s="next"==e?"first":"last",l=this;if(!n.length){if(!this.options.wrap)return;n=this.$element.find(".item")[s]()}this.sliding=!0,a&&this.pause();var d=t.Event("slide.zui.carousel",{relatedTarget:n[0],direction:r});if(!n.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var e=t(l.$indicators.children()[l.getActiveIndex()]);e&&e.addClass("active")})),t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;n.addClass(e),n[0].offsetWidth,o.addClass(r),n.addClass(r),o.one(t.support.transition.end,function(){n.removeClass([e,r].join(" ")).addClass("active"),o.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;o.removeClass("active"),n.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return a&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=function(i){return this.each(function(){var o=t(this),n=o.data("zui.carousel"),a=t.extend({},e.DEFAULTS,o.data(),"object"==typeof i&&i),r="string"==typeof i?i:a.slide;n||o.data("zui.carousel",n=new e(this,a)),"number"==typeof i?n.to(i):r?n[r]():a.interval&&n.pause().cycle(),a.touchable&&n.touchable()})},t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this},t(document).on("click.zui.carousel.data-api","[data-slide], [data-slide-to]",function(e){var i,o=t(this),n=t(o.attr("data-target")||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),a=t.extend({},n.data(),o.data()),r=o.attr("data-slide-to");r&&(a.interval=!1),n.carousel(a),(r=o.attr("data-slide-to"))&&n.data("zui.carousel").to(r),e.preventDefault()}),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var e=t(this);e.carousel(e.data())})})}(window.jQuery);