@openremote/or-asset-tree 1.31.1 → 1.32.0-snapshot.20260929083723

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -841,7 +841,7 @@ var ORAssetTree;(()=>{var __webpack_modules__={3992(d,m,u){"use strict";u.d(m,{O
841
841
  .draggable:active[draggable="true"] {
842
842
  cursor: grabbing;
843
843
  }
844
- `},4532(d,m,u){!function(d){"use strict";var m,u,f=function(){try{if(d.URLSearchParams&&"bar"===new d.URLSearchParams("foo=bar").get("foo"))return d.URLSearchParams}catch(d){}return null}(),p=f&&"a=1"===new f({a:1}).toString(),h=f&&"+"===new f("s=%2B").get("s"),b=f&&"size"in f.prototype,g="__URLSearchParams__",v=!f||((m=new f).append("s"," &"),"s=+%26"===m.toString()),_=w.prototype,y=!!(d.Symbol&&d.Symbol.iterator);if(!f||!p||!h||!v||!b){_.append=function(d,m){T(this[g],d,m)},_.delete=function(d){delete this[g][d]},_.get=function(d){var m=this[g];return this.has(d)?m[d][0]:null},_.getAll=function(d){var m=this[g];return this.has(d)?m[d].slice(0):[]},_.has=function(d){return I(this[g],d)},_.set=function(d,m){this[g][d]=[""+m]},_.toString=function(){var d,m,u,f,p=this[g],h=[];for(m in p)for(u=E(m),d=0,f=p[m];d<f.length;d++)h.push(u+"="+E(f[d]));return h.join("&")};var F=d.Proxy&&f&&(!h||!v||!p||!b);F?(u=new Proxy(f,{construct:function(d,m){return new d(new w(m[0]).toString())}})).toString=Function.prototype.toString.bind(w):u=w,Object.defineProperty(d,"URLSearchParams",{value:u});var x=d.URLSearchParams.prototype;x.polyfill=!0,!F&&d.Symbol&&(x[d.Symbol.toStringTag]="URLSearchParams"),"forEach"in x||(x.forEach=function(d,m){var u=A(this.toString());Object.getOwnPropertyNames(u).forEach(function(f){u[f].forEach(function(u){d.call(m,u,f,this)},this)},this)}),"sort"in x||(x.sort=function(){var d,m,u,f=A(this.toString()),p=[];for(d in f)p.push(d);for(p.sort(),m=0;m<p.length;m++)this.delete(p[m]);for(m=0;m<p.length;m++){var h=p[m],b=f[h];for(u=0;u<b.length;u++)this.append(h,b[u])}}),"keys"in x||(x.keys=function(){var d=[];return this.forEach(function(m,u){d.push(u)}),C(d)}),"values"in x||(x.values=function(){var d=[];return this.forEach(function(m){d.push(m)}),C(d)}),"entries"in x||(x.entries=function(){var d=[];return this.forEach(function(m,u){d.push([u,m])}),C(d)}),y&&(x[d.Symbol.iterator]=x[d.Symbol.iterator]||x.entries),"size"in x||Object.defineProperty(x,"size",{get:function(){var d=A(this.toString());if(x===this)throw TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(d).reduce(function(m,u){return m+d[u].length},0)}})}function w(d){((d=d||"")instanceof URLSearchParams||d instanceof w)&&(d=d.toString()),this[g]=A(d)}function E(d){var m={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(d).replace(/[!'\(\)~]|%20|%00/g,function(d){return m[d]})}function k(d){return d.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(d){return decodeURIComponent(d)})}function C(m){var u={next:function(){var d=m.shift();return{done:void 0===d,value:d}}};return y&&(u[d.Symbol.iterator]=function(){return u}),u}function A(d){var m={};if("object"==typeof d)if(S(d))for(var u=0;u<d.length;u++){var f=d[u];if(S(f)&&2===f.length)T(m,f[0],f[1]);else throw TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var p in d)d.hasOwnProperty(p)&&T(m,p,d[p]);else{0===d.indexOf("?")&&(d=d.slice(1));for(var h=d.split("&"),b=0;b<h.length;b++){var g=h[b],v=g.indexOf("=");-1<v?T(m,k(g.slice(0,v)),k(g.slice(v+1))):g&&T(m,k(g),"")}}return m}function T(d,m,u){var f="string"==typeof u?u:null!=u&&"function"==typeof u.toString?u.toString():JSON.stringify(u);I(d,m)?d[m].push(f):d[m]=[f]}function S(d){return!!d&&"[object Array]"===Object.prototype.toString.call(d)}function I(d,m){return Object.prototype.hasOwnProperty.call(d,m)}}(void 0!==u.g?u.g:"u">typeof window?window:this)},6923(d,m,u){"use strict";let f,p,h,b,g;u.d(m,{WO:()=>iv,PR:()=>i_,Iy:()=>ix,BB:()=>ig,Id:()=>iy,BH:()=>iF,J0:()=>T,Ay:()=>iT,B1:()=>ib});var v,_,y,F,x,w,E,k,C,A,T={};u.r(T),u.d(T,{cY:()=>N,C3:()=>B,Ri:()=>M,Th:()=>X,sY:()=>K,F2:()=>j,N0:()=>V,Rk:()=>H,DH:()=>L,jX:()=>P,B8:()=>Y,NM:()=>W,Hh:()=>z});var S={};u.r(S),u.d(S,{hasBrowserEnv:()=>tc,hasStandardBrowserEnv:()=>td,hasStandardBrowserWebWorkerEnv:()=>tm,navigator:()=>tl,origin:()=>tu}),u(4532);var I=u(2764),O=u(3583),D=u(4867),R=u.n(D);u(3472);class N{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((d,m)=>{this._resolve=d,this._reject=m}),Object.freeze(this)}}function L(d,m,u=!0){if(null==d||null==m)return d===m;if(d.constructor!==m.constructor)return!1;if(d instanceof Function||d instanceof RegExp)return d===m;if(d===m||d.valueOf()===m.valueOf())return!0;if(Array.isArray(d)&&d.length!==m.length||d instanceof Date||!(d instanceof Object)||!(m instanceof Object))return!1;if(u){if(Array.isArray(d))return d.every((d,u)=>L(d,m[u]));let u=Object.keys(d);return Object.keys(m).every(d=>-1!==u.indexOf(d))&&u.every(u=>L(d[u],m[u]))}return!1}function B(d,m){if(0===d.length)return;let u=d.indexOf(m);u>=0&&d.splice(u,1)}function P(d){return null==d?"":d.split(" ").map((d,m)=>0===m?d[0].toLowerCase()+d.substring(1):d[0].toUpperCase()+d.substring(1)).join("")}function M(d){if(null==d)return"";let m=!1;return d.split(/([A-Z]|\d)/).map((d,u,f)=>{if(!d)return d;if(!m)return m=!0,d.charAt(0).toUpperCase()+d.slice(1);if("_"===d)return" ";if(1===d.length&&d===d.toUpperCase()){let m=!f[u-1]||"_"===f[u-1],p=u+1<f.length&&f[u+1]&&"_"!==f[u+1],h=u+3>f.length||!f[u+1]&&!f[u+3];(!m||p)&&(d=" "+d),!p&&(m||h)||(d=d.toLowerCase())}return d}).join("").trim()}function z(d,m){if(m===d)return!0;let u=d.endsWith("*"),f=!u&&d.startsWith("*"),p=!u&&!f&&d.startsWith("^")&&d.endsWith("$");if(u&&m.startsWith(d.substr(0,d.length-1))||f&&m.endsWith(d.substr(1)))return!0;if(p)try{return new RegExp(d).test(m)}catch(d){console.error("Failed to compile needle as a RegExp: "+d)}return!1}function U(d,m,u){let f="string"==typeof d?d:d.name;return m&&m.meta&&m.meta.hasOwnProperty(f)?m.meta[f]:u&&u.meta?u.meta[f]:void 0}function j(d){return("string"==typeof d&&(d=I.u0.getAssetDescriptor(d)),d)?O.Ay.t("label.asset."+d.name,{defaultValue:M(d.name)}):""}function V(d,m,u,f,p){return function(d,m,u,f,p,h){let b=G("label",d,m,u,p),g="";if(b||(b=U("label",d,m&&m.meta?m:void 0)),f&&(g=$(q("units",d,m,u,p))),!b){let u=d?d.name:m?"string"==typeof m?m:m.name:void 0;b=h||(u?M(u):void 0)}return b?b+(g?" ("+g+")":""):g}(d,m,u,f,!0,p)}function H(d,m,u,f){let p="";if(null==d)p=f||"";else if("string"==typeof d)p=d;else if("number"==typeof d||"boolean"==typeof d||d instanceof Date){let f=m&&m();if(f&&0!==Object.keys(f).length)switch("number"==typeof d?f.asBoolean?d=!!d:f.asDate&&(d=new Date(d)):"boolean"==typeof d&&f.asNumber&&(d=+!!d),typeof d){case"number":p=new Intl.NumberFormat(u||O.Ay.language,f).format(d);break;case"boolean":f.asOnOff&&(p=d?O.Ay.t("on"):O.Ay.t("off")),f.asOpenClosed&&(p=d?O.Ay.t("open"):O.Ay.t("closed")),f.asPressedReleased&&(p=d?O.Ay.t("pressed"):O.Ay.t("released"));break;case"object":if(f.momentJsFormat)p=R()(d).format(f.momentJsFormat);else if(f.iso8601)p=d.toISOString();else if(f.week){var h;let m,u=((h=new Date(Date.UTC((h=d).getFullYear(),h.getMonth(),h.getDate()))).setUTCDate(h.getUTCDate()+4-(h.getUTCDay()||7)),m=new Date(Date.UTC(h.getUTCFullYear(),0,1)),Math.ceil(((h.getTime()-m.getTime())/864e5+1)/7));p="2-digit"===f.week?String(u).padStart(2,"0"):Number(u).toString(10)}else p=new Intl.DateTimeFormat(u||O.Ay.language,f).format(d)}else p=Object(d).toString()}return p}function $(d,m){if(!d)return"";m||(m="");let u=d.map((d,u)=>{if(3!==d.length||d.toUpperCase()!==d)return O.Ay.t(["units."+d,"or:units."+d]);{let f=new Intl.NumberFormat(O.Ay.language,{currency:d,style:"currency"}).formatToParts();if(0!==u||"currency"!==f[0].type)return"currency"===f[0].type?f[0].value:f[f.length-1].value;if(!m)return f[0].value;m=f[0].value+m}}).join("");return m.length>0?m+" "+u:u}function q(d,m,u,f,p){let h,b=[],g=G(d,m&&"string"==typeof m?m:m?m.name:u?"string"==typeof u?u:u.name:void 0,u,f,p);if(g&&(h=JSON.parse(g)))if("format"!==d)return h;else b.push(h);if(m&&m.meta&&(h=U(d,m,u)))if("format"!==d)return h;else b.push(h);if(u&&"string"!=typeof u&&u.hasOwnProperty(d)){if(h=u[d],"format"!==d)return h;b.push(h)}if(u&&u.type){if(h=I.u0.getValueDescriptor(u.type)[d],"format"!==d)return h;b.push(h)}if("format"!==d||0===b.length)return h;let v={};return b.reverse().forEach(d=>{v=Object.assign(Object.assign({},v),d)}),v}function G(d,m,u,f,p,h){let b;if(m?b="string"==typeof m?m:m.name:u&&(b="string"==typeof u?u:u.name),!b)return;let g=[],v=d+"."+(p?"attribute":"meta")+".";if(f&&g.push(v+f+"."+b),u&&"string"!=typeof u&&(g.push(v+u.type+"."+b),g.push(v+u.type)),g.push(v+b),g.length>0)return O.Ay.t(g,{defaultValue:h||""})}function Y(d){return(m,u)=>{let f=d(m),p=d(u);return f||p?f&&!p?1:!f&&p?-1:f-p:0}}function W(d){return(m,u)=>{let f=d(m),p=d(u);return f||p?f&&!p?1:!f&&p?-1:f.localeCompare(p):0}}function X(d,m){let u=new N;return d.dispatchEvent(m),window.setTimeout(()=>{u.resolve(m.detail)}),u.promise}function K(){return"function"==typeof crypto.randomUUID?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,d=>(d^crypto.getRandomValues(new Uint8Array(1))[0]&15>>d/4).toString(16))}class J{constructor(d){d&&Object.assign(this,d)}matches(d){var m,u,f,p,h,b,g;if((null==(m=this.ids)?void 0:m.length)&&(!d.id||!this.ids.includes(d.id))||(null==(u=this.types)?void 0:u.length)&&(!d.type||!this.types.includes(d.type))||(null==(f=this.realm)?void 0:f.name)&&d.realm!==this.realm.name||(null==(p=this.parents)?void 0:p.length)&&!this.parents.some(m=>!m.id||d.parentId===m.id))return!1;if(null==(h=this.paths)?void 0:h.length){let m=null!=(b=d.path)?b:[];if(!this.paths.some(d=>{var u;return(null!=(u=d.path)?u:[]).every((d,u)=>m[u]===d)}))return!1}return(null==(g=this.names)||!g.length||!!this.names.every(m=>J._evalValuePredicate(d.name,m)))&&(!this.attributes||J._evalGroup(d,this.attributes))}static getUnsupportedFields(d){return Object.keys(d).filter(d=>!J._SUPPORTED_FIELDS.has(d))}collectAttributeNames(){return this.attributes?J._collectNames(this.attributes):[]}static _evalValuePredicate(d,m){var u;switch(m.predicateType){case"string":{let f;if(null==d)return!1;let p=!1!==m.caseSensitive?String(d):String(d).toLowerCase(),h=!1!==m.caseSensitive?m.value:null==(u=m.value)?void 0:u.toLowerCase();switch(m.match){case"BEGIN":f=p.startsWith(h);break;case"END":f=p.endsWith(h);break;case"CONTAINS":f=p.includes(h);break;default:f=p===h}return m.negate?!f:f}case"boolean":return d===m.value;case"number":{let u;if("number"!=typeof d)return!1;switch(m.operator){case"GREATER_THAN":u=d>m.value;break;case"GREATER_EQUALS":u=d>=m.value;break;case"LESS_THAN":u=d<m.value;break;case"LESS_EQUALS":u=d<=m.value;break;case"BETWEEN":u=d>=m.value&&d<=m.rangeValue;break;default:u=d===m.value}return m.negate?!u:u}}return!1}static _evalPredicate(d,m){var u,f;let p=null==(u=m.name)?void 0:u.value;if(!p)return!0;let h=null==(f=d.attributes)?void 0:f[p];if(!h)return!!m.negated;let b=!m.value||J._evalValuePredicate(h.value,m.value);return m.negated?!b:b}static _evalGroup(d,m){var u,f,p;let h=null!=(u=m.operator)?u:"AND",b=[...(null!=(f=m.items)?f:[]).map(m=>J._evalPredicate(d,m)),...(null!=(p=m.groups)?p:[]).map(m=>J._evalGroup(d,m))];return!b.length||("OR"===h?b.some(Boolean):b.every(Boolean))}static _collectNames(d){var m,u;return[...(null!=(m=d.items)?m:[]).map(d=>{var m;return null==(m=d.name)?void 0:m.value}).filter(d=>!!d),...(null!=(u=d.groups)?u:[]).flatMap(d=>J._collectNames(d))]}}J._SUPPORTED_FIELDS=new Set(["ids","types","names","parents","paths","realm","attributes"]);var Z=function(d,m,u,f){return new(u||(u=Promise))(function(p,h){function b(d){try{v(f.next(d))}catch(d){h(d)}}function g(d){try{v(f.throw(d))}catch(d){h(d)}}function v(d){var m;d.done?p(d.value):((m=d.value)instanceof u?m:new u(function(d){d(m)})).then(b,g)}v((f=f.apply(d,m||[])).next())})};let Q=u(4461);class ee{constructor(d,m,u){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=d,this._autoEnable=m,this._enableCompleteCallback=u,window.OpenRemoteConsole=this;let f=new URLSearchParams(window.location.search),p=f.get("consoleName"),h=f.get("consoleVersion"),b=f.get("consolePlatform"),g=f.get("consoleProviders"),v=f.get("consoleAutoEnable"),_=g&&g.length>0?g.split(" "):["push"];this._pendingProviderEnables=_;let y=ee._createConsoleRegistration(),F=window.localStorage.getItem(this._storageKey);if(F)try{let d=JSON.parse(F);d.id&&(y.id=d.id),d.name&&(y.name=d.name),d.providers&&(y.providers=d.providers),d.apps&&(y.apps=d.apps)}catch(d){console.error("Failed to deserialise console registration")}let x=y.providers;for(let d of(y.providers={},_)){let m=x&&x.hasOwnProperty(d)?x[d]:{enabled:!1,disabled:!1};y.providers[d]=m}let w=iT.getAppName();w.length>0&&0>y.apps.indexOf(w)&&y.apps.push(w),this._registration=y,p&&(y.name=p),h&&(y.version=h),b&&(y.platform=b),v&&(this._autoEnable="TRUE"===v||"true"===v)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let d=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return d&&("iP"===d.substring(0,2)||"Mac"===d.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return Z(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let d of Object.keys(this._registration.providers))yield this._initialiseProvider(d);this._registration.id||(yield this.sendRegistration()),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(d){console.error(d)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return Z(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let d=this._pendingProviderEnables.length-1;d>-1;d--){let m=this._pendingProviderEnables[d];yield this.enableProvider(m)}})}enableProvider(d,m){return Z(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(d))throw console.debug("Invalid console provider '"+d+"'"),Error("Invalid console provider '"+d+"'");console.debug("Console: enabling provider '"+d+"'");let u={provider:d,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:m},f=yield this.sendProviderMessage(u,!0);this._registration.providers[d].hasPermission=f.hasPermission,this._registration.providers[d].success=f.success,this._registration.providers[d].enabled=f.success,this._registration.providers[d].data=f.data;let p=this._pendingProviderEnables.indexOf(d);return p>=0&&(this._pendingProviderEnables.splice(p,1),0===this._pendingProviderEnables.length&&(this.sendRegistration().catch(()=>void 0),this._callCompletedCallback())),f})}disableProvider(d){return Z(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(d))throw console.debug("Invalid console provider '"+d+"'"),Error("Invalid console provider '"+d+"'");console.debug("Console: disabling provider '"+d+"'");let m=yield this.sendProviderMessage({provider:d,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[d].disabled=!0,this._registration.providers[d].enabled=!1,m})}getProvider(d){return this._registration&&this._registration.providers?this._registration.providers[d]:void 0}sendProviderMessage(d,m){return Z(this,void 0,void 0,function*(){if("storage"!==d.provider&&!this._registration.providers.hasOwnProperty(d.provider))throw console.debug("Invalid console provider '"+d.provider+"'"),Error("Invalid console provider '"+d.provider+"'");if(!m)return void this._doSendProviderMessage(d);let u=d.provider+d.action;if(this._pendingProviderPromises[u])throw Error("Message already pending for provider '"+d.provider+"' with action '"+d.action+"'");let f=new N,p=()=>{delete this._pendingProviderPromises[u],f.reject("No response from provider")};return this._pendingProviderPromises[u]=[f,window.setTimeout(p,5e3)],this._doSendProviderMessage(d),f.promise})}sendRegistration(){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),new Promise((d,m)=>{this._registrationTimer=window.setTimeout(()=>Z(this,void 0,void 0,function*(){this._registrationTimer=null,console.debug("Console: updating registration");try{yield this._sendRegistration(!0),d()}catch(d){console.error("Failed to register console",d),m(d)}}))})}_sendRegistration(d){return Z(this,void 0,void 0,function*(){this._normaliseRegistration();let m=!!this._registration.id;try{let d=yield iT.rest.api.ConsoleResource.register(this._registration);if(200!==d.status)throw Error("Failed to register console");this._registration=d.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem(this._storageKey,JSON.stringify(this._registration))}catch(u){if(d&&m&&ee._isStaleRegistrationResponse(u)){console.warn("Console registration ID is stale or cannot be claimed; creating a new console registration"),window.localStorage.removeItem(this._storageKey),delete this._registration.id,yield this._sendRegistration(!1);return}throw u}})}_normaliseRegistration(){this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={})}get _storageKey(){return"OpenRemoteConsole:"+this._realm}static _isStaleRegistrationResponse(d){let m=d&&d.response?d.response.status:void 0;return 403===m||409===m}storeData(d,m){this.sendProviderMessage({provider:"storage",action:"STORE",key:d,value:m},!1)}retrieveData(d){return Z(this,void 0,void 0,function*(){let m=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:d},!0);try{let d=yield Promise.race([m,new Promise((d,m)=>setTimeout(m,2e3))]);if(d&&d.value){let m=d.value;return"null"===m?void 0:m}}catch(d){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(d,m){this._providerMessageListeners[d.provider+d.action]=m}removeProviderMessageListener(d){delete this._providerMessageListeners[d.provider+d.action]}_postNativeShellMessage(d){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(d));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(d)}catch(d){console.error("Failed to send shell message towards console",d)}}_doSendGenericMessage(d,m){let u={type:d,data:m};this.isMobile?this._postNativeShellMessage(u):console.warn("Failed to send generic message to console.",u)}_doSendProviderMessage(d){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:d});else{if(!d.provider||!d.action)return;switch(d.provider.trim().toUpperCase()){case"PUSH":switch(d.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+d.provider+"' and action '"+d.action+"'")}break;case"STORAGE":switch(d.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let m=d.key?d.key.trim():null;if(!m||0===m.length)throw Error("Storage provider 'store' action requires a `key`");null===d.value?window.localStorage.removeItem(m):window.localStorage.setItem(m,JSON.stringify(d.value))}break;case"RETRIEVE":{let m=d.key?d.key.trim():null;if(!m||0===m.length)throw Error("Storage provider 'retrieve' action requires a `key`");let u=window.localStorage.getItem(m);if(null!==u)try{u=JSON.parse(u)}catch(d){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:m,value:u}))}break;default:throw Error("Unsupported provider '"+d.provider+"' and action '"+d.action+"'")}break;default:console.error("Unsupported provider: "+d.provider)}}}_handleProviderResponse(d){if(!d)return;let m=JSON.parse(d),u=m.provider,f=m.action,p=this._pendingProviderPromises[u+f];p&&(window.clearTimeout(p[1]),delete this._pendingProviderPromises[u+f],p[0].resolve(m));let h=this._providerMessageListeners[u+f];h&&h(m)}_callCompletedCallback(){let d=this._enableCompleteCallback;this._enableCompleteCallback=null,d&&window.setTimeout(()=>{d()},0)}static _createConsoleRegistration(){return{name:Q.name,version:Q.version,platform:Q.os.toString(),apps:[],model:((Q.manufacturer?Q.manufacturer+" ":"")+(Q.product?Q.product:"")).trim()}}_initialiseProvider(d){return Z(this,void 0,void 0,function*(){let m;console.debug("Console: initialising provider '"+d+"'");try{m=yield this.sendProviderMessage({provider:d,action:"PROVIDER_INIT"},!0),this._registration.providers[d].version=m.version,this._registration.providers[d].requiresPermission=m.requiresPermission,this._registration.providers[d].hasPermission=m.hasPermission,this._registration.providers[d].success=m.success,this._registration.providers[d].enabled=m.enabled,this._registration.providers[d].disabled=m.disabled,this._registration.providers[d].data=m.data}catch(d){console.error(d),m={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(m.success||(console.debug("Provider initialisation failed: '"+d+"'"),m.disabled=!0,this._registration.providers[d].disabled=!0),m.disabled||m.enabled){let m=this._pendingProviderEnables.indexOf(d);m>=0&&this._pendingProviderEnables.splice(m,1)}})}}function et(d,m){return function(){return d.apply(m,arguments)}}let{toString:en}=Object.prototype,{getPrototypeOf:ei}=Object,{iterator:eo,toStringTag:er}=Symbol,ea=(({hasOwnProperty:d})=>(m,u)=>d.call(m,u))(Object.prototype),es=(d,m)=>{let u=d,f=[];for(;null!=u&&u!==Object.prototype&&-1===f.indexOf(u);){if(f.push(u),ea(u,m))return!0;u=ei(u)}return!1},ec=(p=Object.create(null),d=>{let m=en.call(d);return p[m]||(p[m]=m.slice(8,-1).toLowerCase())}),el=d=>(d=d.toLowerCase(),m=>ec(m)===d),ed=d=>m=>typeof m===d,{isArray:em}=Array,eu=ed("undefined");function ef(d){return null!==d&&!eu(d)&&null!==d.constructor&&!eu(d.constructor)&&eb(d.constructor.isBuffer)&&d.constructor.isBuffer(d)}let ep=el("ArrayBuffer"),eh=ed("string"),eb=ed("function"),eg=ed("number"),ev=d=>null!==d&&"object"==typeof d,e_=d=>{if(!ev(d))return!1;let m=ei(d);return(null===m||m===Object.prototype||null===ei(m))&&!es(d,er)&&!es(d,eo)},ey=el("Date"),eF=el("File"),ex=el("Blob"),ew=el("FileList"),eE="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:"u">typeof global?global:{},ek=void 0!==eE.FormData?eE.FormData:void 0,eC=el("URLSearchParams"),[eA,eT,eS,eI]=["ReadableStream","Request","Response","Headers"].map(el);function eO(d,m,{allOwnKeys:u=!1}={}){let f,p;if(null!=d)if("object"!=typeof d&&(d=[d]),em(d))for(f=0,p=d.length;f<p;f++)m.call(null,d[f],f,d);else{let p;if(ef(d))return;let h=u?Object.getOwnPropertyNames(d):Object.keys(d),b=h.length;for(f=0;f<b;f++)p=h[f],m.call(null,d[p],p,d)}}function eD(d,m){let u;if(ef(d))return null;m=m.toLowerCase();let f=Object.keys(d),p=f.length;for(;p-- >0;)if(m===(u=f[p]).toLowerCase())return u;return null}let eR="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,eN=d=>!eu(d)&&d!==eR,eL=(h="u">typeof Uint8Array&&ei(Uint8Array),d=>h&&d instanceof h),eB=el("HTMLFormElement"),{propertyIsEnumerable:eP}=Object.prototype,eM=el("RegExp"),ez=(d,m)=>{let u=Object.getOwnPropertyDescriptors(d),f={};eO(u,(u,p)=>{let h;!1!==(h=m(u,p,d))&&(f[p]=h||u)}),Object.defineProperties(d,f)},eU=el("AsyncFunction"),ej=(v="function"==typeof setImmediate,_=eb(eR.postMessage),v?setImmediate:_?(y=`axios@${Math.random()}`,F=[],eR.addEventListener("message",({source:d,data:m})=>{d===eR&&m===y&&F.length&&F.shift()()},!1),d=>{F.push(d),eR.postMessage(y,"*")}):d=>setTimeout(d)),eV="u">typeof queueMicrotask?queueMicrotask.bind(eR):"u">typeof process&&process.nextTick||ej,eH=d=>null!=d&&eb(d[eo]),e$={isArray:em,isArrayBuffer:ep,isBuffer:ef,isFormData:d=>{if(!d)return!1;if(ek&&d instanceof ek)return!0;let m=ei(d);if(!m||m===Object.prototype||!eb(d.append))return!1;let u=ec(d);return"formdata"===u||"object"===u&&eb(d.toString)&&"[object FormData]"===d.toString()},isArrayBufferView:function(d){let m;return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(d):d&&d.buffer&&ep(d.buffer)},isString:eh,isNumber:eg,isBoolean:d=>!0===d||!1===d,isObject:ev,isPlainObject:e_,isEmptyObject:d=>{if(!ev(d)||ef(d))return!1;try{return 0===Object.keys(d).length&&Object.getPrototypeOf(d)===Object.prototype}catch(d){return!1}},isReadableStream:eA,isRequest:eT,isResponse:eS,isHeaders:eI,isUndefined:eu,isDate:ey,isFile:eF,isReactNativeBlob:d=>!!(d&&void 0!==d.uri),isReactNative:d=>d&&void 0!==d.getParts,isBlob:ex,isRegExp:eM,isFunction:eb,isStream:d=>ev(d)&&eb(d.pipe),isURLSearchParams:eC,isTypedArray:eL,isFileList:ew,forEach:eO,merge:function d(...m){let{caseless:u,skipUndefined:f}=eN(this)&&this||{},p={},h=(m,h)=>{if("__proto__"===h||"constructor"===h||"prototype"===h)return;let b=u&&"string"==typeof h&&eD(p,h)||h,g=ea(p,b)?p[b]:void 0;e_(g)&&e_(m)?p[b]=d(g,m):e_(m)?p[b]=d({},m):em(m)?p[b]=m.slice():f&&eu(m)||(p[b]=m)};for(let d=0,u=m.length;d<u;d++){let u=m[d];if(!u||ef(u)||(eO(u,h),"object"!=typeof u||em(u)))continue;let f=Object.getOwnPropertySymbols(u);for(let d=0;d<f.length;d++){let m=f[d];eP.call(u,m)&&h(u[m],m)}}return p},extend:(d,m,u,{allOwnKeys:f}={})=>(eO(m,(m,f)=>{u&&eb(m)?Object.defineProperty(d,f,{__proto__:null,value:et(m,u),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(d,f,{__proto__:null,value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:f}),d),trim:d=>d.trim?d.trim():d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:d=>(65279===d.charCodeAt(0)&&(d=d.slice(1)),d),inherits:(d,m,u,f)=>{d.prototype=Object.create(m.prototype,f),Object.defineProperty(d.prototype,"constructor",{__proto__:null,value:d,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(d,"super",{__proto__:null,value:m.prototype}),u&&Object.assign(d.prototype,u)},toFlatObject:(d,m,u,f)=>{let p,h,b,g={};if(m=m||{},null==d)return m;do{for(h=(p=Object.getOwnPropertyNames(d)).length;h-- >0;)b=p[h],(!f||f(b,d,m))&&!g[b]&&(m[b]=d[b],g[b]=!0);d=!1!==u&&ei(d)}while(d&&(!u||u(d,m))&&d!==Object.prototype);return m},kindOf:ec,kindOfTest:el,endsWith:(d,m,u)=>{d=String(d),(void 0===u||u>d.length)&&(u=d.length),u-=m.length;let f=d.indexOf(m,u);return -1!==f&&f===u},toArray:d=>{if(!d)return null;if(em(d))return d;let m=d.length;if(!eg(m))return null;let u=Array(m);for(;m-- >0;)u[m]=d[m];return u},forEachEntry:(d,m)=>{let u,f=(d&&d[eo]).call(d);for(;(u=f.next())&&!u.done;){let f=u.value;m.call(d,f[0],f[1])}},matchAll:(d,m)=>{let u,f=[];for(;null!==(u=d.exec(m));)f.push(u);return f},isHTMLForm:eB,hasOwnProperty:ea,hasOwnProp:ea,hasOwnInPrototypeChain:es,getSafeProp:(d,m)=>null!=d&&es(d,m)?d[m]:void 0,reduceDescriptors:ez,freezeMethods:d=>{ez(d,(m,u)=>{if(eb(d)&&["arguments","caller","callee"].includes(u))return!1;if(eb(d[u])){if(m.enumerable=!1,"writable"in m){m.writable=!1;return}m.set||(m.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},toObjectSet:(d,m)=>{let u={};return(em(d)?d:String(d).split(m)).forEach(d=>{u[d]=!0}),u},toCamelCase:d=>d.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,m,u){return m.toUpperCase()+u}),noop:()=>{},toFiniteNumber:(d,m)=>null!=d&&Number.isFinite(d*=1)?d:m,findKey:eD,global:eR,isContextDefined:eN,isSpecCompliantForm:function(d){return!!(d&&eb(d.append)&&"FormData"===d[er]&&d[eo])},toJSONObject:d=>{let m=new WeakSet,u=d=>{if(ev(d)){if(m.has(d))return;if(ef(d))return d;if(!("toJSON"in d)){m.add(d);let f=em(d)?[]:{};return eO(d,(d,m)=>{let p=u(d);eu(p)||(f[m]=p)}),m.delete(d),f}}return d};return u(d)},isAsyncFn:eU,isThenable:d=>d&&(ev(d)||eb(d))&&eb(d.then)&&eb(d.catch),setImmediate:ej,asap:eV,isIterable:eH,isSafeIterable:d=>null!=d&&es(d,eo)&&eH(d)},eq=e$.toObjectSet(["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"]),eG=RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),eY=RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function eW(d,m){return e$.isArray(d)?d.map(d=>eW(d,m)):function(d){let m=0,u=d.length;for(;m<u;){let u=d.charCodeAt(m);if(9!==u&&32!==u)break;m+=1}for(;u>m;){let m=d.charCodeAt(u-1);if(9!==m&&32!==m)break;u-=1}return 0===m&&u===d.length?d:d.slice(m,u)}(String(d).replace(m,""))}function eX(d){let m=Object.create(null);return e$.forEach(d.toJSON(),(d,u)=>{m[u]=eW(d,eY)}),m}let eK=Symbol("internals");function eJ(d){return d&&String(d).trim().toLowerCase()}function eZ(d){return!1===d||null==d?d:e$.isArray(d)?d.map(eZ):eW(String(d),eG)}function eQ(d,m,u,f,p){if(e$.isFunction(f))return f.call(this,m,u);if(p&&(m=u),e$.isString(m)){if(e$.isString(f))return -1!==m.indexOf(f);if(e$.isRegExp(f))return f.test(m)}}class e0{constructor(d){d&&this.set(d)}set(d,m,u){let f=this;function p(d,m,u){let p=eJ(m);if(!p)return;let h=e$.findKey(f,p);h&&void 0!==f[h]&&!0!==u&&(void 0!==u||!1===f[h])||(f[h||m]=eZ(d))}let h=(d,m)=>e$.forEach(d,(d,u)=>p(d,u,m));if(e$.isPlainObject(d)||d instanceof this.constructor)h(d,m);else{let f;if(e$.isString(d)&&(d=d.trim())&&(f=d,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(f.trim()))){var b;let u,f,p,g;h((g={},(b=d)&&b.split("\n").forEach(function(d){p=d.indexOf(":"),u=d.substring(0,p).trim().toLowerCase(),f=d.substring(p+1).trim(),!u||g[u]&&eq[u]||("set-cookie"===u?g[u]?g[u].push(f):g[u]=[f]:g[u]=g[u]?g[u]+", "+f:f)}),g),m)}else if(e$.isObject(d)&&e$.isSafeIterable(d)){let u=Object.create(null),f,p;for(let m of d){if(!e$.isArray(m))throw TypeError("Object iterator must return a key-value pair");p=m[0],e$.hasOwnProp(u,p)?(f=u[p],u[p]=e$.isArray(f)?[...f,m[1]]:[f,m[1]]):u[p]=m[1]}h(u,m)}else null!=d&&p(m,d,u)}return this}get(d,m){if(d=eJ(d)){let u=e$.findKey(this,d);if(u){let d=this[u];if(!m)return d;if(!0===m){let m,u=Object.create(null),f=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;m=f.exec(d);)u[m[1]]=m[2];return u}if(e$.isFunction(m))return m.call(this,d,u);if(e$.isRegExp(m))return m.exec(d);throw TypeError("parser must be boolean|regexp|function")}}}has(d,m){if(d=eJ(d)){let u=e$.findKey(this,d);return!!(u&&void 0!==this[u]&&(!m||eQ(this,this[u],u,m)))}return!1}delete(d,m){let u=this,f=!1;function p(d){if(d=eJ(d)){let p=e$.findKey(u,d);p&&(!m||eQ(u,u[p],p,m))&&(delete u[p],f=!0)}}return e$.isArray(d)?d.forEach(p):p(d),f}clear(d){let m=Object.keys(this),u=m.length,f=!1;for(;u--;){let p=m[u];(!d||eQ(this,this[p],p,d,!0))&&(delete this[p],f=!0)}return f}normalize(d){let m=this,u={};return e$.forEach(this,(f,p)=>{let h=e$.findKey(u,p);if(h){m[h]=eZ(f),delete m[p];return}let b=d?p.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(d,m,u)=>m.toUpperCase()+u):String(p).trim();b!==p&&delete m[p],m[b]=eZ(f),u[b]=!0}),this}concat(...d){return this.constructor.concat(this,...d)}toJSON(d){let m=Object.create(null);return e$.forEach(this,(u,f)=>{null!=u&&!1!==u&&(m[f]=d&&e$.isArray(u)?u.join(", "):u)}),m}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([d,m])=>d+": "+m).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(d){return d instanceof this?d:new this(d)}static concat(d,...m){let u=new this(d);return m.forEach(d=>u.set(d)),u}static accessor(d){let m=(this[eK]=this[eK]={accessors:{}}).accessors,u=this.prototype;function f(d){let f=eJ(d);if(!m[f]){let p;p=e$.toCamelCase(" "+d),["get","set","has"].forEach(m=>{Object.defineProperty(u,m+p,{__proto__:null,value:function(u,f,p){return this[m].call(this,d,u,f,p)},configurable:!0})}),m[f]=!0}}return e$.isArray(d)?d.forEach(f):f(d),this}}e0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),e$.reduceDescriptors(e0.prototype,({value:d},m)=>{let u=m[0].toUpperCase()+m.slice(1);return{get:()=>d,set(d){this[u]=d}}}),e$.freezeMethods(e0);class e1 extends Error{static from(d,m,u,f,p,h){let b=new e1(d.message,m||d.code,u,f,p);return Object.defineProperty(b,"cause",{__proto__:null,value:d,writable:!0,enumerable:!1,configurable:!0}),b.name=d.name,null!=d.status&&null==b.status&&(b.status=d.status),h&&Object.assign(b,h),b}constructor(d,m,u,f,p){super(d),Object.defineProperty(this,"message",{__proto__:null,value:d,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,m&&(this.code=m),u&&(this.config=u),f&&(this.request=f),p&&(this.response=p,this.status=p.status)}toJSON(){let d,m,u,f=this.config,p=f&&e$.hasOwnProp(f,"redact")?f.redact:void 0,h=e$.isArray(p)&&p.length>0?(d=new Set(p.map(d=>String(d).toLowerCase())),m=[],(u=f=>{let p;if(null===f||"object"!=typeof f||e$.isBuffer(f))return f;if(-1===m.indexOf(f)){if(f instanceof e0&&(f=f.toJSON()),m.push(f),e$.isArray(f))p=[],f.forEach((d,m)=>{let f=u(d);e$.isUndefined(f)||(p[m]=f)});else{if(!e$.isPlainObject(f)&&function(d){if(e$.hasOwnProp(d,"toJSON"))return!0;let m=Object.getPrototypeOf(d);for(;m&&m!==Object.prototype;){if(e$.hasOwnProp(m,"toJSON"))return!0;m=Object.getPrototypeOf(m)}return!1}(f))return m.pop(),f;for(let[m,h]of(p=Object.create(null),Object.entries(f))){let f=d.has(m.toLowerCase())?"[REDACTED ****]":u(h);e$.isUndefined(f)||(p[m]=f)}}return m.pop(),p}})(f)):e$.toJSONObject(f);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:h,code:this.code,status:this.status}}}e1.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",e1.ERR_BAD_OPTION="ERR_BAD_OPTION",e1.ECONNABORTED="ECONNABORTED",e1.ETIMEDOUT="ETIMEDOUT",e1.ECONNREFUSED="ECONNREFUSED",e1.ERR_NETWORK="ERR_NETWORK",e1.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",e1.ERR_DEPRECATED="ERR_DEPRECATED",e1.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",e1.ERR_BAD_REQUEST="ERR_BAD_REQUEST",e1.ERR_CANCELED="ERR_CANCELED",e1.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",e1.ERR_INVALID_URL="ERR_INVALID_URL",e1.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";let e2=e1;function e5(d){return e$.isPlainObject(d)||e$.isArray(d)}function e4(d){return e$.endsWith(d,"[]")?d.slice(0,-2):d}function e3(d,m,u){return d?d.concat(m).map(function(d,m){return d=e4(d),!u&&m?"["+d+"]":d}).join(u?".":""):m}let e6=e$.toFlatObject(e$,{},null,function(d){return/^is[A-Z]/.test(d)}),e8=function(d,m,u){if(!e$.isObject(d))throw TypeError("target must be an object");m=m||new FormData;let f=(u=e$.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,m){return!e$.isUndefined(m[d])})).metaTokens,p=u.visitor||w,h=u.dots,b=u.indexes,g=u.Blob||"u">typeof Blob&&Blob,v=void 0===u.maxDepth?100:u.maxDepth,_=g&&e$.isSpecCompliantForm(m),y=[];if(!e$.isFunction(p))throw TypeError("visitor must be a function");function F(d){if(null===d)return"";if(e$.isDate(d))return d.toISOString();if(e$.isBoolean(d))return d.toString();if(!_&&e$.isBlob(d))throw new e2("Blob is not supported. Use a Buffer instead.");if(e$.isArrayBuffer(d)||e$.isTypedArray(d)){if(_&&"function"==typeof g)return new g([d]);if("u">typeof Buffer)return Buffer.from(d);throw new e2("Blob is not supported. Use a Buffer instead.",e2.ERR_NOT_SUPPORT)}return d}function x(d){if(d>v)throw new e2("Object is too deeply nested ("+d+" levels). Max depth: "+v,e2.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(d,u,p){let g=d;if(e$.isReactNative(m)&&e$.isReactNativeBlob(d))return m.append(e3(p,u,h),F(d)),!1;if(d&&!p&&"object"==typeof d)if(e$.endsWith(u,"{}"))u=f?u:u.slice(0,-2),d=function(d){if(1/0===v)return JSON.stringify(d);let m=[];return JSON.stringify(d,function(d,u){if(!e$.isObject(u))return u;for(;m.length&&m[m.length-1]!==this;)m.pop();return m.push(u),x(1+m.length-1),u})}(d);else{var _;if(e$.isArray(d)&&(_=d,e$.isArray(_)&&!_.some(e5))||(e$.isFileList(d)||e$.endsWith(u,"[]"))&&(g=e$.toArray(d)))return u=e4(u),g.forEach(function(d,f){e$.isUndefined(d)||null===d||m.append(!0===b?e3([u],f,h):null===b?u:u+"[]",F(d))}),!1}return!!e5(d)||(m.append(e3(p,u,h),F(d)),!1)}let E=Object.assign(e6,{defaultVisitor:w,convertValue:F,isVisitable:e5});if(!e$.isObject(d))throw TypeError("data must be an object");return!function d(u,f,h=0){if(!e$.isUndefined(u)){if(x(h),-1!==y.indexOf(u))throw Error("Circular reference detected in "+f.join("."));y.push(u),e$.forEach(u,function(u,b){!0===(!(e$.isUndefined(u)||null===u)&&p.call(m,u,e$.isString(b)?b.trim():b,f,E))&&d(u,f?f.concat(b):[b],h+1)}),y.pop()}}(d),m};function e7(d){let m={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(d).replace(/[!'()~]|%20/g,function(d){return m[d]})}function e9(d,m){this._pairs=[],d&&e8(d,this,m)}let te=e9.prototype;function tt(d){return encodeURIComponent(d).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tn(d,m,u){let f;if(!m)return d;d=d||"";let p=e$.isFunction(u)?{serialize:u}:u,h=e$.getSafeProp(p,"encode")||tt,b=e$.getSafeProp(p,"serialize");if(f=b?b(m,p):e$.isURLSearchParams(m)?m.toString():new e9(m,p).toString(h)){let m=d.indexOf("#");-1!==m&&(d=d.slice(0,m)),d+=(-1===d.indexOf("?")?"?":"&")+f}return d}te.append=function(d,m){this._pairs.push([d,m])},te.toString=function(d){let m=d?m=>d.call(this,m,e7):e7;return this._pairs.map(function(d){return m(d[0])+"="+m(d[1])},"").join("&")};let ti=class{constructor(){this.handlers=[]}use(d,m,u){return this.handlers.push({fulfilled:d,rejected:m,synchronous:!!u&&u.synchronous,runWhen:u?u.runWhen:null}),this.handlers.length-1}eject(d){this.handlers[d]&&(this.handlers[d]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(d){e$.forEach(this.handlers,function(m){null!==m&&d(m)})}},to={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},tr="u">typeof URLSearchParams?URLSearchParams:e9,ta="u">typeof FormData?FormData:null,ts="u">typeof Blob?Blob:null,tc="u">typeof window&&"u">typeof document,tl="object"==typeof navigator&&navigator||void 0,td=tc&&(!tl||0>["ReactNative","NativeScript","NS"].indexOf(tl.product)),tm="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,tu=tc&&window.location.href||"http://localhost",tf={...S,isBrowser:!0,classes:{URLSearchParams:tr,FormData:ta,Blob:ts},protocols:["http","https","file","blob","url","data"]};function tp(d){if(d>100)throw new e2("FormData field is too deeply nested ("+d+" levels). Max depth: 100",e2.ERR_FORM_DATA_DEPTH_EXCEEDED)}let th=function(d){if(e$.isFormData(d)&&e$.isFunction(d.entries)){let m={};return e$.forEachEntry(d,(d,u)=>{!function d(m,u,f,p){tp(p);let h=m[p++];if("__proto__"===h)return!0;let b=Number.isFinite(+h),g=p>=m.length;return(h=!h&&e$.isArray(f)?f.length:h,g)?e$.hasOwnProp(f,h)?f[h]=e$.isArray(f[h])?f[h].concat(u):[f[h],u]:f[h]=u:(e$.hasOwnProp(f,h)&&e$.isObject(f[h])||(f[h]=[]),d(m,u,f[h],p)&&e$.isArray(f[h])&&(f[h]=function(d){let m,u,f={},p=Object.keys(d),h=p.length;for(m=0;m<h;m++)f[u=p[m]]=d[u];return f}(f[h]))),!b}(function(d){let m,u=[],f=/\w+|\[(\w*)]/g;for(;null!==(m=f.exec(d));)tp(u.length),u.push("[]"===m[0]?"":m[1]||m[0]);return u}(d),u,m,0)}),m}return null},tb=(d,m)=>null!=d&&e$.hasOwnProp(d,m)?d[m]:void 0,tg={transitional:to,adapter:["xhr","http","fetch"],transformRequest:[function(d,m){let u,f=m.getContentType()||"",p=f.indexOf("application/json")>-1,h=e$.isObject(d);if(h&&e$.isHTMLForm(d)&&(d=new FormData(d)),e$.isFormData(d))return p?JSON.stringify(th(d)):d;if(e$.isArrayBuffer(d)||e$.isBuffer(d)||e$.isStream(d)||e$.isFile(d)||e$.isBlob(d)||e$.isReadableStream(d))return d;if(e$.isArrayBufferView(d))return d.buffer;if(e$.isURLSearchParams(d))return m.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),d.toString();if(h){let m=tb(this,"formSerializer");if(f.indexOf("application/x-www-form-urlencoded")>-1){var b;return(b=d,e8(b,new tf.classes.URLSearchParams,{visitor:function(d,m,u,f){return tf.isNode&&e$.isBuffer(d)?(this.append(m,d.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...m})).toString()}if((u=e$.isFileList(d))||f.indexOf("multipart/form-data")>-1){let f=tb(this,"env"),p=f&&f.FormData;return e8(u?{"files[]":d}:d,p&&new p,m)}}if(h||p){m.setContentType("application/json",!1);var g=d;if(e$.isString(g))try{return(0,JSON.parse)(g),e$.trim(g)}catch(d){if("SyntaxError"!==d.name)throw d}return(0,JSON.stringify)(g)}return d}],transformResponse:[function(d){let m=tb(this,"transitional")||tg.transitional,u=m&&m.forcedJSONParsing,f=tb(this,"responseType"),p="json"===f;if(e$.isResponse(d)||e$.isReadableStream(d))return d;if(d&&e$.isString(d)&&(u&&!f||p)){let u=m&&m.silentJSONParsing;try{return JSON.parse(d,tb(this,"parseReviver"))}catch(d){if(!u&&p){if("SyntaxError"===d.name)throw e2.from(d,e2.ERR_BAD_RESPONSE,this,null,tb(this,"response"));throw d}}}return d}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tf.classes.FormData,Blob:tf.classes.Blob},validateStatus:function(d){return d>=200&&d<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function tv(d,m){let u=this||tg,f=m||u,p=e0.from(f.headers),h=f.data;return e$.forEach(d,function(d){h=d.call(u,h,p.normalize(),m?m.status:void 0)}),p.normalize(),h}function t_(d){return!!(d&&d.__CANCEL__)}e$.forEach(["delete","get","head","post","put","patch","query"],d=>{tg.headers[d]={}});let ty=class extends e2{constructor(d,m,u){super(null==d?"canceled":d,e2.ERR_CANCELED,m,u),this.name="CanceledError",this.__CANCEL__=!0}};function tF(d,m,u){let f=u.config.validateStatus;!u.status||!f||f(u.status)?d(u):m(new e2("Request failed with status code "+u.status,u.status>=400&&u.status<500?e2.ERR_BAD_REQUEST:e2.ERR_BAD_RESPONSE,u.config,u.request,u))}let tx=function(d,m){let u,f=Array(d=d||10),p=Array(d),h=0,b=0;return m=void 0!==m?m:1e3,function(g){let v=Date.now(),_=p[b];u||(u=v),f[h]=g,p[h]=v;let y=b,F=0;for(;y!==h;)F+=f[y++],y%=d;if((h=(h+1)%d)===b&&(b=(b+1)%d),v-u<m)return;let x=_&&v-_;return x?Math.round(1e3*F/x):void 0}},tw=function(d,m){let u,f,p=0,h=1e3/m,b=(m,h=Date.now())=>{p=h,u=null,f&&(clearTimeout(f),f=null),d(...m)};return[(...d)=>{let m=Date.now(),g=m-p;g>=h?b(d,m):(u=d,f||(f=setTimeout(()=>{f=null,b(u)},h-g)))},()=>u&&b(u)]},tE=(d,m,u=3)=>{let f=0,p=tx(50,250);return tw(u=>{if(!u||"number"!=typeof u.loaded)return;let h=u.loaded,b=u.lengthComputable?u.total:void 0,g=null!=b?Math.min(h,b):h,v=Math.max(0,g-f),_=p(v);f=Math.max(f,g),d({loaded:g,total:b,progress:b?g/b:void 0,bytes:v,rate:_||void 0,estimated:_&&b?(b-g)/_:void 0,event:u,lengthComputable:null!=b,[m?"download":"upload"]:!0})},u)},tk=(d,m)=>{let u=null!=d;return[f=>m[0]({lengthComputable:u,total:d,loaded:f}),m[1]]},tC=d=>(...m)=>e$.asap(()=>d(...m)),tA=tf.hasStandardBrowserEnv?(b=new URL(tf.origin),g=tf.navigator&&/(msie|trident)/i.test(tf.navigator.userAgent),d=>(d=new URL(d,tf.origin),b.protocol===d.protocol&&b.host===d.host&&(g||b.port===d.port))):()=>!0,tT=tf.hasStandardBrowserEnv?{write(d,m,u,f,p,h,b){if("u"<typeof document)return;let g=[`${d}=${encodeURIComponent(m)}`];e$.isNumber(u)&&g.push(`expires=${new Date(u).toUTCString()}`),e$.isString(f)&&g.push(`path=${f}`),e$.isString(p)&&g.push(`domain=${p}`),!0===h&&g.push("secure"),e$.isString(b)&&g.push(`SameSite=${b}`),document.cookie=g.join("; ")},read(d){if("u"<typeof document)return null;let m=document.cookie.split(";");for(let u=0;u<m.length;u++){let f=m[u].replace(/^\s+/,""),p=f.indexOf("=");if(-1!==p&&f.slice(0,p)===d)try{return decodeURIComponent(f.slice(p+1))}catch(d){return f.slice(p+1)}}return null},remove(d){this.write(d,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}},tS=/^https?:(?!\/\/)/i,tI=/[\t\n\r]/g;function tO(d,m){if("string"==typeof d&&tS.test((function(d){let m=0;for(;m<d.length&&32>=d.charCodeAt(m);)m++;return d.slice(m)})(d).replace(tI,"")))throw new e2('Invalid URL: missing "//" after protocol',e2.ERR_INVALID_URL,m)}function tD(d,m,u,f){tO(m,f);let p=!("string"==typeof m&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(m));return d&&(p||!1===u)?(tO(d,f),m?d.replace(/\/?\/$/,"")+"/"+m.replace(/^\/+/,""):d):m}let tR=d=>d instanceof e0?{...d}:d;function tN(d,m){d=d||{},m=m||{};let u=Object.create(null);function f(d,m,u,f){return e$.isPlainObject(d)&&e$.isPlainObject(m)?e$.merge.call({caseless:f},d,m):e$.isPlainObject(m)?e$.merge({},m):e$.isArray(m)?m.slice():m}function p(d,m,u,p){return e$.isUndefined(m)?e$.isUndefined(d)?void 0:f(void 0,d,u,p):f(d,m,u,p)}function h(d,m){if(!e$.isUndefined(m))return f(void 0,m)}function b(d,m){return e$.isUndefined(m)?e$.isUndefined(d)?void 0:f(void 0,d):f(void 0,m)}function g(u,p,h){return e$.hasOwnProp(m,h)?f(u,p):e$.hasOwnProp(d,h)?f(void 0,u):void 0}Object.defineProperty(u,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});let v={url:h,method:h,data:h,baseURL:b,transformRequest:b,transformResponse:b,paramsSerializer:b,timeout:b,timeoutMessage:b,withCredentials:b,withXSRFToken:b,adapter:b,responseType:b,xsrfCookieName:b,xsrfHeaderName:b,onUploadProgress:b,onDownloadProgress:b,decompress:b,maxContentLength:b,maxBodyLength:b,beforeRedirect:b,transport:b,httpAgent:b,httpsAgent:b,cancelToken:b,socketPath:b,allowedSocketPaths:b,responseEncoding:b,validateStatus:g,headers:(d,m,u)=>p(tR(d),tR(m),u,!0)};return e$.forEach(Object.keys({...d,...m}),function(f){if("__proto__"===f||"constructor"===f||"prototype"===f)return;let h=e$.hasOwnProp(v,f)?v[f]:p,b=h(e$.hasOwnProp(d,f)?d[f]:void 0,e$.hasOwnProp(m,f)?m[f]:void 0,f);e$.isUndefined(b)&&h!==g||(u[f]=b)}),e$.hasOwnProp(m,"validateStatus")&&e$.isUndefined(m.validateStatus)&&!1===function(u){let f=e$.hasOwnProp(m,"transitional")?m.transitional:void 0;if(!e$.isUndefined(f)){if(!e$.isPlainObject(f))return;else if(e$.hasOwnProp(f,u))return f[u]}let p=e$.hasOwnProp(d,"transitional")?d.transitional:void 0;if(e$.isPlainObject(p)&&e$.hasOwnProp(p,u))return p[u]}("validateStatusUndefinedResolves")&&(e$.hasOwnProp(d,"validateStatus")?u.validateStatus=f(void 0,d.validateStatus):delete u.validateStatus),u}let tL=["content-type","content-length"],tB=function(d){let m=tN({},d),u=d=>e$.hasOwnProp(m,d)?m[d]:void 0,f=u("data"),p=u("withXSRFToken"),h=u("xsrfHeaderName"),b=u("xsrfCookieName"),g=u("headers"),v=u("auth"),_=u("baseURL"),y=u("allowAbsoluteUrls"),F=u("url");if(m.headers=g=e0.from(g),m.url=tn(tD(_,F,y,m),u("params"),u("paramsSerializer")),v){let m=e$.getSafeProp(v,"username")||"",u=e$.getSafeProp(v,"password")||"";try{g.set("Authorization","Basic "+btoa(m+":"+(u?encodeURIComponent(u).replace(/%([0-9A-F]{2})/gi,(d,m)=>String.fromCharCode(parseInt(m,16))):"")))}catch(m){throw e2.from(m,e2.ERR_BAD_OPTION_VALUE,d)}}if(e$.isFormData(f))if(tf.hasStandardBrowserEnv||tf.hasStandardBrowserWebWorkerEnv||e$.isReactNative(f))g.setContentType(void 0);else{var x,w;e$.isFunction(f.getHeaders)&&(x=g,w=f.getHeaders(),"content-only"!==u("formDataHeaderPolicy")?x.set(w):Object.entries(w||{}).forEach(([d,m])=>{tL.includes(d.toLowerCase())&&x.set(d,m)}))}if(tf.hasStandardBrowserEnv&&(e$.isFunction(p)&&(p=p(m)),!0===p||null==p&&tA(m.url))){let d=h&&b&&tT.read(b);d&&g.set(h,d)}return m},tP="u">typeof XMLHttpRequest&&function(d){return new Promise(function(m,u){var f;let p,h,b,g,v,_,y=tB(d),F=y.data,x=e0.from(y.headers).normalize(),{responseType:w,onUploadProgress:E,onDownloadProgress:k}=y;function C(){g&&g(),v&&v(),y.cancelToken&&y.cancelToken.unsubscribe(p),y.signal&&y.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;function T(){if(!A)return;let f=e0.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders());tF(function(d){m(d),C()},function(d){u(d),C()},{data:w&&"text"!==w&&"json"!==w?A.response:A.responseText,status:A.status,statusText:A.statusText,headers:f,config:d,request:A}),A=null}A.open(y.method.toUpperCase(),y.url,!0),A.timeout=y.timeout,"onloadend"in A?A.onloadend=T:A.onreadystatechange=function(){!A||4!==A.readyState||(0!==A.status||A.responseURL&&A.responseURL.startsWith("file:"))&&setTimeout(T)},A.onabort=function(){A&&(u(new e2("Request aborted",e2.ECONNABORTED,d,A)),C(),A=null)},A.onerror=function(m){let f=new e2(m&&m.message?m.message:"Network Error",e2.ERR_NETWORK,d,A);f.event=m||null,u(f),C(),A=null},A.ontimeout=function(){let m=y.timeout?"timeout of "+y.timeout+"ms exceeded":"timeout exceeded",f=y.transitional||to;y.timeoutErrorMessage&&(m=y.timeoutErrorMessage),u(new e2(m,f.clarifyTimeoutError?e2.ETIMEDOUT:e2.ECONNABORTED,d,A)),C(),A=null},void 0===F&&x.setContentType(null),"setRequestHeader"in A&&e$.forEach(eX(x),function(d,m){A.setRequestHeader(m,d)}),e$.isUndefined(y.withCredentials)||(A.withCredentials=!!y.withCredentials),w&&"json"!==w&&(A.responseType=y.responseType),k&&([b,v]=tE(k,!0),A.addEventListener("progress",b)),E&&A.upload&&([h,g]=tE(E),A.upload.addEventListener("progress",h),A.upload.addEventListener("loadend",g)),(y.cancelToken||y.signal)&&(p=m=>{A&&(u(!m||m.type?new ty(null,d,A):m),A.abort(),C(),A=null)},y.cancelToken&&y.cancelToken.subscribe(p),y.signal&&(y.signal.aborted?p():y.signal.addEventListener("abort",p)));let S=(f=y.url,(_=/^([-+\w]{1,25}):(?:\/\/)?/.exec(f))&&_[1]||"");if(S&&!tf.protocols.includes(S)){u(new e2("Unsupported protocol "+S+":",e2.ERR_BAD_REQUEST,d)),C();return}A.send(F||null)})},tM=function*(d,m){let u,f=d.byteLength;if(!m||f<m)return void(yield d);let p=0;for(;p<f;)u=p+m,yield d.slice(p,u),p=u},tz=async function*(d,m){for await(let u of tU(d))yield*tM(u,m)},tU=async function*(d){if(d[Symbol.asyncIterator])return void(yield*d);let m=d.getReader();try{for(;;){let{done:d,value:u}=await m.read();if(d)break;yield u}}finally{await m.cancel()}},tj=(d,m,u,f)=>{let p,h=tz(d,m),b=0,g=d=>{!p&&(p=!0,f&&f(d))};return new ReadableStream({async pull(d){try{let{done:m,value:f}=await h.next();if(m){g(),d.close();return}let p=f.byteLength;if(u){let d=b+=p;u(d)}d.enqueue(new Uint8Array(f))}catch(d){throw g(d),d}},cancel:d=>(g(d),h.return())},{highWaterMark:2})},tV=d=>d>=48&&d<=57||d>=65&&d<=70||d>=97&&d<=102,tH=(d,m,u)=>m+2<u&&tV(d.charCodeAt(m+1))&&tV(d.charCodeAt(m+2)),{isFunction:t$}=e$,tq=d=>{if(!e$.isString(d))return d;try{return decodeURIComponent(d)}catch(m){return d}},tG=(d,...m)=>{try{return!!d(...m)}catch(d){return!1}},tY=d=>{let m,u=void 0!==e$.global&&null!==e$.global?e$.global:globalThis,{ReadableStream:f,TextEncoder:p}=u,{fetch:h,Request:b,Response:g}=d=e$.merge.call({skipUndefined:!0},{Request:u.Request,Response:u.Response},d),v=h?t$(h):"function"==typeof fetch,_=t$(b),y=t$(g);if(!v)return!1;let F=v&&t$(f),x=v&&("function"==typeof p?(m=new p,d=>m.encode(d)):async d=>new Uint8Array(await new b(d).arrayBuffer())),w=_&&F&&tG(()=>{let d=!1,m=new b(tf.origin,{body:new f,method:"POST",get duplex(){return d=!0,"half"}}),u=m.headers.has("Content-Type");return null!=m.body&&m.body.cancel(),d&&!u}),E=y&&F&&tG(()=>e$.isReadableStream(new g("").body)),k={stream:E&&(d=>d.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{k[d]||(k[d]=(m,u)=>{let f=m&&m[d];if(f)return f.call(m);throw new e2(`Response type '${d}' is not supported`,e2.ERR_NOT_SUPPORT,u)})});let C=async d=>{if(null==d)return 0;if(e$.isBlob(d))return d.size;if(e$.isSpecCompliantForm(d)){let m=new b(tf.origin,{method:"POST",body:d});return(await m.arrayBuffer()).byteLength}return e$.isArrayBufferView(d)||e$.isArrayBuffer(d)?d.byteLength:(e$.isURLSearchParams(d)&&(d+=""),e$.isString(d))?(await x(d)).byteLength:void 0},A=async(d,m)=>{let u=e$.toFiniteNumber(d.getContentLength());return null==u?C(m):u};return async d=>{let m,{url:u,method:f,data:v,signal:y,cancelToken:x,timeout:T,onDownloadProgress:S,onUploadProgress:I,responseType:O,headers:D,withCredentials:R="same-origin",fetchOptions:N,maxContentLength:L,maxBodyLength:B}=tB(d),P=e$.isNumber(L)&&L>-1,M=e$.isNumber(B)&&B>-1,z=h||fetch;O=O?(O+"").toLowerCase():"text";let U=((d,m)=>{if(d=d?d.filter(Boolean):[],!m&&!d.length)return;let u=new AbortController,f=!1,p=function(d){if(!f){f=!0,b();let m=d instanceof Error?d:this.reason;u.abort(m instanceof e2?m:new ty(m instanceof Error?m.message:m))}},h=m&&setTimeout(()=>{h=null,p(new e2(`timeout of ${m}ms exceeded`,e2.ETIMEDOUT))},m),b=()=>{d&&(h&&clearTimeout(h),h=null,d.forEach(d=>{d.unsubscribe?d.unsubscribe(p):d.removeEventListener("abort",p)}),d=null)};d.forEach(d=>d.addEventListener("abort",p,{once:!0}));let{signal:g}=u;return g.unsubscribe=()=>e$.asap(b),g})([y,x&&x.toAbortSignal()],T),j=null,V=U&&U.unsubscribe&&(()=>{U.unsubscribe()}),H=null,$=()=>new e2("Request body larger than maxBodyLength limit",e2.ERR_BAD_REQUEST,d,j);try{var q;let h,y,x,T,G=(y="auth",e$.hasOwnProp(d,y)?d[y]:void 0);if(G){let d=e$.getSafeProp(G,"username")||"",m=e$.getSafeProp(G,"password")||"";h={username:d,password:m}}if(x=(q=u).indexOf("://"),T=q,-1!==x&&(T=T.slice(x+3)),T.includes("@")||T.includes(":")){let d=new URL(u,tf.origin);if(!h&&(d.username||d.password)){let m=tq(d.username),u=tq(d.password);h={username:m,password:u}}(d.username||d.password)&&(d.username="",d.password="",u=d.href)}if(h){let d;D.delete("authorization"),D.set("Authorization","Basic "+btoa((d=(h.username||"")+":"+(h.password||""),encodeURIComponent(d).replace(/%([0-9A-F]{2})/gi,(d,m)=>String.fromCharCode(parseInt(m,16))))))}if(P&&"string"==typeof u&&u.startsWith("data:")&&function(d){if(!d||"string"!=typeof d||!d.startsWith("data:"))return 0;let m=d.indexOf(",");if(m<0)return 0;let u=d.slice(5,m),f=d.slice(m+1);if(/;base64/i.test(u)){let d=f.length,m=f.length;for(let u=0;u<m;u++)if(37===f.charCodeAt(u)&&u+2<m){let m=f.charCodeAt(u+1),p=f.charCodeAt(u+2);tV(m)&&tV(p)&&(d-=2,u+=2)}let u=0,p=m-1,h=d=>d>=2&&37===f.charCodeAt(d-2)&&51===f.charCodeAt(d-1)&&(68===f.charCodeAt(d)||100===f.charCodeAt(d));p>=0&&(61===f.charCodeAt(p)?(u++,p--):h(p)&&(u++,p-=3)),1===u&&p>=0&&(61===f.charCodeAt(p)?u++:h(p)&&u++);let b=3*Math.floor(d/4)-(u||0);return b>0?b:0}let p=0;for(let d=0,m=f.length;d<m;d++){let u=f.charCodeAt(d);if(37===u&&tH(f,d,m))p+=1,d+=2;else if(u<128)p+=1;else if(u<2048)p+=2;else if(u>=55296&&u<=56319&&d+1<m){let m=f.charCodeAt(d+1);m>=56320&&m<=57343?(p+=4,d++):p+=3}else p+=3}return p}(u)>L)throw new e2("maxContentLength size of "+L+" exceeded",e2.ERR_BAD_RESPONSE,d,j);if(M&&"get"!==f&&"head"!==f){let d=await C(v);if("number"==typeof d&&isFinite(d)&&(m=d,d>B))throw $()}let Y=M&&(e$.isReadableStream(v)||e$.isStream(v)),W=(d,m,u)=>tj(d,65536,d=>{if(M&&d>B)throw H=$();m&&m(d)},u);if(w&&"get"!==f&&"head"!==f&&(I||Y)){if(m=null==m?await A(D,v):m,0!==m||Y){let d,f=new b(u,{method:"POST",body:v,duplex:"half"});if(e$.isFormData(v)&&(d=f.headers.get("content-type"))&&D.setContentType(d),f.body){let[d,u]=I&&tk(m,tE(tC(I)))||[];v=W(f.body,d,u)}}}else if(Y&&!_&&F&&"get"!==f&&"head"!==f)v=W(v);else if(Y&&_&&!w&&"get"!==f&&"head"!==f)throw new e2("Stream request bodies are not supported by the current fetch implementation",e2.ERR_NOT_SUPPORT,d,j);e$.isString(R)||(R=R?"include":"omit");let X=_&&"credentials"in b.prototype;if(e$.isFormData(v)){let d=D.getContentType();d&&/^multipart\/form-data/i.test(d)&&!/boundary=/i.test(d)&&D.delete("content-type")}D.set("User-Agent","axios/1.18.1",!1);let K={...N,signal:U,method:f.toUpperCase(),headers:eX(D.normalize()),body:v,duplex:"half",credentials:X?R:void 0};j=_&&new b(u,K);let J=await (_?z(j,N):z(u,K)),Z=e0.from(J.headers);if(P){let m=e$.toFiniteNumber(Z.getContentLength());if(null!=m&&m>L)throw new e2("maxContentLength size of "+L+" exceeded",e2.ERR_BAD_RESPONSE,d,j)}let Q=E&&("stream"===O||"response"===O);if(E&&J.body&&(S||P||Q&&V)){let m={};["status","statusText","headers"].forEach(d=>{m[d]=J[d]});let u=e$.toFiniteNumber(Z.getContentLength()),[f,p]=S&&tk(u,tE(tC(S),!0))||[],h=0;J=new g(tj(J.body,65536,m=>{if(P&&m>L)throw new e2("maxContentLength size of "+L+" exceeded",e2.ERR_BAD_RESPONSE,d,j);f&&f(m)},()=>{p&&p(),V&&V()}),m)}O=O||"text";let ee=await k[e$.findKey(k,O)||"text"](J,d);if(P&&!E&&!Q){let m;if(null!=ee&&("number"==typeof ee.byteLength?m=ee.byteLength:"number"==typeof ee.size?m=ee.size:"string"==typeof ee&&(m="function"==typeof p?new p().encode(ee).byteLength:ee.length)),"number"==typeof m&&m>L)throw new e2("maxContentLength size of "+L+" exceeded",e2.ERR_BAD_RESPONSE,d,j)}return!Q&&V&&V(),await new Promise((m,u)=>{tF(m,u,{data:ee,headers:e0.from(J.headers),status:J.status,statusText:J.statusText,config:d,request:j})})}catch(m){if(V&&V(),U&&U.aborted&&U.reason instanceof e2){let u=U.reason;throw u.config=d,j&&(u.request=j),m!==u&&Object.defineProperty(u,"cause",{__proto__:null,value:m,writable:!0,enumerable:!1,configurable:!0}),u}if(H)throw j&&!H.request&&(H.request=j),H;if(m instanceof e2)throw j&&!m.request&&(m.request=j),m;if(m&&"TypeError"===m.name&&/Load failed|fetch/i.test(m.message)){let u=new e2("Network Error",e2.ERR_NETWORK,d,j,m&&m.response);throw Object.defineProperty(u,"cause",{__proto__:null,value:m.cause||m,writable:!0,enumerable:!1,configurable:!0}),u}throw e2.from(m,m&&m.code,d,j,m&&m.response)}}},tW=new Map,tX=d=>{let m=d&&d.env||{},{fetch:u,Request:f,Response:p}=m,h=[f,p,u],b=h.length,g,v,_=tW;for(;b--;)g=h[b],void 0===(v=_.get(g))&&_.set(g,v=b?new Map:tY(m)),_=v;return v};tX();let tK={http:null,xhr:tP,fetch:{get:tX}};e$.forEach(tK,(d,m)=>{if(d){try{Object.defineProperty(d,"name",{__proto__:null,value:m})}catch(d){}Object.defineProperty(d,"adapterName",{__proto__:null,value:m})}});let tJ=d=>`- ${d}`,tZ=d=>e$.isFunction(d)||null===d||!1===d,tQ=function(d,m){let u,f,{length:p}=d=e$.isArray(d)?d:[d],h={};for(let b=0;b<p;b++){let p;if(f=u=d[b],!tZ(u)&&void 0===(f=tK[(p=String(u)).toLowerCase()]))throw new e2(`Unknown adapter '${p}'`);if(f&&(e$.isFunction(f)||(f=f.get(m))))break;h[p||"#"+b]=f}if(!f){let d=Object.entries(h).map(([d,m])=>`adapter ${d} `+(!1===m?"is not supported by the environment":"is not available in the build"));throw new e2("There is no suitable adapter to dispatch the request "+(p?d.length>1?"since :\n"+d.map(tJ).join("\n"):" "+tJ(d[0]):"as no adapter specified"),e2.ERR_NOT_SUPPORT)}return f};function t0(d){if(d.cancelToken&&d.cancelToken.throwIfRequested(),d.signal&&d.signal.aborted)throw new ty(null,d)}function t1(d){return t0(d),d.headers=e0.from(d.headers),d.data=tv.call(d,d.transformRequest),-1!==["post","put","patch"].indexOf(d.method)&&d.headers.setContentType("application/x-www-form-urlencoded",!1),tQ(d.adapter||tg.adapter,d)(d).then(function(m){t0(d),d.response=m;try{m.data=tv.call(d,d.transformResponse,m)}finally{delete d.response}return m.headers=e0.from(m.headers),m},function(m){if(!t_(m)&&(t0(d),m&&m.response)){d.response=m.response;try{m.response.data=tv.call(d,d.transformResponse,m.response)}finally{delete d.response}m.response.headers=e0.from(m.response.headers)}return Promise.reject(m)})}let t2={};["object","boolean","number","function","string","symbol"].forEach((d,m)=>{t2[d]=function(u){return typeof u===d||"a"+(m<1?"n ":" ")+d}});let t5={};t2.transitional=function(d,m,u){function f(d,m){return"[Axios v1.18.1] Transitional option '"+d+"'"+m+(u?". "+u:"")}return(u,p,h)=>{if(!1===d)throw new e2(f(p," has been removed"+(m?" in "+m:"")),e2.ERR_DEPRECATED);return m&&!t5[p]&&(t5[p]=!0,console.warn(f(p," has been deprecated since v"+m+" and will be removed in the near future"))),!d||d(u,p,h)}},t2.spelling=function(d){return(m,u)=>(console.warn(`${u} is likely a misspelling of ${d}`),!0)};let t4=function(d,m,u){if("object"!=typeof d||null===d)throw new e2("options must be an object",e2.ERR_BAD_OPTION_VALUE);let f=Object.keys(d),p=f.length;for(;p-- >0;){let h=f[p],b=Object.prototype.hasOwnProperty.call(m,h)?m[h]:void 0;if(b){let m=d[h],u=void 0===m||b(m,h,d);if(!0!==u)throw new e2("option "+h+" must be "+u,e2.ERR_BAD_OPTION_VALUE);continue}if(!0!==u)throw new e2("Unknown option "+h,e2.ERR_BAD_OPTION)}};class t3{constructor(d){this.defaults=d||{},this.interceptors={request:new ti,response:new ti}}async request(d,m){try{return await this._request(d,m)}catch(d){if(d instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=Error();let u=(()=>{if(!m.stack)return"";let d=m.stack.indexOf("\n");return -1===d?"":m.stack.slice(d+1)})();try{if(d.stack){if(u){let m=u.indexOf("\n"),f=-1===m?-1:u.indexOf("\n",m+1),p=-1===f?"":u.slice(f+1);String(d.stack).endsWith(p)||(d.stack+="\n"+u)}}else d.stack=u}catch(d){}}throw d}}_request(d,m){let u,f;"string"==typeof d?(m=m||{}).url=d:m=d||{};let{transitional:p,paramsSerializer:h,headers:b}=m=tN(this.defaults,m);void 0!==p&&t4(p,{silentJSONParsing:t2.transitional(t2.boolean),forcedJSONParsing:t2.transitional(t2.boolean),clarifyTimeoutError:t2.transitional(t2.boolean),legacyInterceptorReqResOrdering:t2.transitional(t2.boolean),advertiseZstdAcceptEncoding:t2.transitional(t2.boolean),validateStatusUndefinedResolves:t2.transitional(t2.boolean)},!1),null!=h&&(e$.isFunction(h)?m.paramsSerializer={serialize:h}:t4(h,{encode:t2.function,serialize:t2.function},!0)),void 0!==m.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?m.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:m.allowAbsoluteUrls=!0),t4(m,{baseUrl:t2.spelling("baseURL"),withXsrfToken:t2.spelling("withXSRFToken")},!0),m.method=(m.method||this.defaults.method||"get").toLowerCase();let g=b&&e$.merge(b.common,b[m.method]);b&&e$.forEach(["delete","get","head","post","put","patch","query","common"],d=>{delete b[d]}),m.headers=e0.concat(g,b);let v=[],_=!0;this.interceptors.request.forEach(function(d){if("function"==typeof d.runWhen&&!1===d.runWhen(m))return;_=_&&d.synchronous;let u=m.transitional||to;u&&u.legacyInterceptorReqResOrdering?v.unshift(d.fulfilled,d.rejected):v.push(d.fulfilled,d.rejected)});let y=[];this.interceptors.response.forEach(function(d){y.push(d.fulfilled,d.rejected)});let F=0;if(!_){let d=[t1.bind(this),void 0];for(d.unshift(...v),d.push(...y),f=d.length,u=Promise.resolve(m);F<f;)u=u.then(d[F++],d[F++]);return u}f=v.length;let x=m;for(;F<f;){let d=v[F++],m=v[F++];try{x=d(x)}catch(d){m.call(this,d);break}}try{u=t1.call(this,x)}catch(d){return Promise.reject(d)}for(F=0,f=y.length;F<f;)u=u.then(y[F++],y[F++]);return u}getUri(d){return tn(tD((d=tN(this.defaults,d)).baseURL,d.url,d.allowAbsoluteUrls,d),d.params,d.paramsSerializer)}}e$.forEach(["delete","get","head","options"],function(d){t3.prototype[d]=function(m,u){return this.request(tN(u||{},{method:d,url:m,data:u&&e$.hasOwnProp(u,"data")?u.data:void 0}))}}),e$.forEach(["post","put","patch","query"],function(d){function m(m){return function(u,f,p){return this.request(tN(p||{},{method:d,headers:m?{"Content-Type":"multipart/form-data"}:{},url:u,data:f}))}}t3.prototype[d]=m(),"query"!==d&&(t3.prototype[d+"Form"]=m(!0))});let t6=class d{constructor(d){let m;if("function"!=typeof d)throw TypeError("executor must be a function.");this.promise=new Promise(function(d){m=d});const u=this;this.promise.then(d=>{if(!u._listeners)return;let m=u._listeners.length;for(;m-- >0;)u._listeners[m](d);u._listeners=null}),this.promise.then=d=>{let m,f=new Promise(d=>{u.subscribe(d),m=d}).then(d);return f.cancel=function(){u.unsubscribe(m)},f},d(function(d,f,p){u.reason||(u.reason=new ty(d,f,p),m(u.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){this.reason?d(this.reason):this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;let m=this._listeners.indexOf(d);-1!==m&&this._listeners.splice(m,1)}toAbortSignal(){let d=new AbortController,m=m=>{d.abort(m)};return this.subscribe(m),d.signal.unsubscribe=()=>this.unsubscribe(m),d.signal}static source(){let m;return{token:new d(function(d){m=d}),cancel:m}}},t8={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(t8).forEach(([d,m])=>{t8[m]=d});let t7=function d(m){let u=new t3(m),f=et(t3.prototype.request,u);return e$.extend(f,t3.prototype,u,{allOwnKeys:!0}),e$.extend(f,u,null,{allOwnKeys:!0}),f.create=function(u){return d(tN(m,u))},f}(tg);t7.Axios=t3,t7.CanceledError=ty,t7.CancelToken=t6,t7.isCancel=t_,t7.VERSION="1.18.1",t7.toFormData=e8,t7.AxiosError=e2,t7.Cancel=t7.CanceledError,t7.all=function(d){return Promise.all(d)},t7.spread=function(d){return function(m){return d.apply(null,m)}},t7.isAxiosError=function(d){return e$.isObject(d)&&!0===d.isAxiosError},t7.mergeConfig=tN,t7.AxiosHeaders=e0,t7.formToJSON=d=>th(e$.isHTMLForm(d)?new FormData(d):d),t7.getAdapter=tQ,t7.HttpStatusCode=t8,t7.default=t7;class t9{constructor(d){this.httpClient=d}getHealthStatus(d){return this.httpClient.request({method:"GET",url:nF`health`,options:d})}getInfo(d){return this.httpClient.request({method:"GET",url:nF`info`,options:d})}}class ne{constructor(d){this.httpClient=d}create(d,m){return this.httpClient.request({method:"POST",url:nF`dashboard`,data:d,options:m})}update(d,m){return this.httpClient.request({method:"PUT",url:nF`dashboard`,data:d,options:m})}getAllRealmDashboards(d,m){return this.httpClient.request({method:"GET",url:nF`dashboard/all/${d}`,options:m})}query(d,m){return this.httpClient.request({method:"POST",url:nF`dashboard/query`,data:d,options:m})}delete(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`dashboard/${d}/${m}`,options:u})}get(d,m,u){return this.httpClient.request({method:"GET",url:nF`dashboard/${d}/${m}`,options:u})}}class nt{constructor(d){this.httpClient=d}create(d,m){return this.httpClient.request({method:"POST",url:nF`realm`,data:d,options:m})}getAll(d){return this.httpClient.request({method:"GET",url:nF`realm`,options:d})}getAccessible(d){return this.httpClient.request({method:"GET",url:nF`realm/accessible`,options:d})}delete(d,m){return this.httpClient.request({method:"DELETE",url:nF`realm/${d}`,options:m})}get(d,m){return this.httpClient.request({method:"GET",url:nF`realm/${d}`,options:m})}update(d,m,u){return this.httpClient.request({method:"PUT",url:nF`realm/${d}`,data:m,options:u})}}class nn{constructor(d){this.httpClient=d}register(d,m){return this.httpClient.request({method:"POST",url:nF`console/register`,data:d,options:m})}}class ni{constructor(d){this.httpClient=d}getServices(d,m){return this.httpClient.request({method:"GET",url:nF`service`,queryParams:d,options:m})}registerService(d,m){return this.httpClient.request({method:"POST",url:nF`service`,data:d,options:m})}getGlobalServices(d){return this.httpClient.request({method:"GET",url:nF`service/global`,options:d})}registerGlobalService(d,m){return this.httpClient.request({method:"POST",url:nF`service/global`,data:d,options:m})}deregisterService(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`service/${d}/${m}`,options:u})}getService(d,m,u){return this.httpClient.request({method:"GET",url:nF`service/${d}/${m}`,options:u})}heartbeat(d,m,u){return this.httpClient.request({method:"PUT",url:nF`service/${d}/${m}`,options:u})}}class no{constructor(d){this.httpClient=d}getPredictedDatapoints(d,m,u,f){return this.httpClient.request({method:"POST",url:nF`asset/predicted/${d}/${m}`,data:u,options:f})}writePredictedDatapoints(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`asset/predicted/${d}/${m}`,data:u,options:f})}}class nr{constructor(d){this.httpClient=d}getConfig(d){return this.httpClient.request({method:"GET",url:nF`syslog/config`,options:d})}updateConfig(d,m){return this.httpClient.request({method:"PUT",url:nF`syslog/config`,data:d,options:m})}clearEvents(d){return this.httpClient.request({method:"DELETE",url:nF`syslog/event`,options:d})}getEvents(d,m){return this.httpClient.request({method:"GET",url:nF`syslog/event`,queryParams:d,options:m})}}class na{constructor(d){this.httpClient=d}getManagerConfig(d){return this.httpClient.request({method:"GET",url:nF`configuration/manager`,options:d})}update(d,m){return this.httpClient.request({method:"PUT",url:nF`configuration/manager`,data:d,options:m})}fileUpload(d,m,u){return this.httpClient.request({method:"POST",url:nF`configuration/manager/file`,queryParams:m,data:d,options:u})}getManagerConfigImage(d,m){return this.httpClient.request({method:"GET",url:nF`configuration/manager/image/${d}`,options:m})}}class ns{constructor(d){this.httpClient=d}getDatapointExport(d,m){return this.httpClient.request({method:"GET",url:nF`asset/datapoint/export`,queryParams:d,options:m})}getDatapointPeriod(d,m){return this.httpClient.request({method:"GET",url:nF`asset/datapoint/periods`,queryParams:d,options:m})}getDatapoints(d,m,u,f){return this.httpClient.request({method:"POST",url:nF`asset/datapoint/${d}/${m}`,data:u,options:f})}}class nc{constructor(d){this.httpClient=d}doProtocolAssetDiscovery(d,m,u){return this.httpClient.request({method:"GET",url:nF`agent/assetDiscovery/${d}`,queryParams:m,options:u})}doProtocolAssetImport(d,m,u,f){return this.httpClient.request({method:"POST",url:nF`agent/assetImport/${d}`,queryParams:u,data:m,options:f})}doProtocolInstanceDiscovery(d,m,u){return this.httpClient.request({method:"GET",url:nF`agent/instanceDiscovery/${d}`,queryParams:m,options:u})}}class nl{constructor(d){this.httpClient=d}updateCurrentUserLocale(d,m){return this.httpClient.request({method:"PUT",url:nF`user/locale`,data:d,options:m})}query(d,m){return this.httpClient.request({method:"POST",url:nF`user/query`,data:d,options:m})}requestPasswordResetCurrent(d){return this.httpClient.request({method:"PUT",url:nF`user/request-password-reset`,options:d})}updatePasswordCurrent(d,m){return this.httpClient.request({method:"PUT",url:nF`user/reset-password`,data:d,options:m})}updateCurrent(d,m){return this.httpClient.request({method:"PUT",url:nF`user/update`,data:d,options:m})}getCurrent(d){return this.httpClient.request({method:"GET",url:nF`user/user`,options:d})}getCurrentUserRealmRoles(d){return this.httpClient.request({method:"GET",url:nF`user/userRealmRoles`,options:d})}getCurrentUserClientRoles(d,m){return this.httpClient.request({method:"GET",url:nF`user/userRoles/${d}`,options:m})}disconnectUserSession(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`user/${d}/disconnect/${m}`,options:u})}requestPasswordReset(d,m,u){return this.httpClient.request({method:"PUT",url:nF`user/${d}/request-password-reset/${m}`,options:u})}updatePassword(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`user/${d}/reset-password/${m}`,data:u,options:f})}resetSecret(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/reset-secret/${m}`,options:u})}updateRoles(d,m,u){return this.httpClient.request({method:"PUT",url:nF`user/${d}/roles`,data:m,options:u})}getUserRealmRoles(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/userRealmRoles/${m}`,options:u})}updateUserRealmRoles(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`user/${d}/userRealmRoles/${m}`,data:u,options:f})}getUserClientRoles(d,m,u,f){return this.httpClient.request({method:"GET",url:nF`user/${d}/userRoles/${m}/${u}`,options:f})}updateUserClientRoles(d,m,u,f,p){return this.httpClient.request({method:"PUT",url:nF`user/${d}/userRoles/${m}/${u}`,data:f,options:p})}getUserSessions(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/userSessions/${m}`,options:u})}create(d,m,u){return this.httpClient.request({method:"POST",url:nF`user/${d}/users`,data:m,options:u})}update(d,m,u){return this.httpClient.request({method:"PUT",url:nF`user/${d}/users`,data:m,options:u})}delete(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`user/${d}/users/${m}`,options:u})}getClientRoles(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/${m}/roles`,options:u})}updateClientRoles(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`user/${d}/${m}/roles`,data:u,options:f})}get(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/${m}`,options:u})}}class nd{constructor(d){this.httpClient=d}getSettings(d){return this.httpClient.request({method:"GET",url:nF`map`,options:d})}saveSettings(d,m){return this.httpClient.request({method:"PUT",url:nF`map`,data:d,options:m})}deleteMap(d){return this.httpClient.request({method:"DELETE",url:nF`map/deleteMap`,options:d})}getCustomMapInfo(d){return this.httpClient.request({method:"GET",url:nF`map/getCustomMapInfo`,options:d})}getTile(d,m,u,f){return this.httpClient.request({method:"GET",url:nF`map/tile/${d}/${m}/${u}`,options:f})}uploadMap(d,m){return this.httpClient.request({method:"POST",url:nF`map/upload`,queryParams:d,options:m})}}class nm{constructor(d){this.httpClient=d}createProvisioningConfig(d,m){return this.httpClient.request({method:"POST",url:nF`provisioning`,data:d,options:m})}getProvisioningConfigs(d){return this.httpClient.request({method:"GET",url:nF`provisioning`,options:d})}deleteProvisioningConfig(d,m){return this.httpClient.request({method:"DELETE",url:nF`provisioning/${d}`,options:m})}updateProvisioningConfig(d,m,u){return this.httpClient.request({method:"PUT",url:nF`provisioning/${d}`,data:m,options:u})}}class nu{constructor(d){this.httpClient=d}getAllNodeDefinitions(d){return this.httpClient.request({method:"GET",url:nF`flow`,options:d})}getNodeDefinition(d,m){return this.httpClient.request({method:"GET",url:nF`flow/${d}`,options:m})}getAllNodeDefinitionsByType(d,m){return this.httpClient.request({method:"GET",url:nF`flow/${d}`,options:m})}}class nf{constructor(d){this.httpClient=d}startTunnel(d,m){return this.httpClient.request({method:"POST",url:nF`gateway/tunnel`,data:d,options:m})}stopTunnel(d,m){return this.httpClient.request({method:"DELETE",url:nF`gateway/tunnel`,data:d,options:m})}getAllActiveTunnelInfos(d,m){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${d}`,options:m})}getGatewayActiveTunnelInfos(d,m,u){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${d}/${m}`,options:u})}getActiveTunnelInfo(d,m,u,f,p){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${d}/${m}/${u}/${f}`,options:p})}}class np{constructor(d){this.httpClient=d}createGlobalRuleset(d,m){return this.httpClient.request({method:"POST",url:nF`rules`,data:d,options:m})}getGlobalRulesets(d,m){return this.httpClient.request({method:"GET",url:nF`rules`,queryParams:d,options:m})}createAssetRuleset(d,m){return this.httpClient.request({method:"POST",url:nF`rules/asset`,data:d,options:m})}getAssetRulesets(d,m,u){return this.httpClient.request({method:"GET",url:nF`rules/asset/for/${d}`,queryParams:m,options:u})}deleteAssetRuleset(d,m){return this.httpClient.request({method:"DELETE",url:nF`rules/asset/${d}`,options:m})}getAssetRuleset(d,m){return this.httpClient.request({method:"GET",url:nF`rules/asset/${d}`,options:m})}updateAssetRuleset(d,m,u){return this.httpClient.request({method:"PUT",url:nF`rules/asset/${d}`,data:m,options:u})}getAssetGeofences(d,m){return this.httpClient.request({method:"GET",url:nF`rules/geofences/${d}`,options:m})}getAssetEngineInfo(d,m){return this.httpClient.request({method:"GET",url:nF`rules/info/asset/${d}`,options:m})}getGlobalEngineInfo(d){return this.httpClient.request({method:"GET",url:nF`rules/info/global`,options:d})}getRealmEngineInfo(d,m){return this.httpClient.request({method:"GET",url:nF`rules/info/realm/${d}`,options:m})}createRealmRuleset(d,m){return this.httpClient.request({method:"POST",url:nF`rules/realm`,data:d,options:m})}getRealmRulesets(d,m,u){return this.httpClient.request({method:"GET",url:nF`rules/realm/for/${d}`,queryParams:m,options:u})}deleteRealmRuleset(d,m){return this.httpClient.request({method:"DELETE",url:nF`rules/realm/${d}`,options:m})}getRealmRuleset(d,m){return this.httpClient.request({method:"GET",url:nF`rules/realm/${d}`,options:m})}updateRealmRuleset(d,m,u){return this.httpClient.request({method:"PUT",url:nF`rules/realm/${d}`,data:m,options:u})}deleteGlobalRuleset(d,m){return this.httpClient.request({method:"DELETE",url:nF`rules/${d}`,options:m})}getGlobalRuleset(d,m){return this.httpClient.request({method:"GET",url:nF`rules/${d}`,options:m})}updateGlobalRuleset(d,m,u){return this.httpClient.request({method:"PUT",url:nF`rules/${d}`,data:m,options:u})}}class nh{constructor(d){this.httpClient=d}getNotifications(d,m){return this.httpClient.request({method:"GET",url:nF`notification`,queryParams:d,options:m})}removeNotifications(d,m){return this.httpClient.request({method:"DELETE",url:nF`notification`,queryParams:d,options:m})}sendNotification(d,m){return this.httpClient.request({method:"POST",url:nF`notification/alert`,data:d,options:m})}getNotificationsCount(d,m){return this.httpClient.request({method:"GET",url:nF`notification/count`,queryParams:d,options:m})}removeNotification(d,m){return this.httpClient.request({method:"DELETE",url:nF`notification/${d}`,options:m})}notificationAcknowledged(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`notification/${d}/acknowledged`,queryParams:u,data:m,options:f})}notificationDelivered(d,m,u){return this.httpClient.request({method:"PUT",url:nF`notification/${d}/delivered`,queryParams:m,options:u})}}class nb{constructor(d){this.httpClient=d}getAssetDescriptors(d,m){return this.httpClient.request({method:"GET",url:nF`model/assetDescriptors`,queryParams:d,options:m})}getAssetInfo(d,m,u){return this.httpClient.request({method:"GET",url:nF`model/assetInfo/${d}`,queryParams:m,options:u})}getAssetInfos(d,m){return this.httpClient.request({method:"GET",url:nF`model/assetInfos`,queryParams:d,options:m})}getValueDescriptorSchema(d,m){return this.httpClient.request({method:"GET",url:nF`model/getValueDescriptorSchema`,queryParams:d,options:m})}getMetaItemDescriptors(d,m){return this.httpClient.request({method:"GET",url:nF`model/metaItemDescriptors`,queryParams:d,options:m})}getValueDescriptors(d,m){return this.httpClient.request({method:"GET",url:nF`model/valueDescriptors`,queryParams:d,options:m})}}class ng{constructor(d){this.httpClient=d}create(d,m){return this.httpClient.request({method:"POST",url:nF`asset`,data:d,options:m})}delete(d,m){return this.httpClient.request({method:"DELETE",url:nF`asset`,queryParams:d,options:m})}writeAttributeValues(d,m){return this.httpClient.request({method:"PUT",url:nF`asset/attributes`,data:d,options:m})}writeAttributeEvents(d,m){return this.httpClient.request({method:"PUT",url:nF`asset/attributes/timestamp`,data:d,options:m})}queryCount(d,m){return this.httpClient.request({method:"POST",url:nF`asset/count`,data:d,options:m})}updateNoneParent(d,m){return this.httpClient.request({method:"DELETE",url:nF`asset/parent`,queryParams:d,options:m})}getPartial(d,m){return this.httpClient.request({method:"GET",url:nF`asset/partial/${d}`,options:m})}queryAssets(d,m){return this.httpClient.request({method:"POST",url:nF`asset/query`,data:d,options:m})}queryAssetTree(d,m){return this.httpClient.request({method:"POST",url:nF`asset/tree`,data:d,options:m})}getCurrentUserAssets(d){return this.httpClient.request({method:"GET",url:nF`asset/user/current`,options:d})}createUserAssetLinks(d,m){return this.httpClient.request({method:"POST",url:nF`asset/user/link`,data:d,options:m})}getUserAssetLinks(d,m){return this.httpClient.request({method:"GET",url:nF`asset/user/link`,queryParams:d,options:m})}deleteUserAssetLinks(d,m){return this.httpClient.request({method:"POST",url:nF`asset/user/link/delete`,data:d,options:m})}deleteAllUserAssetLinks(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`asset/user/link/${d}/${m}`,options:u})}deleteUserAssetLink(d,m,u,f){return this.httpClient.request({method:"DELETE",url:nF`asset/user/link/${d}/${m}/${u}`,options:f})}get(d,m){return this.httpClient.request({method:"GET",url:nF`asset/${d}`,options:m})}update(d,m,u){return this.httpClient.request({method:"PUT",url:nF`asset/${d}`,data:m,options:u})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`asset/${d}/attribute/${m}`,data:u,options:f})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(d,m,u,f,p){return this.httpClient.request({method:"PUT",url:nF`asset/${d}/attribute/${m}/${u}`,data:f,options:p})}updateParent(d,m,u){return this.httpClient.request({method:"PUT",url:nF`asset/${d}/child`,queryParams:m,options:u})}}class nv{constructor(d){this.httpClient=d}createAlarm(d,m,u){return this.httpClient.request({method:"POST",url:nF`alarm`,queryParams:m,data:d,options:u})}getAlarms(d,m){return this.httpClient.request({method:"GET",url:nF`alarm`,queryParams:d,options:m})}removeAlarms(d,m){return this.httpClient.request({method:"DELETE",url:nF`alarm`,data:d,options:m})}setAssetLinks(d,m){return this.httpClient.request({method:"PUT",url:nF`alarm/assets`,data:d,options:m})}getAlarm(d,m){return this.httpClient.request({method:"GET",url:nF`alarm/${d}`,options:m})}removeAlarm(d,m){return this.httpClient.request({method:"DELETE",url:nF`alarm/${d}`,options:m})}updateAlarm(d,m,u){return this.httpClient.request({method:"PUT",url:nF`alarm/${d}`,data:m,options:u})}getAssetLinks(d,m,u){return this.httpClient.request({method:"GET",url:nF`alarm/${d}/assets`,queryParams:m,options:u})}}class n_{constructor(d){this.httpClient=d}deleteConnections(d,m){return this.httpClient.request({method:"DELETE",url:nF`gateway/connection`,queryParams:d,options:m})}getConnections(d){return this.httpClient.request({method:"GET",url:nF`gateway/connection`,options:d})}deleteConnection(d,m){return this.httpClient.request({method:"DELETE",url:nF`gateway/connection/${d}`,options:m})}getConnection(d,m){return this.httpClient.request({method:"GET",url:nF`gateway/connection/${d}`,options:m})}setConnection(d,m,u){return this.httpClient.request({method:"PUT",url:nF`gateway/connection/${d}`,data:m,options:u})}getConnectionStatus(d,m){return this.httpClient.request({method:"GET",url:nF`gateway/status/${d}`,options:m})}}class ny{constructor(d){this.httpClient=d}getApps(d){return this.httpClient.request({method:"GET",url:nF`apps`,options:d})}getConsoleConfig(d){return this.httpClient.request({method:"GET",url:nF`apps/consoleConfig`,options:d})}getAppInfos(d){return this.httpClient.request({method:"GET",url:nF`apps/info`,options:d})}}function nF(d,...m){let u="";for(let f=0;f<m.length;f++)u+=d[f],u+=encodeURIComponent(m[f]);return u+d[d.length-1]}class nx{constructor(d,m=t7.create()){this._statusResource=new nE(d,m),this._dashboardResource=new nk(d,m),this._realmResource=new nC(d,m),this._consoleResource=new nA(d,m),this._externalServiceResource=new nT(d,m),this._assetPredictedDatapointResource=new nS(d,m),this._syslogResource=new nI(d,m),this._configurationResource=new nO(d,m),this._assetDatapointResource=new nD(d,m),this._agentResource=new nR(d,m),this._userResource=new nN(d,m),this._mapResource=new nL(d,m),this._provisioningResource=new nB(d,m),this._flowResource=new nP(d,m),this._gatewayServiceResource=new nM(d,m),this._rulesResource=new nz(d,m),this._notificationResource=new nU(d,m),this._assetModelResource=new nj(d,m),this._assetResource=new nV(d,m),this._alarmResource=new nH(d,m),this._gatewayClientResource=new n$(d,m),this._appResource=new nq(d,m),this._assetResource=new nV(d,m)}get StatusResource(){return this._statusResource}get DashboardResource(){return this._dashboardResource}get RealmResource(){return this._realmResource}get ConsoleResource(){return this._consoleResource}get ExternalServiceResource(){return this._externalServiceResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get SyslogResource(){return this._syslogResource}get ConfigurationResource(){return this._configurationResource}get AssetDatapointResource(){return this._assetDatapointResource}get AgentResource(){return this._agentResource}get UserResource(){return this._userResource}get MapResource(){return this._mapResource}get ProvisioningResource(){return this._provisioningResource}get FlowResource(){return this._flowResource}get GatewayServiceResource(){return this._gatewayServiceResource}get RulesResource(){return this._rulesResource}get NotificationResource(){return this._notificationResource}get AssetModelResource(){return this._assetModelResource}get AssetResource(){return this._assetResource}get AlarmResource(){return this._alarmResource}get GatewayClientResource(){return this._gatewayClientResource}get AppResource(){return this._appResource}}class nw{constructor(d){this.axios=d}request(d){let m={};m.method=d.method,m.url=d.url,m.params=d.queryParams,m.data=d.data,function(d,m){if(void 0!=m)for(let u in m)m.hasOwnProperty(u)&&(d[u]=m[u])}(m,d.options);let u=d.copyFn;return this.axios.request(m).then(d=>(u&&d.data&&(d.originalData=d.data,d.data=u(d.data)),d))}}class nE extends t9{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nk extends ne{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nC extends nt{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nA extends nn{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nT extends ni{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nS extends no{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nI extends nr{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nO extends na{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nD extends ns{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nR extends nc{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nN extends nl{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nL extends nd{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nB extends nm{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nP extends nu{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nM extends nf{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nz extends np{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nU extends nh{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nj extends nb{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nV extends ng{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nH extends nv{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class n$ extends n_{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nq extends ny{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}var nG=u(8183),nY=u.n(nG);t7.isAxiosError;let nW=new class{get api(){return this._client}constructor(){this._axiosInstance=t7.create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(d=>(d.paramsSerializer=d=>nY().stringify(d,{arrayFormat:"repeat"}),d))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(d){this._axiosInstance.defaults.timeout=d}addRequestInterceptor(d){this._axiosInstance.interceptors.request.use(d)}initialise(d){this._baseUrl=d,this._client=new nx(d,this._axiosInstance)}};var nX=function(d,m,u,f){return new(u||(u=Promise))(function(p,h){function b(d){try{v(f.next(d))}catch(d){h(d)}}function g(d){try{v(f.throw(d))}catch(d){h(d)}}function v(d){var m;d.done?p(d.value):((m=d.value)instanceof u?m:new u(function(d){d(m)})).then(b,g)}v((f=f.apply(d,m||[])).next())})};(x=k||(k={})).DISCONNECTED="DISCONNECTED",x.CONNECTED="CONNECTED",x.CONNECTING="CONNECTING";let nK="SUBSCRIBED:",nJ="UNAUTHORIZED:",nZ="TRIGGERED:",nQ="EVENT:";class n0{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=n1.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=k.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(d){this._statusCallbacks.push(d)}unsubscribeStatusChange(d){B(this._statusCallbacks,d)}connect(){return(console.debug("Attempting to connect to events:",this.endpointUrl),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===k.CONNECTED)?(console.debug("Already connected to events!"),Promise.resolve(!0)):((this._disconnectRequested=!1,this._connectingDeferred)?console.warn("Already connecting to events, continuing the previous one."):(this._onStatusChanged(k.CONNECTING),this._connectingDeferred=new N,this._doConnect().then(d=>{if(this._connectingDeferred){let m=this._connectingDeferred;d?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=n1.MIN_RECONNECT_DELAY,this._onStatusChanged(k.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):console.debug("Failed to connect to event service: "+this.endpointUrl),m.resolve(d)}}).finally(()=>{this._connectingDeferred=null})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==k.DISCONNECTED&&this._doDisconnect())}subscribe(d,m){let u={eventSubscription:d,callback:m,deferred:new N};return null!=this._pendingSubscription||this._status!==k.CONNECTED?(this._queuedSubscriptions.push(u),u.deferred.promise):(this._pendingSubscription=u,this._doSubscribe(d).then(d=>{if(this._pendingSubscription){let m=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(d,m),this._processNextSubscription();let u=m.deferred;m.deferred=null,u&&u.resolve(d)}},d=>{if(console.error(d),this._pendingSubscription){let m=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let u=m.deferred;m.deferred=null,u&&u.reject(d)}}),this._pendingSubscription.deferred.promise)}unsubscribe(d){return nX(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(d))return void this._doUnsubscribe(d);if(this._assetEventCallbackMap.delete(d)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let d=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(d)}return}if(this._attributeEventCallbackMap.delete(d)&&this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let d=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(d)}})}sendEvent(d){this._status===k.CONNECTED&&this._doSend(d)}sendEventWithReply(d){return this._status!==k.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(d)}subscribeAssetEvents(d,m,u){return nX(this,void 0,void 0,function*(){let f=d&&"string"!=typeof d[0]?d.map(d=>d.id):d,p="AssetEvent"+n0._subscriptionCounter++;if(!this._assetEventPromise){let d;iT.authenticated||(d={filterType:"asset",realm:iT.displayRealm});let m={eventType:"asset",filter:d};this._assetEventPromise=this.subscribe(m,d=>{this._assetEventCallbackMap.forEach(m=>m(d))})}return this._assetEventCallbackMap.set(p,d=>{let m=d.asset.id;f?f.find(d=>m===d)&&u(d):d.asset.realm===iT.displayRealm&&u(d)}),this._assetEventPromise.then(()=>{try{if(f&&m){let d={messageID:"read-assets:"+f.join(",")+":"+p,eventType:"read-assets",assetQuery:{ids:f}};this.sendEventWithReply(d).then(d=>{d.assets&&this._assetEventCallbackMap.has(p)&&d.assets.forEach(d=>{u({eventType:"asset",asset:d,cause:"READ"})})})}}catch(m){throw console.error("Failed to subscribe to asset events for assets: "+d),p&&this.unsubscribe(p),m}return p})})}subscribeAttributeEvents(d,m,u){return nX(this,void 0,void 0,function*(){let f=d&&"string"!=typeof d[0],p=f?d.map(d=>d.id):d,h=f?d:void 0,b="AttributeEvent"+n0._subscriptionCounter++;if(!this._attributeEventPromise){let d;iT.authenticated||(d={filterType:"asset",realm:iT.displayRealm});let m={eventType:"attribute",filter:d};this._attributeEventPromise=this.subscribe(m,d=>{this._attributeEventCallbackMap.forEach(m=>m(d))})}let g=m=>{let h=m.ref;f?d.forEach(d=>{h.id===d.id&&h.name===d.name&&u(m)}):p?p.find(d=>h.id===d)&&u(m):m.realm===iT.displayRealm&&u(m)};return this._attributeEventCallbackMap.set(b,g),this._attributeEventPromise.then(()=>{try{if(m&&p){let d={messageID:"read-assets:"+p.join(",")+":"+b,eventType:"read-assets",assetQuery:{ids:p}};this.sendEventWithReply(d).then(d=>{d.assets&&this._attributeEventCallbackMap.has(b)&&d.assets.forEach(d=>{d.attributes&&Object.entries(d.attributes).forEach(([m,u])=>{(!h||h.find(u=>u.id===d.id&&u.name===m))&&g({eventType:"attribute",timestamp:u.timestamp,value:u.value,ref:{id:d.id,name:m}})})})})}}catch(m){throw console.error("Failed to subscribe to asset events for assets: "+d),b&&this.unsubscribe(b),m}return b})})}_processNextSubscription(){this._status===k.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let d=this._queuedSubscriptions.shift();d&&this.subscribe(d.eventSubscription,d.callback).then(m=>{let u=d.deferred;d.deferred=null,u&&u.resolve(m)},m=>{let u=d.deferred;d.deferred=null,u&&u.reject(m)})},0)}_onStatusChanged(d){d!==this._status&&(console.debug("Event provider status changed: "+d),this._status=d,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(m=>m(d))},0))}_onMessageReceived(d,m){let u=this._subscriptionMap.get(d);u&&u.callback(m)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let d in this._subscriptionMap)this._subscriptionMap.has(d)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(d));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===k.CONNECTED&&this._onStatusChanged(k.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(k.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<n1.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(n1.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}n0.MIN_RECONNECT_DELAY=0,n0.MAX_RECONNECT_DELAY=3e4,n0._subscriptionCounter=0;class n1 extends n0{get endpointUrl(){return this._endpointUrl}constructor(d){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(d.startsWith("https:")?"wss":"ws")+"://"+d.substr(d.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let d=this._endpointUrl+"?Realm="+iT.config.realm;return this._connectDeferred=new N,(iT.authenticated?iT.retrieveAuthorizationHeader().then(m=>{d+="&Authorization="+m}):Promise.resolve()).finally(()=>{this._webSocket=new WebSocket(d),this._webSocket.onopen=d=>{if(this._connectDeferred){let d=this._connectDeferred;this._connectDeferred=null,d.resolve(!0)}},this._webSocket.onerror=d=>{if(console.error("Event provider error:",d),this._connectDeferred){let d=this._connectDeferred;this._connectDeferred=null,d.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onclose=()=>{if(console.warn("The WebSocket connection of the event provider has been closed."),this._webSocket=void 0,this._connectDeferred){let d=this._connectDeferred;this._connectDeferred=null,d.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=d=>{let m=d.data;if(m&&m.startsWith(nK)){let d=JSON.parse(m.substring(nK.length)),u=this._subscribeDeferred;this._subscribeDeferred=null,u&&u.resolve(d.subscriptionId)}else if(m.startsWith(nJ)){let d=JSON.parse(m.substring(nJ.length)),u=this._subscribeDeferred;this._subscribeDeferred=null,u&&(console.warn("Unauthorized event subscription: "+JSON.stringify(d,null,2)),u.reject("Unauthorized"))}else if(m.startsWith(nZ)){let d=JSON.parse(m.substring(nZ.length));d.events&&d.events.forEach(m=>{this._onMessageReceived(d.subscriptionId,m)})}else if(m.startsWith(nQ)){let d=JSON.parse(m.substring(nQ.length));if(d.messageID){let m=this._repliesDeferred.get(d.messageID);this._repliesDeferred.delete(d.messageID),m&&m.resolve(d)}}}}),this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var d;null==(d=this._webSocket)||d.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(d){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new N,d.subscriptionId||(d.subscriptionId=n1._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(d)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(d){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:d}))}_doSend(d){let m=nQ+JSON.stringify(d);this._webSocket.send(m)}_doSendWithReply(d){if(d.messageID||(d.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(d.messageID))return Promise.reject("There's already a pending send and reply with this ID");let m=new N;return this._repliesDeferred.set(d.messageID,m),this._webSocket.send(nQ+JSON.stringify(d)),m.promise}}n1._subscriptionCounter=1;let n2=["__proto__","constructor","prototype"];function n5(d){return!("string"!=typeof d||0===d.length||d.length>128||n2.indexOf(d)>-1||d.indexOf("..")>-1||d.indexOf("\\")>-1||/[?#%\s@]/.test(d)||/[\x00-\x1F\x7F]/.test(d))}function n4(d){return!(!n5(d)||d.indexOf("/")>-1)}let n3={lng:n4,ns:function(d){return n5(d)}};function n6(d){return"string"!=typeof d?d:d.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function n8(){return"function"==typeof XMLHttpRequest||"object"==typeof XMLHttpRequest}let n7=/\{\{(.+?)\}\}/g;function n9(d,m){let u=!1,f=d.replace(n7,(d,f)=>{let p=f.trim();if(n2.indexOf(p)>-1)return d;let h=m[p];if(null==h)return d;let b=n3[p]||n4,g=String(h).split("+");for(let m of g)if(!b(m))return u=!0,d;return g.join("+")});return u?null:f}let ie="u">typeof globalThis?globalThis:"u">typeof global?global:"u">typeof window?window:void 0;"function"==typeof fetch?f=fetch:ie&&"function"==typeof ie.fetch&&(f=ie.fetch);let it=n8()&&ie?ie.XMLHttpRequest:void 0,ii="function"==typeof ActiveXObject&&ie?ie.ActiveXObject:void 0,io=["__proto__","constructor","prototype"],ir=(d,m)=>{if(m&&"object"==typeof m){let u="";for(let d of Object.keys(m))io.indexOf(d)>-1||(u+="&"+encodeURIComponent(d)+"="+encodeURIComponent(m[d]));if(!u)return d;d=d+(-1!==d.indexOf("?")?"&":"?")+u.slice(1)}return d},ia=(d,m,u,p)=>{let h=d=>{if(!d.ok)return u(d.statusText||"Error",{status:d.status});d.text().then(m=>{u(null,{status:d.status,data:m})}).catch(u)};if(p){let f=p(d,m);if(f instanceof Promise)return void f.then(h).catch(u)}"function"==typeof fetch?fetch(d,m).then(h).catch(u):f(d,m).then(h).catch(u)},is=(d,m,u,p)=>{if("function"==typeof u&&(p=u,u=void 0),p=p||(()=>{}),f&&0!==m.indexOf("file:")){var h=m,b=u,g=p;d.queryStringParams&&(h=ir(h,d.queryStringParams));let f={..."function"==typeof d.customHeaders?d.customHeaders():d.customHeaders};"u"<typeof window&&"u">typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(f["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),b&&(f["Content-Type"]="application/json");let v="function"==typeof d.requestOptions?d.requestOptions(b):d.requestOptions,_={method:b?"POST":"GET",body:b?d.stringify(b):void 0,headers:f,...d._omitFetchOptions?{}:v},y="function"==typeof d.alternateFetch&&d.alternateFetch.length>=1?d.alternateFetch:void 0;try{ia(h,_,g,y)}catch(m){if(!v||0===Object.keys(v).length||!m.message||0>m.message.indexOf("not implemented"))return g(m);try{Object.keys(v).forEach(d=>{delete _[d]}),ia(h,_,g,y),d._omitFetchOptions=!0}catch(d){g(d)}}return}if(n8()||"function"==typeof ActiveXObject){var v=m,_=u,y=p;_&&"object"==typeof _&&(_=ir("",_).slice(1)),d.queryStringParams&&(v=ir(v,d.queryStringParams));try{let m=it?new it:new ii("MSXML2.XMLHTTP.3.0");m.open(_?"POST":"GET",v,1),d.crossDomain||m.setRequestHeader("X-Requested-With","XMLHttpRequest"),m.withCredentials=!!d.withCredentials,_&&m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.overrideMimeType&&m.overrideMimeType("application/json");let u=d.customHeaders;if(u="function"==typeof u?u():u)for(let d of Object.keys(u))io.indexOf(d)>-1||m.setRequestHeader(d,u[d]);m.onreadystatechange=()=>{m.readyState>3&&y(m.status>=400?m.statusText:null,{status:m.status,data:m.responseText})},m.send(_)}catch(d){console&&console.log(d)}return}p(Error("No fetch and no xhr implementation found!"))};var ic=class{constructor(d,m={},u={}){this.services=d,this.options=m,this.allOptions=u,this.type="backend",this.init(d,m,u)}init(d,m={},u={}){if(this.services=d,this.options={...{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:d=>JSON.parse(d),stringify:JSON.stringify,parsePayload:(d,m,u)=>({[m]:u||""}),parseLoadPayload:(d,m)=>void 0,request:is,reloadInterval:"u"<typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}},...this.options||{},...m},this.allOptions=u,this.services&&this.options.reloadInterval){let d=setInterval(()=>this.reload(),this.options.reloadInterval);"object"==typeof d&&"function"==typeof d.unref&&d.unref()}}readMulti(d,m,u){this._readAny(d,d,m,m,u)}read(d,m,u){this._readAny([d],d,[m],m,u)}_readAny(d,m,u,f,p){var h,b;let g=this.options.loadPath;"function"==typeof this.options.loadPath&&(g=this.options.loadPath(d,u)),(g=(b=h=g)&&"function"==typeof b.then?h:Promise.resolve(h)).then(h=>{if(!h)return p(null,{});let b=n9(h,{lng:d.join("+"),ns:u.join("+")});if(null==b)return p(Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+d.map(n6).join(", ")+"] namespaces=["+u.map(n6).join(", ")+"]"),!1);this.loadUrl(b,p,m,f)})}loadUrl(d,m,u,f){let p=this.options.parseLoadPayload("string"==typeof u?[u]:u,"string"==typeof f?[f]:f),h=n6(function(d){if("string"!=typeof d||0===d.length)return d;try{let m=new URL(d);if(m.username||m.password)return m.username="",m.password="",m.toString();return d}catch(m){return d.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(d));this.options.request(this.options,d,p,(d,p)=>{let b,g;if(p&&(p.status>=500&&p.status<600||!p.status))return m("failed loading "+h+"; status code: "+p.status,!0);if(p&&p.status>=400&&p.status<500)return m("failed loading "+h+"; status code: "+p.status,!1);if(!p&&d&&d.message){let u=d.message.toLowerCase();if(["failed","fetch","network","load"].find(d=>u.indexOf(d)>-1))return m("failed loading "+h+": "+n6(d.message),!0)}if(d)return m(d,!1);try{b="string"==typeof p.data?this.options.parse(p.data,u,f):p.data}catch(d){g="failed parsing "+h+" to json"}if(g)return m(g,!1);m(null,b)})}create(d,m,u,f,p){if(!this.options.addPath)return;"string"==typeof d&&(d=[d]);let h=this.options.parsePayload(m,u,f),b=0,g=[],v=[];d.forEach(u=>{let f=this.options.addPath;"function"==typeof this.options.addPath&&(f=this.options.addPath(u,m));let _=n9(f,{lng:u,ns:m});if(null==_){b+=1,p&&b===d.length&&p(g,v);return}this.options.request(this.options,_,h,(m,u)=>{b+=1,g.push(m),v.push(u),b===d.length&&"function"==typeof p&&p(g,v)})})}reload(){let{backendConnector:d,languageUtils:m,logger:u}=this.services,f=d.language;if(f&&"cimode"===f.toLowerCase())return;let p=[],h=d=>{m.toResolveHierarchy(d).forEach(d=>{0>p.indexOf(d)&&p.push(d)})};h(f),this.allOptions.preload&&this.allOptions.preload.forEach(d=>h(d)),p.forEach(m=>{this.allOptions.ns.forEach(f=>{d.read(m,f,"read",null,null,(p,h)=>{p&&u.warn(`loading namespace ${f} for language ${m} failed`,p),!p&&h&&u.log(`loaded namespace ${f} for language ${m}`,h),d.loaded(`${m}|${f}`,p,h)})})})}};ic.type="backend";var il=u(3957),id=u(4954);class im extends Error{}function iu(d,m){let u;if("string"!=typeof d)throw new im("Invalid token specified: must be a string");m||(m={});let f=+(!0!==m.header),p=d.split(".")[f];if("string"!=typeof p)throw new im(`Invalid token specified: missing part #${f+1}`);try{u=function(d){let m=d.replace(/-/g,"+").replace(/_/g,"/");switch(m.length%4){case 0:break;case 2:m+="==";break;case 3:m+="=";break;default:throw Error("base64 string is not of the correct length")}try{var u;return u=m,decodeURIComponent(atob(u).replace(/(.)/g,(d,m)=>{let u=m.charCodeAt(0).toString(16).toUpperCase();return u.length<2&&(u="0"+u),"%"+u}))}catch(d){return atob(m)}}(p)}catch(d){throw new im(`Invalid token specified: invalid base64 for part #${f+1} (${d.message})`)}try{return JSON.parse(u)}catch(d){throw new im(`Invalid token specified: invalid json for part #${f+1} (${d.message})`)}}if(im.prototype.name="InvalidTokenError","u"<typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function ip(d){if(!(this instanceof ip))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var m,u,f=this,p=[],h={enable:!0,callbackList:[],interval:5},b=document.getElementsByTagName("script"),g=0;g<b.length;g++)(-1!==b[g].src.indexOf("keycloak.js")||-1!==b[g].src.indexOf("keycloak.min.js"))&&-1!==b[g].src.indexOf("version=")&&(f.iframeVersion=b[g].src.substring(b[g].src.indexOf("version=")+8).split("&")[0]);var v=!0,_=P(console.info),y=P(console.warn);function F(d,m){for(var u=function(d){var m=null,u=window.crypto||window.msCrypto;if(u&&u.getRandomValues&&window.Uint8Array)return m=new Uint8Array(d),u.getRandomValues(m),m;m=Array(d);for(var f=0;f<m.length;f++)m[f]=Math.floor(256*Math.random());return m}(d),f=Array(d),p=0;p<d;p++)f[p]=m.charCodeAt(u[p]%m.length);return String.fromCharCode.apply(null,f)}function x(){return void 0===f.authServerUrl?void 0:"/"==f.authServerUrl.charAt(f.authServerUrl.length-1)?f.authServerUrl+"realms/"+encodeURIComponent(f.realm):f.authServerUrl+"/realms/"+encodeURIComponent(f.realm)}function w(d,m){var u=d.code,p=d.error,h=d.prompt,b=new Date().getTime();if(d.kc_action_status&&f.onActionUpdate&&f.onActionUpdate(d.kc_action_status),p){if("none"!=h)if(d.error_description&&"authentication_expired"===d.error_description)f.login(d.loginOptions);else{var g={error:p,error_description:d.error_description};f.onAuthError&&f.onAuthError(g),m&&m.setError(g)}else m&&m.setSuccess();return}if("standard"!=f.flow&&(d.access_token||d.id_token)&&w(d.access_token,null,d.id_token,!0),"implicit"!=f.flow&&u){var y="code="+u+"&grant_type=authorization_code",F=f.endpoints.token(),x=new XMLHttpRequest;x.open("POST",F,!0),x.setRequestHeader("Content-type","application/x-www-form-urlencoded"),y+="&client_id="+encodeURIComponent(f.clientId)+"&redirect_uri="+d.redirectUri,d.pkceCodeVerifier&&(y+="&code_verifier="+d.pkceCodeVerifier),x.withCredentials=!0,x.onreadystatechange=function(){if(4==x.readyState)if(200==x.status){var d=JSON.parse(x.responseText);w(d.access_token,d.refresh_token,d.id_token,"standard"===f.flow),O()}else f.onAuthError&&f.onAuthError(),m&&m.setError()},x.send(y)}function w(u,p,h,g){k(u,p,h,b=(b+new Date().getTime())/2),v&&f.idTokenParsed&&f.idTokenParsed.nonce!=d.storedNonce?(_("[KEYCLOAK] Invalid nonce, clearing token"),f.clearToken(),m&&m.setError()):g&&(f.onAuthSuccess&&f.onAuthSuccess(),m&&m.setSuccess())}}function E(d){return 0==d.status&&d.responseText&&d.responseURL.startsWith("file:")}function k(d,m,u,p){if(f.tokenTimeoutHandle&&(clearTimeout(f.tokenTimeoutHandle),f.tokenTimeoutHandle=null),m?(f.refreshToken=m,f.refreshTokenParsed=iu(m)):(delete f.refreshToken,delete f.refreshTokenParsed),u?(f.idToken=u,f.idTokenParsed=iu(u)):(delete f.idToken,delete f.idTokenParsed),d){if(f.token=d,f.tokenParsed=iu(d),f.sessionId=f.tokenParsed.sid,f.authenticated=!0,f.subject=f.tokenParsed.sub,f.realmAccess=f.tokenParsed.realm_access,f.resourceAccess=f.tokenParsed.resource_access,p&&(f.timeSkew=Math.floor(p/1e3)-f.tokenParsed.iat),null!=f.timeSkew&&(_("[KEYCLOAK] Estimated time difference between browser and server is "+f.timeSkew+" seconds"),f.onTokenExpired)){var h=(f.tokenParsed.exp-new Date().getTime()/1e3+f.timeSkew)*1e3;_("[KEYCLOAK] Token expires in "+Math.round(h/1e3)+" s"),h<=0?f.onTokenExpired():f.tokenTimeoutHandle=setTimeout(f.onTokenExpired,h)}}else delete f.token,delete f.tokenParsed,delete f.subject,delete f.realmAccess,delete f.resourceAccess,f.authenticated=!1}function C(){var d="0123456789abcdef",m=F(36,d).split("");return m[14]="4",m[19]=d.substr(3&m[19]|8,1),m[8]=m[13]=m[18]=m[23]="-",m.join("")}function A(d){var m=function(d){switch(f.flow){case"standard":m=["code","state","session_state","kc_action_status","iss"];break;case"implicit":m=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":m=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}m.push("error"),m.push("error_description"),m.push("error_uri");var m,u,p,h=d.indexOf("?"),b=d.indexOf("#");if("query"===f.responseMode&&-1!==h?(u=d.substring(0,h),""!==(p=T(d.substring(h+1,-1!==b?b:d.length),m)).paramsString&&(u+="?"+p.paramsString),-1!==b&&(u+=d.substring(b))):"fragment"===f.responseMode&&-1!==b&&(u=d.substring(0,b),""!==(p=T(d.substring(b+1),m)).paramsString&&(u+="#"+p.paramsString)),p&&p.oauthParams){if("standard"===f.flow||"hybrid"===f.flow){if((p.oauthParams.code||p.oauthParams.error)&&p.oauthParams.state)return p.oauthParams.newUrl=u,p.oauthParams}else if("implicit"===f.flow&&(p.oauthParams.access_token||p.oauthParams.error)&&p.oauthParams.state)return p.oauthParams.newUrl=u,p.oauthParams}}(d);if(m){var p=u.get(m.state);return p&&(m.valid=!0,m.redirectUri=p.redirectUri,m.storedNonce=p.nonce,m.prompt=p.prompt,m.pkceCodeVerifier=p.pkceCodeVerifier,m.loginOptions=p.loginOptions),m}}function T(d,m){for(var u=d.split("&"),f={paramsString:"",oauthParams:{}},p=0;p<u.length;p++){var h=u[p].indexOf("="),b=u[p].slice(0,h);-1!==m.indexOf(b)?f.oauthParams[b]=u[p].slice(h+1):(""!==f.paramsString&&(f.paramsString+="&"),f.paramsString+=u[p])}return f}function S(){var d={setSuccess:function(m){d.resolve(m)},setError:function(m){d.reject(m)}};return d.promise=new Promise(function(m,u){d.resolve=m,d.reject=u}),d}function I(){var d=S();if(!h.enable||h.iframe)return d.setSuccess(),d.promise;var m=document.createElement("iframe");h.iframe=m,m.onload=function(){var m=f.endpoints.authorize();"/"===m.charAt(0)?h.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):h.iframeOrigin=m.substring(0,m.indexOf("/",8)),d.setSuccess()};var u=f.endpoints.checkSessionIframe();return m.setAttribute("src",u),m.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),m.setAttribute("title","keycloak-session-iframe"),m.style.display="none",document.body.appendChild(m),window.addEventListener("message",function(d){if(d.origin===h.iframeOrigin&&h.iframe.contentWindow===d.source&&("unchanged"==d.data||"changed"==d.data||"error"==d.data)){"unchanged"!=d.data&&f.clearToken();for(var m=h.callbackList.splice(0,h.callbackList.length),u=m.length-1;u>=0;--u){var p=m[u];"error"==d.data?p.setError():p.setSuccess("unchanged"==d.data)}}},!1),d.promise}function O(){h.enable&&f.token&&setTimeout(function(){D().then(function(d){d&&O()})},1e3*h.interval)}function D(){var d=S();if(h.iframe&&h.iframeOrigin){var m=f.clientId+" "+(f.sessionId?f.sessionId:"");h.callbackList.push(d);var u=h.iframeOrigin;1==h.callbackList.length&&h.iframe.contentWindow.postMessage(m,u)}else d.setSuccess();return d.promise}function R(){var d,m,u,p=S();if(h.enable||f.silentCheckSsoRedirectUri){var b=document.createElement("iframe");b.setAttribute("src",f.endpoints.thirdPartyCookiesIframe()),b.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),b.setAttribute("title","keycloak-3p-check-iframe"),b.style.display="none",document.body.appendChild(b);var g=function(d){b.contentWindow===d.source&&("supported"===d.data||"unsupported"===d.data)&&("unsupported"===d.data&&(y("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"),h.enable=!1,f.silentCheckSsoFallback&&(f.silentCheckSsoRedirectUri=!1)),document.body.removeChild(b),window.removeEventListener("message",g),p.setSuccess())};window.addEventListener("message",g,!1)}else p.setSuccess();return d=p.promise,m=f.messageReceiveTimeout,u=null,Promise.race([d,new Promise(function(d,f){u=setTimeout(function(){f({error:"Timeout when waiting for 3rd party check iframe message."})},m)})]).finally(function(){clearTimeout(u)})}function N(d){if(!d||"default"==d)return{login:function(d){return window.location.assign(f.createLoginUrl(d)),S().promise},logout:async function(d){if("GET"===(d?.logoutMethod??f.logoutMethod))return void window.location.replace(f.createLogoutUrl(d));let u=f.createLogoutUrl(d),p=await fetch(u,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:f.idToken,client_id:f.clientId,post_logout_redirect_uri:m.redirectUri(d,!1)})});if(p.redirected){window.location.href=p.url;return}if(p.ok)return void window.location.reload();throw Error("Logout failed, request returned an error code.")},register:function(d){return window.location.assign(f.createRegisterUrl(d)),S().promise},accountManagement:function(){var d=f.createAccountUrl();if(void 0!==d)window.location.href=d;else throw"Not supported by the OIDC server";return S().promise},redirectUri:function(d,m){return d&&d.redirectUri?d.redirectUri:f.redirectUri?f.redirectUri:location.href}};if("cordova"==d){h.enable=!1;var u=function(d,m,u){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(d,m,u):window.open(d,m,u)},p=function(d){var m=d&&d.cordovaOptions?Object.keys(d.cordovaOptions).reduce(function(m,u){return m[u]=d.cordovaOptions[u],m},{}):{};return m.location="no",d&&"none"==d.prompt&&(m.hidden="yes"),Object.keys(m).reduce(function(d,u){return d.push(u+"="+m[u]),d},[]).join(",")},b=function(){return f.redirectUri||"http://localhost"};return{login:function(d){var m=S(),h=p(d),g=u(f.createLoginUrl(d),"_blank",h),v=!1,_=!1,y=function(){_=!0,g.close()};return g.addEventListener("loadstart",function(d){0==d.url.indexOf(b())&&(w(A(d.url),m),y(),v=!0)}),g.addEventListener("loaderror",function(d){v||(0==d.url.indexOf(b())?(w(A(d.url),m),y(),v=!0):(m.setError(),y()))}),g.addEventListener("exit",function(d){_||m.setError({reason:"closed_by_user"})}),m.promise},logout:function(d){var m,p=S(),h=u(f.createLogoutUrl(d),"_blank","location=no,hidden=yes,clearcache=yes");return h.addEventListener("loadstart",function(d){0==d.url.indexOf(b())&&h.close()}),h.addEventListener("loaderror",function(d){0==d.url.indexOf(b())||(m=!0),h.close()}),h.addEventListener("exit",function(d){m?p.setError():(f.clearToken(),p.setSuccess())}),p.promise},register:function(d){var m=S(),h=u(f.createRegisterUrl(),"_blank",p(d));return h.addEventListener("loadstart",function(d){0==d.url.indexOf(b())&&(h.close(),w(A(d.url),m))}),m.promise},accountManagement:function(){var d=f.createAccountUrl();if(void 0!==d){var m=u(d,"_blank","location=no");m.addEventListener("loadstart",function(d){0==d.url.indexOf(b())&&m.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(d){return b()}}}if("cordova-native"==d)return h.enable=!1,{login:function(d){var m=S(),u=f.createLoginUrl(d);return universalLinks.subscribe("keycloak",function(d){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),w(A(d.url),m)}),window.cordova.plugins.browsertab.openUrl(u),m.promise},logout:function(d){var m=S(),u=f.createLogoutUrl(d);return universalLinks.subscribe("keycloak",function(d){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),f.clearToken(),m.setSuccess()}),window.cordova.plugins.browsertab.openUrl(u),m.promise},register:function(d){var m=S(),u=f.createRegisterUrl(d);return universalLinks.subscribe("keycloak",function(d){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),w(A(d.url),m)}),window.cordova.plugins.browsertab.openUrl(u),m.promise},accountManagement:function(){var d=f.createAccountUrl();if(void 0!==d)window.cordova.plugins.browsertab.openUrl(d);else throw"Not supported by the OIDC server"},redirectUri:function(d){return d&&d.redirectUri?d.redirectUri:f.redirectUri?f.redirectUri:"http://localhost"}};throw"invalid adapter type: "+d}f.init=function(p){if(f.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(f.didInitialize=!0,f.authenticated=!1,u=function(){try{return new L}catch(d){}return new B}(),m=p&&["default","cordova","cordova-native"].indexOf(p.adapter)>-1?N(p.adapter):p&&"object"==typeof p.adapter?p.adapter:window.Cordova||window.cordova?N("cordova"):N(),p){if(void 0!==p.useNonce&&(v=p.useNonce),void 0!==p.checkLoginIframe&&(h.enable=p.checkLoginIframe),p.checkLoginIframeInterval&&(h.interval=p.checkLoginIframeInterval),"login-required"===p.onLoad&&(f.loginRequired=!0),p.responseMode)if("query"===p.responseMode||"fragment"===p.responseMode)f.responseMode=p.responseMode;else throw"Invalid value for responseMode";if(p.flow){switch(p.flow){case"standard":f.responseType="code";break;case"implicit":f.responseType="id_token token";break;case"hybrid":f.responseType="code id_token token";break;default:throw"Invalid value for flow"}f.flow=p.flow}if(null!=p.timeSkew&&(f.timeSkew=p.timeSkew),p.redirectUri&&(f.redirectUri=p.redirectUri),p.silentCheckSsoRedirectUri&&(f.silentCheckSsoRedirectUri=p.silentCheckSsoRedirectUri),"boolean"==typeof p.silentCheckSsoFallback?f.silentCheckSsoFallback=p.silentCheckSsoFallback:f.silentCheckSsoFallback=!0,void 0!==p.pkceMethod){if("S256"!==p.pkceMethod&&!1!==p.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${p.pkceMethod}.`);f.pkceMethod=p.pkceMethod}else f.pkceMethod="S256";"boolean"==typeof p.enableLogging?f.enableLogging=p.enableLogging:f.enableLogging=!1,"POST"===p.logoutMethod?f.logoutMethod="POST":f.logoutMethod="GET","string"==typeof p.scope&&(f.scope=p.scope),"string"==typeof p.acrValues&&(f.acrValues=p.acrValues),"number"==typeof p.messageReceiveTimeout&&p.messageReceiveTimeout>0?f.messageReceiveTimeout=p.messageReceiveTimeout:f.messageReceiveTimeout=1e4}f.responseMode||(f.responseMode="fragment"),f.responseType||(f.responseType="code",f.flow="standard");var b=S(),g=S();g.promise.then(function(){f.onReady&&f.onReady(f.authenticated),b.setSuccess(f.authenticated)}).catch(function(d){b.setError(d)});var _=function(){var m=S();function u(d){d?f.endpoints={authorize:function(){return d.authorization_endpoint},token:function(){return d.token_endpoint},logout:function(){if(!d.end_session_endpoint)throw"Not supported by the OIDC server";return d.end_session_endpoint},checkSessionIframe:function(){if(!d.check_session_iframe)throw"Not supported by the OIDC server";return d.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!d.userinfo_endpoint)throw"Not supported by the OIDC server";return d.userinfo_endpoint}}:f.endpoints={authorize:function(){return x()+"/protocol/openid-connect/auth"},token:function(){return x()+"/protocol/openid-connect/token"},logout:function(){return x()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var d=x()+"/protocol/openid-connect/login-status-iframe.html";return f.iframeVersion&&(d=d+"?version="+f.iframeVersion),d},thirdPartyCookiesIframe:function(){var d=x()+"/protocol/openid-connect/3p-cookies/step1.html";return f.iframeVersion&&(d=d+"?version="+f.iframeVersion),d},register:function(){return x()+"/protocol/openid-connect/registrations"},userinfo:function(){return x()+"/protocol/openid-connect/userinfo"}}}if(d?"string"==typeof d&&(b=d):b="keycloak.json",b){var p=new XMLHttpRequest;p.open("GET",b,!0),p.setRequestHeader("Accept","application/json"),p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status||E(p)){var d=JSON.parse(p.responseText);f.authServerUrl=d["auth-server-url"],f.realm=d.realm,f.clientId=d.resource,u(null),m.setSuccess()}else m.setError()},p.send()}else{if(!d.clientId)throw"clientId missing";f.clientId=d.clientId;var h=d.oidcProvider;if(h)if("string"==typeof h){var b,g="/"==h.charAt(h.length-1)?h+".well-known/openid-configuration":h+"/.well-known/openid-configuration",p=new XMLHttpRequest;p.open("GET",g,!0),p.setRequestHeader("Accept","application/json"),p.onreadystatechange=function(){4==p.readyState&&(200==p.status||E(p)?(u(JSON.parse(p.responseText)),m.setSuccess()):m.setError())},p.send()}else u(h),m.setSuccess();else{if(!d.url){for(var v=document.getElementsByTagName("script"),_=0;_<v.length;_++)if(v[_].src.match(/.*keycloak\.js/)){d.url=v[_].src.substr(0,v[_].src.indexOf("/js/keycloak.js"));break}}if(!d.realm)throw"realm missing";f.authServerUrl=d.url,f.realm=d.realm,u(null),m.setSuccess()}}return m.promise}();function y(){var d=function(d){d||(u.prompt="none"),p&&p.locale&&(u.locale=p.locale),f.login(u).then(function(){g.setSuccess()}).catch(function(d){g.setError(d)})},m=function(){var d=document.createElement("iframe"),m=f.createLoginUrl({prompt:"none",redirectUri:f.silentCheckSsoRedirectUri});d.setAttribute("src",m),d.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-silent-check-sso"),d.style.display="none",document.body.appendChild(d);var u=function(m){if(m.origin===window.location.origin&&d.contentWindow===m.source){var f=A(m.data);w(f,g),document.body.removeChild(d),window.removeEventListener("message",u)}};window.addEventListener("message",u)},u={};switch(p.onLoad){case"check-sso":h.enable?I().then(function(){D().then(function(u){u?g.setSuccess():f.silentCheckSsoRedirectUri?m():d(!1)}).catch(function(d){g.setError(d)})}):f.silentCheckSsoRedirectUri?m():d(!1);break;case"login-required":d(!0);break;default:throw"Invalid value for onLoad"}}function F(){var d=A(window.location.href);if(d&&window.history.replaceState(window.history.state,null,d.newUrl),d&&d.valid)return I().then(function(){w(d,g)}).catch(function(d){g.setError(d)});p?p.token&&p.refreshToken?(k(p.token,p.refreshToken,p.idToken),h.enable?I().then(function(){D().then(function(d){d?(f.onAuthSuccess&&f.onAuthSuccess(),g.setSuccess(),O()):g.setSuccess()}).catch(function(d){g.setError(d)})}):f.updateToken(-1).then(function(){f.onAuthSuccess&&f.onAuthSuccess(),g.setSuccess()}).catch(function(d){f.onAuthError&&f.onAuthError(),p.onLoad?y():g.setError(d)})):p.onLoad?y():g.setSuccess():g.setSuccess()}return _.then(function(){var d,m;(d=S(),m=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",m),d.setSuccess())},document.addEventListener("readystatechange",m),m(),d.promise).then(R).then(F).catch(function(d){b.setError(d)})}),_.catch(function(d){b.setError(d)}),b.promise},f.login=function(d){return m.login(d)},f.createLoginUrl=function(d){var p,h=C(),b=C(),g=m.redirectUri(d),_={state:h,nonce:b,redirectUri:encodeURIComponent(g),loginOptions:d};d&&d.prompt&&(_.prompt=d.prompt),p=d&&"register"==d.action?f.endpoints.register():f.endpoints.authorize();var y=d&&d.scope||f.scope;y?-1===y.indexOf("openid")&&(y="openid "+y):y="openid";var x=p+"?client_id="+encodeURIComponent(f.clientId)+"&redirect_uri="+encodeURIComponent(g)+"&state="+encodeURIComponent(h)+"&response_mode="+encodeURIComponent(f.responseMode)+"&response_type="+encodeURIComponent(f.responseType)+"&scope="+encodeURIComponent(y);if(v&&(x=x+"&nonce="+encodeURIComponent(b)),d&&d.prompt&&(x+="&prompt="+encodeURIComponent(d.prompt)),d&&d.maxAge&&(x+="&max_age="+encodeURIComponent(d.maxAge)),d&&d.loginHint&&(x+="&login_hint="+encodeURIComponent(d.loginHint)),d&&d.idpHint&&(x+="&kc_idp_hint="+encodeURIComponent(d.idpHint)),d&&d.action&&"register"!=d.action&&(x+="&kc_action="+encodeURIComponent(d.action)),d&&d.locale&&(x+="&ui_locales="+encodeURIComponent(d.locale)),d&&d.acr&&(x+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:d.acr}}))),(d&&d.acrValues||f.acrValues)&&(x+="&acr_values="+encodeURIComponent(d.acrValues||f.acrValues)),f.pkceMethod){var w=F(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");_.pkceCodeVerifier=w,x+="&code_challenge="+function(d,m){if("S256"!==d)throw TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${d}'.`);return btoa(String.fromCodePoint(...new Uint8Array(id.arrayBuffer(m)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(f.pkceMethod,w)+"&code_challenge_method="+f.pkceMethod}return u.add(_),x},f.logout=function(d){return m.logout(d)},f.createLogoutUrl=function(d){if("POST"===(d?.logoutMethod??f.logoutMethod))return f.endpoints.logout();var u=f.endpoints.logout()+"?client_id="+encodeURIComponent(f.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(m.redirectUri(d,!1));return f.idToken&&(u+="&id_token_hint="+encodeURIComponent(f.idToken)),u},f.register=function(d){return m.register(d)},f.createRegisterUrl=function(d){return d||(d={}),d.action="register",f.createLoginUrl(d)},f.createAccountUrl=function(d){var u=x(),p=void 0;return void 0!==u&&(p=u+"/account?referrer="+encodeURIComponent(f.clientId)+"&referrer_uri="+encodeURIComponent(m.redirectUri(d))),p},f.accountManagement=function(){return m.accountManagement()},f.hasRealmRole=function(d){var m=f.realmAccess;return!!m&&m.roles.indexOf(d)>=0},f.hasResourceRole=function(d,m){if(!f.resourceAccess)return!1;var u=f.resourceAccess[m||f.clientId];return!!u&&u.roles.indexOf(d)>=0},f.loadUserProfile=function(){var d=x()+"/account",m=new XMLHttpRequest;m.open("GET",d,!0),m.setRequestHeader("Accept","application/json"),m.setRequestHeader("Authorization","bearer "+f.token);var u=S();return m.onreadystatechange=function(){4==m.readyState&&(200==m.status?(f.profile=JSON.parse(m.responseText),u.setSuccess(f.profile)):u.setError())},m.send(),u.promise},f.loadUserInfo=function(){var d=f.endpoints.userinfo(),m=new XMLHttpRequest;m.open("GET",d,!0),m.setRequestHeader("Accept","application/json"),m.setRequestHeader("Authorization","bearer "+f.token);var u=S();return m.onreadystatechange=function(){4==m.readyState&&(200==m.status?(f.userInfo=JSON.parse(m.responseText),u.setSuccess(f.userInfo)):u.setError())},m.send(),u.promise},f.isTokenExpired=function(d){if(!f.tokenParsed||!f.refreshToken&&"implicit"!=f.flow)throw"Not authenticated";if(null==f.timeSkew)return _("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var m=f.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+f.timeSkew;if(d){if(isNaN(d))throw"Invalid minValidity";m-=d}return m<0},f.updateToken=function(d){var m=S();if(!f.refreshToken)return m.setError(),m.promise;d=d||5;var u=function(){var u=!1;if(-1==d?(u=!0,_("[KEYCLOAK] Refreshing token: forced refresh")):(!f.tokenParsed||f.isTokenExpired(d))&&(u=!0,_("[KEYCLOAK] Refreshing token: token expired")),u){var h="grant_type=refresh_token&refresh_token="+f.refreshToken,b=f.endpoints.token();if(p.push(m),1==p.length){var g=new XMLHttpRequest;g.open("POST",b,!0),g.setRequestHeader("Content-type","application/x-www-form-urlencoded"),g.withCredentials=!0,h+="&client_id="+encodeURIComponent(f.clientId);var v=new Date().getTime();g.onreadystatechange=function(){if(4==g.readyState)if(200==g.status){_("[KEYCLOAK] Token refreshed"),v=(v+new Date().getTime())/2;var d=JSON.parse(g.responseText);k(d.access_token,d.refresh_token,d.id_token,v),f.onAuthRefreshSuccess&&f.onAuthRefreshSuccess();for(var m=p.pop();null!=m;m=p.pop())m.setSuccess(!0)}else{y("[KEYCLOAK] Failed to refresh token"),400==g.status&&f.clearToken(),f.onAuthRefreshError&&f.onAuthRefreshError();for(var m=p.pop();null!=m;m=p.pop())m.setError(!0)}},g.send(h)}}else m.setSuccess(!1)};return h.enable?D().then(function(){u()}).catch(function(d){m.setError(d)}):u(),m.promise},f.clearToken=function(){f.token&&(k(null,null,null),f.onAuthLogout&&f.onAuthLogout(),f.loginRequired&&f.login())};var L=function(){if(!(this instanceof L))return new L;function d(){for(var d=new Date().getTime(),m=0;m<localStorage.length;m++){var u=localStorage.key(m);if(u&&0==u.indexOf("kc-callback-")){var f=localStorage.getItem(u);if(f)try{var p=JSON.parse(f).expires;(!p||p<d)&&localStorage.removeItem(u)}catch(d){localStorage.removeItem(u)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(m){if(m){var u="kc-callback-"+m,f=localStorage.getItem(u);return f&&(localStorage.removeItem(u),f=JSON.parse(f)),d(),f}},this.add=function(m){d();var u="kc-callback-"+m.state;m.expires=new Date().getTime()+36e5,localStorage.setItem(u,JSON.stringify(m))}},B=function(){if(!(this instanceof B))return new B;this.get=function(f){if(f){var p=m("kc-callback-"+f);if(u("kc-callback-"+f,"",d(-100)),p)return JSON.parse(p)}},this.add=function(m){u("kc-callback-"+m.state,JSON.stringify(m),d(60))},this.removeItem=function(m){u(m,"",d(-100))};var d=function(d){var m=new Date;return m.setTime(m.getTime()+60*d*1e3),m},m=function(d){for(var m=d+"=",u=document.cookie.split(";"),f=0;f<u.length;f++){for(var p=u[f];" "==p.charAt(0);)p=p.substring(1);if(0==p.indexOf(m))return p.substring(m.length,p.length)}return""},u=function(d,m,u){var f=d+"="+m+"; expires="+u.toUTCString()+"; ";document.cookie=f}};function P(d){return function(){f.enableLogging&&d.apply(console,Array.prototype.slice.call(arguments))}}}var ih=function(d,m,u,f){return new(u||(u=Promise))(function(p,h){function b(d){try{v(f.next(d))}catch(d){h(d)}}function g(d){try{v(f.throw(d))}catch(d){h(d)}}function v(d){var m;d.done?p(d.value):((m=d.value)instanceof u?m:new u(function(d){d(m)})).then(b,g)}v((f=f.apply(d,m||[])).next())})};let ib=d=>m=>class extends m{constructor(){super(...arguments),this._connectRequested=!1,this._status=k.DISCONNECTED,this._statusCallback=d=>this._onEventProviderStatusChanged(d)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){d.getEventProvider()?this._connectRequested||(this._connectRequested=!0,d.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect()):console.log("No event provider available so cannot subscribe")}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,d.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return ih(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&d.getEventProvider().status===k.CONNECTED}_onEventProviderStatusChanged(d){switch(d){case k.DISCONNECTED:this._onEventsDisconnect();break;case k.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return ih(this,void 0,void 0,function*(){let m=!!this._attributeRefs,u=!!this._assetIds,f=this._attributeRefs?this._attributeRefs:this._assetIds;if(f&&f.length>0){if(this._subscriptionIds=[],u){let m=yield d.getEventProvider().subscribeAssetEvents(f,!0,d=>this._onEvent(d)),u=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!L(f,u))return void d.getEventProvider().unsubscribe(m);this._subscriptionIds.push(m)}let p=yield d.getEventProvider().subscribeAttributeEvents(f,m,d=>this._onEvent(d)),h=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!L(f,h))return void d.getEventProvider().unsubscribe(p);this._subscriptionIds.push(p)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(m=>{d.getEventProvider().unsubscribe(m)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(d){L(this._assetIds,d)||(this._assetIds=d,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(d){L(this._attributeRefs,d)||(this._attributeRefs=d,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(m){d.getEventProvider().sendEvent(m)}_sendEventWithReply(m){return d.getEventProvider().sendEventWithReply(m)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(d){}},ig="#4d9d2a",iv="#FFFFFF",i_="#F9F9F9",iy="#CCCCCC",iF="#FFFFFF",ix="#4c4c4c";var iw=function(d,m,u,f){return new(u||(u=Promise))(function(p,h){function b(d){try{v(f.next(d))}catch(d){h(d)}}function g(d){try{v(f.throw(d))}catch(d){h(d)}}function v(d){var m;d.done?p(d.value):((m=d.value)instanceof u?m:new u(function(d){d(m)})).then(b,g)}v((f=f.apply(d,m||[])).next())})};let iE="openremote";(w=C||(C={})).MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",w.AUTH_FAILED="AUTH_FAILED",w.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",w.CONSOLE_ERROR="CONSOLE_INIT_ERROR",w.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",w.TRANSLATION_ERROR="TRANSLATION_ERROR",(E=A||(A={})).ERROR="ERROR",E.READY="READY",E.ONLINE="ONLINE",E.OFFLINE="OFFLINE",E.CONNECTING="CONNECTING",E.CONSOLE_INIT="CONSOLE_INIT",E.CONSOLE_READY="CONSOLE_READY",E.TRANSLATE_INIT="TRANSLATE_INIT",E.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",E.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED",E.LOGIN="LOGIN";let ik={cn:"zh-cn"};class iC{constructor(){this._authenticated=!1,this._ready=!1,this._name="",this._username="",this._keycloakUpdateTokenInterval=void 0,this._managerVersion="",this._authServerUrl="",this._listeners=[],this._disconnected=!1}get username(){return this._username}get error(){return this._error}get authenticated(){return this._authenticated}get ready(){return this._ready}get config(){return this._config}get roles(){let d=new Map;return this._keycloak&&this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach(([m,u])=>{let f=u.roles;d.set(m,f)}),d}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){var d;return null==(d=this._config)?void 0:d.managerUrl}get keycloakUrl(){var d;return null==(d=this._config)?void 0:d.keycloakUrl}get isError(){return!!this._error}get connectionStatus(){return this._events&&this._events.status}get console(){return this._console}get consoleAppConfig(){return this._consoleAppConfig}get events(){return this._events}get rest(){return nW}get language(){return O.Ay.language}set language(d){console.debug(`Changing language to ${d}.`),d&&(O.Ay.changeLanguage(d),this.console.storeData("LANGUAGE",d),this.authenticated&&this.updateKeycloakUserLanguage(d).catch(d=>console.error(d)))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(d){this.isSuperUser()&&this._displayRealm!==d&&(this._displayRealm=d,this._emitEvent(A.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||iE}getEventProvider(){return this.events}isManagerSameOrigin(){if(!this.ready)return!1;let d=new URL(this._config.managerUrl),m=window.location;return d.protocol===m.protocol&&d.hostname===m.hostname&&d.port===m.port}addListener(d){0>this._listeners.indexOf(d)&&this._listeners.push(d)}removeListener(d){let m=this._listeners.indexOf(d);m>=0&&this._listeners.splice(m,1)}init(d){return iw(this,void 0,void 0,function*(){let m;this._config&&console.debug("Already initialised"),this._config=((m=d?Object.assign({},d):{}).managerUrl&&""!==m.managerUrl?m.managerUrl=m.managerUrl.replace(/\/+$/,""):m.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),m.realm&&""!==m.realm||(m.realm="master"),m.auth||(m.auth="KEYCLOAK"),void 0===m.consoleAutoEnable&&(m.consoleAutoEnable=!0),void 0===m.applyConfigToAdmin&&(m.applyConfigToAdmin=!0),m.eventProviderType||(m.eventProviderType="WEBSOCKET"),(!m.pollingIntervalMillis||m.pollingIntervalMillis<5e3)&&(m.pollingIntervalMillis=1e4),void 0===m.loadIcons&&(m.loadIcons=!0),void 0===m.loadTranslations&&(m.loadTranslations=["or"]),void 0===m.translationsLoadPath&&(m.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===m.loadDescriptors&&(m.loadDescriptors=!0),void 0===m.clientId&&(m.clientId=iE),m);let u=yield this.loadManagerInfo(),f=new ee(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(A.CONSOLE_READY)});if(this._console=f,"KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){let d,m=new URL(this._config.managerUrl);this._authServerUrl.startsWith("//")?(this._authServerUrl=m.protocol+this._authServerUrl,this._config.keycloakUrl=this._authServerUrl):this._authServerUrl.startsWith("http")?this._config.keycloakUrl=this._authServerUrl:((d=new URL(m)).pathname=this._authServerUrl,d.protocol||(d.protocol=m.protocol),d.hostname||(d.hostname=m.hostname),d.port||(d.port=m.port),this._config.keycloakUrl=d.toString())}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),u=yield this.doAuthInit()}return!!u&&(u&&(u=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),(u=(yield this.doTranslateInit())&&u)&&(u=yield this.doDescriptorsInit(),u=yield this.getConsoleAppConfig()),this.doIconInit(),u?(u=yield this.doEventsSubscriptionInit(),this._ready=!0,this._emitEvent(A.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=d.realm||"master",u)})}loadManagerInfo(){return iw(this,void 0,void 0,function*(){try{let d=yield new Promise((d,m)=>{let u=new XMLHttpRequest;u.addEventListener("load",()=>{d(JSON.parse(u.responseText))}),u.addEventListener("error",()=>{m(Error("Failed to contact the manager"))}),u.open("GET",this._config.managerUrl+"/api/master/info"),u.send()});return this._managerVersion=d&&d.version?d.version:"",this._authServerUrl=d&&d.authServerUrl?d.authServerUrl:"",!0}catch(d){return console.error("Failed to contact the manager",d),this._setError(C.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return iw(this,void 0,void 0,function*(){if(O.Ay.isInitialized)return!0;O.Ay.on("initialized",d=>{this._emitEvent(A.TRANSLATE_INIT)}),O.Ay.on("languageChanged",d=>{var m;R().locale(null!=(m=ik[d])?m:d),this._emitEvent(A.TRANSLATE_LANGUAGE_CHANGED)});let d={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(d,m,u)=>"uppercase"===m?d.toUpperCase():d instanceof Date?R()(d).format(m):d},backend:{loadPath:(d,m)=>1===m.length&&"or"===m[0]?this.config.managerUrl+"/shared/locales/{{lng}}/{{ns}}.json":this.config.translationsLoadPath?this.config.translationsLoadPath:"locales/{{lng}}/{{ns}}.json"}};this.config.configureTranslationsOptions&&this.config.configureTranslationsOptions(d);try{yield O.Ay.use(ic).init(d)}catch(d){return console.error(d),this._setError(C.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return iw(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let d=yield nW.api.AssetModelResource.getAssetInfos(),m=yield nW.api.AssetModelResource.getMetaItemDescriptors(),u=yield nW.api.AssetModelResource.getValueDescriptors();I.u0._assetTypeInfos=d.data,I.u0._metaItemDescriptors=Object.values(m.data),I.u0._valueDescriptors=Object.values(u.data)}catch(d){return console.error(d),!1}return!0})}doAuthInit(){return iw(this,void 0,void 0,function*(){let d=!0;switch(this._config.auth){case"KEYCLOAK":d=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(C.AUTH_TYPE_UNSUPPORTED),!1}return!!d&&(nW.addRequestInterceptor(d=>{if(!d.headers.Authorization){let m=this.getAuthorizationHeader();m&&(d.headers.Authorization=m)}return d}),d)})}doRestApiInit(){return nW.setTimeout(2e4),nW.initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return iw(this,void 0,void 0,function*(){let d=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new n1(this._config.managerUrl),this._events.subscribeStatusChange(d=>this._onEventProviderStatusChanged(d)),d=yield this._events.connect()),d||this._setError(C.EVENTS_CONNECTION_ERROR),d})}_connectEvents(){var d;(null==(d=this.events)?void 0:d.status)===k.DISCONNECTED?this.events.connect().catch(d=>{console.error("Failed to connect EventProvider."),console.error(d)}):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(d){switch(d){case k.DISCONNECTED:this._onDisconnect();break;case k.CONNECTED:break;case k.CONNECTING:this._emitEvent(A.CONNECTING)}}doConsoleInit(){return iw(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(A.CONSOLE_INIT),!0}catch(d){return this._setError(C.CONSOLE_ERROR),!1}})}doIconInit(){this._config.loadIcons&&(il.Ri.addIconSet("mdi",(0,il.mb)(iA.managerUrl)),il.Ri.addIconSet("or",(0,il.e4)(il.Bv.size,il.Bv.icons)))}getConsoleAppConfig(){return iw(this,void 0,void 0,function*(){var d;try{let m=yield fetch((null!=(d=iA.managerUrl)?d:"")+"/consoleappconfig/"+iA.displayRealm+".json");return this._consoleAppConfig=yield m.json(),!0}catch(d){return!0}})}getConsolePreferredLanguage(){return iw(this,arguments,void 0,function*(d=this.console){return d.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return iw(this,arguments,void 0,function*(d=this._keycloak){if(d&&d.authenticated){let m=(null==d?void 0:d.profile)||(yield null==d?void 0:d.loadUserProfile());if(null==m?void 0:m.attributes){let d=new Map(Object.entries(m.attributes));if(d.has("locale")){let m=d.get("locale");if("string"==typeof m[0])return m[0]}console.warn("Could not get user language from keycloak: no user attributes were found.")}else console.warn("Could not get user language from keycloak: no valid keycloak user profile was found.")}})}updateKeycloakUserLanguage(d){return iw(this,arguments,void 0,function*(d,m=this.rest){this.authenticated?m?yield m.api.UserResource.updateCurrentUserLocale(d,{headers:{"Content-Type":"application/json"}}):console.warn("Tried updating user language, but the REST API is not initialized yet."):console.warn("Tried updating user language, but the user is not authenticated.")})}logout(d){this._authenticated&&(this._authenticated=!0,this._keycloak&&(this.isMobile()&&this.console.storeData("REFRESH_TOKEN",null),this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._keycloak.logout(d&&""!==d?{redirectUri:d}:void 0)))}login(d){if("KEYCLOAK"===this._config.auth&&this._keycloak){let m={};d&&d.redirectUrl&&""!==d.redirectUrl&&(m.redirectUri=d.redirectUrl),(null==d?void 0:d.action)&&""!==d.action&&(m.action=d.action),this.isMobile()&&(m.scope="offline_access"),this._keycloak.login(m)}}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole("restricted_user")}getApiBaseUrl(){return this._config.managerUrl+"/api/"+this._config.realm+"/"}getAppName(){let d=location.pathname.split("/");return d.length>=1?d[1]:""}hasRealmRole(d){return this.isKeycloak()&&this._keycloak.hasRealmRole(d)}hasRole(d,m=this._config.clientId){let u=this.roles;return u&&u.has(m)&&u.get(m).indexOf(d)>=0}getAuthorizationHeader(){if(this.getKeycloakToken())return"Bearer "+this.getKeycloakToken()}retrieveAuthorizationHeader(){return iw(this,void 0,void 0,function*(){let d=yield this.retrieveKeycloakToken();if(d)return"Bearer "+d})}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}retrieveKeycloakToken(){return iw(this,void 0,void 0,function*(){if(this.isKeycloak())return yield this._updateKeycloakAccessToken(),this._keycloak.token})}getRealm(){if(this._config)return this._config.realm}isMobile(){return this.console&&this.console.isMobile}isKeycloak(){return!!this._keycloak}_onAuthenticated(){this._authenticated=!0}loadAndInitialiseKeycloak(){return iw(this,void 0,void 0,function*(){var d,m,u,f,p;try{this._keycloak=new ip({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let h=yield this._getNativeOfflineRefreshToken(),b=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!b&&h)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=h,b=yield this._updateKeycloakAccessToken()}catch(d){console.error("Failed to authenticate using offline token")}if(b){this._name=null==(d=this._keycloak.tokenParsed)?void 0:d.name,this._username=null==(m=this._keycloak.tokenParsed)?void 0:m.preferred_username,this.isMobile()&&(null==(f=null==(u=this._keycloak)?void 0:u.refreshTokenParsed)?void 0:f.typ)==="Offline"&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated(),this._createTokenUpdateInterval();let h=null==(p=this._keycloak.tokenParsed)?void 0:p.session_state;h&&sessionStorage.getItem("or-session")!==h&&(sessionStorage.setItem("or-session",h),this._emitEvent(A.LOGIN))}else if(this.config.autoLogin)return this.login(),!1;return!0}catch(d){return this._authenticated=!1,this._setError(C.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+d),!1}})}_createTokenUpdateInterval(){this._authenticated?this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>iw(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4)):console.warn("User is not authenticated; skipping token update interval creation.")}_updateKeycloakAccessToken(){return iw(this,void 0,void 0,function*(){let d=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+d),d&&this._onAuthenticated(),d})}_getNativeOfflineRefreshToken(){return iw(this,void 0,void 0,function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")})}_emitEvent(d){window.setTimeout(()=>{for(let m of this._listeners)m(d)},0)}_setError(d){this._error=d,this._emitEvent(A.ERROR),console.warn("Error set: "+d)}_clearWebHistory(){var d;this.isMobile()&&(null==(d=this.console)||d._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0))}_onDisconnect(){return iw(this,void 0,void 0,function*(){this._disconnected||(console.debug("Disconnected"),this._disconnected=!0,this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._emitEvent(A.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected to the Manager."),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(A.ONLINE)}reconnect(){return iw(this,arguments,void 0,function*(d=3e3){if(console.debug("Checking connection to the Manager..."),!this._disconnected)return void console.debug("Manager is still connected. No action necessary.");console.debug("Manager is disconnected!"),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let m=()=>iw(this,void 0,void 0,function*(){var d,m;if(console.debug("Reconnecting to the Manager..."),!this._authenticated){console.debug("User is not authenticated, skipping token refresh");let m=()=>{var d;return(null==(d=this.events)?void 0:d.status)===k.CONNECTED};return m()||(yield null==(d=this.events)?void 0:d.connect()),m()}if(!(yield this.isKeycloakReachable()))return console.error("Keycloak is not reachable. Reconnect attempt failed."),!1;try{yield this._updateKeycloakAccessToken()}catch(m){console.error("Could not update Keycloak access token, attempting again using offline token...",m);let d=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=d,d||console.warn("No offline token was found on this device.");try{yield this._updateKeycloakAccessToken()}catch(d){throw this.login(),Error("Cannot update access token so sending to login")}console.debug("Keycloak access token is valid")}let u=()=>{var d;return(null==(d=this.events)?void 0:d.status)===k.CONNECTED};return u()||(console.debug("Event provider offline, attempting to reconnect using latest auth token."),yield null==(m=this.events)?void 0:m.connect()),u()}),u=yield m();if(void 0!==u){if(!u){d=Math.min(iC.MAX_RECONNECT_DELAY,d+3e3),console.error(`Failed to reconnect to the Manager. Attempting again in ${d}...`),this._reconnectTimer=window.setTimeout(()=>this.reconnect(d),d);return}this._onReconnected()}})}isKeycloakReachable(){return iw(this,arguments,void 0,function*(d=2e3){let m=new AbortController,u=setTimeout(()=>m.abort(),d);try{let d=this._keycloak.endpoints.token(),u=yield fetch(d,{method:"OPTIONS",signal:m.signal});return 200===u.status}catch(d){return!1}finally{clearTimeout(u)}})}}iC.MAX_RECONNECT_DELAY=45e3;let iA=new iC,iT=iA},2764(d,m,u){"use strict";var f,p,h,b,g,v,_,y,F,x,w,E,k,C,A,T,S,I,O,D,R,N,L,B,P,M,z,U,j,V,H,$,q,G,Y,W,X,K,J,Z,Q,ee,et,en,ei,eo,er,ea,es,ec,el,ed,em,eu,ef,ep,eh,eb,eg,ev,e_,ey,eF,ex,ew,eE,ek,eC,eA,eT,eS,eI,eO,eD,eR,eN,eL,eB,eP,eM,ez,eU,ej,eV,eH,e$,eq,eG,eY,eW,eX,eK,eJ,eZ,eQ,e0,e1,e2,e5,e4,e3,e6,e8,e7,e9,te,tt,tn,ti,to,tr,ta,ts,tc,tl,td,tm,tu,tf,tp,th,tb,tg,tv,t_;u.d(m,{u0:()=>ty}),(ex=f||(f={})).CREATE="CREATE",ex.UPDATE="UPDATE",ex.DELETE="DELETE",(ew=p||(p={})).LOW="LOW",ew.MEDIUM="MEDIUM",ew.HIGH="HIGH",(eE=h||(h={})).MANUAL="MANUAL",eE.CLIENT="CLIENT",eE.GLOBAL_RULESET="GLOBAL_RULESET",eE.REALM_RULESET="REALM_RULESET",eE.ASSET_RULESET="ASSET_RULESET",eE.AGENT="AGENT",(ek=b||(b={})).OPEN="OPEN",ek.ACKNOWLEDGED="ACKNOWLEDGED",ek.IN_PROGRESS="IN_PROGRESS",ek.RESOLVED="RESOLVED",ek.CLOSED="CLOSED",(eC=g||(g={})).BOTTOM_LEFT="BOTTOM_LEFT",eC.BOTTOM_RIGHT="BOTTOM_RIGHT",eC.TOP_LEFT="TOP_LEFT",eC.TOP_RIGHT="TOP_RIGHT",(eA=v||(v={})).CREATE="CREATE",eA.READ="READ",eA.UPDATE="UPDATE",eA.DELETE="DELETE",(eT=_||(_={})).NONE="NONE",eT.FORECAST="FORECAST",eT.SETPOINT="SETPOINT",(eS=y||(y={})).DISCONNECTED="DISCONNECTED",eS.CONNECTING="CONNECTING",eS.DISCONNECTING="DISCONNECTING",eS.CONNECTED="CONNECTED",eS.DISABLED="DISABLED",eS.WAITING="WAITING",eS.ERROR="ERROR",eS.STOPPED="STOPPED",(eI=F||(F={})).REQUEST_START="REQUEST_START",eI.REQUEST_REPEATING="REQUEST_REPEATING",eI.REQUEST_CANCEL="REQUEST_CANCEL",eI.READY="READY",eI.COMPLETED="COMPLETED",eI.RUNNING="RUNNING",eI.CANCELLED="CANCELLED",(eO=x||(x={})).TOGGLE="TOGGLE",eO.INCREMENT="INCREMENT",eO.DECREMENT="DECREMENT",eO.NEGATE="NEGATE",(eD=w||(w={})).ASSET_NOT_FOUND="ASSET_NOT_FOUND",eD.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",eD.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",eD.INVALID_VALUE="INVALID_VALUE",eD.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",eD.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",eD.CANNOT_PROCESS="CANNOT_PROCESS",eD.QUEUE_FULL="QUEUE_FULL",eD.UNKNOWN="UNKNOWN",eD.ASSET_ID_MISSING="ASSET_ID_MISSING",eD.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING",(eR=E||(E={})).PUBLIC="PUBLIC",eR.SHARED="SHARED",eR.PRIVATE="PRIVATE",(eN=k||(k={})).OFF="OFF",eN.ONE_MIN="ONE_MIN",eN.FIVE_MIN="FIVE_MIN",eN.QUARTER="QUARTER",eN.ONE_HOUR="ONE_HOUR",(eL=C||(C={})).WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",eL.KEEP_LAYOUT="KEEP_LAYOUT",eL.REDIRECT="REDIRECT",eL.BLOCK_DEVICE="BLOCK_DEVICE",(eB=A||(A={})).CSV="CSV",eB.CSV_CROSSTAB="CSV_CROSSTAB",eB.CSV_CROSSTAB_MINUTE="CSV_CROSSTAB_MINUTE",(eP=T||(T={})).MINUTE="MINUTE",eP.HOUR="HOUR",eP.DAY="DAY",eP.WEEK="WEEK",eP.MONTH="MONTH",eP.YEAR="YEAR",(eM=S||(S={})).MIN="MIN",eM.AVG="AVG",eM.MAX="MAX",eM.DIFFERENCE="DIFFERENCE",eM.COUNT="COUNT",eM.SUM="SUM",eM.MODE="MODE",eM.MEDIAN="MEDIAN",(ez=I||(I={})).TERMINATING="TERMINATING",ez.DISABLED="DISABLED",ez.ALREADY_CONNECTED="ALREADY_CONNECTED",ez.UNRECOGNISED="UNRECOGNISED",ez.PERMANENT_ERROR="PERMANENT_ERROR",ez.SYNC_ERROR="SYNC_ERROR",(eU=O||(O={})).HTTPS="HTTPS",eU.HTTP="HTTP",eU.TCP="TCP",(ej=D||(D={})).GET="GET",ej.POST="POST",ej.PUT="PUT",ej.DELETE="DELETE",ej.OPTIONS="OPTIONS",ej.PATCH="PATCH",(eV=R||(R={})).KEYCLOAK="KEYCLOAK",eV.NONE="NONE",(eH=N||(N={})).WEBSOCKET="WEBSOCKET",eH.POLLING="POLLING",(e$=L||(L={})).INTERNAL="INTERNAL",e$.CLIENT="CLIENT",e$.GLOBAL_RULESET="GLOBAL_RULESET",e$.REALM_RULESET="REALM_RULESET",e$.ASSET_RULESET="ASSET_RULESET",(eq=B||(B={})).REALM="REALM",eq.USER="USER",eq.ASSET="ASSET",eq.CUSTOM="CUSTOM",(eG=P||(P={})).NORMAL="NORMAL",eG.HIGH="HIGH",(eY=M||(M={})).DEVICE="DEVICE",eY.TOPIC="TOPIC",eY.CONDITION="CONDITION",(eW=z||(z={})).ALWAYS="ALWAYS",eW.ONCE="ONCE",eW.HOURLY="HOURLY",eW.DAILY="DAILY",eW.WEEKLY="WEEKLY",eW.MONTHLY="MONTHLY",eW.ANNUALLY="ANNUALLY",(eX=U||(U={})).TITLE="TITLE",eX.SOURCE="SOURCE",eX.STATUS="STATUS",eX.SENT_ON="SENT_ON",eX.DELIVERED_ON="DELIVERED_ON",(eK=j||(j={})).MESSAGE_INVALID="MESSAGE_INVALID",eK.CERTIFICATE_INVALID="CERTIFICATE_INVALID",eK.UNAUTHORIZED="UNAUTHORIZED",eK.FORBIDDEN="FORBIDDEN",eK.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",eK.CONFIG_DISABLED="CONFIG_DISABLED",eK.USER_DISABLED="USER_DISABLED",eK.SERVER_ERROR="SERVER_ERROR",eK.ASSET_ERROR="ASSET_ERROR",eK.SERVER_BUSY="SERVER_BUSY",(eJ=V||(V={})).PRIVATE="PRIVATE",eJ.PROTECTED="PROTECTED",eJ.PUBLIC="PUBLIC",(eZ=H||(H={})).EXACT="EXACT",eZ.BEGIN="BEGIN",eZ.END="END",eZ.CONTAINS="CONTAINS",(eQ=$||($={})).EQUALS="EQUALS",eQ.GREATER_THAN="GREATER_THAN",eQ.GREATER_EQUALS="GREATER_EQUALS",eQ.LESS_THAN="LESS_THAN",eQ.LESS_EQUALS="LESS_EQUALS",eQ.BETWEEN="BETWEEN",(e0=q||(q={})).CREATED_ON="CREATED_ON",e0.NAME="NAME",e0.ASSET_TYPE="ASSET_TYPE",e0.PARENT_ID="PARENT_ID",e0.REALM="REALM",(e1=G||(G={})).RESTRICTED="RESTRICTED",e1.LINKED="LINKED",e1.REALM="REALM",(e2=Y||(Y={})).AT_LEAST_ONE="AT_LEAST_ONE",e2.ALL="ALL",e2.NONE="NONE",(e5=W||(W={})).AND="AND",e5.OR="OR",(e4=X||(X={})).CREATED_ON="CREATED_ON",e4.FIRST_NAME="FIRST_NAME",e4.LAST_NAME="LAST_NAME",e4.USERNAME="USERNAME",e4.EMAIL="EMAIL",(e3=K||(K={})).STOPPED="STOPPED",e3.RUNNING="RUNNING",e3.ERROR="ERROR",(e6=J||(J={})).JAVASCRIPT="JAVASCRIPT",e6.GROOVY="GROOVY",e6.JSON="JSON",e6.FLOW="FLOW",(e8=Z||(Z={})).READY="READY",e8.DEPLOYED="DEPLOYED",e8.COMPILATION_ERROR="COMPILATION_ERROR",e8.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",e8.EXECUTION_ERROR="EXECUTION_ERROR",e8.LOOP_ERROR="LOOP_ERROR",e8.DISABLED="DISABLED",e8.PAUSED="PAUSED",e8.EXPIRED="EXPIRED",e8.REMOVED="REMOVED",e8.EMPTY="EMPTY",(e7=Q||(Q={})).SUNRISE="SUNRISE",e7.SUNSET="SUNSET",e7.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",e7.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",e7.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",e7.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",e7.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",e7.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",e7.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",e7.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",e7.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",e7.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",e7.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",e7.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",e7.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",e7.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",e7.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",e7.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",e7.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",e7.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR",(e9=ee||(ee={})).NUMBER="NUMBER",e9.NUMBER_ARRAY="NUMBER_ARRAY",e9.STRING="STRING",e9.BOOLEAN="BOOLEAN",e9.TRIGGER="TRIGGER",e9.COLOR="COLOR",e9.ANY="ANY",(te=et||(et={})).NEW_LINE="NEW_LINE",te.SPACER="SPACER",(tt=en||(en={})).INPUT="INPUT",tt.PROCESSOR="PROCESSOR",tt.OUTPUT="OUTPUT",tt.THEN="THEN",(tn=ei||(ei={})).TEXT="TEXT",tn.MULTILINE="MULTILINE",tn.NUMBER="NUMBER",tn.DROPDOWN="DROPDOWN",tn.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",tn.CHECKBOX="CHECKBOX",tn.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",tn.COLOR="COLOR",tn.DATE="DATE",(ti=eo||(eo={})).ADD="ADD",ti.ADD_OR_REPLACE="ADD_OR_REPLACE",ti.REPLACE="REPLACE",ti.DELETE="DELETE",ti.CLEAR="CLEAR",(to=er||(er={})).PER_ASSET="PER_ASSET",to.GLOBAL="GLOBAL",(tr=ea||(ea={})).READ_ADMIN="read:admin",tr.READ_LOGS="read:logs",tr.READ_USERS="read:users",tr.READ_MAP="read:map",tr.READ_ASSETS="read:assets",tr.READ_RULES="read:rules",tr.READ_INSIGHTS="read:insights",tr.READ_ALARMS="read:alarms",tr.READ_NOTIFICATIONS="read:notifications",tr.READ_SERVICES="read:services",tr.READ_TUNNELS="read:tunnels",tr.WRITE_SERVICES="write:services",tr.WRITE_USER="write:user",tr.WRITE_ADMIN="write:admin",tr.WRITE_LOGS="write:logs",tr.WRITE_ASSETS="write:assets",tr.WRITE_ATTRIBUTES="write:attributes",tr.WRITE_RULES="write:rules",tr.WRITE_INSIGHTS="write:insights",tr.WRITE_ALARMS="write:alarms",tr.WRITE_NOTIFICATIONS="write:notifications",tr.WRITE_TUNNELS="write:tunnels",tr.READ="read",tr.WRITE="write",(ta=es||(es={})).REGISTER="REGISTER",ta.UPDATE="UPDATE",ta.DEREGISTER="DEREGISTER",(ts=ec||(ec={})).AVAILABLE="AVAILABLE",ts.UNAVAILABLE="UNAVAILABLE",(tc=el||(el={})).ASSET="ASSET",tc.AGENT="AGENT",tc.NOTIFICATION="NOTIFICATION",tc.ALARM="ALARM",tc.RULES="RULES",tc.PROTOCOL="PROTOCOL",tc.GATEWAY="GATEWAY",tc.MODEL_AND_VALUES="MODEL_AND_VALUES",tc.API="API",tc.DATA="DATA",(tl=ed||(ed={})).INFO="INFO",tl.WARN="WARN",tl.ERROR="ERROR",(td=em||(em={})).NUMERIC="numeric",td.DIGIT_2="2-digit",td.FULL="full",td.LONG="long",td.MEDIUM="medium",td.SHORT="short",td.NARROW="narrow",(tm=eu||(eu={})).SECONDLY="SECONDLY",tm.MINUTELY="MINUTELY",tm.HOURLY="HOURLY",tm.DAILY="DAILY",tm.WEEKLY="WEEKLY",tm.MONTHLY="MONTHLY",tm.YEARLY="YEARLY",(tu=ef||(ef={})).OMIT="OMIT",tu.BACKWARD="BACKWARD",tu.FORWARD="FORWARD",(tf=ep||(ep={})).JAPANESE="JAPANESE",tf.BUDDHIST="BUDDHIST",tf.ROC="ROC",tf.ISLAMIC="ISLAMIC",tf.ISO8601="ISO8601",tf.CHINESE="CHINESE",tf.ETHIOPIC="ETHIOPIC",tf.HEBREW="HEBREW",tf.GREGORIAN="GREGORIAN",(tp=eh||(eh={})).SU="SU",tp.MO="MO",tp.TU="TU",tp.WE="WE",tp.TH="TH",tp.FR="FR",tp.SA="SA",(th=eb||(eb={})).PEOPLECOUNTERASSET="PeopleCounterAsset",th.MAILAGENT="MailAgent",th.UDPAGENT="UDPAgent",th.ROOMASSET="RoomAsset",th.CITYASSET="CityAsset",th.VENTILATIONASSET="VentilationAsset",th.TRADFRILIGHTASSET="TradfriLightAsset",th.CONSOLEASSET="ConsoleAsset",th.PRESENCESENSORASSET="PresenceSensorAsset",th.OPENWEATHERMAPAGENT="OpenWeatherMapAgent",th.LIGHTASSET="LightAsset",th.KNXAGENT="KNXAgent",th.THETHINGSSTACKAGENT="TheThingsStackAgent",th.PLUGASSET="PlugAsset",th.CHIRPSTACKAGENT="ChirpStackAgent",th.WEATHERASSET="WeatherAsset",th.THINGASSET="ThingAsset",th.WEBSOCKETAGENT="WebsocketAgent",th.TCPAGENT="TCPAgent",th.GATEWAYASSET="GatewayAsset",th.SERIALAGENT="SerialAgent",th.BLUETOOTHMESHAGENT="BluetoothMeshAgent",th.PARKINGASSET="ParkingAsset",th.TRADFRIPLUGASSET="TradfriPlugAsset",th.SIMULATORAGENT="SimulatorAgent",th.SNMPAGENT="SNMPAgent",th.GROUPASSET="GroupAsset",th.BUILDINGASSET="BuildingAsset",th.MODBUSSERIALAGENT="ModbusSerialAgent",th.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",th.MQTTAGENT="MQTTAgent",th.VELBUSTCPAGENT="VelbusTCPAgent",th.ARTNETLIGHTASSET="ArtnetLightAsset",th.VELBUSSERIALAGENT="VelbusSerialAgent",th.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",th.MICROPHONEASSET="MicrophoneAsset",th.MODBUSTCPAGENT="ModbusTcpAgent",th.ZWAVEAGENT="ZWaveAgent",th.HTTPAGENT="HTTPAgent",th.DOORASSET="DoorAsset",th.THERMOSTATASSET="ThermostatAsset",th.SHIPASSET="ShipAsset",(tb=eg||(eg={})).COLOURRGB="colourRGB",tb.WILDCARDSUBSCRIPTIONTOPICS="wildcardSubscriptionTopics",tb.PRICEHOURLY="priceHourly",tb.MQTTPORT="MQTTPort",tb.PINGDISABLED="pingDisabled",tb.FLOW="flow",tb.CHILDASSETTYPE="childAssetType",tb.LASTACCESS="lastAccess",tb.POSITION="position",tb.NETWORKKEY="networkKey",tb.UNIVERSE="universe",tb.ROUTINGMODE="routingMode",tb.MSSINUMBER="MSSINumber",tb.LASTWILLRETAIN="lastWillRetain",tb.LASTWILLTOPIC="lastWillTopic",tb.SERIALBAUDRATE="serialBaudrate",tb.SUBSCRIBEQOS="subscribeQos",tb.LEDCOUNT="lEDCount",tb.LOCKED="locked",tb.CLOUDCOVERAGE="cloudCoverage",tb.BASEURL="baseURL",tb.PROTOCOL="protocol",tb.REQUIREDVALUES="requiredValues",tb.REGION="region",tb.CONSOLEPLATFORM="consolePlatform",tb.GATEWAYSTATUS="gatewayStatus",tb.NO2LEVEL="NO2Level",tb.ATMOSPHERICPRESSURE="atmosphericPressure",tb.SERIALPORT="serialPort",tb.APPLICATIONID="applicationId",tb.TAGS="tags",tb.UNLOCK="unlock",tb.CHECKINTERVALSECONDS="checkIntervalSeconds",tb.LOCATION="location",tb.CLIENTSECRET="clientSecret",tb.WINDDIRECTION="windDirection",tb.WINDSPEED="windSpeed",tb.PARTICLESPM10="particlesPM10",tb.APPLICATIONKEY="applicationKey",tb.LENGTH="length",tb.PROBABILITYOFPRECIPITATION="probabilityOfPrecipitation",tb.USERNAMEPASSWORD="usernamePassword",tb.WATERLEVEL="waterLevel",tb.CONNECTHEADERS="connectHeaders",tb.CONSOLENAME="consoleName",tb.WEBSOCKETQUERY="websocketQuery",tb.PREFERHTML="preferHTML",tb.PARITY="parity",tb.COOLING="cooling",tb.POLLINGMILLIS="pollingMillis",tb.SOILTEMPERATURE="soilTemperature",tb.SUNIRRADIANCE="sunIrradiance",tb.MESSAGEMAXLENGTH="messageMaxLength",tb.WINDGUSTSPEED="windGustSpeed",tb.LIGHTID="lightId",tb.PROXYADDRESS="proxyAddress",tb.REQUESTQUERYPARAMETERS="requestQueryParameters",tb.MQTTHOST="MQTTHost",tb.SECUREGRPC="secureGRPC",tb.MODEL="model",tb.STREET="street",tb.MANUFACTURER="manufacturer",tb.DELETEPROCESSEDMAIL="deleteProcessedMail",tb.RESUMESESSION="resumeSession",tb.ONOFF="onOff",tb.APIKEY="ApiKey",tb.CITY="city",tb.PRESENCE="presence",tb.SPACESOCCUPIED="spacesOccupied",tb.STARTTLS="startTLS",tb.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",tb.WEBSOCKETPATH="websocketPath",tb.AGENTSTATUS="agentStatus",tb.PRICEDAILY="priceDaily",tb.COUNTGROWTHMINUTE="countGrowthMinute",tb.IMONUMBER="IMONumber",tb.ATTRIBUTION="Attribution",tb.TENANTID="tenantId",tb.REQUESTHEADERS="requestHeaders",tb.HOST="host",tb.COUNTOUTMINUTE="countOutMinute",tb.MESSAGECHARSET="messageCharset",tb.CERTIFICATEALIAS="certificateAlias",tb.EMAIL="email",tb.BINDPORT="bindPort",tb.CONSOLEVERSION="consoleVersion",tb.PARTICLESPM1="particlesPM1",tb.MTU="mtu",tb.SPEED="speed",tb.MESSAGESTRIPDELIMITER="messageStripDelimiter",tb.AREA="area",tb.COUNTRY="country",tb.SHIPTYPE="shipType",tb.CONNECTSUBSCRIPTIONS="connectSubscriptions",tb.RELATIVEHUMIDITY="relativeHumidity",tb.SOURCEADDRESS="sourceAddress",tb.RAINFALL="rainfall",tb.OAUTHGRANT="oAuthGrant",tb.OZONELEVEL="ozoneLevel",tb.SEQUENCENUMBER="sequenceNumber",tb.COUNTINMINUTE="countInMinute",tb.PORT="port",tb.SUNALTITUDE="sunAltitude",tb.COUNTOUT="countOut",tb.ROOMNUMBER="roomNumber",tb.TUNNELINGSUPPORTED="tunnelingSupported",tb.ENINUMBER="ENINumber",tb.PARTICLESPM2_5="particlesPM2_5",tb.AGENTDISABLED="agentDisabled",tb.DISABLED="disabled",tb.COUNTIN="countIn",tb.MESSAGESOURCEADDRESS="messageSourceAddress",tb.PROVISIONWEATHERASSET="ProvisionWeatherAsset",tb.TIMEINJECTIONINTERVAL="timeInjectionInterval",tb.TEMPERATURESETPOINT="temperatureSetpoint",tb.CONSOLEPROVIDERS="consoleProviders",tb.COUNTTOTAL="countTotal",tb.SPACESBUFFER="spacesBuffer",tb.DEVICECONFIG="deviceConfig",tb.SPACESTOTAL="spacesTotal",tb.BINDHOST="bindHost",tb.FANSPEED="fanSpeed",tb.MESSAGECONVERTBINARY="messageConvertBinary",tb.NOTES="notes",tb.MAILFOLDERNAME="mailFolderName",tb.MESSAGEDELIMITERS="messageDelimiters",tb.TEMPERATURE="temperature",tb.SUNZENITH="sunZenith",tb.SNMPVERSIONVALUE="SNMPVersionValue",tb.BRIGHTNESS="brightness",tb.POSTALCODE="postalCode",tb.SPACESOPEN="spacesOpen",tb.HUMIDITY="humidity",tb.SOUNDLEVEL="soundLevel",tb.SECUREMODE="secureMode",tb.DIRECTION="direction",tb.STOPBITS="stopbits",tb.UVINDEX="uVIndex",tb.CONNECTURL="connectURL",tb.CLIENTID="clientId",tb.NATMODE="NATMode",tb.UPDATEONWRITE="updateOnWrite",tb.LASTWILLPAYLOAD="lastWillPayload",tb.GROUPID="groupId",tb.FOLLOWREDIRECTS="followRedirects",tb.SUNAZIMUTH="sunAzimuth",tb.MESSAGECONVERTHEX="messageConvertHex",tb.WEBSOCKETMODE="websocketMode",tb.COLOURTEMPERATURE="colourTemperature",tb.PUBLISHQOS="publishQos",tb.DATABITS="dataBits",(tg=ev||(ev={})).FORMAT="format",tg.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",tg.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",tg.SECRET="secret",tg.APPLYPREDICTEDDATAPOINTS="applyPredictedDataPoints",tg.ATTRIBUTELINKS="attributeLinks",tg.RULERESETIMMEDIATE="ruleResetImmediate",tg.RULESTATE="ruleState",tg.AGENTLINKCONFIG="agentLinkConfig",tg.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",tg.FORECAST="forecast",tg.STOREDATAPOINTS="storeDataPoints",tg.LABEL="label",tg.CONSTRAINTS="constraints",tg.UNITS="units",tg.USERCONNECTED="userConnected",tg.SHOWONDASHBOARD="showOnDashboard",tg.READONLY="readOnly",tg.MULTILINE="multiline",tg.ACCESSPUBLICWRITE="accessPublicWrite",tg.MOMENTARY="momentary",tg.AGENTLINK="agentLink",tg.ACCESSRESTRICTEDREAD="accessRestrictedRead",tg.ACCESSPUBLICREAD="accessPublicRead",(tv=e_||(e_={})).ASSETQUERY="assetQuery",tv.WSURL="WS_URL",tv.COLOURRGB="colourRGB",tv.VALUEFORMAT="valueFormat",tv.TEXT="text",tv.BYTE="byte",tv.USERNAMEANDPASSWORD="usernameAndPassword",tv.HTTPURL="HTTP_URL",tv.ATTRIBUTELINK="attributeLink",tv.ASSETID="assetID",tv.NUMBERMAP="numberMap",tv.HTTPMETHOD="HTTPMethod",tv.ATTRIBUTESTATE="attributeState",tv.POSITIVENUMBER="positiveNumber",tv.POSITIVEINTEGER="positiveInteger",tv.EXECUTIONSTATUS="executionStatus",tv.BIGINTEGER="bigInteger",tv.VALUEDESCRIPTOR="valueDescriptor",tv.PERIODDURATIONISO8601="periodDurationISO8601",tv.LONG="long",tv.DATEANDTIME="dateAndTime",tv.BOOLEANMAP="booleanMap",tv.MQTTQOS="MQTTQos",tv.NEGATIVEINTEGER="negativeInteger",tv.TCPIPPORTNUMBER="TCP_IPPortNumber",tv.GEOJSONPOINT="GEO_JSONPoint",tv.SNMPVERSION="SNMPVersion",tv.ASSETTYPE="assetType",tv.JSONOBJECT="JSONObject",tv.INTEGERMAP="integerMap",tv.BIGNUMBER="bigNumber",tv.IPADDRESS="IPAddress",tv.EMAIL="email",tv.TIMESTAMP="timestamp",tv.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",tv.ATTRIBUTEREFERENCE="attributeReference",tv.UUID="UUID",tv.INTEGER="integer",tv.OAUTHGRANT="oAuthGrant",tv.NUMBER="number",tv.DEVICECONFIGMAP="DeviceConfigMap",tv.TEXTMAP="textMap",tv.WEBSOCKETSUBSCRIPTION="websocketSubscription",tv.BOOLEAN="boolean",tv.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",tv.FORECASTCONFIGURATION="forecastConfiguration",tv.TIMEDURATIONISO8601="timeDurationISO8601",tv.TIMESTAMPISO8601="timestampISO8601",tv.CONSOLEPROVIDERS="consoleProviders",tv.MULTIVALUEDTEXTMAP="multivaluedTextMap",tv.NEGATIVENUMBER="negativeNumber",tv.PARITYBIT="Paritybit",tv.JSON="JSON",tv.CRONEXPRESSION="CRONExpression",tv.INTEGERBYTE="integerByte",tv.AGENTLINK="agentLink",tv.DIRECTION="direction",tv.HOSTORIPADDRESS="hostOrIPAddress",tv.STOPBITS="Stopbits",tv.CALENDAREVENT="calendarEvent",tv.CONNECTIONSTATUS="connectionStatus",tv.VALUECONSTRAINT="valueConstraint",(t_=ey||(ey={})).MONTH="month",t_.MILE_SCANDINAVIAN="mile_scandinavian",t_.VAR="var",t_.OUNCE="ounce",t_.HECTARE="hectare",t_.YARD="yard",t_.YEAR="year",t_.GIGA="giga",t_.JOULE="joule",t_.VOLT="volt",t_.HERTZ="hertz",t_.MILE="mile",t_.DEGREE="degree",t_.KILO="kilo",t_.BTU="btu",t_.TERA="tera",t_.FOOT="foot",t_.MEGA="mega",t_.KELVIN="kelvin",t_.CARBON="carbon",t_.DECIBEL_ATTENUATED="decibel_attenuated",t_.INCH="inch",t_.SQUARED="squared",t_.PERCENTAGE="percentage",t_.IN_HG="inch_mercury",t_.CENTI="centi",t_.GRAM="gram",t_.CUBED="cubed",t_.DAY="day",t_.RADIAN="radian",t_.OHM="ohm",t_.MINUTE="minute",t_.PART_PER_MILLION="ppm",t_.AMP="amp",t_.MASS_POUND="pound",t_.KNOT="knot",t_.METRE="metre",t_.LITRE="litre",t_.FLUID_OUNCE="fluid_ounce",t_.HOUR="hour",t_.ACRE="acre",t_.CELSIUS="celsius",t_.RPM="rpm",t_.PASCAL="pascal",t_.DECIBEL="decibel",t_.LUMEN="lumen",t_.WEEK="week",t_.FAHRENHEIT="fahrenheit",t_.WATT="watt",t_.GALLON="gallon",t_.LUX="lux",t_.MILLI="milli",t_.BAR="bar",t_.HECTO="hecto",t_.PEAK="peak",t_.SECOND="second",t_.MICRO="micro",t_.PER="per",t_.STONE="stone",eF||(eF={});class ty{static getAssetDescriptors(){return ty._assetTypeInfos.map(d=>d.assetDescriptor)}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(d){if(d)return d.assetDescriptor?d:("string"!=typeof d&&(d=d.name),this._assetTypeInfos.find(m=>m.assetDescriptor.name===d))}static getAssetDescriptor(d){if(!d)return;if(d.assetDescriptor)return d.assetDescriptor;if("string"!=typeof d)return d;let m=this._assetTypeInfos.find(m=>m.assetDescriptor.name===d);return m?m.assetDescriptor:void 0}static getAttributeDescriptor(d,m){if(!d)return;let u=this.getAssetTypeInfo(m||"ThingAsset");if(u&&u.attributeDescriptors)return u.attributeDescriptors.find(m=>m.name===d)}static getValueDescriptor(d){let m;if(!d)return;if(d.endsWith("[]"))for(m=0;d.endsWith("[]");)d=d.substring(0,d.length-2),m++;let u=this._valueDescriptors.find(m=>m.name===d);return u&&m&&(u=Object.assign(Object.assign({},u),{arrayDimensions:m})),u}static resolveValueDescriptor(d,m){let u;return m&&("string"==typeof m&&(u=ty.getValueDescriptor(m)),u=m.jsonType?m:ty.getValueDescriptor(m.type)),!u&&d&&(u=ty.getValueDescriptor("JSON")),u}static resolveValueTypeFromValue(d){if(null!=d){if("number"==typeof d)return"number";if("string"==typeof d)return"text";if("boolean"==typeof d)return"boolean";if(Array.isArray(d)){let m=1,u=d.find(d=>null!=d);for(;Array.isArray(u);)u=u.find(d=>null!=d),m++;let f=this.resolveValueTypeFromValue(u);if(!f)return;for(;m>0;)f+="[]",m--;return f}if(d instanceof Date)return"dateAndTime"}}static getAttributeAndValueDescriptors(d,m,u){let f,p;if(m&&"string"!=typeof m)f=m;else{let p=this.getAssetTypeInfo(d||"ThingAsset");if(!p)return[void 0,void 0];"string"==typeof m&&(f=this.getAttributeDescriptor(m,p)),!f&&u&&(f={type:u.type,name:u.name,meta:u.meta})}return f&&(p=this.getValueDescriptor(f.type)),[f,p]}static getMetaItemDescriptor(d){if(d)return this._metaItemDescriptors.find(m=>m.name===d)}static getAssetDescriptorColour(d,m){let u=this.getAssetDescriptor(d);return u&&u.colour?u.colour:m}static getAssetDescriptorIcon(d,m){let u=this.getAssetDescriptor(d);return u&&u.icon?u.icon:m}}ty._assetTypeInfos=[],ty._metaItemDescriptors=[],ty._valueDescriptors=[]},9705(d,m,u){"use strict";var f=u(7364);let p=(0,f.AH)`
844
+ `},4532(d,m,u){!function(d){"use strict";var m,u,f=function(){try{if(d.URLSearchParams&&"bar"===new d.URLSearchParams("foo=bar").get("foo"))return d.URLSearchParams}catch(d){}return null}(),p=f&&"a=1"===new f({a:1}).toString(),h=f&&"+"===new f("s=%2B").get("s"),b=f&&"size"in f.prototype,g="__URLSearchParams__",v=!f||((m=new f).append("s"," &"),"s=+%26"===m.toString()),_=w.prototype,y=!!(d.Symbol&&d.Symbol.iterator);if(!f||!p||!h||!v||!b){_.append=function(d,m){T(this[g],d,m)},_.delete=function(d){delete this[g][d]},_.get=function(d){var m=this[g];return this.has(d)?m[d][0]:null},_.getAll=function(d){var m=this[g];return this.has(d)?m[d].slice(0):[]},_.has=function(d){return I(this[g],d)},_.set=function(d,m){this[g][d]=[""+m]},_.toString=function(){var d,m,u,f,p=this[g],h=[];for(m in p)for(u=E(m),d=0,f=p[m];d<f.length;d++)h.push(u+"="+E(f[d]));return h.join("&")};var F=d.Proxy&&f&&(!h||!v||!p||!b);F?(u=new Proxy(f,{construct:function(d,m){return new d(new w(m[0]).toString())}})).toString=Function.prototype.toString.bind(w):u=w,Object.defineProperty(d,"URLSearchParams",{value:u});var x=d.URLSearchParams.prototype;x.polyfill=!0,!F&&d.Symbol&&(x[d.Symbol.toStringTag]="URLSearchParams"),"forEach"in x||(x.forEach=function(d,m){var u=A(this.toString());Object.getOwnPropertyNames(u).forEach(function(f){u[f].forEach(function(u){d.call(m,u,f,this)},this)},this)}),"sort"in x||(x.sort=function(){var d,m,u,f=A(this.toString()),p=[];for(d in f)p.push(d);for(p.sort(),m=0;m<p.length;m++)this.delete(p[m]);for(m=0;m<p.length;m++){var h=p[m],b=f[h];for(u=0;u<b.length;u++)this.append(h,b[u])}}),"keys"in x||(x.keys=function(){var d=[];return this.forEach(function(m,u){d.push(u)}),C(d)}),"values"in x||(x.values=function(){var d=[];return this.forEach(function(m){d.push(m)}),C(d)}),"entries"in x||(x.entries=function(){var d=[];return this.forEach(function(m,u){d.push([u,m])}),C(d)}),y&&(x[d.Symbol.iterator]=x[d.Symbol.iterator]||x.entries),"size"in x||Object.defineProperty(x,"size",{get:function(){var d=A(this.toString());if(x===this)throw TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(d).reduce(function(m,u){return m+d[u].length},0)}})}function w(d){((d=d||"")instanceof URLSearchParams||d instanceof w)&&(d=d.toString()),this[g]=A(d)}function E(d){var m={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(d).replace(/[!'\(\)~]|%20|%00/g,function(d){return m[d]})}function k(d){return d.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(d){return decodeURIComponent(d)})}function C(m){var u={next:function(){var d=m.shift();return{done:void 0===d,value:d}}};return y&&(u[d.Symbol.iterator]=function(){return u}),u}function A(d){var m={};if("object"==typeof d)if(S(d))for(var u=0;u<d.length;u++){var f=d[u];if(S(f)&&2===f.length)T(m,f[0],f[1]);else throw TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var p in d)d.hasOwnProperty(p)&&T(m,p,d[p]);else{0===d.indexOf("?")&&(d=d.slice(1));for(var h=d.split("&"),b=0;b<h.length;b++){var g=h[b],v=g.indexOf("=");-1<v?T(m,k(g.slice(0,v)),k(g.slice(v+1))):g&&T(m,k(g),"")}}return m}function T(d,m,u){var f="string"==typeof u?u:null!=u&&"function"==typeof u.toString?u.toString():JSON.stringify(u);I(d,m)?d[m].push(f):d[m]=[f]}function S(d){return!!d&&"[object Array]"===Object.prototype.toString.call(d)}function I(d,m){return Object.prototype.hasOwnProperty.call(d,m)}}(void 0!==u.g?u.g:"u">typeof window?window:this)},6923(d,m,u){"use strict";let f,p,h,b,g;u.d(m,{WO:()=>iv,PR:()=>i_,Iy:()=>ix,BB:()=>ig,Id:()=>iy,BH:()=>iF,J0:()=>T,Ay:()=>iT,B1:()=>ib});var v,_,y,F,x,w,E,k,C,A,T={};u.r(T),u.d(T,{cY:()=>N,C3:()=>B,Ri:()=>M,Th:()=>X,sY:()=>K,F2:()=>j,N0:()=>V,Rk:()=>H,DH:()=>L,jX:()=>P,B8:()=>Y,NM:()=>W,Hh:()=>z});var S={};u.r(S),u.d(S,{hasBrowserEnv:()=>tc,hasStandardBrowserEnv:()=>td,hasStandardBrowserWebWorkerEnv:()=>tm,navigator:()=>tl,origin:()=>tu}),u(4532);var I=u(2764),O=u(3583),D=u(4867),R=u.n(D);u(3472);class N{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((d,m)=>{this._resolve=d,this._reject=m}),Object.freeze(this)}}function L(d,m,u=!0){if(null==d||null==m)return d===m;if(d.constructor!==m.constructor)return!1;if(d instanceof Function||d instanceof RegExp)return d===m;if(d===m||d.valueOf()===m.valueOf())return!0;if(Array.isArray(d)&&d.length!==m.length||d instanceof Date||!(d instanceof Object)||!(m instanceof Object))return!1;if(u){if(Array.isArray(d))return d.every((d,u)=>L(d,m[u]));let u=Object.keys(d);return Object.keys(m).every(d=>-1!==u.indexOf(d))&&u.every(u=>L(d[u],m[u]))}return!1}function B(d,m){if(0===d.length)return;let u=d.indexOf(m);u>=0&&d.splice(u,1)}function P(d){return null==d?"":d.split(" ").map((d,m)=>0===m?d[0].toLowerCase()+d.substring(1):d[0].toUpperCase()+d.substring(1)).join("")}function M(d){if(null==d)return"";let m=!1;return d.split(/([A-Z]|\d)/).map((d,u,f)=>{if(!d)return d;if(!m)return m=!0,d.charAt(0).toUpperCase()+d.slice(1);if("_"===d)return" ";if(1===d.length&&d===d.toUpperCase()){let m=!f[u-1]||"_"===f[u-1],p=u+1<f.length&&f[u+1]&&"_"!==f[u+1],h=u+3>f.length||!f[u+1]&&!f[u+3];(!m||p)&&(d=" "+d),!p&&(m||h)||(d=d.toLowerCase())}return d}).join("").trim()}function z(d,m){if(m===d)return!0;let u=d.endsWith("*"),f=!u&&d.startsWith("*"),p=!u&&!f&&d.startsWith("^")&&d.endsWith("$");if(u&&m.startsWith(d.substr(0,d.length-1))||f&&m.endsWith(d.substr(1)))return!0;if(p)try{return new RegExp(d).test(m)}catch(d){console.error("Failed to compile needle as a RegExp: "+d)}return!1}function U(d,m,u){let f="string"==typeof d?d:d.name;return m&&m.meta&&m.meta.hasOwnProperty(f)?m.meta[f]:u&&u.meta?u.meta[f]:void 0}function j(d){return("string"==typeof d&&(d=I.u0.getAssetDescriptor(d)),d)?O.Ay.t("label.asset."+d.name,{defaultValue:M(d.name)}):""}function V(d,m,u,f,p){return function(d,m,u,f,p,h){let b=G("label",d,m,u,p),g="";if(b||(b=U("label",d,m&&m.meta?m:void 0)),f&&(g=$(q("units",d,m,u,p))),!b){let u=d?d.name:m?"string"==typeof m?m:m.name:void 0;b=h||(u?M(u):void 0)}return b?b+(g?" ("+g+")":""):g}(d,m,u,f,!0,p)}function H(d,m,u,f){let p="";if(null==d)p=f||"";else if("string"==typeof d)p=d;else if("number"==typeof d||"boolean"==typeof d||d instanceof Date){let f=m&&m();if(f&&0!==Object.keys(f).length)switch("number"==typeof d?f.asBoolean?d=!!d:f.asDate&&(d=new Date(d)):"boolean"==typeof d&&f.asNumber&&(d=+!!d),typeof d){case"number":p=new Intl.NumberFormat(u||O.Ay.language,f).format(d);break;case"boolean":f.asOnOff&&(p=d?O.Ay.t("on"):O.Ay.t("off")),f.asOpenClosed&&(p=d?O.Ay.t("open"):O.Ay.t("closed")),f.asPressedReleased&&(p=d?O.Ay.t("pressed"):O.Ay.t("released"));break;case"object":if(f.momentJsFormat)p=R()(d).format(f.momentJsFormat);else if(f.iso8601)p=d.toISOString();else if(f.week){var h;let m,u=((h=new Date(Date.UTC((h=d).getFullYear(),h.getMonth(),h.getDate()))).setUTCDate(h.getUTCDate()+4-(h.getUTCDay()||7)),m=new Date(Date.UTC(h.getUTCFullYear(),0,1)),Math.ceil(((h.getTime()-m.getTime())/864e5+1)/7));p="2-digit"===f.week?String(u).padStart(2,"0"):Number(u).toString(10)}else p=new Intl.DateTimeFormat(u||O.Ay.language,f).format(d)}else p=Object(d).toString()}return p}function $(d,m){if(!d)return"";m||(m="");let u=d.map((d,u)=>{if(3!==d.length||d.toUpperCase()!==d)return O.Ay.t(["units."+d,"or:units."+d]);{let f=new Intl.NumberFormat(O.Ay.language,{currency:d,style:"currency"}).formatToParts();if(0!==u||"currency"!==f[0].type)return"currency"===f[0].type?f[0].value:f[f.length-1].value;if(!m)return f[0].value;m=f[0].value+m}}).join("");return m.length>0?m+" "+u:u}function q(d,m,u,f,p){let h,b=[],g=G(d,m&&"string"==typeof m?m:m?m.name:u?"string"==typeof u?u:u.name:void 0,u,f,p);if(g&&(h=JSON.parse(g)))if("format"!==d)return h;else b.push(h);if(m&&m.meta&&(h=U(d,m,u)))if("format"!==d)return h;else b.push(h);if(u&&"string"!=typeof u&&u.hasOwnProperty(d)){if(h=u[d],"format"!==d)return h;b.push(h)}if(u&&u.type){if(h=I.u0.getValueDescriptor(u.type)[d],"format"!==d)return h;b.push(h)}if("format"!==d||0===b.length)return h;let v={};return b.reverse().forEach(d=>{v=Object.assign(Object.assign({},v),d)}),v}function G(d,m,u,f,p,h){let b;if(m?b="string"==typeof m?m:m.name:u&&(b="string"==typeof u?u:u.name),!b)return;let g=[],v=d+"."+(p?"attribute":"meta")+".";if(f&&g.push(v+f+"."+b),u&&"string"!=typeof u&&(g.push(v+u.type+"."+b),g.push(v+u.type)),g.push(v+b),g.length>0)return O.Ay.t(g,{defaultValue:h||""})}function Y(d){return(m,u)=>{let f=d(m),p=d(u);return f||p?f&&!p?1:!f&&p?-1:f-p:0}}function W(d){return(m,u)=>{let f=d(m),p=d(u);return f||p?f&&!p?1:!f&&p?-1:f.localeCompare(p):0}}function X(d,m){let u=new N;return d.dispatchEvent(m),window.setTimeout(()=>{u.resolve(m.detail)}),u.promise}function K(){return"function"==typeof crypto.randomUUID?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,d=>(d^crypto.getRandomValues(new Uint8Array(1))[0]&15>>d/4).toString(16))}class J{constructor(d){d&&Object.assign(this,d)}matches(d){var m,u,f,p,h,b,g;if((null==(m=this.ids)?void 0:m.length)&&(!d.id||!this.ids.includes(d.id))||(null==(u=this.types)?void 0:u.length)&&(!d.type||!this.types.includes(d.type))||(null==(f=this.realm)?void 0:f.name)&&d.realm!==this.realm.name||(null==(p=this.parents)?void 0:p.length)&&!this.parents.some(m=>!m.id||d.parentId===m.id))return!1;if(null==(h=this.paths)?void 0:h.length){let m=null!=(b=d.path)?b:[];if(!this.paths.some(d=>{var u;return(null!=(u=d.path)?u:[]).every((d,u)=>m[u]===d)}))return!1}return(null==(g=this.names)||!g.length||!!this.names.every(m=>J._evalValuePredicate(d.name,m)))&&(!this.attributes||J._evalGroup(d,this.attributes))}static getUnsupportedFields(d){return Object.keys(d).filter(d=>!J._SUPPORTED_FIELDS.has(d))}collectAttributeNames(){return this.attributes?J._collectNames(this.attributes):[]}static _evalValuePredicate(d,m){var u;switch(m.predicateType){case"string":{let f;if(null==d)return!1;let p=!1!==m.caseSensitive?String(d):String(d).toLowerCase(),h=!1!==m.caseSensitive?m.value:null==(u=m.value)?void 0:u.toLowerCase();switch(m.match){case"BEGIN":f=p.startsWith(h);break;case"END":f=p.endsWith(h);break;case"CONTAINS":f=p.includes(h);break;default:f=p===h}return m.negate?!f:f}case"boolean":return d===m.value;case"number":{let u;if("number"!=typeof d)return!1;switch(m.operator){case"GREATER_THAN":u=d>m.value;break;case"GREATER_EQUALS":u=d>=m.value;break;case"LESS_THAN":u=d<m.value;break;case"LESS_EQUALS":u=d<=m.value;break;case"BETWEEN":u=d>=m.value&&d<=m.rangeValue;break;default:u=d===m.value}return m.negate?!u:u}}return!1}static _evalPredicate(d,m){var u,f;let p=null==(u=m.name)?void 0:u.value;if(!p)return!0;let h=null==(f=d.attributes)?void 0:f[p];if(!h)return!!m.negated;let b=!m.value||J._evalValuePredicate(h.value,m.value);return m.negated?!b:b}static _evalGroup(d,m){var u,f,p;let h=null!=(u=m.operator)?u:"AND",b=[...(null!=(f=m.items)?f:[]).map(m=>J._evalPredicate(d,m)),...(null!=(p=m.groups)?p:[]).map(m=>J._evalGroup(d,m))];return!b.length||("OR"===h?b.some(Boolean):b.every(Boolean))}static _collectNames(d){var m,u;return[...(null!=(m=d.items)?m:[]).map(d=>{var m;return null==(m=d.name)?void 0:m.value}).filter(d=>!!d),...(null!=(u=d.groups)?u:[]).flatMap(d=>J._collectNames(d))]}}J._SUPPORTED_FIELDS=new Set(["ids","types","names","parents","paths","realm","attributes"]);var Z=function(d,m,u,f){return new(u||(u=Promise))(function(p,h){function b(d){try{v(f.next(d))}catch(d){h(d)}}function g(d){try{v(f.throw(d))}catch(d){h(d)}}function v(d){var m;d.done?p(d.value):((m=d.value)instanceof u?m:new u(function(d){d(m)})).then(b,g)}v((f=f.apply(d,m||[])).next())})};let Q=u(4461);class ee{constructor(d,m,u){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=d,this._autoEnable=m,this._enableCompleteCallback=u,window.OpenRemoteConsole=this;let f=new URLSearchParams(window.location.search),p=f.get("consoleName"),h=f.get("consoleVersion"),b=f.get("consolePlatform"),g=f.get("consoleProviders"),v=f.get("consoleAutoEnable"),_=g&&g.length>0?g.split(" "):["push"];this._pendingProviderEnables=_;let y=ee._createConsoleRegistration(),F=window.localStorage.getItem(this._storageKey);if(F)try{let d=JSON.parse(F);d.id&&(y.id=d.id),d.name&&(y.name=d.name),d.providers&&(y.providers=d.providers),d.apps&&(y.apps=d.apps)}catch(d){console.error("Failed to deserialise console registration")}let x=y.providers;for(let d of(y.providers={},_)){let m=x&&x.hasOwnProperty(d)?x[d]:{enabled:!1,disabled:!1};y.providers[d]=m}let w=iT.getAppName();w.length>0&&0>y.apps.indexOf(w)&&y.apps.push(w),this._registration=y,p&&(y.name=p),h&&(y.version=h),b&&(y.platform=b),v&&(this._autoEnable="TRUE"===v||"true"===v)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let d=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return d&&("iP"===d.substring(0,2)||"Mac"===d.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return Z(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let d of Object.keys(this._registration.providers))yield this._initialiseProvider(d);this._registration.id||(yield this.sendRegistration()),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(d){console.error(d)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return Z(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let d=this._pendingProviderEnables.length-1;d>-1;d--){let m=this._pendingProviderEnables[d];yield this.enableProvider(m)}})}enableProvider(d,m){return Z(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(d))throw console.debug("Invalid console provider '"+d+"'"),Error("Invalid console provider '"+d+"'");console.debug("Console: enabling provider '"+d+"'");let u={provider:d,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:m},f=yield this.sendProviderMessage(u,!0);this._registration.providers[d].hasPermission=f.hasPermission,this._registration.providers[d].success=f.success,this._registration.providers[d].enabled=f.success,this._registration.providers[d].data=f.data;let p=this._pendingProviderEnables.indexOf(d);return p>=0&&(this._pendingProviderEnables.splice(p,1),0===this._pendingProviderEnables.length&&(this.sendRegistration().catch(()=>void 0),this._callCompletedCallback())),f})}disableProvider(d){return Z(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(d))throw console.debug("Invalid console provider '"+d+"'"),Error("Invalid console provider '"+d+"'");console.debug("Console: disabling provider '"+d+"'");let m=yield this.sendProviderMessage({provider:d,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[d].disabled=!0,this._registration.providers[d].enabled=!1,m})}getProvider(d){return this._registration&&this._registration.providers?this._registration.providers[d]:void 0}sendProviderMessage(d,m){return Z(this,void 0,void 0,function*(){if("storage"!==d.provider&&!this._registration.providers.hasOwnProperty(d.provider))throw console.debug("Invalid console provider '"+d.provider+"'"),Error("Invalid console provider '"+d.provider+"'");if(!m)return void this._doSendProviderMessage(d);let u=d.provider+d.action;if(this._pendingProviderPromises[u])throw Error("Message already pending for provider '"+d.provider+"' with action '"+d.action+"'");let f=new N,p=()=>{delete this._pendingProviderPromises[u],f.reject("No response from provider")};return this._pendingProviderPromises[u]=[f,window.setTimeout(p,5e3)],this._doSendProviderMessage(d),f.promise})}sendRegistration(){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),new Promise((d,m)=>{this._registrationTimer=window.setTimeout(()=>Z(this,void 0,void 0,function*(){this._registrationTimer=null,console.debug("Console: updating registration");try{yield this._sendRegistration(!0),d()}catch(d){console.error("Failed to register console",d),m(d)}}))})}_sendRegistration(d){return Z(this,void 0,void 0,function*(){this._normaliseRegistration();let m=!!this._registration.id;try{let d=yield iT.rest.api.ConsoleResource.register(this._registration);if(200!==d.status)throw Error("Failed to register console");this._registration=d.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem(this._storageKey,JSON.stringify(this._registration))}catch(u){if(d&&m&&ee._isStaleRegistrationResponse(u)){console.warn("Console registration ID is stale or cannot be claimed; creating a new console registration"),window.localStorage.removeItem(this._storageKey),delete this._registration.id,yield this._sendRegistration(!1);return}throw u}})}_normaliseRegistration(){this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={})}get _storageKey(){return"OpenRemoteConsole:"+this._realm}static _isStaleRegistrationResponse(d){let m=d&&d.response?d.response.status:void 0;return 403===m||409===m}storeData(d,m){this.sendProviderMessage({provider:"storage",action:"STORE",key:d,value:m},!1)}retrieveData(d){return Z(this,void 0,void 0,function*(){let m=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:d},!0);try{let d=yield Promise.race([m,new Promise((d,m)=>setTimeout(m,2e3))]);if(d&&d.value){let m=d.value;return"null"===m?void 0:m}}catch(d){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(d,m){this._providerMessageListeners[d.provider+d.action]=m}removeProviderMessageListener(d){delete this._providerMessageListeners[d.provider+d.action]}_postNativeShellMessage(d){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(d));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(d)}catch(d){console.error("Failed to send shell message towards console",d)}}_doSendGenericMessage(d,m){let u={type:d,data:m};this.isMobile?this._postNativeShellMessage(u):console.warn("Failed to send generic message to console.",u)}_doSendProviderMessage(d){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:d});else{if(!d.provider||!d.action)return;switch(d.provider.trim().toUpperCase()){case"PUSH":switch(d.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+d.provider+"' and action '"+d.action+"'")}break;case"STORAGE":switch(d.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let m=d.key?d.key.trim():null;if(!m||0===m.length)throw Error("Storage provider 'store' action requires a `key`");null===d.value?window.localStorage.removeItem(m):window.localStorage.setItem(m,JSON.stringify(d.value))}break;case"RETRIEVE":{let m=d.key?d.key.trim():null;if(!m||0===m.length)throw Error("Storage provider 'retrieve' action requires a `key`");let u=window.localStorage.getItem(m);if(null!==u)try{u=JSON.parse(u)}catch(d){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:m,value:u}))}break;default:throw Error("Unsupported provider '"+d.provider+"' and action '"+d.action+"'")}break;default:console.error("Unsupported provider: "+d.provider)}}}_handleProviderResponse(d){if(!d)return;let m=JSON.parse(d),u=m.provider,f=m.action,p=this._pendingProviderPromises[u+f];p&&(window.clearTimeout(p[1]),delete this._pendingProviderPromises[u+f],p[0].resolve(m));let h=this._providerMessageListeners[u+f];h&&h(m)}_callCompletedCallback(){let d=this._enableCompleteCallback;this._enableCompleteCallback=null,d&&window.setTimeout(()=>{d()},0)}static _createConsoleRegistration(){return{name:Q.name,version:Q.version,platform:Q.os.toString(),apps:[],model:((Q.manufacturer?Q.manufacturer+" ":"")+(Q.product?Q.product:"")).trim()}}_initialiseProvider(d){return Z(this,void 0,void 0,function*(){let m;console.debug("Console: initialising provider '"+d+"'");try{m=yield this.sendProviderMessage({provider:d,action:"PROVIDER_INIT"},!0),this._registration.providers[d].version=m.version,this._registration.providers[d].requiresPermission=m.requiresPermission,this._registration.providers[d].hasPermission=m.hasPermission,this._registration.providers[d].success=m.success,this._registration.providers[d].enabled=m.enabled,this._registration.providers[d].disabled=m.disabled,this._registration.providers[d].data=m.data}catch(d){console.error(d),m={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(m.success||(console.debug("Provider initialisation failed: '"+d+"'"),m.disabled=!0,this._registration.providers[d].disabled=!0),m.disabled||m.enabled){let m=this._pendingProviderEnables.indexOf(d);m>=0&&this._pendingProviderEnables.splice(m,1)}})}}function et(d,m){return function(){return d.apply(m,arguments)}}let{toString:en}=Object.prototype,{getPrototypeOf:ei}=Object,{iterator:eo,toStringTag:er}=Symbol,ea=(({hasOwnProperty:d})=>(m,u)=>d.call(m,u))(Object.prototype),es=(d,m)=>{let u=d,f=[];for(;null!=u&&u!==Object.prototype&&-1===f.indexOf(u);){if(f.push(u),ea(u,m))return!0;u=ei(u)}return!1},ec=(p=Object.create(null),d=>{let m=en.call(d);return p[m]||(p[m]=m.slice(8,-1).toLowerCase())}),el=d=>(d=d.toLowerCase(),m=>ec(m)===d),ed=d=>m=>typeof m===d,{isArray:em}=Array,eu=ed("undefined");function ef(d){return null!==d&&!eu(d)&&null!==d.constructor&&!eu(d.constructor)&&eb(d.constructor.isBuffer)&&d.constructor.isBuffer(d)}let ep=el("ArrayBuffer"),eh=ed("string"),eb=ed("function"),eg=ed("number"),ev=d=>null!==d&&"object"==typeof d,e_=d=>{if(!ev(d))return!1;let m=ei(d);return(null===m||m===Object.prototype||null===ei(m))&&!es(d,er)&&!es(d,eo)},ey=el("Date"),eF=el("File"),ex=el("Blob"),ew=el("FileList"),eE="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:"u">typeof global?global:{},ek=void 0!==eE.FormData?eE.FormData:void 0,eC=el("URLSearchParams"),[eA,eT,eS,eI]=["ReadableStream","Request","Response","Headers"].map(el);function eO(d,m,{allOwnKeys:u=!1}={}){let f,p;if(null!=d)if("object"!=typeof d&&(d=[d]),em(d))for(f=0,p=d.length;f<p;f++)m.call(null,d[f],f,d);else{let p;if(ef(d))return;let h=u?Object.getOwnPropertyNames(d):Object.keys(d),b=h.length;for(f=0;f<b;f++)p=h[f],m.call(null,d[p],p,d)}}function eD(d,m){let u;if(ef(d))return null;m=m.toLowerCase();let f=Object.keys(d),p=f.length;for(;p-- >0;)if(m===(u=f[p]).toLowerCase())return u;return null}let eR="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,eN=d=>!eu(d)&&d!==eR,eL=(h="u">typeof Uint8Array&&ei(Uint8Array),d=>h&&d instanceof h),eB=el("HTMLFormElement"),{propertyIsEnumerable:eP}=Object.prototype,eM=el("RegExp"),ez=(d,m)=>{let u=Object.getOwnPropertyDescriptors(d),f={};eO(u,(u,p)=>{let h;!1!==(h=m(u,p,d))&&(f[p]=h||u)}),Object.defineProperties(d,f)},eU=el("AsyncFunction"),ej=(v="function"==typeof setImmediate,_=eb(eR.postMessage),v?setImmediate:_?(y=`axios@${Math.random()}`,F=[],eR.addEventListener("message",({source:d,data:m})=>{d===eR&&m===y&&F.length&&F.shift()()},!1),d=>{F.push(d),eR.postMessage(y,"*")}):d=>setTimeout(d)),eV="u">typeof queueMicrotask?queueMicrotask.bind(eR):"u">typeof process&&process.nextTick||ej,eH=d=>null!=d&&eb(d[eo]),e$={isArray:em,isArrayBuffer:ep,isBuffer:ef,isFormData:d=>{if(!d)return!1;if(ek&&d instanceof ek)return!0;let m=ei(d);if(!m||m===Object.prototype||!eb(d.append))return!1;let u=ec(d);return"formdata"===u||"object"===u&&eb(d.toString)&&"[object FormData]"===d.toString()},isArrayBufferView:function(d){let m;return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(d):d&&d.buffer&&ep(d.buffer)},isString:eh,isNumber:eg,isBoolean:d=>!0===d||!1===d,isObject:ev,isPlainObject:e_,isEmptyObject:d=>{if(!ev(d)||ef(d))return!1;try{return 0===Object.keys(d).length&&Object.getPrototypeOf(d)===Object.prototype}catch(d){return!1}},isReadableStream:eA,isRequest:eT,isResponse:eS,isHeaders:eI,isUndefined:eu,isDate:ey,isFile:eF,isReactNativeBlob:d=>!!(d&&void 0!==d.uri),isReactNative:d=>d&&void 0!==d.getParts,isBlob:ex,isRegExp:eM,isFunction:eb,isStream:d=>ev(d)&&eb(d.pipe),isURLSearchParams:eC,isTypedArray:eL,isFileList:ew,forEach:eO,merge:function d(...m){let{caseless:u,skipUndefined:f}=eN(this)&&this||{},p={},h=(m,h)=>{if("__proto__"===h||"constructor"===h||"prototype"===h)return;let b=u&&"string"==typeof h&&eD(p,h)||h,g=ea(p,b)?p[b]:void 0;e_(g)&&e_(m)?p[b]=d(g,m):e_(m)?p[b]=d({},m):em(m)?p[b]=m.slice():f&&eu(m)||(p[b]=m)};for(let d=0,u=m.length;d<u;d++){let u=m[d];if(!u||ef(u)||(eO(u,h),"object"!=typeof u||em(u)))continue;let f=Object.getOwnPropertySymbols(u);for(let d=0;d<f.length;d++){let m=f[d];eP.call(u,m)&&h(u[m],m)}}return p},extend:(d,m,u,{allOwnKeys:f}={})=>(eO(m,(m,f)=>{u&&eb(m)?Object.defineProperty(d,f,{__proto__:null,value:et(m,u),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(d,f,{__proto__:null,value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:f}),d),trim:d=>d.trim?d.trim():d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:d=>(65279===d.charCodeAt(0)&&(d=d.slice(1)),d),inherits:(d,m,u,f)=>{d.prototype=Object.create(m.prototype,f),Object.defineProperty(d.prototype,"constructor",{__proto__:null,value:d,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(d,"super",{__proto__:null,value:m.prototype}),u&&Object.assign(d.prototype,u)},toFlatObject:(d,m,u,f)=>{let p,h,b,g={};if(m=m||{},null==d)return m;do{for(h=(p=Object.getOwnPropertyNames(d)).length;h-- >0;)b=p[h],(!f||f(b,d,m))&&!g[b]&&(m[b]=d[b],g[b]=!0);d=!1!==u&&ei(d)}while(d&&(!u||u(d,m))&&d!==Object.prototype);return m},kindOf:ec,kindOfTest:el,endsWith:(d,m,u)=>{d=String(d),(void 0===u||u>d.length)&&(u=d.length),u-=m.length;let f=d.indexOf(m,u);return -1!==f&&f===u},toArray:d=>{if(!d)return null;if(em(d))return d;let m=d.length;if(!eg(m))return null;let u=Array(m);for(;m-- >0;)u[m]=d[m];return u},forEachEntry:(d,m)=>{let u,f=(d&&d[eo]).call(d);for(;(u=f.next())&&!u.done;){let f=u.value;m.call(d,f[0],f[1])}},matchAll:(d,m)=>{let u,f=[];for(;null!==(u=d.exec(m));)f.push(u);return f},isHTMLForm:eB,hasOwnProperty:ea,hasOwnProp:ea,hasOwnInPrototypeChain:es,getSafeProp:(d,m)=>null!=d&&es(d,m)?d[m]:void 0,reduceDescriptors:ez,freezeMethods:d=>{ez(d,(m,u)=>{if(eb(d)&&["arguments","caller","callee"].includes(u))return!1;if(eb(d[u])){if(m.enumerable=!1,"writable"in m){m.writable=!1;return}m.set||(m.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},toObjectSet:(d,m)=>{let u={};return(em(d)?d:String(d).split(m)).forEach(d=>{u[d]=!0}),u},toCamelCase:d=>d.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(d,m,u){return m.toUpperCase()+u}),noop:()=>{},toFiniteNumber:(d,m)=>null!=d&&Number.isFinite(d*=1)?d:m,findKey:eD,global:eR,isContextDefined:eN,isSpecCompliantForm:function(d){return!!(d&&eb(d.append)&&"FormData"===d[er]&&d[eo])},toJSONObject:d=>{let m=new WeakSet,u=d=>{if(ev(d)){if(m.has(d))return;if(ef(d))return d;if(!("toJSON"in d)){m.add(d);let f=em(d)?[]:{};return eO(d,(d,m)=>{let p=u(d);eu(p)||(f[m]=p)}),m.delete(d),f}}return d};return u(d)},isAsyncFn:eU,isThenable:d=>d&&(ev(d)||eb(d))&&eb(d.then)&&eb(d.catch),setImmediate:ej,asap:eV,isIterable:eH,isSafeIterable:d=>null!=d&&es(d,eo)&&eH(d)},eq=e$.toObjectSet(["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"]),eG=RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),eY=RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function eW(d,m){return e$.isArray(d)?d.map(d=>eW(d,m)):function(d){let m=0,u=d.length;for(;m<u;){let u=d.charCodeAt(m);if(9!==u&&32!==u)break;m+=1}for(;u>m;){let m=d.charCodeAt(u-1);if(9!==m&&32!==m)break;u-=1}return 0===m&&u===d.length?d:d.slice(m,u)}(String(d).replace(m,""))}function eX(d){let m=Object.create(null);return e$.forEach(d.toJSON(),(d,u)=>{m[u]=eW(d,eY)}),m}let eK=Symbol("internals");function eJ(d){return d&&String(d).trim().toLowerCase()}function eZ(d){return!1===d||null==d?d:e$.isArray(d)?d.map(eZ):eW(String(d),eG)}function eQ(d,m,u,f,p){if(e$.isFunction(f))return f.call(this,m,u);if(p&&(m=u),e$.isString(m)){if(e$.isString(f))return -1!==m.indexOf(f);if(e$.isRegExp(f))return f.test(m)}}class e0{constructor(d){d&&this.set(d)}set(d,m,u){let f=this;function p(d,m,u){let p=eJ(m);if(!p)return;let h=e$.findKey(f,p);h&&void 0!==f[h]&&!0!==u&&(void 0!==u||!1===f[h])||(f[h||m]=eZ(d))}let h=(d,m)=>e$.forEach(d,(d,u)=>p(d,u,m));if(e$.isPlainObject(d)||d instanceof this.constructor)h(d,m);else{let f;if(e$.isString(d)&&(d=d.trim())&&(f=d,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(f.trim()))){var b;let u,f,p,g;h((g={},(b=d)&&b.split("\n").forEach(function(d){p=d.indexOf(":"),u=d.substring(0,p).trim().toLowerCase(),f=d.substring(p+1).trim(),!u||g[u]&&eq[u]||("set-cookie"===u?g[u]?g[u].push(f):g[u]=[f]:g[u]=g[u]?g[u]+", "+f:f)}),g),m)}else if(e$.isObject(d)&&e$.isSafeIterable(d)){let u=Object.create(null),f,p;for(let m of d){if(!e$.isArray(m))throw TypeError("Object iterator must return a key-value pair");p=m[0],e$.hasOwnProp(u,p)?(f=u[p],u[p]=e$.isArray(f)?[...f,m[1]]:[f,m[1]]):u[p]=m[1]}h(u,m)}else null!=d&&p(m,d,u)}return this}get(d,m){if(d=eJ(d)){let u=e$.findKey(this,d);if(u){let d=this[u];if(!m)return d;if(!0===m){let m,u=Object.create(null),f=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;m=f.exec(d);)u[m[1]]=m[2];return u}if(e$.isFunction(m))return m.call(this,d,u);if(e$.isRegExp(m))return m.exec(d);throw TypeError("parser must be boolean|regexp|function")}}}has(d,m){if(d=eJ(d)){let u=e$.findKey(this,d);return!!(u&&void 0!==this[u]&&(!m||eQ(this,this[u],u,m)))}return!1}delete(d,m){let u=this,f=!1;function p(d){if(d=eJ(d)){let p=e$.findKey(u,d);p&&(!m||eQ(u,u[p],p,m))&&(delete u[p],f=!0)}}return e$.isArray(d)?d.forEach(p):p(d),f}clear(d){let m=Object.keys(this),u=m.length,f=!1;for(;u--;){let p=m[u];(!d||eQ(this,this[p],p,d,!0))&&(delete this[p],f=!0)}return f}normalize(d){let m=this,u={};return e$.forEach(this,(f,p)=>{let h=e$.findKey(u,p);if(h){m[h]=eZ(f),delete m[p];return}let b=d?p.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(d,m,u)=>m.toUpperCase()+u):String(p).trim();b!==p&&delete m[p],m[b]=eZ(f),u[b]=!0}),this}concat(...d){return this.constructor.concat(this,...d)}toJSON(d){let m=Object.create(null);return e$.forEach(this,(u,f)=>{null!=u&&!1!==u&&(m[f]=d&&e$.isArray(u)?u.join(", "):u)}),m}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([d,m])=>d+": "+m).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(d){return d instanceof this?d:new this(d)}static concat(d,...m){let u=new this(d);return m.forEach(d=>u.set(d)),u}static accessor(d){let m=(this[eK]=this[eK]={accessors:{}}).accessors,u=this.prototype;function f(d){let f=eJ(d);if(!m[f]){let p;p=e$.toCamelCase(" "+d),["get","set","has"].forEach(m=>{Object.defineProperty(u,m+p,{__proto__:null,value:function(u,f,p){return this[m].call(this,d,u,f,p)},configurable:!0})}),m[f]=!0}}return e$.isArray(d)?d.forEach(f):f(d),this}}e0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),e$.reduceDescriptors(e0.prototype,({value:d},m)=>{let u=m[0].toUpperCase()+m.slice(1);return{get:()=>d,set(d){this[u]=d}}}),e$.freezeMethods(e0);class e1 extends Error{static from(d,m,u,f,p,h){let b=new e1(d.message,m||d.code,u,f,p);return Object.defineProperty(b,"cause",{__proto__:null,value:d,writable:!0,enumerable:!1,configurable:!0}),b.name=d.name,null!=d.status&&null==b.status&&(b.status=d.status),h&&Object.assign(b,h),b}constructor(d,m,u,f,p){super(d),Object.defineProperty(this,"message",{__proto__:null,value:d,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,m&&(this.code=m),u&&(this.config=u),f&&(this.request=f),p&&(this.response=p,this.status=p.status)}toJSON(){let d,m,u,f=this.config,p=f&&e$.hasOwnProp(f,"redact")?f.redact:void 0,h=e$.isArray(p)&&p.length>0?(d=new Set(p.map(d=>String(d).toLowerCase())),m=[],(u=f=>{let p;if(null===f||"object"!=typeof f||e$.isBuffer(f))return f;if(-1===m.indexOf(f)){if(f instanceof e0&&(f=f.toJSON()),m.push(f),e$.isArray(f))p=[],f.forEach((d,m)=>{let f=u(d);e$.isUndefined(f)||(p[m]=f)});else{if(!e$.isPlainObject(f)&&function(d){if(e$.hasOwnProp(d,"toJSON"))return!0;let m=Object.getPrototypeOf(d);for(;m&&m!==Object.prototype;){if(e$.hasOwnProp(m,"toJSON"))return!0;m=Object.getPrototypeOf(m)}return!1}(f))return m.pop(),f;for(let[m,h]of(p=Object.create(null),Object.entries(f))){let f=d.has(m.toLowerCase())?"[REDACTED ****]":u(h);e$.isUndefined(f)||(p[m]=f)}}return m.pop(),p}})(f)):e$.toJSONObject(f);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:h,code:this.code,status:this.status}}}e1.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",e1.ERR_BAD_OPTION="ERR_BAD_OPTION",e1.ECONNABORTED="ECONNABORTED",e1.ETIMEDOUT="ETIMEDOUT",e1.ECONNREFUSED="ECONNREFUSED",e1.ERR_NETWORK="ERR_NETWORK",e1.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",e1.ERR_DEPRECATED="ERR_DEPRECATED",e1.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",e1.ERR_BAD_REQUEST="ERR_BAD_REQUEST",e1.ERR_CANCELED="ERR_CANCELED",e1.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",e1.ERR_INVALID_URL="ERR_INVALID_URL",e1.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";let e2=e1;function e5(d){return e$.isPlainObject(d)||e$.isArray(d)}function e4(d){return e$.endsWith(d,"[]")?d.slice(0,-2):d}function e3(d,m,u){return d?d.concat(m).map(function(d,m){return d=e4(d),!u&&m?"["+d+"]":d}).join(u?".":""):m}let e6=e$.toFlatObject(e$,{},null,function(d){return/^is[A-Z]/.test(d)}),e8=function(d,m,u){if(!e$.isObject(d))throw TypeError("target must be an object");m=m||new FormData;let f=(u=e$.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,m){return!e$.isUndefined(m[d])})).metaTokens,p=u.visitor||w,h=u.dots,b=u.indexes,g=u.Blob||"u">typeof Blob&&Blob,v=void 0===u.maxDepth?100:u.maxDepth,_=g&&e$.isSpecCompliantForm(m),y=[];if(!e$.isFunction(p))throw TypeError("visitor must be a function");function F(d){if(null===d)return"";if(e$.isDate(d))return d.toISOString();if(e$.isBoolean(d))return d.toString();if(!_&&e$.isBlob(d))throw new e2("Blob is not supported. Use a Buffer instead.");if(e$.isArrayBuffer(d)||e$.isTypedArray(d)){if(_&&"function"==typeof g)return new g([d]);if("u">typeof Buffer)return Buffer.from(d);throw new e2("Blob is not supported. Use a Buffer instead.",e2.ERR_NOT_SUPPORT)}return d}function x(d){if(d>v)throw new e2("Object is too deeply nested ("+d+" levels). Max depth: "+v,e2.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(d,u,p){let g=d;if(e$.isReactNative(m)&&e$.isReactNativeBlob(d))return m.append(e3(p,u,h),F(d)),!1;if(d&&!p&&"object"==typeof d)if(e$.endsWith(u,"{}"))u=f?u:u.slice(0,-2),d=function(d){if(1/0===v)return JSON.stringify(d);let m=[];return JSON.stringify(d,function(d,u){if(!e$.isObject(u))return u;for(;m.length&&m[m.length-1]!==this;)m.pop();return m.push(u),x(1+m.length-1),u})}(d);else{var _;if(e$.isArray(d)&&(_=d,e$.isArray(_)&&!_.some(e5))||(e$.isFileList(d)||e$.endsWith(u,"[]"))&&(g=e$.toArray(d)))return u=e4(u),g.forEach(function(d,f){e$.isUndefined(d)||null===d||m.append(!0===b?e3([u],f,h):null===b?u:u+"[]",F(d))}),!1}return!!e5(d)||(m.append(e3(p,u,h),F(d)),!1)}let E=Object.assign(e6,{defaultVisitor:w,convertValue:F,isVisitable:e5});if(!e$.isObject(d))throw TypeError("data must be an object");return!function d(u,f,h=0){if(!e$.isUndefined(u)){if(x(h),-1!==y.indexOf(u))throw Error("Circular reference detected in "+f.join("."));y.push(u),e$.forEach(u,function(u,b){!0===(!(e$.isUndefined(u)||null===u)&&p.call(m,u,e$.isString(b)?b.trim():b,f,E))&&d(u,f?f.concat(b):[b],h+1)}),y.pop()}}(d),m};function e7(d){let m={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(d).replace(/[!'()~]|%20/g,function(d){return m[d]})}function e9(d,m){this._pairs=[],d&&e8(d,this,m)}let te=e9.prototype;function tt(d){return encodeURIComponent(d).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tn(d,m,u){let f;if(!m)return d;d=d||"";let p=e$.isFunction(u)?{serialize:u}:u,h=e$.getSafeProp(p,"encode")||tt,b=e$.getSafeProp(p,"serialize");if(f=b?b(m,p):e$.isURLSearchParams(m)?m.toString():new e9(m,p).toString(h)){let m=d.indexOf("#");-1!==m&&(d=d.slice(0,m)),d+=(-1===d.indexOf("?")?"?":"&")+f}return d}te.append=function(d,m){this._pairs.push([d,m])},te.toString=function(d){let m=d?m=>d.call(this,m,e7):e7;return this._pairs.map(function(d){return m(d[0])+"="+m(d[1])},"").join("&")};let ti=class{constructor(){this.handlers=[]}use(d,m,u){return this.handlers.push({fulfilled:d,rejected:m,synchronous:!!u&&u.synchronous,runWhen:u?u.runWhen:null}),this.handlers.length-1}eject(d){this.handlers[d]&&(this.handlers[d]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(d){e$.forEach(this.handlers,function(m){null!==m&&d(m)})}},to={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},tr="u">typeof URLSearchParams?URLSearchParams:e9,ta="u">typeof FormData?FormData:null,ts="u">typeof Blob?Blob:null,tc="u">typeof window&&"u">typeof document,tl="object"==typeof navigator&&navigator||void 0,td=tc&&(!tl||0>["ReactNative","NativeScript","NS"].indexOf(tl.product)),tm="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,tu=tc&&window.location.href||"http://localhost",tf={...S,isBrowser:!0,classes:{URLSearchParams:tr,FormData:ta,Blob:ts},protocols:["http","https","file","blob","url","data"]};function tp(d){if(d>100)throw new e2("FormData field is too deeply nested ("+d+" levels). Max depth: 100",e2.ERR_FORM_DATA_DEPTH_EXCEEDED)}let th=function(d){if(e$.isFormData(d)&&e$.isFunction(d.entries)){let m={};return e$.forEachEntry(d,(d,u)=>{!function d(m,u,f,p){tp(p);let h=m[p++];if("__proto__"===h)return!0;let b=Number.isFinite(+h),g=p>=m.length;return(h=!h&&e$.isArray(f)?f.length:h,g)?e$.hasOwnProp(f,h)?f[h]=e$.isArray(f[h])?f[h].concat(u):[f[h],u]:f[h]=u:(e$.hasOwnProp(f,h)&&e$.isObject(f[h])||(f[h]=[]),d(m,u,f[h],p)&&e$.isArray(f[h])&&(f[h]=function(d){let m,u,f={},p=Object.keys(d),h=p.length;for(m=0;m<h;m++)f[u=p[m]]=d[u];return f}(f[h]))),!b}(function(d){let m,u=[],f=/\w+|\[(\w*)]/g;for(;null!==(m=f.exec(d));)tp(u.length),u.push("[]"===m[0]?"":m[1]||m[0]);return u}(d),u,m,0)}),m}return null},tb=(d,m)=>null!=d&&e$.hasOwnProp(d,m)?d[m]:void 0,tg={transitional:to,adapter:["xhr","http","fetch"],transformRequest:[function(d,m){let u,f=m.getContentType()||"",p=f.indexOf("application/json")>-1,h=e$.isObject(d);if(h&&e$.isHTMLForm(d)&&(d=new FormData(d)),e$.isFormData(d))return p?JSON.stringify(th(d)):d;if(e$.isArrayBuffer(d)||e$.isBuffer(d)||e$.isStream(d)||e$.isFile(d)||e$.isBlob(d)||e$.isReadableStream(d))return d;if(e$.isArrayBufferView(d))return d.buffer;if(e$.isURLSearchParams(d))return m.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),d.toString();if(h){let m=tb(this,"formSerializer");if(f.indexOf("application/x-www-form-urlencoded")>-1){var b;return(b=d,e8(b,new tf.classes.URLSearchParams,{visitor:function(d,m,u,f){return tf.isNode&&e$.isBuffer(d)?(this.append(m,d.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...m})).toString()}if((u=e$.isFileList(d))||f.indexOf("multipart/form-data")>-1){let f=tb(this,"env"),p=f&&f.FormData;return e8(u?{"files[]":d}:d,p&&new p,m)}}if(h||p){m.setContentType("application/json",!1);var g=d;if(e$.isString(g))try{return(0,JSON.parse)(g),e$.trim(g)}catch(d){if("SyntaxError"!==d.name)throw d}return(0,JSON.stringify)(g)}return d}],transformResponse:[function(d){let m=tb(this,"transitional")||tg.transitional,u=m&&m.forcedJSONParsing,f=tb(this,"responseType"),p="json"===f;if(e$.isResponse(d)||e$.isReadableStream(d))return d;if(d&&e$.isString(d)&&(u&&!f||p)){let u=m&&m.silentJSONParsing;try{return JSON.parse(d,tb(this,"parseReviver"))}catch(d){if(!u&&p){if("SyntaxError"===d.name)throw e2.from(d,e2.ERR_BAD_RESPONSE,this,null,tb(this,"response"));throw d}}}return d}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tf.classes.FormData,Blob:tf.classes.Blob},validateStatus:function(d){return d>=200&&d<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function tv(d,m){let u=this||tg,f=m||u,p=e0.from(f.headers),h=f.data;return e$.forEach(d,function(d){h=d.call(u,h,p.normalize(),m?m.status:void 0)}),p.normalize(),h}function t_(d){return!!(d&&d.__CANCEL__)}e$.forEach(["delete","get","head","post","put","patch","query"],d=>{tg.headers[d]={}});let ty=class extends e2{constructor(d,m,u){super(null==d?"canceled":d,e2.ERR_CANCELED,m,u),this.name="CanceledError",this.__CANCEL__=!0}};function tF(d,m,u){let f=u.config.validateStatus;!u.status||!f||f(u.status)?d(u):m(new e2("Request failed with status code "+u.status,u.status>=400&&u.status<500?e2.ERR_BAD_REQUEST:e2.ERR_BAD_RESPONSE,u.config,u.request,u))}let tx=function(d,m){let u,f=Array(d=d||10),p=Array(d),h=0,b=0;return m=void 0!==m?m:1e3,function(g){let v=Date.now(),_=p[b];u||(u=v),f[h]=g,p[h]=v;let y=b,F=0;for(;y!==h;)F+=f[y++],y%=d;if((h=(h+1)%d)===b&&(b=(b+1)%d),v-u<m)return;let x=_&&v-_;return x?Math.round(1e3*F/x):void 0}},tw=function(d,m){let u,f,p=0,h=1e3/m,b=(m,h=Date.now())=>{p=h,u=null,f&&(clearTimeout(f),f=null),d(...m)};return[(...d)=>{let m=Date.now(),g=m-p;g>=h?b(d,m):(u=d,f||(f=setTimeout(()=>{f=null,b(u)},h-g)))},()=>u&&b(u)]},tE=(d,m,u=3)=>{let f=0,p=tx(50,250);return tw(u=>{if(!u||"number"!=typeof u.loaded)return;let h=u.loaded,b=u.lengthComputable?u.total:void 0,g=null!=b?Math.min(h,b):h,v=Math.max(0,g-f),_=p(v);f=Math.max(f,g),d({loaded:g,total:b,progress:b?g/b:void 0,bytes:v,rate:_||void 0,estimated:_&&b?(b-g)/_:void 0,event:u,lengthComputable:null!=b,[m?"download":"upload"]:!0})},u)},tk=(d,m)=>{let u=null!=d;return[f=>m[0]({lengthComputable:u,total:d,loaded:f}),m[1]]},tC=d=>(...m)=>e$.asap(()=>d(...m)),tA=tf.hasStandardBrowserEnv?(b=new URL(tf.origin),g=tf.navigator&&/(msie|trident)/i.test(tf.navigator.userAgent),d=>(d=new URL(d,tf.origin),b.protocol===d.protocol&&b.host===d.host&&(g||b.port===d.port))):()=>!0,tT=tf.hasStandardBrowserEnv?{write(d,m,u,f,p,h,b){if("u"<typeof document)return;let g=[`${d}=${encodeURIComponent(m)}`];e$.isNumber(u)&&g.push(`expires=${new Date(u).toUTCString()}`),e$.isString(f)&&g.push(`path=${f}`),e$.isString(p)&&g.push(`domain=${p}`),!0===h&&g.push("secure"),e$.isString(b)&&g.push(`SameSite=${b}`),document.cookie=g.join("; ")},read(d){if("u"<typeof document)return null;let m=document.cookie.split(";");for(let u=0;u<m.length;u++){let f=m[u].replace(/^\s+/,""),p=f.indexOf("=");if(-1!==p&&f.slice(0,p)===d)try{return decodeURIComponent(f.slice(p+1))}catch(d){return f.slice(p+1)}}return null},remove(d){this.write(d,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}},tS=/^https?:(?!\/\/)/i,tI=/[\t\n\r]/g;function tO(d,m){if("string"==typeof d&&tS.test((function(d){let m=0;for(;m<d.length&&32>=d.charCodeAt(m);)m++;return d.slice(m)})(d).replace(tI,"")))throw new e2('Invalid URL: missing "//" after protocol',e2.ERR_INVALID_URL,m)}function tD(d,m,u,f){tO(m,f);let p=!("string"==typeof m&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(m));return d&&(p||!1===u)?(tO(d,f),m?d.replace(/\/?\/$/,"")+"/"+m.replace(/^\/+/,""):d):m}let tR=d=>d instanceof e0?{...d}:d;function tN(d,m){d=d||{},m=m||{};let u=Object.create(null);function f(d,m,u,f){return e$.isPlainObject(d)&&e$.isPlainObject(m)?e$.merge.call({caseless:f},d,m):e$.isPlainObject(m)?e$.merge({},m):e$.isArray(m)?m.slice():m}function p(d,m,u,p){return e$.isUndefined(m)?e$.isUndefined(d)?void 0:f(void 0,d,u,p):f(d,m,u,p)}function h(d,m){if(!e$.isUndefined(m))return f(void 0,m)}function b(d,m){return e$.isUndefined(m)?e$.isUndefined(d)?void 0:f(void 0,d):f(void 0,m)}function g(u,p,h){return e$.hasOwnProp(m,h)?f(u,p):e$.hasOwnProp(d,h)?f(void 0,u):void 0}Object.defineProperty(u,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});let v={url:h,method:h,data:h,baseURL:b,transformRequest:b,transformResponse:b,paramsSerializer:b,timeout:b,timeoutMessage:b,withCredentials:b,withXSRFToken:b,adapter:b,responseType:b,xsrfCookieName:b,xsrfHeaderName:b,onUploadProgress:b,onDownloadProgress:b,decompress:b,maxContentLength:b,maxBodyLength:b,beforeRedirect:b,transport:b,httpAgent:b,httpsAgent:b,cancelToken:b,socketPath:b,allowedSocketPaths:b,responseEncoding:b,validateStatus:g,headers:(d,m,u)=>p(tR(d),tR(m),u,!0)};return e$.forEach(Object.keys({...d,...m}),function(f){if("__proto__"===f||"constructor"===f||"prototype"===f)return;let h=e$.hasOwnProp(v,f)?v[f]:p,b=h(e$.hasOwnProp(d,f)?d[f]:void 0,e$.hasOwnProp(m,f)?m[f]:void 0,f);e$.isUndefined(b)&&h!==g||(u[f]=b)}),e$.hasOwnProp(m,"validateStatus")&&e$.isUndefined(m.validateStatus)&&!1===function(u){let f=e$.hasOwnProp(m,"transitional")?m.transitional:void 0;if(!e$.isUndefined(f)){if(!e$.isPlainObject(f))return;else if(e$.hasOwnProp(f,u))return f[u]}let p=e$.hasOwnProp(d,"transitional")?d.transitional:void 0;if(e$.isPlainObject(p)&&e$.hasOwnProp(p,u))return p[u]}("validateStatusUndefinedResolves")&&(e$.hasOwnProp(d,"validateStatus")?u.validateStatus=f(void 0,d.validateStatus):delete u.validateStatus),u}let tL=["content-type","content-length"],tB=function(d){let m=tN({},d),u=d=>e$.hasOwnProp(m,d)?m[d]:void 0,f=u("data"),p=u("withXSRFToken"),h=u("xsrfHeaderName"),b=u("xsrfCookieName"),g=u("headers"),v=u("auth"),_=u("baseURL"),y=u("allowAbsoluteUrls"),F=u("url");if(m.headers=g=e0.from(g),m.url=tn(tD(_,F,y,m),u("params"),u("paramsSerializer")),v){let m=e$.getSafeProp(v,"username")||"",u=e$.getSafeProp(v,"password")||"";try{g.set("Authorization","Basic "+btoa(m+":"+(u?encodeURIComponent(u).replace(/%([0-9A-F]{2})/gi,(d,m)=>String.fromCharCode(parseInt(m,16))):"")))}catch(m){throw e2.from(m,e2.ERR_BAD_OPTION_VALUE,d)}}if(e$.isFormData(f))if(tf.hasStandardBrowserEnv||tf.hasStandardBrowserWebWorkerEnv||e$.isReactNative(f))g.setContentType(void 0);else{var x,w;e$.isFunction(f.getHeaders)&&(x=g,w=f.getHeaders(),"content-only"!==u("formDataHeaderPolicy")?x.set(w):Object.entries(w||{}).forEach(([d,m])=>{tL.includes(d.toLowerCase())&&x.set(d,m)}))}if(tf.hasStandardBrowserEnv&&(e$.isFunction(p)&&(p=p(m)),!0===p||null==p&&tA(m.url))){let d=h&&b&&tT.read(b);d&&g.set(h,d)}return m},tP="u">typeof XMLHttpRequest&&function(d){return new Promise(function(m,u){var f;let p,h,b,g,v,_,y=tB(d),F=y.data,x=e0.from(y.headers).normalize(),{responseType:w,onUploadProgress:E,onDownloadProgress:k}=y;function C(){g&&g(),v&&v(),y.cancelToken&&y.cancelToken.unsubscribe(p),y.signal&&y.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;function T(){if(!A)return;let f=e0.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders());tF(function(d){m(d),C()},function(d){u(d),C()},{data:w&&"text"!==w&&"json"!==w?A.response:A.responseText,status:A.status,statusText:A.statusText,headers:f,config:d,request:A}),A=null}A.open(y.method.toUpperCase(),y.url,!0),A.timeout=y.timeout,"onloadend"in A?A.onloadend=T:A.onreadystatechange=function(){!A||4!==A.readyState||(0!==A.status||A.responseURL&&A.responseURL.startsWith("file:"))&&setTimeout(T)},A.onabort=function(){A&&(u(new e2("Request aborted",e2.ECONNABORTED,d,A)),C(),A=null)},A.onerror=function(m){let f=new e2(m&&m.message?m.message:"Network Error",e2.ERR_NETWORK,d,A);f.event=m||null,u(f),C(),A=null},A.ontimeout=function(){let m=y.timeout?"timeout of "+y.timeout+"ms exceeded":"timeout exceeded",f=y.transitional||to;y.timeoutErrorMessage&&(m=y.timeoutErrorMessage),u(new e2(m,f.clarifyTimeoutError?e2.ETIMEDOUT:e2.ECONNABORTED,d,A)),C(),A=null},void 0===F&&x.setContentType(null),"setRequestHeader"in A&&e$.forEach(eX(x),function(d,m){A.setRequestHeader(m,d)}),e$.isUndefined(y.withCredentials)||(A.withCredentials=!!y.withCredentials),w&&"json"!==w&&(A.responseType=y.responseType),k&&([b,v]=tE(k,!0),A.addEventListener("progress",b)),E&&A.upload&&([h,g]=tE(E),A.upload.addEventListener("progress",h),A.upload.addEventListener("loadend",g)),(y.cancelToken||y.signal)&&(p=m=>{A&&(u(!m||m.type?new ty(null,d,A):m),A.abort(),C(),A=null)},y.cancelToken&&y.cancelToken.subscribe(p),y.signal&&(y.signal.aborted?p():y.signal.addEventListener("abort",p)));let S=(f=y.url,(_=/^([-+\w]{1,25}):(?:\/\/)?/.exec(f))&&_[1]||"");if(S&&!tf.protocols.includes(S)){u(new e2("Unsupported protocol "+S+":",e2.ERR_BAD_REQUEST,d)),C();return}A.send(F||null)})},tM=function*(d,m){let u,f=d.byteLength;if(!m||f<m)return void(yield d);let p=0;for(;p<f;)u=p+m,yield d.slice(p,u),p=u},tz=async function*(d,m){for await(let u of tU(d))yield*tM(u,m)},tU=async function*(d){if(d[Symbol.asyncIterator])return void(yield*d);let m=d.getReader();try{for(;;){let{done:d,value:u}=await m.read();if(d)break;yield u}}finally{await m.cancel()}},tj=(d,m,u,f)=>{let p,h=tz(d,m),b=0,g=d=>{!p&&(p=!0,f&&f(d))};return new ReadableStream({async pull(d){try{let{done:m,value:f}=await h.next();if(m){g(),d.close();return}let p=f.byteLength;if(u){let d=b+=p;u(d)}d.enqueue(new Uint8Array(f))}catch(d){throw g(d),d}},cancel:d=>(g(d),h.return())},{highWaterMark:2})},tV=d=>d>=48&&d<=57||d>=65&&d<=70||d>=97&&d<=102,tH=(d,m,u)=>m+2<u&&tV(d.charCodeAt(m+1))&&tV(d.charCodeAt(m+2)),{isFunction:t$}=e$,tq=d=>{if(!e$.isString(d))return d;try{return decodeURIComponent(d)}catch(m){return d}},tG=(d,...m)=>{try{return!!d(...m)}catch(d){return!1}},tY=d=>{let m,u=void 0!==e$.global&&null!==e$.global?e$.global:globalThis,{ReadableStream:f,TextEncoder:p}=u,{fetch:h,Request:b,Response:g}=d=e$.merge.call({skipUndefined:!0},{Request:u.Request,Response:u.Response},d),v=h?t$(h):"function"==typeof fetch,_=t$(b),y=t$(g);if(!v)return!1;let F=v&&t$(f),x=v&&("function"==typeof p?(m=new p,d=>m.encode(d)):async d=>new Uint8Array(await new b(d).arrayBuffer())),w=_&&F&&tG(()=>{let d=!1,m=new b(tf.origin,{body:new f,method:"POST",get duplex(){return d=!0,"half"}}),u=m.headers.has("Content-Type");return null!=m.body&&m.body.cancel(),d&&!u}),E=y&&F&&tG(()=>e$.isReadableStream(new g("").body)),k={stream:E&&(d=>d.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{k[d]||(k[d]=(m,u)=>{let f=m&&m[d];if(f)return f.call(m);throw new e2(`Response type '${d}' is not supported`,e2.ERR_NOT_SUPPORT,u)})});let C=async d=>{if(null==d)return 0;if(e$.isBlob(d))return d.size;if(e$.isSpecCompliantForm(d)){let m=new b(tf.origin,{method:"POST",body:d});return(await m.arrayBuffer()).byteLength}return e$.isArrayBufferView(d)||e$.isArrayBuffer(d)?d.byteLength:(e$.isURLSearchParams(d)&&(d+=""),e$.isString(d))?(await x(d)).byteLength:void 0},A=async(d,m)=>{let u=e$.toFiniteNumber(d.getContentLength());return null==u?C(m):u};return async d=>{let m,{url:u,method:f,data:v,signal:y,cancelToken:x,timeout:T,onDownloadProgress:S,onUploadProgress:I,responseType:O,headers:D,withCredentials:R="same-origin",fetchOptions:N,maxContentLength:L,maxBodyLength:B}=tB(d),P=e$.isNumber(L)&&L>-1,M=e$.isNumber(B)&&B>-1,z=h||fetch;O=O?(O+"").toLowerCase():"text";let U=((d,m)=>{if(d=d?d.filter(Boolean):[],!m&&!d.length)return;let u=new AbortController,f=!1,p=function(d){if(!f){f=!0,b();let m=d instanceof Error?d:this.reason;u.abort(m instanceof e2?m:new ty(m instanceof Error?m.message:m))}},h=m&&setTimeout(()=>{h=null,p(new e2(`timeout of ${m}ms exceeded`,e2.ETIMEDOUT))},m),b=()=>{d&&(h&&clearTimeout(h),h=null,d.forEach(d=>{d.unsubscribe?d.unsubscribe(p):d.removeEventListener("abort",p)}),d=null)};d.forEach(d=>d.addEventListener("abort",p,{once:!0}));let{signal:g}=u;return g.unsubscribe=()=>e$.asap(b),g})([y,x&&x.toAbortSignal()],T),j=null,V=U&&U.unsubscribe&&(()=>{U.unsubscribe()}),H=null,$=()=>new e2("Request body larger than maxBodyLength limit",e2.ERR_BAD_REQUEST,d,j);try{var q;let h,y,x,T,G=(y="auth",e$.hasOwnProp(d,y)?d[y]:void 0);if(G){let d=e$.getSafeProp(G,"username")||"",m=e$.getSafeProp(G,"password")||"";h={username:d,password:m}}if(x=(q=u).indexOf("://"),T=q,-1!==x&&(T=T.slice(x+3)),T.includes("@")||T.includes(":")){let d=new URL(u,tf.origin);if(!h&&(d.username||d.password)){let m=tq(d.username),u=tq(d.password);h={username:m,password:u}}(d.username||d.password)&&(d.username="",d.password="",u=d.href)}if(h){let d;D.delete("authorization"),D.set("Authorization","Basic "+btoa((d=(h.username||"")+":"+(h.password||""),encodeURIComponent(d).replace(/%([0-9A-F]{2})/gi,(d,m)=>String.fromCharCode(parseInt(m,16))))))}if(P&&"string"==typeof u&&u.startsWith("data:")&&function(d){if(!d||"string"!=typeof d||!d.startsWith("data:"))return 0;let m=d.indexOf(",");if(m<0)return 0;let u=d.slice(5,m),f=d.slice(m+1);if(/;base64/i.test(u)){let d=f.length,m=f.length;for(let u=0;u<m;u++)if(37===f.charCodeAt(u)&&u+2<m){let m=f.charCodeAt(u+1),p=f.charCodeAt(u+2);tV(m)&&tV(p)&&(d-=2,u+=2)}let u=0,p=m-1,h=d=>d>=2&&37===f.charCodeAt(d-2)&&51===f.charCodeAt(d-1)&&(68===f.charCodeAt(d)||100===f.charCodeAt(d));p>=0&&(61===f.charCodeAt(p)?(u++,p--):h(p)&&(u++,p-=3)),1===u&&p>=0&&(61===f.charCodeAt(p)?u++:h(p)&&u++);let b=3*Math.floor(d/4)-(u||0);return b>0?b:0}let p=0;for(let d=0,m=f.length;d<m;d++){let u=f.charCodeAt(d);if(37===u&&tH(f,d,m))p+=1,d+=2;else if(u<128)p+=1;else if(u<2048)p+=2;else if(u>=55296&&u<=56319&&d+1<m){let m=f.charCodeAt(d+1);m>=56320&&m<=57343?(p+=4,d++):p+=3}else p+=3}return p}(u)>L)throw new e2("maxContentLength size of "+L+" exceeded",e2.ERR_BAD_RESPONSE,d,j);if(M&&"get"!==f&&"head"!==f){let d=await C(v);if("number"==typeof d&&isFinite(d)&&(m=d,d>B))throw $()}let Y=M&&(e$.isReadableStream(v)||e$.isStream(v)),W=(d,m,u)=>tj(d,65536,d=>{if(M&&d>B)throw H=$();m&&m(d)},u);if(w&&"get"!==f&&"head"!==f&&(I||Y)){if(m=null==m?await A(D,v):m,0!==m||Y){let d,f=new b(u,{method:"POST",body:v,duplex:"half"});if(e$.isFormData(v)&&(d=f.headers.get("content-type"))&&D.setContentType(d),f.body){let[d,u]=I&&tk(m,tE(tC(I)))||[];v=W(f.body,d,u)}}}else if(Y&&!_&&F&&"get"!==f&&"head"!==f)v=W(v);else if(Y&&_&&!w&&"get"!==f&&"head"!==f)throw new e2("Stream request bodies are not supported by the current fetch implementation",e2.ERR_NOT_SUPPORT,d,j);e$.isString(R)||(R=R?"include":"omit");let X=_&&"credentials"in b.prototype;if(e$.isFormData(v)){let d=D.getContentType();d&&/^multipart\/form-data/i.test(d)&&!/boundary=/i.test(d)&&D.delete("content-type")}D.set("User-Agent","axios/1.18.1",!1);let K={...N,signal:U,method:f.toUpperCase(),headers:eX(D.normalize()),body:v,duplex:"half",credentials:X?R:void 0};j=_&&new b(u,K);let J=await (_?z(j,N):z(u,K)),Z=e0.from(J.headers);if(P){let m=e$.toFiniteNumber(Z.getContentLength());if(null!=m&&m>L)throw new e2("maxContentLength size of "+L+" exceeded",e2.ERR_BAD_RESPONSE,d,j)}let Q=E&&("stream"===O||"response"===O);if(E&&J.body&&(S||P||Q&&V)){let m={};["status","statusText","headers"].forEach(d=>{m[d]=J[d]});let u=e$.toFiniteNumber(Z.getContentLength()),[f,p]=S&&tk(u,tE(tC(S),!0))||[],h=0;J=new g(tj(J.body,65536,m=>{if(P&&m>L)throw new e2("maxContentLength size of "+L+" exceeded",e2.ERR_BAD_RESPONSE,d,j);f&&f(m)},()=>{p&&p(),V&&V()}),m)}O=O||"text";let ee=await k[e$.findKey(k,O)||"text"](J,d);if(P&&!E&&!Q){let m;if(null!=ee&&("number"==typeof ee.byteLength?m=ee.byteLength:"number"==typeof ee.size?m=ee.size:"string"==typeof ee&&(m="function"==typeof p?new p().encode(ee).byteLength:ee.length)),"number"==typeof m&&m>L)throw new e2("maxContentLength size of "+L+" exceeded",e2.ERR_BAD_RESPONSE,d,j)}return!Q&&V&&V(),await new Promise((m,u)=>{tF(m,u,{data:ee,headers:e0.from(J.headers),status:J.status,statusText:J.statusText,config:d,request:j})})}catch(m){if(V&&V(),U&&U.aborted&&U.reason instanceof e2){let u=U.reason;throw u.config=d,j&&(u.request=j),m!==u&&Object.defineProperty(u,"cause",{__proto__:null,value:m,writable:!0,enumerable:!1,configurable:!0}),u}if(H)throw j&&!H.request&&(H.request=j),H;if(m instanceof e2)throw j&&!m.request&&(m.request=j),m;if(m&&"TypeError"===m.name&&/Load failed|fetch/i.test(m.message)){let u=new e2("Network Error",e2.ERR_NETWORK,d,j,m&&m.response);throw Object.defineProperty(u,"cause",{__proto__:null,value:m.cause||m,writable:!0,enumerable:!1,configurable:!0}),u}throw e2.from(m,m&&m.code,d,j,m&&m.response)}}},tW=new Map,tX=d=>{let m=d&&d.env||{},{fetch:u,Request:f,Response:p}=m,h=[f,p,u],b=h.length,g,v,_=tW;for(;b--;)g=h[b],void 0===(v=_.get(g))&&_.set(g,v=b?new Map:tY(m)),_=v;return v};tX();let tK={http:null,xhr:tP,fetch:{get:tX}};e$.forEach(tK,(d,m)=>{if(d){try{Object.defineProperty(d,"name",{__proto__:null,value:m})}catch(d){}Object.defineProperty(d,"adapterName",{__proto__:null,value:m})}});let tJ=d=>`- ${d}`,tZ=d=>e$.isFunction(d)||null===d||!1===d,tQ=function(d,m){let u,f,{length:p}=d=e$.isArray(d)?d:[d],h={};for(let b=0;b<p;b++){let p;if(f=u=d[b],!tZ(u)&&void 0===(f=tK[(p=String(u)).toLowerCase()]))throw new e2(`Unknown adapter '${p}'`);if(f&&(e$.isFunction(f)||(f=f.get(m))))break;h[p||"#"+b]=f}if(!f){let d=Object.entries(h).map(([d,m])=>`adapter ${d} `+(!1===m?"is not supported by the environment":"is not available in the build"));throw new e2("There is no suitable adapter to dispatch the request "+(p?d.length>1?"since :\n"+d.map(tJ).join("\n"):" "+tJ(d[0]):"as no adapter specified"),e2.ERR_NOT_SUPPORT)}return f};function t0(d){if(d.cancelToken&&d.cancelToken.throwIfRequested(),d.signal&&d.signal.aborted)throw new ty(null,d)}function t1(d){return t0(d),d.headers=e0.from(d.headers),d.data=tv.call(d,d.transformRequest),-1!==["post","put","patch"].indexOf(d.method)&&d.headers.setContentType("application/x-www-form-urlencoded",!1),tQ(d.adapter||tg.adapter,d)(d).then(function(m){t0(d),d.response=m;try{m.data=tv.call(d,d.transformResponse,m)}finally{delete d.response}return m.headers=e0.from(m.headers),m},function(m){if(!t_(m)&&(t0(d),m&&m.response)){d.response=m.response;try{m.response.data=tv.call(d,d.transformResponse,m.response)}finally{delete d.response}m.response.headers=e0.from(m.response.headers)}return Promise.reject(m)})}let t2={};["object","boolean","number","function","string","symbol"].forEach((d,m)=>{t2[d]=function(u){return typeof u===d||"a"+(m<1?"n ":" ")+d}});let t5={};t2.transitional=function(d,m,u){function f(d,m){return"[Axios v1.18.1] Transitional option '"+d+"'"+m+(u?". "+u:"")}return(u,p,h)=>{if(!1===d)throw new e2(f(p," has been removed"+(m?" in "+m:"")),e2.ERR_DEPRECATED);return m&&!t5[p]&&(t5[p]=!0,console.warn(f(p," has been deprecated since v"+m+" and will be removed in the near future"))),!d||d(u,p,h)}},t2.spelling=function(d){return(m,u)=>(console.warn(`${u} is likely a misspelling of ${d}`),!0)};let t4=function(d,m,u){if("object"!=typeof d||null===d)throw new e2("options must be an object",e2.ERR_BAD_OPTION_VALUE);let f=Object.keys(d),p=f.length;for(;p-- >0;){let h=f[p],b=Object.prototype.hasOwnProperty.call(m,h)?m[h]:void 0;if(b){let m=d[h],u=void 0===m||b(m,h,d);if(!0!==u)throw new e2("option "+h+" must be "+u,e2.ERR_BAD_OPTION_VALUE);continue}if(!0!==u)throw new e2("Unknown option "+h,e2.ERR_BAD_OPTION)}};class t3{constructor(d){this.defaults=d||{},this.interceptors={request:new ti,response:new ti}}async request(d,m){try{return await this._request(d,m)}catch(d){if(d instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=Error();let u=(()=>{if(!m.stack)return"";let d=m.stack.indexOf("\n");return -1===d?"":m.stack.slice(d+1)})();try{if(d.stack){if(u){let m=u.indexOf("\n"),f=-1===m?-1:u.indexOf("\n",m+1),p=-1===f?"":u.slice(f+1);String(d.stack).endsWith(p)||(d.stack+="\n"+u)}}else d.stack=u}catch(d){}}throw d}}_request(d,m){let u,f;"string"==typeof d?(m=m||{}).url=d:m=d||{};let{transitional:p,paramsSerializer:h,headers:b}=m=tN(this.defaults,m);void 0!==p&&t4(p,{silentJSONParsing:t2.transitional(t2.boolean),forcedJSONParsing:t2.transitional(t2.boolean),clarifyTimeoutError:t2.transitional(t2.boolean),legacyInterceptorReqResOrdering:t2.transitional(t2.boolean),advertiseZstdAcceptEncoding:t2.transitional(t2.boolean),validateStatusUndefinedResolves:t2.transitional(t2.boolean)},!1),null!=h&&(e$.isFunction(h)?m.paramsSerializer={serialize:h}:t4(h,{encode:t2.function,serialize:t2.function},!0)),void 0!==m.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?m.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:m.allowAbsoluteUrls=!0),t4(m,{baseUrl:t2.spelling("baseURL"),withXsrfToken:t2.spelling("withXSRFToken")},!0),m.method=(m.method||this.defaults.method||"get").toLowerCase();let g=b&&e$.merge(b.common,b[m.method]);b&&e$.forEach(["delete","get","head","post","put","patch","query","common"],d=>{delete b[d]}),m.headers=e0.concat(g,b);let v=[],_=!0;this.interceptors.request.forEach(function(d){if("function"==typeof d.runWhen&&!1===d.runWhen(m))return;_=_&&d.synchronous;let u=m.transitional||to;u&&u.legacyInterceptorReqResOrdering?v.unshift(d.fulfilled,d.rejected):v.push(d.fulfilled,d.rejected)});let y=[];this.interceptors.response.forEach(function(d){y.push(d.fulfilled,d.rejected)});let F=0;if(!_){let d=[t1.bind(this),void 0];for(d.unshift(...v),d.push(...y),f=d.length,u=Promise.resolve(m);F<f;)u=u.then(d[F++],d[F++]);return u}f=v.length;let x=m;for(;F<f;){let d=v[F++],m=v[F++];try{x=d(x)}catch(d){m.call(this,d);break}}try{u=t1.call(this,x)}catch(d){return Promise.reject(d)}for(F=0,f=y.length;F<f;)u=u.then(y[F++],y[F++]);return u}getUri(d){return tn(tD((d=tN(this.defaults,d)).baseURL,d.url,d.allowAbsoluteUrls,d),d.params,d.paramsSerializer)}}e$.forEach(["delete","get","head","options"],function(d){t3.prototype[d]=function(m,u){return this.request(tN(u||{},{method:d,url:m,data:u&&e$.hasOwnProp(u,"data")?u.data:void 0}))}}),e$.forEach(["post","put","patch","query"],function(d){function m(m){return function(u,f,p){return this.request(tN(p||{},{method:d,headers:m?{"Content-Type":"multipart/form-data"}:{},url:u,data:f}))}}t3.prototype[d]=m(),"query"!==d&&(t3.prototype[d+"Form"]=m(!0))});let t6=class d{constructor(d){let m;if("function"!=typeof d)throw TypeError("executor must be a function.");this.promise=new Promise(function(d){m=d});const u=this;this.promise.then(d=>{if(!u._listeners)return;let m=u._listeners.length;for(;m-- >0;)u._listeners[m](d);u._listeners=null}),this.promise.then=d=>{let m,f=new Promise(d=>{u.subscribe(d),m=d}).then(d);return f.cancel=function(){u.unsubscribe(m)},f},d(function(d,f,p){u.reason||(u.reason=new ty(d,f,p),m(u.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){this.reason?d(this.reason):this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;let m=this._listeners.indexOf(d);-1!==m&&this._listeners.splice(m,1)}toAbortSignal(){let d=new AbortController,m=m=>{d.abort(m)};return this.subscribe(m),d.signal.unsubscribe=()=>this.unsubscribe(m),d.signal}static source(){let m;return{token:new d(function(d){m=d}),cancel:m}}},t8={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(t8).forEach(([d,m])=>{t8[m]=d});let t7=function d(m){let u=new t3(m),f=et(t3.prototype.request,u);return e$.extend(f,t3.prototype,u,{allOwnKeys:!0}),e$.extend(f,u,null,{allOwnKeys:!0}),f.create=function(u){return d(tN(m,u))},f}(tg);t7.Axios=t3,t7.CanceledError=ty,t7.CancelToken=t6,t7.isCancel=t_,t7.VERSION="1.18.1",t7.toFormData=e8,t7.AxiosError=e2,t7.Cancel=t7.CanceledError,t7.all=function(d){return Promise.all(d)},t7.spread=function(d){return function(m){return d.apply(null,m)}},t7.isAxiosError=function(d){return e$.isObject(d)&&!0===d.isAxiosError},t7.mergeConfig=tN,t7.AxiosHeaders=e0,t7.formToJSON=d=>th(e$.isHTMLForm(d)?new FormData(d):d),t7.getAdapter=tQ,t7.HttpStatusCode=t8,t7.default=t7;class t9{constructor(d){this.httpClient=d}startTunnel(d,m){return this.httpClient.request({method:"POST",url:nF`gateway/tunnel`,data:d,options:m})}stopTunnel(d,m){return this.httpClient.request({method:"DELETE",url:nF`gateway/tunnel`,data:d,options:m})}getAllActiveTunnelInfos(d,m){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${d}`,options:m})}getGatewayActiveTunnelInfos(d,m,u){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${d}/${m}`,options:u})}getActiveTunnelInfo(d,m,u,f,p){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${d}/${m}/${u}/${f}`,options:p})}}class ne{constructor(d){this.httpClient=d}register(d,m){return this.httpClient.request({method:"POST",url:nF`console/register`,data:d,options:m})}}class nt{constructor(d){this.httpClient=d}doProtocolAssetDiscovery(d,m,u){return this.httpClient.request({method:"GET",url:nF`agent/assetDiscovery/${d}`,queryParams:m,options:u})}doProtocolAssetImport(d,m,u,f){return this.httpClient.request({method:"POST",url:nF`agent/assetImport/${d}`,queryParams:u,data:m,options:f})}doProtocolInstanceDiscovery(d,m,u){return this.httpClient.request({method:"GET",url:nF`agent/instanceDiscovery/${d}`,queryParams:m,options:u})}}class nn{constructor(d){this.httpClient=d}getApps(d){return this.httpClient.request({method:"GET",url:nF`apps`,options:d})}getConsoleConfig(d){return this.httpClient.request({method:"GET",url:nF`apps/consoleConfig`,options:d})}getAppInfos(d){return this.httpClient.request({method:"GET",url:nF`apps/info`,options:d})}}class ni{constructor(d){this.httpClient=d}createProvisioningConfig(d,m){return this.httpClient.request({method:"POST",url:nF`provisioning`,data:d,options:m})}getProvisioningConfigs(d){return this.httpClient.request({method:"GET",url:nF`provisioning`,options:d})}deleteProvisioningConfig(d,m){return this.httpClient.request({method:"DELETE",url:nF`provisioning/${d}`,options:m})}updateProvisioningConfig(d,m,u){return this.httpClient.request({method:"PUT",url:nF`provisioning/${d}`,data:m,options:u})}}class no{constructor(d){this.httpClient=d}create(d,m){return this.httpClient.request({method:"POST",url:nF`dashboard`,data:d,options:m})}update(d,m){return this.httpClient.request({method:"PUT",url:nF`dashboard`,data:d,options:m})}getAllRealmDashboards(d,m){return this.httpClient.request({method:"GET",url:nF`dashboard/all/${d}`,options:m})}query(d,m){return this.httpClient.request({method:"POST",url:nF`dashboard/query`,data:d,options:m})}delete(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`dashboard/${d}/${m}`,options:u})}get(d,m,u){return this.httpClient.request({method:"GET",url:nF`dashboard/${d}/${m}`,options:u})}}class nr{constructor(d){this.httpClient=d}getPredictedDatapoints(d,m,u,f){return this.httpClient.request({method:"POST",url:nF`asset/predicted/${d}/${m}`,data:u,options:f})}writePredictedDatapoints(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`asset/predicted/${d}/${m}`,data:u,options:f})}}class na{constructor(d){this.httpClient=d}getServices(d,m){return this.httpClient.request({method:"GET",url:nF`service`,queryParams:d,options:m})}registerService(d,m){return this.httpClient.request({method:"POST",url:nF`service`,data:d,options:m})}getGlobalServices(d){return this.httpClient.request({method:"GET",url:nF`service/global`,options:d})}registerGlobalService(d,m){return this.httpClient.request({method:"POST",url:nF`service/global`,data:d,options:m})}deregisterService(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`service/${d}/${m}`,options:u})}getService(d,m,u){return this.httpClient.request({method:"GET",url:nF`service/${d}/${m}`,options:u})}heartbeat(d,m,u){return this.httpClient.request({method:"PUT",url:nF`service/${d}/${m}`,options:u})}}class ns{constructor(d){this.httpClient=d}getAssetDescriptors(d,m){return this.httpClient.request({method:"GET",url:nF`model/assetDescriptors`,queryParams:d,options:m})}getAssetInfo(d,m,u){return this.httpClient.request({method:"GET",url:nF`model/assetInfo/${d}`,queryParams:m,options:u})}getAssetInfos(d,m){return this.httpClient.request({method:"GET",url:nF`model/assetInfos`,queryParams:d,options:m})}getValueDescriptorSchema(d,m){return this.httpClient.request({method:"GET",url:nF`model/getValueDescriptorSchema`,queryParams:d,options:m})}getMetaItemDescriptors(d,m){return this.httpClient.request({method:"GET",url:nF`model/metaItemDescriptors`,queryParams:d,options:m})}getValueDescriptors(d,m){return this.httpClient.request({method:"GET",url:nF`model/valueDescriptors`,queryParams:d,options:m})}}class nc{constructor(d){this.httpClient=d}create(d,m){return this.httpClient.request({method:"POST",url:nF`realm`,data:d,options:m})}getAll(d){return this.httpClient.request({method:"GET",url:nF`realm`,options:d})}getAccessible(d){return this.httpClient.request({method:"GET",url:nF`realm/accessible`,options:d})}delete(d,m){return this.httpClient.request({method:"DELETE",url:nF`realm/${d}`,options:m})}get(d,m){return this.httpClient.request({method:"GET",url:nF`realm/${d}`,options:m})}update(d,m,u){return this.httpClient.request({method:"PUT",url:nF`realm/${d}`,data:m,options:u})}}class nl{constructor(d){this.httpClient=d}createGlobalRuleset(d,m){return this.httpClient.request({method:"POST",url:nF`rules`,data:d,options:m})}getGlobalRulesets(d,m){return this.httpClient.request({method:"GET",url:nF`rules`,queryParams:d,options:m})}createAssetRuleset(d,m){return this.httpClient.request({method:"POST",url:nF`rules/asset`,data:d,options:m})}getAssetRulesets(d,m,u){return this.httpClient.request({method:"GET",url:nF`rules/asset/for/${d}`,queryParams:m,options:u})}deleteAssetRuleset(d,m){return this.httpClient.request({method:"DELETE",url:nF`rules/asset/${d}`,options:m})}getAssetRuleset(d,m){return this.httpClient.request({method:"GET",url:nF`rules/asset/${d}`,options:m})}updateAssetRuleset(d,m,u){return this.httpClient.request({method:"PUT",url:nF`rules/asset/${d}`,data:m,options:u})}getAssetGeofences(d,m){return this.httpClient.request({method:"GET",url:nF`rules/geofences/${d}`,options:m})}getAssetEngineInfo(d,m){return this.httpClient.request({method:"GET",url:nF`rules/info/asset/${d}`,options:m})}getGlobalEngineInfo(d){return this.httpClient.request({method:"GET",url:nF`rules/info/global`,options:d})}getRealmEngineInfo(d,m){return this.httpClient.request({method:"GET",url:nF`rules/info/realm/${d}`,options:m})}createRealmRuleset(d,m){return this.httpClient.request({method:"POST",url:nF`rules/realm`,data:d,options:m})}getRealmRulesets(d,m,u){return this.httpClient.request({method:"GET",url:nF`rules/realm/for/${d}`,queryParams:m,options:u})}deleteRealmRuleset(d,m){return this.httpClient.request({method:"DELETE",url:nF`rules/realm/${d}`,options:m})}getRealmRuleset(d,m){return this.httpClient.request({method:"GET",url:nF`rules/realm/${d}`,options:m})}updateRealmRuleset(d,m,u){return this.httpClient.request({method:"PUT",url:nF`rules/realm/${d}`,data:m,options:u})}deleteGlobalRuleset(d,m){return this.httpClient.request({method:"DELETE",url:nF`rules/${d}`,options:m})}getGlobalRuleset(d,m){return this.httpClient.request({method:"GET",url:nF`rules/${d}`,options:m})}updateGlobalRuleset(d,m,u){return this.httpClient.request({method:"PUT",url:nF`rules/${d}`,data:m,options:u})}}class nd{constructor(d){this.httpClient=d}updateCurrentUserLocale(d,m){return this.httpClient.request({method:"PUT",url:nF`user/locale`,data:d,options:m})}query(d,m){return this.httpClient.request({method:"POST",url:nF`user/query`,data:d,options:m})}requestPasswordResetCurrent(d){return this.httpClient.request({method:"PUT",url:nF`user/request-password-reset`,options:d})}updatePasswordCurrent(d,m){return this.httpClient.request({method:"PUT",url:nF`user/reset-password`,data:d,options:m})}updateCurrent(d,m){return this.httpClient.request({method:"PUT",url:nF`user/update`,data:d,options:m})}getCurrent(d){return this.httpClient.request({method:"GET",url:nF`user/user`,options:d})}getCurrentUserRealmRoles(d){return this.httpClient.request({method:"GET",url:nF`user/userRealmRoles`,options:d})}getCurrentUserClientRoles(d,m){return this.httpClient.request({method:"GET",url:nF`user/userRoles/${d}`,options:m})}disconnectUserSession(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`user/${d}/disconnect/${m}`,options:u})}requestPasswordReset(d,m,u){return this.httpClient.request({method:"PUT",url:nF`user/${d}/request-password-reset/${m}`,options:u})}updatePassword(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`user/${d}/reset-password/${m}`,data:u,options:f})}resetSecret(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/reset-secret/${m}`,options:u})}updateRoles(d,m,u){return this.httpClient.request({method:"PUT",url:nF`user/${d}/roles`,data:m,options:u})}getUserRealmRoles(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/userRealmRoles/${m}`,options:u})}updateUserRealmRoles(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`user/${d}/userRealmRoles/${m}`,data:u,options:f})}getUserClientRoles(d,m,u,f){return this.httpClient.request({method:"GET",url:nF`user/${d}/userRoles/${m}/${u}`,options:f})}updateUserClientRoles(d,m,u,f,p){return this.httpClient.request({method:"PUT",url:nF`user/${d}/userRoles/${m}/${u}`,data:f,options:p})}getUserSessions(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/userSessions/${m}`,options:u})}create(d,m,u){return this.httpClient.request({method:"POST",url:nF`user/${d}/users`,data:m,options:u})}update(d,m,u){return this.httpClient.request({method:"PUT",url:nF`user/${d}/users`,data:m,options:u})}delete(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`user/${d}/users/${m}`,options:u})}getClientRoles(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/${m}/roles`,options:u})}updateClientRoles(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`user/${d}/${m}/roles`,data:u,options:f})}get(d,m,u){return this.httpClient.request({method:"GET",url:nF`user/${d}/${m}`,options:u})}}class nm{constructor(d){this.httpClient=d}getAllNodeDefinitions(d){return this.httpClient.request({method:"GET",url:nF`flow`,options:d})}getNodeDefinition(d,m){return this.httpClient.request({method:"GET",url:nF`flow/${d}`,options:m})}getAllNodeDefinitionsByType(d,m){return this.httpClient.request({method:"GET",url:nF`flow/${d}`,options:m})}}class nu{constructor(d){this.httpClient=d}getDatapointExport(d,m){return this.httpClient.request({method:"GET",url:nF`asset/datapoint/export`,queryParams:d,options:m})}getDatapointPeriod(d,m){return this.httpClient.request({method:"GET",url:nF`asset/datapoint/periods`,queryParams:d,options:m})}getDatapoints(d,m,u,f){return this.httpClient.request({method:"POST",url:nF`asset/datapoint/${d}/${m}`,data:u,options:f})}}class nf{constructor(d){this.httpClient=d}getHealthStatus(d){return this.httpClient.request({method:"GET",url:nF`health`,options:d})}getInfo(d){return this.httpClient.request({method:"GET",url:nF`info`,options:d})}}class np{constructor(d){this.httpClient=d}deleteConnections(d,m){return this.httpClient.request({method:"DELETE",url:nF`gateway/connection`,queryParams:d,options:m})}getConnections(d){return this.httpClient.request({method:"GET",url:nF`gateway/connection`,options:d})}deleteConnection(d,m){return this.httpClient.request({method:"DELETE",url:nF`gateway/connection/${d}`,options:m})}getConnection(d,m){return this.httpClient.request({method:"GET",url:nF`gateway/connection/${d}`,options:m})}setConnection(d,m,u){return this.httpClient.request({method:"PUT",url:nF`gateway/connection/${d}`,data:m,options:u})}getConnectionStatus(d,m){return this.httpClient.request({method:"GET",url:nF`gateway/status/${d}`,options:m})}}class nh{constructor(d){this.httpClient=d}createAlarm(d,m,u){return this.httpClient.request({method:"POST",url:nF`alarm`,queryParams:m,data:d,options:u})}getAlarms(d,m){return this.httpClient.request({method:"GET",url:nF`alarm`,queryParams:d,options:m})}removeAlarms(d,m){return this.httpClient.request({method:"DELETE",url:nF`alarm`,data:d,options:m})}setAssetLinks(d,m){return this.httpClient.request({method:"PUT",url:nF`alarm/assets`,data:d,options:m})}getAlarm(d,m){return this.httpClient.request({method:"GET",url:nF`alarm/${d}`,options:m})}removeAlarm(d,m){return this.httpClient.request({method:"DELETE",url:nF`alarm/${d}`,options:m})}updateAlarm(d,m,u){return this.httpClient.request({method:"PUT",url:nF`alarm/${d}`,data:m,options:u})}getAssetLinks(d,m,u){return this.httpClient.request({method:"GET",url:nF`alarm/${d}/assets`,queryParams:m,options:u})}}class nb{constructor(d){this.httpClient=d}getConfig(d){return this.httpClient.request({method:"GET",url:nF`syslog/config`,options:d})}updateConfig(d,m){return this.httpClient.request({method:"PUT",url:nF`syslog/config`,data:d,options:m})}clearEvents(d){return this.httpClient.request({method:"DELETE",url:nF`syslog/event`,options:d})}getEvents(d,m){return this.httpClient.request({method:"GET",url:nF`syslog/event`,queryParams:d,options:m})}}class ng{constructor(d){this.httpClient=d}getNotifications(d,m){return this.httpClient.request({method:"GET",url:nF`notification`,queryParams:d,options:m})}removeNotifications(d,m){return this.httpClient.request({method:"DELETE",url:nF`notification`,queryParams:d,options:m})}sendNotification(d,m){return this.httpClient.request({method:"POST",url:nF`notification/alert`,data:d,options:m})}getNotificationsCount(d,m){return this.httpClient.request({method:"GET",url:nF`notification/count`,queryParams:d,options:m})}removeNotification(d,m){return this.httpClient.request({method:"DELETE",url:nF`notification/${d}`,options:m})}notificationAcknowledged(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`notification/${d}/acknowledged`,queryParams:u,data:m,options:f})}notificationDelivered(d,m,u){return this.httpClient.request({method:"PUT",url:nF`notification/${d}/delivered`,queryParams:m,options:u})}}class nv{constructor(d){this.httpClient=d}create(d,m){return this.httpClient.request({method:"POST",url:nF`asset`,data:d,options:m})}delete(d,m){return this.httpClient.request({method:"DELETE",url:nF`asset`,queryParams:d,options:m})}writeAttributeValues(d,m){return this.httpClient.request({method:"PUT",url:nF`asset/attributes`,data:d,options:m})}writeAttributeEvents(d,m){return this.httpClient.request({method:"PUT",url:nF`asset/attributes/timestamp`,data:d,options:m})}queryCount(d,m){return this.httpClient.request({method:"POST",url:nF`asset/count`,data:d,options:m})}updateNoneParent(d,m){return this.httpClient.request({method:"DELETE",url:nF`asset/parent`,queryParams:d,options:m})}getPartial(d,m){return this.httpClient.request({method:"GET",url:nF`asset/partial/${d}`,options:m})}queryAssets(d,m){return this.httpClient.request({method:"POST",url:nF`asset/query`,data:d,options:m})}queryAssetTree(d,m){return this.httpClient.request({method:"POST",url:nF`asset/tree`,data:d,options:m})}getCurrentUserAssets(d){return this.httpClient.request({method:"GET",url:nF`asset/user/current`,options:d})}createUserAssetLinks(d,m){return this.httpClient.request({method:"POST",url:nF`asset/user/link`,data:d,options:m})}getUserAssetLinks(d,m){return this.httpClient.request({method:"GET",url:nF`asset/user/link`,queryParams:d,options:m})}deleteUserAssetLinks(d,m){return this.httpClient.request({method:"POST",url:nF`asset/user/link/delete`,data:d,options:m})}deleteAllUserAssetLinks(d,m,u){return this.httpClient.request({method:"DELETE",url:nF`asset/user/link/${d}/${m}`,options:u})}deleteUserAssetLink(d,m,u,f){return this.httpClient.request({method:"DELETE",url:nF`asset/user/link/${d}/${m}/${u}`,options:f})}get(d,m){return this.httpClient.request({method:"GET",url:nF`asset/${d}`,options:m})}update(d,m,u){return this.httpClient.request({method:"PUT",url:nF`asset/${d}`,data:m,options:u})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(d,m,u,f){return this.httpClient.request({method:"PUT",url:nF`asset/${d}/attribute/${m}`,data:u,options:f})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(d,m,u,f,p){return this.httpClient.request({method:"PUT",url:nF`asset/${d}/attribute/${m}/${u}`,data:f,options:p})}updateParent(d,m,u){return this.httpClient.request({method:"PUT",url:nF`asset/${d}/child`,queryParams:m,options:u})}}class n_{constructor(d){this.httpClient=d}getSettings(d){return this.httpClient.request({method:"GET",url:nF`map`,options:d})}saveSettings(d,m){return this.httpClient.request({method:"PUT",url:nF`map`,data:d,options:m})}deleteMap(d){return this.httpClient.request({method:"DELETE",url:nF`map/deleteMap`,options:d})}getCustomMapInfo(d){return this.httpClient.request({method:"GET",url:nF`map/getCustomMapInfo`,options:d})}getTile(d,m,u,f){return this.httpClient.request({method:"GET",url:nF`map/tile/${d}/${m}/${u}`,options:f})}uploadMap(d,m){return this.httpClient.request({method:"POST",url:nF`map/upload`,queryParams:d,options:m})}}class ny{constructor(d){this.httpClient=d}getManagerConfig(d){return this.httpClient.request({method:"GET",url:nF`configuration/manager`,options:d})}update(d,m){return this.httpClient.request({method:"PUT",url:nF`configuration/manager`,data:d,options:m})}fileUpload(d,m,u){return this.httpClient.request({method:"POST",url:nF`configuration/manager/file`,queryParams:m,data:d,options:u})}getManagerConfigImage(d,m){return this.httpClient.request({method:"GET",url:nF`configuration/manager/image/${d}`,options:m})}}function nF(d,...m){let u="";for(let f=0;f<m.length;f++)u+=d[f],u+=encodeURIComponent(m[f]);return u+d[d.length-1]}class nx{constructor(d,m=t7.create()){this._gatewayServiceResource=new nE(d,m),this._consoleResource=new nk(d,m),this._agentResource=new nC(d,m),this._appResource=new nA(d,m),this._provisioningResource=new nT(d,m),this._dashboardResource=new nS(d,m),this._assetPredictedDatapointResource=new nI(d,m),this._externalServiceResource=new nO(d,m),this._assetModelResource=new nD(d,m),this._realmResource=new nR(d,m),this._rulesResource=new nN(d,m),this._userResource=new nL(d,m),this._flowResource=new nB(d,m),this._assetDatapointResource=new nP(d,m),this._statusResource=new nM(d,m),this._gatewayClientResource=new nz(d,m),this._alarmResource=new nU(d,m),this._syslogResource=new nj(d,m),this._notificationResource=new nV(d,m),this._assetResource=new nH(d,m),this._mapResource=new n$(d,m),this._configurationResource=new nq(d,m),this._assetResource=new nH(d,m)}get GatewayServiceResource(){return this._gatewayServiceResource}get ConsoleResource(){return this._consoleResource}get AgentResource(){return this._agentResource}get AppResource(){return this._appResource}get ProvisioningResource(){return this._provisioningResource}get DashboardResource(){return this._dashboardResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get ExternalServiceResource(){return this._externalServiceResource}get AssetModelResource(){return this._assetModelResource}get RealmResource(){return this._realmResource}get RulesResource(){return this._rulesResource}get UserResource(){return this._userResource}get FlowResource(){return this._flowResource}get AssetDatapointResource(){return this._assetDatapointResource}get StatusResource(){return this._statusResource}get GatewayClientResource(){return this._gatewayClientResource}get AlarmResource(){return this._alarmResource}get SyslogResource(){return this._syslogResource}get NotificationResource(){return this._notificationResource}get AssetResource(){return this._assetResource}get MapResource(){return this._mapResource}get ConfigurationResource(){return this._configurationResource}}class nw{constructor(d){this.axios=d}request(d){let m={};m.method=d.method,m.url=d.url,m.params=d.queryParams,m.data=d.data,function(d,m){if(void 0!=m)for(let u in m)m.hasOwnProperty(u)&&(d[u]=m[u])}(m,d.options);let u=d.copyFn;return this.axios.request(m).then(d=>(u&&d.data&&(d.originalData=d.data,d.data=u(d.data)),d))}}class nE extends t9{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nk extends ne{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nC extends nt{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nA extends nn{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nT extends ni{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nS extends no{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nI extends nr{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nO extends na{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nD extends ns{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nR extends nc{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nN extends nl{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nL extends nd{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nB extends nm{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nP extends nu{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nM extends nf{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nz extends np{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nU extends nh{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nj extends nb{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nV extends ng{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nH extends nv{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class n$ extends n_{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}class nq extends ny{constructor(d,m=t7.create()){m.defaults.baseURL=d,super(new nw(m))}}var nG=u(8183),nY=u.n(nG);t7.isAxiosError;let nW=new class{get api(){return this._client}constructor(){this._axiosInstance=t7.create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(d=>(d.paramsSerializer=d=>nY().stringify(d,{arrayFormat:"repeat"}),d))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(d){this._axiosInstance.defaults.timeout=d}addRequestInterceptor(d){this._axiosInstance.interceptors.request.use(d)}initialise(d){this._baseUrl=d,this._client=new nx(d,this._axiosInstance)}};var nX=function(d,m,u,f){return new(u||(u=Promise))(function(p,h){function b(d){try{v(f.next(d))}catch(d){h(d)}}function g(d){try{v(f.throw(d))}catch(d){h(d)}}function v(d){var m;d.done?p(d.value):((m=d.value)instanceof u?m:new u(function(d){d(m)})).then(b,g)}v((f=f.apply(d,m||[])).next())})};(x=k||(k={})).DISCONNECTED="DISCONNECTED",x.CONNECTED="CONNECTED",x.CONNECTING="CONNECTING";let nK="SUBSCRIBED:",nJ="UNAUTHORIZED:",nZ="TRIGGERED:",nQ="EVENT:";class n0{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=n1.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=k.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(d){this._statusCallbacks.push(d)}unsubscribeStatusChange(d){B(this._statusCallbacks,d)}connect(){return(console.debug("Attempting to connect to events:",this.endpointUrl),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===k.CONNECTED)?(console.debug("Already connected to events!"),Promise.resolve(!0)):((this._disconnectRequested=!1,this._connectingDeferred)?console.warn("Already connecting to events, continuing the previous one."):(this._onStatusChanged(k.CONNECTING),this._connectingDeferred=new N,this._doConnect().then(d=>{if(this._connectingDeferred){let m=this._connectingDeferred;d?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=n1.MIN_RECONNECT_DELAY,this._onStatusChanged(k.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):console.debug("Failed to connect to event service: "+this.endpointUrl),m.resolve(d)}}).finally(()=>{this._connectingDeferred=null})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==k.DISCONNECTED&&this._doDisconnect())}subscribe(d,m){let u={eventSubscription:d,callback:m,deferred:new N};return null!=this._pendingSubscription||this._status!==k.CONNECTED?(this._queuedSubscriptions.push(u),u.deferred.promise):(this._pendingSubscription=u,this._doSubscribe(d).then(d=>{if(this._pendingSubscription){let m=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(d,m),this._processNextSubscription();let u=m.deferred;m.deferred=null,u&&u.resolve(d)}},d=>{if(console.error(d),this._pendingSubscription){let m=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let u=m.deferred;m.deferred=null,u&&u.reject(d)}}),this._pendingSubscription.deferred.promise)}unsubscribe(d){return nX(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(d))return void this._doUnsubscribe(d);if(this._assetEventCallbackMap.delete(d)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let d=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(d)}return}if(this._attributeEventCallbackMap.delete(d)&&this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let d=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(d)}})}sendEvent(d){this._status===k.CONNECTED&&this._doSend(d)}sendEventWithReply(d){return this._status!==k.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(d)}subscribeAssetEvents(d,m,u){return nX(this,void 0,void 0,function*(){let f=d&&"string"!=typeof d[0]?d.map(d=>d.id):d,p="AssetEvent"+n0._subscriptionCounter++;if(!this._assetEventPromise){let d;iT.authenticated||(d={filterType:"asset",realm:iT.displayRealm});let m={eventType:"asset",filter:d};this._assetEventPromise=this.subscribe(m,d=>{this._assetEventCallbackMap.forEach(m=>m(d))})}return this._assetEventCallbackMap.set(p,d=>{let m=d.asset.id;f?f.find(d=>m===d)&&u(d):d.asset.realm===iT.displayRealm&&u(d)}),this._assetEventPromise.then(()=>{try{if(f&&m){let d={messageID:"read-assets:"+f.join(",")+":"+p,eventType:"read-assets",assetQuery:{ids:f}};this.sendEventWithReply(d).then(d=>{d.assets&&this._assetEventCallbackMap.has(p)&&d.assets.forEach(d=>{u({eventType:"asset",asset:d,cause:"READ"})})})}}catch(m){throw console.error("Failed to subscribe to asset events for assets: "+d),p&&this.unsubscribe(p),m}return p})})}subscribeAttributeEvents(d,m,u){return nX(this,void 0,void 0,function*(){let f=d&&"string"!=typeof d[0],p=f?d.map(d=>d.id):d,h=f?d:void 0,b="AttributeEvent"+n0._subscriptionCounter++;if(!this._attributeEventPromise){let d;iT.authenticated||(d={filterType:"asset",realm:iT.displayRealm});let m={eventType:"attribute",filter:d};this._attributeEventPromise=this.subscribe(m,d=>{this._attributeEventCallbackMap.forEach(m=>m(d))})}let g=m=>{let h=m.ref;f?d.forEach(d=>{h.id===d.id&&h.name===d.name&&u(m)}):p?p.find(d=>h.id===d)&&u(m):m.realm===iT.displayRealm&&u(m)};return this._attributeEventCallbackMap.set(b,g),this._attributeEventPromise.then(()=>{try{if(m&&p){let d={messageID:"read-assets:"+p.join(",")+":"+b,eventType:"read-assets",assetQuery:{ids:p}};this.sendEventWithReply(d).then(d=>{d.assets&&this._attributeEventCallbackMap.has(b)&&d.assets.forEach(d=>{d.attributes&&Object.entries(d.attributes).forEach(([m,u])=>{(!h||h.find(u=>u.id===d.id&&u.name===m))&&g({eventType:"attribute",timestamp:u.timestamp,value:u.value,ref:{id:d.id,name:m}})})})})}}catch(m){throw console.error("Failed to subscribe to asset events for assets: "+d),b&&this.unsubscribe(b),m}return b})})}_processNextSubscription(){this._status===k.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let d=this._queuedSubscriptions.shift();d&&this.subscribe(d.eventSubscription,d.callback).then(m=>{let u=d.deferred;d.deferred=null,u&&u.resolve(m)},m=>{let u=d.deferred;d.deferred=null,u&&u.reject(m)})},0)}_onStatusChanged(d){d!==this._status&&(console.debug("Event provider status changed: "+d),this._status=d,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(m=>m(d))},0))}_onMessageReceived(d,m){let u=this._subscriptionMap.get(d);u&&u.callback(m)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let d in this._subscriptionMap)this._subscriptionMap.has(d)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(d));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===k.CONNECTED&&this._onStatusChanged(k.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(k.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<n1.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(n1.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}n0.MIN_RECONNECT_DELAY=0,n0.MAX_RECONNECT_DELAY=3e4,n0._subscriptionCounter=0;class n1 extends n0{get endpointUrl(){return this._endpointUrl}constructor(d){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(d.startsWith("https:")?"wss":"ws")+"://"+d.substr(d.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let d=this._endpointUrl+"?Realm="+iT.config.realm;return this._connectDeferred=new N,(iT.authenticated?iT.retrieveAuthorizationHeader().then(m=>{d+="&Authorization="+m}):Promise.resolve()).finally(()=>{this._webSocket=new WebSocket(d),this._webSocket.onopen=d=>{if(this._connectDeferred){let d=this._connectDeferred;this._connectDeferred=null,d.resolve(!0)}},this._webSocket.onerror=d=>{if(console.error("Event provider error:",d),this._connectDeferred){let d=this._connectDeferred;this._connectDeferred=null,d.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onclose=()=>{if(console.warn("The WebSocket connection of the event provider has been closed."),this._webSocket=void 0,this._connectDeferred){let d=this._connectDeferred;this._connectDeferred=null,d.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=d=>{let m=d.data;if(m&&m.startsWith(nK)){let d=JSON.parse(m.substring(nK.length)),u=this._subscribeDeferred;this._subscribeDeferred=null,u&&u.resolve(d.subscriptionId)}else if(m.startsWith(nJ)){let d=JSON.parse(m.substring(nJ.length)),u=this._subscribeDeferred;this._subscribeDeferred=null,u&&(console.warn("Unauthorized event subscription: "+JSON.stringify(d,null,2)),u.reject("Unauthorized"))}else if(m.startsWith(nZ)){let d=JSON.parse(m.substring(nZ.length));d.events&&d.events.forEach(m=>{this._onMessageReceived(d.subscriptionId,m)})}else if(m.startsWith(nQ)){let d=JSON.parse(m.substring(nQ.length));if(d.messageID){let m=this._repliesDeferred.get(d.messageID);this._repliesDeferred.delete(d.messageID),m&&m.resolve(d)}}}}),this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var d;null==(d=this._webSocket)||d.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(d){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new N,d.subscriptionId||(d.subscriptionId=n1._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(d)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(d){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:d}))}_doSend(d){let m=nQ+JSON.stringify(d);this._webSocket.send(m)}_doSendWithReply(d){if(d.messageID||(d.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(d.messageID))return Promise.reject("There's already a pending send and reply with this ID");let m=new N;return this._repliesDeferred.set(d.messageID,m),this._webSocket.send(nQ+JSON.stringify(d)),m.promise}}n1._subscriptionCounter=1;let n2=["__proto__","constructor","prototype"];function n5(d){return!("string"!=typeof d||0===d.length||d.length>128||n2.indexOf(d)>-1||d.indexOf("..")>-1||d.indexOf("\\")>-1||/[?#%\s@]/.test(d)||/[\x00-\x1F\x7F]/.test(d))}function n4(d){return!(!n5(d)||d.indexOf("/")>-1)}let n3={lng:n4,ns:function(d){return n5(d)}};function n6(d){return"string"!=typeof d?d:d.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function n8(){return"function"==typeof XMLHttpRequest||"object"==typeof XMLHttpRequest}let n7=/\{\{(.+?)\}\}/g;function n9(d,m){let u=!1,f=d.replace(n7,(d,f)=>{let p=f.trim();if(n2.indexOf(p)>-1)return d;let h=m[p];if(null==h)return d;let b=n3[p]||n4,g=String(h).split("+");for(let m of g)if(!b(m))return u=!0,d;return g.join("+")});return u?null:f}let ie="u">typeof globalThis?globalThis:"u">typeof global?global:"u">typeof window?window:void 0;"function"==typeof fetch?f=fetch:ie&&"function"==typeof ie.fetch&&(f=ie.fetch);let it=n8()&&ie?ie.XMLHttpRequest:void 0,ii="function"==typeof ActiveXObject&&ie?ie.ActiveXObject:void 0,io=["__proto__","constructor","prototype"],ir=(d,m)=>{if(m&&"object"==typeof m){let u="";for(let d of Object.keys(m))io.indexOf(d)>-1||(u+="&"+encodeURIComponent(d)+"="+encodeURIComponent(m[d]));if(!u)return d;d=d+(-1!==d.indexOf("?")?"&":"?")+u.slice(1)}return d},ia=(d,m,u,p)=>{let h=d=>{if(!d.ok)return u(d.statusText||"Error",{status:d.status});d.text().then(m=>{u(null,{status:d.status,data:m})}).catch(u)};if(p){let f=p(d,m);if(f instanceof Promise)return void f.then(h).catch(u)}"function"==typeof fetch?fetch(d,m).then(h).catch(u):f(d,m).then(h).catch(u)},is=(d,m,u,p)=>{if("function"==typeof u&&(p=u,u=void 0),p=p||(()=>{}),f&&0!==m.indexOf("file:")){var h=m,b=u,g=p;d.queryStringParams&&(h=ir(h,d.queryStringParams));let f={..."function"==typeof d.customHeaders?d.customHeaders():d.customHeaders};"u"<typeof window&&"u">typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(f["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),b&&(f["Content-Type"]="application/json");let v="function"==typeof d.requestOptions?d.requestOptions(b):d.requestOptions,_={method:b?"POST":"GET",body:b?d.stringify(b):void 0,headers:f,...d._omitFetchOptions?{}:v},y="function"==typeof d.alternateFetch&&d.alternateFetch.length>=1?d.alternateFetch:void 0;try{ia(h,_,g,y)}catch(m){if(!v||0===Object.keys(v).length||!m.message||0>m.message.indexOf("not implemented"))return g(m);try{Object.keys(v).forEach(d=>{delete _[d]}),ia(h,_,g,y),d._omitFetchOptions=!0}catch(d){g(d)}}return}if(n8()||"function"==typeof ActiveXObject){var v=m,_=u,y=p;_&&"object"==typeof _&&(_=ir("",_).slice(1)),d.queryStringParams&&(v=ir(v,d.queryStringParams));try{let m=it?new it:new ii("MSXML2.XMLHTTP.3.0");m.open(_?"POST":"GET",v,1),d.crossDomain||m.setRequestHeader("X-Requested-With","XMLHttpRequest"),m.withCredentials=!!d.withCredentials,_&&m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.overrideMimeType&&m.overrideMimeType("application/json");let u=d.customHeaders;if(u="function"==typeof u?u():u)for(let d of Object.keys(u))io.indexOf(d)>-1||m.setRequestHeader(d,u[d]);m.onreadystatechange=()=>{m.readyState>3&&y(m.status>=400?m.statusText:null,{status:m.status,data:m.responseText})},m.send(_)}catch(d){console&&console.log(d)}return}p(Error("No fetch and no xhr implementation found!"))};var ic=class{constructor(d,m={},u={}){this.services=d,this.options=m,this.allOptions=u,this.type="backend",this.init(d,m,u)}init(d,m={},u={}){if(this.services=d,this.options={...{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:d=>JSON.parse(d),stringify:JSON.stringify,parsePayload:(d,m,u)=>({[m]:u||""}),parseLoadPayload:(d,m)=>void 0,request:is,reloadInterval:"u"<typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}},...this.options||{},...m},this.allOptions=u,this.services&&this.options.reloadInterval){let d=setInterval(()=>this.reload(),this.options.reloadInterval);"object"==typeof d&&"function"==typeof d.unref&&d.unref()}}readMulti(d,m,u){this._readAny(d,d,m,m,u)}read(d,m,u){this._readAny([d],d,[m],m,u)}_readAny(d,m,u,f,p){var h,b;let g=this.options.loadPath;"function"==typeof this.options.loadPath&&(g=this.options.loadPath(d,u)),(g=(b=h=g)&&"function"==typeof b.then?h:Promise.resolve(h)).then(h=>{if(!h)return p(null,{});let b=n9(h,{lng:d.join("+"),ns:u.join("+")});if(null==b)return p(Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+d.map(n6).join(", ")+"] namespaces=["+u.map(n6).join(", ")+"]"),!1);this.loadUrl(b,p,m,f)})}loadUrl(d,m,u,f){let p=this.options.parseLoadPayload("string"==typeof u?[u]:u,"string"==typeof f?[f]:f),h=n6(function(d){if("string"!=typeof d||0===d.length)return d;try{let m=new URL(d);if(m.username||m.password)return m.username="",m.password="",m.toString();return d}catch(m){return d.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(d));this.options.request(this.options,d,p,(d,p)=>{let b,g;if(p&&(p.status>=500&&p.status<600||!p.status))return m("failed loading "+h+"; status code: "+p.status,!0);if(p&&p.status>=400&&p.status<500)return m("failed loading "+h+"; status code: "+p.status,!1);if(!p&&d&&d.message){let u=d.message.toLowerCase();if(["failed","fetch","network","load"].find(d=>u.indexOf(d)>-1))return m("failed loading "+h+": "+n6(d.message),!0)}if(d)return m(d,!1);try{b="string"==typeof p.data?this.options.parse(p.data,u,f):p.data}catch(d){g="failed parsing "+h+" to json"}if(g)return m(g,!1);m(null,b)})}create(d,m,u,f,p){if(!this.options.addPath)return;"string"==typeof d&&(d=[d]);let h=this.options.parsePayload(m,u,f),b=0,g=[],v=[];d.forEach(u=>{let f=this.options.addPath;"function"==typeof this.options.addPath&&(f=this.options.addPath(u,m));let _=n9(f,{lng:u,ns:m});if(null==_){b+=1,p&&b===d.length&&p(g,v);return}this.options.request(this.options,_,h,(m,u)=>{b+=1,g.push(m),v.push(u),b===d.length&&"function"==typeof p&&p(g,v)})})}reload(){let{backendConnector:d,languageUtils:m,logger:u}=this.services,f=d.language;if(f&&"cimode"===f.toLowerCase())return;let p=[],h=d=>{m.toResolveHierarchy(d).forEach(d=>{0>p.indexOf(d)&&p.push(d)})};h(f),this.allOptions.preload&&this.allOptions.preload.forEach(d=>h(d)),p.forEach(m=>{this.allOptions.ns.forEach(f=>{d.read(m,f,"read",null,null,(p,h)=>{p&&u.warn(`loading namespace ${f} for language ${m} failed`,p),!p&&h&&u.log(`loaded namespace ${f} for language ${m}`,h),d.loaded(`${m}|${f}`,p,h)})})})}};ic.type="backend";var il=u(3957),id=u(4954);class im extends Error{}function iu(d,m){let u;if("string"!=typeof d)throw new im("Invalid token specified: must be a string");m||(m={});let f=+(!0!==m.header),p=d.split(".")[f];if("string"!=typeof p)throw new im(`Invalid token specified: missing part #${f+1}`);try{u=function(d){let m=d.replace(/-/g,"+").replace(/_/g,"/");switch(m.length%4){case 0:break;case 2:m+="==";break;case 3:m+="=";break;default:throw Error("base64 string is not of the correct length")}try{var u;return u=m,decodeURIComponent(atob(u).replace(/(.)/g,(d,m)=>{let u=m.charCodeAt(0).toString(16).toUpperCase();return u.length<2&&(u="0"+u),"%"+u}))}catch(d){return atob(m)}}(p)}catch(d){throw new im(`Invalid token specified: invalid base64 for part #${f+1} (${d.message})`)}try{return JSON.parse(u)}catch(d){throw new im(`Invalid token specified: invalid json for part #${f+1} (${d.message})`)}}if(im.prototype.name="InvalidTokenError","u"<typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function ip(d){if(!(this instanceof ip))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var m,u,f=this,p=[],h={enable:!0,callbackList:[],interval:5},b=document.getElementsByTagName("script"),g=0;g<b.length;g++)(-1!==b[g].src.indexOf("keycloak.js")||-1!==b[g].src.indexOf("keycloak.min.js"))&&-1!==b[g].src.indexOf("version=")&&(f.iframeVersion=b[g].src.substring(b[g].src.indexOf("version=")+8).split("&")[0]);var v=!0,_=P(console.info),y=P(console.warn);function F(d,m){for(var u=function(d){var m=null,u=window.crypto||window.msCrypto;if(u&&u.getRandomValues&&window.Uint8Array)return m=new Uint8Array(d),u.getRandomValues(m),m;m=Array(d);for(var f=0;f<m.length;f++)m[f]=Math.floor(256*Math.random());return m}(d),f=Array(d),p=0;p<d;p++)f[p]=m.charCodeAt(u[p]%m.length);return String.fromCharCode.apply(null,f)}function x(){return void 0===f.authServerUrl?void 0:"/"==f.authServerUrl.charAt(f.authServerUrl.length-1)?f.authServerUrl+"realms/"+encodeURIComponent(f.realm):f.authServerUrl+"/realms/"+encodeURIComponent(f.realm)}function w(d,m){var u=d.code,p=d.error,h=d.prompt,b=new Date().getTime();if(d.kc_action_status&&f.onActionUpdate&&f.onActionUpdate(d.kc_action_status),p){if("none"!=h)if(d.error_description&&"authentication_expired"===d.error_description)f.login(d.loginOptions);else{var g={error:p,error_description:d.error_description};f.onAuthError&&f.onAuthError(g),m&&m.setError(g)}else m&&m.setSuccess();return}if("standard"!=f.flow&&(d.access_token||d.id_token)&&w(d.access_token,null,d.id_token,!0),"implicit"!=f.flow&&u){var y="code="+u+"&grant_type=authorization_code",F=f.endpoints.token(),x=new XMLHttpRequest;x.open("POST",F,!0),x.setRequestHeader("Content-type","application/x-www-form-urlencoded"),y+="&client_id="+encodeURIComponent(f.clientId)+"&redirect_uri="+d.redirectUri,d.pkceCodeVerifier&&(y+="&code_verifier="+d.pkceCodeVerifier),x.withCredentials=!0,x.onreadystatechange=function(){if(4==x.readyState)if(200==x.status){var d=JSON.parse(x.responseText);w(d.access_token,d.refresh_token,d.id_token,"standard"===f.flow),O()}else f.onAuthError&&f.onAuthError(),m&&m.setError()},x.send(y)}function w(u,p,h,g){k(u,p,h,b=(b+new Date().getTime())/2),v&&f.idTokenParsed&&f.idTokenParsed.nonce!=d.storedNonce?(_("[KEYCLOAK] Invalid nonce, clearing token"),f.clearToken(),m&&m.setError()):g&&(f.onAuthSuccess&&f.onAuthSuccess(),m&&m.setSuccess())}}function E(d){return 0==d.status&&d.responseText&&d.responseURL.startsWith("file:")}function k(d,m,u,p){if(f.tokenTimeoutHandle&&(clearTimeout(f.tokenTimeoutHandle),f.tokenTimeoutHandle=null),m?(f.refreshToken=m,f.refreshTokenParsed=iu(m)):(delete f.refreshToken,delete f.refreshTokenParsed),u?(f.idToken=u,f.idTokenParsed=iu(u)):(delete f.idToken,delete f.idTokenParsed),d){if(f.token=d,f.tokenParsed=iu(d),f.sessionId=f.tokenParsed.sid,f.authenticated=!0,f.subject=f.tokenParsed.sub,f.realmAccess=f.tokenParsed.realm_access,f.resourceAccess=f.tokenParsed.resource_access,p&&(f.timeSkew=Math.floor(p/1e3)-f.tokenParsed.iat),null!=f.timeSkew&&(_("[KEYCLOAK] Estimated time difference between browser and server is "+f.timeSkew+" seconds"),f.onTokenExpired)){var h=(f.tokenParsed.exp-new Date().getTime()/1e3+f.timeSkew)*1e3;_("[KEYCLOAK] Token expires in "+Math.round(h/1e3)+" s"),h<=0?f.onTokenExpired():f.tokenTimeoutHandle=setTimeout(f.onTokenExpired,h)}}else delete f.token,delete f.tokenParsed,delete f.subject,delete f.realmAccess,delete f.resourceAccess,f.authenticated=!1}function C(){var d="0123456789abcdef",m=F(36,d).split("");return m[14]="4",m[19]=d.substr(3&m[19]|8,1),m[8]=m[13]=m[18]=m[23]="-",m.join("")}function A(d){var m=function(d){switch(f.flow){case"standard":m=["code","state","session_state","kc_action_status","iss"];break;case"implicit":m=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":m=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}m.push("error"),m.push("error_description"),m.push("error_uri");var m,u,p,h=d.indexOf("?"),b=d.indexOf("#");if("query"===f.responseMode&&-1!==h?(u=d.substring(0,h),""!==(p=T(d.substring(h+1,-1!==b?b:d.length),m)).paramsString&&(u+="?"+p.paramsString),-1!==b&&(u+=d.substring(b))):"fragment"===f.responseMode&&-1!==b&&(u=d.substring(0,b),""!==(p=T(d.substring(b+1),m)).paramsString&&(u+="#"+p.paramsString)),p&&p.oauthParams){if("standard"===f.flow||"hybrid"===f.flow){if((p.oauthParams.code||p.oauthParams.error)&&p.oauthParams.state)return p.oauthParams.newUrl=u,p.oauthParams}else if("implicit"===f.flow&&(p.oauthParams.access_token||p.oauthParams.error)&&p.oauthParams.state)return p.oauthParams.newUrl=u,p.oauthParams}}(d);if(m){var p=u.get(m.state);return p&&(m.valid=!0,m.redirectUri=p.redirectUri,m.storedNonce=p.nonce,m.prompt=p.prompt,m.pkceCodeVerifier=p.pkceCodeVerifier,m.loginOptions=p.loginOptions),m}}function T(d,m){for(var u=d.split("&"),f={paramsString:"",oauthParams:{}},p=0;p<u.length;p++){var h=u[p].indexOf("="),b=u[p].slice(0,h);-1!==m.indexOf(b)?f.oauthParams[b]=u[p].slice(h+1):(""!==f.paramsString&&(f.paramsString+="&"),f.paramsString+=u[p])}return f}function S(){var d={setSuccess:function(m){d.resolve(m)},setError:function(m){d.reject(m)}};return d.promise=new Promise(function(m,u){d.resolve=m,d.reject=u}),d}function I(){var d=S();if(!h.enable||h.iframe)return d.setSuccess(),d.promise;var m=document.createElement("iframe");h.iframe=m,m.onload=function(){var m=f.endpoints.authorize();"/"===m.charAt(0)?h.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):h.iframeOrigin=m.substring(0,m.indexOf("/",8)),d.setSuccess()};var u=f.endpoints.checkSessionIframe();return m.setAttribute("src",u),m.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),m.setAttribute("title","keycloak-session-iframe"),m.style.display="none",document.body.appendChild(m),window.addEventListener("message",function(d){if(d.origin===h.iframeOrigin&&h.iframe.contentWindow===d.source&&("unchanged"==d.data||"changed"==d.data||"error"==d.data)){"unchanged"!=d.data&&f.clearToken();for(var m=h.callbackList.splice(0,h.callbackList.length),u=m.length-1;u>=0;--u){var p=m[u];"error"==d.data?p.setError():p.setSuccess("unchanged"==d.data)}}},!1),d.promise}function O(){h.enable&&f.token&&setTimeout(function(){D().then(function(d){d&&O()})},1e3*h.interval)}function D(){var d=S();if(h.iframe&&h.iframeOrigin){var m=f.clientId+" "+(f.sessionId?f.sessionId:"");h.callbackList.push(d);var u=h.iframeOrigin;1==h.callbackList.length&&h.iframe.contentWindow.postMessage(m,u)}else d.setSuccess();return d.promise}function R(){var d,m,u,p=S();if(h.enable||f.silentCheckSsoRedirectUri){var b=document.createElement("iframe");b.setAttribute("src",f.endpoints.thirdPartyCookiesIframe()),b.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),b.setAttribute("title","keycloak-3p-check-iframe"),b.style.display="none",document.body.appendChild(b);var g=function(d){b.contentWindow===d.source&&("supported"===d.data||"unsupported"===d.data)&&("unsupported"===d.data&&(y("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"),h.enable=!1,f.silentCheckSsoFallback&&(f.silentCheckSsoRedirectUri=!1)),document.body.removeChild(b),window.removeEventListener("message",g),p.setSuccess())};window.addEventListener("message",g,!1)}else p.setSuccess();return d=p.promise,m=f.messageReceiveTimeout,u=null,Promise.race([d,new Promise(function(d,f){u=setTimeout(function(){f({error:"Timeout when waiting for 3rd party check iframe message."})},m)})]).finally(function(){clearTimeout(u)})}function N(d){if(!d||"default"==d)return{login:function(d){return window.location.assign(f.createLoginUrl(d)),S().promise},logout:async function(d){if("GET"===(d?.logoutMethod??f.logoutMethod))return void window.location.replace(f.createLogoutUrl(d));let u=f.createLogoutUrl(d),p=await fetch(u,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:f.idToken,client_id:f.clientId,post_logout_redirect_uri:m.redirectUri(d,!1)})});if(p.redirected){window.location.href=p.url;return}if(p.ok)return void window.location.reload();throw Error("Logout failed, request returned an error code.")},register:function(d){return window.location.assign(f.createRegisterUrl(d)),S().promise},accountManagement:function(){var d=f.createAccountUrl();if(void 0!==d)window.location.href=d;else throw"Not supported by the OIDC server";return S().promise},redirectUri:function(d,m){return d&&d.redirectUri?d.redirectUri:f.redirectUri?f.redirectUri:location.href}};if("cordova"==d){h.enable=!1;var u=function(d,m,u){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(d,m,u):window.open(d,m,u)},p=function(d){var m=d&&d.cordovaOptions?Object.keys(d.cordovaOptions).reduce(function(m,u){return m[u]=d.cordovaOptions[u],m},{}):{};return m.location="no",d&&"none"==d.prompt&&(m.hidden="yes"),Object.keys(m).reduce(function(d,u){return d.push(u+"="+m[u]),d},[]).join(",")},b=function(){return f.redirectUri||"http://localhost"};return{login:function(d){var m=S(),h=p(d),g=u(f.createLoginUrl(d),"_blank",h),v=!1,_=!1,y=function(){_=!0,g.close()};return g.addEventListener("loadstart",function(d){0==d.url.indexOf(b())&&(w(A(d.url),m),y(),v=!0)}),g.addEventListener("loaderror",function(d){v||(0==d.url.indexOf(b())?(w(A(d.url),m),y(),v=!0):(m.setError(),y()))}),g.addEventListener("exit",function(d){_||m.setError({reason:"closed_by_user"})}),m.promise},logout:function(d){var m,p=S(),h=u(f.createLogoutUrl(d),"_blank","location=no,hidden=yes,clearcache=yes");return h.addEventListener("loadstart",function(d){0==d.url.indexOf(b())&&h.close()}),h.addEventListener("loaderror",function(d){0==d.url.indexOf(b())||(m=!0),h.close()}),h.addEventListener("exit",function(d){m?p.setError():(f.clearToken(),p.setSuccess())}),p.promise},register:function(d){var m=S(),h=u(f.createRegisterUrl(),"_blank",p(d));return h.addEventListener("loadstart",function(d){0==d.url.indexOf(b())&&(h.close(),w(A(d.url),m))}),m.promise},accountManagement:function(){var d=f.createAccountUrl();if(void 0!==d){var m=u(d,"_blank","location=no");m.addEventListener("loadstart",function(d){0==d.url.indexOf(b())&&m.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(d){return b()}}}if("cordova-native"==d)return h.enable=!1,{login:function(d){var m=S(),u=f.createLoginUrl(d);return universalLinks.subscribe("keycloak",function(d){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),w(A(d.url),m)}),window.cordova.plugins.browsertab.openUrl(u),m.promise},logout:function(d){var m=S(),u=f.createLogoutUrl(d);return universalLinks.subscribe("keycloak",function(d){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),f.clearToken(),m.setSuccess()}),window.cordova.plugins.browsertab.openUrl(u),m.promise},register:function(d){var m=S(),u=f.createRegisterUrl(d);return universalLinks.subscribe("keycloak",function(d){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),w(A(d.url),m)}),window.cordova.plugins.browsertab.openUrl(u),m.promise},accountManagement:function(){var d=f.createAccountUrl();if(void 0!==d)window.cordova.plugins.browsertab.openUrl(d);else throw"Not supported by the OIDC server"},redirectUri:function(d){return d&&d.redirectUri?d.redirectUri:f.redirectUri?f.redirectUri:"http://localhost"}};throw"invalid adapter type: "+d}f.init=function(p){if(f.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(f.didInitialize=!0,f.authenticated=!1,u=function(){try{return new L}catch(d){}return new B}(),m=p&&["default","cordova","cordova-native"].indexOf(p.adapter)>-1?N(p.adapter):p&&"object"==typeof p.adapter?p.adapter:window.Cordova||window.cordova?N("cordova"):N(),p){if(void 0!==p.useNonce&&(v=p.useNonce),void 0!==p.checkLoginIframe&&(h.enable=p.checkLoginIframe),p.checkLoginIframeInterval&&(h.interval=p.checkLoginIframeInterval),"login-required"===p.onLoad&&(f.loginRequired=!0),p.responseMode)if("query"===p.responseMode||"fragment"===p.responseMode)f.responseMode=p.responseMode;else throw"Invalid value for responseMode";if(p.flow){switch(p.flow){case"standard":f.responseType="code";break;case"implicit":f.responseType="id_token token";break;case"hybrid":f.responseType="code id_token token";break;default:throw"Invalid value for flow"}f.flow=p.flow}if(null!=p.timeSkew&&(f.timeSkew=p.timeSkew),p.redirectUri&&(f.redirectUri=p.redirectUri),p.silentCheckSsoRedirectUri&&(f.silentCheckSsoRedirectUri=p.silentCheckSsoRedirectUri),"boolean"==typeof p.silentCheckSsoFallback?f.silentCheckSsoFallback=p.silentCheckSsoFallback:f.silentCheckSsoFallback=!0,void 0!==p.pkceMethod){if("S256"!==p.pkceMethod&&!1!==p.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${p.pkceMethod}.`);f.pkceMethod=p.pkceMethod}else f.pkceMethod="S256";"boolean"==typeof p.enableLogging?f.enableLogging=p.enableLogging:f.enableLogging=!1,"POST"===p.logoutMethod?f.logoutMethod="POST":f.logoutMethod="GET","string"==typeof p.scope&&(f.scope=p.scope),"string"==typeof p.acrValues&&(f.acrValues=p.acrValues),"number"==typeof p.messageReceiveTimeout&&p.messageReceiveTimeout>0?f.messageReceiveTimeout=p.messageReceiveTimeout:f.messageReceiveTimeout=1e4}f.responseMode||(f.responseMode="fragment"),f.responseType||(f.responseType="code",f.flow="standard");var b=S(),g=S();g.promise.then(function(){f.onReady&&f.onReady(f.authenticated),b.setSuccess(f.authenticated)}).catch(function(d){b.setError(d)});var _=function(){var m=S();function u(d){d?f.endpoints={authorize:function(){return d.authorization_endpoint},token:function(){return d.token_endpoint},logout:function(){if(!d.end_session_endpoint)throw"Not supported by the OIDC server";return d.end_session_endpoint},checkSessionIframe:function(){if(!d.check_session_iframe)throw"Not supported by the OIDC server";return d.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!d.userinfo_endpoint)throw"Not supported by the OIDC server";return d.userinfo_endpoint}}:f.endpoints={authorize:function(){return x()+"/protocol/openid-connect/auth"},token:function(){return x()+"/protocol/openid-connect/token"},logout:function(){return x()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var d=x()+"/protocol/openid-connect/login-status-iframe.html";return f.iframeVersion&&(d=d+"?version="+f.iframeVersion),d},thirdPartyCookiesIframe:function(){var d=x()+"/protocol/openid-connect/3p-cookies/step1.html";return f.iframeVersion&&(d=d+"?version="+f.iframeVersion),d},register:function(){return x()+"/protocol/openid-connect/registrations"},userinfo:function(){return x()+"/protocol/openid-connect/userinfo"}}}if(d?"string"==typeof d&&(b=d):b="keycloak.json",b){var p=new XMLHttpRequest;p.open("GET",b,!0),p.setRequestHeader("Accept","application/json"),p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status||E(p)){var d=JSON.parse(p.responseText);f.authServerUrl=d["auth-server-url"],f.realm=d.realm,f.clientId=d.resource,u(null),m.setSuccess()}else m.setError()},p.send()}else{if(!d.clientId)throw"clientId missing";f.clientId=d.clientId;var h=d.oidcProvider;if(h)if("string"==typeof h){var b,g="/"==h.charAt(h.length-1)?h+".well-known/openid-configuration":h+"/.well-known/openid-configuration",p=new XMLHttpRequest;p.open("GET",g,!0),p.setRequestHeader("Accept","application/json"),p.onreadystatechange=function(){4==p.readyState&&(200==p.status||E(p)?(u(JSON.parse(p.responseText)),m.setSuccess()):m.setError())},p.send()}else u(h),m.setSuccess();else{if(!d.url){for(var v=document.getElementsByTagName("script"),_=0;_<v.length;_++)if(v[_].src.match(/.*keycloak\.js/)){d.url=v[_].src.substr(0,v[_].src.indexOf("/js/keycloak.js"));break}}if(!d.realm)throw"realm missing";f.authServerUrl=d.url,f.realm=d.realm,u(null),m.setSuccess()}}return m.promise}();function y(){var d=function(d){d||(u.prompt="none"),p&&p.locale&&(u.locale=p.locale),f.login(u).then(function(){g.setSuccess()}).catch(function(d){g.setError(d)})},m=function(){var d=document.createElement("iframe"),m=f.createLoginUrl({prompt:"none",redirectUri:f.silentCheckSsoRedirectUri});d.setAttribute("src",m),d.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-silent-check-sso"),d.style.display="none",document.body.appendChild(d);var u=function(m){if(m.origin===window.location.origin&&d.contentWindow===m.source){var f=A(m.data);w(f,g),document.body.removeChild(d),window.removeEventListener("message",u)}};window.addEventListener("message",u)},u={};switch(p.onLoad){case"check-sso":h.enable?I().then(function(){D().then(function(u){u?g.setSuccess():f.silentCheckSsoRedirectUri?m():d(!1)}).catch(function(d){g.setError(d)})}):f.silentCheckSsoRedirectUri?m():d(!1);break;case"login-required":d(!0);break;default:throw"Invalid value for onLoad"}}function F(){var d=A(window.location.href);if(d&&window.history.replaceState(window.history.state,null,d.newUrl),d&&d.valid)return I().then(function(){w(d,g)}).catch(function(d){g.setError(d)});p?p.token&&p.refreshToken?(k(p.token,p.refreshToken,p.idToken),h.enable?I().then(function(){D().then(function(d){d?(f.onAuthSuccess&&f.onAuthSuccess(),g.setSuccess(),O()):g.setSuccess()}).catch(function(d){g.setError(d)})}):f.updateToken(-1).then(function(){f.onAuthSuccess&&f.onAuthSuccess(),g.setSuccess()}).catch(function(d){f.onAuthError&&f.onAuthError(),p.onLoad?y():g.setError(d)})):p.onLoad?y():g.setSuccess():g.setSuccess()}return _.then(function(){var d,m;(d=S(),m=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",m),d.setSuccess())},document.addEventListener("readystatechange",m),m(),d.promise).then(R).then(F).catch(function(d){b.setError(d)})}),_.catch(function(d){b.setError(d)}),b.promise},f.login=function(d){return m.login(d)},f.createLoginUrl=function(d){var p,h=C(),b=C(),g=m.redirectUri(d),_={state:h,nonce:b,redirectUri:encodeURIComponent(g),loginOptions:d};d&&d.prompt&&(_.prompt=d.prompt),p=d&&"register"==d.action?f.endpoints.register():f.endpoints.authorize();var y=d&&d.scope||f.scope;y?-1===y.indexOf("openid")&&(y="openid "+y):y="openid";var x=p+"?client_id="+encodeURIComponent(f.clientId)+"&redirect_uri="+encodeURIComponent(g)+"&state="+encodeURIComponent(h)+"&response_mode="+encodeURIComponent(f.responseMode)+"&response_type="+encodeURIComponent(f.responseType)+"&scope="+encodeURIComponent(y);if(v&&(x=x+"&nonce="+encodeURIComponent(b)),d&&d.prompt&&(x+="&prompt="+encodeURIComponent(d.prompt)),d&&d.maxAge&&(x+="&max_age="+encodeURIComponent(d.maxAge)),d&&d.loginHint&&(x+="&login_hint="+encodeURIComponent(d.loginHint)),d&&d.idpHint&&(x+="&kc_idp_hint="+encodeURIComponent(d.idpHint)),d&&d.action&&"register"!=d.action&&(x+="&kc_action="+encodeURIComponent(d.action)),d&&d.locale&&(x+="&ui_locales="+encodeURIComponent(d.locale)),d&&d.acr&&(x+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:d.acr}}))),(d&&d.acrValues||f.acrValues)&&(x+="&acr_values="+encodeURIComponent(d.acrValues||f.acrValues)),f.pkceMethod){var w=F(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");_.pkceCodeVerifier=w,x+="&code_challenge="+function(d,m){if("S256"!==d)throw TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${d}'.`);return btoa(String.fromCodePoint(...new Uint8Array(id.arrayBuffer(m)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(f.pkceMethod,w)+"&code_challenge_method="+f.pkceMethod}return u.add(_),x},f.logout=function(d){return m.logout(d)},f.createLogoutUrl=function(d){if("POST"===(d?.logoutMethod??f.logoutMethod))return f.endpoints.logout();var u=f.endpoints.logout()+"?client_id="+encodeURIComponent(f.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(m.redirectUri(d,!1));return f.idToken&&(u+="&id_token_hint="+encodeURIComponent(f.idToken)),u},f.register=function(d){return m.register(d)},f.createRegisterUrl=function(d){return d||(d={}),d.action="register",f.createLoginUrl(d)},f.createAccountUrl=function(d){var u=x(),p=void 0;return void 0!==u&&(p=u+"/account?referrer="+encodeURIComponent(f.clientId)+"&referrer_uri="+encodeURIComponent(m.redirectUri(d))),p},f.accountManagement=function(){return m.accountManagement()},f.hasRealmRole=function(d){var m=f.realmAccess;return!!m&&m.roles.indexOf(d)>=0},f.hasResourceRole=function(d,m){if(!f.resourceAccess)return!1;var u=f.resourceAccess[m||f.clientId];return!!u&&u.roles.indexOf(d)>=0},f.loadUserProfile=function(){var d=x()+"/account",m=new XMLHttpRequest;m.open("GET",d,!0),m.setRequestHeader("Accept","application/json"),m.setRequestHeader("Authorization","bearer "+f.token);var u=S();return m.onreadystatechange=function(){4==m.readyState&&(200==m.status?(f.profile=JSON.parse(m.responseText),u.setSuccess(f.profile)):u.setError())},m.send(),u.promise},f.loadUserInfo=function(){var d=f.endpoints.userinfo(),m=new XMLHttpRequest;m.open("GET",d,!0),m.setRequestHeader("Accept","application/json"),m.setRequestHeader("Authorization","bearer "+f.token);var u=S();return m.onreadystatechange=function(){4==m.readyState&&(200==m.status?(f.userInfo=JSON.parse(m.responseText),u.setSuccess(f.userInfo)):u.setError())},m.send(),u.promise},f.isTokenExpired=function(d){if(!f.tokenParsed||!f.refreshToken&&"implicit"!=f.flow)throw"Not authenticated";if(null==f.timeSkew)return _("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var m=f.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+f.timeSkew;if(d){if(isNaN(d))throw"Invalid minValidity";m-=d}return m<0},f.updateToken=function(d){var m=S();if(!f.refreshToken)return m.setError(),m.promise;d=d||5;var u=function(){var u=!1;if(-1==d?(u=!0,_("[KEYCLOAK] Refreshing token: forced refresh")):(!f.tokenParsed||f.isTokenExpired(d))&&(u=!0,_("[KEYCLOAK] Refreshing token: token expired")),u){var h="grant_type=refresh_token&refresh_token="+f.refreshToken,b=f.endpoints.token();if(p.push(m),1==p.length){var g=new XMLHttpRequest;g.open("POST",b,!0),g.setRequestHeader("Content-type","application/x-www-form-urlencoded"),g.withCredentials=!0,h+="&client_id="+encodeURIComponent(f.clientId);var v=new Date().getTime();g.onreadystatechange=function(){if(4==g.readyState)if(200==g.status){_("[KEYCLOAK] Token refreshed"),v=(v+new Date().getTime())/2;var d=JSON.parse(g.responseText);k(d.access_token,d.refresh_token,d.id_token,v),f.onAuthRefreshSuccess&&f.onAuthRefreshSuccess();for(var m=p.pop();null!=m;m=p.pop())m.setSuccess(!0)}else{y("[KEYCLOAK] Failed to refresh token"),400==g.status&&f.clearToken(),f.onAuthRefreshError&&f.onAuthRefreshError();for(var m=p.pop();null!=m;m=p.pop())m.setError(!0)}},g.send(h)}}else m.setSuccess(!1)};return h.enable?D().then(function(){u()}).catch(function(d){m.setError(d)}):u(),m.promise},f.clearToken=function(){f.token&&(k(null,null,null),f.onAuthLogout&&f.onAuthLogout(),f.loginRequired&&f.login())};var L=function(){if(!(this instanceof L))return new L;function d(){for(var d=new Date().getTime(),m=0;m<localStorage.length;m++){var u=localStorage.key(m);if(u&&0==u.indexOf("kc-callback-")){var f=localStorage.getItem(u);if(f)try{var p=JSON.parse(f).expires;(!p||p<d)&&localStorage.removeItem(u)}catch(d){localStorage.removeItem(u)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(m){if(m){var u="kc-callback-"+m,f=localStorage.getItem(u);return f&&(localStorage.removeItem(u),f=JSON.parse(f)),d(),f}},this.add=function(m){d();var u="kc-callback-"+m.state;m.expires=new Date().getTime()+36e5,localStorage.setItem(u,JSON.stringify(m))}},B=function(){if(!(this instanceof B))return new B;this.get=function(f){if(f){var p=m("kc-callback-"+f);if(u("kc-callback-"+f,"",d(-100)),p)return JSON.parse(p)}},this.add=function(m){u("kc-callback-"+m.state,JSON.stringify(m),d(60))},this.removeItem=function(m){u(m,"",d(-100))};var d=function(d){var m=new Date;return m.setTime(m.getTime()+60*d*1e3),m},m=function(d){for(var m=d+"=",u=document.cookie.split(";"),f=0;f<u.length;f++){for(var p=u[f];" "==p.charAt(0);)p=p.substring(1);if(0==p.indexOf(m))return p.substring(m.length,p.length)}return""},u=function(d,m,u){var f=d+"="+m+"; expires="+u.toUTCString()+"; ";document.cookie=f}};function P(d){return function(){f.enableLogging&&d.apply(console,Array.prototype.slice.call(arguments))}}}var ih=function(d,m,u,f){return new(u||(u=Promise))(function(p,h){function b(d){try{v(f.next(d))}catch(d){h(d)}}function g(d){try{v(f.throw(d))}catch(d){h(d)}}function v(d){var m;d.done?p(d.value):((m=d.value)instanceof u?m:new u(function(d){d(m)})).then(b,g)}v((f=f.apply(d,m||[])).next())})};let ib=d=>m=>class extends m{constructor(){super(...arguments),this._connectRequested=!1,this._status=k.DISCONNECTED,this._statusCallback=d=>this._onEventProviderStatusChanged(d)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){d.getEventProvider()?this._connectRequested||(this._connectRequested=!0,d.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect()):console.log("No event provider available so cannot subscribe")}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,d.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return ih(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&d.getEventProvider().status===k.CONNECTED}_onEventProviderStatusChanged(d){switch(d){case k.DISCONNECTED:this._onEventsDisconnect();break;case k.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return ih(this,void 0,void 0,function*(){let m=!!this._attributeRefs,u=!!this._assetIds,f=this._attributeRefs?this._attributeRefs:this._assetIds;if(f&&f.length>0){if(this._subscriptionIds=[],u){let m=yield d.getEventProvider().subscribeAssetEvents(f,!0,d=>this._onEvent(d)),u=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!L(f,u))return void d.getEventProvider().unsubscribe(m);this._subscriptionIds.push(m)}let p=yield d.getEventProvider().subscribeAttributeEvents(f,m,d=>this._onEvent(d)),h=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!L(f,h))return void d.getEventProvider().unsubscribe(p);this._subscriptionIds.push(p)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(m=>{d.getEventProvider().unsubscribe(m)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(d){L(this._assetIds,d)||(this._assetIds=d,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(d){L(this._attributeRefs,d)||(this._attributeRefs=d,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(m){d.getEventProvider().sendEvent(m)}_sendEventWithReply(m){return d.getEventProvider().sendEventWithReply(m)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(d){}},ig="#4d9d2a",iv="#FFFFFF",i_="#F9F9F9",iy="#CCCCCC",iF="#FFFFFF",ix="#4c4c4c";var iw=function(d,m,u,f){return new(u||(u=Promise))(function(p,h){function b(d){try{v(f.next(d))}catch(d){h(d)}}function g(d){try{v(f.throw(d))}catch(d){h(d)}}function v(d){var m;d.done?p(d.value):((m=d.value)instanceof u?m:new u(function(d){d(m)})).then(b,g)}v((f=f.apply(d,m||[])).next())})};let iE="openremote";(w=C||(C={})).MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",w.AUTH_FAILED="AUTH_FAILED",w.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",w.CONSOLE_ERROR="CONSOLE_INIT_ERROR",w.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",w.TRANSLATION_ERROR="TRANSLATION_ERROR",(E=A||(A={})).ERROR="ERROR",E.READY="READY",E.ONLINE="ONLINE",E.OFFLINE="OFFLINE",E.CONNECTING="CONNECTING",E.CONSOLE_INIT="CONSOLE_INIT",E.CONSOLE_READY="CONSOLE_READY",E.TRANSLATE_INIT="TRANSLATE_INIT",E.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",E.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED",E.LOGIN="LOGIN";let ik={cn:"zh-cn"};class iC{constructor(){this._authenticated=!1,this._ready=!1,this._name="",this._username="",this._keycloakUpdateTokenInterval=void 0,this._managerVersion="",this._authServerUrl="",this._listeners=[],this._disconnected=!1}get username(){return this._username}get error(){return this._error}get authenticated(){return this._authenticated}get ready(){return this._ready}get config(){return this._config}get roles(){let d=new Map;return this._keycloak&&this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach(([m,u])=>{let f=u.roles;d.set(m,f)}),d}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){var d;return null==(d=this._config)?void 0:d.managerUrl}get keycloakUrl(){var d;return null==(d=this._config)?void 0:d.keycloakUrl}get isError(){return!!this._error}get connectionStatus(){return this._events&&this._events.status}get console(){return this._console}get consoleAppConfig(){return this._consoleAppConfig}get events(){return this._events}get rest(){return nW}get language(){return O.Ay.language}set language(d){console.debug(`Changing language to ${d}.`),d&&(O.Ay.changeLanguage(d),this.console.storeData("LANGUAGE",d),this.authenticated&&this.updateKeycloakUserLanguage(d).catch(d=>console.error(d)))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(d){this.isSuperUser()&&this._displayRealm!==d&&(this._displayRealm=d,this._emitEvent(A.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||iE}getEventProvider(){return this.events}isManagerSameOrigin(){if(!this.ready)return!1;let d=new URL(this._config.managerUrl),m=window.location;return d.protocol===m.protocol&&d.hostname===m.hostname&&d.port===m.port}addListener(d){0>this._listeners.indexOf(d)&&this._listeners.push(d)}removeListener(d){let m=this._listeners.indexOf(d);m>=0&&this._listeners.splice(m,1)}init(d){return iw(this,void 0,void 0,function*(){let m;this._config&&console.debug("Already initialised"),this._config=((m=d?Object.assign({},d):{}).managerUrl&&""!==m.managerUrl?m.managerUrl=m.managerUrl.replace(/\/+$/,""):m.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),m.realm&&""!==m.realm||(m.realm="master"),m.auth||(m.auth="KEYCLOAK"),void 0===m.consoleAutoEnable&&(m.consoleAutoEnable=!0),void 0===m.applyConfigToAdmin&&(m.applyConfigToAdmin=!0),m.eventProviderType||(m.eventProviderType="WEBSOCKET"),(!m.pollingIntervalMillis||m.pollingIntervalMillis<5e3)&&(m.pollingIntervalMillis=1e4),void 0===m.loadIcons&&(m.loadIcons=!0),void 0===m.loadTranslations&&(m.loadTranslations=["or"]),void 0===m.translationsLoadPath&&(m.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===m.loadDescriptors&&(m.loadDescriptors=!0),void 0===m.clientId&&(m.clientId=iE),m);let u=yield this.loadManagerInfo(),f=new ee(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(A.CONSOLE_READY)});if(this._console=f,"KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){let d,m=new URL(this._config.managerUrl);this._authServerUrl.startsWith("//")?(this._authServerUrl=m.protocol+this._authServerUrl,this._config.keycloakUrl=this._authServerUrl):this._authServerUrl.startsWith("http")?this._config.keycloakUrl=this._authServerUrl:((d=new URL(m)).pathname=this._authServerUrl,d.protocol||(d.protocol=m.protocol),d.hostname||(d.hostname=m.hostname),d.port||(d.port=m.port),this._config.keycloakUrl=d.toString())}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),u=yield this.doAuthInit()}return!!u&&(u&&(u=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),(u=(yield this.doTranslateInit())&&u)&&(u=yield this.doDescriptorsInit(),u=yield this.getConsoleAppConfig()),this.doIconInit(),u?(u=yield this.doEventsSubscriptionInit(),this._ready=!0,this._emitEvent(A.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=d.realm||"master",u)})}loadManagerInfo(){return iw(this,void 0,void 0,function*(){try{let d=yield new Promise((d,m)=>{let u=new XMLHttpRequest;u.addEventListener("load",()=>{d(JSON.parse(u.responseText))}),u.addEventListener("error",()=>{m(Error("Failed to contact the manager"))}),u.open("GET",this._config.managerUrl+"/api/master/info"),u.send()});return this._managerVersion=d&&d.version?d.version:"",this._authServerUrl=d&&d.authServerUrl?d.authServerUrl:"",!0}catch(d){return console.error("Failed to contact the manager",d),this._setError(C.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return iw(this,void 0,void 0,function*(){if(O.Ay.isInitialized)return!0;O.Ay.on("initialized",d=>{this._emitEvent(A.TRANSLATE_INIT)}),O.Ay.on("languageChanged",d=>{var m;R().locale(null!=(m=ik[d])?m:d),this._emitEvent(A.TRANSLATE_LANGUAGE_CHANGED)});let d={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(d,m,u)=>"uppercase"===m?d.toUpperCase():d instanceof Date?R()(d).format(m):d},backend:{loadPath:(d,m)=>1===m.length&&"or"===m[0]?this.config.managerUrl+"/shared/locales/{{lng}}/{{ns}}.json":this.config.translationsLoadPath?this.config.translationsLoadPath:"locales/{{lng}}/{{ns}}.json"}};this.config.configureTranslationsOptions&&this.config.configureTranslationsOptions(d);try{yield O.Ay.use(ic).init(d)}catch(d){return console.error(d),this._setError(C.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return iw(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let d=yield nW.api.AssetModelResource.getAssetInfos(),m=yield nW.api.AssetModelResource.getMetaItemDescriptors(),u=yield nW.api.AssetModelResource.getValueDescriptors();I.u0._assetTypeInfos=d.data,I.u0._metaItemDescriptors=Object.values(m.data),I.u0._valueDescriptors=Object.values(u.data)}catch(d){return console.error(d),!1}return!0})}doAuthInit(){return iw(this,void 0,void 0,function*(){let d=!0;switch(this._config.auth){case"KEYCLOAK":d=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(C.AUTH_TYPE_UNSUPPORTED),!1}return!!d&&(nW.addRequestInterceptor(d=>{if(!d.headers.Authorization){let m=this.getAuthorizationHeader();m&&(d.headers.Authorization=m)}return d}),d)})}doRestApiInit(){return nW.setTimeout(2e4),nW.initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return iw(this,void 0,void 0,function*(){let d=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new n1(this._config.managerUrl),this._events.subscribeStatusChange(d=>this._onEventProviderStatusChanged(d)),d=yield this._events.connect()),d||this._setError(C.EVENTS_CONNECTION_ERROR),d})}_connectEvents(){var d;(null==(d=this.events)?void 0:d.status)===k.DISCONNECTED?this.events.connect().catch(d=>{console.error("Failed to connect EventProvider."),console.error(d)}):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(d){switch(d){case k.DISCONNECTED:this._onDisconnect();break;case k.CONNECTED:break;case k.CONNECTING:this._emitEvent(A.CONNECTING)}}doConsoleInit(){return iw(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(A.CONSOLE_INIT),!0}catch(d){return this._setError(C.CONSOLE_ERROR),!1}})}doIconInit(){this._config.loadIcons&&(il.Ri.addIconSet("mdi",(0,il.mb)(iA.managerUrl)),il.Ri.addIconSet("or",(0,il.e4)(il.Bv.size,il.Bv.icons)))}getConsoleAppConfig(){return iw(this,void 0,void 0,function*(){var d;try{let m=yield fetch((null!=(d=iA.managerUrl)?d:"")+"/consoleappconfig/"+iA.displayRealm+".json");return this._consoleAppConfig=yield m.json(),!0}catch(d){return!0}})}getConsolePreferredLanguage(){return iw(this,arguments,void 0,function*(d=this.console){return d.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return iw(this,arguments,void 0,function*(d=this._keycloak){if(d&&d.authenticated){let m=(null==d?void 0:d.profile)||(yield null==d?void 0:d.loadUserProfile());if(null==m?void 0:m.attributes){let d=new Map(Object.entries(m.attributes));if(d.has("locale")){let m=d.get("locale");if("string"==typeof m[0])return m[0]}console.warn("Could not get user language from keycloak: no user attributes were found.")}else console.warn("Could not get user language from keycloak: no valid keycloak user profile was found.")}})}updateKeycloakUserLanguage(d){return iw(this,arguments,void 0,function*(d,m=this.rest){this.authenticated?m?yield m.api.UserResource.updateCurrentUserLocale(d,{headers:{"Content-Type":"application/json"}}):console.warn("Tried updating user language, but the REST API is not initialized yet."):console.warn("Tried updating user language, but the user is not authenticated.")})}logout(d){this._authenticated&&(this._authenticated=!0,this._keycloak&&(this.isMobile()&&this.console.storeData("REFRESH_TOKEN",null),this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._keycloak.logout(d&&""!==d?{redirectUri:d}:void 0)))}login(d){if("KEYCLOAK"===this._config.auth&&this._keycloak){let m={};d&&d.redirectUrl&&""!==d.redirectUrl&&(m.redirectUri=d.redirectUrl),(null==d?void 0:d.action)&&""!==d.action&&(m.action=d.action),this.isMobile()&&(m.scope="offline_access"),this._keycloak.login(m)}}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole("restricted_user")}getApiBaseUrl(){return this._config.managerUrl+"/api/"+this._config.realm+"/"}getAppName(){let d=location.pathname.split("/");return d.length>=1?d[1]:""}hasRealmRole(d){return this.isKeycloak()&&this._keycloak.hasRealmRole(d)}hasRole(d,m=this._config.clientId){let u=this.roles;return u&&u.has(m)&&u.get(m).indexOf(d)>=0}getAuthorizationHeader(){if(this.getKeycloakToken())return"Bearer "+this.getKeycloakToken()}retrieveAuthorizationHeader(){return iw(this,void 0,void 0,function*(){let d=yield this.retrieveKeycloakToken();if(d)return"Bearer "+d})}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}retrieveKeycloakToken(){return iw(this,void 0,void 0,function*(){if(this.isKeycloak())return yield this._updateKeycloakAccessToken(),this._keycloak.token})}getRealm(){if(this._config)return this._config.realm}isMobile(){return this.console&&this.console.isMobile}isKeycloak(){return!!this._keycloak}_onAuthenticated(){this._authenticated=!0}loadAndInitialiseKeycloak(){return iw(this,void 0,void 0,function*(){var d,m,u,f,p;try{this._keycloak=new ip({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let h=yield this._getNativeOfflineRefreshToken(),b=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!b&&h)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=h,b=yield this._updateKeycloakAccessToken()}catch(d){console.error("Failed to authenticate using offline token")}if(b){this._name=null==(d=this._keycloak.tokenParsed)?void 0:d.name,this._username=null==(m=this._keycloak.tokenParsed)?void 0:m.preferred_username,this.isMobile()&&(null==(f=null==(u=this._keycloak)?void 0:u.refreshTokenParsed)?void 0:f.typ)==="Offline"&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated(),this._createTokenUpdateInterval();let h=null==(p=this._keycloak.tokenParsed)?void 0:p.session_state;h&&sessionStorage.getItem("or-session")!==h&&(sessionStorage.setItem("or-session",h),this._emitEvent(A.LOGIN))}else if(this.config.autoLogin)return this.login(),!1;return!0}catch(d){return this._authenticated=!1,this._setError(C.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+d),!1}})}_createTokenUpdateInterval(){this._authenticated?this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>iw(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4)):console.warn("User is not authenticated; skipping token update interval creation.")}_updateKeycloakAccessToken(){return iw(this,void 0,void 0,function*(){let d=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+d),d&&this._onAuthenticated(),d})}_getNativeOfflineRefreshToken(){return iw(this,void 0,void 0,function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")})}_emitEvent(d){window.setTimeout(()=>{for(let m of this._listeners)m(d)},0)}_setError(d){this._error=d,this._emitEvent(A.ERROR),console.warn("Error set: "+d)}_clearWebHistory(){var d;this.isMobile()&&(null==(d=this.console)||d._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0))}_onDisconnect(){return iw(this,void 0,void 0,function*(){this._disconnected||(console.debug("Disconnected"),this._disconnected=!0,this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._emitEvent(A.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected to the Manager."),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(A.ONLINE)}reconnect(){return iw(this,arguments,void 0,function*(d=3e3){if(console.debug("Checking connection to the Manager..."),!this._disconnected)return void console.debug("Manager is still connected. No action necessary.");console.debug("Manager is disconnected!"),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let m=()=>iw(this,void 0,void 0,function*(){var d,m;if(console.debug("Reconnecting to the Manager..."),!this._authenticated){console.debug("User is not authenticated, skipping token refresh");let m=()=>{var d;return(null==(d=this.events)?void 0:d.status)===k.CONNECTED};return m()||(yield null==(d=this.events)?void 0:d.connect()),m()}if(!(yield this.isKeycloakReachable()))return console.error("Keycloak is not reachable. Reconnect attempt failed."),!1;try{yield this._updateKeycloakAccessToken()}catch(m){console.error("Could not update Keycloak access token, attempting again using offline token...",m);let d=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=d,d||console.warn("No offline token was found on this device.");try{yield this._updateKeycloakAccessToken()}catch(d){throw this.login(),Error("Cannot update access token so sending to login")}console.debug("Keycloak access token is valid")}let u=()=>{var d;return(null==(d=this.events)?void 0:d.status)===k.CONNECTED};return u()||(console.debug("Event provider offline, attempting to reconnect using latest auth token."),yield null==(m=this.events)?void 0:m.connect()),u()}),u=yield m();if(void 0!==u){if(!u){d=Math.min(iC.MAX_RECONNECT_DELAY,d+3e3),console.error(`Failed to reconnect to the Manager. Attempting again in ${d}...`),this._reconnectTimer=window.setTimeout(()=>this.reconnect(d),d);return}this._onReconnected()}})}isKeycloakReachable(){return iw(this,arguments,void 0,function*(d=2e3){let m=new AbortController,u=setTimeout(()=>m.abort(),d);try{let d=this._keycloak.endpoints.token(),u=yield fetch(d,{method:"OPTIONS",signal:m.signal});return 200===u.status}catch(d){return!1}finally{clearTimeout(u)}})}}iC.MAX_RECONNECT_DELAY=45e3;let iA=new iC,iT=iA},2764(d,m,u){"use strict";var f,p,h,b,g,v,_,y,F,x,w,E,k,C,A,T,S,I,O,D,R,N,L,B,P,M,z,U,j,V,H,$,q,G,Y,W,X,K,J,Z,Q,ee,et,en,ei,eo,er,ea,es,ec,el,ed,em,eu,ef,ep,eh,eb,eg,ev,e_,ey,eF,ex,ew,eE,ek,eC,eA,eT,eS,eI,eO,eD,eR,eN,eL,eB,eP,eM,ez,eU,ej,eV,eH,e$,eq,eG,eY,eW,eX,eK,eJ,eZ,eQ,e0,e1,e2,e5,e4,e3,e6,e8,e7,e9,te,tt,tn,ti,to,tr,ta,ts,tc,tl,td,tm,tu,tf,tp,th,tb,tg,tv,t_;u.d(m,{u0:()=>ty}),(ex=f||(f={})).CREATE="CREATE",ex.UPDATE="UPDATE",ex.DELETE="DELETE",(ew=p||(p={})).LOW="LOW",ew.MEDIUM="MEDIUM",ew.HIGH="HIGH",(eE=h||(h={})).MANUAL="MANUAL",eE.CLIENT="CLIENT",eE.GLOBAL_RULESET="GLOBAL_RULESET",eE.REALM_RULESET="REALM_RULESET",eE.ASSET_RULESET="ASSET_RULESET",eE.AGENT="AGENT",(ek=b||(b={})).OPEN="OPEN",ek.ACKNOWLEDGED="ACKNOWLEDGED",ek.IN_PROGRESS="IN_PROGRESS",ek.RESOLVED="RESOLVED",ek.CLOSED="CLOSED",(eC=g||(g={})).BOTTOM_LEFT="BOTTOM_LEFT",eC.BOTTOM_RIGHT="BOTTOM_RIGHT",eC.TOP_LEFT="TOP_LEFT",eC.TOP_RIGHT="TOP_RIGHT",(eA=v||(v={})).CREATE="CREATE",eA.READ="READ",eA.UPDATE="UPDATE",eA.DELETE="DELETE",(eT=_||(_={})).NONE="NONE",eT.FORECAST="FORECAST",eT.SETPOINT="SETPOINT",(eS=y||(y={})).DISCONNECTED="DISCONNECTED",eS.CONNECTING="CONNECTING",eS.DISCONNECTING="DISCONNECTING",eS.CONNECTED="CONNECTED",eS.DISABLED="DISABLED",eS.WAITING="WAITING",eS.ERROR="ERROR",eS.STOPPED="STOPPED",(eI=F||(F={})).REQUEST_START="REQUEST_START",eI.REQUEST_REPEATING="REQUEST_REPEATING",eI.REQUEST_CANCEL="REQUEST_CANCEL",eI.READY="READY",eI.COMPLETED="COMPLETED",eI.RUNNING="RUNNING",eI.CANCELLED="CANCELLED",(eO=x||(x={})).TOGGLE="TOGGLE",eO.INCREMENT="INCREMENT",eO.DECREMENT="DECREMENT",eO.NEGATE="NEGATE",(eD=w||(w={})).ASSET_NOT_FOUND="ASSET_NOT_FOUND",eD.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",eD.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",eD.INVALID_VALUE="INVALID_VALUE",eD.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",eD.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",eD.CANNOT_PROCESS="CANNOT_PROCESS",eD.QUEUE_FULL="QUEUE_FULL",eD.UNKNOWN="UNKNOWN",eD.ASSET_ID_MISSING="ASSET_ID_MISSING",eD.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING",(eR=E||(E={})).PUBLIC="PUBLIC",eR.SHARED="SHARED",eR.PRIVATE="PRIVATE",(eN=k||(k={})).OFF="OFF",eN.ONE_MIN="ONE_MIN",eN.FIVE_MIN="FIVE_MIN",eN.QUARTER="QUARTER",eN.ONE_HOUR="ONE_HOUR",(eL=C||(C={})).WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",eL.KEEP_LAYOUT="KEEP_LAYOUT",eL.REDIRECT="REDIRECT",eL.BLOCK_DEVICE="BLOCK_DEVICE",(eB=A||(A={})).CSV="CSV",eB.CSV_CROSSTAB="CSV_CROSSTAB",eB.CSV_CROSSTAB_MINUTE="CSV_CROSSTAB_MINUTE",(eP=T||(T={})).MINUTE="MINUTE",eP.HOUR="HOUR",eP.DAY="DAY",eP.WEEK="WEEK",eP.MONTH="MONTH",eP.YEAR="YEAR",(eM=S||(S={})).MIN="MIN",eM.AVG="AVG",eM.MAX="MAX",eM.DIFFERENCE="DIFFERENCE",eM.COUNT="COUNT",eM.SUM="SUM",eM.MODE="MODE",eM.MEDIAN="MEDIAN",(ez=I||(I={})).TERMINATING="TERMINATING",ez.DISABLED="DISABLED",ez.ALREADY_CONNECTED="ALREADY_CONNECTED",ez.UNRECOGNISED="UNRECOGNISED",ez.PERMANENT_ERROR="PERMANENT_ERROR",ez.SYNC_ERROR="SYNC_ERROR",(eU=O||(O={})).HTTPS="HTTPS",eU.HTTP="HTTP",eU.TCP="TCP",(ej=D||(D={})).GET="GET",ej.POST="POST",ej.PUT="PUT",ej.DELETE="DELETE",ej.OPTIONS="OPTIONS",ej.PATCH="PATCH",(eV=R||(R={})).KEYCLOAK="KEYCLOAK",eV.NONE="NONE",(eH=N||(N={})).WEBSOCKET="WEBSOCKET",eH.POLLING="POLLING",(e$=L||(L={})).INTERNAL="INTERNAL",e$.CLIENT="CLIENT",e$.GLOBAL_RULESET="GLOBAL_RULESET",e$.REALM_RULESET="REALM_RULESET",e$.ASSET_RULESET="ASSET_RULESET",(eq=B||(B={})).REALM="REALM",eq.USER="USER",eq.ASSET="ASSET",eq.CUSTOM="CUSTOM",(eG=P||(P={})).NORMAL="NORMAL",eG.HIGH="HIGH",(eY=M||(M={})).DEVICE="DEVICE",eY.TOPIC="TOPIC",eY.CONDITION="CONDITION",(eW=z||(z={})).ALWAYS="ALWAYS",eW.ONCE="ONCE",eW.HOURLY="HOURLY",eW.DAILY="DAILY",eW.WEEKLY="WEEKLY",eW.MONTHLY="MONTHLY",eW.ANNUALLY="ANNUALLY",(eX=U||(U={})).TITLE="TITLE",eX.SOURCE="SOURCE",eX.STATUS="STATUS",eX.SENT_ON="SENT_ON",eX.DELIVERED_ON="DELIVERED_ON",(eK=j||(j={})).MESSAGE_INVALID="MESSAGE_INVALID",eK.CERTIFICATE_INVALID="CERTIFICATE_INVALID",eK.UNAUTHORIZED="UNAUTHORIZED",eK.FORBIDDEN="FORBIDDEN",eK.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",eK.CONFIG_DISABLED="CONFIG_DISABLED",eK.USER_DISABLED="USER_DISABLED",eK.SERVER_ERROR="SERVER_ERROR",eK.ASSET_ERROR="ASSET_ERROR",eK.SERVER_BUSY="SERVER_BUSY",(eJ=V||(V={})).PRIVATE="PRIVATE",eJ.PROTECTED="PROTECTED",eJ.PUBLIC="PUBLIC",(eZ=H||(H={})).EXACT="EXACT",eZ.BEGIN="BEGIN",eZ.END="END",eZ.CONTAINS="CONTAINS",(eQ=$||($={})).EQUALS="EQUALS",eQ.GREATER_THAN="GREATER_THAN",eQ.GREATER_EQUALS="GREATER_EQUALS",eQ.LESS_THAN="LESS_THAN",eQ.LESS_EQUALS="LESS_EQUALS",eQ.BETWEEN="BETWEEN",(e0=q||(q={})).CREATED_ON="CREATED_ON",e0.NAME="NAME",e0.ASSET_TYPE="ASSET_TYPE",e0.PARENT_ID="PARENT_ID",e0.REALM="REALM",(e1=G||(G={})).RESTRICTED="RESTRICTED",e1.LINKED="LINKED",e1.REALM="REALM",(e2=Y||(Y={})).AT_LEAST_ONE="AT_LEAST_ONE",e2.ALL="ALL",e2.NONE="NONE",(e5=W||(W={})).AND="AND",e5.OR="OR",(e4=X||(X={})).CREATED_ON="CREATED_ON",e4.FIRST_NAME="FIRST_NAME",e4.LAST_NAME="LAST_NAME",e4.USERNAME="USERNAME",e4.EMAIL="EMAIL",(e3=K||(K={})).STOPPED="STOPPED",e3.RUNNING="RUNNING",e3.ERROR="ERROR",(e6=J||(J={})).JAVASCRIPT="JAVASCRIPT",e6.GROOVY="GROOVY",e6.JSON="JSON",e6.FLOW="FLOW",(e8=Z||(Z={})).READY="READY",e8.DEPLOYED="DEPLOYED",e8.COMPILATION_ERROR="COMPILATION_ERROR",e8.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",e8.EXECUTION_ERROR="EXECUTION_ERROR",e8.LOOP_ERROR="LOOP_ERROR",e8.DISABLED="DISABLED",e8.PAUSED="PAUSED",e8.EXPIRED="EXPIRED",e8.REMOVED="REMOVED",e8.EMPTY="EMPTY",(e7=Q||(Q={})).SUNRISE="SUNRISE",e7.SUNSET="SUNSET",e7.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",e7.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",e7.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",e7.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",e7.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",e7.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",e7.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",e7.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",e7.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",e7.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",e7.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",e7.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",e7.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",e7.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",e7.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",e7.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",e7.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",e7.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR",(e9=ee||(ee={})).NUMBER="NUMBER",e9.NUMBER_ARRAY="NUMBER_ARRAY",e9.STRING="STRING",e9.BOOLEAN="BOOLEAN",e9.TRIGGER="TRIGGER",e9.COLOR="COLOR",e9.ANY="ANY",(te=et||(et={})).NEW_LINE="NEW_LINE",te.SPACER="SPACER",(tt=en||(en={})).INPUT="INPUT",tt.PROCESSOR="PROCESSOR",tt.OUTPUT="OUTPUT",tt.THEN="THEN",(tn=ei||(ei={})).TEXT="TEXT",tn.MULTILINE="MULTILINE",tn.NUMBER="NUMBER",tn.DROPDOWN="DROPDOWN",tn.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",tn.CHECKBOX="CHECKBOX",tn.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",tn.COLOR="COLOR",tn.DATE="DATE",(ti=eo||(eo={})).ADD="ADD",ti.ADD_OR_REPLACE="ADD_OR_REPLACE",ti.REPLACE="REPLACE",ti.DELETE="DELETE",ti.CLEAR="CLEAR",(to=er||(er={})).PER_ASSET="PER_ASSET",to.GLOBAL="GLOBAL",(tr=ea||(ea={})).READ_ADMIN="read:admin",tr.READ_LOGS="read:logs",tr.READ_USERS="read:users",tr.READ_MAP="read:map",tr.READ_ASSETS="read:assets",tr.READ_RULES="read:rules",tr.READ_INSIGHTS="read:insights",tr.READ_ALARMS="read:alarms",tr.READ_NOTIFICATIONS="read:notifications",tr.READ_SERVICES="read:services",tr.READ_TUNNELS="read:tunnels",tr.WRITE_SERVICES="write:services",tr.WRITE_USER="write:user",tr.WRITE_ADMIN="write:admin",tr.WRITE_LOGS="write:logs",tr.WRITE_ASSETS="write:assets",tr.WRITE_ATTRIBUTES="write:attributes",tr.WRITE_RULES="write:rules",tr.WRITE_INSIGHTS="write:insights",tr.WRITE_ALARMS="write:alarms",tr.WRITE_NOTIFICATIONS="write:notifications",tr.WRITE_TUNNELS="write:tunnels",tr.READ="read",tr.WRITE="write",(ta=es||(es={})).REGISTER="REGISTER",ta.UPDATE="UPDATE",ta.DEREGISTER="DEREGISTER",(ts=ec||(ec={})).AVAILABLE="AVAILABLE",ts.UNAVAILABLE="UNAVAILABLE",(tc=el||(el={})).ASSET="ASSET",tc.AGENT="AGENT",tc.NOTIFICATION="NOTIFICATION",tc.ALARM="ALARM",tc.RULES="RULES",tc.PROTOCOL="PROTOCOL",tc.GATEWAY="GATEWAY",tc.MODEL_AND_VALUES="MODEL_AND_VALUES",tc.API="API",tc.DATA="DATA",(tl=ed||(ed={})).INFO="INFO",tl.WARN="WARN",tl.ERROR="ERROR",(td=em||(em={})).NUMERIC="numeric",td.DIGIT_2="2-digit",td.FULL="full",td.LONG="long",td.MEDIUM="medium",td.SHORT="short",td.NARROW="narrow",(tm=eu||(eu={})).SECONDLY="SECONDLY",tm.MINUTELY="MINUTELY",tm.HOURLY="HOURLY",tm.DAILY="DAILY",tm.WEEKLY="WEEKLY",tm.MONTHLY="MONTHLY",tm.YEARLY="YEARLY",(tu=ef||(ef={})).OMIT="OMIT",tu.BACKWARD="BACKWARD",tu.FORWARD="FORWARD",(tf=ep||(ep={})).JAPANESE="JAPANESE",tf.BUDDHIST="BUDDHIST",tf.ROC="ROC",tf.ISLAMIC="ISLAMIC",tf.ISO8601="ISO8601",tf.CHINESE="CHINESE",tf.ETHIOPIC="ETHIOPIC",tf.HEBREW="HEBREW",tf.GREGORIAN="GREGORIAN",(tp=eh||(eh={})).SU="SU",tp.MO="MO",tp.TU="TU",tp.WE="WE",tp.TH="TH",tp.FR="FR",tp.SA="SA",(th=eb||(eb={})).PEOPLECOUNTERASSET="PeopleCounterAsset",th.MAILAGENT="MailAgent",th.UDPAGENT="UDPAgent",th.ROOMASSET="RoomAsset",th.CITYASSET="CityAsset",th.VENTILATIONASSET="VentilationAsset",th.TRADFRILIGHTASSET="TradfriLightAsset",th.CONSOLEASSET="ConsoleAsset",th.PRESENCESENSORASSET="PresenceSensorAsset",th.OPENWEATHERMAPAGENT="OpenWeatherMapAgent",th.LIGHTASSET="LightAsset",th.KNXAGENT="KNXAgent",th.THETHINGSSTACKAGENT="TheThingsStackAgent",th.PLUGASSET="PlugAsset",th.CHIRPSTACKAGENT="ChirpStackAgent",th.WEATHERASSET="WeatherAsset",th.THINGASSET="ThingAsset",th.WEBSOCKETAGENT="WebsocketAgent",th.TCPAGENT="TCPAgent",th.GATEWAYASSET="GatewayAsset",th.SERIALAGENT="SerialAgent",th.BLUETOOTHMESHAGENT="BluetoothMeshAgent",th.PARKINGASSET="ParkingAsset",th.TRADFRIPLUGASSET="TradfriPlugAsset",th.SIMULATORAGENT="SimulatorAgent",th.SNMPAGENT="SNMPAgent",th.GROUPASSET="GroupAsset",th.BUILDINGASSET="BuildingAsset",th.MODBUSSERIALAGENT="ModbusSerialAgent",th.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",th.MQTTAGENT="MQTTAgent",th.VELBUSTCPAGENT="VelbusTCPAgent",th.ARTNETLIGHTASSET="ArtnetLightAsset",th.VELBUSSERIALAGENT="VelbusSerialAgent",th.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",th.MICROPHONEASSET="MicrophoneAsset",th.MODBUSTCPAGENT="ModbusTcpAgent",th.ZWAVEAGENT="ZWaveAgent",th.HTTPAGENT="HTTPAgent",th.DOORASSET="DoorAsset",th.THERMOSTATASSET="ThermostatAsset",th.SHIPASSET="ShipAsset",(tb=eg||(eg={})).COLOURRGB="colourRGB",tb.WILDCARDSUBSCRIPTIONTOPICS="wildcardSubscriptionTopics",tb.PRICEHOURLY="priceHourly",tb.MQTTPORT="MQTTPort",tb.PINGDISABLED="pingDisabled",tb.FLOW="flow",tb.CHILDASSETTYPE="childAssetType",tb.LASTACCESS="lastAccess",tb.POSITION="position",tb.NETWORKKEY="networkKey",tb.UNIVERSE="universe",tb.ROUTINGMODE="routingMode",tb.MSSINUMBER="MSSINumber",tb.LASTWILLRETAIN="lastWillRetain",tb.LASTWILLTOPIC="lastWillTopic",tb.SERIALBAUDRATE="serialBaudrate",tb.SUBSCRIBEQOS="subscribeQos",tb.LEDCOUNT="lEDCount",tb.LOCKED="locked",tb.CLOUDCOVERAGE="cloudCoverage",tb.BASEURL="baseURL",tb.PROTOCOL="protocol",tb.REQUIREDVALUES="requiredValues",tb.REGION="region",tb.CONSOLEPLATFORM="consolePlatform",tb.GATEWAYSTATUS="gatewayStatus",tb.NO2LEVEL="NO2Level",tb.ATMOSPHERICPRESSURE="atmosphericPressure",tb.SERIALPORT="serialPort",tb.APPLICATIONID="applicationId",tb.TAGS="tags",tb.UNLOCK="unlock",tb.CHECKINTERVALSECONDS="checkIntervalSeconds",tb.LOCATION="location",tb.CLIENTSECRET="clientSecret",tb.WINDDIRECTION="windDirection",tb.WINDSPEED="windSpeed",tb.PARTICLESPM10="particlesPM10",tb.APPLICATIONKEY="applicationKey",tb.LENGTH="length",tb.PROBABILITYOFPRECIPITATION="probabilityOfPrecipitation",tb.USERNAMEPASSWORD="usernamePassword",tb.WATERLEVEL="waterLevel",tb.CONNECTHEADERS="connectHeaders",tb.CONSOLENAME="consoleName",tb.WEBSOCKETQUERY="websocketQuery",tb.PREFERHTML="preferHTML",tb.PARITY="parity",tb.COOLING="cooling",tb.POLLINGMILLIS="pollingMillis",tb.SOILTEMPERATURE="soilTemperature",tb.SUNIRRADIANCE="sunIrradiance",tb.MESSAGEMAXLENGTH="messageMaxLength",tb.WINDGUSTSPEED="windGustSpeed",tb.LIGHTID="lightId",tb.PROXYADDRESS="proxyAddress",tb.REQUESTQUERYPARAMETERS="requestQueryParameters",tb.MQTTHOST="MQTTHost",tb.SECUREGRPC="secureGRPC",tb.MODEL="model",tb.STREET="street",tb.MANUFACTURER="manufacturer",tb.DELETEPROCESSEDMAIL="deleteProcessedMail",tb.RESUMESESSION="resumeSession",tb.ONOFF="onOff",tb.APIKEY="ApiKey",tb.CITY="city",tb.PRESENCE="presence",tb.SPACESOCCUPIED="spacesOccupied",tb.STARTTLS="startTLS",tb.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",tb.WEBSOCKETPATH="websocketPath",tb.AGENTSTATUS="agentStatus",tb.PRICEDAILY="priceDaily",tb.COUNTGROWTHMINUTE="countGrowthMinute",tb.IMONUMBER="IMONumber",tb.ATTRIBUTION="Attribution",tb.TENANTID="tenantId",tb.REQUESTHEADERS="requestHeaders",tb.HOST="host",tb.COUNTOUTMINUTE="countOutMinute",tb.MESSAGECHARSET="messageCharset",tb.CERTIFICATEALIAS="certificateAlias",tb.EMAIL="email",tb.BINDPORT="bindPort",tb.CONSOLEVERSION="consoleVersion",tb.PARTICLESPM1="particlesPM1",tb.MTU="mtu",tb.SPEED="speed",tb.MESSAGESTRIPDELIMITER="messageStripDelimiter",tb.AREA="area",tb.COUNTRY="country",tb.SHIPTYPE="shipType",tb.CONNECTSUBSCRIPTIONS="connectSubscriptions",tb.RELATIVEHUMIDITY="relativeHumidity",tb.SOURCEADDRESS="sourceAddress",tb.RAINFALL="rainfall",tb.OAUTHGRANT="oAuthGrant",tb.OZONELEVEL="ozoneLevel",tb.SEQUENCENUMBER="sequenceNumber",tb.COUNTINMINUTE="countInMinute",tb.PORT="port",tb.SUNALTITUDE="sunAltitude",tb.COUNTOUT="countOut",tb.ROOMNUMBER="roomNumber",tb.TUNNELINGSUPPORTED="tunnelingSupported",tb.ENINUMBER="ENINumber",tb.PARTICLESPM2_5="particlesPM2_5",tb.AGENTDISABLED="agentDisabled",tb.DISABLED="disabled",tb.COUNTIN="countIn",tb.MESSAGESOURCEADDRESS="messageSourceAddress",tb.PROVISIONWEATHERASSET="ProvisionWeatherAsset",tb.TIMEINJECTIONINTERVAL="timeInjectionInterval",tb.TEMPERATURESETPOINT="temperatureSetpoint",tb.CONSOLEPROVIDERS="consoleProviders",tb.COUNTTOTAL="countTotal",tb.SPACESBUFFER="spacesBuffer",tb.DEVICECONFIG="deviceConfig",tb.SPACESTOTAL="spacesTotal",tb.BINDHOST="bindHost",tb.FANSPEED="fanSpeed",tb.MESSAGECONVERTBINARY="messageConvertBinary",tb.NOTES="notes",tb.MAILFOLDERNAME="mailFolderName",tb.MESSAGEDELIMITERS="messageDelimiters",tb.TEMPERATURE="temperature",tb.SUNZENITH="sunZenith",tb.SNMPVERSIONVALUE="SNMPVersionValue",tb.BRIGHTNESS="brightness",tb.POSTALCODE="postalCode",tb.SPACESOPEN="spacesOpen",tb.HUMIDITY="humidity",tb.SOUNDLEVEL="soundLevel",tb.SECUREMODE="secureMode",tb.DIRECTION="direction",tb.STOPBITS="stopbits",tb.UVINDEX="uVIndex",tb.CONNECTURL="connectURL",tb.CLIENTID="clientId",tb.NATMODE="NATMode",tb.UPDATEONWRITE="updateOnWrite",tb.LASTWILLPAYLOAD="lastWillPayload",tb.GROUPID="groupId",tb.FOLLOWREDIRECTS="followRedirects",tb.SUNAZIMUTH="sunAzimuth",tb.MESSAGECONVERTHEX="messageConvertHex",tb.WEBSOCKETMODE="websocketMode",tb.COLOURTEMPERATURE="colourTemperature",tb.PUBLISHQOS="publishQos",tb.DATABITS="dataBits",(tg=ev||(ev={})).FORMAT="format",tg.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",tg.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",tg.SECRET="secret",tg.APPLYPREDICTEDDATAPOINTS="applyPredictedDataPoints",tg.ATTRIBUTELINKS="attributeLinks",tg.RULERESETIMMEDIATE="ruleResetImmediate",tg.RULESTATE="ruleState",tg.AGENTLINKCONFIG="agentLinkConfig",tg.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",tg.FORECAST="forecast",tg.STOREDATAPOINTS="storeDataPoints",tg.LABEL="label",tg.CONSTRAINTS="constraints",tg.UNITS="units",tg.USERCONNECTED="userConnected",tg.SHOWONDASHBOARD="showOnDashboard",tg.READONLY="readOnly",tg.MULTILINE="multiline",tg.ACCESSPUBLICWRITE="accessPublicWrite",tg.MOMENTARY="momentary",tg.AGENTLINK="agentLink",tg.ACCESSRESTRICTEDREAD="accessRestrictedRead",tg.ACCESSPUBLICREAD="accessPublicRead",(tv=e_||(e_={})).ASSETQUERY="assetQuery",tv.WSURL="WS_URL",tv.COLOURRGB="colourRGB",tv.VALUEFORMAT="valueFormat",tv.TEXT="text",tv.BYTE="byte",tv.USERNAMEANDPASSWORD="usernameAndPassword",tv.HTTPURL="HTTP_URL",tv.ATTRIBUTELINK="attributeLink",tv.ASSETID="assetID",tv.NUMBERMAP="numberMap",tv.HTTPMETHOD="HTTPMethod",tv.ATTRIBUTESTATE="attributeState",tv.POSITIVENUMBER="positiveNumber",tv.POSITIVEINTEGER="positiveInteger",tv.EXECUTIONSTATUS="executionStatus",tv.BIGINTEGER="bigInteger",tv.VALUEDESCRIPTOR="valueDescriptor",tv.PERIODDURATIONISO8601="periodDurationISO8601",tv.LONG="long",tv.DATEANDTIME="dateAndTime",tv.BOOLEANMAP="booleanMap",tv.MQTTQOS="MQTTQos",tv.NEGATIVEINTEGER="negativeInteger",tv.TCPIPPORTNUMBER="TCP_IPPortNumber",tv.GEOJSONPOINT="GEO_JSONPoint",tv.SNMPVERSION="SNMPVersion",tv.ASSETTYPE="assetType",tv.JSONOBJECT="JSONObject",tv.INTEGERMAP="integerMap",tv.BIGNUMBER="bigNumber",tv.IPADDRESS="IPAddress",tv.EMAIL="email",tv.TIMESTAMP="timestamp",tv.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",tv.ATTRIBUTEREFERENCE="attributeReference",tv.UUID="UUID",tv.INTEGER="integer",tv.OAUTHGRANT="oAuthGrant",tv.NUMBER="number",tv.DEVICECONFIGMAP="DeviceConfigMap",tv.TEXTMAP="textMap",tv.WEBSOCKETSUBSCRIPTION="websocketSubscription",tv.BOOLEAN="boolean",tv.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",tv.FORECASTCONFIGURATION="forecastConfiguration",tv.TIMEDURATIONISO8601="timeDurationISO8601",tv.TIMESTAMPISO8601="timestampISO8601",tv.CONSOLEPROVIDERS="consoleProviders",tv.MULTIVALUEDTEXTMAP="multivaluedTextMap",tv.NEGATIVENUMBER="negativeNumber",tv.PARITYBIT="Paritybit",tv.JSON="JSON",tv.CRONEXPRESSION="CRONExpression",tv.INTEGERBYTE="integerByte",tv.AGENTLINK="agentLink",tv.DIRECTION="direction",tv.HOSTORIPADDRESS="hostOrIPAddress",tv.STOPBITS="Stopbits",tv.CALENDAREVENT="calendarEvent",tv.CONNECTIONSTATUS="connectionStatus",tv.VALUECONSTRAINT="valueConstraint",(t_=ey||(ey={})).MONTH="month",t_.MILE_SCANDINAVIAN="mile_scandinavian",t_.VAR="var",t_.OUNCE="ounce",t_.HECTARE="hectare",t_.YARD="yard",t_.YEAR="year",t_.GIGA="giga",t_.JOULE="joule",t_.VOLT="volt",t_.HERTZ="hertz",t_.MILE="mile",t_.DEGREE="degree",t_.KILO="kilo",t_.BTU="btu",t_.TERA="tera",t_.FOOT="foot",t_.MEGA="mega",t_.KELVIN="kelvin",t_.CARBON="carbon",t_.DECIBEL_ATTENUATED="decibel_attenuated",t_.INCH="inch",t_.SQUARED="squared",t_.PERCENTAGE="percentage",t_.IN_HG="inch_mercury",t_.CENTI="centi",t_.GRAM="gram",t_.CUBED="cubed",t_.DAY="day",t_.RADIAN="radian",t_.OHM="ohm",t_.MINUTE="minute",t_.PART_PER_MILLION="ppm",t_.AMP="amp",t_.MASS_POUND="pound",t_.KNOT="knot",t_.METRE="metre",t_.LITRE="litre",t_.FLUID_OUNCE="fluid_ounce",t_.HOUR="hour",t_.ACRE="acre",t_.CELSIUS="celsius",t_.RPM="rpm",t_.PASCAL="pascal",t_.DECIBEL="decibel",t_.LUMEN="lumen",t_.WEEK="week",t_.FAHRENHEIT="fahrenheit",t_.WATT="watt",t_.GALLON="gallon",t_.LUX="lux",t_.MILLI="milli",t_.BAR="bar",t_.HECTO="hecto",t_.PEAK="peak",t_.SECOND="second",t_.MICRO="micro",t_.PER="per",t_.STONE="stone",eF||(eF={});class ty{static getAssetDescriptors(){return ty._assetTypeInfos.map(d=>d.assetDescriptor)}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(d){if(d)return d.assetDescriptor?d:("string"!=typeof d&&(d=d.name),this._assetTypeInfos.find(m=>m.assetDescriptor.name===d))}static getAssetDescriptor(d){if(!d)return;if(d.assetDescriptor)return d.assetDescriptor;if("string"!=typeof d)return d;let m=this._assetTypeInfos.find(m=>m.assetDescriptor.name===d);return m?m.assetDescriptor:void 0}static getAttributeDescriptor(d,m){if(!d)return;let u=this.getAssetTypeInfo(m||"ThingAsset");if(u&&u.attributeDescriptors)return u.attributeDescriptors.find(m=>m.name===d)}static getValueDescriptor(d){let m;if(!d)return;if(d.endsWith("[]"))for(m=0;d.endsWith("[]");)d=d.substring(0,d.length-2),m++;let u=this._valueDescriptors.find(m=>m.name===d);return u&&m&&(u=Object.assign(Object.assign({},u),{arrayDimensions:m})),u}static resolveValueDescriptor(d,m){let u;return m&&("string"==typeof m&&(u=ty.getValueDescriptor(m)),u=m.jsonType?m:ty.getValueDescriptor(m.type)),!u&&d&&(u=ty.getValueDescriptor("JSON")),u}static resolveValueTypeFromValue(d){if(null!=d){if("number"==typeof d)return"number";if("string"==typeof d)return"text";if("boolean"==typeof d)return"boolean";if(Array.isArray(d)){let m=1,u=d.find(d=>null!=d);for(;Array.isArray(u);)u=u.find(d=>null!=d),m++;let f=this.resolveValueTypeFromValue(u);if(!f)return;for(;m>0;)f+="[]",m--;return f}if(d instanceof Date)return"dateAndTime"}}static getAttributeAndValueDescriptors(d,m,u){let f,p;if(m&&"string"!=typeof m)f=m;else{let p=this.getAssetTypeInfo(d||"ThingAsset");if(!p)return[void 0,void 0];"string"==typeof m&&(f=this.getAttributeDescriptor(m,p)),!f&&u&&(f={type:u.type,name:u.name,meta:u.meta})}return f&&(p=this.getValueDescriptor(f.type)),[f,p]}static getMetaItemDescriptor(d){if(d)return this._metaItemDescriptors.find(m=>m.name===d)}static getAssetDescriptorColour(d,m){let u=this.getAssetDescriptor(d);return u&&u.colour?u.colour:m}static getAssetDescriptorIcon(d,m){let u=this.getAssetDescriptor(d);return u&&u.icon?u.icon:m}}ty._assetTypeInfos=[],ty._metaItemDescriptors=[],ty._valueDescriptors=[]},9705(d,m,u){"use strict";var f=u(7364);let p=(0,f.AH)`
845
845
  h4 {
846
846
  margin: 0;
847
847
  padding-bottom: var(--lumo-space-m);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openremote/or-asset-tree",
3
- "version": "1.31.1",
3
+ "version": "1.32.0-snapshot.20260929083723",
4
4
  "description": "OpenRemote Asset Tree",
5
5
  "customElements": "build/custom-elements.json",
6
6
  "main": "build/dist/umd/index.bundle.js",
@@ -28,19 +28,19 @@
28
28
  "license": "AGPL-3.0-or-later",
29
29
  "dependencies": {
30
30
  "@mdi/js": "^5.9.55",
31
- "@openremote/core": "1.31.1",
32
- "@openremote/model": "1.31.1",
33
- "@openremote/or-element": "1.31.1",
34
- "@openremote/or-icon": "1.31.1",
35
- "@openremote/or-mwc-components": "1.31.1",
36
- "@openremote/or-translate": "1.31.1",
37
- "@openremote/or-vaadin-components": "1.31.1",
31
+ "@openremote/core": "1.32.0-snapshot.20260929083723",
32
+ "@openremote/model": "1.32.0-snapshot.20260929083723",
33
+ "@openremote/or-element": "1.32.0-snapshot.20260929083723",
34
+ "@openremote/or-icon": "1.32.0-snapshot.20260929083723",
35
+ "@openremote/or-mwc-components": "1.32.0-snapshot.20260929083723",
36
+ "@openremote/or-translate": "1.32.0-snapshot.20260929083723",
37
+ "@openremote/or-vaadin-components": "1.32.0-snapshot.20260929083723",
38
38
  "lit": "^3.3.1",
39
39
  "lodash.debounce": "^4.0.8",
40
40
  "qs": "^6.16.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@openremote/util": "1.31.1",
43
+ "@openremote/util": "1.32.0-snapshot.20260929083723",
44
44
  "@types/lodash.debounce": "^4"
45
45
  },
46
46
  "publishConfig": {