ESP8266 part of the f105-motor-demo project (see f105-motor-demo_stm32)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
28 KiB

function bool(t){return 1===t||"1"===t||t===!0||"true"===t}function numfmt(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function estimateLoadTime(t,e){return 1e3/t*e+1500}function msNow(){return+new Date}function msElapsed(t){return msNow()-t}function copyToClipboard(t){if(!document.execCommand)return!1;var e="_hiddenCopyText_";if(n=document.getElementById(e),!n){var n=document.createElement("textarea");n.style.position="absolute",n.style.left="-9999px",n.style.top="0",n.id=e,document.body.appendChild(n)}n.textContent=t;var r=document.activeElement;n.focus(),n.setSelectionRange(0,n.value.length);var o;try{o=document.execCommand("copy")}catch(a){o=!1}return r&&"function"==typeof r.focus&&r.focus(),n.textContent="",o}function errorMsg(t,e){$("#notif").addClass("error"),notify.show(t,e||3e3)}function infoMsg(t,e){$("#notif").removeClass("error"),notify.show(t,e||3e3)}!function(){"use strict";function t(){var t;for(h=!0,t=0;t<p.length;t+=1)p[t]();p=[]}function e(){var e;for(v=!0,h||t(),e=0;e<d.length;e+=1)d[e]();d=[]}function n(t,e){var n;for(n=e.length-1;n>=0;n-=1)t(e[n])}function r(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function o(t,e){return t.currentStyle?t.currentStyle[r(e)]:m.getComputedStyle?m.getComputedStyle(t,null).getPropertyValue(e):null}function a(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function u(t,e,n){try{t.style[r(e)]=n}catch(o){}}function i(t){t.style.display="","none"===o(t,"display")&&(t.style.display="block")}function c(t){var e,r,o,u="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(r=0;r<t[e].length;r+=1)u+="&"+a(e,t[e][r]);else u+="&"+a(e,t[e])}else n(function(t){if("FORM"===t.nodeName)for(r=0;r<t.elements.length;r+=1)if(e=t.elements[r],!e.disabled)switch(e.type){case"button":case"image":case"file":case"submit":case"reset":break;case"select-one":e.length>0&&(u+="&"+a(e.name,e.value));break;case"select-multiple":for(o=0;o<e.length;o+=1)e[o].selected&&(u+="&"+a(e.name,e[o].value));break;case"checkbox":case"radio":e.checked&&(u+="&"+a(e.name,e.value));break;default:u+="&"+a(e.name,e.value)}},t);return u.length>0?u.substring(1):""}function f(t,e,r){var o,a,u,i=!1;return t&&(o=t.split(/\s+/),n(function(t){for(u=0;u<o.length;u+=1)if(a=new RegExp("\\b"+o[u]+"\\b","g"),"remove"===e)t.className=t.className.replace(a,"");else if("toggle"===e)t.className=t.className.match(a)?t.className.replace(a,""):t.className+" "+o[u];else if("has"===e&&t.className.match(a)){i=!0;break}},r)),i}function s(t,e,r){var o,a;t&&n(function(n){for(o=g.createElement("div"),o.innerHTML=t;null!==(a=o.lastChild);)try{"before"===e?n.parentNode.insertBefore(a,n):"after"===e?n.parentNode.insertBefore(a,n.nextSibling):"append"===e?n.appendChild(a):"prepend"===e&&n.insertBefore(a,n.firstChild)}catch(r){break}},r)}function l(t){var e,a,y,b=[],w=!1;if(t)if(t.nodeType&&1===t.nodeType)b=[t];else if("object"==typeof t)w="number"!=typeof t.length,b=t;else if("string"==typeof t)for(g.querySelectorAll||(g.querySelectorAll=function(t){var e,n,r,a=g.getElementsByTagName("head")[0],u=[];if(e=g.createElement("STYLE"),e.type="text/css",e.styleSheet){for(e.styleSheet.cssText=t+" {a:b}",a.appendChild(e),n=g.getElementsByTagName("*"),r=0;r<n.length;r+=1)"b"===o(n[r],"a")&&u.push(n[r]);a.removeChild(e)}return u}),a=g.querySelectorAll(t),y=0;y<a.length;y+=1)b[y]=a[y];return e=w?{}:b,e.ready=function(t){if(t){if(h)return t(),e;p.push(t)}},e.loaded=function(t){if(t){if(v)return t(),e;d.push(t)}},e.each=function(t){return"function"==typeof t&&n(function(e){return t.apply(e,arguments)},b),e},e.first=function(){return l(b.shift())},e.last=function(){return l(b.pop())},e.odd=function(){var t,e=[];for(t=0;t<b.length;t+=2)e.push(b[t]);return l(e)},e.even=function(){var t,e=[];for(t=1;t<b.length;t+=2)e.push(b[t]);return l(e)},e.hide=function(){return n(function(t){t.style.display="none"},b),e},e.show=function(){return n(function(t){i(t)},b),e},e.toggle=function(t){return"undefined"!=typeof t?t?e.show():e.hide():n(function(t){"none"===o(t,"display")?i(t):t.style.display="none"},b),e},e.remove=function(){return n(function(t){try{t.parentNode.removeChild(t)}catch(e){}},b),l()},e.css=function(t,a){if(t){if(a||""===a)return n(function(e){u(e,t,a)},b),e;if(b[0]){if(b[0].style[r(t)])return b[0].style[r(t)];if(o(b[0],t))return o(b[0],t)}}},e.getClass=function(){return b[0]&&b[0].className.length>0?b[0].className.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"").replace(/\s+/," "):void 0},e.setClass=function(t){return(t||""===t)&&n(function(e){e.className=t},b),e},e.addClass=function(t){return t&&n(function(e){e.className+=" "+t},b),e},e.removeClass=function(t){return f(t,"remove",b),e},e.toggleClass=function(t){return f(t,"toggle",b),e},e.hasClass=function(t){return f(t,"has",b)},e.html=function(t){return t||""===t?(n(function(e){e.innerHTML=t},b),e):b[0]?b[0].innerHTML:void 0},e.htmlBefore=function(t){return s(t,"before",b),e},e.htmlAfter=function(t){return s(t,"after",b),e},e.htmlAppend=function(t){return s(t,"append",b),e},e.htmlPrepend=function(t){return s(t,"prepend",b),e},e.attr=function(t,r){if(t){if(t=t.toLowerCase(),"undefined"!=typeof r)return n(function(e){"style"===t?e.style.cssText=r:"class"===t?e.className=r:e.setAttribute(t,r)},b),e;if(b[0])if("style"===t){if(b[0].style.cssText)return b[0].style.cssText}else if("class"===t){if(b[0].className)return b[0].className}else if(b[0].getAttribute(t))return b[0].getAttribute(t)}},e.data=function(t,n){return t?e.attr("data-"+t,n):void 0},e.val=function(t){var r,o,a;if(!_.isUndefined(t))return n(function(e){switch(e.nodeName){case"SELECT":for(("string"==typeof t||"number"==typeof t)&&(t=[t]),o=0;o<e.length;o+=1)for(a=0;a<t.length;a+=1)if(e[o].selected="",e[o].value===t[a]){e[o].selected="selected";break}break;case"INPUT":case"TEXTAREA":case"BUTTON":e.value=t}},b),e;if(b[0])switch(b[0].nodeName){case"SELECT":for(r=[],o=0;o<b[0].length;o+=1)b[0][o].selected&&r.push(b[0][o].value);return r.length>1?r:r[0];case"INPUT":case"TEXTAREA":case"BUTTON":return b[0].value}},e.checked=function(t){return"boolean"==typeof t?(n(function(e){"INPUT"!==e.nodeName||"checkbox"!==e.type&&"radio"!==e.type||(e.checked=t)},b),e):!b[0]||"INPUT"!==b[0].nodeName||"checkbox"!==b[0].type&&"radio"!==b[0].type?void 0:!!b[0].checked},e.on=function(r,o){return(t===m||t===g)&&(b=[t]),n(function(t){g.addEventListener?t.addEventListener(r,o,!1):g.attachEvent&&(t[r+o]=function(){return o.apply(t,arguments)},t.attachEvent("on"+r,t[r+o]))},b),e},e.off=function(r,o){return(t===m||t===g)&&(b=[t]),n(function(t){g.addEventListener?t.removeEventListener(r,o,!1):g.attachEvent&&(t.detachEvent("on"+r,t[r+o]),t[r+o]=null)},b),e},e.ajax=function(t,e,n,r){var o,a,u=c(b),i=e?e.toUpperCase():"GET";_.isNumber(r)&&(r={timeout:r});var f=_.extend({},{nocache:!0,timeout:5e3,loader:!0},r);if(u&&"GET"===i&&(t+=-1===t.indexOf("?")?"?"+u:"&"+u,u=null),o=new XMLHttpRequest){if(f.nocache){var s=(+new Date).toString(36);t+=(-1===t.indexOf("?")?"?":"&")+"_="+s}f.loader&&$("#loader").addClass("show"),o.open(i,t,!0),o.timeout=f.timeout,a=setTimeout(function(){errorMsg("XHR timed out."),o.abort(),f.loader&&$("#loader").removeClass("show")},f.timeout+10),o.onreadystatechange=function(){4===o.readyState&&(f.loader&&$("#loader").removeClass("show"),n&&0!=o.status&&n(o.responseText,o.status),clearTimeout(a))},o.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===i&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(u)}return o},e.get=function(t,n,r){return e.ajax(t,"get",n,r)},e.post=function(t,n,r){return e.ajax(t,"post",n,r)},e}var p=[],d=[],h=!1,v=!1,g=document,m=window;g.addEventListener?(g.addEventListener("DOMContentLoaded",t,!1),m.addEventListener("load",e,!1)):g.attachEvent?(g.attachEvent("onreadystatechange",t),m.attachEvent("onload",e)):m.onload=e,m.$=l}(),function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function n(t,e,n){var r=n.length;switch(r){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function r(t,e){for(var n=-1,r=t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function o(t,e){for(var n=-1,r=t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function a(t,e,n,r){var o=-1,a=t.length;for(r&&a&&(n=t[++o]);++o<a;)n=e(n,t[o],o,t);return n}function u(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function i(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function c(t,e){return o(e,function(e){return[e,t[e]]})}function f(t){return t&&t.Object===Object?t:null}function s(t){return An[t]}function l(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}function p(t,e){return t="number"==typeof t||$n.test(t)?+t:-1,e=null==e?ke:e,t>-1&&t%1==0&&e>t}function d(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function h(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function v(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function g(t){return xn[t]}function m(){}function y(){}function b(t,e){return _(t,e)&&delete t[e]}function w(t,e){if(ar){var n=t[e];return n===Ce?Ee:n}return Bn.call(t,e)?t[e]:Ee}function _(t,e){return ar?t[e]!==Ee:Bn.call(t,e)}function $(t,e,n){t[e]=ar&&n===Ee?Ce:n}function E(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function j(){this.__data__={hash:new y,map:nr?new nr:[],string:new y}}function A(t){var e=this.__data__;return Ut(t)?b("string"==typeof t?e.string:e.hash,t):nr?e.map["delete"](t):P(e.map,t)}function x(t){var e=this.__data__;return Ut(t)?w("string"==typeof t?e.string:e.hash,t):nr?e.map.get(t):R(e.map,t)}function C(t){var e=this.__data__;return Ut(t)?_("string"==typeof t?e.string:e.hash,t):nr?e.map.has(t):I(e.map,t)}function T(t,e){var n=this.__data__;return Ut(t)?$("string"==typeof t?n.string:n.hash,t,e):nr?n.map.set(t,e):F(n.map,t,e),this}function O(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function N(){this.__data__={array:[],map:null}}function k(t){var e=this.__data__,n=e.array;return n?P(n,t):e.map["delete"](t)}function S(t){var e=this.__data__,n=e.array;return n?R(n,t):e.map.get(t)}function M(t){var e=this.__data__,n=e.array;return n?I(n,t):e.map.has(t)}function L(t,e){var n=this.__data__,r=n.array;r&&(r.length<Ae-1?F(r,t,e):(n.array=null,n.map=new E(r)));var o=n.map;return o&&o.set(t,e),this}function P(t,e){var n=U(t,e);if(0>n)return!1;var r=t.length-1;return n==r?t.pop():Qn.call(t,n,1),!0}function R(t,e){var n=U(t,e);return 0>n?Ee:t[n][1]}function I(t,e){return U(t,e)>-1}function U(t,e){for(var n=t.length;n--;)if(Gt(t[n][0],e))return n;return-1}function F(t,e,n){var r=U(t,e);0>r?t.push([e,n]):t[r][1]=n}function B(t,e,n){var r=t[e];Bn.call(t,e)&&Gt(r,n)&&(n!==Ee||e in t)||(t[e]=n)}function q(t,e){return t&&mt(e,pe(e),t)}function H(t){return"function"==typeof t?t:we}function W(t){return mr(t)?t:Ht(t)}function D(t,e,n,o,a,u,i){var c;if(o&&(c=u?o(t,a,u,i):o(t)),c!==Ee)return c;if(!Zt(t))return t;var f=mr(t);if(f){if(c=St(t),!e)return gt(t,c)}else{var s=Nt(t),p=s==Fe||s==Be;if(yr(t))return ft(t,e);if(s==We||s==Le||p&&!u){if(l(t))return u?t:{};if(c=Mt(p?{}:t),!e)return c=q(c,t),n?bt(t,c):c}else{if(!jn[s])return u?t:{};c=Lt(t,s,e)}}i||(i=new O);var d=i.get(t);return d?d:(i.set(t,c),(f?r:z)(t,function(r,a){B(c,a,D(r,e,n,o,a,t,i))}),n&&!f?bt(t,c):c)}function X(t){return Zt(t)?Yn(t):{}}function z(t,e){return t&&hr(t,e,pe)}function G(t,e){e=It(e,t)?[e+""]:W(e);for(var n=0,r=e.length;null!=t&&r>n;)t=t[e[n++]];return n&&n==r?t:Ee}function V(t,e){return Bn.call(t,e)||"object"==typeof t&&e in t&&null===Vn(t)}function J(t,e){return e in Object(t)}function Y(t,e,n,r,o){return t===e?!0:null==t||null==e||!Zt(t)&&!te(e)?t!==t&&e!==e:K(t,e,Y,n,r,o)}function K(t,e,n,r,o,a){var u=mr(t),i=mr(e),c=Pe,f=Pe;u||(c=Nt(t),c=c==Le?We:c),i||(f=Nt(e),f=f==Le?We:f);var s=c==We&&!l(t),p=f==We&&!l(e),d=c==f;if(d&&!s)return a||(a=new O),u||ae(t)?jt(t,e,n,r,o,a):At(t,e,c,n,r,o,a);if(!(o&Oe)){var h=s&&Bn.call(t,"__wrapped__"),v=p&&Bn.call(e,"__wrapped__");if(h||v)return a||(a=new O),n(h?t.value():t,v?e.value():e,r,o,a)}return d?(a||(a=new O),xt(t,e,n,r,o,a)):!1}function Q(t,e,n,r){var o=n.length,a=o,u=!r;if(null==t)return!a;for(t=Object(t);o--;){var i=n[o];if(u&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++o<a;){i=n[o];var c=i[0],f=t[c],s=i[1];if(u&&i[2]){if(f===Ee&&!(c in t))return!1}else{var l=new O,p=r?r(f,s,c,t,e,l):Ee;if(!(p===Ee?Y(s,f,r,Te|Oe,l):p))return!1}}return!0}function Z(t){var e=typeof t;return"function"==e?t:null==t?we:"object"==e?mr(t)?ot(t[0],t[1]):rt(t):$e(t)}function tt(t){return tr(Object(t))}function et(t){t=null==t?t:Object(t);var e=[];for(var n in t)e.push(n);return e}function nt(t,e){var n=-1,r=Jt(t)?Array(t.length):[];return dr(t,function(t,o,a){r[++n]=e(t,o,a)}),r}function rt(t){var e=Tt(t);if(1==e.length&&e[0][2]){var n=e[0][0],r=e[0][1];return function(t){return null==t?!1:t[n]===r&&(r!==Ee||n in Object(t))}}return function(n){return n===t||Q(n,t,e)}}function ot(t,e){return function(n){var r=se(n,t);return r===Ee&&r===e?le(n,t):Y(e,r,Ee,Te|Oe)}}function at(t){return function(e){return null==e?Ee:e[t]}}function ut(t){return function(e){return G(e,t)}}function it(t,e,n,r){for(var o=-1,a=er(Zn((e-t)/(n||1)),0),u=Array(a);a--;)u[r?a:++o]=t,t+=n;return u}function ct(t,e,n){var r=-1,o=t.length;0>e&&(e=-e>o?0:o+e),n=n>o?o:n,0>n&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(o);++r<o;)a[r]=t[r+e];return a}function ft(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function st(t){var e=new t.constructor(t.byteLength);return new zn(e).set(new zn(t)),e}function lt(e){return a(h(e),t,new e.constructor)}function pt(t){var e=new t.constructor(t.source,mn.exec(t));return e.lastIndex=t.lastIndex,e}function dt(t){return a(v(t),e,new t.constructor)}function ht(t){return lr?Object(lr.call(t)):{}}function vt(t,e){var n=e?st(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function gt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function mt(t,e,n){return yt(t,e,n)}function yt(t,e,n,r){n||(n={});for(var o=-1,a=e.length;++o<a;){var u=e[o],i=r?r(n[u],t[u],u,n,t):t[u];B(n,u,i)}return n}function bt(t,e){return mt(t,gr(t),e)}function wt(t){return zt(function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:Ee,u=o>2?n[2]:Ee;for(a="function"==typeof a?(o--,a):Ee,u&&Rt(n[0],n[1],u)&&(a=3>o?Ee:a,o=1),e=Object(e);++r<o;){var i=n[r];i&&t(e,i,r,a)}return e})}function _t(t,e){return function(n,r){if(null==n)return n;if(!Jt(n))return t(n,r);for(var o=n.length,a=e?o:-1,u=Object(n);(e?a--:++a<o)&&r(u[a],a,u)!==!1;);return n}}function $t(t){return function(e,n,r){for(var o=-1,a=Object(e),u=r(e),i=u.length;i--;){var c=u[t?i:++o];if(n(a[c],c,a)===!1)break}return e}}function Et(t){return function(e,n,r){return r&&"number"!=typeof r&&Rt(e,n,r)&&(n=r=Ee),e=ce(e),e=e===e?e:0,n===Ee?(n=e,e=0):n=ce(n)||0,r=r===Ee?n>e?1:-1:ce(r)||0,it(e,n,r,t)}}function jt(t,e,n,r,o,a){var i=-1,c=o&Oe,f=o&Te,s=t.length,l=e.length;if(s!=l&&!(c&&l>s))return!1;var p=a.get(t);if(p)return p==e;var d=!0;for(a.set(t,e);++i<s;){var h=t[i],v=e[i];if(r)var g=c?r(v,h,i,e,t,a):r(h,v,i,t,e,a);if(g!==Ee){if(g)continue;d=!1;break}if(f){if(!u(e,function(t){return h===t||n(h,t,r,o,a)})){d=!1;break}}else if(h!==v&&!n(h,v,r,o,a)){d=!1;break}}return a["delete"](t),d}function At(t,e,n,r,o,a,u){switch(n){case Je:return t.byteLength==e.byteLength&&r(new zn(t),new zn(e))?!0:!1;case Re:case Ie:return+t==+e;case Ue:return t.name==e.name&&t.message==e.message;case He:return t!=+t?e!=+e:t==+e;case De:case ze:return t==e+"";case qe:var i=h;case Xe:var c=a&Oe;if(i||(i=v),t.size!=e.size&&!c)return!1;var f=u.get(t);return f?f==e:jt(i(t),i(e),r,o,a|Te,u.set(t,e));case Ge:if(lr)return lr.call(t)==lr.call(e)}return!1}function xt(t,e,n,r,o,a){var u=o&Oe,i=pe(t),c=i.length,f=pe(e),s=f.length;if(c!=s&&!u)return!1;for(var l=c;l--;){var p=i[l];if(!(u?p in e:V(e,p)))return!1}var d=a.get(t);if(d)return d==e;var h=!0;a.set(t,e);for(var v=u;++l<c;){p=i[l];var g=t[p],m=e[p];if(r)var y=u?r(m,g,p,e,t,a):r(g,m,p,t,e,a);if(!(y===Ee?g===m||n(g,m,r,o,a):y)){h=!1;break}v||(v="constructor"==p)}if(h&&!v){var b=t.constructor,w=e.constructor;b!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(h=!1)}return a["delete"](t),h}function Ct(){var t=m.iteratee||_e;return t=t===_e?Z:t,arguments.length?t(arguments[0],arguments[1]):t}function Tt(t){for(var e=he(t),n=e.length;n--;)e[n][2]=Bt(e[n][1]);return e}function Ot(t,e){var n=t[e];return ee(n)?n:Ee}function Nt(t){return qn.call(t)}function kt(t,e,n){if(null==t)return!1;var r=n(t,e);r||It(e)||(e=W(e),t=qt(t,e),null!=t&&(e=Wt(e),r=n(t,e)));var o=t?t.length:Ee;return r||!!o&&Qt(o)&&p(e,o)&&(mr(t)||re(t)||Vt(t))}function St(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&Bn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Mt(t){return"function"!=typeof t.constructor||Ft(t)?{}:X(Vn(t))}function Lt(t,e,n){var r=t.constructor;switch(e){case Je:return st(t);case Re:case Ie:return new r(+t);case Ye:case Ke:case Qe:case Ze:case tn:case en:case nn:case rn:case on:return vt(t,n);case qe:return lt(t);case He:case ze:return new r(t);case De:return pt(t);case Xe:return dt(t);case Ge:return ht(t)}}function Pt(t){var e=t?t.length:Ee;return Qt(e)&&(mr(t)||re(t)||Vt(t))?i(e,String):null}function Rt(t,e,n){if(!Zt(n))return!1;var r=typeof e;return("number"==r?Jt(n)&&p(e,n.length):"string"==r&&e in n)?Gt(n[e],t):!1}function It(t,e){return"number"==typeof t?!0:!mr(t)&&(ln.test(t)||!sn.test(t)||null!=e&&t in Object(e))}function Ut(t){var e=typeof t;return"number"==e||"boolean"==e||"string"==e&&"__proto__"!=t||null==t}function Ft(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||Un;return t===n}function Bt(t){return t===t&&!Zt(t)}function qt(t,e){return 1==e.length?t:se(t,ct(e,0,-1))}function Ht(t){var e=[];return fe(t).replace(pn,function(t,n,r,o){e.push(r?o.replace(gn,"$1"):n||t)}),e}function Wt(t){var e=t?t.length:0;return e?t[e-1]:Ee}function Dt(t,e){return"function"==typeof e&&mr(t)?r(t,e):dr(t,H(e))}function Xt(t,e){var n=mr(t)?o:nt;return n(t,Ct(e,3))}function zt(t,e){if("function"!=typeof t)throw new TypeError(xe);return e=er(e===Ee?t.length-1:ie(e),0),function(){for(var r=arguments,o=-1,a=er(r.length-e,0),u=Array(a);++o<a;)u[o]=r[e+o];switch(e){case 0:return t.call(this,u);case 1:return t.call(this,r[0],u);case 2:return t.call(this,r[0],r[1],u)}var i=Array(e+1);for(o=-1;++o<e;)i[o]=r[o];return i[e]=u,n(t,this,i)}}function Gt(t,e){return t===e||t!==t&&e!==e}function Vt(t){return Yt(t)&&Bn.call(t,"callee")&&(!Kn.call(t,"callee")||qn.call(t)==Le)}function Jt(t){return null!=t&&Qt(vr(t))&&!Kt(t)}function Yt(t){return te(t)&&Jt(t)}function Kt(t){var e=Zt(t)?qn.call(t):"";return e==Fe||e==Be}function Qt(t){return"number"==typeof t&&t>-1&&t%1==0&&ke>=t}function Zt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function te(t){return!!t&&"object"==typeof t}function ee(t){return null==t?!1:Kt(t)?Hn.test(Fn.call(t)):te(t)&&(l(t)?Hn:wn).test(t)}function ne(t){return"number"==typeof t||te(t)&&qn.call(t)==He}function re(t){return"string"==typeof t||!mr(t)&&te(t)&&qn.call(t)==ze}function oe(t){return"symbol"==typeof t||te(t)&&qn.call(t)==Ge}function ae(t){return te(t)&&Qt(t.length)&&!!En[qn.call(t)]}function ue(t){return t===Ee}function ie(t){if(!t)return 0===t?t:0;if(t=ce(t),t===Ne||t===-Ne){var e=0>t?-1:1;return e*Se}var n=t%1;return t===t?n?t-n:t:0}function ce(t){if(Zt(t)){var e=Kt(t.valueOf)?t.valueOf():t;t=Zt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(vn,"");var n=bn.test(t);return n||_n.test(t)?Tn(t.slice(2),n?2:8):yn.test(t)?Me:+t}function fe(t){if("string"==typeof t)return t;if(null==t)return"";if(oe(t))return pr?pr.call(t):"";var e=t+"";return"0"==e&&1/t==-Ne?"-0":e}function se(t,e,n){var r=null==t?Ee:G(t,e);return r===Ee?n:r}function le(t,e){return kt(t,e,J)}function pe(t){var e=Ft(t);if(!e&&!Jt(t))return tt(t);var n=Pt(t),r=!!n,o=n||[],a=o.length;for(var u in t)!V(t,u)||r&&("length"==u||p(u,a))||e&&"constructor"==u||o.push(u);return o}function de(t){for(var e=-1,n=Ft(t),r=et(t),o=r.length,a=Pt(t),u=!!a,i=a||[],c=i.length;++e<o;){var f=r[e];u&&("length"==f||p(f,c))||"constructor"==f&&(n||!Bn.call(t,f))||i.push(f)}return i}function he(t){return c(t,pe(t))}function ve(t){return t=fe(t),t&&fn.test(t)?t.replace(un,s):t}function ge(t){return t=fe(t),t&&hn.test(t)?t.replace(dn,"\\$&"):t}function me(){var t=arguments,e=fe(t[0]);return t.length<3?e:e.replace(t[1],t[2])}function ye(t){return t=fe(t),t&&cn.test(t)?t.replace(an,g):t}function be(t){return function(){return t}}function we(t){return t}function _e(t){return Z("function"==typeof t?t:D(t,!0))}function $e(t){return It(t)?at(t):ut(t)}var Ee,je="4.6.1",Ae=200,xe="Expected a function",Ce="__lodash_hash_undefined__",Te=1,Oe=2,Ne=1/0,ke=9007199254740991,Se=1.7976931348623157e308,Me=NaN,Le="[object Arguments]",Pe="[object Array]",Re="[object Boolean]",Ie="[object Date]",Ue="[object Error]",Fe="[object Function]",Be="[object GeneratorFunction]",qe="[object Map]",He="[object Number]",We="[object Object]",De="[object RegExp]",Xe="[object Set]",ze="[object String]",Ge="[object Symbol]",Ve="[object WeakMap]",Je="[object ArrayBuffer]",Ye="[object Float32Array]",Ke="[object Float64Array]",Qe="[object Int8Array]",Ze="[object Int16Array]",tn="[object Int32Array]",en="[object Uint8Array]",nn="[object Uint8ClampedArray]",rn="[object Uint16Array]",on="[object Uint32Array]",an=/&(?:amp|lt|gt|quot|#39|#96);/g,un=/[&<>"'`]/g,cn=RegExp(an.source),fn=RegExp(un.source),sn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ln=/^\w*$/,pn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,dn=/[\\^$.*+?()[\]{}|]/g,hn=RegExp(dn.source),vn=/^\s+|\s+$/g,gn=/\\(\\)?/g,mn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,wn=/^\[object .+?Constructor\]$/,_n=/^0o[0-7]+$/i,$n=/^(?:0|[1-9]\d*)$/,En={};En[Ye]=En[Ke]=En[Qe]=En[Ze]=En[tn]=En[en]=En[nn]=En[rn]=En[on]=!0,En[Le]=En[Pe]=En[Je]=En[Re]=En[Ie]=En[Ue]=En[Fe]=En[qe]=En[He]=En[We]=En[De]=En[Xe]=En[ze]=En[Ve]=!1;var jn={};jn[Le]=jn[Pe]=jn[Je]=jn[Re]=jn[Ie]=jn[Ye]=jn[Ke]=jn[Qe]=jn[Ze]=jn[tn]=jn[qe]=jn[He]=jn[We]=jn[De]=jn[Xe]=jn[ze]=jn[Ge]=jn[en]=jn[nn]=jn[rn]=jn[on]=!0,jn[Ue]=jn[Fe]=jn[Ve]=!1;var An={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},xn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Cn={"function":!0,object:!0},Tn=parseInt,On=Cn[typeof exports]&&exports&&!exports.nodeType?exports:Ee,Nn=Cn[typeof module]&&module&&!module.nodeType?module:Ee,kn=Nn&&Nn.exports===On?On:Ee,Sn=f(On&&Nn&&"object"==typeof global&&global),Mn=f(Cn[typeof self]&&self),Ln=f(Cn[typeof window]&&window),Pn=f(Cn[typeof this]&&this),Rn=Sn||Ln!==(Pn&&Pn.window)&&Ln||Mn||Pn||Function("return this")(),In=Array.prototype,Un=Object.prototype,Fn=Function.prototype.toString,Bn=Un.hasOwnProperty,qn=Un.toString,Hn=RegExp("^"+Fn.call(Bn).replace(dn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wn=kn?Rn.Buffer:Ee,Dn=Rn.Reflect,Xn=Rn.Symbol,zn=Rn.Uint8Array,Gn=Dn?Dn.enumerate:Ee,Vn=Object.getPrototypeOf,Jn=Object.getOwnPropertySymbols,Yn=Object.create,Kn=Un.propertyIsEnumerable,Qn=In.splice,Zn=Math.ceil,tr=Object.keys,er=Math.max,nr=Ot(Rn,"Map"),rr=Ot(Rn,"Set"),or=Ot(Rn,"WeakMap"),ar=Ot(Object,"create"),ur=!Kn.call({valueOf:1},"valueOf"),ir=nr?Fn.call(nr):"",cr=rr?Fn.call(rr):"",fr=or?Fn.call(or):"",sr=Xn?Xn.prototype:Ee,lr=sr?sr.valueOf:Ee,pr=sr?sr.toString:Ee,dr=_t(z),hr=$t();Gn&&!Kn.call({valueOf:1},"valueOf")&&(et=function(t){return d(Gn(t))});var vr=at("length"),gr=Jn||function(){return[]};(nr&&Nt(new nr)!=qe||rr&&Nt(new rr)!=Xe||or&&Nt(new or)!=Ve)&&(Nt=function(t){var e=qn.call(t),n=e==We?t.constructor:null,r="function"==typeof n?Fn.call(n):"";if(r)switch(r){case ir:return qe;case cr:return Xe;case fr:return Ve}return e});var mr=Array.isArray,yr=Wn?function(t){return t instanceof Wn}:be(!1),br=wt(function(t,e){if(ur||Ft(e)||Jt(e))return void mt(e,de(e),t);for(var n in e)B(t,n,e[n])}),wr=Et();y.prototype=ar?ar(null):Un,E.prototype.clear=j,E.prototype["delete"]=A,E.prototype.get=x,E.prototype.has=C,E.prototype.set=T,O.prototype.clear=N,O.prototype["delete"]=k,O.prototype.get=S,O.prototype.has=M,O.prototype.set=L,m.assignIn=br,m.constant=be,m.iteratee=_e,m.keys=pe,m.keysIn=de,m.map=Xt,m.property=$e,m.range=wr,m.rest=zt,m.toPairs=he,m.extend=br,m.eq=Gt,m.escape=ve,m.escapeRegExp=ge,m.forEach=Dt,m.get=se,m.hasIn=le,m.identity=we,m.isArguments=Vt,m.isArray=mr,m.isArrayLike=Jt,m.isArrayLikeObject=Yt,m.isBuffer=yr,m.isFunction=Kt,m.isLength=Qt,m.isNative=ee,m.isNumber=ne,m.isObject=Zt,m.isObjectLike=te,m.isString=re,m.isSymbol=oe,m.isTypedArray=ae,m.isUndefined=ue,m.last=Wt,m.replace=me,m.toInteger=ie,m.toNumber=ce,m.toString=fe,m.unescape=ye,m.each=Dt,m.VERSION=je,(Ln||Mn||{})._=m,Rn._=m}.call(this),Math.log10=Math.log10||function(t){return Math.log(t)/Math.LN10},String.prototype.format=function(){var t=this,e=arguments;1==arguments.length&&(_.isArray(arguments[0])||_.isObject(arguments[0]))&&(e=arguments[0]);for(var n in e)if(e.hasOwnProperty(n)){var r=n;n.match(/^\{.*\}$/)||(n="{"+n+"}");var o=new RegExp(_.escapeRegExp(n),"g");t=t.replace(o,e[r])}return t};var modal=function(){var t={};return t.show=function(t){var e=$(t);e.removeClass("hidden visible"),setTimeout(function(){e.addClass("visible")},1)},t.hide=function(t){var e=$(t);e.removeClass("visible"),setTimeout(function(){e.addClass("hidden")},500)},t.init=function(){$(".Modal").on("click",function(){$(this).hasClass("no-close")||t.hide(this)}),$(".Dialog").on("click",function(t){t.stopImmediatePropagation()}),$(window).on("keydown",function(e){27==e.which&&t.hide(".Modal")})},t}(),notify=function(){var t,e,n={},r="#notif";return n.show=function(o,a){$(r).html(o),modal.show(r),clearTimeout(t),clearTimeout(e),_.isUndefined(a)||(t=setTimeout(n.hide,a))},n.hide=function(){var t=$(r);t.removeClass("visible"),e=setTimeout(function(){t.addClass("hidden")},250)},n.init=function(){$(r).on("click",function(){n.hide(this)})},n}();$().ready(function(){setInterval(function(){$(".anim-dots").each(function(t){var e=$(t),n=e.html()+".";5==n.length&&(n="."),e.html(n)})},1e3),$("input[type=number]").on("mousewheel",function(t){var e=+$(this).val(),n=+($(this).attr("step")||1),r=$(this).attr("min"),o=$(this).attr("max");if(t.wheelDelta>0?e+=n:e-=n,_.isUndefined(r)||(e=Math.max(e,r)),_.isUndefined(o)||(e=Math.min(e,o)),$(this).val(e),"createEvent"in document){var a=document.createEvent("HTMLEvents");a.initEvent("change",!1,!0),$(this)[0].dispatchEvent(a)}else $(this)[0].fireEvent("onchange");t.preventDefault()}),modal.init(),notify.init()});var page_wifi=function(){function t(t,e){if(200!=e)return void n(5e3);t=JSON.parse(t);var a=!bool(t.result.inProgress)&&t.result.APs.length>0;if(n(a?15e3:1e3),a){var u=$("#ap-list");$(".AP").remove(),u.toggle(a),$("#ap-loader").toggle(!a),t.result.APs.sort(function(t,e){return e.rssi-t.rssi}).forEach(function(t){if(t.enc=parseInt(t.enc),!(t.enc>4)){var e=document.createElement("div"),n=$(e).data("ssid",t.essid).data("pwd",0!=t.enc).addClass("AP");t.essid==r.current&&n.addClass("selected");var a=document.createElement("div");$(a).addClass("inner").htmlAppend('<div class="rssi">{0}</div>'.format(t.rssi_perc)).htmlAppend('<div class="essid" title="{0}">{0}</div>'.format(_.escape(t.essid))).htmlAppend('<div class="auth">{0}</div>'.format(o[t.enc]));n.on("click",function(){var t=$(this);$("#conn-essid").val(t.data("ssid")),$("#conn-passwd").val(""),t.data("pwd")?modal.show("#psk-modal"):$("#conn-form").submit()}),e.appendChild(a),u[0].appendChild(e)}})}}function e(){$().get(_root+"/wifi/scan",t)}function n(t){setTimeout(e,t)}var r={},o=["Open","WEP","WPA","WPA2","WPA/WPA2"];return r.init=function(){e()},r}(),page_home=function(){function t(){var t=$("#control-range").val();if(t!=r){r=t;var e="f";0>t&&(t*=-1,e="r"),t=18432*(t/100),20>t?$().get(_root+"/m/stop"):$().get(_root+"/m/start?dir="+e+"&speed="+Math.round(t))}}function e(){t(),setTimeout(e,150)}var n={},r=0;return n.init=function(){$("#btn-stop").on("mousedown",function(){$().get(_root+"/m/stop"),$("#control-range").val(0)}),$("#btn-rev").on("mousedown",function(){var e=$("#control-range"),n=1*e.val();e.val(n-10),t()}),$("#btn-fwd").on("mousedown",function(){var e=$("#control-range"),n=1*e.val();e.val(n+10),t()}),$("#control-range").on("change",t),e()},n}();