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

3 lines
32 KiB

(()=>{var e={669:(e,t,n)=>{e.exports=n(609)},448:(e,t,n)=>{"use strict";var r=n(867),o=n(26),s=n(372),i=n(327),a=n(97),u=n(109),c=n(985),l=n(61);e.exports=function(e){return new Promise((function(t,n){var p=e.data,f=e.headers;r.isFormData(p)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(d+":"+m)}var g=a(e.baseURL,e.url);if(h.open(e.method.toUpperCase(),i(g,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,s={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,n,s),h=null}},h.onabort=function(){h&&(n(l("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var b=(e.withCredentials||c(g))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;b&&(f[e.xsrfHeaderName]=b)}if("setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),p||(p=null),h.send(p)}))}},609:(e,t,n)=>{"use strict";var r=n(867),o=n(849),s=n(321),i=n(185);function a(e){var t=new s(e),n=o(s.prototype.request,t);return r.extend(n,s.prototype,t),r.extend(n,t),n}var u=a(n(655));u.Axios=s,u.create=function(e){return a(i(u.defaults,e))},u.Cancel=n(263),u.CancelToken=n(972),u.isCancel=n(502),u.all=function(e){return Promise.all(e)},u.spread=n(713),u.isAxiosError=n(268),e.exports=u,e.exports.default=u},263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:(e,t,n)=>{"use strict";var r=n(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(867),o=n(327),s=n(782),i=n(572),a=n(185);function u(e){this.defaults=e,this.interceptors={request:new s,response:new s}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[i,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},u.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=u},782:(e,t,n)=>{"use strict";var r=n(867);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:(e,t,n)=>{"use strict";var r=n(793),o=n(303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},61:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,s){var i=new Error(e);return r(i,t,n,o,s)}},572:(e,t,n)=>{"use strict";var r=n(867),o=n(527),s=n(502),i=n(655);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return a(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return s(t)||(a(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},185:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],s=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=u(void 0,e[o])):n[o]=u(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=u(void 0,t[e]))})),r.forEach(s,c),r.forEach(i,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=u(void 0,e[o])):n[o]=u(void 0,t[o])})),r.forEach(a,(function(r){r in t?n[r]=u(e[r],t[r]):r in e&&(n[r]=u(void 0,e[r]))}));var l=o.concat(s).concat(i).concat(a),p=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(p,c),n}},26:(e,t,n)=>{"use strict";var r=n(61);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},527:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},655:(e,t,n)=>{"use strict";var r=n(155),o=n(867),s=n(16),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(u=n(448)),u),transformRequest:[function(e,t){return s(t,"Accept"),s(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){c.headers[e]=o.merge(i)})),e.exports=c},849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},327:(e,t,n)=>{"use strict";var r=n(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(r.isURLSearchParams(t))s=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),s=i.join("&")}if(s){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:(e,t,n)=>{"use strict";var r=n(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16:(e,t,n)=>{"use strict";var r=n(867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},109:(e,t,n)=>{"use strict";var r=n(867),o=["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"];e.exports=function(e){var t,n,s,i={};return e?(r.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},867:(e,t,n)=>{"use strict";var r=n(849),o=Object.prototype.toString;function s(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:i,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):s(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},155:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var a,u=[],c=!1,l=-1;function p(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&f())}function f(){if(!c){var e=i(p);c=!0;for(var t=u.length;t;){for(a=u,u=[];++l<t;)a&&a[l].run();l=-1,t=u.length}a=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function d(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||i(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e){return e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))}function t(e,n){e.firstChild&&(n.appendChild(e.firstChild),t(e,n))}function r(e){Array.from(e).forEach(o)}const o=e=>e&&e.parentNode&&e.parentNode.removeChild(e),s=(e,t)=>t&&t.parentNode&&t.parentNode.insertBefore(e,t),i=new Map,a=Symbol("riot-component"),u=new Set,c="is",l="mount",p="update",f="unmount",h="shouldUpdate",d="onBeforeMount",m="onMounted",g="onBeforeUpdate",b="onUpdated",v="onBeforeUnmount",y="onUnmounted",O="props",E="state",x="slots",w="root",T=Symbol.for("pure"),N=Symbol("parent"),j=Symbol("attributes"),A=Symbol("template");var S=Object.freeze({__proto__:null,COMPONENTS_IMPLEMENTATION_MAP:i,DOM_COMPONENT_INSTANCE_PROPERTY:a,PLUGINS_SET:u,IS_DIRECTIVE:c,VALUE_ATTRIBUTE:"value",MOUNT_METHOD_KEY:l,UPDATE_METHOD_KEY:p,UNMOUNT_METHOD_KEY:f,SHOULD_UPDATE_KEY:h,ON_BEFORE_MOUNT_KEY:d,ON_MOUNTED_KEY:m,ON_BEFORE_UPDATE_KEY:g,ON_UPDATED_KEY:b,ON_BEFORE_UNMOUNT_KEY:v,ON_UNMOUNTED_KEY:y,PROPS_KEY:O,STATE_KEY:E,SLOTS_KEY:x,ROOT_KEY:w,IS_PURE_SYMBOL:T,PARENT_KEY_SYMBOL:N,ATTRIBUTES_KEY_SYMBOL:j,TEMPLATE_KEY_SYMBOL:A});var C={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};var M={ATTRIBUTE:0,EVENT:1,TEXT:2,VALUE:3};const _=Symbol("head"),U=Symbol("tail");function P(e){const t=e.dom.cloneNode(!0),{head:n,tail:r}=function(){const e=document.createComment("fragment head"),t=document.createComment("fragment tail");return e[_]=!0,t[U]=!0,{head:e,tail:t}}();return{avoidDOMInjection:!0,fragment:t,head:n,tail:r,children:[n,...Array.from(t.childNodes),r]}}function R(e){let{head:t,tail:n}=e;const r=L([t],t.nextSibling,(e=>e===n),!1);return r.push(n),r}function L(e,t,n,r){const{nextSibling:o}=t;return r||t[_]||t[U]||e.push(t),!o||n(t)?e:L(e,o,n,r&&!t[U]||o[_])}function B(e,t){return typeof e===t}function D(e){const t=e.ownerSVGElement;return!!t||null===t}function k(e){return!q(e.content)}function I(e){return B(e,"function")}function Y(e){return!q(e)&&B(e,"object")}function q(e){return null==e}const K=Symbol("unmount"),F={nodes:[],mount(e,t){return this.update(e,t)},update(e,t){const{placeholder:n,nodes:r,childrenMap:i}=this,a=e===K?null:this.evaluate(e),u=a?Array.from(a):[],{newChildrenMap:c,batches:l,futureNodes:p}=function(e,t,n,r){const{condition:o,template:s,childrenMap:i,itemName:a,getKey:u,indexName:c,root:l,isTemplateTag:p}=r,f=new Map,h=[],d=[];return e.forEach(((e,r)=>{const m=function(e,t){let{itemName:n,indexName:r,index:o,item:s}=t;e[n]=s,r&&(e[r]=o);return e}(Object.create(t),{itemName:a,indexName:c,index:r,item:e}),g=u?u(m):r,b=i.get(g),v=[];if(function(e,t){return!!e&&!1===Boolean(e(t))}(o,m))return;const y=!b,O=b?b.template:s.clone(),E=O.el||l.cloneNode(),x=p&&y?P(O):O.meta;y?h.push((()=>O.mount(E,m,n,x))):h.push((()=>O.update(m,n))),p?v.push(...y?x.children:R(x)):v.push(E),i.delete(g),d.push(...v),f.set(g,{nodes:v,template:O,context:m,index:r})})),{newChildrenMap:f,batches:h,futureNodes:d}}(u,e,t,this);return((e,t,n,r)=>{const i=t.length;let a=e.length,u=i,c=0,l=0,p=null;for(;c<a||l<u;)if(a===c){const e=u<i?l?n(t[l-1],-0).nextSibling:n(t[u-l],0):r;for(;l<u;)s(n(t[l++],1),e)}else if(u===l)for(;c<a;)p&&p.has(e[c])||o(n(e[c],-1)),c++;else if(e[c]===t[l])c++,l++;else if(e[a-1]===t[u-1])a--,u--;else if(e[c]===t[u-1]&&t[l]===e[a-1]){const r=n(e[--a],-1).nextSibling;s(n(t[l++],1),n(e[c++],-1).nextSibling),s(n(t[--u],1),r),e[a]=t[u]}else{if(!p){p=new Map;let e=l;for(;e<u;)p.set(t[e],e++)}if(p.has(e[c])){const r=p.get(e[c]);if(l<r&&r<u){let o=c,i=1;for(;++o<a&&o<u&&p.get(e[o])===r+i;)i++;if(i>r-l){const o=n(e[c],0);for(;l<r;)s(n(t[l++],1),o)}else f=n(t[l++],1),(h=n(e[c++],-1))&&h.parentNode&&h.parentNode.replaceChild(f,h)}else c++}else o(n(e[c++],-1))}var f,h})(r,p,function(e,t){return(n,r)=>{if(r<0){const n=e[e.length-1];if(n){const{template:r,nodes:o,context:s}=n;o.pop(),0===o.length&&(e.pop(),r.unmount(s,t,null))}}return n}}(Array.from(i.values()),t),n),l.forEach((e=>e())),this.childrenMap=c,this.nodes=p,function(e){const t=e[0],n=e[e.length-1];t&&(t[_]=!0);n&&(n[U]=!0)}(this.nodes),this},unmount(e,t){return this.update(K,t),this}};const H={mount(e,t){return this.update(e,t)},update(e,t){const n=!!this.evaluate(e),r=!this.value&&n,o=this.value&&!n,i=()=>{const n=this.node.cloneNode();s(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,e,t)};switch(!0){case r:i();break;case o:this.unmount(e);break;default:n&&this.template.update(e,t)}return this.value=n,this},unmount(e,t){return this.template.unmount(e,t,!0),this}};function z(e){throw new Error(e)}function $(t){return t.reduce(((t,n)=>{const{value:r,type:o}=n;switch(!0){case!n.name&&0===o:return Object.assign({},t,r);case 3===o:t.value=n.value;break;default:t[e(n.name)]=n.value}return t}),{})}const V="removeAttribute",X="setAttribute",G="undefined"==typeof Element?{}:Element.prototype,J=function(e){const t=new Map,n=n=>(t.has(n)||t.set(n,e.call(this,n)))&&t.get(n);return n.cache=t,n}((e=>G.hasOwnProperty(e)));function W(e,t,n,r){let{name:o}=t;if(!o)return r&&function(e,t,n){const r=t?Object.keys(t):[];Object.keys(n).filter((e=>!r.includes(e))).forEach((t=>e.removeAttribute(t)))}(e,n,r),void(n&&function(e,t){Object.entries(t).forEach((t=>{let[n,r]=t;return W(e,{name:n},r)}))}(e,n));!J(o)&&(function(e){return B(e,"boolean")}(n)||Y(n)||I(n))&&(e[o]=n),e[function(e){return q(e)||!1===e||""===e||Y(e)||I(e)?V:X}(n)](o,function(e,t){return!0===t?e:t}(o,n))}const Z=/^on/,Q={handleEvent(e){this[e.type](e)}},ee=new WeakMap;function te(e){return q(e)?"":e}const ne=(e,t)=>{const n=e.childNodes[t];if(n.nodeType===Node.COMMENT_NODE){const t=document.createTextNode("");return e.replaceChild(t,n),t}return n};var re={0:W,1:function(e,t,n){let{name:r}=t;const o=r.replace(Z,""),s=ee.get(e)||(e=>{const t=Object.create(Q);return ee.set(e,t),t})(e),[i,a]=(e=>Array.isArray(e)?e:[e,!1])(n),u=s[o],c=i&&!u;u&&!i&&e.removeEventListener(o,s),c&&e.addEventListener(o,s,a),s[o]=i},2:function(e,t,n){e.data=te(n)},3:function(e,t,n){e.value=te(n)}};const oe={mount(e){return this.value=this.evaluate(e),se(this,this.value),this},update(e){const t=this.evaluate(e);return this.value!==t&&(se(this,t),this.value=t),this},unmount(){return 1===this.type&&se(this,null),this}};function se(e,t){return re[e.type](e.node,e,t,e.value)}function ie(e,t){return Object.assign({},oe,t,{node:2===t.type?ne(e,t.childNodeIndex):e})}const ae=(e,t)=>e[N]||t,ue={attributes:[],getTemplateScope(e,t){return function(e,t,n){if(!e||!e.length)return n;const r=e.map((e=>Object.assign({},e,{value:e.evaluate(t)})));return Object.assign(Object.create(n||null),$(r))}(this.attributes,e,t)},mount(e,t){const n=!!e.slots&&e.slots.find((e=>{let{id:t}=e;return t===this.name})),{parentNode:r}=this.node,s=ae(e,t);return this.template=n&&ve(n.html,n.bindings).createDOM(r),this.template&&(this.template.mount(this.node,this.getTemplateScope(e,s),s),this.template.children=Array.from(this.node.childNodes),ce(this.node)),o(this.node),this},update(e,t){if(this.template){const n=ae(e,t);this.template.update(this.getTemplateScope(e,n),n)}return this},unmount(e,t,n){return this.template&&this.template.unmount(this.getTemplateScope(e,t),null,n),this}};function ce(e){const t=e&&e.firstChild;t&&(s(t,e),ce(e))}function le(e){return e.reduce(((e,t)=>{let{bindings:n}=t;return e.concat(n)}),[])}const pe={mount(e){return this.update(e)},update(e,t){const n=this.evaluate(e);return n===this.name?this.tag.update(e):(this.unmount(e,t,!0),this.name=n,this.tag=function(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=[]),e?e({slots:t,attributes:n}):ve(function(e){return e.reduce(((e,t)=>e+t.html),"")}(t),[...le(t),{expressions:n.map((e=>Object.assign({type:0},e)))}])}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,e)),this},unmount(e,t,n){return this.tag&&this.tag.unmount(n),this}};var fe={1:function(e,t){let{evaluate:n,template:r}=t;const i=document.createTextNode("");return s(i,e),o(e),Object.assign({},H,{node:e,evaluate:n,placeholder:i,template:r.createDOM(e)})},2:function(e,t){let{expressions:n}=t;return Object.assign({},(r=n.map((t=>ie(e,t))),["mount","update","unmount"].reduce(((e,t)=>Object.assign({},e,{[t]:e=>r.map((n=>n[t](e)))&&o})),{})));var r,o},0:function(e,t){let{evaluate:n,condition:r,itemName:i,indexName:a,getKey:u,template:c}=t;const l=document.createTextNode(""),p=e.cloneNode();return s(l,e),o(e),Object.assign({},F,{childrenMap:new Map,node:e,root:p,condition:r,evaluate:n,isTemplateTag:k(p),template:c.createDOM(e),getKey:u,indexName:a,itemName:i,placeholder:l})},3:function(e,t){let{evaluate:n,getComponent:r,slots:o,attributes:s}=t;return Object.assign({},pe,{node:e,evaluate:n,slots:o,attributes:s,getComponent:r})},4:function(e,t){let{name:n,attributes:r}=t;return Object.assign({},ue,{attributes:r,node:e,name:n})}};function he(e,t){return e.map((e=>2===e.type?Object.assign({},e,{childNodeIndex:e.childNodeIndex+t}):e))}function de(e,t,n){const{selector:r,type:o,redundantAttribute:s,expressions:i}=t,a=r?e.querySelector(r):e;s&&a.removeAttribute(s);const u=i||[];return(fe[o]||fe[2])(a,Object.assign({},t,{expressions:n&&!r?he(u,n):u}))}function me(e,t){return D(e)?function(e,t){return t.ownerDocument.importNode((new window.DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,"application/xml").documentElement,!0)}(t,e):function(e,t){const n=k(t)?t:document.createElement("template");return n.innerHTML=e,n.content}(t,e)}function ge(e,n){switch(!0){case D(e):t(n,e);break;case k(e):e.parentNode.replaceChild(n,e);break;default:e.appendChild(n)}}const be=Object.freeze({createDOM(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?me(e,t):t)}(e,this.html),this},mount(e,t,n,r){if(void 0===r&&(r={}),!e)throw new Error("Please provide DOM node to mount properly your template");this.el&&this.unmount(t);const{fragment:o,children:s,avoidDOMInjection:i}=r,{parentNode:a}=s?s[0]:e,u=k(e),c=u?Math.max(Array.from(a.childNodes).indexOf(e),0):null;return this.isTemplateTag=u,this.createDOM(e),this.dom&&(this.fragment=o||this.dom.cloneNode(!0)),this.el=this.isTemplateTag?a:e,this.children=this.isTemplateTag?s||Array.from(this.fragment.childNodes):null,!i&&this.fragment&&ge(e,this.fragment),this.bindings=this.bindingsData.map((e=>de(this.el,e,c))),this.bindings.forEach((e=>e.mount(t,n))),this.meta=r,this},update(e,t){return this.bindings.forEach((n=>n.update(e,t))),this},unmount(e,t,n){if(this.el){switch(this.bindings.forEach((r=>r.unmount(e,t,n))),!0){case this.el[T]:break;case this.children&&null!==n:r(this.children);break;case!0===n:o(this.el);break;case null!==n:r(this.el.childNodes)}this.el=null}return this},clone(){return Object.assign({},this,{meta:{},el:null})}});function ve(e,t){return void 0===t&&(t=[]),Object.assign({},be,{html:e,bindingsData:t})}function ye(){return this}function Oe(e){return I(e)?e.prototype&&e.prototype.constructor?new e:e():e}function Ee(e,t,n,r){return void 0===r&&(r={}),Object.defineProperty(e,t,Object.assign({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function xe(e,t,n){return Object.entries(t).forEach((t=>{let[r,o]=t;Ee(e,r,o,n)})),e}function we(e,t){return Object.entries(t).forEach((t=>{let[n,r]=t;e[n]||(e[n]=r)})),e}function Te(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}function Ne(e,t){return Te("string"==typeof e?(t||document).querySelectorAll(e):e)}const je=e=>1===e.length?e[0]:e;function Ae(e,t,n){const r="object"==typeof t?t:{[t]:n},o=Object.keys(r);return Te(e).forEach((e=>{o.forEach((t=>e.setAttribute(t,r[t])))})),e}function Se(e,t){return function(e,t,n){const r="string"==typeof t?[t]:t;return je(Te(e).map((e=>je(r.map((t=>e[n](t)))))))}(e,t,"getAttribute")}const Ce=new Map,Me=()=>_e||(Ae(_e=Ne("style[riot]")[0]||document.createElement("style"),"type","text/css"),_e.parentNode||document.head.appendChild(_e),_e);var _e,Ue={CSS_BY_NAME:Ce,add(e,t){return Ce.has(e)||(Ce.set(e,t),this.inject()),this},inject(){return Me().innerHTML=[...Ce.values()].join("\n"),this},remove(e){return Ce.has(e)&&(Ce.delete(e),this.inject()),this}};function Pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(r=[...n,...r]).length<e.length?Pe(e,...r):e(...r)}}function Re(e){return Se(e,c)||e.tagName.toLowerCase()}const Le=Object.freeze({$(e){return Ne(e,this.root)[0]},$$(e){return Ne(e,this.root)}}),Be=Object.freeze({[l]:ye,[p]:ye,[f]:ye}),De=Object.freeze({[h]:ye,[d]:ye,[m]:ye,[g]:ye,[b]:ye,[v]:ye,[y]:ye}),ke=Object.assign({},Be,{clone:ye,createDOM:ye});function Ie(t,n){return void 0===n&&(n={}),Object.assign({},function(t){return Array.from(t.attributes).reduce(((t,n)=>(t[e(n.name)]=n.value,t)),{})}(t),Oe(n))}const Ye=(e,t)=>e[a]=t;function qe(e){return[l,p,f].reduce(((t,n)=>(t[n]=e(n),t)),{})}function Ke(e){let{css:t,template:n,exports:r,name:o}=e;const s=n?function(e,t){return e(ve,M,C,(e=>t[e]||i.get(e)))}(n,r?function(e){void 0===e&&(e={});return Object.entries(Oe(e)).reduce(((e,t)=>{let[n,r]=t;
/* Riot v5.1.4, @license MIT */
var o;return e[(o=n,o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=Ke(r),e}),{})}(r.components):{}):ke;return e=>{let{slots:i,attributes:a,props:u}=e;if(r&&r[T])return function(e,t){let{slots:n,attributes:r,props:o,css:s,template:i}=t;i&&z("Pure components can not have html"),s&&z("Pure components do not have css");const a=we(e({slots:n,attributes:r,props:o}),Be);return qe((e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(e===l){const[e]=n;e[T]=!0,Ye(e,a)}return a[e](...n),a}))}(r,{slots:i,attributes:a,props:u,css:t,template:n});const c=Oe(r)||{},p=Fe({css:t,template:s,componentAPI:c,name:o})({slots:i,attributes:a,props:u});return{mount:(e,t,n)=>p.mount(e,n,t),update:(e,t)=>p.update(t,e),unmount:e=>p.unmount(e)}}}function Fe(e){let{css:t,template:n,componentAPI:r,name:o}=e;return t&&o&&Ue.add(o,t),Pe(ze)(xe(we(r,Object.assign({},De,{[E]:{}})),Object.assign({[x]:null,[w]:null},Le,{name:o,css:t,template:n})))}function He(e,t){return Object.assign({},e,Oe(t))}function ze(e,t){let{slots:n,attributes:r,props:o}=t;return s=function(e){return[...u].reduce(((e,t)=>t(e)||e),e)}(xe(Object.create(e),{mount(t,s,i){return void 0===s&&(s={}),this[j]=function(e,t){void 0===t&&(t=[]);const n=t.map((t=>ie(e,t))),r={};return Object.assign(r,Object.assign({expressions:n},qe((e=>t=>(n.forEach((n=>n[e](t))),r)))))}(t,r).mount(i),Ee(this,O,Object.freeze(Object.assign({},Ie(t,o),$(this[j].expressions)))),this.state=He(this.state,s),this[A]=this.template.createDOM(t).clone(),Ye(t,this),e.name&&function(e,t){Re(e)!==t&&Ae(e,c,t)}(t,e.name),Ee(this,w,t),Ee(this,x,n),this.onBeforeMount(this.props,this.state),this[N]=i,this[A].mount(t,this,i),this.onMounted(this.props,this.state),this},update(e,t){void 0===e&&(e={}),t&&(this[N]=t,this[j].update(t));const n=$(this[j].expressions);if(!1!==this.shouldUpdate(n,this.props))return Ee(this,O,Object.freeze(Object.assign({},this.props,n))),this.state=He(this.state,e),this.onBeforeUpdate(this.props,this.state),this[A].update(this,this[N]),this.onUpdated(this.props,this.state),this},unmount(e){return this.onBeforeUnmount(this.props,this.state),this[j].unmount(),this[A].unmount(this,this[N],null===e?null:!e),this.onUnmounted(this.props,this.state),this}})),Object.keys(e).filter((t=>I(e[t]))).forEach((e=>{s[e]=s[e].bind(s)})),s;var s}const{DOM_COMPONENT_INSTANCE_PROPERTY:$e,COMPONENTS_IMPLEMENTATION_MAP:Ve,PLUGINS_SET:Xe}=S;var Ge=n(669),Je=n.n(Ge);var We,Ze;!function(e,t){let{css:n,template:r,exports:o}=t;Ve.has(e)&&z(`The component "${e}" was already registered`),Ve.set(e,Ke({name:e,css:n,template:r,exports:o}))}("tinkerforge-power-button",{css:null,exports:{state:{power:!0},handleClick(e){this.state.power?this.state.power=!1:this.state.power=!0,Je().put("/api/state",{power:this.state.power}).then((e=>{this.update()}))}},template:function(e,t,n,r){return e('<div class="tinkerforge-power-button"><button expr0="expr0" type="button"><span expr1="expr1"></span><span expr2="expr2"></span></button></div>',[{redundantAttribute:"expr0",selector:"[expr0]",expressions:[{type:t.EVENT,name:"onclick",evaluate:function(e){return e.handleClick}}]},{type:n.IF,evaluate:function(e){return e.state.power},redundantAttribute:"expr1",selector:"[expr1]",template:e("On",[])},{type:n.IF,evaluate:function(e){return!e.state.power},redundantAttribute:"expr2",selector:"[expr2]",template:e("Off",[])}])},name:"tinkerforge-power-button"}),Ne("tinkerforge-power-button").map((e=>function(e,t,n){const r=n||Re(e);return i.has(r)||z(`The component named "${r}" was never registered`),i.get(r)({props:t}).mount(e)}(e,We,Ze)))})()})();