UNPKG

metro4

Version:

The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style

8 lines (7 loc) 578 kB
/* * Metro 4 Components Library v4.4.3 (https://metroui.org.ua) * Copyright 2012-2020 Sergey Pimenov * Built at 27/12/2020 15:34:21 * Licensed under MIT */ !function(e,u){"use strict";var t,i,s,n,a,o,r,l,c,d,h,p,f,m,v,g=["opacity","zIndex"];function C(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function x(e){return e===u||null===e}function w(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}function b(e){return!(!e||"[object Object]"!==Object.prototype.toString.call(e))&&(!(e=e.prototype!==u)||e.constructor&&"function"==typeof e.constructor)}function y(e){for(var t in e)if(D(e,t))return!1;return!0}function _(e){return e instanceof Object&&"length"in e}function S(e,t){return t=t||" ",e.split(t).map(function(e){return(""+e).trim()}).filter(function(e){return""!==e})}function T(e,t){return t=t||[0,""],e=String(e),t[0]=parseFloat(e),t[1]=e.match(/[\d.\-+]*\s*(.*)/)[1]||"",t}function k(e,t){e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);return void 0!==e[1]?e[1]:t}function E(e,t,n){t=w(t),-1<["scrollLeft","scrollTop"].indexOf(t)?e[t]=parseInt(n):e.style[t]=isNaN(n)||-1<g.indexOf(""+t)?n:n+"px"}function I(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function A(e,t,n){var i;return x(n)&&1===e.nodeType&&(i="data-"+t.replace(/[A-Z]/g,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))?(n=function(t){try{return JSON.parse(t)}catch(e){return t}}(n),ee.set(e,t,n)):n=u),n}function M(e){return"string"!=typeof e?u:e.replace(/-/g,"").toLowerCase()}function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function O(e){e=e||window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"[::1]"===e||""===e||null!==e.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)}function P(e){delete s[e]}function N(e){if(n)setTimeout(N,0,e);else{var t=s[e];if(t){n=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(u,n)}}(t)}finally{P(e),n=!1}}}}function L(e){return"[object Array]"===Object.prototype.toString.call(e)}function R(){for(var e=0;e<m.length;e++)m[e][0](m[e][1]);v=!(m=[])}function B(e,t){m.push([e,t]),v||(v=!0,f(R,0))}function V(e,t){function n(e){j(t,e)}try{e(function(e){F(t,e)},n)}catch(e){n(e)}}function H(t){var e=t.owner,n=e.state_,i=e.data_,s=t[n],t=t.then;if("function"==typeof s){n=d;try{i=s(i)}catch(e){j(t,e)}}z(t,i)||(n===d&&F(t,i),n===h&&j(t,i))}function z(t,n){var i;try{if(t===n)throw new TypeError("A promises callback cannot return that same promise.");if(n&&("function"==typeof n||"object"==typeof n)){var e=n.then;if("function"==typeof e)return e.call(n,function(e){i||(i=!0,(n!==e?F:U)(t,e))},function(e){i||(i=!0,j(t,e))}),1}}catch(e){return i||j(t,e),1}}function F(e,t){e!==t&&z(e,t)||U(e,t)}function U(e,t){e.state_===l&&(e.state_=c,e.data_=t,B(W,e))}function j(e,t){e.state_===l&&(e.state_=c,e.data_=t,B(G,e))}function q(e){var t=e.then_;e.then_=u;for(var n=0;n<t.length;n++)H(t[n])}function W(e){e.state_=d,q(e)}function G(e){e.state_=h,q(e)}function Y(e){if("function"!=typeof e)throw new TypeError("Promise constructor takes a function argument");if(!(this instanceof Y))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[],V(e,this)}(t="undefined"==typeof self?void 0===e?window:e:self).setImmediate||(i=1,n=!(s={}),K=(K=Object.getPrototypeOf&&Object.getPrototypeOf(t))&&K.setTimeout?K:t,a="[object process]"==={}.toString.call(t.process)?function(e){t.process.nextTick(function(){N(e)})}:t.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){N(e.data)},function(e){r.port2.postMessage(e)}):(o="setImmediate$"+Math.random()+"$",t.addEventListener("message",function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&N(+e.data.slice(o.length))},!1),function(e){t.postMessage(o+e,"*")}),K.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];return s[i]={callback:e,args:t},a(i),i++},K.clearImmediate=P),(K=window).Promise||(l="pending",c="sealed",d="fulfilled",h="rejected",p=function(){},f="undefined"!=typeof setImmediate?setImmediate:setTimeout,m=[],Y.prototype={constructor:Y,state_:l,then_:null,data_:u,then:function(e,t){t={owner:this,then:new this.constructor(p),fulfilled:e,rejected:t};return this.state_===d||this.state_===h?B(H,t):this.then_.push(t),t.then},done:function(e){return this.then(e,null)},always:function(e){return this.then(e,e)},catch:function(e){return this.then(null,e)}},Y.all=function(o){if(!L(o))throw new TypeError("You must pass an array to Promise.all().");return new this(function(n,e){var i=[],s=0;for(var t,a=0;a<o.length;a++)(t=o[a])&&"function"==typeof t.then?t.then(function(t){return s++,function(e){i[t]=e,--s||n(i)}}(a),e):i[a]=t;s||n(i)})},Y.race=function(s){if(!L(s))throw new TypeError("You must pass an array to Promise.race().");return new this(function(e,t){for(var n,i=0;i<s.length;i++)(n=s[i])&&"function"==typeof n.then?n.then(e,t):e(n)})},Y.resolve=function(t){return t&&"object"==typeof t&&t.constructor===this?t:new this(function(e){e(t)})},Y.reject=function(n){return new this(function(e,t){t(n)})},void 0===K.Promise&&(K.Promise=Y));var K="v1.0.10. Built at 08/12/2020 00:01:48",J=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector,$=function(e,t){return new $.init(e,t)};$.version=K,$.fn=$.prototype={version:K,constructor:$,length:0,uid:"",push:[].push,sort:[].sort,splice:[].splice,indexOf:[].indexOf,reverse:[].reverse},$.extend=$.fn.extend=function(){var e,t,n=arguments[0]||{},i=1,s=arguments.length;for("object"!=typeof n&&"function"!=typeof n&&(n={}),i===s&&(n=this,i--);i<s;i++)if(null!=(e=arguments[i]))for(t in e)D(e,t)&&(n[t]=e[t]);return n},$.assign=function(){var e,t,n=arguments[0]||{},i=1,s=arguments.length;for("object"!=typeof n&&"function"!=typeof n&&(n={}),i===s&&(n=this,i--);i<s;i++)if(null!=(e=arguments[i]))for(t in e)D(e,t)&&e[t]!==u&&(n[t]=e[t]);return n};function X(){return Date.now()}function Q(e){var t=document.createElement("script");if(t.type="text/javascript",x(e))return $(t);e=$(e)[0];return e.src?t.src=e.src:t.textContent=e.innerText,document.body.appendChild(t),e.parentNode&&e.parentNode.removeChild(e),t}$.extend({intervalId:-1,intervalQueue:[],intervalTicking:!1,intervalTickId:null,setInterval:function(e,t){var n,i=this;return this.intervalId++,this.intervalQueue.push({id:this.intervalId,fn:e,interval:t,lastTime:X()}),this.intervalTicking||(n=function(){i.intervalTickId=requestAnimationFrame(n),$.each(i.intervalQueue,function(){var e=this;(e.interval<17||X()-e.lastTime>=e.interval)&&(e.fn(),e.lastTime=X())})},this.intervalTicking=!0,n()),this.intervalId},clearInterval:function(e){for(var t=0;t<this.intervalQueue.length;t++)if(e===this.intervalQueue[t].id){this.intervalQueue.splice(t,1);break}0===this.intervalQueue.length&&(cancelAnimationFrame(this.intervalTickId),this.intervalTicking=!1)},setTimeout:function(e,t){var n=this,i=this.setInterval(function(){n.clearInterval(i),e()},t);return i},clearTimeout:function(e){return this.clearInterval(e)}}),$.fn.extend({index:function(e){var t,n=-1;return 0===this.length?n:(t=x(e)?this[0]:e instanceof $&&0<e.length?e[0]:"string"==typeof e?$(e)[0]:u,x(t)||t&&t.parentNode&&$.each(t.parentNode.children,function(e){this===t&&(n=e)}),n)},get:function(e){return e===u?this.items():e<0?this[e+this.length]:this[e]},eq:function(e){return!x(e)&&0<this.length?$.extend($(this.get(e)),{_prevObj:this}):this},is:function(t){var n=!1;return 0!==this.length&&(t instanceof $?this.same(t):(":selected"===t?this.each(function(){this.selected&&(n=!0)}):":checked"===t?this.each(function(){this.checked&&(n=!0)}):":visible"===t?this.each(function(){C(this)&&(n=!0)}):":hidden"===t?this.each(function(){var e=getComputedStyle(this);"hidden"!==this.getAttribute("type")&&!this.hidden&&"none"!==e.display&&"hidden"!==e.visibility&&0!==parseInt(e.opacity)||(n=!0)}):"string"==typeof t&&-1===[":selected"].indexOf(t)?this.each(function(){J.call(this,t)&&(n=!0)}):_(t)?this.each(function(){var e=this;$.each(t,function(){e===this&&(n=!0)})}):"object"==typeof t&&1===t.nodeType&&this.each(function(){this===t&&(n=!0)}),n))},same:function(e){var t=!0;return e instanceof $||(e=$(e)),this.length===e.length&&(this.each(function(){-1===e.items().indexOf(this)&&(t=!1)}),t)},last:function(){return this.eq(this.length-1)},first:function(){return this.eq(0)},odd:function(){var e=this.filter(function(e,t){return t%2==0});return $.extend(e,{_prevObj:this})},even:function(){var e=this.filter(function(e,t){return t%2!=0});return $.extend(e,{_prevObj:this})},filter:function(e){var t;return"string"==typeof e&&(t=e,e=function(e){return J.call(e,t)}),$.extend($.merge($(),[].filter.call(this,e)),{_prevObj:this})},find:function(e){var t,n=[];return e instanceof $?e:(t=0===this.length?this:(this.each(function(){void 0!==this.querySelectorAll&&(n=n.concat([].slice.call(this.querySelectorAll(e))))}),$.merge($(),n)),$.extend(t,{_prevObj:this}))},contains:function(e){return 0<this.find(e).length},children:function(t){var e,n=[];return t instanceof $?t:(this.each(function(){for(e=0;e<this.children.length;e++)1===this.children[e].nodeType&&n.push(this.children[e])}),n=t?n.filter(function(e){return J.call(e,t)}):n,$.extend($.merge($(),n),{_prevObj:this}))},parent:function(t){var e=[];if(0!==this.length)return t instanceof $?t:(this.each(function(){this.parentNode&&-1===e.indexOf(this.parentNode)&&e.push(this.parentNode)}),e=t?e.filter(function(e){return J.call(e,t)}):e,$.extend($.merge($(),e),{_prevObj:this}))},parents:function(t){var n=[];if(0!==this.length)return t instanceof $?t:(this.each(function(){for(var e=this.parentNode;e;)1===e.nodeType&&-1===n.indexOf(e)&&(x(t)||J.call(e,t))&&n.push(e),e=e.parentNode}),$.extend($.merge($(),n),{_prevObj:this}))},siblings:function(t){var n=[];if(0!==this.length)return t instanceof $?t:(this.each(function(){var e=this;e.parentNode&&$.each(e.parentNode.children,function(){e!==this&&n.push(this)})}),t&&(n=n.filter(function(e){return J.call(e,t)})),$.extend($.merge($(),n),{_prevObj:this}))},_siblingAll:function(t,n){var i=[];if(0!==this.length)return n instanceof $?n:(this.each(function(){for(var e=this;e=e&&e[t];)i.push(e)}),n&&(i=i.filter(function(e){return J.call(e,n)})),$.extend($.merge($(),i),{_prevObj:this}))},_sibling:function(t,n){var i=[];if(0!==this.length)return n instanceof $?n:(this.each(function(){var e=this[t];e&&1===e.nodeType&&i.push(e)}),n&&(i=i.filter(function(e){return J.call(e,n)})),$.extend($.merge($(),i),{_prevObj:this}))},prev:function(e){return this._sibling("previousElementSibling",e)},next:function(e){return this._sibling("nextElementSibling",e)},prevAll:function(e){return this._siblingAll("previousElementSibling",e)},nextAll:function(e){return this._siblingAll("nextElementSibling",e)},closest:function(t){var n=[];if(0!==this.length)return t instanceof $?t:t?(this.each(function(){for(var e=this;e&&e;){if(J.call(e,t))return void n.push(e);e=e.parentElement}}),$.extend($.merge($(),n.reverse()),{_prevObj:this})):this.parent(t)},has:function(e){var t=[];if(0!==this.length)return this.each(function(){0<$(this).children(e).length&&t.push(this)}),$.extend($.merge($(),t),{_prevObj:this})},back:function(e){var t;if(!0===e)for(t=this._prevObj;t&&t._prevObj;)t=t._prevObj;else t=this._prevObj||this;return t}}),$.extend({script:function(e){if(x(e))return Q();e=$(e)[0];e.tagName&&"SCRIPT"===e.tagName?Q(e):$.each($(e).find("script"),function(){Q(this)})}}),$.fn.extend({script:function(){return this.each(function(){$.script(this)})}}),$.fn.extend({_prop:function(e,t){return 1===arguments.length?0===this.length?u:this[0][e]:(x(t)&&(t=""),this.each(function(){this[e]=t,"innerHTML"===e&&$.script(this)}))},prop:function(e,t){return 1===arguments.length?this._prop(e):this._prop(e,void 0===t?"":t)},val:function(t){return x(t)?0===this.length?u:this[0].value:this.each(function(){var e=$(this);void 0!==this.value?this.value=t:e.html(t)})},html:function(e){var t=[];return 0===arguments.length?this._prop("innerHTML"):(e instanceof $?e.each(function(){t.push($(this).outerHTML())}):t.push(e),this._prop("innerHTML",1===t.length&&x(t[0])?"":t.join("\n")),this)},outerHTML:function(){return this._prop("outerHTML")},text:function(e){return 0===arguments.length?this._prop("textContent"):this._prop("textContent",void 0===e?"":e)},innerText:function(e){return 0===arguments.length?this._prop("innerText"):this._prop("innerText",void 0===e?"":e)},empty:function(){return this.each(function(){void 0!==this.innerHTML&&(this.innerHTML="")})},clear:function(){return this.empty()}}),$.each=function(e,n){var t=0;if(_(e))[].forEach.call(e,function(e,t){n.apply(e,[t,e])});else for(var i in e)D(e,i)&&n.apply(e[i],[i,e[i],t++]);return e},$.fn.extend({each:function(e){return $.each(this,e)}});var Z=function(e){this.expando="DATASET:UID:"+e.toUpperCase(),Z.uid++};Z.uid=-1,Z.prototype={cache:function(e){var t=e[this.expando];return t||(t={},I(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,s=this.cache(e);if("string"==typeof t)s[w(t)]=n;else for(i in t)D(t,i)&&(s[w(i)]=t[i]);return s},get:function(e,t){return t===u?this.cache(e):e[this.expando]&&e[this.expando][w(t)]},access:function(e,t,n){return t===u||t&&"string"==typeof t&&n===u?this.get(e,t):(this.set(e,t,n),n!==u?n:t)},remove:function(e,t){var n,i=e[this.expando];if(i!==u){if(t!==u){n=(t=Array.isArray(t)?t.map(w):(t=w(t))in i?[t]:t.match(/[^\x20\t\r\n\f]+/g)||[]).length;for(;n--;)delete i[t[n]]}return t!==u&&!y(i)||(e.nodeType?e[this.expando]=u:delete e[this.expando]),!0}},hasData:function(e){e=e[this.expando];return e!==u&&!y(e)}};var ee=new Z("m4q");function te(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}$.extend({hasData:function(e){return ee.hasData(e)},data:function(e,t,n){return ee.access(e,t,n)},removeData:function(e,t){return ee.remove(e,t)},dataSet:function(e){if(x(e))return ee;if(-1<["INTERNAL","M4Q"].indexOf(e.toUpperCase()))throw Error("You can not use reserved name for your dataset");return new Z(e)}}),$.fn.extend({data:function(e,t){var n,i,s,a,o,r;if(0!==this.length){if(i=this[0],0!==arguments.length)return 1===arguments.length?((n=ee.get(i,e))===u&&1===i.nodeType&&i.hasAttribute("data-"+e)&&(n=i.getAttribute("data-"+e)),n):this.each(function(){ee.set(this,e,t)});if(this.length&&(s=ee.get(i),1===i.nodeType))for(r=(a=i.attributes).length;r--;)a[r]&&0===(o=a[r].name).indexOf("data-")&&A(i,o=w(o.slice(5)),s[o]);return s}},removeData:function(e){return this.each(function(){ee.remove(this,e)})},origin:function(e,t,n){if(0===this.length)return this;if(x(e)&&x(t))return $.data(this[0]);if(x(t)){var i=$.data(this[0],"origin-"+e);return x(i)?n:i}return this.data("origin-"+e,t),this}}),$.extend({device:/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),localhost:O(),isLocalhost:O,touchable:"ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints,uniqueId:function(e){var n=(new Date).getTime();return x(e)&&(e="m4q"),(""!==e?e+"-":"")+"xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)})},toArray:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},import:function(e){var t=[];return this.each(e,function(){t.push(this)}),this.merge($(),t)},merge:function(e,t){for(var n=+t.length,i=0,s=e.length;i<n;i++)e[s++]=t[i];return e.length=s,e},type:function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)]$/,"$1").toLowerCase()},sleep:function(e){for(e+=(new Date).getTime();new Date<e;);},isSelector:function(e){if("string"!=typeof e)return!1;try{document.querySelector(e)}catch(e){return!1}return!0},remove:function(e){return $(e).remove()},camelCase:w,dashedName:function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})},isPlainObject:b,isEmptyObject:y,isArrayLike:_,acceptData:I,not:x,parseUnit:T,getUnit:k,unit:T,isVisible:C,isHidden:function(e){var t=getComputedStyle(e);return!C(e)||0==+t.opacity||e.hidden||"hidden"===t.visibility},matches:function(e,t){return J.call(e,t)},random:function(e,t){return 1===arguments.length&&_(e)?e[Math.floor(Math.random()*e.length)]:Math.floor(Math.random()*(t-e+1)+e)},strip:function(e,t){return"string"!=typeof e?u:e.replace(t,"")},normName:M,hasProp:D,serializeToArray:function(e){var t=$(e)[0];if(t&&"FORM"===t.nodeName){for(var n,i=[],s=t.elements.length-1;0<=s;--s)if(""!==t.elements[s].name)switch(t.elements[s].nodeName){case"INPUT":switch(t.elements[s].type){case"checkbox":case"radio":t.elements[s].checked&&i.push(t.elements[s].name+"="+encodeURIComponent(t.elements[s].value));break;case"file":break;default:i.push(t.elements[s].name+"="+encodeURIComponent(t.elements[s].value))}break;case"TEXTAREA":i.push(t.elements[s].name+"="+encodeURIComponent(t.elements[s].value));break;case"SELECT":switch(t.elements[s].type){case"select-one":i.push(t.elements[s].name+"="+encodeURIComponent(t.elements[s].value));break;case"select-multiple":for(n=t.elements[s].options.length-1;0<=n;--n)t.elements[s].options[n].selected&&i.push(t.elements[s].name+"="+encodeURIComponent(t.elements[s].options[n].value))}break;case"BUTTON":switch(t.elements[s].type){case"reset":case"submit":case"button":i.push(t.elements[s].name+"="+encodeURIComponent(t.elements[s].value))}}return i}console.warn("Element is not a HTMLFromElement")},serialize:function(e){return $.serializeToArray(e).join("&")}}),$.fn.extend({items:function(){return $.toArray(this)}}),"function"!=typeof window.CustomEvent&&(te.prototype=window.Event.prototype,window.CustomEvent=te);var ne=Event.prototype.stopPropagation,ie=Event.prototype.preventDefault;Event.prototype.stopPropagation=function(){this.isPropagationStopped=!0,ne.apply(this,arguments)},Event.prototype.preventDefault=function(){this.isPreventedDefault=!0,ie.apply(this,arguments)},Event.prototype.stop=function(e){return e?this.stopImmediatePropagation():this.stopPropagation()},$.extend({events:[],eventHooks:{},eventUID:-1,setEventHandler:function(e){var t,n=-1;if(0<this.events.length)for(t=0;t<this.events.length;t++)if(null===this.events[t].handler){n=t;break}return e={element:e.el,event:e.event,handler:e.handler,selector:e.selector,ns:e.ns,id:e.id,options:e.options},-1===n?(this.events.push(e),this.events.length-1):(this.events[n]=e,n)},getEventHandler:function(e){return this.events[e]!==u&&null!==this.events[e]?(this.events[e]=null,this.events[e].handler):u},off:function(){return $.each(this.events,function(){this.element.removeEventListener(this.event,this.handler,!0)}),this.events=[],this},getEvents:function(){return this.events},getEventHooks:function(){return this.eventHooks},addEventHook:function(e,t,n){return x(n)&&(n="before"),$.each(S(e),function(){this.eventHooks[w(n+"-"+this)]=t}),this},removeEventHook:function(e,t){return x(t)&&(t="before"),$.each(S(e),function(){delete this.eventHooks[w(t+"-"+this)]}),this},removeEventHooks:function(e){var t=this;return x(e)?this.eventHooks={}:$.each(S(e),function(){delete t.eventHooks[w("before-"+this)],delete t.eventHooks[w("after-"+this)]}),this}}),$.fn.extend({on:function(e,l,c,d){if(0!==this.length)return"function"==typeof l&&(d=c,c=l,l=u),b(d)||(d={}),this.each(function(){var r=this;$.each(S(e),function(){var e,s,t=this.split("."),a=M(t[0]),o=d.ns||t[1];$.eventUID++,e=function(e){var t=e.target,n=$.eventHooks[w("before-"+a)],i=$.eventHooks[w("after-"+a)];if("function"==typeof n&&n.call(t,e),l)for(;t&&t!==r;){if(J.call(t,l)&&(c.call(t,e),e.isPropagationStopped)){e.stopImmediatePropagation();break}t=t.parentNode}else c.call(r,e);"function"==typeof i&&i.call(t,e),d.once&&(s=+$(r).origin("event-"+e.type+(l?":"+l:"")+(o?":"+o:"")),isNaN(s)||$.events.splice(s,1))},Object.defineProperty(e,"name",{value:c.name&&""!==c.name?c.name:"func_event_"+a+"_"+$.eventUID}),t=a+(l?":"+l:"")+(o?":"+o:""),r.addEventListener(a,e,!y(d)&&d),s=$.setEventHandler({el:r,event:a,handler:e,selector:l,ns:o,id:$.eventUID,options:!y(d)&&d}),$(r).origin("event-"+t,s)})})},one:function(e,t,n,i){return b(i)||(i={}),i.once=!0,this.on.apply(this,[e,t,n,i])},off:function(e,s,a){return b(s)&&(a=s,s=null),b(a)||(a={}),x(e)||"all"===e.toLowerCase()?this.each(function(){var t=this;$.each($.events,function(){var e=this;e.element===t&&(t.removeEventListener(e.event,e.handler,e.options),e.handler=null,$(t).origin("event-"+name+(e.selector?":"+e.selector:"")+(e.ns?":"+e.ns:""),null))})}):this.each(function(){var i=this;$.each(S(e),function(){var e=this.split("."),t=M(e[0]),n=a.ns||e[1],e="event-"+t+(s?":"+s:"")+(n?":"+n:""),n=$(i).origin(e);n!==u&&$.events[n].handler&&(i.removeEventListener(t,$.events[n].handler,$.events[n].options),$.events[n].handler=null),$(i).origin(e,null)})})},trigger:function(e,t){return this.fire(e,t)},fire:function(e,t){var n;if(0!==this.length)return e=M(e),-1<["focus","blur"].indexOf(e)?(this[0][e](),this):("undefined"!=typeof CustomEvent?n=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:t}):((n=document.createEvent("Events")).detail=t,n.initEvent(e,!0,!0)),this.each(function(){this.dispatchEvent(n)}))}}),"blur focus resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu touchstart touchend touchmove touchcancel".split(" ").forEach(function(i){$.fn[i]=function(e,t,n){return 0<arguments.length?this.on(i,e,t,n):this.fire(i)}}),$.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),$.ready=function(e,t){document.addEventListener("DOMContentLoaded",e,t||!1)},$.load=function(e){return $(window).on("load",e)},$.unload=function(e){return $(window).on("unload",e)},$.fn.extend({unload:function(e){return 0===this.length||this[0].self!==window?u:$.unload(e)}}),$.beforeunload=function(t){return"string"==typeof t?$(window).on("beforeunload",function(e){return e.returnValue=t}):$(window).on("beforeunload",t)},$.fn.extend({beforeunload:function(e){return 0===this.length||this[0].self!==window?u:$.beforeunload(e)}}),$.fn.extend({ready:function(e){if(this.length&&this[0]===document&&"function"==typeof e)return $.ready(e)}}),$.ajax=function(v){return new Promise(function(n,i){function s(e,t){"function"==typeof e&&e.apply(null,t)}function e(e){return-1!==["GET","JSON"].indexOf(e)}var t,a,o,r,l=new XMLHttpRequest,c=(v.method||"GET").toUpperCase(),d=[],u=!!x(v.async)||v.async,h=v.url;if(v.data instanceof HTMLFormElement&&(t=v.data.getAttribute("action"),a=v.data.getAttribute("method"),x(h)&&t&&""!==t.trim()&&(h=t),a&&""!==a.trim()&&(c=a.toUpperCase())),v.timeout&&(l.timeout=v.timeout),v.withCredentials&&(l.withCredentials=v.withCredentials),v.data instanceof HTMLFormElement)f=$.serialize(v.data);else if(v.data instanceof HTMLElement&&v.data.getAttribute("type")&&"file"===v.data.getAttribute("type").toLowerCase())for(var p=v.data.getAttribute("name"),f=new FormData,m=0;m<v.data.files.length;m++)f.append(p,v.data.files[m]);else b(v.data)?(o=v.data,r=[],$.each(o,function(e,t){var n,t="string"==typeof(n=t)||"boolean"==typeof n||"number"==typeof n?t:JSON.stringify(t);r.push(e+"="+t)}),f=r.join("&")):v.data instanceof FormData||"string"==typeof v.data?f=v.data:(f=new FormData).append("_data",JSON.stringify(v.data));e(c)&&(h+="string"==typeof f?"?"+f:y(f)?"":"?"+JSON.stringify(f)),l.open(c,h,u,v.user,v.password),v.headers&&$.each(v.headers,function(e,t){l.setRequestHeader(e,t),d.push(e)}),e(c)||-1===d.indexOf("Content-type")&&!1!==v.contentType&&l.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l.send(f),l.addEventListener("load",function(e){if(4===l.readyState&&l.status<300){var t=v.returnValue&&"xhr"===v.returnValue?l:l.response;if(v.parseJson)try{t=JSON.parse(t)}catch(e){t={}}s(n,[t]),s(v.onSuccess,[e,l])}else s(i,[l]),s(v.onFail,[e,l]);s(v.onLoad,[e,l])}),$.each(["readystatechange","error","timeout","progress","loadstart","loadend","abort"],function(){var t=w("on-"+("readystatechange"===this?"state":this));l.addEventListener(t,function(e){s(v[t],[e,l])})})})},["get","post","put","patch","delete","json"].forEach(function(s){$[s]=function(e,t,n){var i=s.toUpperCase(),i={method:"JSON"===i?"GET":i,url:e,data:t,parseJson:"JSON"===i};return $.ajax($.extend({},i,n))}}),$.fn.extend({load:function(e,t,n){var i=this;return this.length&&this[0].self===window?$.load(e):$.get(e,t,n).then(function(e){i.each(function(){this.innerHTML=e})})}}),$.fn.extend({style:function(e,t){var n;function i(e,t,n){return-1<["scrollLeft","scrollTop"].indexOf(t)?$(e)[t]():getComputedStyle(e,n)[t]}if("string"==typeof e&&0===this.length)return u;if(0===this.length)return this;if(n=this[0],x(e)||"all"===e)return getComputedStyle(n,t);var s={},e=e.split(", ").map(function(e){return(""+e).trim()});return 1===e.length?i(n,e[0],t):($.each(e,function(){s[this]=i(n,this,t)}),s)},removeStyleProperty:function(e){if(x(e)||0===this.length)return this;var t=e.split(", ").map(function(e){return(""+e).trim()});return this.each(function(){var e=this;$.each(t,function(){e.style.removeProperty(this)})})},css:function(e,t){return"string"==typeof(e=e||"all")&&x(t)?this.style(e):this.each(function(){var n=this;"object"==typeof e?$.each(e,function(e,t){E(n,e,t)}):"string"==typeof e&&E(n,e,t)})},scrollTop:function(e){return x(e)?0===this.length?u:this[0]===window?pageYOffset:this[0].scrollTop:this.each(function(){this.scrollTop=e})},scrollLeft:function(e){return x(e)?0===this.length?u:this[0]===window?pageXOffset:this[0].scrollLeft:this.each(function(){this.scrollLeft=e})}}),$.fn.extend({addClass:function(){},removeClass:function(){},toggleClass:function(){},containsClass:function(e){return this.hasClass(e)},hasClass:function(e){var t=!1,n=e.split(" ").filter(function(e){return""!==(""+e).trim()});return!x(e)&&(this.each(function(){var e=this;$.each(n,function(){!t&&e.classList&&e.classList.contains(this)&&(t=!0)})}),t)},clearClasses:function(){return this.each(function(){this.className=""})},cls:function(e){return 0===this.length?u:e?this[0].className.split(" "):this[0].className},removeClassBy:function(n){return this.each(function(){var e=$(this),t=e.cls(!0);$.each(t,function(){-1<this.indexOf(n)&&e.removeClass(this)})})}}),["add","remove","toggle"].forEach(function(i){$.fn[i+"Class"]=function(n){return x(n)||""===(""+n).trim()?this:this.each(function(){var e=this,t=void 0!==e.classList;$.each(n.split(" ").filter(function(e){return""!==(""+e).trim()}),function(){t&&e.classList[i](this)})})}}),$.parseHTML=function(e){var t,n,i,s=[];if("string"!=typeof e)return[];if(e=e.trim(),(t=(n=document.implementation.createHTMLDocument("")).createElement("base")).href=document.location.href,n.head.appendChild(t),i=n.body,n=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i.exec(e))s.push(document.createElement(n[1]));else{i.innerHTML=e;for(var a=0;a<i.childNodes.length;a++)s.push(i.childNodes[a])}return s},$.fn.extend({_size:function(e,t){if(0!==this.length){if(x(t)){var n=this[0];if("height"===e)return n===window?window.innerHeight:n===document?n.body.clientHeight:parseInt(getComputedStyle(n).height);if("width"===e)return n===window?window.innerWidth:n===document?n.body.clientWidth:parseInt(getComputedStyle(n).width)}return this.each(function(){this!==window&&this!==document&&(this.style[e]=isNaN(t)?t:t+"px")})}},height:function(e){return this._size("height",e)},width:function(e){return this._size("width",e)},_sizeOut:function(n,i){var e,t;if(0!==this.length)return x(i)||"boolean"==typeof i?(e=(t=this[0])["width"===n?"offsetWidth":"offsetHeight"],t=getComputedStyle(t),t=e+parseInt(t["width"===n?"margin-left":"margin-top"])+parseInt(t["width"===n?"margin-right":"margin-bottom"]),!0===i?t:e):this.each(function(){var e,t;this!==window&&this!==document&&(t=getComputedStyle(this),e="width"===n?parseInt(t["border-left-width"])+parseInt(t["border-right-width"]):parseInt(t["border-top-width"])+parseInt(t["border-bottom-width"]),t="width"===n?parseInt(t["padding-left"])+parseInt(t["padding-right"]):parseInt(t["padding-top"])+parseInt(t["padding-bottom"]),t=$(this)[n](i)[n]()-e-t,this.style[n]=t+"px")})},outerWidth:function(e){return this._sizeOut("width",e)},outerHeight:function(e){return this._sizeOut("height",e)},padding:function(e){if(0!==this.length){e=getComputedStyle(this[0],e);return{top:parseInt(e["padding-top"]),right:parseInt(e["padding-right"]),bottom:parseInt(e["padding-bottom"]),left:parseInt(e["padding-left"])}}},margin:function(e){if(0!==this.length){e=getComputedStyle(this[0],e);return{top:parseInt(e["margin-top"]),right:parseInt(e["margin-right"]),bottom:parseInt(e["margin-bottom"]),left:parseInt(e["margin-left"])}}},border:function(e){if(0!==this.length){e=getComputedStyle(this[0],e);return{top:parseInt(e["border-top-width"]),right:parseInt(e["border-right-width"]),bottom:parseInt(e["border-bottom-width"]),left:parseInt(e["border-left-width"])}}}}),$.fn.extend({offset:function(a){var e;return x(a)?0===this.length?u:{top:(e=this[0].getBoundingClientRect()).top+pageYOffset,left:e.left+pageXOffset}:this.each(function(){var e=$(this),t=a.top,n=a.left,i=getComputedStyle(this).position,s=e.offset();"static"===i&&e.css("position","relative"),-1===["absolute","fixed"].indexOf(i)&&(t-=s.top,n-=s.left),e.css({top:t,left:n})})},position:function(e){var t,n,i=0,s=0;return!x(e)&&"boolean"==typeof e||(e=!1),0===this.length?u:(t=this[0],n=getComputedStyle(t),e&&(i=parseInt(n["margin-left"]),s=parseInt(n["margin-top"])),{left:t.offsetLeft-i,top:t.offsetTop-s})},left:function(e,t){if(0!==this.length)return x(e)?this.position(t).left:"boolean"==typeof e?(t=e,this.position(t).left):this.each(function(){$(this).css({left:e})})},top:function(e,t){if(0!==this.length)return x(e)?this.position(t).top:"boolean"==typeof e?(t=e,this.position(t).top):this.each(function(){$(this).css({top:e})})},coord:function(){return 0===this.length?u:this[0].getBoundingClientRect()},pos:function(){if(0!==this.length)return{top:parseInt($(this[0]).style("top")),left:parseInt($(this[0]).style("left"))}}}),$.fn.extend({attr:function(e,t){var n={};return 0===this.length&&0===arguments.length?u:this.length&&0===arguments.length?($.each(this[0].attributes,function(){n[this.nodeName]=this.nodeValue}),n):1===arguments.length&&"string"==typeof e?this.length&&1===this[0].nodeType&&this[0].hasAttribute(e)?this[0].getAttribute(e):u:this.each(function(){var n=this;b(e)?$.each(e,function(e,t){n.setAttribute(e,t)}):n.setAttribute(e,t)})},removeAttr:function(e){var t;return x(e)?this.each(function(){var e=this;$.each(this.attributes,function(){e.removeAttribute(this)})}):(t="string"==typeof e?e.split(",").map(function(e){return e.trim()}):e,this.each(function(){var e=this;$.each(t,function(){e.hasAttribute(this)&&e.removeAttribute(this)})}))},toggleAttr:function(e,t){return this.each(function(){x(t)?this.removeAttribute(e):this.setAttribute(e,t)})},id:function(e){return this.length?$(this[0]).attr("id",e):u}}),$.extend({meta:function(e){return x(e)?$("meta"):$("meta[name='$name']".replace("$name",e))},metaBy:function(e){return x(e)?$("meta"):$("meta[$name]".replace("$name",e))},doctype:function(){return $("doctype")},html:function(){return $("html")},head:function(){return $("html").find("head")},body:function(){return $("body")},document:function(){return $(document)},window:function(){return $(window)},charset:function(e){var t=$("meta[charset]");return e&&t.attr("charset",e),t.attr("charset")}}),$.extend({proxy:function(e,t){return"function"!=typeof e?u:e.bind(t)},bind:function(e,t){return this.proxy(e,t)}}),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach(function(e){["append","prepend"].forEach(function(t){D(e,t)||Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Array.prototype.slice.call(arguments),n=document.createDocumentFragment();e.forEach(function(e){var t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))}),"prepend"===t?this.insertBefore(n,this.firstChild):this.appendChild(n)}})})});function se(e){var t;return"string"==typeof e?t=$.isSelector(e)?$(e):$.parseHTML(e):e instanceof HTMLElement?t=[e]:_(e)&&(t=e),t}$.fn.extend({appendText:function(n){return this.each(function(e,t){t.innerHTML+=n})},prependText:function(n){return this.each(function(e,t){t.innerHTML=n+t.innerHTML})},append:function(e){var i=se(e);return this.each(function(t,n){$.each(i,function(){var e;n!==this&&(e=0===t?this:this.cloneNode(!0),$.script(e),e.tagName&&"SCRIPT"!==e.tagName&&n.append(e))})})},appendTo:function(e){var t=se(e);return this.each(function(){var n=this;$.each(t,function(e,t){n!==this&&t.append(0===e?n:n.cloneNode(!0))})})},prepend:function(e){var i=se(e);return this.each(function(t,n){$.each(i,function(){var e;n!==this&&(e=0===t?this:this.cloneNode(!0),$.script(e),e.tagName&&"SCRIPT"!==e.tagName&&n.prepend(e))})})},prependTo:function(e){var t=se(e);return this.each(function(){var n=this;$.each(t,function(e,t){n!==this&&$(t).prepend(0===e?n:n.cloneNode(!0))})})},insertBefore:function(e){var t=se(e);return this.each(function(){var n=this;$.each(t,function(e){var t;n===this||(t=this.parentNode)&&t.insertBefore(0===e?n:n.cloneNode(!0),this)})})},insertAfter:function(e){var t=se(e);return this.each(function(){var i=this;$.each(t,function(e,t){var n;i===this||(n=this.parentNode)&&n.insertBefore(0===e?i:i.cloneNode(!0),t.nextSibling)})})},after:function(e){return this.each(function(){"string"==typeof e?this.insertAdjacentHTML("afterend",e):$(e).insertAfter(this)})},before:function(e){return this.each(function(){"string"==typeof e?this.insertAdjacentHTML("beforebegin",e):$(e).insertBefore(this)})},clone:function(i,s){var a=[];return x(i)&&(i=!1),x(s)&&(s=!1),this.each(function(){var e,t=this.cloneNode(i),n=$(t);s&&$.hasData(this)&&(e=$(this).data(),$.each(e,function(e,t){n.data(e,t)})),a.push(t)}),$.merge($(),a)},import:function(e){var t=[];return x(e)&&(e=!1),this.each(function(){t.push(document.importNode(this,e))}),$.merge($(),t)},adopt:function(){var e=[];return this.each(function(){e.push(document.adoptNode(this))}),$.merge($(),e)},remove:function(t){var e,n,i=0,s=[];if(0!==this.length){for(n=t?this.filter(function(e){return J.call(e,t)}):this.items();null!=(e=n[i]);i++)e.parentNode&&(s.push(e.parentNode.removeChild(e)),$.removeData(e));return $.merge($(),s)}},wrap:function(e){if(0!==this.length){var n=$(se(e));if(n.length){var i=[];return this.each(function(){var e,t=n.clone(!0,!0);for(t.insertBefore(this),e=t;e.children().length;)e=e.children().eq(0);e.append(this),i.push(t)}),$(i)}}},wrapAll:function(e){var t,n;if(0!==this.length&&(t=$(se(e))).length){for((t=t.clone(!0,!0)).insertBefore(this[0]),n=t;n.children().length;)n=n.children().eq(0);return this.each(function(){n.append(this)}),t}},wrapInner:function(e){if(0!==this.length){var i=$(se(e));if(i.length){var s=[];return this.each(function(){var e=$(this),t=e.html(),n=i.clone(!0,!0);e.html(n.html(t)),s.push(n)}),$(s)}}}}),$.extend({animation:{duration:1e3,ease:"linear",elements:{}}}),"object"==typeof window.setupAnimation&&$.each(window.setupAnimation,function(e,t){void 0===$.animation[e]||x(t)||($.animation[e]=t)});var ae=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY"],oe=["opacity","zIndex"],re=["opacity","volume"],le=["scrollLeft","scrollTop"],ce=["opacity","volume"];function de(e){return e instanceof HTMLElement||e instanceof SVGElement}function ue(a,e,o){$.each(e,function(e,t){var n,i,s;n=a,i=e,s=t[0]+t[2]*o,e=t[3],x(t=t[4])&&(t=!1),i=w(i),t&&(s=parseInt(s)),!de(n)||void 0!==n[i]?n[i]=s:n.style[i]="transform"===i||-1<i.toLowerCase().indexOf("color")?s:s+e})}function he(e){if(!de(e))return{};for(var t,n=e.style.transform||"",i=/(\w+)\(([^)]*)\)/g,s={};t=i.exec(n);)s[t[1]]=t[2];return s}function pe(e){return/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e||"#000000").slice(1).map(function(e){return parseInt(e,16)})}function fe(e){return"#"===e[0]&&4===e.length?"#"+e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,i){return t+t+n+n+i+i}):"#"===e[0]?e:"#"+e}function me(e,t,n){var i,s,a,o,r,l,c;ue(e,t.props,n),i=e,s=t.transform,a=n,o=[],r=he(i),$.each(s,function(e,t){var n=t[0],i=t[1],s=t[2],t=t[3];(-1<(e=""+e).indexOf("rotate")||-1<e.indexOf("skew"))&&""===t&&(t="deg"),-1<e.indexOf("scale")&&(t=""),-1<e.indexOf("translate")&&""===t&&(t="px"),"turn"===t?o.push(e+"("+i*a+t+")"):o.push(e+"("+(n+s*a)+t+")")}),$.each(r,function(e,t){s[e]===u&&o.push(e+"("+t+")")}),i.style.transform=o.join(" "),l=e,t=t.color,c=n,$.each(t,function(e,t){for(var n,i=[0,0,0],s=0;s<3;s++)i[s]=Math.floor(t[0][s]+t[2][s]*c);n="rgb("+i.join(",")+")",l.style[e]=n})}function ve(l,e,c){var d,u,h,p,f,m={props:{},transform:{},color:{}},v=he(l);return x(c)&&(c="normal"),$.each(e,function(e,t){var n,i,s,a=-1<ae.indexOf(""+e),o=-1<oe.indexOf(""+e),r=-1<(""+e).toLowerCase().indexOf("color");if(Array.isArray(t)&&1===t.length&&(t=t[0]),h=Array.isArray(t)?(u=r?pe(fe(t[0])):T(t[0]),r?pe(fe(t[1])):T(t[1])):(u=a?v[e]||0:r?(s=e,getComputedStyle(l)[s].replace(/[^\d.,]/g,"").split(",").map(function(e){return parseInt(e)})):void 0!==(n=l)[s=e]?-1<le.indexOf(s)?"scrollLeft"===s?n===window?pageXOffset:n.scrollLeft:n===window?pageYOffset:n.scrollTop:n[s]||0:n.style[s]||getComputedStyle(n,i)[s],u=r?u:T(u),r?pe(t):T(function(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var i=k(e)||0,s=parseFloat(t),a=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return s+a+i;case"-":return s-a+i;case"*":return s*a+i;case"/":return s/a+i}}(t,Array.isArray(u)?u[0]:u))),-1<ce.indexOf(""+e)&&u[0]===h[0]&&(u[0]=0<h[0]?0:1),"reverse"===c&&(f=u,u=h,h=f),f=l instanceof HTMLElement&&""===h[1]&&!o&&!a?"px":h[1],r)for(p=[0,0,0],d=0;d<3;d++)p[d]=h[d]-u[d];else p=h[0]-u[0];a?m.transform[e]=[u[0],h[0],p,f]:r?m.color[e]=[u,h,p,f]:m.props[e]=[u[0],h[0],p,f,-1===re.indexOf(""+e)]}),m}function ge(e,t,n){return Math.min(Math.max(e,t),n)}var Ce={linear:function(){return function(e){return e}}};Ce.default=Ce.linear;var we={Sine:function(){return function(e){return 1-Math.cos(e*Math.PI/2)}},Circ:function(){return function(e){return 1-Math.sqrt(1-e*e)}},Back:function(){return function(e){return e*e*(3*e-2)}},Bounce:function(){return function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}},Elastic:function(e,t){x(e)&&(e=1),x(t)&&(t=.5);var n=ge(e,1,10),i=ge(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-i/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/i)}}};["Quad","Cubic","Quart","Quint","Expo"].forEach(function(e,t){we[e]=function(){return function(e){return Math.pow(e,t+2)}}}),Object.keys(we).forEach(function(e){var i=we[e];Ce["easeIn"+e]=i,Ce["easeOut"+e]=function(t,n){return function(e){return 1-i(t,n)(1-e)}},Ce["easeInOut"+e]=function(t,n){return function(e){return e<.5?i(t,n)(2*e)/2:1-i(t,n)(-2*e+2)/2}}});var be={id:null,el:null,draw:{},dur:$.animation.duration,ease:$.animation.ease,loop:0,pause:0,dir:"normal",defer:0,onStart:function(){},onStop:function(){},onStopAll:function(){},onPause:function(){},onPauseAll:function(){},onResume:function(){},onResumeAll:function(){},onFrame:function(){},onDone:function(){}};function ye(k){return new Promise(function(e){var t,n=this,i=$.assign({},be,{dur:$.animation.duration,ease:$.animation.ease},k),s=i.id,a=i.el,o=i.draw,r=i.dur,l=i.ease,c=i.loop,d=i.onStart,u=i.onFrame,h=i.onDone,p=i.pause,f=i.dir,m=i.defer,v={},g=[],C=Ce.linear,w="alternate"===f?"normal":f,b=!1,y=s||+(performance.now()*Math.pow(10,14));if(x(a))throw new Error("Unknown element!");if("string"==typeof a&&(a=document.querySelector(a)),"function"!=typeof o&&"object"!=typeof o)throw new Error("Unknown draw object. Must be a function or object!");0===r&&(r=1),"alternate"===f&&"number"==typeof c&&(c*=2),C="string"==typeof l?(i=/\(([^)]+)\)/.exec(l),t=l.split("(")[0],g=i?i[1].split(",").map(function(e){return parseFloat(e)}):[],Ce[t]||Ce.linear):"function"==typeof l?l:Ce.linear,$.animation.elements[y]={element:a,id:null,stop:0,pause:0,loop:0,t:-1,started:0,paused:0};function _(){"object"==typeof o&&(v=ve(a,o,w)),"function"==typeof d&&d.apply(a),$.animation.elements[y].loop+=1,$.animation.elements[y].started=performance.now(),$.animation.elements[y].duration=r,$.animation.elements[y].id=requestAnimationFrame(T)}function S(){cancelAnimationFrame($.animation.elements[y].id),delete $.animation.elements[s],"function"==typeof h&&h.apply(a),e(n)}var T=function(e){var t=$.animation.elements[y].stop,n=$.animation.elements[y].pause,i=$.animation.elements[y].started;if($.animation.elements[y].paused&&(i=e-$.animation.elements[y].t*r,$.animation.elements[y].started=i),1<(e=((e-i)/r).toFixed(4))&&(e=1),e<0&&(e=0),i=C.apply(null,g)(e),$.animation.elements[y].t=e,$.animation.elements[y].p=i,n)$.animation.elements[y].id=requestAnimationFrame(T);else{if(0<t)return 2===t&&("function"==typeof o?o.bind(a)(1,1):me(a,v,1)),void S();"function"==typeof o?o.bind(a)(e,i):me(a,v,i),"function"==typeof u&&u.apply(a,[e,i]),e<1&&($.animation.elements[y].id=requestAnimationFrame(T)),1===parseInt(e)&&(c?("alternate"===f&&(w="normal"===w?"reverse":"normal"),"boolean"==typeof c||c>$.animation.elements[y].loop?setTimeout(function(){_()},p):S()):"alternate"!==f||b?S():(w="normal"===w?"reverse":"normal",b=!0,_()))}};0<m?setTimeout(function(){_()},m):_()})}function _e(e,t){e=$.animation.elements[e];void 0!==e&&(x(t)&&(t=!0),e.stop=!0===t?2:1,"function"==typeof e.onStop&&e.onStop.apply(e.element))}function Se(e){e=$.animation.elements[e];void 0!==e&&(e.pause=1,e.paused=performance.now(),"function"==typeof e.onPause&&e.onPause.apply(e.element))}function Te(e){e=$.animation.elements[e];void 0!==e&&(e.pause=0,e.paused=0,"function"==typeof e.onResume&&e.onResume.apply(e.element))}var ke={loop:!1,onChainItem:null,onChainItemComplete:null,onChainComplete:null};$.easing={},$.extend($.easing,Ce),$.extend({animate:function(e){var t,n,i,s,a;return 1<arguments.length?(t=$(e)[0],n=arguments[1],i=arguments[2]||$.animation.duration,s=arguments[3]||$.animation.ease,a=arguments[4],"function"==typeof i&&(a=i,s=$.animation.ease,i=$.animation.duration),"function"==typeof s&&(a=s,s=$.animation.ease),ye({el:t,draw:n,dur:i,ease:s,onDone:a})):ye(e)},chain:function e(t,n){var i=$.extend({},ke,n);if("boolean"!=typeof i.loop&&i.loop--,!Array.isArray(t))return console.warn("Chain array is not defined!"),!1;t.reduce(function(e,t){return e.then(function(){return"function"==typeof i.onChainItem&&i.onChainItem(t),ye(t).then(function(){"function"==typeof i.onChainItemComplete&&i.onChainItemComplete(t)})})},Promise.resolve()).then(function(){"function"==typeof i.onChainComplete&&i.onChainComplete(),i.loop&&e(t,i)})},stop:_e,stopAll:function(n,i){$.each($.animation.elements,function(e,t){i?"string"==typeof i?J.call(t.element,i)&&_e(e,n):i.length?$.each(i,function(){t.element===this&&_e(e,n)}):i instanceof Element&&t.element===i&&_e(e,n):_e(e,n)})},resume:Te,resumeAll:function(n){$.each($.animation.elements,function(e,t){n?"string"==typeof n?J.call(t.element,n)&&Te(e):n.length?$.each(n,function(){t.element===this&&Te(e)}):n instanceof Element&&t.element===n&&Te(e):Te(e)})},pause:Se,pauseAll:function(n){$.each($.animation.elements,function(e,t){n?"string"==typeof n?J.call(t.element,n)&&Se(e):n.length?$.each(n,function(){t.element===this&&Se(e)}):n instanceof Element&&t.element===n&&Se(e):Se(e)})}}),$.fn.extend({animate:function(e){var t,n,i,s,a=this,o=e;return!Array.isArray(e)&&(1<arguments.length||1===arguments.length&&void 0===e.draw)?(t=e,n=arguments[1]||$.animation.duration,i=arguments[2]||$.animation.ease,s=arguments[3],"function"==typeof n&&(s=n,n=$.animation.duration,i=$.animation.ease),"function"==typeof i&&(s=i,i=$.animation.ease),this.each(function(){return $.animate({el:this,draw:t,dur:n,ease:i,onDone:s})})):Array.isArray(e)?($.each(e,function(){var e=this;a.each(function(){e.el=this,$.animate(e)})}),this):this.each(function(){o.el=this,$.animate(o)})},chain:function(t,n){return this.each(function(){var e=this;$.each(t,function(){this.el=e}),$.chain(t,n)})},stop:function(i){return this.each(function(){var n=this;$.each($.animation.elements,function(e,t){t.element===n&&_e(e,i)})})},pause:function(){return this.each(function(){var n=this;$.each($.animation.elements,function(e,t){t.element===n&&Se(e)})})},resume:function(){return this.each(function(){var n=this;$.each($.animation.elements,function(e,t){t.element===n&&Te(e)})})}}),$.extend({hidden:function(e,t,n){return e=$(e)[0],"string"==typeof t&&(t="true"===t.toLowerCase()),"function"==typeof t&&(n=t,t=!e.hidden),e.hidden=t,"function"==typeof n&&($.bind(n,e),n.call(e,arguments)),this},hide:function(e,t){return $(e).origin("display",e.style.display||getComputedStyle(e,null).display),e.style.display="none","function"==typeof t&&($.bind(t,e),t.call(e,arguments)),this},show:function(e,t){var n=$(e).origin("display",u,"block");return e.style.display=n?"none"===n?"block":n:"",0===parseInt(e.style.opacity)&&(e.style.opacity="1"),"function"==typeof t&&($.bind(t,e),t.call(e,arguments)),this},visible:function(e,t,n){return t===u&&(t=!0),e.style.visibility=t?"visible":"hidden","function"==typeof n&&($.bind(n,e),n.call(e,arguments)),this},toggle:function(e,t){var n="none"!==getComputedStyle(e,null).display?"hide":"show";return $[n](e,t)}}),$.fn.extend({hide:function(){var e;return $.each(arguments,function(){"function"==typeof this&&(e=this)}),this.each(function(){$.hide(this,e)})},show:function(){var e;return $.each(arguments,function(){"function"==typeof this&&(e=this)}),this.each(function(){$.show(this,e)})},visible:function(e,t){return this.each(function(){$.visible(this,e,t)})},toggle:function(e){return this.each(function(){$.toggle(this,e)})},hidden:function(e,t){return this.each(function(){$.hidden(this,e,t)})}}),$.extend({fx:{off:!1}}),$.fn.extend({fadeIn:function(n,i,s){return this.each(function(){var e=this,t=$(e);if(!(!C(e)||C(e)&&0==+t.style("opacity")))return this;x(n)&&x(i)&&x(s)?(s=null,n=$.animation.duration):"function"==typeof n&&(s=n,n=$.animation.duration),"function"==typeof i&&(s=i,i=$.animation.ease),$.fx.off&&(n=0);t=t.origin("display",u,"block");return e.style.opacity="0",e.style.display=t,$.animate({el:e,draw:{opacity:1},dur:n,ease:i,onDone:function(){"function"==typeof s&&$.proxy(s,this)()}})})},fadeOut:function(t,n,i){return this.each(function(){var e=$(this);if(C(this))return x(t)&&x(n)&&x(i)?(i=null,t=$.animation.duration):"function"==typeof t&&(i=t,t=$.animation.duration),"function"==typeof n&&(i=n,n=$.animation.ease),e.origin("display",e.style("display")),$.animate({el:this,draw:{opacity:0},dur:t,ease:n,onDone:function(){this.style.display="none","function"==typeof i&&$.proxy(i,this)()}})})},slideUp:function(n,i,s){return this.each(function(){var e,t=$(this);if(0!==t.height())return x(n)&&x(i)&&x(s)?(s=null,n=$.animation.duration):"function"==typeof n&&(s=n,n=$.animation.duration),"function"==typeof i&&(s=i,i=$.animation.ease),e=t.height(),t.origin("height",e),t.origin("display",$(this).style("display")),t.css({overflow:"hidden"}),$.animate({el:this,draw:{height:0},dur:n,ease:i,onDone:function(){t.hide().removeStyleProperty("overflow, height"),"function"==typeof s&&$.proxy(s,this)()}})})},slideDown:function(s,a,o){return this.each(function(){var e,t,n=this,i=$(n);return x(s)&&x(a)&&x(o)?(o=null,s=$.animation.duration):"function"==typeof s&&(o=s,s=$.animation.duration),"function"==typeof a&&(o=a,a=$.animation.ease),i.show().visible(!1),e=+i.origin("height",u,i.height()),0===parseInt(e)&&(e=n.scrollHeight),t=i.origin("display",i.style("display"),"block"),i.height(0).visible(!0),i.css({overflow:"hidden",display:"none"===t?"block":t}),$.animate({el:n,draw:{height:e},dur:s,ease:a,onDone:function(){$(n).removeStyleProperty("overflow, height, visibility"),"function"==typeof o&&$.proxy(o,this)()}})})},moveTo:function(e,t,n,i,s){var a={top:t,left:e};return"function"==typeof n&&(s=n,n=$.animation.duration,i=$.animation.ease),"function"==typeof i&&(s=i,i=$.animation.ease),this.each(function(){$.animate({el:this,draw:a,dur:n,ease:i,onDone:s})})},centerTo:function(t,n,i,s,a){return"function"==typeof i&&(a=i,i=$.animation.duration,s=$.animation.ease),"function"==typeof s&&(a=s,s=$.animation.ease),this.each(function(){var e={left:t-this.clientWidth/2,top:n-this.clientHeight/2};$.animate({el:this,draw:e,dur:i,ease:s,onDone:a})})},colorTo:function(e,t,n,i){var s={color:e};return"function"==typeof t&&(i=t,t=$.animation.duration,n=$.animation.ease),"function"==typeof n&&(i=n,n=$.animation.ease),this.each(function(){$.animate({el:this,draw:s,dur:t,ease:n,onDone:i})})},backgroundTo:function(e,t,n,i){var s={backgroundColor:e};return"function"==typeof t&&(i=t,t=$.animation.duration,n=$.animation.ease),"function"==typeof n&&(i=n,n=$.animation.ease),this.each(function(){$.animate({el:this,draw:s,dur:t,ease:n,onDone:i})})}}),$.init=function(e,t){var n,i=this;if("string"==typeof e&&(e=e.trim()),this.uid=$.uniqueId(),!e)return this;if("function"==typeof e)return $.ready(e);if(e instanceof Element)return this.push(e),this;if(e instanceof $)return $.each(e,function(){i.push(this)}),this;if("window"===e&&(e=window),"document"===e&&(e=document),"body"===e&&(e=document.body),"html"===e&&(e=document.documentElement),"doctype"===e&&(e=document.doctype),e&&(e.nodeType||e.self===window))return