From 1319dd43c6548380c029931355bbc95d26f0bef1 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Fri, 5 Jan 2018 20:02:30 +0100 Subject: [PATCH] Fixed minor issues with the tick code, works suprisingly well otherwise! --- API.md | 128 ++++++++++++++++++++++++++++++++++++++++ src/assets/js.h | 6 +- src/assets/version.h | 6 +- src/main.cpp | 3 +- src/server/api.cpp | 6 +- src/server/firmware.cpp | 2 +- src/stairs.cpp | 20 ++++++- web/app.js | 2 +- web/dist/bundle.js | 2 +- 9 files changed, 161 insertions(+), 14 deletions(-) create mode 100644 API.md diff --git a/API.md b/API.md new file mode 100644 index 0000000..c0f0088 --- /dev/null +++ b/API.md @@ -0,0 +1,128 @@ +# API + +- [GET /api/version](#get-version) +- [GET /api/connection/status](#get-connection-status) +- [GET /api/connection](#get-connection) +- [POST /api/connection](#post-connection) +- [GET /api/steps](#get-steps) +- [POST /api/steps](#post-steps) +- [POST /api/firmware](#post-firmware) + + +## GET /api/version + +Returns the unique identifier of the chip and the version of the firmware. + +*Example response:* +```json +{ + "systemID": "st41r", + "version": "2.0.0-beta.1+6" +} +``` + + +## GET /api/connection/status + +Returns the status of the WiFi connections. + +The value of the 'status' element corresponds to the ```wl_status_t``` enum as defined in [wl_definitions.h](https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/include/wl_definitions.h). + +*Example response:* +```json +{ + "ap": { + "enabled": true, + "ip": "192.168.4.1" + }, + "station": { + "enabled": true, + "status": 3, + "ip": "10.138.1.10" + } +} +``` + + +## GET /api/connection + +Returns the settings of the WiFi connections. + +*Example response:* +```json +{ + "hostname": "stairs", + "accesspoint": true, + "station": true, + "ssid": "MyWiFi", + "password": "12345678", + "dhcp": true, + "ip": "", + "subnetmask": "", + "gateway": "" +} +``` + + + +## POST /api/connection + +Updates the settings of the WiFi connections. The module will apply the new settings immediately and will break existing connections. + +*Example request:* +```json +{ + "hostname": "LivingRoomStairs", + "accesspoint": false, + "station": true, + "ssid": "MyWiFi", + "password": "12345678", + "dhcp": false, + "ip": "10.138.1.100", + "subnetmask": "255.255.255.0", + "gateway": "10.138.1.1" +} +``` + + + +## GET /api/steps + +Returns the current brightness value for each step. The number of items in the array is equal to the number of configured steps. Each value has a range of 0 to 255. + +*Example response:* +```json +[ + 0, 10, 30, 50, 80, 110, 130, 150, + 160, 170, 180, 190, 200, 230, 255 +] +``` + + +## POST /api/steps + +Changes the brightness value for each step. If the number of values in the array is less than the number of configured steps, each subsequent step is considered to be off. + +An optional element 'transitionTime' can be included which specifies how long the transition from the current value of each step to it's new value should take, the module will then smoothly fade between the values. The transition time must be specified in milliseconds. Assume a maximum of 30 seconds, because I did not test with higher values. Ain't nobody got time for that! If no transition time or 0 is specified, the new values will be applied immediately. + +An optional array 'startTime' can be included which specifies the delay, for each step individually, before the transition will start. The example request uses this to create a sweeping effect. If no or not enough values are provided, they are assumed to be 0. + +*Example request:* +```json +{ + "transitionTime": 500, + "values": [ + 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128 + ], + "startTime": [ + 0, 50, 100, 150, 200, 250, 300, 350, + 400, 450, 500, 550, 600, 650, 700 + ] +} +``` + + +## POST /api/firmware + +Uploads new firmware. The bin file should be posted as a multipart/form-data file attachment. Name is not relevant. \ No newline at end of file diff --git a/src/assets/js.h b/src/assets/js.h index 15f5db8..9181159 100644 --- a/src/assets/js.h +++ b/src/assets/js.h @@ -2120,8 +2120,8 @@ const uint8_t EmbeddedBundleJS[] PROGMEM = { 0xde,0x3f,0xe5,0xcf,0xd2,0x8f,0x6f,0x91,0x8d,0x3d,0x0d,0x25,0x4b,0xdc,0x65,0x6b,0x3b,0xef,0xab,0x52, 0x06,0x14,0xde,0xf9,0x32,0xb9,0xab,0xf2,0xec,0x97,0x3a,0x6d,0x5e,0xb7,0x1f,0x6c,0x74,0x8c,0xdd,0x05, 0x17,0xb8,0x79,0xf0,0x8f,0x0e,0x0f,0xbf,0x10,0x42,0x23,0x99,0x1c,0xc0,0xcf,0x60,0x19,0xc3,0x8d,0x53, - 0xbf,0x46,0x25,0x4c,0x2d,0x4b,0x83,0x4b,0xcc,0xed,0x03,0xd2,0x9d,0x7f,0x4f,0x0c,0x12,0x3b,0x4b,0xb8, - 0x6d,0xfc,0x9b,0xcb,0xb5,0xd5,0x61,0x22,0xcc,0x9d,0xe3,0xf4,0xe6,0x39,0xe3,0x98,0xad,0x30,0x9f,0xc3, - 0xba,0xe2,0xaa,0x6e,0xf3,0xbf,0x01,0x22,0xb6,0x27,0xc8,0x5c,0xdc,0x01,0x00}; + 0x7f,0x8b,0x4a,0x98,0x5a,0xb6,0x06,0x17,0x99,0xdb,0x87,0xa4,0xbb,0x06,0x9e,0x18,0x25,0x76,0x96,0x70, + 0xdd,0xf8,0x37,0x97,0x6c,0xab,0xd3,0x44,0x9c,0x3b,0x47,0xea,0xcd,0xf3,0xc6,0x71,0x5b,0x61,0x42,0x87, + 0xb5,0xc5,0x75,0xdd,0xe6,0x7f,0x03,0xa4,0x3f,0xb2,0xfe,0x60,0xdc,0x01,0x00}; #endif diff --git a/src/assets/version.h b/src/assets/version.h index 470368b..7949bcf 100644 --- a/src/assets/version.h +++ b/src/assets/version.h @@ -4,10 +4,10 @@ const uint8_t VersionMajor = 2; const uint8_t VersionMinor = 0; const uint8_t VersionPatch = 0; -const uint8_t VersionMetadata = 5; +const uint8_t VersionMetadata = 7; const char VersionBranch[] = "release/2.0"; const char VersionSemVer[] = "2.0.0-beta.1"; -const char VersionFullSemVer[] = "2.0.0-beta.1+5"; -const char VersionCommitDate[] = "2018-01-04"; +const char VersionFullSemVer[] = "2.0.0-beta.1+7"; +const char VersionCommitDate[] = "2018-01-05"; #endif diff --git a/src/main.cpp b/src/main.cpp index d1b7e88..85041af 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,6 +69,7 @@ void setup() pwmDriver = new PCA9685(); pwmDriver->setAddress(PWMDriverAddress, PinSDA, PinSCL); pwmDriver->setPWMFrequency(PWMDriverPWMFrequency); + pwmDriver->setAll(0); _dln("Setup :: initializing Stairs"); stairs = new Stairs(); @@ -76,8 +77,6 @@ void setup() _dln("Setup :: starting initialization sequence"); - stairs->setAll(0); - stairs->set(0, 255); delay(300); diff --git a/src/server/api.cpp b/src/server/api.cpp index 49c5097..8639a1a 100644 --- a/src/server/api.cpp +++ b/src/server/api.cpp @@ -21,9 +21,11 @@ void handleGetSteps(AsyncWebServerRequest *request) DynamicJsonBuffer jsonBuffer(JSON_ARRAY_SIZE(17)); + bool target = !request->hasParam("current"); + JsonArray& root = jsonBuffer.createArray(); for (uint8_t step = 0; step < stepsSettings->count(); step++) - root.add(stairs->get(step)); + root.add(stairs->get(step, target)); AsyncResponseStream *response = request->beginResponseStream("application/json"); root.printTo(*response); @@ -56,7 +58,7 @@ void handlePostSteps(AsyncWebServerRequest *request, uint8_t *data, size_t len, for (uint8_t step = 0; step < valueCount; step++) - stairs->set(step, values[step], transitionTime, step < startTimeCount ? 1 : 0); + stairs->set(step, values[step], transitionTime, step < startTimeCount ? startTime[step] : 0); request->send(200); } diff --git a/src/server/firmware.cpp b/src/server/firmware.cpp index 28b932a..5d1389d 100644 --- a/src/server/firmware.cpp +++ b/src/server/firmware.cpp @@ -70,5 +70,5 @@ void handleFirmwareFile(AsyncWebServerRequest *request, String filename, size_t void registerFirmwareRoutes(AsyncWebServer* server) { - server->on("/firmware", HTTP_POST, handleFirmware, handleFirmwareFile); + server->on("/api/firmware", HTTP_POST, handleFirmware, handleFirmwareFile); } \ No newline at end of file diff --git a/src/stairs.cpp b/src/stairs.cpp index a344c68..f440e92 100644 --- a/src/stairs.cpp +++ b/src/stairs.cpp @@ -126,6 +126,9 @@ void Stairs::tick() } } } + + if (!mTick) + mLastTransitionTime = 0; } @@ -138,11 +141,16 @@ uint8_t Stairs::get(uint8_t step, bool target) void Stairs::set(uint8_t step, uint8_t brightness, uint16_t transitionTime, uint16_t startTime) { + _d("Stairs :: set step = "); _d(step); + _d(", brightness = "); _d(brightness); + _d(", transitionTime = "); _d(transitionTime); + _d(", startTime = "); _dln(startTime); + + if (step >= MaxStepCount) return; if (mStep[step].currentValue == brightness) return; - mTick = true; mStep[step].targetValue = brightness; if (transitionTime > 0) @@ -150,6 +158,16 @@ void Stairs::set(uint8_t step, uint8_t brightness, uint16_t transitionTime, uint mStep[step].startValue = mStep[step].currentValue; mStep[step].startTime = startTime; mStep[step].remainingTime = transitionTime; + + if (!mLastTransitionTime) + mLastTransitionTime = currentTime; + + mTick = true; + } + else + { + mStep[step].currentValue = brightness; + applyCurrentValue(step); } } diff --git a/web/app.js b/web/app.js index d63ab2f..8bb6d39 100644 --- a/web/app.js +++ b/web/app.js @@ -270,7 +270,7 @@ function startApp() } }; - axios.post('/firmware', data, config) + axios.post('/api/firmware', data, config) .then(function(response) { // TODO show "now updating, please wait" diff --git a/web/dist/bundle.js b/web/dist/bundle.js index 1cbdd68..85c07d3 100644 --- a/web/dist/bundle.js +++ b/web/dist/bundle.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.axios=e():t.axios=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";function r(t){var e=new a(t),n=o(a.prototype.request,e);return i.extend(n,a.prototype,e),i.extend(n,e),n}var i=n(2),o=n(3),a=n(5),s=n(6),c=r(s);c.Axios=a,c.create=function(t){return r(i.merge(s,t))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(20),c.all=function(t){return Promise.all(t)},c.spread=n(25),t.exports=c,t.exports.default=c},function(t,e,n){"use strict";function r(t){return"[object Array]"===u.call(t)}function i(t){return null!==t&&"object"==typeof t}function o(t){return"[object Function]"===u.call(t)}function a(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var n=0,i=t.length;n=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(t){s.headers[t]={}}),i.forEach(["post","put","patch"],function(t){s.headers[t]=i.merge(a)}),t.exports=s},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(2),i=n(9),o=n(12),a=n(13),s=n(14),c=n(10),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);t.exports=function(t){return new Promise(function(e,l){var f=t.data,p=t.headers;r.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||s(t.url)||(d=new window.XDomainRequest,h="onload",v=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var m=t.auth.username||"",g=t.auth.password||"";p.Authorization="Basic "+u(m+":"+g)}if(d.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[h]=function(){if(d&&(4===d.readyState||v)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:n,config:t,request:d};i(e,l,r),d=null}},d.onerror=function(){l(c("Network Error",t,null,d)),d=null},d.ontimeout=function(){l(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var y=n(16),_=(t.withCredentials||s(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;_&&(p[t.xsrfHeaderName]=_)}if("setRequestHeader"in d&&r.forEach(p,function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete p[e]:d.setRequestHeader(e,t)}),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),l(t),d=null)}),void 0===f&&(f=null),d.send(f)})}},function(t,e,n){"use strict";var r=n(10);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";var r=n(11);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(2);t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var a=[];i.forEach(e,function(t,e){null!==t&&void 0!==t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),a.push(r(e)+"="+r(t))}))}),o=a.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){"use strict";var r=n(2),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return!0}},function(t,e){"use strict";function n(){this.message="String contains an invalid character"}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,i,o=String(t),a="",s=0,c=r;o.charAt(0|s)||(c="=",s%1);a+=c.charAt(63&e>>8-s%1*8)){if((i=o.charCodeAt(s+=.75))>255)throw new n;e=e<<8|i}return a}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";function r(){this.handlers=[]}var i=n(2);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){"use strict";function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var i=n(2),o=n(19),a=n(20),s=n(6),c=n(21),u=n(22);t.exports=function(t){r(t),t.baseURL&&!c(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]});return(t.adapter||s.adapter)(t).then(function(e){return r(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(r(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,n){"use strict";function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new i(t),e(n.reason))})}var i=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},function(t,e){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}}])}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Vue=e()}(this,function(){"use strict";function t(t){return void 0===t||null===t}function e(t){return void 0!==t&&null!==t}function n(t){return!0===t}function r(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function i(t){return null!==t&&"object"==typeof t}function o(t){return"[object Object]"===mn.call(t)}function a(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function s(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function c(t){var e=parseFloat(t);return isNaN(e)?t:e}function u(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}function f(t,e){return _n.call(t,e)}function p(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function d(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function h(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function v(t,e){for(var n in e)t[n]=e[n];return t}function m(t){for(var e={},n=0;n0&&(G((c=i(c,(a||"")+"_"+s))[0])&&G(l)&&(f[u]=k(l.text+c[0].text),c.shift()),f.push.apply(f,c)):r(c)?G(l)?f[u]=k(l.text+c):""!==c&&f.push(k(c)):G(c)&&G(l)?f[u]=k(l.text+c.text):(n(o._isVList)&&e(c.tag)&&t(c.key)&&e(a)&&(c.key="__vlist"+a+"_"+s+"__"),f.push(c)));return f}(u):void 0:c===Fr&&(s=function(t){for(var e=0;e=0||n.indexOf(t[i])<0)&&r.push(t[i]);return r}return t}(n[o],r[o],i[o]));return e}(t);r&&v(t.extendOptions,r),(e=t.options=D(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function Et(t){this._init(t)}function It(t){return t&&(t.Ctor.options.name||t.tag)}function Lt(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,!("[object RegExp]"!==mn.call(n))&&t.test(e));var n}function Ft(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=It(a.componentOptions);s&&!e(s)&&Dt(n,o,r,i)}}}function Dt(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,l(n,e)}function Nt(t,n){return{staticClass:Pt(t.staticClass,n.staticClass),class:e(t.class)?[t.class,n.class]:n.class}}function Pt(t,e){return t?e?t+" "+e:t:e||""}function Mt(t){return Array.isArray(t)?function(t){for(var n,r="",i=0,o=t.length;i=0&&" "===(m=t.charAt(v));v--);m&&_i.test(m)||(l=!0)}}else void 0===o?(h=i+1,o=t.slice(0,i).trim()):e();if(void 0===o?o=t.slice(0,i).trim():0!==h&&e(),a)for(i=0;i-1?{exp:t.slice(0,zr),key:'"'+t.slice(zr+1)+'"'}:{exp:t,key:null};for(Hr=t,zr=Wr=qr=0;!ce();)ue(Vr=se())?le(Vr):91===Vr&&function(t){var e=1;for(Wr=zr;!ce();)if(t=se(),ue(t))le(t);else if(91===t&&e++,93===t&&e--,0===e){qr=zr;break}}(Vr);return{exp:t.slice(0,Wr),key:t.slice(Wr+1,qr)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function se(){return Hr.charCodeAt(++zr)}function ce(){return zr>=Ur}function ue(t){return 34===t||39===t}function le(t){for(var e=t;!ce()&&(t=se())!==e;);}function fe(t,e,n,r,i){e=(o=e)._withTask||(o._withTask=function(){hr=!0;var t=o.apply(null,arguments);return hr=!1,t}),n&&(e=function(t,e,n){var r=Jr;return function i(){null!==t.apply(null,arguments)&&pe(e,i,n,r)}}(e,t,r)),Jr.addEventListener(t,e,Vn?{capture:r,passive:i}:r);var o}function pe(t,e,n,r){(r||Jr).removeEventListener(t,e._withTask||e,n)}function de(n,r){if(!t(n.data.on)||!t(r.data.on)){var i=r.data.on||{},o=n.data.on||{};Jr=r.elm,function(t){if(e(t[bi])){var n=Pn?"change":"input";t[n]=[].concat(t[bi],t[n]||[]),delete t[bi]}e(t[wi])&&(t.change=[].concat(t[wi],t.change||[]),delete t[wi])}(i),J(i,o,fe,pe,r.context),Jr=void 0}}function he(n,r){if(!t(n.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=n.data.domProps||{},u=r.data.domProps||{};e(u.__ob__)&&(u=r.data.domProps=v({},u));for(i in s)t(u[i])&&(a[i]="");for(i in u){if(o=u[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i){a._value=o;var l=t(o)?"":String(o);p=l,!(f=a).composing&&("OPTION"===f.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(f,p)||function(t,n){var r=t.value,i=t._vModifiers;if(e(i)){if(i.lazy)return!1;if(i.number)return c(r)!==c(n);if(i.trim)return r.trim()!==n.trim()}return r!==n}(f,p))&&(a.value=l)}else a[i]=o}}var f,p}function ve(t){var e=me(t.style);return t.staticStyle?v(t.staticStyle,e):e}function me(t){return Array.isArray(t)?m(t):"string"==typeof t?ki(t):t}function ge(n,r){var i=r.data,o=n.data;if(!(t(i.staticStyle)&&t(i.style)&&t(o.staticStyle)&&t(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,p=me(r.data.style)||{};r.data.normalizedStyle=e(p.__ob__)?v({},p):p;var d=function(t,e){for(var n,r={},i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=ve(i.data))&&v(r,n);(n=ve(t.data))&&v(r,n);for(var o=t;o=o.parent;)o.data&&(n=ve(o.data))&&v(r,n);return r}(r);for(s in f)t(d[s])&&Si(c,s,"");for(s in d)(a=d[s])!==f[s]&&Si(c,s,null==a?"":a)}}function ye(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function _e(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function be(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&v(e,Ei(t.name||"v")),v(e,t),e}return"string"==typeof t?Ei(t):void 0}}function we(t){Ri(function(){Ri(t)})}function $e(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),ye(t,e))}function xe(t,e){t._transitionClasses&&l(t._transitionClasses,e),_e(t,e)}function ke(t,e,n){var r=Ce(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Li?Ni:Mi,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout(function(){c0&&(n=Li,l=a,f=o.length):e===Fi?u>0&&(n=Fi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Li:Fi:null)?n===Li?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Li&&Bi.test(r[Di+"Property"])}}function Ae(t,e){for(;t.length1}function Ie(t,e){!0!==e.data.show&&Te(e)}function Le(t,e,n){Fe(t,e,n),(Pn||Rn)&&setTimeout(function(){Fe(t,e,n)},0)}function Fe(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=t.options.length;s-1,a.selected!==o&&(a.selected=o);else if(y(Ne(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function De(t,e){return e.every(function(e){return!y(e,t)})}function Ne(t){return"_value"in t?t._value:t.value}function Pe(t){t.target.composing=!0}function Me(t){t.target.composing&&(t.target.composing=!1,Re(t.target,"input"))}function Re(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Be(t){return!t.componentInstance||t.data&&t.data.transition?t:Be(t.componentInstance._vnode)}function Ue(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Ue(Q(e.children)):t}function He(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[wn(o)]=i[o];return e}function Ve(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function ze(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function We(t){t.data.newPos=t.elm.getBoundingClientRect()}function qe(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function Je(t,e){var n=e?jo:Oo;return t.replace(n,function(t){return To[t]})}function Ke(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:function(t){for(var e={},n=0,r=t.length;n':'
',ko.innerHTML.indexOf(" ")>0}var vn=Object.freeze({}),mn=Object.prototype.toString,gn=u("slot,component",!0),yn=u("key,ref,slot,slot-scope,is"),_n=Object.prototype.hasOwnProperty,bn=/-(\w)/g,wn=p(function(t){return t.replace(bn,function(t,e){return e?e.toUpperCase():""})}),$n=p(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),xn=/\B([A-Z])/g,kn=p(function(t){return t.replace(xn,"-$1").toLowerCase()}),Cn=function(t,e,n){return!1},An=function(t){return t},Sn="data-server-rendered",Tn=["component","directive","filter"],On=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],jn={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Cn,isReservedAttr:Cn,isUnknownElement:Cn,getTagNamespace:g,parsePlatformTagName:An,mustUseProp:Cn,_lifecycleHooks:On},En=/[^\w.$]/,In="__proto__"in{},Ln="undefined"!=typeof window,Fn="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Dn=Fn&&WXEnvironment.platform.toLowerCase(),Nn=Ln&&window.navigator.userAgent.toLowerCase(),Pn=Nn&&/msie|trident/.test(Nn),Mn=Nn&&Nn.indexOf("msie 9.0")>0,Rn=Nn&&Nn.indexOf("edge/")>0,Bn=Nn&&Nn.indexOf("android")>0||"android"===Dn,Un=Nn&&/iphone|ipad|ipod|ios/.test(Nn)||"ios"===Dn,Hn=(Nn&&/chrome\/\d+/.test(Nn),{}.watch),Vn=!1;if(Ln)try{var zn={};Object.defineProperty(zn,"passive",{get:function(){Vn=!0}}),window.addEventListener("test-passive",null,zn)}catch(t){}var Wn,qn,Jn=function(){return void 0===Wn&&(Wn=!Ln&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),Wn},Kn=Ln&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Xn="undefined"!=typeof Symbol&&x(Symbol)&&"undefined"!=typeof Reflect&&x(Reflect.ownKeys);qn="undefined"!=typeof Set&&x(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var Gn=g,Zn=0,Yn=function(){this.id=Zn++,this.subs=[]};Yn.prototype.addSub=function(t){this.subs.push(t)},Yn.prototype.removeSub=function(t){l(this.subs,t)},Yn.prototype.depend=function(){Yn.target&&Yn.target.addDep(this)},Yn.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;eSr&&$r[n].id>t.id;)n--;$r.splice(n+1,0,t)}else $r.push(t);Cr||(Cr=!0,z(ut))}}(this)},Or.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||i(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){B(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},Or.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Or.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},Or.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||l(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var jr={enumerable:!0,configurable:!0,get:g,set:g},Er={lazy:!0};Ct(At.prototype);var Ir={init:function(t,n,r,i){if(!t.componentInstance||t.componentInstance._isDestroyed)(t.componentInstance=function(t,n,o,a){var s={_isComponent:!0,parent:wr,_parentVnode:t,_parentElm:r||null,_refElm:i||null},c=t.data.inlineTemplate;return e(c)&&(s.render=c.render,s.staticRenderFns=c.staticRenderFns),new t.componentOptions.Ctor(s)}(t)).$mount(n?t.elm:void 0,n);else if(t.data.keepAlive){var o=t;Ir.prepatch(o,o)}},prepatch:function(t,e){var n=e.componentOptions;!function(t,e,n,r,i){var o=!!(i||t.$options._renderChildren||r.data.scopedSlots||t.$scopedSlots!==vn);if(t.$options._parentVnode=r,t.$vnode=r,t._vnode&&(t._vnode.parent=r),t.$options._renderChildren=i,t.$attrs=r.data&&r.data.attrs||vn,t.$listeners=n||vn,e&&t.$options.props){ar.shouldConvert=!1;for(var a=t._props,s=t.$options._propKeys||[],c=0;c1?h(n):n;for(var r=h(arguments,1),i=0,o=n.length;iparseInt(this.max)&&Dt(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={};e.get=function(){return jn},Object.defineProperty(t,"config",e),t.util={warn:Gn,extend:v,mergeOptions:D,defineReactive:T},t.set=O,t.delete=j,t.nextTick=z,t.options=Object.create(null),Tn.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,v(t.options.components,Br),t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=h(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this},t.mixin=function(t){return this.options=D(this.options,t),this},function(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name,a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=D(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)lt(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)ft(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Tn.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=v({},a.options),i[r]=a,a}}(t),n=t,Tn.forEach(function(t){n[t]=function(e,n){return n?("component"===t&&o(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}});var n}(Et),Object.defineProperty(Et.prototype,"$isServer",{get:Jn}),Object.defineProperty(Et.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Et.version="2.5.13";var Ur,Hr,Vr,zr,Wr,qr,Jr,Kr,Xr=u("style,class"),Gr=u("input,textarea,option,select,progress"),Zr=function(t,e,n){return"value"===n&&Gr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Yr=u("contenteditable,draggable,spellcheck"),Qr=u("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),ti="http://www.w3.org/1999/xlink",ei=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},ni=function(t){return ei(t)?t.slice(6,t.length):""},ri=function(t){return null==t||!1===t},ii={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},oi=u("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),ai=u("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),si=function(t){return oi(t)||ai(t)},ci=Object.create(null),ui=u("text,number,password,search,email,tel,url"),li=Object.freeze({createElement:function(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(t,e){return document.createElementNS(ii[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setAttribute:function(t,e,n){t.setAttribute(e,n)}}),fi={create:function(t,e){Ut(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Ut(t,!0),Ut(e))},destroy:function(t){Ut(t,!0)}},pi=new tr("",{},[]),di=["create","activate","update","remove","destroy"],hi={create:zt,update:zt,destroy:function(t){zt(t,pi)}},vi=Object.create(null),mi=[fi,hi],gi={create:Jt,update:Jt},yi={create:Xt,update:Xt},_i=/[\w).+\-_$\]]/,bi="__r",wi="__c",$i={create:de,update:de},xi={create:he,update:he},ki=p(function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach(function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}),Ci=/^--/,Ai=/\s*!important$/,Si=function(t,e,n){if(Ci.test(e))t.style.setProperty(e,n);else if(Ai.test(n))t.style.setProperty(e,n.replace(Ai,""),"important");else{var r=Oi(e);if(Array.isArray(n))for(var i=0,o=n.length;id?h(n,t(i[_+1])?null:i[_+1].elm,i,p,_,o):p>_&&m(0,r,f,d)}(c,p,d,o,s):e(d)?(e(r.text)&&C.setTextContent(c,""),h(c,null,d,0,d.length-1,o)):e(p)?m(0,p,0,p.length-1):e(r.text)&&C.setTextContent(c,""):r.text!==i.text&&C.setTextContent(c,i.text),e(l)&&e(u=l.hook)&&e(u=u.postpatch)&&u(r,i)}}}function _(t,r,i){if(n(i)&&e(t.parent))t.parent.data.pendingInsert=r;else for(var o=0;o-1?ci[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ci[t]=/HTMLUnknownElement/.test(e.toString())},v(Et.options.directives,Vi),v(Et.options.components,Ji),Et.prototype.__patch__=Ln?Ui:g,Et.prototype.$mount=function(t,e){return function(t,e,n){t.$el=e,t.$options.render||(t.$options.render=nr),ct(t,"beforeMount");return new Or(t,function(){t._update(t._render(),n)},g,null,!0),n=!1,null==t.$vnode&&(t._isMounted=!0,ct(t,"mounted")),t}(this,t=t&&Ln?Bt(t):void 0,e)},Et.nextTick(function(){jn.devtools&&Kn&&Kn.emit("init",Et)},0);var Ki,Xi=/\{\{((?:.|\n)+?)\}\}/g,Gi=/[-.*+?^${}()|[\]\/\\]/g,Zi=p(function(t){var e=t[0].replace(Gi,"\\$&"),n=t[1].replace(Gi,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}),Yi={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=ie(t,"class");n&&(t.staticClass=JSON.stringify(n));var r=re(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}},Qi={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=ie(t,"style");n&&(t.staticStyle=JSON.stringify(ki(n)));var r=re(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},to=u("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),eo=u("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),no=u("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),ro=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,io="[a-zA-Z_][\\w\\-\\.]*",oo="((?:"+io+"\\:)?"+io+")",ao=new RegExp("^<"+oo),so=/^\s*(\/?)>/,co=new RegExp("^<\\/"+oo+"[^>]*>"),uo=/^]+>/i,lo=/^/g,"$1").replace(//g,"$1")),Io(p,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});l+=t.length-h.length,t=h,r(p,l-f,l)}else{var v=t.indexOf("<");if(0===v){if(lo.test(t)){var m=t.indexOf("--\x3e");if(m>=0){e.shouldKeepComment&&e.comment(t.substring(4,m)),n(m+3);continue}}if(fo.test(t)){var g=t.indexOf("]>");if(g>=0){n(g+2);continue}}var y=t.match(uo);if(y){n(y[0].length);continue}var _=t.match(co);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var w=function(){var e=t.match(ao);if(e){var r={tagName:e[1],attrs:[],start:l};n(e[0].length);for(var i,o;!(i=t.match(so))&&(o=t.match(ro));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if(w){!function(t){var n=t.tagName,i=t.unarySlash;s&&("p"===o&&no(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||!!i,f=t.attrs.length,p=new Array(f),d=0;d=0){for(x=t.slice(v);!(co.test(x)||ao.test(x)||lo.test(x)||fo.test(x)||(k=x.indexOf("<",1))<0);)v+=k,x=t.slice(v);$=t.substring(0,v),n(v)}v<0&&($=t,t=""),e.chars&&$&&e.chars($)}if(t===i){e.chars&&e.chars(t);break}}r()}(t,{warn:ho,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,start:function(t,a,u){var l=i&&i.ns||wo(t);Pn&&"svg"===l&&(a=function(t){for(var e=[],n=0;nc&&(s.push(o=t.slice(c,i)),a.push(JSON.stringify(o)));var u=Gt(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c1?1:0:1:t?Math.min(t,2):0;var n}(e,n.length)]?n[e].trim():t}function a(t){return JSON.parse(JSON.stringify(t))}function s(t){for(var n=arguments,r=Object(t),i=1;i=97&&e<=122||e>=65&&e<=90?"ident":e>=49&&e<=57?"number":"else"}function d(t){var e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(n=e,N.test(n)?function(t){var e=t.charCodeAt(0);return e!==t.charCodeAt(t.length-1)||34!==e&&39!==e?t:t.slice(1,-1)}(e):"*"+e);var n}var h,v=Object.prototype.toString,m="[object Object]",g=Object.prototype.hasOwnProperty,y="undefined"!=typeof Intl&&void 0!==Intl.DateTimeFormat,_="undefined"!=typeof Intl&&void 0!==Intl.NumberFormat,b={beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n){if(t.i18n instanceof M){if(t.__i18n)try{var e={};t.__i18n.forEach(function(t){e=s(e,JSON.parse(t))}),Object.keys(e).forEach(function(n){t.i18n.mergeLocaleMessage(n,e[n])})}catch(t){}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData(),this._i18n.subscribeDataChanging(this),this._subscribing=!0}else if(n(t.i18n)){if(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof M&&(t.i18n.root=this.$root.$i18n,t.i18n.fallbackLocale=this.$root.$i18n.fallbackLocale,t.i18n.silentTranslationWarn=this.$root.$i18n.silentTranslationWarn),t.__i18n)try{var r={};t.__i18n.forEach(function(t){r=s(r,JSON.parse(t))}),t.i18n.messages=r}catch(t){}this._i18n=new M(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),this._i18n.subscribeDataChanging(this),this._subscribing=!0,(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale())}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof M?(this._i18n=this.$root.$i18n,this._i18n.subscribeDataChanging(this),this._subscribing=!0):t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof M&&(this._i18n=t.parent.$i18n,this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy:function(){this._i18n&&(this._subscribing&&(this._i18n.unsubscribeDataChanging(this),delete this._subscribing),this._i18nWatcher&&(this._i18nWatcher(),delete this._i18nWatcher),this._localeWatcher&&(this._localeWatcher(),delete this._localeWatcher),this._i18n=null)}},w={name:"i18n",functional:!0,props:{tag:{type:String,default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(e,n){var r=n.props,i=n.data,o=n.children,a=n.parent.$i18n;if(o=(o||[]).filter(function(t){return t.tag||(t.text=t.text.trim())}),!a)return o;var s=r.path,c=r.locale,u={},l=r.places||{},f=Array.isArray(l)?l.length>0:Object.keys(l).length>0,p=o.every(function(t){if(t.data&&t.data.attrs){var e=t.data.attrs.place;return void 0!==e&&""!==e}});return f&&o.length>0&&!p&&t("If places prop is set, all child elements must have place prop set."),Array.isArray(l)?l.forEach(function(t,e){u[e]=t}):Object.keys(l).forEach(function(t){u[t]=l[t]}),o.forEach(function(t,e){var n=p?""+t.data.attrs.place:""+e;u[n]=t}),e(r.tag,i,a.i(s,c,u))}},$=function(){this._caches=Object.create(null)};$.prototype.interpolate=function(t,n){var r=this._caches[t];return r||(r=function(t){for(var e=[],n=0,r="";n0)f--,l=j,h[C]();else{if(f=0,!1===(n=d(n)))return!1;h[A]()}};null!==l;)if(u++,"\\"!==(e=t[u])||!function(){var e=t[u+1];if(l===E&&"'"===e||l===I&&'"'===e)return u++,r="\\"+e,h[C](),!0}()){if(i=p(e),(o=(s=D[l])[i]||s.else||F)===F)return;if(l=o[0],(a=h[o[1]])&&(r=o[2],r=void 0===r?e:r,!1===a()))return;if(l===L)return c}}(t))&&(this._cache[t]=e),e||[]},P.prototype.getPathValue=function(t,n){if(!e(t))return null;var r=this.parsePath(n);if(i=r,Array.isArray(i)&&0===i.length)return null;for(var i,o=r.length,a=t,s=0;s-1)t.splice(n,1)}}(this._dataListeners,t)},M.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){for(var e=t._dataListeners.length;e--;)h.nextTick(function(){t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})},M.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.vm.$watch("locale",function(e){t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})},R.vm.get=function(){return this._vm},R.messages.get=function(){return a(this._getMessages())},R.dateTimeFormats.get=function(){return a(this._getDateTimeFormats())},R.numberFormats.get=function(){return a(this._getNumberFormats())},R.locale.get=function(){return this._vm.locale},R.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},R.fallbackLocale.get=function(){return this._vm.fallbackLocale},R.fallbackLocale.set=function(t){this._vm.$set(this._vm,"fallbackLocale",t)},R.missing.get=function(){return this._missing},R.missing.set=function(t){this._missing=t},R.formatter.get=function(){return this._formatter},R.formatter.set=function(t){this._formatter=t},R.silentTranslationWarn.get=function(){return this._silentTranslationWarn},R.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},M.prototype._getMessages=function(){return this._vm.messages},M.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},M.prototype._getNumberFormats=function(){return this._vm.numberFormats},M.prototype._warnDefault=function(t,e,n,i){return r(n)?(this.missing&&this.missing.apply(null,[t,e,i]),e):n},M.prototype._isFallbackRoot=function(t){return!t&&!r(this._root)&&this._fallbackRoot},M.prototype._interpolate=function(t,e,i,o,a,s){if(!e)return null;var c=this._path.getPathValue(e,i);if(Array.isArray(c))return c;var u;if(r(c)){if(!n(e))return null;if("string"!=typeof(u=e[i]))return null}else{if("string"!=typeof c)return null;u=c}return u.indexOf("@:")>=0&&(u=this._link(t,e,u,o,a,s)),s?this._render(u,a,s):u},M.prototype._link=function(t,e,n,r,i,o){var a=n,s=a.match(/(@:[\w\-_|.]+)/g);for(var c in s)if(s.hasOwnProperty(c)){var u=s[c],l=u.substr(2),f=this._interpolate(t,e,l,r,"raw"===i?"string":i,"raw"===i?void 0:o);if(this._isFallbackRoot(f)){if(!this._root)throw Error("unexpected error");var p=this._root;f=p._translate(p._getMessages(),p.locale,p.fallbackLocale,l,r,i,o)}a=(f=this._warnDefault(t,l,f,r))?a.replace(u,f):a}return a},M.prototype._render=function(t,e,n){var r=this._formatter.interpolate(t,n);return"string"===e?r.join(""):r},M.prototype._translate=function(t,e,n,i,o,a,s){var c=this._interpolate(e,t[e],i,o,a,s);return r(c)?r(c=this._interpolate(n,t[n],i,o,a,s))?null:c:c},M.prototype._t=function(t,e,n,r){for(var o=[],a=arguments.length-4;a-- >0;)o[a]=arguments[a+4];if(!t)return"";var s=i.apply(void 0,o),c=s.locale||e,u=this._translate(n,c,this.fallbackLocale,t,r,"string",s.params);if(this._isFallbackRoot(u)){if(!this._root)throw Error("unexpected error");return(l=this._root).t.apply(l,[t].concat(o))}return this._warnDefault(c,t,u,r);var l},M.prototype.t=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return(r=this)._t.apply(r,[t,this.locale,this._getMessages(),null].concat(e));var r},M.prototype._i=function(t,e,n,r,i){var o=this._translate(n,e,this.fallbackLocale,t,r,"raw",i);if(this._isFallbackRoot(o)){if(!this._root)throw Error("unexpected error");return this._root.i(t,e,i)}return this._warnDefault(e,t,o,r)},M.prototype.i=function(t,e,n){return t?("string"!=typeof e&&(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},M.prototype._tc=function(t,e,n,r,i){for(var a=[],s=arguments.length-5;s-- >0;)a[s]=arguments[s+5];return t?(void 0===i&&(i=1),o((c=this)._t.apply(c,[t,e,n,r].concat(a)),i)):"";var c},M.prototype.tc=function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return(i=this)._tc.apply(i,[t,this.locale,this._getMessages(),null,e].concat(n));var i},M.prototype._te=function(t,e,n){for(var r=[],o=arguments.length-3;o-- >0;)r[o]=arguments[o+3];var a=i.apply(void 0,r).locale||e;return this._exist(n[a],t)},M.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},M.prototype.getLocaleMessage=function(t){return a(this._vm.messages[t]||{})},M.prototype.setLocaleMessage=function(t,e){this._vm.messages[t]=e},M.prototype.mergeLocaleMessage=function(t,e){this._vm.messages[t]=h.util.extend(this._vm.messages[t]||{},e)},M.prototype.getDateTimeFormat=function(t){return a(this._vm.dateTimeFormats[t]||{})},M.prototype.setDateTimeFormat=function(t,e){this._vm.dateTimeFormats[t]=e},M.prototype.mergeDateTimeFormat=function(t,e){this._vm.dateTimeFormats[t]=h.util.extend(this._vm.dateTimeFormats[t]||{},e)},M.prototype._localizeDateTime=function(t,e,n,i,o){var a=e,s=i[a];if((r(s)||r(s[o]))&&(a=n,s=i[a]),r(s)||r(s[o]))return null;var c=s[o],u=a+"__"+o,l=this._dateTimeFormatters[u];return l||(l=this._dateTimeFormatters[u]=new Intl.DateTimeFormat(a,c)),l.format(t)},M.prototype._d=function(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);var r=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.d(t,n,e)}return r||""},M.prototype.d=function(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var i=this.locale,o=null;return 1===n.length?"string"==typeof n[0]?o=n[0]:e(n[0])&&(n[0].locale&&(i=n[0].locale),n[0].key&&(o=n[0].key)):2===n.length&&("string"==typeof n[0]&&(o=n[0]),"string"==typeof n[1]&&(i=n[1])),this._d(t,i,o)},M.prototype.getNumberFormat=function(t){return a(this._vm.numberFormats[t]||{})},M.prototype.setNumberFormat=function(t,e){this._vm.numberFormats[t]=e},M.prototype.mergeNumberFormat=function(t,e){this._vm.numberFormats[t]=h.util.extend(this._vm.numberFormats[t]||{},e)},M.prototype._localizeNumber=function(t,e,n,i,o){var a=e,s=i[a];if((r(s)||r(s[o]))&&(a=n,s=i[a]),r(s)||r(s[o]))return null;var c=s[o],u=a+"__"+o,l=this._numberFormatters[u];return l||(l=this._numberFormatters[u]=new Intl.NumberFormat(a,c)),l.format(t)},M.prototype._n=function(t,e,n){if(!n)return new Intl.NumberFormat(e).format(t);var r=this._localizeNumber(t,e,this.fallbackLocale,this._getNumberFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.n(t,n,e)}return r||""},M.prototype.n=function(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var i=this.locale,o=null;return 1===n.length?"string"==typeof n[0]?o=n[0]:e(n[0])&&(n[0].locale&&(i=n[0].locale),n[0].key&&(o=n[0].key)):2===n.length&&("string"==typeof n[0]&&(o=n[0]),"string"==typeof n[1]&&(i=n[1])),this._n(t,i,o)},Object.defineProperties(M.prototype,R),M.availabilities={dateTimeFormat:y,numberFormat:_},M.install=function t(e){(h=e).version&&Number(h.version.split(".")[0]),t.installed=!0,Object.defineProperty(h.prototype,"$i18n",{get:function(){return this._i18n}}),n=h,Object.defineProperty(n.prototype,"$t",{get:function(){var t=this;return function(e){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var i=t.$i18n;return i._t.apply(i,[e,i.locale,i._getMessages(),t].concat(n))}}}),Object.defineProperty(n.prototype,"$tc",{get:function(){var t=this;return function(e,n){for(var r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];var o=t.$i18n;return o._tc.apply(o,[e,o.locale,o._getMessages(),t,n].concat(r))}}}),Object.defineProperty(n.prototype,"$te",{get:function(){var t=this;return function(e,n){var r=t.$i18n;return r._te(e,r.locale,r._getMessages(),n)}}}),Object.defineProperty(n.prototype,"$d",{get:function(){var t=this;return function(e){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(i=t.$i18n).d.apply(i,[e].concat(n));var i}}}),Object.defineProperty(n.prototype,"$n",{get:function(){var t=this;return function(e){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(i=t.$i18n).n.apply(i,[e].concat(n));var i}}}),h.mixin(b),h.directive("t",{bind:c,update:u}),h.component(w.name,w);var n,r=h.config.optionMergeStrategies;r.i18n=r.methods},M.version="7.3.3","undefined"!=typeof window&&window.Vue&&window.Vue.use(M),M});var messages={en:{title:"Stairs",systemID:"System ID",firmwareVersion:"Firmware version: ",copyright:"Copyright © 2017 Mark van Renswoude",loading:"Please wait, loading configuration...",applyButton:"Apply",applyButtonSaving:"Saving...",wifiStatus:{accesspoint:{title:"AP: ",disabled:"Disabled"},stationmode:{title:"WiFi: ",disabled:"Disabled",idle:"Idle",noSSID:"SSID not found",scanCompleted:"Scan completed",connectFailed:"Failed to connect",connectionLost:"Connection lost",disconnected:"Disconnected"}},status:{tabTitle:"Status",title:"Current status"},triggers:{tabTitle:"Triggers",timeTitle:"Time",motionTitle:"Motion"},connection:{tabTitle:"Connection",title:"Connection parameters",accesspoint:"Enable access point",accesspointHint:"Allows for a direct connection from your device to this Stairs module for configuration purposes. The Stairs configuration is available on http://192.168.1.4/ when you are connected to it. Turn it off as soon as station mode is configured, as it is not secured in any way. You can always turn this option back on by pushing the access point button until the LED lights up.",stationmode:"Enable station mode",stationmodeHint:"Connect this Stairs module to your own WiFi router. Please enter the SSID, password and further configuration below.",ssid:"SSID",password:"Password",dhcp:"Use DHCP",dhcpHint:"Automatically assigns an IP address to this Stairs module. You probably want to keep this on unless you know what you're doing.",ipaddress:"IP address",subnetmask:"Subnet mask",gateway:"Gateway",hostname:"Hostname",hostnamePlaceholder:"Default: mac address"},firmware:{tabTitle:"Firmware",title:"Firmware update"}},nl:{title:"Trap",systemID:"Systeem ID",firmwareVersion:"Firmware versie: ",copyright:"Copyright © 2017 Mark van Renswoude",loading:"Een ogenblik geduld, bezig met laden van configuratie...",applyButton:"Toepassen",applyButtonSaving:"Bezig met opslaan...",wifiStatus:{accesspoint:{title:"AP: ",disabled:"Uitgeschakeld"},stationmode:{title:"WiFi: ",disabled:"Uitgeschakeld",idle:"Slaapstand",noSSID:"SSID niet gevonden",scanCompleted:"Scan afgerond",connectFailed:"Kan geen verbinding maken",connectionLost:"Verbinding verloren",disconnected:"Niet verbonden"}},status:{tabTitle:"Status",title:"Huidige status"},triggers:{tabTitle:"Triggers",timeTitle:"Tijd",motionTitle:"Beweging"},connection:{tabTitle:"Verbinding",title:"Verbinding configuratie",accesspoint:"Access point inschakelen",accesspointhint:"Maakt het mogelijk om een directe connectie vanaf een apparaat naar deze Trap module te maken om de module te configureren. De Trap module is te benaderen via http://192.168.1.4/ nadat je connectie hebt gemaakt. Schakel deze optie uit na het configureren, aangezien deze niet beveiligd is. Je kunt deze optie ook inschakelen door op de Access point knop te drukken totdat de LED aan gaat.",stationmode:"Verbinding met WiFi maken",stationmodehint:"Verbind deze Trap module aan je eigen WiFi router. Vul hieronder het SSID en wachtwoord in, en configureer eventuel de overige opties.",ssid:"SSID",password:"Wachtwoord",dhcp:"Gebruik DHCP",dhcphint:"Automatisch een IP adres toewijzen aan deze Trap module. Waarschijnlijk wil je deze optie aan laten, tenzij je weet waar je mee bezig bent.",ipaddress:"IP adres",subnetmask:"Subnet masker",gateway:"Gateway",hostname:"Hostnaam",hostnamePlaceholder:"Standaard: mac adres"},firmware:{tabTitle:"Firmware",title:"Firmware bijwerken"}}};function startApp(){var t=new VueI18n({locale:navigator.language,fallbackLocale:"en",messages:messages});new Vue({el:"#app",i18n:t,data:{loading:!0,saving:!1,loadingIndicator:"|",uploadProgress:!1,activeTab:"status",version:{systemID:"loading...",version:"loading..."},wifiStatus:{ap:{enabled:!1,ip:"0.0.0.0"},station:{enabled:!1,status:0,ip:"0.0.0.0"}},connection:{hostname:null,accesspoint:!0,station:!1,ssid:null,password:null,dhcp:!0,ip:null,subnetmask:null,gateway:null},steps:[{value:50},{value:0},{value:0},{value:0},{value:0},{value:70},{value:0},{value:0},{value:0},{value:0},{value:25},{value:0},{value:0},{value:0}]},created:function(){var e=this;document.title=t.t("title"),e.startLoadingIndicator(),e.updateWiFiStatus(),axios.get("/api/version").then(function(t){"object"==typeof t.data&&(e.version=t.data)}).catch(function(t){console.log(t)}),axios.all([axios.get("/api/connection").then(function(t){"object"==typeof t.data&&(e.connection=t.data)}).catch(function(t){console.log(t)})]).then(axios.spread(function(t,n){e.stopLoadingIndicator(),e.loading=!1}))},methods:{applyConnection:function(){var t=this;t.saving||(t.saving=!0,axios.post("/api/connection",{hostname:t.connection.hostname,accesspoint:t.connection.accesspoint,station:t.connection.station,ssid:t.connection.ssid,password:t.connection.password,dhcp:t.connection.dhcp,ip:t.connection.ip,subnetmask:t.connection.subnetmask,gateway:t.connection.gateway}).then(function(t){}).catch(function(t){console.log(t)}).then(function(){t.saving=!1}))},startLoadingIndicator:function(){var t=this;t.loadingStage=0,t.loadingTimer=setInterval(function(){switch(t.loadingStage++,t.loadingStage){case 1:t.loadingIndicator="/";break;case 2:t.loadingIndicator="-";break;case 3:t.loadingIndicator="\\";break;case 4:t.loadingIndicator="|",t.loadingStage=0}},250)},stopLoadingIndicator:function(){clearInterval(this.loadingTimer)},getWiFiStationStatus:function(){if(!this.wifiStatus.station.enabled)return"disconnected";switch(this.wifiStatus.station.status){case 0:case 2:return"connecting";case 1:case 4:case 5:return"error";case 3:return"connected";case 6:default:return"disconnected"}},getWiFiStationStatusText:function(){if(!this.wifiStatus.station.enabled)return t.t("wifiStatus.stationmode.disabled");switch(this.wifiStatus.station.status){case 0:return t.t("wifiStatus.stationmode.idle");case 1:return t.t("wifiStatus.stationmode.noSSID");case 2:return t.t("wifiStatus.stationmode.scanCompleted");case 3:return this.wifiStatus.station.ip;case 4:return t.t("wifiStatus.stationmode.connectFailed");case 5:return t.t("wifiStatus.stationmode.connectionLost");case 6:default:return t.t("wifiStatus.stationmode.disconnected")}},updateWiFiStatus:function(){var t=this;t.saving?setTimeout(t.updateWiFiStatus,5e3):axios.get("/api/connection/status").then(function(e){"object"==typeof e.data&&(t.wifiStatus=e.data)}).catch(function(t){console.log(t)}).then(function(){setTimeout(t.updateWiFiStatus,5e3)})},uploadFirmware:function(){var t=this;if(!t.saving){t.saving=!0,t.uploadProgress=0;var e=new FormData;e.append("file",document.getElementById("firmwareFile").files[0]);var n={timeout:36e4,onUploadProgress:function(e){t.uploadProgress=Math.round(100*e.loaded/e.total)}};axios.post("/firmware",e,n).then(function(t){console.log("Update sent")}).catch(function(t){console.log(t)}).then(function(){t.uploadProgress=!1,t.saving=!1,document.getElementById("firmware").reset()})}}}})} \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.axios=e():t.axios=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";function r(t){var e=new a(t),n=o(a.prototype.request,e);return i.extend(n,a.prototype,e),i.extend(n,e),n}var i=n(2),o=n(3),a=n(5),s=n(6),c=r(s);c.Axios=a,c.create=function(t){return r(i.merge(s,t))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(20),c.all=function(t){return Promise.all(t)},c.spread=n(25),t.exports=c,t.exports.default=c},function(t,e,n){"use strict";function r(t){return"[object Array]"===u.call(t)}function i(t){return null!==t&&"object"==typeof t}function o(t){return"[object Function]"===u.call(t)}function a(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var n=0,i=t.length;n=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(t){s.headers[t]={}}),i.forEach(["post","put","patch"],function(t){s.headers[t]=i.merge(a)}),t.exports=s},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(2),i=n(9),o=n(12),a=n(13),s=n(14),c=n(10),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);t.exports=function(t){return new Promise(function(e,l){var f=t.data,p=t.headers;r.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||s(t.url)||(d=new window.XDomainRequest,h="onload",v=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var m=t.auth.username||"",g=t.auth.password||"";p.Authorization="Basic "+u(m+":"+g)}if(d.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[h]=function(){if(d&&(4===d.readyState||v)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:n,config:t,request:d};i(e,l,r),d=null}},d.onerror=function(){l(c("Network Error",t,null,d)),d=null},d.ontimeout=function(){l(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var y=n(16),_=(t.withCredentials||s(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;_&&(p[t.xsrfHeaderName]=_)}if("setRequestHeader"in d&&r.forEach(p,function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete p[e]:d.setRequestHeader(e,t)}),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),l(t),d=null)}),void 0===f&&(f=null),d.send(f)})}},function(t,e,n){"use strict";var r=n(10);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";var r=n(11);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(2);t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var a=[];i.forEach(e,function(t,e){null!==t&&void 0!==t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),a.push(r(e)+"="+r(t))}))}),o=a.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){"use strict";var r=n(2),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return!0}},function(t,e){"use strict";function n(){this.message="String contains an invalid character"}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,i,o=String(t),a="",s=0,c=r;o.charAt(0|s)||(c="=",s%1);a+=c.charAt(63&e>>8-s%1*8)){if((i=o.charCodeAt(s+=.75))>255)throw new n;e=e<<8|i}return a}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";function r(){this.handlers=[]}var i=n(2);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){"use strict";function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var i=n(2),o=n(19),a=n(20),s=n(6),c=n(21),u=n(22);t.exports=function(t){r(t),t.baseURL&&!c(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]});return(t.adapter||s.adapter)(t).then(function(e){return r(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(r(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,n){"use strict";function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new i(t),e(n.reason))})}var i=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},function(t,e){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}}])}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Vue=e()}(this,function(){"use strict";function t(t){return void 0===t||null===t}function e(t){return void 0!==t&&null!==t}function n(t){return!0===t}function r(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function i(t){return null!==t&&"object"==typeof t}function o(t){return"[object Object]"===mn.call(t)}function a(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function s(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function c(t){var e=parseFloat(t);return isNaN(e)?t:e}function u(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}function f(t,e){return _n.call(t,e)}function p(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function d(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function h(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function v(t,e){for(var n in e)t[n]=e[n];return t}function m(t){for(var e={},n=0;n0&&(G((c=i(c,(a||"")+"_"+s))[0])&&G(l)&&(f[u]=k(l.text+c[0].text),c.shift()),f.push.apply(f,c)):r(c)?G(l)?f[u]=k(l.text+c):""!==c&&f.push(k(c)):G(c)&&G(l)?f[u]=k(l.text+c.text):(n(o._isVList)&&e(c.tag)&&t(c.key)&&e(a)&&(c.key="__vlist"+a+"_"+s+"__"),f.push(c)));return f}(u):void 0:c===Fr&&(s=function(t){for(var e=0;e=0||n.indexOf(t[i])<0)&&r.push(t[i]);return r}return t}(n[o],r[o],i[o]));return e}(t);r&&v(t.extendOptions,r),(e=t.options=D(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function Et(t){this._init(t)}function It(t){return t&&(t.Ctor.options.name||t.tag)}function Lt(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,!("[object RegExp]"!==mn.call(n))&&t.test(e));var n}function Ft(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=It(a.componentOptions);s&&!e(s)&&Dt(n,o,r,i)}}}function Dt(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,l(n,e)}function Nt(t,n){return{staticClass:Pt(t.staticClass,n.staticClass),class:e(t.class)?[t.class,n.class]:n.class}}function Pt(t,e){return t?e?t+" "+e:t:e||""}function Mt(t){return Array.isArray(t)?function(t){for(var n,r="",i=0,o=t.length;i=0&&" "===(m=t.charAt(v));v--);m&&_i.test(m)||(l=!0)}}else void 0===o?(h=i+1,o=t.slice(0,i).trim()):e();if(void 0===o?o=t.slice(0,i).trim():0!==h&&e(),a)for(i=0;i-1?{exp:t.slice(0,zr),key:'"'+t.slice(zr+1)+'"'}:{exp:t,key:null};for(Hr=t,zr=Wr=qr=0;!ce();)ue(Vr=se())?le(Vr):91===Vr&&function(t){var e=1;for(Wr=zr;!ce();)if(t=se(),ue(t))le(t);else if(91===t&&e++,93===t&&e--,0===e){qr=zr;break}}(Vr);return{exp:t.slice(0,Wr),key:t.slice(Wr+1,qr)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function se(){return Hr.charCodeAt(++zr)}function ce(){return zr>=Ur}function ue(t){return 34===t||39===t}function le(t){for(var e=t;!ce()&&(t=se())!==e;);}function fe(t,e,n,r,i){e=(o=e)._withTask||(o._withTask=function(){hr=!0;var t=o.apply(null,arguments);return hr=!1,t}),n&&(e=function(t,e,n){var r=Jr;return function i(){null!==t.apply(null,arguments)&&pe(e,i,n,r)}}(e,t,r)),Jr.addEventListener(t,e,Vn?{capture:r,passive:i}:r);var o}function pe(t,e,n,r){(r||Jr).removeEventListener(t,e._withTask||e,n)}function de(n,r){if(!t(n.data.on)||!t(r.data.on)){var i=r.data.on||{},o=n.data.on||{};Jr=r.elm,function(t){if(e(t[bi])){var n=Pn?"change":"input";t[n]=[].concat(t[bi],t[n]||[]),delete t[bi]}e(t[wi])&&(t.change=[].concat(t[wi],t.change||[]),delete t[wi])}(i),J(i,o,fe,pe,r.context),Jr=void 0}}function he(n,r){if(!t(n.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=n.data.domProps||{},u=r.data.domProps||{};e(u.__ob__)&&(u=r.data.domProps=v({},u));for(i in s)t(u[i])&&(a[i]="");for(i in u){if(o=u[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i){a._value=o;var l=t(o)?"":String(o);p=l,!(f=a).composing&&("OPTION"===f.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(f,p)||function(t,n){var r=t.value,i=t._vModifiers;if(e(i)){if(i.lazy)return!1;if(i.number)return c(r)!==c(n);if(i.trim)return r.trim()!==n.trim()}return r!==n}(f,p))&&(a.value=l)}else a[i]=o}}var f,p}function ve(t){var e=me(t.style);return t.staticStyle?v(t.staticStyle,e):e}function me(t){return Array.isArray(t)?m(t):"string"==typeof t?ki(t):t}function ge(n,r){var i=r.data,o=n.data;if(!(t(i.staticStyle)&&t(i.style)&&t(o.staticStyle)&&t(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,p=me(r.data.style)||{};r.data.normalizedStyle=e(p.__ob__)?v({},p):p;var d=function(t,e){for(var n,r={},i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=ve(i.data))&&v(r,n);(n=ve(t.data))&&v(r,n);for(var o=t;o=o.parent;)o.data&&(n=ve(o.data))&&v(r,n);return r}(r);for(s in f)t(d[s])&&Si(c,s,"");for(s in d)(a=d[s])!==f[s]&&Si(c,s,null==a?"":a)}}function ye(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function _e(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function be(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&v(e,Ei(t.name||"v")),v(e,t),e}return"string"==typeof t?Ei(t):void 0}}function we(t){Ri(function(){Ri(t)})}function $e(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),ye(t,e))}function xe(t,e){t._transitionClasses&&l(t._transitionClasses,e),_e(t,e)}function ke(t,e,n){var r=Ce(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Li?Ni:Mi,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout(function(){c0&&(n=Li,l=a,f=o.length):e===Fi?u>0&&(n=Fi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Li:Fi:null)?n===Li?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Li&&Bi.test(r[Di+"Property"])}}function Ae(t,e){for(;t.length1}function Ie(t,e){!0!==e.data.show&&Te(e)}function Le(t,e,n){Fe(t,e,n),(Pn||Rn)&&setTimeout(function(){Fe(t,e,n)},0)}function Fe(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=t.options.length;s-1,a.selected!==o&&(a.selected=o);else if(y(Ne(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function De(t,e){return e.every(function(e){return!y(e,t)})}function Ne(t){return"_value"in t?t._value:t.value}function Pe(t){t.target.composing=!0}function Me(t){t.target.composing&&(t.target.composing=!1,Re(t.target,"input"))}function Re(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Be(t){return!t.componentInstance||t.data&&t.data.transition?t:Be(t.componentInstance._vnode)}function Ue(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Ue(Q(e.children)):t}function He(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[wn(o)]=i[o];return e}function Ve(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function ze(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function We(t){t.data.newPos=t.elm.getBoundingClientRect()}function qe(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function Je(t,e){var n=e?jo:Oo;return t.replace(n,function(t){return To[t]})}function Ke(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:function(t){for(var e={},n=0,r=t.length;n':'
',ko.innerHTML.indexOf(" ")>0}var vn=Object.freeze({}),mn=Object.prototype.toString,gn=u("slot,component",!0),yn=u("key,ref,slot,slot-scope,is"),_n=Object.prototype.hasOwnProperty,bn=/-(\w)/g,wn=p(function(t){return t.replace(bn,function(t,e){return e?e.toUpperCase():""})}),$n=p(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),xn=/\B([A-Z])/g,kn=p(function(t){return t.replace(xn,"-$1").toLowerCase()}),Cn=function(t,e,n){return!1},An=function(t){return t},Sn="data-server-rendered",Tn=["component","directive","filter"],On=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],jn={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Cn,isReservedAttr:Cn,isUnknownElement:Cn,getTagNamespace:g,parsePlatformTagName:An,mustUseProp:Cn,_lifecycleHooks:On},En=/[^\w.$]/,In="__proto__"in{},Ln="undefined"!=typeof window,Fn="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Dn=Fn&&WXEnvironment.platform.toLowerCase(),Nn=Ln&&window.navigator.userAgent.toLowerCase(),Pn=Nn&&/msie|trident/.test(Nn),Mn=Nn&&Nn.indexOf("msie 9.0")>0,Rn=Nn&&Nn.indexOf("edge/")>0,Bn=Nn&&Nn.indexOf("android")>0||"android"===Dn,Un=Nn&&/iphone|ipad|ipod|ios/.test(Nn)||"ios"===Dn,Hn=(Nn&&/chrome\/\d+/.test(Nn),{}.watch),Vn=!1;if(Ln)try{var zn={};Object.defineProperty(zn,"passive",{get:function(){Vn=!0}}),window.addEventListener("test-passive",null,zn)}catch(t){}var Wn,qn,Jn=function(){return void 0===Wn&&(Wn=!Ln&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),Wn},Kn=Ln&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Xn="undefined"!=typeof Symbol&&x(Symbol)&&"undefined"!=typeof Reflect&&x(Reflect.ownKeys);qn="undefined"!=typeof Set&&x(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var Gn=g,Zn=0,Yn=function(){this.id=Zn++,this.subs=[]};Yn.prototype.addSub=function(t){this.subs.push(t)},Yn.prototype.removeSub=function(t){l(this.subs,t)},Yn.prototype.depend=function(){Yn.target&&Yn.target.addDep(this)},Yn.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;eSr&&$r[n].id>t.id;)n--;$r.splice(n+1,0,t)}else $r.push(t);Cr||(Cr=!0,z(ut))}}(this)},Or.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||i(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){B(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},Or.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Or.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},Or.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||l(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var jr={enumerable:!0,configurable:!0,get:g,set:g},Er={lazy:!0};Ct(At.prototype);var Ir={init:function(t,n,r,i){if(!t.componentInstance||t.componentInstance._isDestroyed)(t.componentInstance=function(t,n,o,a){var s={_isComponent:!0,parent:wr,_parentVnode:t,_parentElm:r||null,_refElm:i||null},c=t.data.inlineTemplate;return e(c)&&(s.render=c.render,s.staticRenderFns=c.staticRenderFns),new t.componentOptions.Ctor(s)}(t)).$mount(n?t.elm:void 0,n);else if(t.data.keepAlive){var o=t;Ir.prepatch(o,o)}},prepatch:function(t,e){var n=e.componentOptions;!function(t,e,n,r,i){var o=!!(i||t.$options._renderChildren||r.data.scopedSlots||t.$scopedSlots!==vn);if(t.$options._parentVnode=r,t.$vnode=r,t._vnode&&(t._vnode.parent=r),t.$options._renderChildren=i,t.$attrs=r.data&&r.data.attrs||vn,t.$listeners=n||vn,e&&t.$options.props){ar.shouldConvert=!1;for(var a=t._props,s=t.$options._propKeys||[],c=0;c1?h(n):n;for(var r=h(arguments,1),i=0,o=n.length;iparseInt(this.max)&&Dt(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={};e.get=function(){return jn},Object.defineProperty(t,"config",e),t.util={warn:Gn,extend:v,mergeOptions:D,defineReactive:T},t.set=O,t.delete=j,t.nextTick=z,t.options=Object.create(null),Tn.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,v(t.options.components,Br),t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=h(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this},t.mixin=function(t){return this.options=D(this.options,t),this},function(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name,a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=D(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)lt(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)ft(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Tn.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=v({},a.options),i[r]=a,a}}(t),n=t,Tn.forEach(function(t){n[t]=function(e,n){return n?("component"===t&&o(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}});var n}(Et),Object.defineProperty(Et.prototype,"$isServer",{get:Jn}),Object.defineProperty(Et.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Et.version="2.5.13";var Ur,Hr,Vr,zr,Wr,qr,Jr,Kr,Xr=u("style,class"),Gr=u("input,textarea,option,select,progress"),Zr=function(t,e,n){return"value"===n&&Gr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Yr=u("contenteditable,draggable,spellcheck"),Qr=u("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),ti="http://www.w3.org/1999/xlink",ei=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},ni=function(t){return ei(t)?t.slice(6,t.length):""},ri=function(t){return null==t||!1===t},ii={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},oi=u("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),ai=u("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),si=function(t){return oi(t)||ai(t)},ci=Object.create(null),ui=u("text,number,password,search,email,tel,url"),li=Object.freeze({createElement:function(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(t,e){return document.createElementNS(ii[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setAttribute:function(t,e,n){t.setAttribute(e,n)}}),fi={create:function(t,e){Ut(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Ut(t,!0),Ut(e))},destroy:function(t){Ut(t,!0)}},pi=new tr("",{},[]),di=["create","activate","update","remove","destroy"],hi={create:zt,update:zt,destroy:function(t){zt(t,pi)}},vi=Object.create(null),mi=[fi,hi],gi={create:Jt,update:Jt},yi={create:Xt,update:Xt},_i=/[\w).+\-_$\]]/,bi="__r",wi="__c",$i={create:de,update:de},xi={create:he,update:he},ki=p(function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach(function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}),Ci=/^--/,Ai=/\s*!important$/,Si=function(t,e,n){if(Ci.test(e))t.style.setProperty(e,n);else if(Ai.test(n))t.style.setProperty(e,n.replace(Ai,""),"important");else{var r=Oi(e);if(Array.isArray(n))for(var i=0,o=n.length;id?h(n,t(i[_+1])?null:i[_+1].elm,i,p,_,o):p>_&&m(0,r,f,d)}(c,p,d,o,s):e(d)?(e(r.text)&&C.setTextContent(c,""),h(c,null,d,0,d.length-1,o)):e(p)?m(0,p,0,p.length-1):e(r.text)&&C.setTextContent(c,""):r.text!==i.text&&C.setTextContent(c,i.text),e(l)&&e(u=l.hook)&&e(u=u.postpatch)&&u(r,i)}}}function _(t,r,i){if(n(i)&&e(t.parent))t.parent.data.pendingInsert=r;else for(var o=0;o-1?ci[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ci[t]=/HTMLUnknownElement/.test(e.toString())},v(Et.options.directives,Vi),v(Et.options.components,Ji),Et.prototype.__patch__=Ln?Ui:g,Et.prototype.$mount=function(t,e){return function(t,e,n){t.$el=e,t.$options.render||(t.$options.render=nr),ct(t,"beforeMount");return new Or(t,function(){t._update(t._render(),n)},g,null,!0),n=!1,null==t.$vnode&&(t._isMounted=!0,ct(t,"mounted")),t}(this,t=t&&Ln?Bt(t):void 0,e)},Et.nextTick(function(){jn.devtools&&Kn&&Kn.emit("init",Et)},0);var Ki,Xi=/\{\{((?:.|\n)+?)\}\}/g,Gi=/[-.*+?^${}()|[\]\/\\]/g,Zi=p(function(t){var e=t[0].replace(Gi,"\\$&"),n=t[1].replace(Gi,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}),Yi={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=ie(t,"class");n&&(t.staticClass=JSON.stringify(n));var r=re(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}},Qi={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=ie(t,"style");n&&(t.staticStyle=JSON.stringify(ki(n)));var r=re(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},to=u("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),eo=u("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),no=u("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),ro=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,io="[a-zA-Z_][\\w\\-\\.]*",oo="((?:"+io+"\\:)?"+io+")",ao=new RegExp("^<"+oo),so=/^\s*(\/?)>/,co=new RegExp("^<\\/"+oo+"[^>]*>"),uo=/^]+>/i,lo=/^/g,"$1").replace(//g,"$1")),Io(p,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});l+=t.length-h.length,t=h,r(p,l-f,l)}else{var v=t.indexOf("<");if(0===v){if(lo.test(t)){var m=t.indexOf("--\x3e");if(m>=0){e.shouldKeepComment&&e.comment(t.substring(4,m)),n(m+3);continue}}if(fo.test(t)){var g=t.indexOf("]>");if(g>=0){n(g+2);continue}}var y=t.match(uo);if(y){n(y[0].length);continue}var _=t.match(co);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var w=function(){var e=t.match(ao);if(e){var r={tagName:e[1],attrs:[],start:l};n(e[0].length);for(var i,o;!(i=t.match(so))&&(o=t.match(ro));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if(w){!function(t){var n=t.tagName,i=t.unarySlash;s&&("p"===o&&no(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||!!i,f=t.attrs.length,p=new Array(f),d=0;d=0){for(x=t.slice(v);!(co.test(x)||ao.test(x)||lo.test(x)||fo.test(x)||(k=x.indexOf("<",1))<0);)v+=k,x=t.slice(v);$=t.substring(0,v),n(v)}v<0&&($=t,t=""),e.chars&&$&&e.chars($)}if(t===i){e.chars&&e.chars(t);break}}r()}(t,{warn:ho,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,start:function(t,a,u){var l=i&&i.ns||wo(t);Pn&&"svg"===l&&(a=function(t){for(var e=[],n=0;nc&&(s.push(o=t.slice(c,i)),a.push(JSON.stringify(o)));var u=Gt(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c1?1:0:1:t?Math.min(t,2):0;var n}(e,n.length)]?n[e].trim():t}function a(t){return JSON.parse(JSON.stringify(t))}function s(t){for(var n=arguments,r=Object(t),i=1;i=97&&e<=122||e>=65&&e<=90?"ident":e>=49&&e<=57?"number":"else"}function d(t){var e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(n=e,N.test(n)?function(t){var e=t.charCodeAt(0);return e!==t.charCodeAt(t.length-1)||34!==e&&39!==e?t:t.slice(1,-1)}(e):"*"+e);var n}var h,v=Object.prototype.toString,m="[object Object]",g=Object.prototype.hasOwnProperty,y="undefined"!=typeof Intl&&void 0!==Intl.DateTimeFormat,_="undefined"!=typeof Intl&&void 0!==Intl.NumberFormat,b={beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n){if(t.i18n instanceof M){if(t.__i18n)try{var e={};t.__i18n.forEach(function(t){e=s(e,JSON.parse(t))}),Object.keys(e).forEach(function(n){t.i18n.mergeLocaleMessage(n,e[n])})}catch(t){}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData(),this._i18n.subscribeDataChanging(this),this._subscribing=!0}else if(n(t.i18n)){if(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof M&&(t.i18n.root=this.$root.$i18n,t.i18n.fallbackLocale=this.$root.$i18n.fallbackLocale,t.i18n.silentTranslationWarn=this.$root.$i18n.silentTranslationWarn),t.__i18n)try{var r={};t.__i18n.forEach(function(t){r=s(r,JSON.parse(t))}),t.i18n.messages=r}catch(t){}this._i18n=new M(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),this._i18n.subscribeDataChanging(this),this._subscribing=!0,(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale())}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof M?(this._i18n=this.$root.$i18n,this._i18n.subscribeDataChanging(this),this._subscribing=!0):t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof M&&(this._i18n=t.parent.$i18n,this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy:function(){this._i18n&&(this._subscribing&&(this._i18n.unsubscribeDataChanging(this),delete this._subscribing),this._i18nWatcher&&(this._i18nWatcher(),delete this._i18nWatcher),this._localeWatcher&&(this._localeWatcher(),delete this._localeWatcher),this._i18n=null)}},w={name:"i18n",functional:!0,props:{tag:{type:String,default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(e,n){var r=n.props,i=n.data,o=n.children,a=n.parent.$i18n;if(o=(o||[]).filter(function(t){return t.tag||(t.text=t.text.trim())}),!a)return o;var s=r.path,c=r.locale,u={},l=r.places||{},f=Array.isArray(l)?l.length>0:Object.keys(l).length>0,p=o.every(function(t){if(t.data&&t.data.attrs){var e=t.data.attrs.place;return void 0!==e&&""!==e}});return f&&o.length>0&&!p&&t("If places prop is set, all child elements must have place prop set."),Array.isArray(l)?l.forEach(function(t,e){u[e]=t}):Object.keys(l).forEach(function(t){u[t]=l[t]}),o.forEach(function(t,e){var n=p?""+t.data.attrs.place:""+e;u[n]=t}),e(r.tag,i,a.i(s,c,u))}},$=function(){this._caches=Object.create(null)};$.prototype.interpolate=function(t,n){var r=this._caches[t];return r||(r=function(t){for(var e=[],n=0,r="";n0)f--,l=j,h[C]();else{if(f=0,!1===(n=d(n)))return!1;h[A]()}};null!==l;)if(u++,"\\"!==(e=t[u])||!function(){var e=t[u+1];if(l===E&&"'"===e||l===I&&'"'===e)return u++,r="\\"+e,h[C](),!0}()){if(i=p(e),(o=(s=D[l])[i]||s.else||F)===F)return;if(l=o[0],(a=h[o[1]])&&(r=o[2],r=void 0===r?e:r,!1===a()))return;if(l===L)return c}}(t))&&(this._cache[t]=e),e||[]},P.prototype.getPathValue=function(t,n){if(!e(t))return null;var r=this.parsePath(n);if(i=r,Array.isArray(i)&&0===i.length)return null;for(var i,o=r.length,a=t,s=0;s-1)t.splice(n,1)}}(this._dataListeners,t)},M.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){for(var e=t._dataListeners.length;e--;)h.nextTick(function(){t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})},M.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.vm.$watch("locale",function(e){t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})},R.vm.get=function(){return this._vm},R.messages.get=function(){return a(this._getMessages())},R.dateTimeFormats.get=function(){return a(this._getDateTimeFormats())},R.numberFormats.get=function(){return a(this._getNumberFormats())},R.locale.get=function(){return this._vm.locale},R.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},R.fallbackLocale.get=function(){return this._vm.fallbackLocale},R.fallbackLocale.set=function(t){this._vm.$set(this._vm,"fallbackLocale",t)},R.missing.get=function(){return this._missing},R.missing.set=function(t){this._missing=t},R.formatter.get=function(){return this._formatter},R.formatter.set=function(t){this._formatter=t},R.silentTranslationWarn.get=function(){return this._silentTranslationWarn},R.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},M.prototype._getMessages=function(){return this._vm.messages},M.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},M.prototype._getNumberFormats=function(){return this._vm.numberFormats},M.prototype._warnDefault=function(t,e,n,i){return r(n)?(this.missing&&this.missing.apply(null,[t,e,i]),e):n},M.prototype._isFallbackRoot=function(t){return!t&&!r(this._root)&&this._fallbackRoot},M.prototype._interpolate=function(t,e,i,o,a,s){if(!e)return null;var c=this._path.getPathValue(e,i);if(Array.isArray(c))return c;var u;if(r(c)){if(!n(e))return null;if("string"!=typeof(u=e[i]))return null}else{if("string"!=typeof c)return null;u=c}return u.indexOf("@:")>=0&&(u=this._link(t,e,u,o,a,s)),s?this._render(u,a,s):u},M.prototype._link=function(t,e,n,r,i,o){var a=n,s=a.match(/(@:[\w\-_|.]+)/g);for(var c in s)if(s.hasOwnProperty(c)){var u=s[c],l=u.substr(2),f=this._interpolate(t,e,l,r,"raw"===i?"string":i,"raw"===i?void 0:o);if(this._isFallbackRoot(f)){if(!this._root)throw Error("unexpected error");var p=this._root;f=p._translate(p._getMessages(),p.locale,p.fallbackLocale,l,r,i,o)}a=(f=this._warnDefault(t,l,f,r))?a.replace(u,f):a}return a},M.prototype._render=function(t,e,n){var r=this._formatter.interpolate(t,n);return"string"===e?r.join(""):r},M.prototype._translate=function(t,e,n,i,o,a,s){var c=this._interpolate(e,t[e],i,o,a,s);return r(c)?r(c=this._interpolate(n,t[n],i,o,a,s))?null:c:c},M.prototype._t=function(t,e,n,r){for(var o=[],a=arguments.length-4;a-- >0;)o[a]=arguments[a+4];if(!t)return"";var s=i.apply(void 0,o),c=s.locale||e,u=this._translate(n,c,this.fallbackLocale,t,r,"string",s.params);if(this._isFallbackRoot(u)){if(!this._root)throw Error("unexpected error");return(l=this._root).t.apply(l,[t].concat(o))}return this._warnDefault(c,t,u,r);var l},M.prototype.t=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return(r=this)._t.apply(r,[t,this.locale,this._getMessages(),null].concat(e));var r},M.prototype._i=function(t,e,n,r,i){var o=this._translate(n,e,this.fallbackLocale,t,r,"raw",i);if(this._isFallbackRoot(o)){if(!this._root)throw Error("unexpected error");return this._root.i(t,e,i)}return this._warnDefault(e,t,o,r)},M.prototype.i=function(t,e,n){return t?("string"!=typeof e&&(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},M.prototype._tc=function(t,e,n,r,i){for(var a=[],s=arguments.length-5;s-- >0;)a[s]=arguments[s+5];return t?(void 0===i&&(i=1),o((c=this)._t.apply(c,[t,e,n,r].concat(a)),i)):"";var c},M.prototype.tc=function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return(i=this)._tc.apply(i,[t,this.locale,this._getMessages(),null,e].concat(n));var i},M.prototype._te=function(t,e,n){for(var r=[],o=arguments.length-3;o-- >0;)r[o]=arguments[o+3];var a=i.apply(void 0,r).locale||e;return this._exist(n[a],t)},M.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},M.prototype.getLocaleMessage=function(t){return a(this._vm.messages[t]||{})},M.prototype.setLocaleMessage=function(t,e){this._vm.messages[t]=e},M.prototype.mergeLocaleMessage=function(t,e){this._vm.messages[t]=h.util.extend(this._vm.messages[t]||{},e)},M.prototype.getDateTimeFormat=function(t){return a(this._vm.dateTimeFormats[t]||{})},M.prototype.setDateTimeFormat=function(t,e){this._vm.dateTimeFormats[t]=e},M.prototype.mergeDateTimeFormat=function(t,e){this._vm.dateTimeFormats[t]=h.util.extend(this._vm.dateTimeFormats[t]||{},e)},M.prototype._localizeDateTime=function(t,e,n,i,o){var a=e,s=i[a];if((r(s)||r(s[o]))&&(a=n,s=i[a]),r(s)||r(s[o]))return null;var c=s[o],u=a+"__"+o,l=this._dateTimeFormatters[u];return l||(l=this._dateTimeFormatters[u]=new Intl.DateTimeFormat(a,c)),l.format(t)},M.prototype._d=function(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);var r=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.d(t,n,e)}return r||""},M.prototype.d=function(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var i=this.locale,o=null;return 1===n.length?"string"==typeof n[0]?o=n[0]:e(n[0])&&(n[0].locale&&(i=n[0].locale),n[0].key&&(o=n[0].key)):2===n.length&&("string"==typeof n[0]&&(o=n[0]),"string"==typeof n[1]&&(i=n[1])),this._d(t,i,o)},M.prototype.getNumberFormat=function(t){return a(this._vm.numberFormats[t]||{})},M.prototype.setNumberFormat=function(t,e){this._vm.numberFormats[t]=e},M.prototype.mergeNumberFormat=function(t,e){this._vm.numberFormats[t]=h.util.extend(this._vm.numberFormats[t]||{},e)},M.prototype._localizeNumber=function(t,e,n,i,o){var a=e,s=i[a];if((r(s)||r(s[o]))&&(a=n,s=i[a]),r(s)||r(s[o]))return null;var c=s[o],u=a+"__"+o,l=this._numberFormatters[u];return l||(l=this._numberFormatters[u]=new Intl.NumberFormat(a,c)),l.format(t)},M.prototype._n=function(t,e,n){if(!n)return new Intl.NumberFormat(e).format(t);var r=this._localizeNumber(t,e,this.fallbackLocale,this._getNumberFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.n(t,n,e)}return r||""},M.prototype.n=function(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var i=this.locale,o=null;return 1===n.length?"string"==typeof n[0]?o=n[0]:e(n[0])&&(n[0].locale&&(i=n[0].locale),n[0].key&&(o=n[0].key)):2===n.length&&("string"==typeof n[0]&&(o=n[0]),"string"==typeof n[1]&&(i=n[1])),this._n(t,i,o)},Object.defineProperties(M.prototype,R),M.availabilities={dateTimeFormat:y,numberFormat:_},M.install=function t(e){(h=e).version&&Number(h.version.split(".")[0]),t.installed=!0,Object.defineProperty(h.prototype,"$i18n",{get:function(){return this._i18n}}),n=h,Object.defineProperty(n.prototype,"$t",{get:function(){var t=this;return function(e){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];var i=t.$i18n;return i._t.apply(i,[e,i.locale,i._getMessages(),t].concat(n))}}}),Object.defineProperty(n.prototype,"$tc",{get:function(){var t=this;return function(e,n){for(var r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];var o=t.$i18n;return o._tc.apply(o,[e,o.locale,o._getMessages(),t,n].concat(r))}}}),Object.defineProperty(n.prototype,"$te",{get:function(){var t=this;return function(e,n){var r=t.$i18n;return r._te(e,r.locale,r._getMessages(),n)}}}),Object.defineProperty(n.prototype,"$d",{get:function(){var t=this;return function(e){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(i=t.$i18n).d.apply(i,[e].concat(n));var i}}}),Object.defineProperty(n.prototype,"$n",{get:function(){var t=this;return function(e){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(i=t.$i18n).n.apply(i,[e].concat(n));var i}}}),h.mixin(b),h.directive("t",{bind:c,update:u}),h.component(w.name,w);var n,r=h.config.optionMergeStrategies;r.i18n=r.methods},M.version="7.3.3","undefined"!=typeof window&&window.Vue&&window.Vue.use(M),M});var messages={en:{title:"Stairs",systemID:"System ID",firmwareVersion:"Firmware version: ",copyright:"Copyright © 2017 Mark van Renswoude",loading:"Please wait, loading configuration...",applyButton:"Apply",applyButtonSaving:"Saving...",wifiStatus:{accesspoint:{title:"AP: ",disabled:"Disabled"},stationmode:{title:"WiFi: ",disabled:"Disabled",idle:"Idle",noSSID:"SSID not found",scanCompleted:"Scan completed",connectFailed:"Failed to connect",connectionLost:"Connection lost",disconnected:"Disconnected"}},status:{tabTitle:"Status",title:"Current status"},triggers:{tabTitle:"Triggers",timeTitle:"Time",motionTitle:"Motion"},connection:{tabTitle:"Connection",title:"Connection parameters",accesspoint:"Enable access point",accesspointHint:"Allows for a direct connection from your device to this Stairs module for configuration purposes. The Stairs configuration is available on http://192.168.1.4/ when you are connected to it. Turn it off as soon as station mode is configured, as it is not secured in any way. You can always turn this option back on by pushing the access point button until the LED lights up.",stationmode:"Enable station mode",stationmodeHint:"Connect this Stairs module to your own WiFi router. Please enter the SSID, password and further configuration below.",ssid:"SSID",password:"Password",dhcp:"Use DHCP",dhcpHint:"Automatically assigns an IP address to this Stairs module. You probably want to keep this on unless you know what you're doing.",ipaddress:"IP address",subnetmask:"Subnet mask",gateway:"Gateway",hostname:"Hostname",hostnamePlaceholder:"Default: mac address"},firmware:{tabTitle:"Firmware",title:"Firmware update"}},nl:{title:"Trap",systemID:"Systeem ID",firmwareVersion:"Firmware versie: ",copyright:"Copyright © 2017 Mark van Renswoude",loading:"Een ogenblik geduld, bezig met laden van configuratie...",applyButton:"Toepassen",applyButtonSaving:"Bezig met opslaan...",wifiStatus:{accesspoint:{title:"AP: ",disabled:"Uitgeschakeld"},stationmode:{title:"WiFi: ",disabled:"Uitgeschakeld",idle:"Slaapstand",noSSID:"SSID niet gevonden",scanCompleted:"Scan afgerond",connectFailed:"Kan geen verbinding maken",connectionLost:"Verbinding verloren",disconnected:"Niet verbonden"}},status:{tabTitle:"Status",title:"Huidige status"},triggers:{tabTitle:"Triggers",timeTitle:"Tijd",motionTitle:"Beweging"},connection:{tabTitle:"Verbinding",title:"Verbinding configuratie",accesspoint:"Access point inschakelen",accesspointhint:"Maakt het mogelijk om een directe connectie vanaf een apparaat naar deze Trap module te maken om de module te configureren. De Trap module is te benaderen via http://192.168.1.4/ nadat je connectie hebt gemaakt. Schakel deze optie uit na het configureren, aangezien deze niet beveiligd is. Je kunt deze optie ook inschakelen door op de Access point knop te drukken totdat de LED aan gaat.",stationmode:"Verbinding met WiFi maken",stationmodehint:"Verbind deze Trap module aan je eigen WiFi router. Vul hieronder het SSID en wachtwoord in, en configureer eventuel de overige opties.",ssid:"SSID",password:"Wachtwoord",dhcp:"Gebruik DHCP",dhcphint:"Automatisch een IP adres toewijzen aan deze Trap module. Waarschijnlijk wil je deze optie aan laten, tenzij je weet waar je mee bezig bent.",ipaddress:"IP adres",subnetmask:"Subnet masker",gateway:"Gateway",hostname:"Hostnaam",hostnamePlaceholder:"Standaard: mac adres"},firmware:{tabTitle:"Firmware",title:"Firmware bijwerken"}}};function startApp(){var t=new VueI18n({locale:navigator.language,fallbackLocale:"en",messages:messages});new Vue({el:"#app",i18n:t,data:{loading:!0,saving:!1,loadingIndicator:"|",uploadProgress:!1,activeTab:"status",version:{systemID:"loading...",version:"loading..."},wifiStatus:{ap:{enabled:!1,ip:"0.0.0.0"},station:{enabled:!1,status:0,ip:"0.0.0.0"}},connection:{hostname:null,accesspoint:!0,station:!1,ssid:null,password:null,dhcp:!0,ip:null,subnetmask:null,gateway:null},steps:[{value:50},{value:0},{value:0},{value:0},{value:0},{value:70},{value:0},{value:0},{value:0},{value:0},{value:25},{value:0},{value:0},{value:0}]},created:function(){var e=this;document.title=t.t("title"),e.startLoadingIndicator(),e.updateWiFiStatus(),axios.get("/api/version").then(function(t){"object"==typeof t.data&&(e.version=t.data)}).catch(function(t){console.log(t)}),axios.all([axios.get("/api/connection").then(function(t){"object"==typeof t.data&&(e.connection=t.data)}).catch(function(t){console.log(t)})]).then(axios.spread(function(t,n){e.stopLoadingIndicator(),e.loading=!1}))},methods:{applyConnection:function(){var t=this;t.saving||(t.saving=!0,axios.post("/api/connection",{hostname:t.connection.hostname,accesspoint:t.connection.accesspoint,station:t.connection.station,ssid:t.connection.ssid,password:t.connection.password,dhcp:t.connection.dhcp,ip:t.connection.ip,subnetmask:t.connection.subnetmask,gateway:t.connection.gateway}).then(function(t){}).catch(function(t){console.log(t)}).then(function(){t.saving=!1}))},startLoadingIndicator:function(){var t=this;t.loadingStage=0,t.loadingTimer=setInterval(function(){switch(t.loadingStage++,t.loadingStage){case 1:t.loadingIndicator="/";break;case 2:t.loadingIndicator="-";break;case 3:t.loadingIndicator="\\";break;case 4:t.loadingIndicator="|",t.loadingStage=0}},250)},stopLoadingIndicator:function(){clearInterval(this.loadingTimer)},getWiFiStationStatus:function(){if(!this.wifiStatus.station.enabled)return"disconnected";switch(this.wifiStatus.station.status){case 0:case 2:return"connecting";case 1:case 4:case 5:return"error";case 3:return"connected";case 6:default:return"disconnected"}},getWiFiStationStatusText:function(){if(!this.wifiStatus.station.enabled)return t.t("wifiStatus.stationmode.disabled");switch(this.wifiStatus.station.status){case 0:return t.t("wifiStatus.stationmode.idle");case 1:return t.t("wifiStatus.stationmode.noSSID");case 2:return t.t("wifiStatus.stationmode.scanCompleted");case 3:return this.wifiStatus.station.ip;case 4:return t.t("wifiStatus.stationmode.connectFailed");case 5:return t.t("wifiStatus.stationmode.connectionLost");case 6:default:return t.t("wifiStatus.stationmode.disconnected")}},updateWiFiStatus:function(){var t=this;t.saving?setTimeout(t.updateWiFiStatus,5e3):axios.get("/api/connection/status").then(function(e){"object"==typeof e.data&&(t.wifiStatus=e.data)}).catch(function(t){console.log(t)}).then(function(){setTimeout(t.updateWiFiStatus,5e3)})},uploadFirmware:function(){var t=this;if(!t.saving){t.saving=!0,t.uploadProgress=0;var e=new FormData;e.append("file",document.getElementById("firmwareFile").files[0]);var n={timeout:36e4,onUploadProgress:function(e){t.uploadProgress=Math.round(100*e.loaded/e.total)}};axios.post("/api/firmware",e,n).then(function(t){console.log("Update sent")}).catch(function(t){console.log(t)}).then(function(){t.uploadProgress=!1,t.saving=!1,document.getElementById("firmware").reset()})}}}})} \ No newline at end of file