@openremote/core 1.27.0 → 1.27.1
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.
- package/dist/umd/index.bundle.js +1 -1
- package/dist/umd/index.bundle.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.orbundle.js +1 -1
- package/dist/umd/index.orbundle.js.map +1 -1
- package/lib/util.d.ts.map +1 -1
- package/lib/util.js +1 -1
- package/lib/util.js.map +1 -1
- package/package.json +5 -5
package/dist/umd/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ORRest"),require("moment"),require("ORModel"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORRest","moment","ORModel","ORIcon"],t):"object"==typeof exports?exports.ORCore=t(require("ORRest"),require("moment"),require("ORModel"),require("ORIcon")):e.ORCore=t(e.ORRest,e.moment,e.ORModel,e.ORIcon)}(self,(e,t,r,n)=>(()=>{var o={3260(e){"use strict";let t=(async function(){}).constructor;e.exports=()=>t},7052(e){"use strict";let t=(async function*(){}).constructor;e.exports=()=>t},9630(e,t,r){"use strict";var n=r(469),o=r(24),i=r(1530);e.exports=r(7009)||n.call(i,o)},24(e){"use strict";e.exports=Function.prototype.apply},1530(e){"use strict";e.exports=Function.prototype.call},7196(e,t,r){"use strict";var n=r(469),o=r(6757),i=r(1530),s=r(9630);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return s(n,i,e)}},7009(e){"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},8682(e,t,r){"use strict";var n=r(4295),o=r(7196),i=o([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o([r]):r}},714(e,t,r){"use strict";var n,o=r(7196),i=r(1233);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!n&&i&&i(Object.prototype,"__proto__"),a=Object,c=a.getPrototypeOf;e.exports=s&&"function"==typeof s.get?o([s.get]):"function"==typeof c&&function(e){return c(null==e?e:a(e))}},9997(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},155(e){"use strict";e.exports=EvalError},593(e){"use strict";e.exports=Error},7180(e){"use strict";e.exports=RangeError},9304(e){"use strict";e.exports=ReferenceError},1742(e){"use strict";e.exports=SyntaxError},6757(e){"use strict";e.exports=TypeError},4923(e){"use strict";e.exports=URIError},802(e){"use strict";e.exports=Object},9691(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},o=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},i=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var s,a=this;if("function"!=typeof a||"[object Function]"!==t.apply(a))throw TypeError("Function.prototype.bind called on incompatible "+a);for(var c=o(arguments,1),l=r(0,a.length-c.length),u=[],f=0;f<l;f++)u[f]="$"+f;if(s=Function("binder","return function ("+i(u,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof s){var t=a.apply(this,n(c,arguments));return Object(t)===t?t:this}return a.apply(e,n(c,arguments))}),a.prototype){var p=function(){};p.prototype=a.prototype,s.prototype=new p,p.prototype=null}return s}},469(e,t,r){"use strict";var n=r(9691);e.exports=Function.prototype.bind||n},5175(e){"use strict";let t=(function*(){}).constructor;e.exports=()=>t},4295(e,t,r){"use strict";var n,o=r(802),i=r(593),s=r(155),a=r(7180),c=r(9304),l=r(1742),u=r(6757),f=r(4923),p=r(7256),d=r(5414),h=r(7954),g=r(3452),y=r(1358),v=r(5720),b=r(3515),m=r(1233),_=r(9997),S=function(){throw new u},w=m?function(){try{return arguments.callee,S}catch(e){try{return m(arguments,"callee").get}catch(e){return S}}}():S,k=r(8573)(),O=r(7582),E=r(2170),x=r(9090),A=r(24),P=r(1530),R={},C="u">typeof Uint8Array&&O?O(Uint8Array):n,I={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":k&&O?O([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":"u"<typeof Atomics?n:Atomics,"%BigInt%":"u"<typeof BigInt?n:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"u"<typeof Float16Array?n:Float16Array,"%Float32Array%":"u"<typeof Float32Array?n:Float32Array,"%Float64Array%":"u"<typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":Function,"%GeneratorFunction%":R,"%Int8Array%":"u"<typeof Int8Array?n:Int8Array,"%Int16Array%":"u"<typeof Int16Array?n:Int16Array,"%Int32Array%":"u"<typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&O?O(O([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"u"<typeof Map?n:Map,"%MapIteratorPrototype%":"u">typeof Map&&k&&O?O(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":m,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?n:Promise,"%Proxy%":"u"<typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":c,"%Reflect%":"u"<typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?n:Set,"%SetIteratorPrototype%":"u">typeof Set&&k&&O?O(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&O?O(""[Symbol.iterator]()):n,"%Symbol%":k?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":w,"%TypedArray%":C,"%TypeError%":u,"%Uint8Array%":"u"<typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"u"<typeof WeakMap?n:WeakMap,"%WeakRef%":"u"<typeof WeakRef?n:WeakRef,"%WeakSet%":"u"<typeof WeakSet?n:WeakSet,"%Function.prototype.call%":P,"%Function.prototype.apply%":A,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":E,"%Math.abs%":p,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":g,"%Math.pow%":y,"%Math.round%":v,"%Math.sign%":b,"%Reflect.getPrototypeOf%":x};if(O)try{null.error}catch(e){var N=O(O(e));I["%Error.prototype%"]=N}var T=r(3260),j=r(5175),L=r(7052),D=function e(t){var r;if("%AsyncFunction%"===t)r=T()||void 0;else if("%GeneratorFunction%"===t)r=j()||void 0;else if("%AsyncGeneratorFunction%"===t)r=L()||void 0;else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&O&&(r=O(o.prototype))}return I[t]=r,r},U={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(469),F=r(9731),B=M.call(P,Array.prototype.concat),V=M.call(A,Array.prototype.splice),K=M.call(P,String.prototype.replace),H=M.call(P,String.prototype.slice),W=M.call(P,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,z=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return K(e,q,function(e,t,r,o){n[n.length]=r?K(o,G,"$1"):t||e}),n},$=function(e,t){var r,n=e;if(F(U,n)&&(n="%"+(r=U[n])[0]+"%"),F(I,n)){var o=I[n];if(o===R&&(o=D(n)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===W(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=z(e),n=r.length>0?r[0]:"",o=$("%"+n+"%",t),i=o.name,s=o.value,a=!1,c=o.alias;c&&(n=c[0],V(r,B([0,1],c)));for(var f=1,p=!0;f<r.length;f+=1){var d=r[f],h=H(d,0,1),g=H(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===g||"'"===g||"`"===g)&&h!==g)throw new l("property names with quotes must have matching quotes");if("constructor"!==d&&p||(a=!0),n+="."+d,F(I,i="%"+n+"%"))s=I[i];else if(null!=s){if(!(d in s)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(m&&f+1>=r.length){var y=m(s,d);s=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[d]}else p=F(s,d),s=s[d];p&&!a&&(I[i]=s)}}return s}},2170(e,t,r){"use strict";e.exports=r(802).getPrototypeOf||null},9090(e){"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},7582(e,t,r){"use strict";var n=r(9090),o=r(2170),i=r(714);e.exports=n?function(e){return n(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},1067(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},1233(e,t,r){"use strict";var n=r(1067);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8573(e,t,r){"use strict";var n="u">typeof Symbol&&Symbol,o=r(9535);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9535(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9731(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=r(469).call(n,o)},4954(e,t,r){!function(){"use strict";var t="input is invalid type",n="object"==typeof window,o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var i=!n&&"object"==typeof self,s=!o.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;s?o=r.g:i&&(o=self);var a=!o.JS_SHA256_NO_COMMON_JS&&e.exports,c="function"==typeof define&&define.amd,l=!o.JS_SHA256_NO_ARRAY_BUFFER&&"u">typeof ArrayBuffer,u="0123456789abcdef".split(""),f=[-0x80000000,8388608,32768,128],p=[24,16,8,0],d=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],h=["hex","array","digest","arrayBuffer"],g=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),l&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e,t){return function(r){return new S(t,!0).update(r)[e]()}},v=function(e){var t=y("hex",e);s&&(t=b(t,e)),t.create=function(){return new S(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<h.length;++r){var n=h[r];t[n]=y(n,e)}return t},b=function(e,n){var i,s=r(7791),a=r(5610).Buffer,c=n?"sha224":"sha256";return i=a.from&&!o.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)},function(r){if("string"==typeof r)return s.createHash(c).update(r,"utf8").digest("hex");if(null==r)throw Error(t);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===a?s.createHash(c).update(i(r)).digest("hex"):e(r)}},m=function(e,t){return function(r,n){return new w(r,t,!0).update(n)[e]()}},_=function(e){var t=m("hex",e);t.create=function(t){return new w(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<h.length;++r){var n=h[r];t[n]=m(n,e)}return t};function S(e,t){t?(g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=0xc1059ed8,this.h1=0x367cd507,this.h2=0x3070dd17,this.h3=0xf70e5939,this.h4=0xffc00b31,this.h5=0x68581511,this.h6=0x64f98fa7,this.h7=0xbefa4fa4):(this.h0=0x6a09e667,this.h1=0xbb67ae85,this.h2=0x3c6ef372,this.h3=0xa54ff53a,this.h4=0x510e527f,this.h5=0x9b05688c,this.h6=0x1f83d9ab,this.h7=0x5be0cd19),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function w(e,r,n){var o,i=typeof e;if("string"===i){var s,a=[],c=e.length,u=0;for(o=0;o<c;++o)(s=e.charCodeAt(o))<128?a[u++]=s:(s<2048?a[u++]=192|s>>>6:(s<55296||s>=57344?a[u++]=224|s>>>12:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++o)),a[u++]=240|s>>>18,a[u++]=128|s>>>12&63),a[u++]=128|s>>>6&63),a[u++]=128|63&s);e=a}else if("object"===i){if(null===e)throw Error(t);else if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);e.length>64&&(e=new S(r,!0).update(e).array());var f=[],p=[];for(o=0;o<64;++o){var d=e[o]||0;f[o]=92^d,p[o]=54^d}S.call(this,r,n),this.update(p),this.oKeyPad=f,this.inner=!0,this.sharedMemory=n}S.prototype.update=function(e){if(!this.finalized){var r,n=typeof e;if("string"!==n){if("object"===n){if(null===e)throw Error(t);else if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);r=!0}for(var o,i,s=0,a=e.length,c=this.blocks;s<a;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,this.block=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),r)for(i=this.start;s<a&&i<64;++s)c[i>>>2]|=e[s]<<p[3&i++];else for(i=this.start;s<a&&i<64;++s)(o=e.charCodeAt(s))<128?c[i>>>2]|=o<<p[3&i++]:(o<2048?c[i>>>2]|=(192|o>>>6)<<p[3&i++]:(o<55296||o>=57344?c[i>>>2]|=(224|o>>>12)<<p[3&i++]:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),c[i>>>2]|=(240|o>>>18)<<p[3&i++],c[i>>>2]|=(128|o>>>12&63)<<p[3&i++]),c[i>>>2]|=(128|o>>>6&63)<<p[3&i++]),c[i>>>2]|=(128|63&o)<<p[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=c[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>0xffffffff&&(this.hBytes+=this.bytes/0x100000000|0,this.bytes=this.bytes%0x100000000),this}},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=f[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},S.prototype.hash=function(){var e,t,r,n,o,i,s,a,c,l,u=this.h0,f=this.h1,p=this.h2,h=this.h3,g=this.h4,y=this.h5,v=this.h6,b=this.h7,m=this.blocks;for(e=16;e<64;++e)t=((o=m[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,r=((o=m[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,m[e]=m[e-16]+t+m[e-7]+r|0;for(e=0,l=f&p;e<64;e+=4)this.first?(this.is224?(s=300032,b=(o=m[0]-0x543c9a5b)-0x8f1a6c7|0,h=o+0x170e9b5|0):(s=0x2a01a605,b=(o=m[0]-0xc881298)-0x5ab00ac6|0,h=o+0x8909ae5|0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),n=(s=u&f)^u&p^l,o=b+r+(g&y^~g&v)+d[e]+m[e],i=t+n,b=h+o|0,h=o+i|0),t=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),r=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),n=(a=h&u)^h&f^s,o=v+r+(b&g^~b&y)+d[e+1]+m[e+1],i=t+n,v=p+o|0,t=((p=o+i|0)>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),r=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),n=(c=p&h)^p&u^a,o=y+r+(v&b^~v&g)+d[e+2]+m[e+2],i=t+n,y=f+o|0,t=((f=o+i|0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),n=(l=f&p)^f&h^c,o=g+r+(y&v^~y&b)+d[e+3]+m[e+3],i=t+n,g=u+o|0,u=o+i|0,this.chromeBugWorkAround=!0;this.h0=this.h0+u|0,this.h1=this.h1+f|0,this.h2=this.h2+p|0,this.h3=this.h3+h|0,this.h4=this.h4+g|0,this.h5=this.h5+y|0,this.h6=this.h6+v|0,this.h7=this.h7+b|0},S.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,c=u[e>>>28&15]+u[e>>>24&15]+u[e>>>20&15]+u[e>>>16&15]+u[e>>>12&15]+u[e>>>8&15]+u[e>>>4&15]+u[15&e]+u[t>>>28&15]+u[t>>>24&15]+u[t>>>20&15]+u[t>>>16&15]+u[t>>>12&15]+u[t>>>8&15]+u[t>>>4&15]+u[15&t]+u[r>>>28&15]+u[r>>>24&15]+u[r>>>20&15]+u[r>>>16&15]+u[r>>>12&15]+u[r>>>8&15]+u[r>>>4&15]+u[15&r]+u[n>>>28&15]+u[n>>>24&15]+u[n>>>20&15]+u[n>>>16&15]+u[n>>>12&15]+u[n>>>8&15]+u[n>>>4&15]+u[15&n]+u[o>>>28&15]+u[o>>>24&15]+u[o>>>20&15]+u[o>>>16&15]+u[o>>>12&15]+u[o>>>8&15]+u[o>>>4&15]+u[15&o]+u[i>>>28&15]+u[i>>>24&15]+u[i>>>20&15]+u[i>>>16&15]+u[i>>>12&15]+u[i>>>8&15]+u[i>>>4&15]+u[15&i]+u[s>>>28&15]+u[s>>>24&15]+u[s>>>20&15]+u[s>>>16&15]+u[s>>>12&15]+u[s>>>8&15]+u[s>>>4&15]+u[15&s];return this.is224||(c+=u[a>>>28&15]+u[a>>>24&15]+u[a>>>20&15]+u[a>>>16&15]+u[a>>>12&15]+u[a>>>8&15]+u[a>>>4&15]+u[15&a]),c},S.prototype.toString=S.prototype.hex,S.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,i>>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s];return this.is224||c.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),c},S.prototype.array=S.prototype.digest,S.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},w.prototype=new S,w.prototype.finalize=function(){if(S.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();S.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),S.prototype.finalize.call(this)}};var k=v();k.sha256=k,k.sha224=v(!0),k.sha256.hmac=_(),k.sha224.hmac=_(!0),a?e.exports=k:(o.sha256=k.sha256,o.sha224=k.sha224,c&&define(function(){return k}))}()},3472(e,t,r){e=r.nmd(e);var n,o="__lodash_hash_undefined__",i=1/0,s="[object Arguments]",a="[object Array]",c="[object Boolean]",l="[object Date]",u="[object Error]",f="[object Function]",p="[object Map]",d="[object Number]",h="[object Object]",g="[object Promise]",y="[object RegExp]",v="[object Set]",b="[object String]",m="[object Symbol]",_="[object WeakMap]",S="[object ArrayBuffer]",w="[object DataView]",k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/,E=/^\./,x=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A=/\\(\\)?/g,P=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[s]=C[a]=C[S]=C[c]=C[w]=C[l]=C[u]=C[f]=C[p]=C[d]=C[h]=C[y]=C[v]=C[b]=C[_]=!1;var I="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,N="object"==typeof self&&self&&self.Object===Object&&self,T=I||N||Function("return this")(),j=t&&!t.nodeType&&t,L=j&&e&&!e.nodeType&&e,D=L&&L.exports===j&&I.process,U=function(){try{return D&&D.binding("util")}catch(e){}}(),M=U&&U.isTypedArray;function F(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function B(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function V(e,t){return function(r){return e(t(r))}}function K(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var H=Array.prototype,W=Function.prototype,q=Object.prototype,G=T["__core-js_shared__"],z=(n=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",$=W.toString,J=q.hasOwnProperty,Y=q.toString,X=RegExp("^"+$.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Q=T.Symbol,Z=T.Uint8Array,ee=V(Object.getPrototypeOf,Object),et=Object.create,er=q.propertyIsEnumerable,en=H.splice,eo=V(Object.keys,Object),ei=eI(T,"DataView"),es=eI(T,"Map"),ea=eI(T,"Promise"),ec=eI(T,"Set"),el=eI(T,"WeakMap"),eu=eI(Object,"create"),ef=eM(ei),ep=eM(es),ed=eM(ea),eh=eM(ec),eg=eM(el),ey=Q?Q.prototype:void 0,ev=ey?ey.valueOf:void 0,eb=ey?ey.toString:void 0;function em(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function e_(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eS(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ew(e){var t=-1,r=e?e.length:0;for(this.__data__=new eS;++t<r;)this.add(e[t])}function ek(e){this.__data__=new e_(e)}function eO(e,t){for(var r=e.length;r--;)if(eB(e[r][0],t))return r;return -1}em.prototype.clear=function(){this.__data__=eu?eu(null):{}},em.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},em.prototype.get=function(e){var t=this.__data__;if(eu){var r=t[e];return r===o?void 0:r}return J.call(t,e)?t[e]:void 0},em.prototype.has=function(e){var t=this.__data__;return eu?void 0!==t[e]:J.call(t,e)},em.prototype.set=function(e,t){return this.__data__[e]=eu&&void 0===t?o:t,this},e_.prototype.clear=function(){this.__data__=[]},e_.prototype.delete=function(e){var t=this.__data__,r=eO(t,e);return!(r<0)&&(r==t.length-1?t.pop():en.call(t,r,1),!0)},e_.prototype.get=function(e){var t=this.__data__,r=eO(t,e);return r<0?void 0:t[r][1]},e_.prototype.has=function(e){return eO(this.__data__,e)>-1},e_.prototype.set=function(e,t){var r=this.__data__,n=eO(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},eS.prototype.clear=function(){this.__data__={hash:new em,map:new(es||e_),string:new em}},eS.prototype.delete=function(e){return eC(this,e).delete(e)},eS.prototype.get=function(e){return eC(this,e).get(e)},eS.prototype.has=function(e){return eC(this,e).has(e)},eS.prototype.set=function(e,t){return eC(this,e).set(e,t),this},ew.prototype.add=ew.prototype.push=function(e){return this.__data__.set(e,o),this},ew.prototype.has=function(e){return this.__data__.has(e)},ek.prototype.clear=function(){this.__data__=new e_},ek.prototype.delete=function(e){return this.__data__.delete(e)},ek.prototype.get=function(e){return this.__data__.get(e)},ek.prototype.has=function(e){return this.__data__.has(e)},ek.prototype.set=function(e,t){var r=this.__data__;if(r instanceof e_){var n=r.__data__;if(!es||n.length<199)return n.push([e,t]),this;r=this.__data__=new eS(n)}return r.set(e,t),this};var eE=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[++n];if(!1===t(o[a],a,o))break}return e};function ex(e,t){var r;t=ej(t,e)?[t]:eK(r=t)?r:eD(r);for(var n=0,o=t.length;null!=e&&n<o;)e=e[eU(t[n++])];return n&&n==o?e:void 0}function eA(e,t){return null!=e&&t in Object(e)}function eP(e,t,r,n,o){return e===t||(null!=e&&null!=t&&(eG(e)||ez(t))?function(e,t,r,n,o,i){var f=eK(e),g=eK(t),_=a,k=a;f||(_=(_=eN(e))==s?h:_),g||(k=(k=eN(t))==s?h:k);var O=_==h&&!F(e),E=k==h&&!F(t),x=_==k;if(x&&!O)return i||(i=new ek),f||eJ(e)?eR(e,t,r,n,o,i):function(e,t,r,n,o,i,s){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case S:if(e.byteLength!=t.byteLength||!n(new Z(e),new Z(t)))break;return!0;case c:case l:case d:return eB(+e,+t);case u:return e.name==t.name&&e.message==t.message;case y:case b:return e==t+"";case p:var a=B;case v:var f=2&i;if(a||(a=K),e.size!=t.size&&!f)break;var h=s.get(e);if(h)return h==t;i|=1,s.set(e,t);var g=eR(a(e),a(t),n,o,i,s);return s.delete(e),g;case m:if(ev)return ev.call(e)==ev.call(t)}return!1}(e,t,_,r,n,o,i);if(!(2&o)){var A=O&&J.call(e,"__wrapped__"),P=E&&J.call(t,"__wrapped__");if(A||P){var R=A?e.value():e,C=P?t.value():t;return i||(i=new ek),r(R,C,n,o,i)}}return!!x&&(i||(i=new ek),function(e,t,r,n,o,i){var s=2&o,a=eY(e),c=a.length;if(c!=eY(t).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in t:J.call(t,u)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var p=!0;i.set(e,t),i.set(t,e);for(var d=s;++l<c;){var h=e[u=a[l]],g=t[u];if(n)var y=s?n(g,h,u,t,e,i):n(h,g,u,e,t,i);if(!(void 0===y?h===g||r(h,g,n,o,i):y)){p=!1;break}d||(d="constructor"==u)}if(p&&!d){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(e),i.delete(t),p}(e,t,r,n,o,i))}(e,t,eP,r,n,o):e!=e&&t!=t)}function eR(e,t,r,n,o,i){var s=2&o,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var u=-1,f=!0,p=1&o?new ew:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var d=e[u],h=t[u];if(n)var g=s?n(h,d,u,t,e,i):n(d,h,u,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!function(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}(t,function(e,t){if(!p.has(t)&&(d===e||r(d,e,n,o,i)))return p.add(t)})){f=!1;break}}else if(!(d===h||r(d,h,n,o,i))){f=!1;break}}return i.delete(e),i.delete(t),f}function eC(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function eI(e,t){var r,n=null==e?void 0:e[t];return!(!eG(n)||(r=n,z&&z in r))&&(eW(n)||F(n)?X:P).test(eM(n))?n:void 0}var eN=function(e){return Y.call(e)};function eT(e,t){return!!(t=null==t?0x1fffffffffffff:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function ej(e,t){if(eK(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||e$(e))||O.test(e)||!k.test(e)||null!=t&&e in Object(t)}(ei&&eN(new ei(new ArrayBuffer(1)))!=w||es&&eN(new es)!=p||ea&&eN(ea.resolve())!=g||ec&&eN(new ec)!=v||el&&eN(new el)!=_)&&(eN=function(e){var t=Y.call(e),r=t==h?e.constructor:void 0,n=r?eM(r):void 0;if(n)switch(n){case ef:return w;case ep:return p;case ed:return g;case eh:return v;case eg:return _}return t});function eL(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}var eD=eF(function(e){e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(e$(e))return eb?eb.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}(t);var t,r=[];return E.test(e)&&r.push(""),e.replace(x,function(e,t,n,o){r.push(n?o.replace(A,"$1"):t||e)}),r});function eU(e){if("string"==typeof e||e$(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function eM(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eF(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s),s};return r.cache=new(eF.Cache||eS),r}function eB(e,t){return e===t||e!=e&&t!=t}function eV(e){var t;return ez(t=e)&&eH(t)&&J.call(e,"callee")&&(!er.call(e,"callee")||Y.call(e)==s)}eF.Cache=eS;var eK=Array.isArray;function eH(e){return null!=e&&eq(e.length)&&!eW(e)}function eW(e){var t=eG(e)?Y.call(e):"";return t==f||"[object GeneratorFunction]"==t}function eq(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function eG(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ez(e){return!!e&&"object"==typeof e}function e$(e){return"symbol"==typeof e||ez(e)&&Y.call(e)==m}var eJ=M?function(e){return M(e)}:function(e){return ez(e)&&eq(e.length)&&!!C[Y.call(e)]};function eY(e){return eH(e)?function(e){var t=eK(e)||eV(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],r=t.length,n=!!r;for(var o in e)J.call(e,o)&&!(n&&("length"==o||eT(o,r)))&&t.push(o);return t}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||q))return eo(e);var t,r,n=[];for(var o in Object(e))J.call(e,o)&&"constructor"!=o&&n.push(o);return n}(e)}function eX(e){return e}e.exports=function(e,t,r){var n=eK(e)||eJ(e);if(t="function"==typeof(l=t)?l:null==l?eX:"object"==typeof l?eK(l)?(o=l[0],i=l[1],ej(o)&&(s=i)==s&&!eG(s)?eL(eU(o),i):function(e){var t,r,n,s,a,c=(t=e,r=o,void 0===(n=null==t?void 0:ex(t,r))?void 0:n);return void 0===c&&c===i?(s=e,a=o,null!=s&&function(e,t,r){t=ej(t,e)?[t]:eK(n=t)?n:eD(n);for(var n,o,i=-1,s=t.length;++i<s;){var a=eU(t[i]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}if(o)return o;var s=e?e.length:0;return!!s&&eq(s)&&eT(a,s)&&(eK(e)||eV(e))}(s,a,eA)):eP(i,c,void 0,3)}):1==(c=function(e){for(var t=eY(e),r=t.length;r--;){var n,o=t[r],i=e[o];t[r]=[o,i,(n=i)==n&&!eG(n)]}return t}(a=l)).length&&c[0][2]?eL(c[0][0],c[0][1]):function(e){return e===a||function(e,t){var r=t.length,n=r;if(null==e)return!n;for(e=Object(e);r--;){var o=t[r];if((0,o[2])?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<n;){var i=(o=t[r])[0],s=e[i],a=o[1];if(0,o[2]){if(void 0===s&&!(i in e))return!1}else{var c,l=new ek;if(!(void 0===c?eP(a,s,void 0,3,l):c))return!1}}return!0}(e,c)}:function(e){var t;return ej(e)?(t=eU(e),function(e){return null==e?void 0:e[t]}):function(t){return ex(t,e)}}(l),null==r)if(n||eG(e)){var o,i,s,a,c,l,u,f=e.constructor;r=n?eK(e)?new f:[]:eW(f)&&eG(u=ee(e))?et(u):{}}else r={};return(n?function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););return e}:function(e,t){return e&&eE(e,t,eY)})(e,function(e,n,o){return t(r,e,n,o)}),r}},7256(e){"use strict";e.exports=Math.abs},5414(e){"use strict";e.exports=Math.floor},981(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},7954(e){"use strict";e.exports=Math.max},3452(e){"use strict";e.exports=Math.min},1358(e){"use strict";e.exports=Math.pow},5720(e){"use strict";e.exports=Math.round},3515(e,t,r){"use strict";var n=r(981);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},3109(e,t,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&c&&"function"==typeof c.get?c.get:null,u=a&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,m=String.prototype.replace,_=String.prototype.toUpperCase,S=String.prototype.toLowerCase,w=RegExp.prototype.test,k=Array.prototype.concat,O=Array.prototype.join,E=Array.prototype.slice,x=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===C?"object":"symbol")?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function j(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-x(-e):x(e);if(n!==e){var o=String(n),i=b.call(t,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(t,r,"$&_")}var L=r(6550),D=L.custom,U=W(D)?D:null,M={__proto__:null,double:'"',single:"'"},F={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function B(e,t,r){var n=M[r.quoteStyle||t];return n+e+n}function V(e){return!I||!("object"==typeof e&&(I in e||void 0!==e[I]))}function K(e){return"[object Array]"===z(e)&&V(e)}function H(e){return"[object RegExp]"===z(e)&&V(e)}function W(e){if(C)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!R)return!1;try{return R.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,o,a){var c,g,_,w,x,P=n||{};if(G(P,"quoteStyle")&&!G(M,P.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if(G(P,"maxStringLength")&&("number"==typeof P.maxStringLength?P.maxStringLength<0&&P.maxStringLength!==1/0:null!==P.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var D=!G(P,"customInspect")||P.customInspect;if("boolean"!=typeof D&&"symbol"!==D)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(P,"indent")&&null!==P.indent&&" "!==P.indent&&!(parseInt(P.indent,10)===P.indent&&P.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(P,"numericSeparator")&&"boolean"!=typeof P.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var q=P.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n=t.length-r.maxStringLength;return e(b.call(t,0,r.maxStringLength),r)+("... "+n)+" more character"+(n>1?"s":"")}var o=F[r.quoteStyle||"single"];return o.lastIndex=0,B(m.call(m.call(t,o,"\\$1"),/[\x00-\x1f]/g,J),"single",r)}(t,P);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var et=String(t);return q?j(t,et):et}if("bigint"==typeof t){var er=String(t)+"n";return q?j(t,er):er}var en=void 0===P.depth?5:P.depth;if(void 0===o&&(o=0),o>=en&&en>0&&"object"==typeof t)return K(t)?"[Array]":"[Object]";var eo=function(e,t){var r;if(" "===e.indent)r=" ";else{if("number"!=typeof e.indent||!(e.indent>0))return null;r=O.call(Array(e.indent+1)," ")}return{base:r,prev:O.call(Array(t+1),r)}}(P,o);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function ei(t,r,n){if(r&&(a=E.call(a)).push(r),n){var i={depth:P.depth};return G(P,"quoteStyle")&&(i.quoteStyle=P.quoteStyle),e(t,i,o+1,a)}return e(t,P,o+1,a)}if("function"==typeof t&&!H(t)){var es=function(e){if(e.name)return e.name;var t=v.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ea=ee(t,ei);return"[Function"+(es?": "+es:" (anonymous)")+"]"+(ea.length>0?" { "+O.call(ea,", ")+" }":"")}if(W(t)){var ec=C?m.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(t);return"object"!=typeof t||C?ec:Y(ec)}if((el=t)&&"object"==typeof el&&("u">typeof HTMLElement&&el instanceof HTMLElement||"string"==typeof el.nodeName&&"function"==typeof el.getAttribute)){for(var el,eu,ef="<"+S.call(String(t.nodeName)),ep=t.attributes||[],ed=0;ed<ep.length;ed++){ef+=" "+ep[ed].name+"="+B((eu=ep[ed].value,m.call(String(eu),/"/g,""")),"double",P)}return ef+=">",t.childNodes&&t.childNodes.length&&(ef+="..."),ef+="</"+S.call(String(t.nodeName))+">"}if(K(t)){if(0===t.length)return"[]";var eh=ee(t,ei);return eo&&!function(e){for(var t=0;t<e.length;t++)if($(e[t],"\n")>=0)return!1;return!0}(eh)?"["+Z(eh,eo)+"]":"[ "+O.call(eh,", ")+" ]"}if("[object Error]"===z(c=t)&&V(c)){var eg=ee(t,ei);return"cause"in Error.prototype||!("cause"in t)||N.call(t,"cause")?0===eg.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(eg,", ")+" }":"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+ei(t.cause),eg),", ")+" }"}if("object"==typeof t&&D){if(U&&"function"==typeof t[U]&&L)return L(t,{depth:en-o});else if("symbol"!==D&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ey=[];return s&&s.call(t,function(e,r){ey.push(ei(r,t,!0)+" => "+ei(e,t))}),Q("Map",i.call(t),ey,eo)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ev=[];return u&&u.call(t,function(e){ev.push(ei(e,t))}),Q("Set",l.call(t),ev,eo)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if("[object Number]"===z(g=t)&&V(g))return Y(ei(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return Y(ei(A.call(t)));if("[object Boolean]"===z(_=t)&&V(_))return Y(h.call(t));if("[object String]"===z(w=t)&&V(w))return Y(ei(String(t)));if("u">typeof window&&t===window)return"{ [object Window] }";if("u">typeof globalThis&&t===globalThis||void 0!==r.g&&t===r.g)return"{ [object globalThis] }";if(!("[object Date]"===z(x=t)&&V(x))&&!H(t)){var eb=ee(t,ei),em=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,e_=t instanceof Object?"":"null prototype",eS=!em&&I&&Object(t)===t&&I in t?b.call(z(t),8,-1):e_?"Object":"",ew=(em||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(eS||e_?"["+O.call(k.call([],eS||[],e_||[]),": ")+"] ":"");return 0===eb.length?ew+"{}":eo?ew+"{"+Z(eb,eo)+"}":ew+"{ "+O.call(eb,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function G(e,t){return q.call(e,t)}function z(e){return g.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}function J(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function Y(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function Q(e,t,r,n){return e+" ("+t+") {"+(n?Z(r,n):O.call(r,", "))+"}"}function Z(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+O.call(e,","+r)+"\n"+t.prev}function ee(e,t){var r,n=K(e),o=[];if(n){o.length=e.length;for(var i=0;i<e.length;i++)o[i]=G(e,i)?t(e[i],e):""}var s="function"==typeof P?P(e):[];if(C){r={};for(var a=0;a<s.length;a++)r["$"+s[a]]=s[a]}for(var c in e)if(G(e,c)&&(!n||String(Number(c))!==c||!(c<e.length)))if(C&&r["$"+c]instanceof Symbol)continue;else w.call(/[^\w$]/,c)?o.push(t(c,e)+": "+t(e[c],e)):o.push(c+": "+t(e[c],e));if("function"==typeof P)for(var l=0;l<s.length;l++)N.call(e,s[l])&&o.push("["+t(s[l])+"]: "+t(e[s[l]],e));return o}},4461(e,t,r){e=r.nmd(e),(function(){"use strict";var n={function:!0,object:!0},o=n[typeof window]&&window||this,i=n[typeof t]&&t,s=n.object&&e&&!e.nodeType&&e,a=i&&s&&"object"==typeof r.g&&r.g;a&&(a.global===a||a.window===a||a.self===a)&&(o=a);var c=/\bOpera/,l=Object.prototype,u=l.hasOwnProperty,f=l.toString;function p(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function d(e){return e=b(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:p(e)}function h(e,t){for(var r in e)u.call(e,r)&&t(e[r],r,e)}function g(e){return null==e?p(e):f.call(e).slice(8,-1)}function y(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function v(e,t){var r=null,n=function(n,o){r=t(r,n,o,e)},o=-1,i=e?e.length:0;if("number"==typeof i&&i>-1&&i<=0x1fffffffffffff)for(;++o<i;)n(e[o],o,e);else h(e,n);return r}function b(e){return String(e).replace(/^ +| +$/g,"")}function m(e){var t,r,n,i,s,a=o,l=e&&"object"==typeof e&&"String"!=g(e);l&&(a=e,e=null);var u=a.navigator||{},p=u.userAgent||"";e||(e=p);var _=l?!!u.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(f.toString()),S="Object",w=l&&a.java?"JavaPackage":g(a.java),k=/\bJava/.test(w)&&a.java,O=k&&g(a.environment)==(l?S:"Environment"),E=k?"a":"α",x=k?"b":"β",A=a.document||{},P=a.operamini||a.opera,R=c.test(R=l&&P?P["[[Class]]"]:g(P))?R:P=null,C=e,I=[],N=null,T=e==p,j=T&&P&&"function"==typeof P.version&&P.version(),L=v([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],function(t,r){return t||RegExp("\\b"+(r.pattern||y(r))+"\\b","i").exec(e)&&(r.label||r)}),D=v(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"],function(t,r){return t||RegExp("\\b"+(r.pattern||y(r))+"\\b","i").exec(e)&&(r.label||r)}),U=B([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),M=v({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}},function(t,r,n){return t||(r[U]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(U)]||RegExp("\\b"+y(n)+"(?:\\b|\\w*\\d)","i").exec(e))&&n}),F=v(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "],function(t,r){var n,o,i,s=r.pattern||y(r);return!t&&(t=RegExp("\\b"+s+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(n=t,o=r.label||r,i={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"},s&&o&&/^Win/i.test(n)&&!/^Windows Phone /i.test(n)&&(i=i[/[\d.]+$/.exec(n)])&&(n="Windows "+i),n=String(n),s&&o&&(n=n.replace(RegExp(s,"i"),o)),t=n=d(n.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])),t});function B(t){return v(t,function(t,r){var n=r.pattern||y(r);return!t&&(t=RegExp("\\b"+n+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+n+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+n+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(r.label&&!RegExp(n,"i").test(r.label)?r.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),r=r.label||r,t=d(t[0].replace(RegExp(n,"i"),r).replace(RegExp("; *(?:"+r+"[_-])?","i")," ").replace(RegExp("("+r+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function V(t){return v(t,function(t,r){return t||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}if(L&&(L=[L]),/\bAndroid\b/.test(F)&&!U&&(i=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(e))&&(U=b(i[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),M&&!U?U=B([M]):M&&U&&(U=U.replace(RegExp("^("+y(M)+")[-_.\\s]","i"),M+" ").replace(RegExp("^("+y(M)+")[-_.]?(\\w)","i"),M+" $2")),(i=/\bGoogle TV\b/.exec(U))&&(U=i[0]),/\bSimulator\b/i.test(e)&&(U=(U?U+" ":"")+"Simulator"),"Opera Mini"==D&&/\bOPiOS\b/.test(e)&&I.push("running in Turbo/Uncompressed mode"),"IE"==D&&/\blike iPhone OS\b/.test(e)?(M=(i=m(e.replace(/like iPhone OS/,""))).manufacturer,U=i.product):/^iP/.test(U)?(D||(D="Safari"),F="iOS"+((i=/ OS ([\d_]+)/i.exec(e))?" "+i[1].replace(/_/g,"."):"")):"Konqueror"==D&&/^Linux\b/i.test(F)?F="Kubuntu":M&&"Google"!=M&&(/Chrome/.test(D)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(U))||/\bAndroid\b/.test(F)&&/^Chrome/.test(D)&&/\bVersion\//i.test(e)?(D="Android Browser",F=/\bAndroid\b/.test(F)?F:"Android"):"Silk"==D?(/\bMobi/i.test(e)||(F="Android",I.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&I.unshift("accelerated")):"UC Browser"==D&&/\bUCWEB\b/.test(e)?I.push("speed mode"):"PaleMoon"==D&&(i=/\bFirefox\/([\d.]+)\b/.exec(e))?I.push("identifying as Firefox "+i[1]):"Firefox"==D&&(i=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(F||(F="Firefox OS"),U||(U=i[1])):!D||(i=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(D))?(D&&!U&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(i+"/")+8))&&(D=null),(i=U||M||F)&&(U||M||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(F))&&(D=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(F)?F:i)+" Browser")):"Electron"==D&&(i=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&I.push("Chromium "+i),j||(j=V(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",y(D),"(?:Firefox|Minefield|NetFront)"])),(i="iCab"==L&&parseFloat(j)>3&&"WebKit"||/\bOpera\b/.test(D)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(L)&&"WebKit"||!L&&/\bMSIE\b/i.test(e)&&("Mac OS"==F?"Tasman":"Trident")||"WebKit"==L&&/\bPlayStation\b(?! Vita\b)/i.test(D)&&"NetFront")&&(L=[i]),"IE"==D&&(i=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(D+=" Mobile",F="Windows Phone "+(/\+$/.test(i)?i:i+".x"),I.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(D="IE Mobile",F="Windows Phone 8.x",I.unshift("desktop mode"),j||(j=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=D&&"Trident"==L&&(i=/\brv:([\d.]+)/.exec(e))&&(D&&I.push("identifying as "+D+(j?" "+j:"")),D="IE",j=i[1]),T){if(r="global",n=null!=(t=a)?typeof t[r]:"number",/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!t[r])g(i=a.runtime)==(l?S:"ScriptBridgingProxyObject")?(D="Adobe AIR",F=i.flash.system.Capabilities.os):g(i=a.phantom)==(l?S:"RuntimeObject")?(D="PhantomJS",j=(i=i.version||null)&&i.major+"."+i.minor+"."+i.patch):"number"==typeof A.documentMode&&(i=/\bTrident\/(\d+)/i.exec(e))?(j=[j,A.documentMode],(i=+i[1]+4)!=j[1]&&(I.push("IE "+j[1]+" mode"),L&&(L[1]=""),j[1]=i),j="IE"==D?String(j[1].toFixed(1)):j[0]):"number"==typeof A.documentMode&&/^(?:Chrome|Firefox)\b/.test(D)&&(I.push("masking as "+D+" "+j),D="IE",j="11.0",L=["Trident"],F="Windows");else if(k&&(C=(i=k.lang.System).getProperty("os.arch"),F=F||i.getProperty("os.name")+" "+i.getProperty("os.version")),O){try{j=a.require("ringo/engine").version.join("."),D="RingoJS"}catch(e){(i=a.system)&&i.global.system==a.system&&(D="Narwhal",F||(F=i[0].os||null))}D||(D="Rhino")}else"object"==typeof a.process&&!a.process.browser&&(i=a.process)&&("object"==typeof i.versions&&("string"==typeof i.versions.electron?(I.push("Node "+i.versions.node),D="Electron",j=i.versions.electron):"string"==typeof i.versions.nw&&(I.push("Chromium "+j,"Node "+i.versions.node),D="NW.js",j=i.versions.nw)),D||(D="Node.js",C=i.arch,F=i.platform,j=(j=/[\d.]+/.exec(i.version))?j[0]:null));F=F&&d(F)}if(j&&(i=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(j)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(T&&u.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(N=/b/i.test(i)?"beta":"alpha",j=j.replace(RegExp(i+"\\+?$"),"")+("beta"==N?x:E)+(/\d+\+?/.exec(i)||"")),"Fennec"==D||"Firefox"==D&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(F))D="Firefox Mobile";else if("Maxthon"==D&&j)j=j.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(U))"Xbox 360"==U&&(F=null),"Xbox 360"==U&&/\bIEMobile\b/.test(e)&&I.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(D)||D&&!U&&!/Browser|Mobi/.test(D))&&("Windows CE"==F||/Mobi/i.test(e)))D+=" Mobile";else if("IE"==D&&T)try{null===a.external&&I.unshift("platform preview")}catch(e){I.unshift("embedded")}else(/\bBlackBerry\b/.test(U)||/\bBB10\b/.test(e))&&(i=(RegExp(U.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||j)?(F=((i=[i,/BB10/.test(e)])[1]?(U=null,M="BlackBerry"):"Device Software")+" "+i[0],j=null):this!=h&&"Wii"!=U&&(T&&P||/Opera/.test(D)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==D&&/\bOS X (?:\d+\.){2,}/.test(F)||"IE"==D&&(F&&!/^Win/.test(F)&&j>5.5||/\bWindows XP\b/.test(F)&&j>8||8==j&&!/\bTrident\b/.test(e)))&&!c.test(i=m.call(h,e.replace(c,"")+";"))&&i.name&&(i="ing as "+i.name+((i=i.version)?" "+i:""),c.test(D)?(/\bIE\b/.test(i)&&"Mac OS"==F&&(F=null),i="identify"+i):(i="mask"+i,D=R?d(R.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(i)&&(F=null),T||(j=null)),L=["Presto"],I.push(i));(i=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(i=[parseFloat(i.replace(/\.(\d)$/,".0$1")),i],"Safari"==D&&"+"==i[1].slice(-1)?(D="WebKit Nightly",N="alpha",j=i[1].slice(0,-1)):(j==i[1]||j==(i[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1]))&&(j=null),i[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(e)||0)[1],537.36==i[0]&&537.36==i[2]&&parseFloat(i[1])>=28&&"WebKit"==L&&(L=["Blink"]),T&&(_||i[1])?(L&&(L[1]="like Chrome"),i=i[1]||((i=i[0])<530?1:i<532?2:i<532.05?3:i<533?4:i<534.03?5:i<534.07?6:i<534.1?7:i<534.13?8:i<534.16?9:i<534.24?10:i<534.3?11:i<535.01?12:i<535.02?"13+":i<535.07?15:i<535.11?16:i<535.19?17:i<536.05?18:i<536.1?19:i<537.01?20:i<537.11?"21+":i<537.13?23:i<537.18?24:i<537.24?25:i<537.36?26:"Blink"!=L?"27":"28")):(L&&(L[1]="like Safari"),i=(i=i[0])<400?1:i<500?2:i<526?3:i<533?4:i<534?"4+":i<535?5:i<537?6:i<538?7:i<601?8:i<602?9:i<604?10:i<606?11:i<608?12:"12"),L&&(L[1]+=" "+(i+="number"==typeof i?".x":/[.+]/.test(i)?"":"+")),"Safari"==D&&(!j||parseInt(j)>45)?j=i:"Chrome"==D&&/\bHeadlessChrome/i.test(e)&&I.unshift("headless")),"Opera"==D&&(i=/\bzbov|zvav$/.exec(F))?(D+=" ",I.unshift("desktop mode"),"zvav"==i?(D+="Mini",j=null):D+="Mobile",F=F.replace(RegExp(" *"+i+"$"),"")):"Safari"==D&&/\bChrome\b/.exec(L&&L[1])?(I.unshift("desktop mode"),D="Chrome Mobile",j=null,/\bOS X\b/.test(F)?(M="Apple",F="iOS 4.3+"):F=null):/\bSRWare Iron\b/.test(D)&&!j&&(j=V("Chrome")),j&&0==j.indexOf(i=/[\d.]+$/.exec(F))&&e.indexOf("/"+i+"-")>-1&&(F=b(F.replace(i,""))),F&&-1!=F.indexOf(D)&&!RegExp(D+" OS").test(F)&&(F=F.replace(RegExp(" *"+y(D)+" *"),"")),L&&!/\b(?:Avant|Nook)\b/.test(D)&&(/Browser|Lunascape|Maxthon/.test(D)||"Safari"!=D&&/^iOS/.test(F)&&/\bSafari\b/.test(L[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(D)&&L[1])&&(i=L[L.length-1])&&I.push(i),I.length&&(I=["("+I.join("; ")+")"]),M&&U&&0>U.indexOf(M)&&I.push("on "+M),U&&I.push((/^on /.test(I[I.length-1])?"":"on ")+U),F&&(s=(i=/ ([\d.+]+)$/.exec(F))&&"/"==F.charAt(F.length-i[0].length-1),F={architecture:32,family:i&&!s?F.replace(i[0],""):F,version:i?i[1]:null,toString:function(){var e=this.version;return this.family+(e&&!s?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(i=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(C))&&!/\bi686\b/i.test(C)?(F&&(F.architecture=64,F.family=F.family.replace(RegExp(" *"+i),"")),D&&(/\bWOW64\b/i.test(e)||T&&/\w(?:86|32)$/.test(u.cpuClass||u.platform)&&!/\bWin64; x64\b/i.test(e))&&I.unshift("32-bit")):F&&/^OS X/.test(F.family)&&"Chrome"==D&&parseFloat(j)>=39&&(F.architecture=64),e||(e=null);var K={};return K.description=e,K.layout=L&&L[0],K.manufacturer=M,K.name=D,K.prerelease=N,K.product=U,K.ua=e,K.version=D&&j,K.os=F||{architecture:null,family:null,version:null,toString:function(){return"null"}},K.parse=m,K.toString=function(){return this.description||""},K.version&&I.unshift(j),K.name&&I.unshift(D),F&&D&&!(F==String(F).split(" ")[0]&&(F==D.split(" ")[0]||U))&&I.push(U?"("+F+")":"on "+F),I.length&&(K.description=I.join(" ")),K}var _=m();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(o.platform=_,define(function(){return _})):i&&s?h(_,function(e,t){i[t]=e}):o.platform=_}).call(this)},5539(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},8183(e,t,r){"use strict";var n=r(6334),o=r(4816);e.exports={formats:r(5539),parse:o,stringify:n}},4816(e,t,r){"use strict";var n=r(1954),o=Object.prototype.hasOwnProperty,i=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},c=function(e,t){var r={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=t.parameterLimit===1/0?void 0:t.parameterLimit,u=c.split(t.delimiter,t.throwOnLimitExceeded&&void 0!==l?l+1:l);if(t.throwOnLimitExceeded&&void 0!==l&&u.length>l)throw RangeError("Parameter limit exceeded. Only "+l+" parameter"+(1===l?"":"s")+" allowed.");var f=-1,p=t.charset;if(t.charsetSentinel)for(d=0;d<u.length;++d)0===u[d].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[d]?p="utf-8":"utf8=%26%2310003%3B"===u[d]&&(p="iso-8859-1"),f=d,d=u.length);for(d=0;d<u.length;++d)if(d!==f){var d,h,g,y=u[d],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;if(-1===b?(h=t.decoder(y,s.decoder,p,"key"),g=t.strictNullHandling?null:""):null!==(h=t.decoder(y.slice(0,b),s.decoder,p,"key"))&&(g=n.maybeMap(a(y.slice(b+1),t,i(r[h])?r[h].length:0),function(e){return t.decoder(e,s.decoder,p,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=String(g).replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),y.indexOf("[]=")>-1&&(g=i(g)?[g]:g),t.comma&&i(g)&&g.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");g=n.combine([],g,t.arrayLimit,t.plainObjects)}if(null!==h){var m=o.call(r,h);m&&("combine"===t.duplicates||y.indexOf("[]=")>-1)?r[h]=n.combine(r[h],g,t.arrayLimit,t.plainObjects):m&&"last"!==t.duplicates||(r[h]=g)}}return r},l=function(e,t,r,o){var i=0;if(e.length>0&&"[]"===e[e.length-1]){var s=e.slice(0,-1).join("");i=Array.isArray(t)&&t[s]?t[s].length:0}for(var c=o?t:a(t,r,i),l=e.length-1;l>=0;--l){var u,f=e[l];if("[]"===f&&r.parseArrays)u=n.isOverflow(c)?c:r.allowEmptyArrays&&(""===c||r.strictNullHandling&&null===c)?[]:n.combine([],c,r.arrayLimit,r.plainObjects);else{u=r.plainObjects?{__proto__:null}:{};var p="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,d=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,h=parseInt(d,10),g=!isNaN(h)&&f!==d&&String(h)===d&&h>=0&&r.parseArrays;if(r.parseArrays||""!==d)if(g&&h<r.arrayLimit)(u=[])[h]=c;else if(g&&r.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");else g?(u[h]=c,n.markOverflow(u,h)):"__proto__"!==d&&(u[d]=c);else u={0:c}}c=u}return c},u=function(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&o.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var n=[],i=r.indexOf("["),s=i>=0?r.slice(0,i):r;if(s){if(!t.plainObjects&&o.call(Object.prototype,s)&&!t.allowPrototypes)return;n[n.length]=s}for(var a=r.length,c=i,l=0;c>=0&&l<t.depth;){for(var u=1,f=c+1,p=-1;f<a&&p<0;){var d=r.charCodeAt(f);91===d?u+=1:93===d&&0==(u-=1)&&(p=f),f+=1}if(p<0)return n[n.length]="["+r.slice(c)+"]",n;var h=r.slice(c,p+1),g=h.slice(1,-1);if(!t.plainObjects&&o.call(Object.prototype,g)&&!t.allowPrototypes)return;n[n.length]=h,l+=1,c=r.indexOf("[",p+1)}if(c>=0){if(!0===t.strictDepth)throw RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");n[n.length]="["+r.slice(c)+"]"}return n},f=function(e,t,r,n){if(e){var o=u(e,r);if(o)return l(o,t,r,n)}},p=function(e){if(!e)return s;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?s.charset:e.charset,r=void 0===e.duplicates?s.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||s.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:s.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:s.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:s.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};e.exports=function(e,t){var r=p(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var o="string"==typeof e?c(e,r):e,i=r.plainObjects?{__proto__:null}:{},s=Object.keys(o),a=0;a<s.length;++a){var l=s[a],u=f(l,o[l],r,"string"==typeof e);i=n.merge(i,u,r)}return!0===r.allowSparse?i:n.compact(i)}},6334(e,t,r){"use strict";var n=r(6278),o=r(1954),i=r(5539),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,c(t)?t:[t])},f=Date.prototype.toISOString,p=i.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},h={},g=function e(t,r,i,s,a,l,f,p,g,y,v,b,m,_,S,w,k,O){for(var E,x,A=t,P=O,R=0,C=!1;void 0!==(P=P.get(h))&&!C;){var I=P.get(t);if(R+=1,void 0!==I)if(I===R)throw RangeError("Cyclic object value");else C=!0;void 0===P.get(h)&&(R=0)}if("function"==typeof y?A=y(r,A):A instanceof Date?A=m(A):"comma"===i&&c(A)&&(A=o.maybeMap(A,function(e){return e instanceof Date?m(e):e})),null===A){if(l)return S(g&&!w?g(r,d.encoder,k,"key",_):r);A=""}if("string"==typeof(E=A)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||o.isBuffer(A))return g?[S(w?r:g(r,d.encoder,k,"key",_))+"="+S(g(A,d.encoder,k,"value",_))]:[S(r)+"="+S(String(A))];var N=[];if(void 0===A)return N;if("comma"===i&&c(A))w&&g&&(A=o.maybeMap(A,function(e){return null==e?e:g(e)})),x=[{value:A.length>0?A.join(",")||null:void 0}];else if(c(y))x=y;else{var T=Object.keys(A);x=v?T.sort(v):T}var j=p?String(r).replace(/\./g,"%2E"):String(r),L=s&&c(A)&&1===A.length?j+"[]":j;if(a&&c(A)&&0===A.length)return L+"[]";for(var D=0;D<x.length;++D){var U=x[D],M="object"==typeof U&&U&&void 0!==U.value?U.value:A[U];if(!f||null!==M){var F=b&&p?String(U).replace(/\./g,"%2E"):String(U),B=c(A)?"function"==typeof i?i(L,F):L:L+(b?"."+F:"["+F+"]");O.set(t,R);var V=n();V.set(h,O),u(N,e(M,B,i,s,a,l,f,p,"comma"===i&&w&&c(A)?null:g,y,v,b,m,_,S,w,k,V))}}return N},y=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t,r=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==e.format){if(!s.call(i.formatters,e.format))throw TypeError("Unknown format option provided.");n=e.format}var o=i.formatters[n],l=d.filter;if(("function"==typeof e.filter||c(e.filter))&&(l=e.filter),t=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:t,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:l,format:n,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}};e.exports=function(e,t){var r,o=e,i=y(t);"function"==typeof i.filter?o=(0,i.filter)("",o):c(i.filter)&&(r=i.filter);var s=[];if("object"!=typeof o||null===o)return"";var l=a[i.arrayFormat],f="comma"===l&&i.commaRoundTrip;r||(r=Object.keys(o)),i.sort&&r.sort(i.sort);for(var p=n(),d=0;d<r.length;++d){var h=r[d];if(null!=h){var v=o[h];i.skipNulls&&null===v||u(s,g(v,h,l,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}}var b=s.join(i.delimiter),m=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&("iso-8859-1"===i.charset?m+="utf8=%26%2310003%3B"+i.delimiter:m+="utf8=%E2%9C%93"+i.delimiter),b.length>0?m+b:""}},1954(e,t,r){"use strict";var n=r(5539),o=r(6278),i=Object.prototype.hasOwnProperty,s=Array.isArray,a=o(),c=function(e,t){return a.set(e,t),e},l=function(e){return a.has(e)},u=function(e){return a.get(e)},f=function(e,t){a.set(e,t)},p=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),d=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(s(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&(n[n.length]=r[o]);t.obj[t.prop]=n}}},h=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:h,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t,r,n){if(l(e)){var o=u(e)+1;return e[o]=t,f(e,o),e}var i=[].concat(e,t);return i.length>r?c(h(i,{plainObjects:n}),i.length-1):i},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],s=Object.keys(i),a=0;a<s.length;++a){var c=s[a],l=i[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t[t.length]={obj:i,prop:c},r[r.length]=l)}return d(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var a="",c=0;c<s.length;c+=1024){for(var l=s.length>=1024?s.slice(c,c+1024):s,u=[],f=0;f<l.length;++f){var d=l.charCodeAt(f);if(45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===n.RFC1738&&(40===d||41===d)){u[u.length]=l.charAt(f);continue}if(d<128){u[u.length]=p[d];continue}if(d<2048){u[u.length]=p[192|d>>6]+p[128|63&d];continue}if(d<55296||d>=57344){u[u.length]=p[224|d>>12]+p[128|d>>6&63]+p[128|63&d];continue}f+=1,d=65536+((1023&d)<<10|1023&l.charCodeAt(f)),u[u.length]=p[240|d>>18]+p[128|d>>12&63]+p[128|d>>6&63]+p[128|63&d]}a+=u.join("")}return a},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:l,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:c,maybeMap:function(e,t){if(s(e)){for(var r=[],n=0;n<e.length;n+=1)r[r.length]=t(e[n]);return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(s(t)){var o=t.length;if(n&&"number"==typeof n.arrayLimit&&o>n.arrayLimit)return c(h(t.concat(r),n),o);t[o]=r}else if(!t||"object"!=typeof t)return[t,r];else if(l(t)){var a=u(t)+1;t[a]=r,f(t,a)}else{if(n&&n.strictMerge)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t){if(l(r)){for(var p=Object.keys(r),d=n&&n.plainObjects?{__proto__:null,0:t}:{0:t},g=0;g<p.length;g++)d[parseInt(p[g],10)+1]=r[p[g]];return c(d,u(r)+1)}var y=[t].concat(r);return n&&"number"==typeof n.arrayLimit&&y.length>n.arrayLimit?c(h(y,n),y.length-1):y}var v=t;return(s(t)&&!s(r)&&(v=h(t,n)),s(t)&&s(r))?(r.forEach(function(r,o){if(i.call(t,o)){var s=t[o];s&&"object"==typeof s&&r&&"object"==typeof r?t[o]=e(s,r,n):t[t.length]=r}else t[o]=r}),t):Object.keys(r).reduce(function(t,o){var s=r[o];if(i.call(t,o)?t[o]=e(t[o],s,n):t[o]=s,l(r)&&!l(t)&&c(t,u(r)),l(t)){var a=parseInt(o,10);String(a)===o&&a>=0&&a>u(t)&&f(t,a)}return t},v)}}},6521(e,t,r){"use strict";var n=r(3109),o=r(6757),i=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n},s=function(e,t){if(e){var r=i(e,t);return r&&r.value}},a=function(e,t,r){var n=i(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},c=function(e,t){if(e)return i(e,t,!0)};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new o("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=c(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return s(e,t)},has:function(t){var r;return!!(r=e)&&!!i(r,t)},set:function(t,r){e||(e={next:void 0}),a(e,t,r)}};return t}},3977(e,t,r){"use strict";var n=r(4295),o=r(8682),i=r(3109),s=r(6757),a=n("%Map%",!0),c=o("Map.prototype.get",!0),l=o("Map.prototype.set",!0),u=o("Map.prototype.has",!0),f=o("Map.prototype.delete",!0),p=o("Map.prototype.size",!0);e.exports=!!a&&function(){var e,t={assert:function(e){if(!t.has(e))throw new s("Side channel does not contain "+i(e))},delete:function(t){if(e){var r=f(e,t);return 0===p(e)&&(e=void 0),r}return!1},get:function(t){if(e)return c(e,t)},has:function(t){return!!e&&u(e,t)},set:function(t,r){e||(e=new a),l(e,t,r)}};return t}},8965(e,t,r){"use strict";var n=r(4295),o=r(8682),i=r(3109),s=r(3977),a=r(6757),c=n("%WeakMap%",!0),l=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("WeakMap.prototype.delete",!0);e.exports=c?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},delete:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(s&&t)return t.delete(r);return!1},get:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?l(e,r):t&&t.get(r)},has:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?f(e,r):!!t&&t.has(r)},set:function(r,n){c&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new c),u(e,r,n)):s&&(t||(t=s()),t.set(r,n))}};return r}:s},6278(e,t,r){"use strict";var n=r(6757),o=r(3109),i=r(6521),s=r(3977),a=r(8965)||s||i;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+o(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=a()),e.set(t,r)}};return t}},4532(e,t,r){!function(e){"use strict";var t,r,n=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),o=n&&"a=1"===new n({a:1}).toString(),i=n&&"+"===new n("s=%2B").get("s"),s=n&&"size"in n.prototype,a="__URLSearchParams__",c=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),l=d.prototype,u=!!(e.Symbol&&e.Symbol.iterator);if(!n||!o||!i||!c||!s){l.append=function(e,t){b(this[a],e,t)},l.delete=function(e){delete this[a][e]},l.get=function(e){var t=this[a];return this.has(e)?t[e][0]:null},l.getAll=function(e){var t=this[a];return this.has(e)?t[e].slice(0):[]},l.has=function(e){return _(this[a],e)},l.set=function(e,t){this[a][e]=[""+t]},l.toString=function(){var e,t,r,n,o=this[a],i=[];for(t in o)for(e=0,r=h(t),n=o[t];e<n.length;e++)i.push(r+"="+h(n[e]));return i.join("&")};var f=e.Proxy&&n&&(!i||!c||!o||!s);f?(r=new Proxy(n,{construct:function(e,t){return new e(new d(t[0]).toString())}})).toString=Function.prototype.toString.bind(d):r=d,Object.defineProperty(e,"URLSearchParams",{value:r});var p=e.URLSearchParams.prototype;p.polyfill=!0,!f&&e.Symbol&&(p[e.Symbol.toStringTag]="URLSearchParams"),"forEach"in p||(p.forEach=function(e,t){var r=v(this.toString());Object.getOwnPropertyNames(r).forEach(function(n){r[n].forEach(function(r){e.call(t,r,n,this)},this)},this)}),"sort"in p||(p.sort=function(){var e,t,r,n=v(this.toString()),o=[];for(e in n)o.push(e);for(o.sort(),t=0;t<o.length;t++)this.delete(o[t]);for(t=0;t<o.length;t++){var i=o[t],s=n[i];for(r=0;r<s.length;r++)this.append(i,s[r])}}),"keys"in p||(p.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),y(e)}),"values"in p||(p.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),y(e)}),"entries"in p||(p.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),y(e)}),u&&(p[e.Symbol.iterator]=p[e.Symbol.iterator]||p.entries),"size"in p||Object.defineProperty(p,"size",{get:function(){var e=v(this.toString());if(p===this)throw TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(e).reduce(function(t,r){return t+e[r].length},0)}})}function d(e){((e=e||"")instanceof URLSearchParams||e instanceof d)&&(e=e.toString()),this[a]=v(e)}function h(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function g(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(e){return decodeURIComponent(e)})}function y(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return u&&(r[e.Symbol.iterator]=function(){return r}),r}function v(e){var t={};if("object"==typeof e)if(m(e))for(var r=0;r<e.length;r++){var n=e[r];if(m(n)&&2===n.length)b(t,n[0],n[1]);else throw TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var o in e)e.hasOwnProperty(o)&&b(t,o,e[o]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var i=e.split("&"),s=0;s<i.length;s++){var a=i[s],c=a.indexOf("=");-1<c?b(t,g(a.slice(0,c)),g(a.slice(c+1))):a&&b(t,g(a),"")}}return t}function b(e,t,r){var n="string"==typeof r?r:null!=r&&"function"==typeof r.toString?r.toString():JSON.stringify(r);_(e,t)?e[t].push(n):e[t]=[n]}function m(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(void 0!==r.g?r.g:"u">typeof window?window:this)},9368(e){"use strict";e.exports=n},650(e){"use strict";e.exports=r},9207(t){"use strict";t.exports=e},5416(e){"use strict";e.exports=t},5610(){},7791(){},6550(){}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var a={};return(()=>{"use strict";let e;s.r(a),s.d(a,{DefaultHeaderHeight:()=>"50px",EventProviderStatus:()=>o,Manager:()=>rs,DefaultBoxShadowBottom:()=>t4,DefaultDisabledOpacity:()=>"0.3",DEFAULT_ICONSET:()=>re,DEFAULT_LANGUAGES:()=>rn,Util:()=>l,DefaultColor9:()=>t3,OREvent:()=>c,DefaultColor11:()=>t8,default:()=>rc,DefaultColor8:()=>t2,manager:()=>ra,DefaultColor7:()=>tX,DefaultColor2:()=>tZ,DefaultColor3:()=>t5,OPENREMOTE_CLIENT_ID:()=>rt,Console:()=>tv,normaliseConfig:()=>ri,DefaultBoxShadow:()=>t9,ORError:()=>i,DefaultColor10:()=>t6,DefaultColor6:()=>t1,DefaultColor4:()=>tY,DefaultColor1:()=>tQ,DefaultColor5:()=>t0,I18NEXT_TO_MOMENT_LOCALE:()=>ro,RESTRICTED_USER_REALM_ROLE:()=>rr,WebSocketEventProvider:()=>tx,subscribe:()=>tJ});var t,r,n,o,i,c,l={};s.r(l),s.d(l,{AssetQueryHelper:()=>th,Deferred:()=>ew,arrayRemove:()=>ej,blobToBase64:()=>tp,camelCaseToSentenceCase:()=>eD,capitaliseFirstLetter:()=>eM,cronStringToISOString:()=>eW,dateToCronString:()=>eH,difference:()=>eT,dispatchCancellableEvent:()=>tf,formatCronString:()=>eK,generateUniqueUUID:()=>td,getAllowedValueLabel:()=>eZ,getAssetTypeLabel:()=>eX,getAttributeLabel:()=>e1,getAttributeUnits:()=>tt,getAttributeValueAsString:()=>e3,getAttributeValueConstraints:()=>e7,getAttributeValueFormat:()=>tn,getBrowserLanguage:()=>ek,getComplexMetaItems:()=>eY,getEnumKeyAsString:()=>eF,getGeoNotificationsFromRulesSet:()=>ex,getMetaItemNameValueHolder:()=>e0,getMetaLabel:()=>e2,getMetaUnits:()=>tr,getMetaValue:()=>eq,getMetaValueAsString:()=>e6,getMetaValueConstraints:()=>te,getMetaValueFormat:()=>to,getPrimitiveMetaItems:()=>eJ,getQueryParameter:()=>eE,getQueryParameters:()=>eO,getValueAsString:()=>e4,getValueDescriptorLabel:()=>eQ,getWeekNumber:()=>eB,hasMetaItem:()=>eG,isComplexValueDescriptor:()=>e$,isObject:()=>eI,isPrimitiveValueDescriptor:()=>ez,isTimeDuration:()=>eP,isTimeDurationNegativeInfinity:()=>eC,isTimeDurationPositiveInfinity:()=>eR,loadJs:()=>tc,mergeObjects:()=>function e(t,r,n){if(t&&!r)return Object.assign({},t);if(r&&!t)return Object.assign({},r);let o=Object.assign({},t),i=[];return Object.entries(r).forEach(([t,r])=>{var s,a,c,l,u;let f;s=o,a=i,c=t,l=r,u=n,f=s,a.forEach(e=>{f.hasOwnProperty(e)||(f[e]={}),f=f[e]}),f&&(f.hasOwnProperty(c)?null==l?delete f[c]:Array.isArray(f[c])?u?f[c]=[...f[c],...l]:f[c]=[...l]:"object"==typeof l?f[c]=e(Object.assign({},f[c]),l,u):f[c]=l:null==l?delete f[c]:Array.isArray(l)?f[c]=[...l]:"object"==typeof l?f[c]=Object.assign({},l):f[c]=l)}),o},objectsEqual:()=>eN,resolveUnits:()=>e9,sentenceCaseToCamelCase:()=>eL,sortByNumber:()=>tl,sortByString:()=>tu,stringMatch:()=>eU,updateAsset:()=>ta}),s(4532);var u=s(650);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=f(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function g(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return(v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function m(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return y(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var E={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},x=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.init(t,r)}return g(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||E,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,O(O({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),A=function(){function e(){p(this,e),this.observers={}}return g(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function P(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function R(e){return null==e?"":""+e}function C(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var s=n(i.shift());!e[s]&&r&&(e[s]=new r),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return o()?{}:{obj:e,k:n(i.shift())}}function I(e,t,r){var n=C(e,t,Object);n.obj[n.k]=r}function N(e,t){var r=C(e,t),n=r.obj,o=r.k;if(n)return n[o]}function T(e,t,r){var n=N(e,r);return void 0!==n?n:N(t,r)}function j(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var L={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return L[e]}):e}var U="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,M=[" ",",","?","!",";"];function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var V=function(e){b(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),m(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return p(this,n),t=r.call(this),U&&A.call(y(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return g(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(s=e.split("."));var a=N(this.data,s);return a||!i||"string"!=typeof r?a:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),i=t,s=0;s<o.length;++s){if(!i||"string"==typeof i[o[s]]&&s+1<o.length)return;if(void 0===i[o[s]]){for(var a=2,c=o.slice(s,s+a).join(n),l=i[c];void 0===l&&o.length>s+a;)a++,l=i[c=o.slice(s,s+a).join(n)];if(void 0===l)return;if(null===l)return null;if(r.endsWith(c)){if("string"==typeof l)return l;if(c&&"string"==typeof l[c])return l[c]}var u=o.slice(s+a).join(n);if(u)return e(l,u,n);return}i=i[o[s]]}return i}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var s=[e,t];r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."),n=t,t=s[1]),this.addNamespaces(t),I(this.data,s,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),n=r,r=t,t=s[1]),this.addNamespaces(t);var a=N(this.data,s)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(a,r,o):a=B(B({},a),r),I(this.data,s,a),i.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?B(B({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(A),K={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach(function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))}),t}};function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function W(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var q={},G=function(e){b(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),m(this,e)});function n(e){var t,o,i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p(this,n),i=r.call(this),U&&A.call(y(i)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=y(i),t.forEach(function(t){e[t]&&(o[t]=e[t])}),i.options=s,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=x.create("translator"),i}return g(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=M.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),i=!o.test(e);if(!i){var s=e.indexOf(r);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i}(e,r,n);if(i&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:o};var c=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),e=c.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==f(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),c=a.key,l=a.namespaces,u=l[l.length-1],p=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(d){var h=t.nsSeparator||this.options.nsSeparator;return i?(g.res="".concat(u).concat(h).concat(c),g):"".concat(u).concat(h).concat(c)}return i?(g.res=c,g):c}var g=this.resolve(e,t),y=g&&g.res,v=g&&g.usedKey||c,b=g&&g.exactUsedKey||c,m=Object.prototype.toString.apply(y),_=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,w="string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y;if(S&&y&&w&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(m)&&("string"!=typeof _||"[object Array]"!==m)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,y,W(W({},t),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return i?(g.res=k,g):k}if(s){var O="[object Array]"===m,E=O?[]:{},x=O?b:v;for(var A in y)if(Object.prototype.hasOwnProperty.call(y,A)){var P="".concat(x).concat(s).concat(A);E[A]=this.translate(P,W(W({},t),{joinArrays:!1,ns:l})),E[A]===P&&(E[A]=y[A])}y=E}}else if(S&&"string"==typeof _&&"[object Array]"===m)(y=y.join(_))&&(y=this.extendTranslation(y,e,t,r));else{var R=!1,C=!1,I=void 0!==t.count&&"string"!=typeof t.count,N=n.hasDefaultValue(t),T=I?this.pluralResolver.getSuffix(p,t.count,t):"",j=t["defaultValue".concat(T)]||t.defaultValue;!this.isValidLookup(y)&&N&&(R=!0,y=j),this.isValidLookup(y)||(C=!0,y=c);var L=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:y,D=N&&j!==y&&this.options.updateMissing;if(C||R||D){if(this.logger.log(D?"updateKey":"missingKey",p,u,c,D?j:y),s){var U=this.resolve(c,W(W({},t),{},{keySeparator:!1}));U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var B=0;B<F.length;B++)M.push(F[B]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var V=function(e,r,n){var i=N&&n!==y?n:L;o.options.missingKeyHandler?o.options.missingKeyHandler(e,u,r,i,D,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,u,r,i,D,t),o.emit("missingKey",e,u,r,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?M.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){V([e],c+r,t["defaultValue".concat(r)]||j)})}):V(M,c,j))}y=this.extendTranslation(y,e,t,g,r),C&&y===c&&this.options.appendNamespaceToMissingKey&&(y="".concat(u,":").concat(c)),(C||R)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(c):c,R?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(g.res=y,g):y}},{key:"extendTranslation",value:function(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,W(W({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(W(W({},r),{interpolation:W(W({},this.options.interpolation),r.interpolation)}));var s,a="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=W(W({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),a){var u=e.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return o&&o[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var f=r.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=K.handle(p,e,t,this.options&&this.options.postProcessPassResolved?W({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!s.isValidLookup(t)){var c=s.extractFromKey(e,a),l=c.key;r=l;var u=c.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var f=void 0!==a.count&&"string"!=typeof a.count,p=f&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach(function(e){s.isValidLookup(t)||(i=e,!q["".concat(h[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(i)&&(q["".concat(h[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(r,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(function(r){if(!s.isValidLookup(t)){o=r;var i,c=[l];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(c,l,r,e,a);else{f&&(u=s.pluralResolver.getSuffix(r,a.count,a));var u,h="".concat(s.options.pluralSeparator,"zero");if(f&&(c.push(l+u),p&&c.push(l+h)),d){var g="".concat(l).concat(s.options.contextSeparator).concat(a.context);c.push(g),f&&(c.push(g+u),p&&c.push(g+h))}}for(;i=c.pop();)s.isValidLookup(t)||(n=i,t=s.getResource(r,e,i,a))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(A);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $=function(){function e(t){p(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}return g(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=z(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=z(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=z(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&i(r.formatLanguageCode(e))}),o}}]),e}(),J=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Y={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},X=["v1","v2","v3"],Q={zero:0,one:1,two:2,few:3,many:4,other:5},Z=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.languageUtils=t,this.options=n,this.logger=x.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},J.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:Y[e.fc]}})}),r)}return g(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return Q[e]-Q[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!X.includes(this.options.compatibilityJSON)}}]),e}();function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var er=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.logger=x.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return g(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:D,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?j(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?j(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?j(t.nestingPrefix):t.nestingPrefixEscaped||j("$t("),this.nestingSuffix=t.nestingSuffix?j(t.nestingSuffix):t.nestingSuffixEscaped||j(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,s,a=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(0>e.indexOf(a.formatSeparator)){var o=T(t,c,e);return a.alwaysFormat?a.format(o,void 0,r,et(et(et({},n),t),{},{interpolationkey:e})):o}var i=e.split(a.formatSeparator),s=i.shift().trim(),l=i.join(a.formatSeparator).trim();return a.format(T(t,c,s),l,r,et(et(et({},n),t),{},{interpolationkey:s}))};this.resetRegExp();var f=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?l(a.escape(e)):l(e)}}].forEach(function(t){for(s=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(i=u(r)))if("function"==typeof f){var c=f(e,o,n);i="string"==typeof c?c:""}else if(n&&n.hasOwnProperty(r))i="";else if(p){i=o[0];continue}else a.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),i="";else"string"==typeof i||a.useRawValueToEscape||(i=R(i));var l=t.safeValue(i);if(e=e.replace(o[0],l),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=et({},i);function a(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var i=(o=this.interpolate(o,s)).match(/'/g),a=o.match(/"/g);(i&&i.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{s=JSON.parse(o),t&&(s=et(et({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;r=this.nestingRegexp.exec(e);){var c=[],l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var u=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=u.shift(),c=u,l=!0}if((n=t(a.call(this,r[1].trim(),s),s))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=R(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=c.reduce(function(e,t){return o.format(e,t,i.lng,et(et({},i),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function en(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?en(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ei(e){var t={};return function(r,n,o){var i=n+JSON.stringify(o),s=t[i];return s||(s=e(n,o),t[i]=s),s(r)}}var es=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.logger=x.create("formatter"),this.options=t,this.formats={number:ei(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:ei(function(e,t){var r=new Intl.NumberFormat(e,eo(eo({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:ei(function(e,t){var r=new Intl.DateTimeFormat(e,eo({},t));return function(e){return r.format(e)}}),relativetime:ei(function(e,t){var r=new Intl.RelativeTimeFormat(e,eo({},t));return function(e){return r.format(e,t.range||"day")}}),list:ei(function(e,t){var r=new Intl.ListFormat(e,eo({},t));return function(e){return r.format(e)}})},this.init(t)}return g(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=ei(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var i=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(":"))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return w(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?w(e,void 0):void 0}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=n[0],i=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=i),"false"===i&&(r[o.trim()]=!1),"true"===i&&(r[o.trim()]=!0),isNaN(i)||(r[o.trim()]=parseInt(i,10))}})}return{formatName:t,formatOptions:r}}(t),s=i.formatName,a=i.formatOptions;if(o.formats[s]){var c=e;try{var l=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},u=l.locale||l.lng||n.locale||n.lng||r;c=o.formats[s](e,u,eo(eo(eo({},a),n),l))}catch(e){o.logger.warn(e)}return c}return o.logger.warn("there was no format function for ".concat(s)),e},e)}}]),e}();function ea(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ec(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ea(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ea(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var el=function(e){b(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),m(this,e)});function n(e,t,o){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p(this,n),i=r.call(this),U&&A.call(y(i)),i.backend=e,i.store=t,i.services=o,i.languageUtils=o.languageUtils,i.options=s,i.logger=x.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=s.maxParallelReads||10,i.readingCalls=0,i.maxRetries=s.maxRetries>=0?s.maxRetries:5,i.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,s.backend,s),i}return g(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i={},s={},a={},c={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var a="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[a]=2:o.state[a]<0||(1===o.state[a]?void 0===s[a]&&(s[a]=!0):(o.state[a]=1,n=!1,void 0===s[a]&&(s[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===c[t]&&(c[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var s={};this.queue.forEach(function(r){var n,a,c,l;n=r.loaded,(c=(a=C(n,[o],Object)).obj)[l=a.k]=c[l]||[],c[l].push(i),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){s[e]||(s[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===s[e][t]&&(s[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:i,callback:s}):(this.readingCalls++,this.backend[r](e,t,function(a,c){if(n.readingCalls--,n.waitingReads.length>0){var l=n.waitingReads.shift();n.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}a&&c&&o<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,o+1,2*i,s)},i):s(a,c)})):s(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,function(n,s){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&s&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),s),t.loaded(e,n,s)})}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null==r||""===r||(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,ec(ec({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(A);function eu(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ef(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ep(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ef(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ef(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ed(){}var eh=function(e){b(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),m(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(p(this,n),t=r.call(this),U&&A.call(y(t)),t.options=eu(o),t.services={},t.logger=x,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=y(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),i&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,i),m(t,y(t));setTimeout(function(){t.init(o,i)},0)}return t}return g(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===f(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===f(e[2])||"object"===f(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=ep(ep(ep({},n),this.options),eu(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ep(ep({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?x.init(o(this.modules.logger),this.options):x.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"u">typeof Intl&&(i=es);var i,s=new $(this.options);this.store=new V(this.options.resources,this.options);var a=this.services;a.logger=x,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new Z(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(a.formatter=o(i),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new er(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new el(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(a.languageDetector=o(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=o(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new G(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=ed),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var l=P(),u=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ed,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var i=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>i.indexOf(e)&&i.push(e)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return s(e)}),this.options.preload&&this.options.preload.forEach(function(e){return s(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=P();return e||(e=this.languages),t||(t=this.options.ns),r||(r=ed),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&K.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=P();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},i=function(e,i){i?(o(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},s=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==f(o)){for(var i,s=arguments.length,a=Array(s>2?s-2:0),c=2;c<s;c++)a[c-2]=arguments[c];i=n.options.overloadTranslationOptionHandler([t,o].concat(a))}else i=ep({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||r||e.keyPrefix;var l=n.options.keySeparator||".",u=i.keyPrefix?"".concat(i.keyPrefix).concat(l).concat(t):t;return n.t(u,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var s=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var a=r.precheck(this,s);if(void 0!==a)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!o||s(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=P();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=P();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ed,o=ep(ep(ep({},this.options),t),{isClone:!0}),i=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(function(t){i[t]=e[t]}),i.services=ep({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new G(i.services,i.options),i.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];i.emit.apply(i,[e].concat(r))}),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(A);S(eh,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new eh(e,t)});var eg=eh.createInstance();eg.createInstance=eh.createInstance,eg.createInstance,eg.init,eg.loadResources,eg.reloadResources,eg.use,eg.changeLanguage,eg.getFixedT,eg.t,eg.exists,eg.setDefaultNamespace,eg.hasLoadedNamespace,eg.loadNamespaces,eg.loadLanguages;var ey=s(8183),ev=s.n(ey),eb=s(5416),em=s.n(eb),e_=s(3472),eS=s.n(e_);class ew{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),Object.freeze(this)}}function ek(){return navigator.language.split("-")[0]||"en"}function eO(e){return ev().parse(e,{ignoreQueryPrefix:!0})}function eE(e){let t;if(location.search&&""!==location.search&&(t=eO(location.search)),location.hash){let e=location.hash.indexOf("?");e>-1&&(t=eO(location.hash.substring(e+1)))}return t?t[e]:void 0}function ex(e){let t=[];return e.rules.forEach(e=>{if(e.when&&e.then&&e.then.length>0){let r=new Map;for(let n of(function(e,t){if(!e)return;let r=[];e.groups&&e.groups.forEach(e=>{e.items&&e.items.forEach(e=>{r.push(e)})}),e.items&&e.items.forEach(e=>{r.push(e)}),r&&r.forEach(e=>{if(e.assets&&e.assets.attributes){let r=[];if(function e(t,r){t&&(t.items.forEach(e=>{e.value&&("radial"===e.value.predicateType||"rect"===e.value.predicateType)&&r.push({predicate:e.value})}),t.groups&&t.groups.forEach(t=>e(t,r)))}(e.assets.attributes,r),r.length>0){let n=e.tag||"0";t.set(n,r)}}})}(e.when,r),r.size>0&&e.then.forEach(e=>(function(e,t){if(e&&"notification"===e.action&&e.notification&&e.notification.message&&"push"===e.notification.message.type){let r=e.target;if(r&&r.conditionAssets){let n=t.get(r.conditionAssets);n&&n.forEach(t=>{t.notification=e.notification.message})}else for(let r of t.values())r.forEach(t=>{t.notification=e.notification.message})}})(e,r)),r.values()))n.forEach(e=>{e.notification&&t.push(e)})}}),t}let eA=/([+-])?((\d+)[Dd])?\s*((\d+)[Hh])?\s*((\d+)[Mm]$)?\s*((\d+)[Ss])?\s*((\d+)([Mm][Ss]$))?\s*((\d+)[Ww])?\s*((\d+)[Mm][Nn])?\s*((\d+)[Yy])?/;function eP(e){return!!e&&(e=e.trim()).length>0&&(eA.test(e)||eR(e)||eC(e))}function eR(e){return"*"===(e=null!=e?e.trim():void 0)||"+*"===e}function eC(e){return"-*"===(e=null!=e?e.trim():void 0)}function eI(e){return!!e&&"object"==typeof e}function eN(e,t,r=!0){if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function||e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length||e instanceof Date||!(e instanceof Object)||!(t instanceof Object))return!1;if(r){let r=Object.keys(e);return Object.keys(t).every(e=>-1!==r.indexOf(e))&&r.every(r=>eN(e[r],t[r]))}return!1}function eT(e,t){let r=(e,t)=>eS()(e,function(e,n,o){eN(n,null==t?void 0:t[o])||(e[o]=eI(n)&&eI(null==t?void 0:t[o])?r(n,null==t?void 0:t[o]):n)});return r(e,t)}function ej(e,t){if(0===e.length)return;let r=e.indexOf(t);r>=0&&e.splice(r,1)}function eL(e){return null==e?"":e.split(" ").map((e,t)=>0===t?e[0].toLowerCase()+e.substring(1):e[0].toUpperCase()+e.substring(1)).join("")}function eD(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map((e,r,n)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){let t=!n[r-1]||"_"===n[r-1],o=r+1<n.length&&n[r+1]&&"_"!==n[r+1],i=r+3>n.length||!n[r+1]&&!n[r+3];(!t||o)&&(e=" "+e),!o&&(t||i)||(e=e.toLowerCase())}return e}).join("").trim()}function eU(e,t){if(t===e)return!0;let r=e.endsWith("*"),n=!r&&e.startsWith("*"),o=!r&&!n&&e.startsWith("^")&&e.endsWith("$");if(r&&t.startsWith(e.substr(0,e.length-1))||n&&t.endsWith(e.substr(1)))return!0;if(o)try{return new RegExp(e).test(t)}catch(e){console.error("Failed to compile needle as a RegExp: "+e)}return!1}function eM(e){if(e)return 1===e.length?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function eF(e,t){return Object.keys(e).find(r=>e[r]===t)}function eB(e){(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));let t=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-t.getTime())/864e5+1)/7)}let eV=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function eK(e,t,r,n,o,i,s){let a="";if(i?Array.isArray(i)?a+=i.toString().replace(" ",""):a+=i.toString():a+="0",a+=" ",o?Array.isArray(o)?a+=o.toString().replace(" ",""):a+=o.toString():a+="0",a+=" ",n?Array.isArray(n)?a+=n.toString().replace(" ",""):a+=n.toString():a+="0",a+=" ",r?Array.isArray(r)?a+=r.toString().replace(" ",""):a+=r.toString():a+="*",a+=" ",t)if(Array.isArray(t))if("number"==typeof t[0]){let e=[];t.forEach(t=>{e.push(eV[t].toString())}),a+=e.toString().replace(" ","")}else a+=t.toString().replace(" ","");else a+=t.toString();else a+="*";return a+=" ",s?a+=s.toString():a+="?",a+=" ",e?Array.isArray(e)?a+=e.toString().replace(" ",""):a+=e:a+="*",a}function eH(e){return eK(e.getFullYear(),eV[e.getMonth()],[e.getDate()],[e.getHours()],[e.getMinutes()])}function eW(e,t){let r=e.split(" ");if(!Number.isNaN(Number(r[0]))&&!Number.isNaN(Number(r[1]))&&!Number.isNaN(Number(r[2]))&&(!Number.isNaN(Number(r[3]))||"*"==r[3])){let e=(!Number.isNaN(Number(r[6]))?r[6]:new Date().getFullYear()).toString(),n="";n=1==(n="*"!=r[4]?eV.indexOf(r[4]).toString():new Date().getMonth().toString()).length?"0"+n:n;let o=1==r[3].length&&"*"!=r[3]?"0"+r[3]:r[3].replace("*","01"),i=1==r[2].length&&"*"!=r[2]?"0"+r[2]:r[2].replace("*","00"),s=1==r[1].length&&"*"!=r[1]?"0"+r[1]:r[1].replace("*","00"),a=1==r[0].length&&"*"!=r[0]?"0"+r[0]:r[0].replace("*","00");if(e.length>0&&n.length>0)if(t)return em().utc({year:Number(e),month:Number(n),date:Number(o),hour:Number(i),minute:Number(s),second:Number(a)}).toISOString();else return em()({year:Number(e),month:Number(n),date:Number(o),hour:Number(i),minute:Number(s),second:Number(a)}).toISOString()}}function eq(e,t,r){let n="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(n)?t.meta[n]:r&&r.meta?r.meta[n]:void 0}function eG(e,t,r){let n="string"==typeof e?e:e.name;return!!(t&&t.meta&&t.meta.hasOwnProperty(n)||r&&r.meta&&r.meta.hasOwnProperty(n))}function ez(e){return!e$(e)}function e$(e){return!!((null==e?void 0:e.jsonType)==="object"||(null==e?void 0:e.arrayDimensions)&&e.arrayDimensions>0)}function eJ(){return u.AssetModelUtil.getMetaItemDescriptors().filter(e=>ez(u.AssetModelUtil.getValueDescriptor(e.type)))}function eY(){return u.AssetModelUtil.getMetaItemDescriptors().filter(e=>e$(u.AssetModelUtil.getValueDescriptor(e.type)))}function eX(e){return("string"==typeof e&&(e=u.AssetModelUtil.getAssetDescriptor(e)),e)?eg.t("label.asset."+e.name,{defaultValue:eD(e.name)}):""}function eQ(e){if(!e)return eg.t("label.value.unknown",{defaultValue:"Unknown"});let t="string"==typeof e?e:e.name;return eg.t("label.value."+t,{defaultValue:eD(t||"")})}function eZ(e,t){if(e)return eg.t("label.allowedValue."+e,{defaultValue:t||eD(e||""),nsSeparator:!1})}function e0(e,t){let r="string"==typeof e?u.AssetModelUtil.getMetaItemDescriptor(e):e;return r?{name:r.name,type:r.type,value:t}:{name:typeof e,type:u.AssetModelUtil.resolveValueTypeFromValue(t),value:t}}function e1(e,t,r,n,o){return e5(e,t,r,n,!0,o)}function e2(e,t,r,n,o){return e5(e||e0(t,null),t,r,n,!1,o)}function e5(e,t,r,n,o,i){let s=ts("label",e,t,r,o),a="";if(s||(s=eq("label",e,t&&t.meta?t:void 0)),n&&(a=e9(ti("units",e,t,r,o))),!s){let r=e?e.name:t?"string"==typeof t?t:t.name:void 0;s=i||(r?eD(r):void 0)}return s?s+(a?" ("+a+")":""):a}function e3(e,t,r,n,o){return e8(e,t,r,n,!0,o)}function e6(e,t,r,n,o){return e8(e||e0(t,null),t,r,n,!1,o)}function e8(e,t,r,n,o,i){let s=e4(e?e.value:void 0,()=>ti("format",e,t,r,o),void 0,i),a=tt(e,t,r);return n&&a&&a.length&&(s=e9(ti("units",e,t,r,o),s)),s}function e4(e,t,r,n){let o="";if(null==e)o=n||"";else if("string"==typeof e)o=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){let n=t&&t();if(n&&0!==Object.keys(n).length)switch("number"==typeof e?n.asBoolean?e=!!e:n.asDate&&(e=new Date(e)):"boolean"==typeof e&&n.asNumber&&(e=+!!e),typeof e){case"number":o=new Intl.NumberFormat(r||eg.language,n).format(e);break;case"boolean":n.asOnOff&&(o=e?eg.t("on"):eg.t("off")),n.asOpenClosed&&(o=e?eg.t("open"):eg.t("closed")),n.asPressedReleased&&(o=e?eg.t("pressed"):eg.t("released"));break;case"object":if(n.momentJsFormat)o=em()(e).format(n.momentJsFormat);else if(n.iso8601)o=e.toISOString();else if(n.week){let t=eB(e);o="2-digit"===n.week?String(t).padStart(2,"0"):Number(t).toString(10)}else o=new Intl.DateTimeFormat(r||eg.language,n).format(e)}else o=Object(e).toString()}return o}function e9(e,t){if(!e)return"";t||(t="");let r=e.map((e,r)=>{if(3!==e.length||e.toUpperCase()!==e)return eg.t(["units."+e,"or:units."+e]);{let n=new Intl.NumberFormat(eg.language,{currency:e,style:"currency"}).formatToParts();if(0!==r||"currency"!==n[0].type)return"currency"===n[0].type?n[0].value:n[n.length-1].value;if(!t)return n[0].value;t=n[0].value+t}}).join("");return t.length>0?t+" "+r:r}function e7(e,t,r){return ti("constraints",e,t,r,!0)}function te(e,t,r){return ti("constraints",e||e0(t,null),t,r,!1)}function tt(e,t,r){return ti("units",e,t,r,!0)}function tr(e,t,r){return ti("units",e||e0(t,null),t,r,!1)}function tn(e,t,r){return ti("format",e,t,r,!0)}function to(e,t,r){return ti("format",e||e0(t,null),t,r,!1)}function ti(e,t,r,n,o){let i,s=[],a=ts(e,t&&"string"==typeof t?t:t?t.name:r?"string"==typeof r?r:r.name:void 0,r,n,o);if(a&&(i=JSON.parse(a)))if("format"!==e)return i;else s.push(i);if(t&&t.meta&&(i=eq(e,t,r)))if("format"!==e)return i;else s.push(i);if(r&&"string"!=typeof r&&r.hasOwnProperty(e)){if(i=r[e],"format"!==e)return i;s.push(i)}if(r&&r.type){if(i=u.AssetModelUtil.getValueDescriptor(r.type)[e],"format"!==e)return i;s.push(i)}if("format"!==e||0===s.length)return i;let c={};return s.reverse().forEach(e=>{c=Object.assign(Object.assign({},c),e)}),c}function ts(e,t,r,n,o,i){let s;if(t?s="string"==typeof t?t:t.name:r&&(s="string"==typeof r?r:r.name),!s)return;let a=[],c=e+"."+(o?"attribute":"meta")+".";if(n&&a.push(c+n+"."+s),r&&"string"!=typeof r&&(a.push(c+r.type+"."+s),a.push(c+r.type)),a.push(c+s),a.length>0)return eg.t(a,{defaultValue:i||""})}function ta(e,t){let r=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[r];else{let n=e.attributes[r];n&&(n.value=t.value,n.timestamp=t.timestamp)}return Object.assign({},e)}function tc(e){return new Promise((t,r)=>{let n=document.createElement("script");n.type="text/javascript",n.src=e,n.addEventListener("load",e=>t(e),!1),n.addEventListener("error",e=>r(e),!1),document.body.appendChild(n)})}function tl(e){return(t,r)=>{let n=e(t),o=e(r);return n||o?n&&!o?1:!n&&o?-1:n-o:0}}function tu(e){return(t,r)=>{let n=e(t),o=e(r);return n||o?n&&!o?1:!n&&o?-1:n.localeCompare(o):0}}function tf(e,t){let r=new ew;return e.dispatchEvent(t),window.setTimeout(()=>{r.resolve(t.detail)}),r.promise}function tp(e){return new Promise((t,r)=>{let n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)},n.onerror=e=>{r(e)}})}function td(){return"function"==typeof crypto.randomUUID?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}class th{constructor(e){e&&Object.assign(this,e)}matches(e){var t,r,n,o,i,s,a;if((null==(t=this.ids)?void 0:t.length)&&(!e.id||!this.ids.includes(e.id))||(null==(r=this.types)?void 0:r.length)&&(!e.type||!this.types.includes(e.type))||(null==(n=this.realm)?void 0:n.name)&&e.realm!==this.realm.name||(null==(o=this.parents)?void 0:o.length)&&!this.parents.some(t=>!t.id||e.parentId===t.id))return!1;if(null==(i=this.paths)?void 0:i.length){let t=null!=(s=e.path)?s:[];if(!this.paths.some(e=>{var r;return(null!=(r=e.path)?r:[]).every((e,r)=>t[r]===e)}))return!1}return(null==(a=this.names)||!a.length||!!this.names.every(t=>th._evalValuePredicate(e.name,t)))&&(!this.attributes||th._evalGroup(e,this.attributes))}static getUnsupportedFields(e){return Object.keys(e).filter(e=>!th._SUPPORTED_FIELDS.has(e))}collectAttributeNames(){return this.attributes?th._collectNames(this.attributes):[]}static _evalValuePredicate(e,t){var r;switch(t.predicateType){case"string":{let n;if(null==e)return!1;let o=!1!==t.caseSensitive?String(e):String(e).toLowerCase(),i=!1!==t.caseSensitive?t.value:null==(r=t.value)?void 0:r.toLowerCase();switch(t.match){case"BEGIN":n=o.startsWith(i);break;case"END":n=o.endsWith(i);break;case"CONTAINS":n=o.includes(i);break;default:n=o===i}return t.negate?!n:n}case"boolean":return e===t.value;case"number":{let r;if("number"!=typeof e)return!1;switch(t.operator){case"GREATER_THAN":r=e>t.value;break;case"GREATER_EQUALS":r=e>=t.value;break;case"LESS_THAN":r=e<t.value;break;case"LESS_EQUALS":r=e<=t.value;break;case"BETWEEN":r=e>=t.value&&e<=t.rangeValue;break;default:r=e===t.value}return t.negate?!r:r}}return!1}static _evalPredicate(e,t){var r,n;let o=null==(r=t.name)?void 0:r.value;if(!o)return!0;let i=null==(n=e.attributes)?void 0:n[o];if(!i)return!!t.negated;let s=!t.value||th._evalValuePredicate(i.value,t.value);return t.negated?!s:s}static _evalGroup(e,t){var r,n,o;let i=null!=(r=t.operator)?r:"AND",s=[...(null!=(n=t.items)?n:[]).map(t=>th._evalPredicate(e,t)),...(null!=(o=t.groups)?o:[]).map(t=>th._evalGroup(e,t))];return!s.length||("OR"===i?s.some(Boolean):s.every(Boolean))}static _collectNames(e){var t,r;return[...(null!=(t=e.items)?t:[]).map(e=>{var t;return null==(t=e.name)?void 0:t.value}).filter(e=>!!e),...(null!=(r=e.groups)?r:[]).flatMap(e=>th._collectNames(e))]}}th._SUPPORTED_FIELDS=new Set(["ids","types","names","parents","paths","realm","attributes"]);var tg=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};let ty=s(4461);class tv{constructor(e,t,r){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=e,this._autoEnable=t,this._enableCompleteCallback=r,window.OpenRemoteConsole=this;let n=new URLSearchParams(window.location.search),o=n.get("consoleName"),i=n.get("consoleVersion"),s=n.get("consolePlatform"),a=n.get("consoleProviders"),c=n.get("consoleAutoEnable"),l=a&&a.length>0?a.split(" "):["push"];this._pendingProviderEnables=l;let u=tv._createConsoleRegistration(),f=window.localStorage.getItem(this._storageKey);if(f)try{let e=JSON.parse(f);e.id&&(u.id=e.id),e.name&&(u.name=e.name),e.providers&&(u.providers=e.providers),e.apps&&(u.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let p=u.providers;for(let e of(u.providers={},l)){let t=p&&p.hasOwnProperty(e)?p[e]:{enabled:!1,disabled:!1};u.providers[e]=t}let d=rc.getAppName();d.length>0&&0>u.apps.indexOf(d)&&u.apps.push(d),this._registration=u,o&&(u.name=o),i&&(u.version=i),s&&(u.platform=s),c&&(this._autoEnable="TRUE"===c||"true"===c)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return tg(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 e of Object.keys(this._registration.providers))yield this._initialiseProvider(e);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(e){console.error(e)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return tg(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let e=this._pendingProviderEnables.length-1;e>-1;e--){let t=this._pendingProviderEnables[e];yield this.enableProvider(t)}})}enableProvider(e,t){return tg(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(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: enabling provider '"+e+"'");let r={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},n=yield this.sendProviderMessage(r,!0);this._registration.providers[e].hasPermission=n.hasPermission,this._registration.providers[e].success=n.success,this._registration.providers[e].enabled=n.success,this._registration.providers[e].data=n.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration().catch(()=>void 0),this._callCompletedCallback())),n})}disableProvider(e){return tg(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(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: disabling provider '"+e+"'");let t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[e].disabled=!0,this._registration.providers[e].enabled=!1,t})}getProvider(e){return this._registration&&this._registration.providers?this._registration.providers[e]:void 0}sendProviderMessage(e,t){return tg(this,void 0,void 0,function*(){if("storage"!==e.provider&&!this._registration.providers.hasOwnProperty(e.provider))throw console.debug("Invalid console provider '"+e.provider+"'"),Error("Invalid console provider '"+e.provider+"'");if(!t)return void this._doSendProviderMessage(e);let r=e.provider+e.action;if(this._pendingProviderPromises[r])throw Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");let n=new ew,o=()=>{delete this._pendingProviderPromises[r],n.reject("No response from provider")};return this._pendingProviderPromises[r]=[n,window.setTimeout(o,5e3)],this._doSendProviderMessage(e),n.promise})}sendRegistration(){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),new Promise((e,t)=>{this._registrationTimer=window.setTimeout(()=>tg(this,void 0,void 0,function*(){this._registrationTimer=null,console.debug("Console: updating registration");try{yield this._sendRegistration(!0),e()}catch(e){console.error("Failed to register console",e),t(e)}}))})}_sendRegistration(e){return tg(this,void 0,void 0,function*(){this._normaliseRegistration();let t=!!this._registration.id;try{let e=yield rc.rest.api.ConsoleResource.register(this._registration);if(200!==e.status)throw Error("Failed to register console");this._registration=e.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem(this._storageKey,JSON.stringify(this._registration))}catch(r){if(e&&t&&tv._isStaleRegistrationResponse(r)){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 r}})}_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(e){let t=e&&e.response?e.response.status:void 0;return 403===t||409===t}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return tg(this,void 0,void 0,function*(){let t=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:e},!0);try{let e=yield Promise.race([t,new Promise((e,t)=>setTimeout(t,2e3))]);if(e&&e.value){let t=e.value;return"null"===t?void 0:t}}catch(e){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(e,t){this._providerMessageListeners[e.provider+e.action]=t}removeProviderMessageListener(e){delete this._providerMessageListeners[e.provider+e.action]}_postNativeShellMessage(e){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(e));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(e)}catch(e){console.error("Failed to send shell message towards console",e)}}_doSendGenericMessage(e,t){let r={type:e,data:t};this.isMobile?this._postNativeShellMessage(r):console.warn("Failed to send generic message to console.",r)}_doSendProviderMessage(e){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:e});else{if(!e.provider||!e.action)return;switch(e.provider.trim().toUpperCase()){case"PUSH":switch(e.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 '"+e.provider+"' and action '"+e.action+"'")}break;case"STORAGE":switch(e.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 t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'store' action requires a `key`");null===e.value?window.localStorage.removeItem(t):window.localStorage.setItem(t,JSON.stringify(e.value))}break;case"RETRIEVE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'retrieve' action requires a `key`");let r=window.localStorage.getItem(t);if(null!==r)try{r=JSON.parse(r)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:r}))}break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;default:console.error("Unsupported provider: "+e.provider)}}}_handleProviderResponse(e){if(!e)return;let t=JSON.parse(e),r=t.provider,n=t.action,o=this._pendingProviderPromises[r+n];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[r+n],o[0].resolve(t));let i=this._providerMessageListeners[r+n];i&&i(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:ty.name,version:ty.version,platform:ty.os.toString(),apps:[],model:((ty.manufacturer?ty.manufacturer+" ":"")+(ty.product?ty.product:"")).trim()}}_initialiseProvider(e){return tg(this,void 0,void 0,function*(){let t;console.debug("Console: initialising provider '"+e+"'");try{t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_INIT"},!0),this._registration.providers[e].version=t.version,this._registration.providers[e].requiresPermission=t.requiresPermission,this._registration.providers[e].hasPermission=t.hasPermission,this._registration.providers[e].success=t.success,this._registration.providers[e].enabled=t.enabled,this._registration.providers[e].disabled=t.disabled,this._registration.providers[e].data=t.data}catch(e){console.error(e),t={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(t.success||(console.debug("Provider initialisation failed: '"+e+"'"),t.disabled=!0,this._registration.providers[e].disabled=!0),t.disabled||t.enabled){let t=this._pendingProviderEnables.indexOf(e);t>=0&&this._pendingProviderEnables.splice(t,1)}})}}var tb=s(9207),tm=s.n(tb),t_=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};(t=o||(o={})).DISCONNECTED="DISCONNECTED",t.CONNECTED="CONNECTED",t.CONNECTING="CONNECTING";let tS="SUBSCRIBED:",tw="UNAUTHORIZED:",tk="TRIGGERED:",tO="EVENT:";class tE{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=tx.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=o.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(e){this._statusCallbacks.push(e)}unsubscribeStatusChange(e){ej(this._statusCallbacks,e)}connect(){return(console.debug("Attempting to connect to events:",this.endpointUrl),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===o.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(o.CONNECTING),this._connectingDeferred=new ew,this._doConnect().then(e=>{if(this._connectingDeferred){let t=this._connectingDeferred;e?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=tx.MIN_RECONNECT_DELAY,this._onStatusChanged(o.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):console.debug("Failed to connect to event service: "+this.endpointUrl),t.resolve(e)}}).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!==o.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let r={eventSubscription:e,callback:t,deferred:new ew};return null!=this._pendingSubscription||this._status!==o.CONNECTED?(this._queuedSubscriptions.push(r),r.deferred.promise):(this._pendingSubscription=r,this._doSubscribe(e).then(e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();let r=t.deferred;t.deferred=null,r&&r.resolve(e)}},e=>{if(console.error(e),this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let r=t.deferred;t.deferred=null,r&&r.reject(e)}}),this._pendingSubscription.deferred.promise)}unsubscribe(e){return t_(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(e))return void this._doUnsubscribe(e);if(this._assetEventCallbackMap.delete(e)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let e=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(e)}return}if(this._attributeEventCallbackMap.delete(e)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}return}})}sendEvent(e){this._status===o.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==o.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,r){return t_(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,o="AssetEvent"+tE._subscriptionCounter++;if(!this._assetEventPromise){let e;rc.authenticated||(e={filterType:"asset",realm:rc.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(o,e=>{let t=e.asset.id;n?n.find(e=>t===e)&&r(e):e.asset.realm===rc.displayRealm&&r(e)}),this._assetEventPromise.then(()=>{try{if(n&&t){let e={messageID:"read-assets:"+n.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:n}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(o)&&e.assets.forEach(e=>{r({eventType:"asset",asset:e,cause:"READ"})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),o&&this.unsubscribe(o),t}return o})})}subscribeAttributeEvents(e,t,r){return t_(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0],o=n?e.map(e=>e.id):e,i=n?e:void 0,s="AttributeEvent"+tE._subscriptionCounter++;if(!this._attributeEventPromise){let e;rc.authenticated||(e={filterType:"asset",realm:rc.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let a=t=>{let i=t.ref;n?e.forEach(e=>{i.id===e.id&&i.name===e.name&&r(t)}):o?o.find(e=>i.id===e)&&r(t):t.realm===rc.displayRealm&&r(t)};return this._attributeEventCallbackMap.set(s,a),this._attributeEventPromise.then(()=>{try{if(t&&o){let e={messageID:"read-assets:"+o.join(",")+":"+s,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(s)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,r])=>{(!i||i.find(r=>r.id===e.id&&r.name===t))&&a({eventType:"attribute",timestamp:r.timestamp,value:r.value,ref:{id:e.id,name:t}})})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),s&&this.unsubscribe(s),t}return s})})}_processNextSubscription(){this._status===o.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then(t=>{let r=e.deferred;e.deferred=null,r&&r.resolve(t)},t=>{let r=e.deferred;e.deferred=null,r&&r.reject(t)})},0)}_onStatusChanged(e){e!==this._status&&(console.debug("Event provider status changed: "+e),this._status=e,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(t=>t(e))},0))}_onMessageReceived(e,t){let r=this._subscriptionMap.get(e);r&&r.callback(t)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let e in this._subscriptionMap)this._subscriptionMap.has(e)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(e));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===o.CONNECTED&&this._onStatusChanged(o.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(o.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<tx.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(tx.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}tE.MIN_RECONNECT_DELAY=0,tE.MAX_RECONNECT_DELAY=3e4,tE._subscriptionCounter=0;class tx extends tE{get endpointUrl(){return this._endpointUrl}constructor(e){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(e.startsWith("https:")?"wss":"ws")+"://"+e.substr(e.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let e=this._endpointUrl+"?Realm="+rc.config.realm;return this._connectDeferred=new ew,(rc.authenticated?rc.retrieveAuthorizationHeader().then(t=>{e+="&Authorization="+t}):Promise.resolve()).finally(()=>{this._webSocket=new WebSocket(e),this._webSocket.onopen=e=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(console.error("Event provider error:",e),this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.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 e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=e=>{let t=e.data;if(t&&t.startsWith(tS)){let e=JSON.parse(t.substring(tS.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&r.resolve(e.subscriptionId)}else if(t.startsWith(tw)){let e=JSON.parse(t.substring(tw.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&(console.warn("Unauthorized event subscription: "+JSON.stringify(e,null,2)),r.reject("Unauthorized"))}else if(t.startsWith(tk)){let e=JSON.parse(t.substring(tk.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(tO)){let e=JSON.parse(t.substring(tO.length));if(e.messageID){let t=this._repliesDeferred.get(e.messageID);this._repliesDeferred.delete(e.messageID),t&&t.resolve(e)}}}}),this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var e;null==(e=this._webSocket)||e.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(e){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new ew,e.subscriptionId||(e.subscriptionId=tx._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(e)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(e){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:e}))}_doSend(e){let t=tO+JSON.stringify(e);this._webSocket.send(t)}_doSendWithReply(e){if(e.messageID||(e.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(e.messageID))return Promise.reject("There's already a pending send and reply with this ID");let t=new ew;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(tO+JSON.stringify(e)),t.promise}}tx._subscriptionCounter=1;let tA=["__proto__","constructor","prototype"];function tP(e){return!("string"!=typeof e||0===e.length||e.length>128||tA.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function tR(e){return!(!tP(e)||e.indexOf("/")>-1)}let tC={lng:tR,ns:function(e){return tP(e)}};function tI(e){return"string"!=typeof e?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function tN(){return"function"==typeof XMLHttpRequest||"object"==typeof XMLHttpRequest}let tT=/\{\{(.+?)\}\}/g;function tj(e,t){let r=!1,n=e.replace(tT,(e,n)=>{let o=n.trim();if(tA.indexOf(o)>-1)return e;let i=t[o];if(null==i)return e;let s=tC[o]||tR,a=String(i).split("+");for(let t of a)if(!s(t))return r=!0,e;return a.join("+")});return r?null:n}let tL="u">typeof globalThis?globalThis:"u">typeof global?global:"u">typeof window?window:void 0;"function"==typeof fetch?e=fetch:tL&&"function"==typeof tL.fetch&&(e=tL.fetch);let tD=tN()&&tL?tL.XMLHttpRequest:void 0,tU="function"==typeof ActiveXObject&&tL?tL.ActiveXObject:void 0,tM=["__proto__","constructor","prototype"],tF=(e,t)=>{if(t&&"object"==typeof t){let r="";for(let e of Object.keys(t))tM.indexOf(e)>-1||(r+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]));if(!r)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+r.slice(1)}return e},tB=(t,r,n,o)=>{let i=e=>{if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(o){let e=o(t,r);if(e instanceof Promise)return void e.then(i).catch(n)}"function"==typeof fetch?fetch(t,r).then(i).catch(n):e(t,r).then(i).catch(n)},tV=(t,r,n,o)=>{if("function"==typeof n&&(o=n,n=void 0),o=o||(()=>{}),e&&0!==r.indexOf("file:")){var i=r,s=n,a=o;t.queryStringParams&&(i=tF(i,t.queryStringParams));let e={..."function"==typeof t.customHeaders?t.customHeaders():t.customHeaders};"u"<typeof window&&"u">typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(e["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),s&&(e["Content-Type"]="application/json");let c="function"==typeof t.requestOptions?t.requestOptions(s):t.requestOptions,l={method:s?"POST":"GET",body:s?t.stringify(s):void 0,headers:e,...t._omitFetchOptions?{}:c},u="function"==typeof t.alternateFetch&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{tB(i,l,a,u)}catch(e){if(!c||0===Object.keys(c).length||!e.message||0>e.message.indexOf("not implemented"))return a(e);try{Object.keys(c).forEach(e=>{delete l[e]}),tB(i,l,a,u),t._omitFetchOptions=!0}catch(e){a(e)}}return}if(tN()||"function"==typeof ActiveXObject){var c=r,l=n,u=o;l&&"object"==typeof l&&(l=tF("",l).slice(1)),t.queryStringParams&&(c=tF(c,t.queryStringParams));try{let e=tD?new tD:new tU("MSXML2.XMLHTTP.3.0");e.open(l?"POST":"GET",c,1),t.crossDomain||e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.withCredentials=!!t.withCredentials,l&&e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.overrideMimeType&&e.overrideMimeType("application/json");let r=t.customHeaders;if(r="function"==typeof r?r():r)for(let t of Object.keys(r))tM.indexOf(t)>-1||e.setRequestHeader(t,r[t]);e.onreadystatechange=()=>{e.readyState>3&&u(e.status>=400?e.statusText:null,{status:e.status,data:e.responseText})},e.send(l)}catch(e){console&&console.log(e)}return}o(Error("No fetch and no xhr implementation found!"))};var tK=class{constructor(e,t={},r={}){this.services=e,this.options=t,this.allOptions=r,this.type="backend",this.init(e,t,r)}init(e,t={},r={}){if(this.services=e,this.options={...{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,r)=>({[t]:r||""}),parseLoadPayload:(e,t)=>void 0,request:tV,reloadInterval:"u"<typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}},...this.options||{},...t},this.allOptions=r,this.services&&this.options.reloadInterval){let e=setInterval(()=>this.reload(),this.options.reloadInterval);"object"==typeof e&&"function"==typeof e.unref&&e.unref()}}readMulti(e,t,r){this._readAny(e,e,t,t,r)}read(e,t,r){this._readAny([e],e,[t],t,r)}_readAny(e,t,r,n,o){var i,s;let a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,r)),(a=(s=i=a)&&"function"==typeof s.then?i:Promise.resolve(i)).then(i=>{if(!i)return o(null,{});let s=tj(i,{lng:e.join("+"),ns:r.join("+")});if(null==s)return o(Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+e.map(tI).join(", ")+"] namespaces=["+r.map(tI).join(", ")+"]"),!1);this.loadUrl(s,o,t,n)})}loadUrl(e,t,r,n){let o=this.options.parseLoadPayload("string"==typeof r?[r]:r,"string"==typeof n?[n]:n),i=tI(function(e){if("string"!=typeof e||0===e.length)return e;try{let t=new URL(e);if(t.username||t.password)return t.username="",t.password="",t.toString();return e}catch(t){return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(e));this.options.request(this.options,e,o,(e,o)=>{let s,a;if(o&&(o.status>=500&&o.status<600||!o.status))return t("failed loading "+i+"; status code: "+o.status,!0);if(o&&o.status>=400&&o.status<500)return t("failed loading "+i+"; status code: "+o.status,!1);if(!o&&e&&e.message){let r=e.message.toLowerCase();if(["failed","fetch","network","load"].find(e=>r.indexOf(e)>-1))return t("failed loading "+i+": "+tI(e.message),!0)}if(e)return t(e,!1);try{s="string"==typeof o.data?this.options.parse(o.data,r,n):o.data}catch(e){a="failed parsing "+i+" to json"}if(a)return t(a,!1);t(null,s)})}create(e,t,r,n,o){if(!this.options.addPath)return;"string"==typeof e&&(e=[e]);let i=this.options.parsePayload(t,r,n),s=0,a=[],c=[];e.forEach(r=>{let n=this.options.addPath;"function"==typeof this.options.addPath&&(n=this.options.addPath(r,t));let l=tj(n,{lng:r,ns:t});if(null==l){s+=1,o&&s===e.length&&o(a,c);return}this.options.request(this.options,l,i,(t,r)=>{s+=1,a.push(t),c.push(r),s===e.length&&"function"==typeof o&&o(a,c)})})}reload(){let{backendConnector:e,languageUtils:t,logger:r}=this.services,n=e.language;if(n&&"cimode"===n.toLowerCase())return;let o=[],i=e=>{t.toResolveHierarchy(e).forEach(e=>{0>o.indexOf(e)&&o.push(e)})};i(n),this.allOptions.preload&&this.allOptions.preload.forEach(e=>i(e)),o.forEach(t=>{this.allOptions.ns.forEach(n=>{e.read(t,n,"read",null,null,(o,i)=>{o&&r.warn(`loading namespace ${n} for language ${t} failed`,o),!o&&i&&r.log(`loaded namespace ${n} for language ${t}`,i),e.loaded(`${t}|${n}`,o,i)})})})}};tK.type="backend";var tH=s(9368),tW=s(4954);class tq extends Error{}function tG(e,t){let r;if("string"!=typeof e)throw new tq("Invalid token specified: must be a string");t||(t={});let n=+(!0!==t.header),o=e.split(".")[n];if("string"!=typeof o)throw new tq(`Invalid token specified: missing part #${n+1}`);try{r=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(o)}catch(e){throw new tq(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new tq(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(tq.prototype.name="InvalidTokenError","u"<typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function tz(e){if(!(this instanceof tz))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,r,n=this,o=[],i={enable:!0,callbackList:[],interval:5},s=document.getElementsByTagName("script"),a=0;a<s.length;a++)(-1!==s[a].src.indexOf("keycloak.js")||-1!==s[a].src.indexOf("keycloak.min.js"))&&-1!==s[a].src.indexOf("version=")&&(n.iframeVersion=s[a].src.substring(s[a].src.indexOf("version=")+8).split("&")[0]);var c=!0,l=A(console.info),u=A(console.warn);function f(e,t){for(var r=function(e){var t=null,r=window.crypto||window.msCrypto;if(r&&r.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),r.getRandomValues(t),t;t=Array(e);for(var n=0;n<t.length;n++)t[n]=Math.floor(256*Math.random());return t}(e),n=Array(e),o=0;o<e;o++)n[o]=t.charCodeAt(r[o]%t.length);return String.fromCharCode.apply(null,n)}function p(){return void 0===n.authServerUrl?void 0:"/"==n.authServerUrl.charAt(n.authServerUrl.length-1)?n.authServerUrl+"realms/"+encodeURIComponent(n.realm):n.authServerUrl+"/realms/"+encodeURIComponent(n.realm)}function d(e,t){var r=e.code,o=e.error,i=e.prompt,s=new Date().getTime();if(e.kc_action_status&&n.onActionUpdate&&n.onActionUpdate(e.kc_action_status),o){if("none"!=i)if(e.error_description&&"authentication_expired"===e.error_description)n.login(e.loginOptions);else{var a={error:o,error_description:e.error_description};n.onAuthError&&n.onAuthError(a),t&&t.setError(a)}else t&&t.setSuccess();return}if("standard"!=n.flow&&(e.access_token||e.id_token)&&d(e.access_token,null,e.id_token,!0),"implicit"!=n.flow&&r){var u="code="+r+"&grant_type=authorization_code",f=n.endpoints.token(),p=new XMLHttpRequest;p.open("POST",f,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u+="&client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(u+="&code_verifier="+e.pkceCodeVerifier),p.withCredentials=!0,p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status){var e=JSON.parse(p.responseText);d(e.access_token,e.refresh_token,e.id_token,"standard"===n.flow),S()}else n.onAuthError&&n.onAuthError(),t&&t.setError()},p.send(u)}function d(r,o,i,a){g(r,o,i,s=(s+new Date().getTime())/2),c&&n.idTokenParsed&&n.idTokenParsed.nonce!=e.storedNonce?(l("[KEYCLOAK] Invalid nonce, clearing token"),n.clearToken(),t&&t.setError()):a&&(n.onAuthSuccess&&n.onAuthSuccess(),t&&t.setSuccess())}}function h(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function g(e,t,r,o){if(n.tokenTimeoutHandle&&(clearTimeout(n.tokenTimeoutHandle),n.tokenTimeoutHandle=null),t?(n.refreshToken=t,n.refreshTokenParsed=tG(t)):(delete n.refreshToken,delete n.refreshTokenParsed),r?(n.idToken=r,n.idTokenParsed=tG(r)):(delete n.idToken,delete n.idTokenParsed),e){if(n.token=e,n.tokenParsed=tG(e),n.sessionId=n.tokenParsed.sid,n.authenticated=!0,n.subject=n.tokenParsed.sub,n.realmAccess=n.tokenParsed.realm_access,n.resourceAccess=n.tokenParsed.resource_access,o&&(n.timeSkew=Math.floor(o/1e3)-n.tokenParsed.iat),null!=n.timeSkew&&(l("[KEYCLOAK] Estimated time difference between browser and server is "+n.timeSkew+" seconds"),n.onTokenExpired)){var i=(n.tokenParsed.exp-new Date().getTime()/1e3+n.timeSkew)*1e3;l("[KEYCLOAK] Token expires in "+Math.round(i/1e3)+" s"),i<=0?n.onTokenExpired():n.tokenTimeoutHandle=setTimeout(n.onTokenExpired,i)}}else delete n.token,delete n.tokenParsed,delete n.subject,delete n.realmAccess,delete n.resourceAccess,n.authenticated=!1}function y(){var e="0123456789abcdef",t=f(36,e).split("");return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function v(e){var t=function(e){switch(n.flow){case"standard":t=["code","state","session_state","kc_action_status","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}t.push("error"),t.push("error_description"),t.push("error_uri");var t,r,o,i=e.indexOf("?"),s=e.indexOf("#");if("query"===n.responseMode&&-1!==i?(r=e.substring(0,i),""!==(o=b(e.substring(i+1,-1!==s?s:e.length),t)).paramsString&&(r+="?"+o.paramsString),-1!==s&&(r+=e.substring(s))):"fragment"===n.responseMode&&-1!==s&&(r=e.substring(0,s),""!==(o=b(e.substring(s+1),t)).paramsString&&(r+="#"+o.paramsString)),o&&o.oauthParams){if("standard"===n.flow||"hybrid"===n.flow){if((o.oauthParams.code||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=r,o.oauthParams}else if("implicit"===n.flow&&(o.oauthParams.access_token||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=r,o.oauthParams}}(e);if(t){var o=r.get(t.state);return o&&(t.valid=!0,t.redirectUri=o.redirectUri,t.storedNonce=o.nonce,t.prompt=o.prompt,t.pkceCodeVerifier=o.pkceCodeVerifier,t.loginOptions=o.loginOptions),t}}function b(e,t){for(var r=e.split("&"),n={paramsString:"",oauthParams:{}},o=0;o<r.length;o++){var i=r[o].indexOf("="),s=r[o].slice(0,i);-1!==t.indexOf(s)?n.oauthParams[s]=r[o].slice(i+1):(""!==n.paramsString&&(n.paramsString+="&"),n.paramsString+=r[o])}return n}function m(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}function _(){var e=m();if(!i.enable||i.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");i.iframe=t,t.onload=function(){var t=n.endpoints.authorize();"/"===t.charAt(0)?i.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):i.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var r=n.endpoints.checkSessionIframe();return t.setAttribute("src",r),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t),window.addEventListener("message",function(e){if(e.origin===i.iframeOrigin&&i.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&n.clearToken();for(var t=i.callbackList.splice(0,i.callbackList.length),r=t.length-1;r>=0;--r){var o=t[r];"error"==e.data?o.setError():o.setSuccess("unchanged"==e.data)}}},!1),e.promise}function S(){i.enable&&n.token&&setTimeout(function(){w().then(function(e){e&&S()})},1e3*i.interval)}function w(){var e=m();if(i.iframe&&i.iframeOrigin){var t=n.clientId+" "+(n.sessionId?n.sessionId:"");i.callbackList.push(e);var r=i.iframeOrigin;1==i.callbackList.length&&i.iframe.contentWindow.postMessage(t,r)}else e.setSuccess();return e.promise}function k(){var e,t,r,o=m();if(i.enable||n.silentCheckSsoRedirectUri){var s=document.createElement("iframe");s.setAttribute("src",n.endpoints.thirdPartyCookiesIframe()),s.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),s.setAttribute("title","keycloak-3p-check-iframe"),s.style.display="none",document.body.appendChild(s);var a=function(e){s.contentWindow===e.source&&("supported"===e.data||"unsupported"===e.data)&&("unsupported"===e.data&&(u("[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"),i.enable=!1,n.silentCheckSsoFallback&&(n.silentCheckSsoRedirectUri=!1)),document.body.removeChild(s),window.removeEventListener("message",a),o.setSuccess())};window.addEventListener("message",a,!1)}else o.setSuccess();return e=o.promise,t=n.messageReceiveTimeout,r=null,Promise.race([e,new Promise(function(e,n){r=setTimeout(function(){n({error:"Timeout when waiting for 3rd party check iframe message."})},t)})]).finally(function(){clearTimeout(r)})}function O(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(n.createLoginUrl(e)),m().promise},logout:async function(e){if("GET"===(e?.logoutMethod??n.logoutMethod))return void window.location.replace(n.createLogoutUrl(e));let r=n.createLogoutUrl(e),o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:n.idToken,client_id:n.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(o.redirected){window.location.href=o.url;return}if(o.ok)return void window.location.reload();throw Error("Logout failed, request returned an error code.")},register:function(e){return window.location.assign(n.createRegisterUrl(e)),m().promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.location.href=e;else throw"Not supported by the OIDC server";return m().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:location.href}};if("cordova"==e){i.enable=!1;var r=function(e,t,r){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,r):window.open(e,t,r)},o=function(e){var t=e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce(function(t,r){return t[r]=e.cordovaOptions[r],t},{}):{};return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),Object.keys(t).reduce(function(e,r){return e.push(r+"="+t[r]),e},[]).join(",")},s=function(){return n.redirectUri||"http://localhost"};return{login:function(e){var t=m(),i=o(e),a=r(n.createLoginUrl(e),"_blank",i),c=!1,l=!1,u=function(){l=!0,a.close()};return a.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&(d(v(e.url),t),u(),c=!0)}),a.addEventListener("loaderror",function(e){c||(0==e.url.indexOf(s())?(d(v(e.url),t),u(),c=!0):(t.setError(),u()))}),a.addEventListener("exit",function(e){l||t.setError({reason:"closed_by_user"})}),t.promise},logout:function(e){var t,o=m(),i=r(n.createLogoutUrl(e),"_blank","location=no,hidden=yes,clearcache=yes");return i.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&i.close()}),i.addEventListener("loaderror",function(e){0==e.url.indexOf(s())||(t=!0),i.close()}),i.addEventListener("exit",function(e){t?o.setError():(n.clearToken(),o.setSuccess())}),o.promise},register:function(e){var t=m(),i=r(n.createRegisterUrl(),"_blank",o(e));return i.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&(i.close(),d(v(e.url),t))}),t.promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e){var t=r(e,"_blank","location=no");t.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&t.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(e){return s()}}}if("cordova-native"==e)return i.enable=!1,{login:function(e){var t=m(),r=n.createLoginUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),d(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},logout:function(e){var t=m(),r=n.createLogoutUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),n.clearToken(),t.setSuccess()}),window.cordova.plugins.browsertab.openUrl(r),t.promise},register:function(e){var t=m(),r=n.createRegisterUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),d(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.cordova.plugins.browsertab.openUrl(e);else throw"Not supported by the OIDC server"},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}n.init=function(o){if(n.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(n.didInitialize=!0,n.authenticated=!1,r=function(){try{return new E}catch(e){}return new x}(),t=o&&["default","cordova","cordova-native"].indexOf(o.adapter)>-1?O(o.adapter):o&&"object"==typeof o.adapter?o.adapter:window.Cordova||window.cordova?O("cordova"):O(),o){if(void 0!==o.useNonce&&(c=o.useNonce),void 0!==o.checkLoginIframe&&(i.enable=o.checkLoginIframe),o.checkLoginIframeInterval&&(i.interval=o.checkLoginIframeInterval),"login-required"===o.onLoad&&(n.loginRequired=!0),o.responseMode)if("query"===o.responseMode||"fragment"===o.responseMode)n.responseMode=o.responseMode;else throw"Invalid value for responseMode";if(o.flow){switch(o.flow){case"standard":n.responseType="code";break;case"implicit":n.responseType="id_token token";break;case"hybrid":n.responseType="code id_token token";break;default:throw"Invalid value for flow"}n.flow=o.flow}if(null!=o.timeSkew&&(n.timeSkew=o.timeSkew),o.redirectUri&&(n.redirectUri=o.redirectUri),o.silentCheckSsoRedirectUri&&(n.silentCheckSsoRedirectUri=o.silentCheckSsoRedirectUri),"boolean"==typeof o.silentCheckSsoFallback?n.silentCheckSsoFallback=o.silentCheckSsoFallback:n.silentCheckSsoFallback=!0,void 0!==o.pkceMethod){if("S256"!==o.pkceMethod&&!1!==o.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${o.pkceMethod}.`);n.pkceMethod=o.pkceMethod}else n.pkceMethod="S256";"boolean"==typeof o.enableLogging?n.enableLogging=o.enableLogging:n.enableLogging=!1,"POST"===o.logoutMethod?n.logoutMethod="POST":n.logoutMethod="GET","string"==typeof o.scope&&(n.scope=o.scope),"string"==typeof o.acrValues&&(n.acrValues=o.acrValues),"number"==typeof o.messageReceiveTimeout&&o.messageReceiveTimeout>0?n.messageReceiveTimeout=o.messageReceiveTimeout:n.messageReceiveTimeout=1e4}n.responseMode||(n.responseMode="fragment"),n.responseType||(n.responseType="code",n.flow="standard");var s=m(),a=m();a.promise.then(function(){n.onReady&&n.onReady(n.authenticated),s.setSuccess(n.authenticated)}).catch(function(e){s.setError(e)});var l=function(){var t=m();function r(e){e?n.endpoints={authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:n.endpoints={authorize:function(){return p()+"/protocol/openid-connect/auth"},token:function(){return p()+"/protocol/openid-connect/token"},logout:function(){return p()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=p()+"/protocol/openid-connect/login-status-iframe.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=p()+"/protocol/openid-connect/3p-cookies/step1.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},register:function(){return p()+"/protocol/openid-connect/registrations"},userinfo:function(){return p()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(s=e):s="keycloak.json",s){var o=new XMLHttpRequest;o.open("GET",s,!0),o.setRequestHeader("Accept","application/json"),o.onreadystatechange=function(){if(4==o.readyState)if(200==o.status||h(o)){var e=JSON.parse(o.responseText);n.authServerUrl=e["auth-server-url"],n.realm=e.realm,n.clientId=e.resource,r(null),t.setSuccess()}else t.setError()},o.send()}else{if(!e.clientId)throw"clientId missing";n.clientId=e.clientId;var i=e.oidcProvider;if(i)if("string"==typeof i){var s,a="/"==i.charAt(i.length-1)?i+".well-known/openid-configuration":i+"/.well-known/openid-configuration",o=new XMLHttpRequest;o.open("GET",a,!0),o.setRequestHeader("Accept","application/json"),o.onreadystatechange=function(){4==o.readyState&&(200==o.status||h(o)?(r(JSON.parse(o.responseText)),t.setSuccess()):t.setError())},o.send()}else r(i),t.setSuccess();else{if(!e.url){for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++)if(c[l].src.match(/.*keycloak\.js/)){e.url=c[l].src.substr(0,c[l].src.indexOf("/js/keycloak.js"));break}}if(!e.realm)throw"realm missing";n.authServerUrl=e.url,n.realm=e.realm,r(null),t.setSuccess()}}return t.promise}();function u(){var e=function(e){e||(r.prompt="none"),o&&o.locale&&(r.locale=o.locale),n.login(r).then(function(){a.setSuccess()}).catch(function(e){a.setError(e)})},t=function(){var e=document.createElement("iframe"),t=n.createLoginUrl({prompt:"none",redirectUri:n.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var r=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(d(v(t.data),a),document.body.removeChild(e),window.removeEventListener("message",r))};window.addEventListener("message",r)},r={};switch(o.onLoad){case"check-sso":i.enable?_().then(function(){w().then(function(r){r?a.setSuccess():n.silentCheckSsoRedirectUri?t():e(!1)}).catch(function(e){a.setError(e)})}):n.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function f(){var e=v(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return _().then(function(){d(e,a)}).catch(function(e){a.setError(e)});o?o.token&&o.refreshToken?(g(o.token,o.refreshToken,o.idToken),i.enable?_().then(function(){w().then(function(e){e?(n.onAuthSuccess&&n.onAuthSuccess(),a.setSuccess(),S()):a.setSuccess()}).catch(function(e){a.setError(e)})}):n.updateToken(-1).then(function(){n.onAuthSuccess&&n.onAuthSuccess(),a.setSuccess()}).catch(function(e){n.onAuthError&&n.onAuthError(),o.onLoad?u():a.setError(e)})):o.onLoad?u():a.setSuccess():a.setSuccess()}return l.then(function(){var e,t;(e=m(),t=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",t),e.setSuccess())},document.addEventListener("readystatechange",t),t(),e.promise).then(k).then(f).catch(function(e){s.setError(e)})}),l.catch(function(e){s.setError(e)}),s.promise},n.login=function(e){return t.login(e)},n.createLoginUrl=function(e){var o,i=y(),s=y(),a=t.redirectUri(e),l={state:i,nonce:s,redirectUri:encodeURIComponent(a),loginOptions:e};e&&e.prompt&&(l.prompt=e.prompt),o=e&&"register"==e.action?n.endpoints.register():n.endpoints.authorize();var u=e&&e.scope||n.scope;u?-1===u.indexOf("openid")&&(u="openid "+u):u="openid";var p=o+"?client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+encodeURIComponent(a)+"&state="+encodeURIComponent(i)+"&response_mode="+encodeURIComponent(n.responseMode)+"&response_type="+encodeURIComponent(n.responseType)+"&scope="+encodeURIComponent(u);if(c&&(p=p+"&nonce="+encodeURIComponent(s)),e&&e.prompt&&(p+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(p+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(p+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(p+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(p+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(p+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr&&(p+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:e.acr}}))),(e&&e.acrValues||n.acrValues)&&(p+="&acr_values="+encodeURIComponent(e.acrValues||n.acrValues)),n.pkceMethod){var d=f(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");l.pkceCodeVerifier=d,p+="&code_challenge="+function(e,t){if("S256"!==e)throw TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return btoa(String.fromCodePoint(...new Uint8Array(tW.arrayBuffer(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(n.pkceMethod,d)+"&code_challenge_method="+n.pkceMethod}return r.add(l),p},n.logout=function(e){return t.logout(e)},n.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??n.logoutMethod))return n.endpoints.logout();var r=n.endpoints.logout()+"?client_id="+encodeURIComponent(n.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return n.idToken&&(r+="&id_token_hint="+encodeURIComponent(n.idToken)),r},n.register=function(e){return t.register(e)},n.createRegisterUrl=function(e){return e||(e={}),e.action="register",n.createLoginUrl(e)},n.createAccountUrl=function(e){var r=p(),o=void 0;return void 0!==r&&(o=r+"/account?referrer="+encodeURIComponent(n.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),o},n.accountManagement=function(){return t.accountManagement()},n.hasRealmRole=function(e){var t=n.realmAccess;return!!t&&t.roles.indexOf(e)>=0},n.hasResourceRole=function(e,t){if(!n.resourceAccess)return!1;var r=n.resourceAccess[t||n.clientId];return!!r&&r.roles.indexOf(e)>=0},n.loadUserProfile=function(){var e=p()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(n.profile=JSON.parse(t.responseText),r.setSuccess(n.profile)):r.setError())},t.send(),r.promise},n.loadUserInfo=function(){var e=n.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(n.userInfo=JSON.parse(t.responseText),r.setSuccess(n.userInfo)):r.setError())},t.send(),r.promise},n.isTokenExpired=function(e){if(!n.tokenParsed||!n.refreshToken&&"implicit"!=n.flow)throw"Not authenticated";if(null==n.timeSkew)return l("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=n.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+n.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},n.updateToken=function(e){var t=m();if(!n.refreshToken)return t.setError(),t.promise;e=e||5;var r=function(){var r=!1;if(-1==e?(r=!0,l("[KEYCLOAK] Refreshing token: forced refresh")):(!n.tokenParsed||n.isTokenExpired(e))&&(r=!0,l("[KEYCLOAK] Refreshing token: token expired")),r){var i="grant_type=refresh_token&refresh_token="+n.refreshToken,s=n.endpoints.token();if(o.push(t),1==o.length){var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.withCredentials=!0,i+="&client_id="+encodeURIComponent(n.clientId);var c=new Date().getTime();a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){l("[KEYCLOAK] Token refreshed"),c=(c+new Date().getTime())/2;var e=JSON.parse(a.responseText);g(e.access_token,e.refresh_token,e.id_token,c),n.onAuthRefreshSuccess&&n.onAuthRefreshSuccess();for(var t=o.pop();null!=t;t=o.pop())t.setSuccess(!0)}else{u("[KEYCLOAK] Failed to refresh token"),400==a.status&&n.clearToken(),n.onAuthRefreshError&&n.onAuthRefreshError();for(var t=o.pop();null!=t;t=o.pop())t.setError(!0)}},a.send(i)}}else t.setSuccess(!1)};return i.enable?w().then(function(){r()}).catch(function(e){t.setError(e)}):r(),t.promise},n.clearToken=function(){n.token&&(g(null,null,null),n.onAuthLogout&&n.onAuthLogout(),n.loginRequired&&n.login())};var E=function(){if(!(this instanceof E))return new E;function e(){for(var e=new Date().getTime(),t=0;t<localStorage.length;t++){var r=localStorage.key(t);if(r&&0==r.indexOf("kc-callback-")){var n=localStorage.getItem(r);if(n)try{var o=JSON.parse(n).expires;(!o||o<e)&&localStorage.removeItem(r)}catch(e){localStorage.removeItem(r)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var r="kc-callback-"+t,n=localStorage.getItem(r);return n&&(localStorage.removeItem(r),n=JSON.parse(n)),e(),n}},this.add=function(t){e();var r="kc-callback-"+t.state;t.expires=new Date().getTime()+36e5,localStorage.setItem(r,JSON.stringify(t))}},x=function(){if(!(this instanceof x))return new x;this.get=function(n){if(n){var o=t("kc-callback-"+n);if(r("kc-callback-"+n,"",e(-100)),o)return JSON.parse(o)}},this.add=function(t){r("kc-callback-"+t.state,JSON.stringify(t),e(60))},this.removeItem=function(t){r(t,"",e(-100))};var e=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},t=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},r=function(e,t,r){var n=e+"="+t+"; expires="+r.toUTCString()+"; ";document.cookie=n}};function A(e){return function(){n.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var t$=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};let tJ=e=>t=>class extends t{constructor(){super(...arguments),this._connectRequested=!1,this._status=o.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){e.getEventProvider()?this._connectRequested||(this._connectRequested=!0,e.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect()):console.log("No event provider available so cannot subscribe")}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,e.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return t$(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&e.getEventProvider().status===o.CONNECTED}_onEventProviderStatusChanged(e){switch(e){case o.DISCONNECTED:this._onEventsDisconnect();break;case o.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return t$(this,void 0,void 0,function*(){let t=!!this._attributeRefs,r=!!this._assetIds,n=this._attributeRefs?this._attributeRefs:this._assetIds;if(n&&n.length>0){if(this._subscriptionIds=[],r){let t=yield e.getEventProvider().subscribeAssetEvents(n,!0,e=>this._onEvent(e)),r=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eN(n,r))return void e.getEventProvider().unsubscribe(t);this._subscriptionIds.push(t)}let o=yield e.getEventProvider().subscribeAttributeEvents(n,t,e=>this._onEvent(e)),i=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eN(n,i))return void e.getEventProvider().unsubscribe(o);this._subscriptionIds.push(o)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(t=>{e.getEventProvider().unsubscribe(t)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){eN(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){eN(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(t){e.getEventProvider().sendEvent(t)}_sendEventWithReply(t){return e.getEventProvider().sendEventWithReply(t)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},tY="#4d9d2a",tX="#FFFFFF",tQ="#FFFFFF",tZ="#F9F9F9",t0="#CCCCCC",t1="#be0000",t2="#FFFFFF",t5="#4c4c4c",t3="#000000",t6="#000000",t8="#FFFFFF",t4="0 5px 5px -5px rgba(0,0,0,0.3)",t9="0 1px 3px 0 rgba(0,0,0,0.21)";var t7=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};let re="mdi",rt="openremote",rr="restricted_user";(r=i||(i={})).MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",r.AUTH_FAILED="AUTH_FAILED",r.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",r.CONSOLE_ERROR="CONSOLE_INIT_ERROR",r.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",r.TRANSLATION_ERROR="TRANSLATION_ERROR",(n=c||(c={})).ERROR="ERROR",n.READY="READY",n.ONLINE="ONLINE",n.OFFLINE="OFFLINE",n.CONNECTING="CONNECTING",n.CONSOLE_INIT="CONSOLE_INIT",n.CONSOLE_READY="CONSOLE_READY",n.TRANSLATE_INIT="TRANSLATE_INIT",n.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",n.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED",n.LOGIN="LOGIN";let rn={en:"english",cn:"chinese",nl:"dutch",fr:"french",de:"german",it:"italian",pl:"polish",pt:"portuguese",ro:"romanian",es:"spanish",uk:"ukrainian"},ro={cn:"zh-cn"};function ri(e){let t=e?Object.assign({},e):{};return t.managerUrl&&""!==t.managerUrl?t.managerUrl=t.managerUrl.replace(/\/+$/,""):t.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),t.realm&&""!==t.realm||(t.realm="master"),t.auth||(t.auth="KEYCLOAK"),void 0===t.consoleAutoEnable&&(t.consoleAutoEnable=!0),void 0===t.applyConfigToAdmin&&(t.applyConfigToAdmin=!0),t.eventProviderType||(t.eventProviderType="WEBSOCKET"),(!t.pollingIntervalMillis||t.pollingIntervalMillis<5e3)&&(t.pollingIntervalMillis=1e4),void 0===t.loadIcons&&(t.loadIcons=!0),void 0===t.loadTranslations&&(t.loadTranslations=["or"]),void 0===t.translationsLoadPath&&(t.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===t.loadDescriptors&&(t.loadDescriptors=!0),void 0===t.clientId&&(t.clientId=rt),t}class rs{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 e=new Map;return this._keycloak?this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach(([t,r])=>{let n=r.roles;e.set(t,n)}):this._basicIdentity&&this._basicIdentity.roles&&e.set(this._config.clientId,this._basicIdentity.roles),e}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){var e;return null==(e=this._config)?void 0:e.managerUrl}get keycloakUrl(){var e;return null==(e=this._config)?void 0:e.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 tm()}get language(){return eg.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(eg.changeLanguage(e),this.console.storeData("LANGUAGE",e),this.authenticated&&this.updateKeycloakUserLanguage(e).catch(e=>console.error(e)))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(e){this.isSuperUser()&&this._displayRealm!==e&&(this._displayRealm=e,this._emitEvent(c.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||rt}getEventProvider(){return this.events}isManagerSameOrigin(){if(!this.ready)return!1;let e=new URL(this._config.managerUrl),t=window.location;return e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}addListener(e){0>this._listeners.indexOf(e)&&this._listeners.push(e)}removeListener(e){let t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}init(e){return t7(this,void 0,void 0,function*(){this._config&&console.debug("Already initialised"),this._config=ri(e);let t=yield this.loadManagerInfo(),r=new tv(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(c.CONSOLE_READY)});if(this._console=r,"BASIC"===this._config.auth)t=(yield this.doTranslateInit())&&t,t=yield this.doAuthInit();else if("KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){let e,t=new URL(this._config.managerUrl);this._authServerUrl.startsWith("//")&&(this._authServerUrl=t.protocol+this._authServerUrl);try{e=new URL(this._authServerUrl)}catch(r){(e=new URL(t)).pathname=this._authServerUrl}e.protocol||(e.protocol=t.protocol),e.hostname||(e.hostname=t.hostname),e.port||(e.port=t.port),this._config.keycloakUrl=e.toString()}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),(t=yield this.doAuthInit())||this._config.skipFallbackToBasicAuth||(console.debug("Falling back to basic auth"),this._config.auth="BASIC",t=yield this.doAuthInit())}return!!t&&(t&&(t=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),(t=(yield this.doTranslateInit())&&t)&&(t=yield this.doDescriptorsInit(),t=yield this.getConsoleAppConfig()),this.doIconInit(),t?(t=yield this.doEventsSubscriptionInit(),this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(c.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)})}loadManagerInfo(){return t7(this,void 0,void 0,function*(){try{let e=yield new Promise((e,t)=>{let r=new XMLHttpRequest;r.addEventListener("load",()=>{e(JSON.parse(r.responseText))}),r.addEventListener("error",()=>{t(Error("Failed to contact the manager"))}),r.open("GET",this._config.managerUrl+"/api/master/info"),r.send()});return this._managerVersion=e&&e.version?e.version:"",this._authServerUrl=e&&e.authServerUrl?e.authServerUrl:"",!0}catch(e){return console.error("Failed to contact the manager",e),this._setError(i.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return t7(this,void 0,void 0,function*(){if(eg.isInitialized)return!0;eg.on("initialized",e=>{this._emitEvent(c.TRANSLATE_INIT)}),eg.on("languageChanged",e=>{var t;em().locale(null!=(t=ro[e])?t:e),this._emitEvent(c.TRANSLATE_LANGUAGE_CHANGED)});let e={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(e,t,r)=>"uppercase"===t?e.toUpperCase():e instanceof Date?em()(e).format(t):e},backend:{loadPath:(e,t)=>1===t.length&&"or"===t[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(e);try{yield eg.use(tK).init(e)}catch(e){return console.error(e),this._setError(i.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return t7(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let e=yield tm().api.AssetModelResource.getAssetInfos(),t=yield tm().api.AssetModelResource.getMetaItemDescriptors(),r=yield tm().api.AssetModelResource.getValueDescriptors();u.AssetModelUtil._assetTypeInfos=e.data,u.AssetModelUtil._metaItemDescriptors=Object.values(t.data),u.AssetModelUtil._valueDescriptors=Object.values(r.data)}catch(e){return console.error(e),!1}return!0})}doAuthInit(){return t7(this,void 0,void 0,function*(){let e=!0;switch(this._config.auth){case"BASIC":e=yield this.initialiseBasicAuth();break;case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(i.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(tm().addRequestInterceptor(e=>{if(!e.headers.Authorization){let t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e}),e)})}doRestApiInit(){return tm().setTimeout(2e4),tm().initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return t7(this,void 0,void 0,function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new tx(this._config.managerUrl),this._events.subscribeStatusChange(e=>this._onEventProviderStatusChanged(e)),e=yield this._events.connect()),e||this._setError(i.EVENTS_CONNECTION_ERROR),e})}_connectEvents(){var e;(null==(e=this.events)?void 0:e.status)===o.DISCONNECTED?this.events.connect().catch(e=>{console.error("Failed to connect EventProvider."),console.error(e)}):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(e){switch(e){case o.DISCONNECTED:this._onDisconnect();break;case o.CONNECTED:break;case o.CONNECTING:this._emitEvent(c.CONNECTING)}}doConsoleInit(){return t7(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(c.CONSOLE_INIT),!0}catch(e){return this._setError(i.CONSOLE_ERROR),!1}})}doIconInit(){this._config.loadIcons&&(tH.IconSets.addIconSet("mdi",(0,tH.createMdiIconSet)(ra.managerUrl)),tH.IconSets.addIconSet("or",(0,tH.createSvgIconSet)(tH.OrIconSet.size,tH.OrIconSet.icons)))}getConsoleAppConfig(){return t7(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=ra.managerUrl)?e:"")+"/consoleappconfig/"+ra.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return t7(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return t7(this,arguments,void 0,function*(e=this._keycloak){if(e&&e.authenticated){let t=(null==e?void 0:e.profile)||(yield null==e?void 0:e.loadUserProfile());if(null==t?void 0:t.attributes){let e=new Map(Object.entries(t.attributes));if(e.has("locale")){let t=e.get("locale");if("string"==typeof t[0])return t[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(e){return t7(this,arguments,void 0,function*(e,t=this.rest){this.authenticated?t?yield t.api.UserResource.updateCurrentUserLocale(e,{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(e){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(e&&""!==e?{redirectUri:e}:void 0)):this._basicIdentity&&(this._basicIdentity=void 0,e?window.location.href=e:window.location.reload()))}login(e){switch(this._config.auth){case"BASIC":e&&e.credentials&&(this._config.credentials=Object.assign({},e.credentials)),this.doBasicLogin();break;case"KEYCLOAK":if(this._keycloak){let t={};e&&e.redirectUrl&&""!==e.redirectUrl&&(t.redirectUri=e.redirectUrl),(null==e?void 0:e.action)&&""!==e.action&&(t.action=e.action),this.isMobile()&&(t.scope="offline_access"),this._keycloak.login(t)}}}initialiseBasicAuth(){return t7(this,void 0,void 0,function*(){return this.config.basicLoginProvider?(this.config.autoLogin&&(this._readyCallback=()=>this.doBasicLogin()),!0):(console.debug("No basicLoginProvider defined on config so cannot display login UI"),!1)})}doBasicLogin(){return t7(this,void 0,void 0,function*(){var e,t,r,n;if(!this.config.basicLoginProvider)return;let o={username:(null==(e=this.config.credentials)?void 0:e.username)?null==(t=this.config.credentials)?void 0:t.username:"",password:(null==(r=this.config.credentials)?void 0:r.password)?null==(n=this.config.credentials)?void 0:n.password:"",cancel:!1},i=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!i;){if((o=yield this.config.basicLoginProvider(o.username,o.password)).cancel){console.debug("Basic authentication cancelled by user");break}if(!o.username||!o.password)continue;this._basicIdentity.token=btoa(o.username+":"+o.password);let e=!1;try{let t=yield tm().api.UserResource.getCurrent();200===t.status&&(e=!0,this._basicIdentity.user=t.data),e||401!==t.status&&403!==t.status||console.debug("Basic authentication invalid credentials, trying again")}catch(e){console.error("Basic auth failed: ",e)}if(e){console.debug("Basic authentication successful"),i=!0;let e=yield tm().api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}else{console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}}i&&this._onAuthenticated()})}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole(rr)}getApiBaseUrl(){let e=this._config.managerUrl;return e+("/api/"+this._config.realm+"/")}getAppName(){let e=location.pathname.split("/");return e.length>=1?e[1]:""}hasRealmRole(e){return this.isKeycloak()&&this._keycloak.hasRealmRole(e)}hasRole(e,t=this._config.clientId){let r=this.roles;return r&&r.has(t)&&r.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}retrieveAuthorizationHeader(){return t7(this,void 0,void 0,function*(){let e=yield this.retrieveKeycloakToken();return e?"Bearer "+e:"Basic "+this.getBasicToken()})}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}retrieveKeycloakToken(){return t7(this,void 0,void 0,function*(){if(this.isKeycloak())return yield this._updateKeycloakAccessToken(),this._keycloak.token})}getBasicToken(){return this._basicIdentity?this._basicIdentity.token:void 0}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 t7(this,void 0,void 0,function*(){var e,t,r,n,o;try{this._keycloak=new tz({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let i=yield this._getNativeOfflineRefreshToken(),s=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!s&&i)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=i,s=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(s){this._name=null==(e=this._keycloak.tokenParsed)?void 0:e.name,this._username=null==(t=this._keycloak.tokenParsed)?void 0:t.preferred_username,this.isMobile()&&(null==(n=null==(r=this._keycloak)?void 0:r.refreshTokenParsed)?void 0:n.typ)==="Offline"&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated(),this._createTokenUpdateInterval();let i=null==(o=this._keycloak.tokenParsed)?void 0:o.session_state;i&&sessionStorage.getItem("or-session")!==i&&(sessionStorage.setItem("or-session",i),this._emitEvent(c.LOGIN))}else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(i.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._authenticated?this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>t7(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 t7(this,void 0,void 0,function*(){let e=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+e),e&&this._onAuthenticated(),e})}_getNativeOfflineRefreshToken(){return t7(this,void 0,void 0,function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")})}_emitEvent(e){window.setTimeout(()=>{for(let t of this._listeners)t(e)},0)}_setError(e){this._error=e,this._emitEvent(c.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;this.isMobile()&&(null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0))}_onDisconnect(){return t7(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(c.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected to the Manager."),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(c.ONLINE)}reconnect(){return t7(this,arguments,void 0,function*(e=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 t=()=>t7(this,void 0,void 0,function*(){var e,t;if(console.debug("Reconnecting to the Manager..."),!this._authenticated){console.debug("User is not authenticated, skipping token refresh");let t=()=>{var e;return(null==(e=this.events)?void 0:e.status)===o.CONNECTED};return t()||(yield null==(e=this.events)?void 0:e.connect()),t()}if(!(yield this.isKeycloakReachable()))return console.error("Keycloak is not reachable. Reconnect attempt failed."),!1;try{yield this._updateKeycloakAccessToken()}catch(t){console.error("Could not update Keycloak access token, attempting again using offline token...",t);let e=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=e,e||console.warn("No offline token was found on this device.");try{yield this._updateKeycloakAccessToken()}catch(e){throw this.login(),Error("Cannot update access token so sending to login")}console.debug("Keycloak access token is valid")}let r=()=>{var e;return(null==(e=this.events)?void 0:e.status)===o.CONNECTED};return r()||(console.debug("Event provider offline, attempting to reconnect using latest auth token."),yield null==(t=this.events)?void 0:t.connect()),r()}),r=yield t();if(void 0!==r){if(!r){e=Math.min(rs.MAX_RECONNECT_DELAY,e+3e3),console.error(`Failed to reconnect to the Manager. Attempting again in ${e}...`),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return t7(this,arguments,void 0,function*(e=2e3){let t=new AbortController,r=setTimeout(()=>t.abort(),e);try{let e=this._keycloak.endpoints.token(),r=yield fetch(e,{method:"OPTIONS",signal:t.signal});return 200===r.status}catch(e){return!1}finally{clearTimeout(r)}})}}rs.MAX_RECONNECT_DELAY=45e3;let ra=new rs,rc=ra})(),a})());
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ORRest"),require("moment"),require("ORModel"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORRest","moment","ORModel","ORIcon"],t):"object"==typeof exports?exports.ORCore=t(require("ORRest"),require("moment"),require("ORModel"),require("ORIcon")):e.ORCore=t(e.ORRest,e.moment,e.ORModel,e.ORIcon)}(self,(e,t,r,n)=>(()=>{var o={3260(e){"use strict";let t=(async function(){}).constructor;e.exports=()=>t},7052(e){"use strict";let t=(async function*(){}).constructor;e.exports=()=>t},9630(e,t,r){"use strict";var n=r(469),o=r(24),i=r(1530);e.exports=r(7009)||n.call(i,o)},24(e){"use strict";e.exports=Function.prototype.apply},1530(e){"use strict";e.exports=Function.prototype.call},7196(e,t,r){"use strict";var n=r(469),o=r(6757),i=r(1530),s=r(9630);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return s(n,i,e)}},7009(e){"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},8682(e,t,r){"use strict";var n=r(4295),o=r(7196),i=o([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o([r]):r}},714(e,t,r){"use strict";var n,o=r(7196),i=r(1233);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!n&&i&&i(Object.prototype,"__proto__"),a=Object,c=a.getPrototypeOf;e.exports=s&&"function"==typeof s.get?o([s.get]):"function"==typeof c&&function(e){return c(null==e?e:a(e))}},9997(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},155(e){"use strict";e.exports=EvalError},593(e){"use strict";e.exports=Error},7180(e){"use strict";e.exports=RangeError},9304(e){"use strict";e.exports=ReferenceError},1742(e){"use strict";e.exports=SyntaxError},6757(e){"use strict";e.exports=TypeError},4923(e){"use strict";e.exports=URIError},802(e){"use strict";e.exports=Object},9691(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},o=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},i=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var s,a=this;if("function"!=typeof a||"[object Function]"!==t.apply(a))throw TypeError("Function.prototype.bind called on incompatible "+a);for(var c=o(arguments,1),l=r(0,a.length-c.length),u=[],f=0;f<l;f++)u[f]="$"+f;if(s=Function("binder","return function ("+i(u,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof s){var t=a.apply(this,n(c,arguments));return Object(t)===t?t:this}return a.apply(e,n(c,arguments))}),a.prototype){var p=function(){};p.prototype=a.prototype,s.prototype=new p,p.prototype=null}return s}},469(e,t,r){"use strict";var n=r(9691);e.exports=Function.prototype.bind||n},5175(e){"use strict";let t=(function*(){}).constructor;e.exports=()=>t},4295(e,t,r){"use strict";var n,o=r(802),i=r(593),s=r(155),a=r(7180),c=r(9304),l=r(1742),u=r(6757),f=r(4923),p=r(7256),d=r(5414),h=r(7954),g=r(3452),y=r(1358),v=r(5720),b=r(3515),m=r(1233),_=r(9997),S=function(){throw new u},w=m?function(){try{return arguments.callee,S}catch(e){try{return m(arguments,"callee").get}catch(e){return S}}}():S,k=r(8573)(),O=r(7582),E=r(2170),x=r(9090),A=r(24),P=r(1530),R={},C="u">typeof Uint8Array&&O?O(Uint8Array):n,I={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":k&&O?O([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":"u"<typeof Atomics?n:Atomics,"%BigInt%":"u"<typeof BigInt?n:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"u"<typeof Float16Array?n:Float16Array,"%Float32Array%":"u"<typeof Float32Array?n:Float32Array,"%Float64Array%":"u"<typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":Function,"%GeneratorFunction%":R,"%Int8Array%":"u"<typeof Int8Array?n:Int8Array,"%Int16Array%":"u"<typeof Int16Array?n:Int16Array,"%Int32Array%":"u"<typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&O?O(O([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"u"<typeof Map?n:Map,"%MapIteratorPrototype%":"u">typeof Map&&k&&O?O(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":m,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?n:Promise,"%Proxy%":"u"<typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":c,"%Reflect%":"u"<typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?n:Set,"%SetIteratorPrototype%":"u">typeof Set&&k&&O?O(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&O?O(""[Symbol.iterator]()):n,"%Symbol%":k?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":w,"%TypedArray%":C,"%TypeError%":u,"%Uint8Array%":"u"<typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"u"<typeof WeakMap?n:WeakMap,"%WeakRef%":"u"<typeof WeakRef?n:WeakRef,"%WeakSet%":"u"<typeof WeakSet?n:WeakSet,"%Function.prototype.call%":P,"%Function.prototype.apply%":A,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":E,"%Math.abs%":p,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":g,"%Math.pow%":y,"%Math.round%":v,"%Math.sign%":b,"%Reflect.getPrototypeOf%":x};if(O)try{null.error}catch(e){var N=O(O(e));I["%Error.prototype%"]=N}var T=r(3260),j=r(5175),L=r(7052),D=function e(t){var r;if("%AsyncFunction%"===t)r=T()||void 0;else if("%GeneratorFunction%"===t)r=j()||void 0;else if("%AsyncGeneratorFunction%"===t)r=L()||void 0;else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&O&&(r=O(o.prototype))}return I[t]=r,r},U={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(469),F=r(9731),B=M.call(P,Array.prototype.concat),V=M.call(A,Array.prototype.splice),K=M.call(P,String.prototype.replace),H=M.call(P,String.prototype.slice),W=M.call(P,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,z=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return K(e,q,function(e,t,r,o){n[n.length]=r?K(o,G,"$1"):t||e}),n},$=function(e,t){var r,n=e;if(F(U,n)&&(n="%"+(r=U[n])[0]+"%"),F(I,n)){var o=I[n];if(o===R&&(o=D(n)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===W(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=z(e),n=r.length>0?r[0]:"",o=$("%"+n+"%",t),i=o.name,s=o.value,a=!1,c=o.alias;c&&(n=c[0],V(r,B([0,1],c)));for(var f=1,p=!0;f<r.length;f+=1){var d=r[f],h=H(d,0,1),g=H(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===g||"'"===g||"`"===g)&&h!==g)throw new l("property names with quotes must have matching quotes");if("constructor"!==d&&p||(a=!0),n+="."+d,F(I,i="%"+n+"%"))s=I[i];else if(null!=s){if(!(d in s)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(m&&f+1>=r.length){var y=m(s,d);s=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[d]}else p=F(s,d),s=s[d];p&&!a&&(I[i]=s)}}return s}},2170(e,t,r){"use strict";e.exports=r(802).getPrototypeOf||null},9090(e){"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},7582(e,t,r){"use strict";var n=r(9090),o=r(2170),i=r(714);e.exports=n?function(e){return n(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},1067(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},1233(e,t,r){"use strict";var n=r(1067);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8573(e,t,r){"use strict";var n="u">typeof Symbol&&Symbol,o=r(9535);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},9535(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9731(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=r(469).call(n,o)},4954(e,t,r){!function(){"use strict";var t="input is invalid type",n="object"==typeof window,o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var i=!n&&"object"==typeof self,s=!o.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;s?o=r.g:i&&(o=self);var a=!o.JS_SHA256_NO_COMMON_JS&&e.exports,c="function"==typeof define&&define.amd,l=!o.JS_SHA256_NO_ARRAY_BUFFER&&"u">typeof ArrayBuffer,u="0123456789abcdef".split(""),f=[-0x80000000,8388608,32768,128],p=[24,16,8,0],d=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],h=["hex","array","digest","arrayBuffer"],g=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),l&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e,t){return function(r){return new S(t,!0).update(r)[e]()}},v=function(e){var t=y("hex",e);s&&(t=b(t,e)),t.create=function(){return new S(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<h.length;++r){var n=h[r];t[n]=y(n,e)}return t},b=function(e,n){var i,s=r(7791),a=r(5610).Buffer,c=n?"sha224":"sha256";return i=a.from&&!o.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)},function(r){if("string"==typeof r)return s.createHash(c).update(r,"utf8").digest("hex");if(null==r)throw Error(t);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===a?s.createHash(c).update(i(r)).digest("hex"):e(r)}},m=function(e,t){return function(r,n){return new w(r,t,!0).update(n)[e]()}},_=function(e){var t=m("hex",e);t.create=function(t){return new w(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<h.length;++r){var n=h[r];t[n]=m(n,e)}return t};function S(e,t){t?(g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=0xc1059ed8,this.h1=0x367cd507,this.h2=0x3070dd17,this.h3=0xf70e5939,this.h4=0xffc00b31,this.h5=0x68581511,this.h6=0x64f98fa7,this.h7=0xbefa4fa4):(this.h0=0x6a09e667,this.h1=0xbb67ae85,this.h2=0x3c6ef372,this.h3=0xa54ff53a,this.h4=0x510e527f,this.h5=0x9b05688c,this.h6=0x1f83d9ab,this.h7=0x5be0cd19),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function w(e,r,n){var o,i=typeof e;if("string"===i){var s,a=[],c=e.length,u=0;for(o=0;o<c;++o)(s=e.charCodeAt(o))<128?a[u++]=s:(s<2048?a[u++]=192|s>>>6:(s<55296||s>=57344?a[u++]=224|s>>>12:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++o)),a[u++]=240|s>>>18,a[u++]=128|s>>>12&63),a[u++]=128|s>>>6&63),a[u++]=128|63&s);e=a}else if("object"===i){if(null===e)throw Error(t);else if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);e.length>64&&(e=new S(r,!0).update(e).array());var f=[],p=[];for(o=0;o<64;++o){var d=e[o]||0;f[o]=92^d,p[o]=54^d}S.call(this,r,n),this.update(p),this.oKeyPad=f,this.inner=!0,this.sharedMemory=n}S.prototype.update=function(e){if(!this.finalized){var r,n=typeof e;if("string"!==n){if("object"===n){if(null===e)throw Error(t);else if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);r=!0}for(var o,i,s=0,a=e.length,c=this.blocks;s<a;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,this.block=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),r)for(i=this.start;s<a&&i<64;++s)c[i>>>2]|=e[s]<<p[3&i++];else for(i=this.start;s<a&&i<64;++s)(o=e.charCodeAt(s))<128?c[i>>>2]|=o<<p[3&i++]:(o<2048?c[i>>>2]|=(192|o>>>6)<<p[3&i++]:(o<55296||o>=57344?c[i>>>2]|=(224|o>>>12)<<p[3&i++]:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),c[i>>>2]|=(240|o>>>18)<<p[3&i++],c[i>>>2]|=(128|o>>>12&63)<<p[3&i++]),c[i>>>2]|=(128|o>>>6&63)<<p[3&i++]),c[i>>>2]|=(128|63&o)<<p[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=c[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>0xffffffff&&(this.hBytes+=this.bytes/0x100000000|0,this.bytes=this.bytes%0x100000000),this}},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=f[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},S.prototype.hash=function(){var e,t,r,n,o,i,s,a,c,l,u=this.h0,f=this.h1,p=this.h2,h=this.h3,g=this.h4,y=this.h5,v=this.h6,b=this.h7,m=this.blocks;for(e=16;e<64;++e)t=((o=m[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,r=((o=m[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,m[e]=m[e-16]+t+m[e-7]+r|0;for(e=0,l=f&p;e<64;e+=4)this.first?(this.is224?(s=300032,b=(o=m[0]-0x543c9a5b)-0x8f1a6c7|0,h=o+0x170e9b5|0):(s=0x2a01a605,b=(o=m[0]-0xc881298)-0x5ab00ac6|0,h=o+0x8909ae5|0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),n=(s=u&f)^u&p^l,o=b+r+(g&y^~g&v)+d[e]+m[e],i=t+n,b=h+o|0,h=o+i|0),t=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),r=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),n=(a=h&u)^h&f^s,o=v+r+(b&g^~b&y)+d[e+1]+m[e+1],i=t+n,v=p+o|0,t=((p=o+i|0)>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),r=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),n=(c=p&h)^p&u^a,o=y+r+(v&b^~v&g)+d[e+2]+m[e+2],i=t+n,y=f+o|0,t=((f=o+i|0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),n=(l=f&p)^f&h^c,o=g+r+(y&v^~y&b)+d[e+3]+m[e+3],i=t+n,g=u+o|0,u=o+i|0,this.chromeBugWorkAround=!0;this.h0=this.h0+u|0,this.h1=this.h1+f|0,this.h2=this.h2+p|0,this.h3=this.h3+h|0,this.h4=this.h4+g|0,this.h5=this.h5+y|0,this.h6=this.h6+v|0,this.h7=this.h7+b|0},S.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,c=u[e>>>28&15]+u[e>>>24&15]+u[e>>>20&15]+u[e>>>16&15]+u[e>>>12&15]+u[e>>>8&15]+u[e>>>4&15]+u[15&e]+u[t>>>28&15]+u[t>>>24&15]+u[t>>>20&15]+u[t>>>16&15]+u[t>>>12&15]+u[t>>>8&15]+u[t>>>4&15]+u[15&t]+u[r>>>28&15]+u[r>>>24&15]+u[r>>>20&15]+u[r>>>16&15]+u[r>>>12&15]+u[r>>>8&15]+u[r>>>4&15]+u[15&r]+u[n>>>28&15]+u[n>>>24&15]+u[n>>>20&15]+u[n>>>16&15]+u[n>>>12&15]+u[n>>>8&15]+u[n>>>4&15]+u[15&n]+u[o>>>28&15]+u[o>>>24&15]+u[o>>>20&15]+u[o>>>16&15]+u[o>>>12&15]+u[o>>>8&15]+u[o>>>4&15]+u[15&o]+u[i>>>28&15]+u[i>>>24&15]+u[i>>>20&15]+u[i>>>16&15]+u[i>>>12&15]+u[i>>>8&15]+u[i>>>4&15]+u[15&i]+u[s>>>28&15]+u[s>>>24&15]+u[s>>>20&15]+u[s>>>16&15]+u[s>>>12&15]+u[s>>>8&15]+u[s>>>4&15]+u[15&s];return this.is224||(c+=u[a>>>28&15]+u[a>>>24&15]+u[a>>>20&15]+u[a>>>16&15]+u[a>>>12&15]+u[a>>>8&15]+u[a>>>4&15]+u[15&a]),c},S.prototype.toString=S.prototype.hex,S.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,i>>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s];return this.is224||c.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),c},S.prototype.array=S.prototype.digest,S.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},w.prototype=new S,w.prototype.finalize=function(){if(S.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();S.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),S.prototype.finalize.call(this)}};var k=v();k.sha256=k,k.sha224=v(!0),k.sha256.hmac=_(),k.sha224.hmac=_(!0),a?e.exports=k:(o.sha256=k.sha256,o.sha224=k.sha224,c&&define(function(){return k}))}()},3472(e,t,r){e=r.nmd(e);var n,o="__lodash_hash_undefined__",i=1/0,s="[object Arguments]",a="[object Array]",c="[object Boolean]",l="[object Date]",u="[object Error]",f="[object Function]",p="[object Map]",d="[object Number]",h="[object Object]",g="[object Promise]",y="[object RegExp]",v="[object Set]",b="[object String]",m="[object Symbol]",_="[object WeakMap]",S="[object ArrayBuffer]",w="[object DataView]",k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/,E=/^\./,x=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A=/\\(\\)?/g,P=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[s]=C[a]=C[S]=C[c]=C[w]=C[l]=C[u]=C[f]=C[p]=C[d]=C[h]=C[y]=C[v]=C[b]=C[_]=!1;var I="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,N="object"==typeof self&&self&&self.Object===Object&&self,T=I||N||Function("return this")(),j=t&&!t.nodeType&&t,L=j&&e&&!e.nodeType&&e,D=L&&L.exports===j&&I.process,U=function(){try{return D&&D.binding("util")}catch(e){}}(),M=U&&U.isTypedArray;function F(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function B(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function V(e,t){return function(r){return e(t(r))}}function K(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var H=Array.prototype,W=Function.prototype,q=Object.prototype,G=T["__core-js_shared__"],z=(n=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",$=W.toString,J=q.hasOwnProperty,Y=q.toString,X=RegExp("^"+$.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Q=T.Symbol,Z=T.Uint8Array,ee=V(Object.getPrototypeOf,Object),et=Object.create,er=q.propertyIsEnumerable,en=H.splice,eo=V(Object.keys,Object),ei=eI(T,"DataView"),es=eI(T,"Map"),ea=eI(T,"Promise"),ec=eI(T,"Set"),el=eI(T,"WeakMap"),eu=eI(Object,"create"),ef=eM(ei),ep=eM(es),ed=eM(ea),eh=eM(ec),eg=eM(el),ey=Q?Q.prototype:void 0,ev=ey?ey.valueOf:void 0,eb=ey?ey.toString:void 0;function em(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function e_(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eS(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ew(e){var t=-1,r=e?e.length:0;for(this.__data__=new eS;++t<r;)this.add(e[t])}function ek(e){this.__data__=new e_(e)}function eO(e,t){for(var r=e.length;r--;)if(eB(e[r][0],t))return r;return -1}em.prototype.clear=function(){this.__data__=eu?eu(null):{}},em.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},em.prototype.get=function(e){var t=this.__data__;if(eu){var r=t[e];return r===o?void 0:r}return J.call(t,e)?t[e]:void 0},em.prototype.has=function(e){var t=this.__data__;return eu?void 0!==t[e]:J.call(t,e)},em.prototype.set=function(e,t){return this.__data__[e]=eu&&void 0===t?o:t,this},e_.prototype.clear=function(){this.__data__=[]},e_.prototype.delete=function(e){var t=this.__data__,r=eO(t,e);return!(r<0)&&(r==t.length-1?t.pop():en.call(t,r,1),!0)},e_.prototype.get=function(e){var t=this.__data__,r=eO(t,e);return r<0?void 0:t[r][1]},e_.prototype.has=function(e){return eO(this.__data__,e)>-1},e_.prototype.set=function(e,t){var r=this.__data__,n=eO(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},eS.prototype.clear=function(){this.__data__={hash:new em,map:new(es||e_),string:new em}},eS.prototype.delete=function(e){return eC(this,e).delete(e)},eS.prototype.get=function(e){return eC(this,e).get(e)},eS.prototype.has=function(e){return eC(this,e).has(e)},eS.prototype.set=function(e,t){return eC(this,e).set(e,t),this},ew.prototype.add=ew.prototype.push=function(e){return this.__data__.set(e,o),this},ew.prototype.has=function(e){return this.__data__.has(e)},ek.prototype.clear=function(){this.__data__=new e_},ek.prototype.delete=function(e){return this.__data__.delete(e)},ek.prototype.get=function(e){return this.__data__.get(e)},ek.prototype.has=function(e){return this.__data__.has(e)},ek.prototype.set=function(e,t){var r=this.__data__;if(r instanceof e_){var n=r.__data__;if(!es||n.length<199)return n.push([e,t]),this;r=this.__data__=new eS(n)}return r.set(e,t),this};var eE=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[++n];if(!1===t(o[a],a,o))break}return e};function ex(e,t){var r;t=ej(t,e)?[t]:eK(r=t)?r:eD(r);for(var n=0,o=t.length;null!=e&&n<o;)e=e[eU(t[n++])];return n&&n==o?e:void 0}function eA(e,t){return null!=e&&t in Object(e)}function eP(e,t,r,n,o){return e===t||(null!=e&&null!=t&&(eG(e)||ez(t))?function(e,t,r,n,o,i){var f=eK(e),g=eK(t),_=a,k=a;f||(_=(_=eN(e))==s?h:_),g||(k=(k=eN(t))==s?h:k);var O=_==h&&!F(e),E=k==h&&!F(t),x=_==k;if(x&&!O)return i||(i=new ek),f||eJ(e)?eR(e,t,r,n,o,i):function(e,t,r,n,o,i,s){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case S:if(e.byteLength!=t.byteLength||!n(new Z(e),new Z(t)))break;return!0;case c:case l:case d:return eB(+e,+t);case u:return e.name==t.name&&e.message==t.message;case y:case b:return e==t+"";case p:var a=B;case v:var f=2&i;if(a||(a=K),e.size!=t.size&&!f)break;var h=s.get(e);if(h)return h==t;i|=1,s.set(e,t);var g=eR(a(e),a(t),n,o,i,s);return s.delete(e),g;case m:if(ev)return ev.call(e)==ev.call(t)}return!1}(e,t,_,r,n,o,i);if(!(2&o)){var A=O&&J.call(e,"__wrapped__"),P=E&&J.call(t,"__wrapped__");if(A||P){var R=A?e.value():e,C=P?t.value():t;return i||(i=new ek),r(R,C,n,o,i)}}return!!x&&(i||(i=new ek),function(e,t,r,n,o,i){var s=2&o,a=eY(e),c=a.length;if(c!=eY(t).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in t:J.call(t,u)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var p=!0;i.set(e,t),i.set(t,e);for(var d=s;++l<c;){var h=e[u=a[l]],g=t[u];if(n)var y=s?n(g,h,u,t,e,i):n(h,g,u,e,t,i);if(!(void 0===y?h===g||r(h,g,n,o,i):y)){p=!1;break}d||(d="constructor"==u)}if(p&&!d){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(e),i.delete(t),p}(e,t,r,n,o,i))}(e,t,eP,r,n,o):e!=e&&t!=t)}function eR(e,t,r,n,o,i){var s=2&o,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var u=-1,f=!0,p=1&o?new ew:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var d=e[u],h=t[u];if(n)var g=s?n(h,d,u,t,e,i):n(d,h,u,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!function(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}(t,function(e,t){if(!p.has(t)&&(d===e||r(d,e,n,o,i)))return p.add(t)})){f=!1;break}}else if(!(d===h||r(d,h,n,o,i))){f=!1;break}}return i.delete(e),i.delete(t),f}function eC(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function eI(e,t){var r,n=null==e?void 0:e[t];return!(!eG(n)||(r=n,z&&z in r))&&(eW(n)||F(n)?X:P).test(eM(n))?n:void 0}var eN=function(e){return Y.call(e)};function eT(e,t){return!!(t=null==t?0x1fffffffffffff:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function ej(e,t){if(eK(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||e$(e))||O.test(e)||!k.test(e)||null!=t&&e in Object(t)}(ei&&eN(new ei(new ArrayBuffer(1)))!=w||es&&eN(new es)!=p||ea&&eN(ea.resolve())!=g||ec&&eN(new ec)!=v||el&&eN(new el)!=_)&&(eN=function(e){var t=Y.call(e),r=t==h?e.constructor:void 0,n=r?eM(r):void 0;if(n)switch(n){case ef:return w;case ep:return p;case ed:return g;case eh:return v;case eg:return _}return t});function eL(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}var eD=eF(function(e){e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(e$(e))return eb?eb.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}(t);var t,r=[];return E.test(e)&&r.push(""),e.replace(x,function(e,t,n,o){r.push(n?o.replace(A,"$1"):t||e)}),r});function eU(e){if("string"==typeof e||e$(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function eM(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eF(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s),s};return r.cache=new(eF.Cache||eS),r}function eB(e,t){return e===t||e!=e&&t!=t}function eV(e){var t;return ez(t=e)&&eH(t)&&J.call(e,"callee")&&(!er.call(e,"callee")||Y.call(e)==s)}eF.Cache=eS;var eK=Array.isArray;function eH(e){return null!=e&&eq(e.length)&&!eW(e)}function eW(e){var t=eG(e)?Y.call(e):"";return t==f||"[object GeneratorFunction]"==t}function eq(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function eG(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ez(e){return!!e&&"object"==typeof e}function e$(e){return"symbol"==typeof e||ez(e)&&Y.call(e)==m}var eJ=M?function(e){return M(e)}:function(e){return ez(e)&&eq(e.length)&&!!C[Y.call(e)]};function eY(e){return eH(e)?function(e){var t=eK(e)||eV(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],r=t.length,n=!!r;for(var o in e)J.call(e,o)&&!(n&&("length"==o||eT(o,r)))&&t.push(o);return t}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||q))return eo(e);var t,r,n=[];for(var o in Object(e))J.call(e,o)&&"constructor"!=o&&n.push(o);return n}(e)}function eX(e){return e}e.exports=function(e,t,r){var n=eK(e)||eJ(e);if(t="function"==typeof(l=t)?l:null==l?eX:"object"==typeof l?eK(l)?(o=l[0],i=l[1],ej(o)&&(s=i)==s&&!eG(s)?eL(eU(o),i):function(e){var t,r,n,s,a,c=(t=e,r=o,void 0===(n=null==t?void 0:ex(t,r))?void 0:n);return void 0===c&&c===i?(s=e,a=o,null!=s&&function(e,t,r){t=ej(t,e)?[t]:eK(n=t)?n:eD(n);for(var n,o,i=-1,s=t.length;++i<s;){var a=eU(t[i]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}if(o)return o;var s=e?e.length:0;return!!s&&eq(s)&&eT(a,s)&&(eK(e)||eV(e))}(s,a,eA)):eP(i,c,void 0,3)}):1==(c=function(e){for(var t=eY(e),r=t.length;r--;){var n,o=t[r],i=e[o];t[r]=[o,i,(n=i)==n&&!eG(n)]}return t}(a=l)).length&&c[0][2]?eL(c[0][0],c[0][1]):function(e){return e===a||function(e,t){var r=t.length,n=r;if(null==e)return!n;for(e=Object(e);r--;){var o=t[r];if((0,o[2])?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<n;){var i=(o=t[r])[0],s=e[i],a=o[1];if(0,o[2]){if(void 0===s&&!(i in e))return!1}else{var c,l=new ek;if(!(void 0===c?eP(a,s,void 0,3,l):c))return!1}}return!0}(e,c)}:function(e){var t;return ej(e)?(t=eU(e),function(e){return null==e?void 0:e[t]}):function(t){return ex(t,e)}}(l),null==r)if(n||eG(e)){var o,i,s,a,c,l,u,f=e.constructor;r=n?eK(e)?new f:[]:eW(f)&&eG(u=ee(e))?et(u):{}}else r={};return(n?function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););return e}:function(e,t){return e&&eE(e,t,eY)})(e,function(e,n,o){return t(r,e,n,o)}),r}},7256(e){"use strict";e.exports=Math.abs},5414(e){"use strict";e.exports=Math.floor},981(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},7954(e){"use strict";e.exports=Math.max},3452(e){"use strict";e.exports=Math.min},1358(e){"use strict";e.exports=Math.pow},5720(e){"use strict";e.exports=Math.round},3515(e,t,r){"use strict";var n=r(981);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},3109(e,t,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&c&&"function"==typeof c.get?c.get:null,u=a&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,m=String.prototype.replace,_=String.prototype.toUpperCase,S=String.prototype.toLowerCase,w=RegExp.prototype.test,k=Array.prototype.concat,O=Array.prototype.join,E=Array.prototype.slice,x=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===C?"object":"symbol")?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function j(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-x(-e):x(e);if(n!==e){var o=String(n),i=b.call(t,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(t,r,"$&_")}var L=r(6550),D=L.custom,U=W(D)?D:null,M={__proto__:null,double:'"',single:"'"},F={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function B(e,t,r){var n=M[r.quoteStyle||t];return n+e+n}function V(e){return!I||!("object"==typeof e&&(I in e||void 0!==e[I]))}function K(e){return"[object Array]"===z(e)&&V(e)}function H(e){return"[object RegExp]"===z(e)&&V(e)}function W(e){if(C)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!R)return!1;try{return R.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,o,a){var c,g,_,w,x,P=n||{};if(G(P,"quoteStyle")&&!G(M,P.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if(G(P,"maxStringLength")&&("number"==typeof P.maxStringLength?P.maxStringLength<0&&P.maxStringLength!==1/0:null!==P.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var D=!G(P,"customInspect")||P.customInspect;if("boolean"!=typeof D&&"symbol"!==D)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(P,"indent")&&null!==P.indent&&" "!==P.indent&&!(parseInt(P.indent,10)===P.indent&&P.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(P,"numericSeparator")&&"boolean"!=typeof P.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var q=P.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n=t.length-r.maxStringLength;return e(b.call(t,0,r.maxStringLength),r)+("... "+n)+" more character"+(n>1?"s":"")}var o=F[r.quoteStyle||"single"];return o.lastIndex=0,B(m.call(m.call(t,o,"\\$1"),/[\x00-\x1f]/g,J),"single",r)}(t,P);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var et=String(t);return q?j(t,et):et}if("bigint"==typeof t){var er=String(t)+"n";return q?j(t,er):er}var en=void 0===P.depth?5:P.depth;if(void 0===o&&(o=0),o>=en&&en>0&&"object"==typeof t)return K(t)?"[Array]":"[Object]";var eo=function(e,t){var r;if(" "===e.indent)r=" ";else{if("number"!=typeof e.indent||!(e.indent>0))return null;r=O.call(Array(e.indent+1)," ")}return{base:r,prev:O.call(Array(t+1),r)}}(P,o);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function ei(t,r,n){if(r&&(a=E.call(a)).push(r),n){var i={depth:P.depth};return G(P,"quoteStyle")&&(i.quoteStyle=P.quoteStyle),e(t,i,o+1,a)}return e(t,P,o+1,a)}if("function"==typeof t&&!H(t)){var es=function(e){if(e.name)return e.name;var t=v.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ea=ee(t,ei);return"[Function"+(es?": "+es:" (anonymous)")+"]"+(ea.length>0?" { "+O.call(ea,", ")+" }":"")}if(W(t)){var ec=C?m.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(t);return"object"!=typeof t||C?ec:Y(ec)}if((el=t)&&"object"==typeof el&&("u">typeof HTMLElement&&el instanceof HTMLElement||"string"==typeof el.nodeName&&"function"==typeof el.getAttribute)){for(var el,eu,ef="<"+S.call(String(t.nodeName)),ep=t.attributes||[],ed=0;ed<ep.length;ed++){ef+=" "+ep[ed].name+"="+B((eu=ep[ed].value,m.call(String(eu),/"/g,""")),"double",P)}return ef+=">",t.childNodes&&t.childNodes.length&&(ef+="..."),ef+="</"+S.call(String(t.nodeName))+">"}if(K(t)){if(0===t.length)return"[]";var eh=ee(t,ei);return eo&&!function(e){for(var t=0;t<e.length;t++)if($(e[t],"\n")>=0)return!1;return!0}(eh)?"["+Z(eh,eo)+"]":"[ "+O.call(eh,", ")+" ]"}if("[object Error]"===z(c=t)&&V(c)){var eg=ee(t,ei);return"cause"in Error.prototype||!("cause"in t)||N.call(t,"cause")?0===eg.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(eg,", ")+" }":"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+ei(t.cause),eg),", ")+" }"}if("object"==typeof t&&D){if(U&&"function"==typeof t[U]&&L)return L(t,{depth:en-o});else if("symbol"!==D&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ey=[];return s&&s.call(t,function(e,r){ey.push(ei(r,t,!0)+" => "+ei(e,t))}),Q("Map",i.call(t),ey,eo)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ev=[];return u&&u.call(t,function(e){ev.push(ei(e,t))}),Q("Set",l.call(t),ev,eo)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if("[object Number]"===z(g=t)&&V(g))return Y(ei(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return Y(ei(A.call(t)));if("[object Boolean]"===z(_=t)&&V(_))return Y(h.call(t));if("[object String]"===z(w=t)&&V(w))return Y(ei(String(t)));if("u">typeof window&&t===window)return"{ [object Window] }";if("u">typeof globalThis&&t===globalThis||void 0!==r.g&&t===r.g)return"{ [object globalThis] }";if(!("[object Date]"===z(x=t)&&V(x))&&!H(t)){var eb=ee(t,ei),em=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,e_=t instanceof Object?"":"null prototype",eS=!em&&I&&Object(t)===t&&I in t?b.call(z(t),8,-1):e_?"Object":"",ew=(em||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(eS||e_?"["+O.call(k.call([],eS||[],e_||[]),": ")+"] ":"");return 0===eb.length?ew+"{}":eo?ew+"{"+Z(eb,eo)+"}":ew+"{ "+O.call(eb,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function G(e,t){return q.call(e,t)}function z(e){return g.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}function J(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function Y(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function Q(e,t,r,n){return e+" ("+t+") {"+(n?Z(r,n):O.call(r,", "))+"}"}function Z(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+O.call(e,","+r)+"\n"+t.prev}function ee(e,t){var r,n=K(e),o=[];if(n){o.length=e.length;for(var i=0;i<e.length;i++)o[i]=G(e,i)?t(e[i],e):""}var s="function"==typeof P?P(e):[];if(C){r={};for(var a=0;a<s.length;a++)r["$"+s[a]]=s[a]}for(var c in e)if(G(e,c)&&(!n||String(Number(c))!==c||!(c<e.length)))if(C&&r["$"+c]instanceof Symbol)continue;else w.call(/[^\w$]/,c)?o.push(t(c,e)+": "+t(e[c],e)):o.push(c+": "+t(e[c],e));if("function"==typeof P)for(var l=0;l<s.length;l++)N.call(e,s[l])&&o.push("["+t(s[l])+"]: "+t(e[s[l]],e));return o}},4461(e,t,r){e=r.nmd(e),(function(){"use strict";var n={function:!0,object:!0},o=n[typeof window]&&window||this,i=n[typeof t]&&t,s=n.object&&e&&!e.nodeType&&e,a=i&&s&&"object"==typeof r.g&&r.g;a&&(a.global===a||a.window===a||a.self===a)&&(o=a);var c=/\bOpera/,l=Object.prototype,u=l.hasOwnProperty,f=l.toString;function p(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function d(e){return e=b(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:p(e)}function h(e,t){for(var r in e)u.call(e,r)&&t(e[r],r,e)}function g(e){return null==e?p(e):f.call(e).slice(8,-1)}function y(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function v(e,t){var r=null,n=function(n,o){r=t(r,n,o,e)},o=-1,i=e?e.length:0;if("number"==typeof i&&i>-1&&i<=0x1fffffffffffff)for(;++o<i;)n(e[o],o,e);else h(e,n);return r}function b(e){return String(e).replace(/^ +| +$/g,"")}function m(e){var t,r,n,i,s,a=o,l=e&&"object"==typeof e&&"String"!=g(e);l&&(a=e,e=null);var u=a.navigator||{},p=u.userAgent||"";e||(e=p);var _=l?!!u.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(f.toString()),S="Object",w=l&&a.java?"JavaPackage":g(a.java),k=/\bJava/.test(w)&&a.java,O=k&&g(a.environment)==(l?S:"Environment"),E=k?"a":"α",x=k?"b":"β",A=a.document||{},P=a.operamini||a.opera,R=c.test(R=l&&P?P["[[Class]]"]:g(P))?R:P=null,C=e,I=[],N=null,T=e==p,j=T&&P&&"function"==typeof P.version&&P.version(),L=v([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],function(t,r){return t||RegExp("\\b"+(r.pattern||y(r))+"\\b","i").exec(e)&&(r.label||r)}),D=v(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"],function(t,r){return t||RegExp("\\b"+(r.pattern||y(r))+"\\b","i").exec(e)&&(r.label||r)}),U=B([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),M=v({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}},function(t,r,n){return t||(r[U]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(U)]||RegExp("\\b"+y(n)+"(?:\\b|\\w*\\d)","i").exec(e))&&n}),F=v(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "],function(t,r){var n,o,i,s=r.pattern||y(r);return!t&&(t=RegExp("\\b"+s+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(n=t,o=r.label||r,i={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"},s&&o&&/^Win/i.test(n)&&!/^Windows Phone /i.test(n)&&(i=i[/[\d.]+$/.exec(n)])&&(n="Windows "+i),n=String(n),s&&o&&(n=n.replace(RegExp(s,"i"),o)),t=n=d(n.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])),t});function B(t){return v(t,function(t,r){var n=r.pattern||y(r);return!t&&(t=RegExp("\\b"+n+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+n+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+n+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(r.label&&!RegExp(n,"i").test(r.label)?r.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),r=r.label||r,t=d(t[0].replace(RegExp(n,"i"),r).replace(RegExp("; *(?:"+r+"[_-])?","i")," ").replace(RegExp("("+r+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function V(t){return v(t,function(t,r){return t||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}if(L&&(L=[L]),/\bAndroid\b/.test(F)&&!U&&(i=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(e))&&(U=b(i[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),M&&!U?U=B([M]):M&&U&&(U=U.replace(RegExp("^("+y(M)+")[-_.\\s]","i"),M+" ").replace(RegExp("^("+y(M)+")[-_.]?(\\w)","i"),M+" $2")),(i=/\bGoogle TV\b/.exec(U))&&(U=i[0]),/\bSimulator\b/i.test(e)&&(U=(U?U+" ":"")+"Simulator"),"Opera Mini"==D&&/\bOPiOS\b/.test(e)&&I.push("running in Turbo/Uncompressed mode"),"IE"==D&&/\blike iPhone OS\b/.test(e)?(M=(i=m(e.replace(/like iPhone OS/,""))).manufacturer,U=i.product):/^iP/.test(U)?(D||(D="Safari"),F="iOS"+((i=/ OS ([\d_]+)/i.exec(e))?" "+i[1].replace(/_/g,"."):"")):"Konqueror"==D&&/^Linux\b/i.test(F)?F="Kubuntu":M&&"Google"!=M&&(/Chrome/.test(D)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(U))||/\bAndroid\b/.test(F)&&/^Chrome/.test(D)&&/\bVersion\//i.test(e)?(D="Android Browser",F=/\bAndroid\b/.test(F)?F:"Android"):"Silk"==D?(/\bMobi/i.test(e)||(F="Android",I.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&I.unshift("accelerated")):"UC Browser"==D&&/\bUCWEB\b/.test(e)?I.push("speed mode"):"PaleMoon"==D&&(i=/\bFirefox\/([\d.]+)\b/.exec(e))?I.push("identifying as Firefox "+i[1]):"Firefox"==D&&(i=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(F||(F="Firefox OS"),U||(U=i[1])):!D||(i=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(D))?(D&&!U&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(i+"/")+8))&&(D=null),(i=U||M||F)&&(U||M||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(F))&&(D=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(F)?F:i)+" Browser")):"Electron"==D&&(i=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&I.push("Chromium "+i),j||(j=V(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",y(D),"(?:Firefox|Minefield|NetFront)"])),(i="iCab"==L&&parseFloat(j)>3&&"WebKit"||/\bOpera\b/.test(D)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(L)&&"WebKit"||!L&&/\bMSIE\b/i.test(e)&&("Mac OS"==F?"Tasman":"Trident")||"WebKit"==L&&/\bPlayStation\b(?! Vita\b)/i.test(D)&&"NetFront")&&(L=[i]),"IE"==D&&(i=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(D+=" Mobile",F="Windows Phone "+(/\+$/.test(i)?i:i+".x"),I.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(D="IE Mobile",F="Windows Phone 8.x",I.unshift("desktop mode"),j||(j=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=D&&"Trident"==L&&(i=/\brv:([\d.]+)/.exec(e))&&(D&&I.push("identifying as "+D+(j?" "+j:"")),D="IE",j=i[1]),T){if(r="global",n=null!=(t=a)?typeof t[r]:"number",/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!t[r])g(i=a.runtime)==(l?S:"ScriptBridgingProxyObject")?(D="Adobe AIR",F=i.flash.system.Capabilities.os):g(i=a.phantom)==(l?S:"RuntimeObject")?(D="PhantomJS",j=(i=i.version||null)&&i.major+"."+i.minor+"."+i.patch):"number"==typeof A.documentMode&&(i=/\bTrident\/(\d+)/i.exec(e))?(j=[j,A.documentMode],(i=+i[1]+4)!=j[1]&&(I.push("IE "+j[1]+" mode"),L&&(L[1]=""),j[1]=i),j="IE"==D?String(j[1].toFixed(1)):j[0]):"number"==typeof A.documentMode&&/^(?:Chrome|Firefox)\b/.test(D)&&(I.push("masking as "+D+" "+j),D="IE",j="11.0",L=["Trident"],F="Windows");else if(k&&(C=(i=k.lang.System).getProperty("os.arch"),F=F||i.getProperty("os.name")+" "+i.getProperty("os.version")),O){try{j=a.require("ringo/engine").version.join("."),D="RingoJS"}catch(e){(i=a.system)&&i.global.system==a.system&&(D="Narwhal",F||(F=i[0].os||null))}D||(D="Rhino")}else"object"==typeof a.process&&!a.process.browser&&(i=a.process)&&("object"==typeof i.versions&&("string"==typeof i.versions.electron?(I.push("Node "+i.versions.node),D="Electron",j=i.versions.electron):"string"==typeof i.versions.nw&&(I.push("Chromium "+j,"Node "+i.versions.node),D="NW.js",j=i.versions.nw)),D||(D="Node.js",C=i.arch,F=i.platform,j=(j=/[\d.]+/.exec(i.version))?j[0]:null));F=F&&d(F)}if(j&&(i=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(j)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(T&&u.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(N=/b/i.test(i)?"beta":"alpha",j=j.replace(RegExp(i+"\\+?$"),"")+("beta"==N?x:E)+(/\d+\+?/.exec(i)||"")),"Fennec"==D||"Firefox"==D&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(F))D="Firefox Mobile";else if("Maxthon"==D&&j)j=j.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(U))"Xbox 360"==U&&(F=null),"Xbox 360"==U&&/\bIEMobile\b/.test(e)&&I.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(D)||D&&!U&&!/Browser|Mobi/.test(D))&&("Windows CE"==F||/Mobi/i.test(e)))D+=" Mobile";else if("IE"==D&&T)try{null===a.external&&I.unshift("platform preview")}catch(e){I.unshift("embedded")}else(/\bBlackBerry\b/.test(U)||/\bBB10\b/.test(e))&&(i=(RegExp(U.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||j)?(F=((i=[i,/BB10/.test(e)])[1]?(U=null,M="BlackBerry"):"Device Software")+" "+i[0],j=null):this!=h&&"Wii"!=U&&(T&&P||/Opera/.test(D)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==D&&/\bOS X (?:\d+\.){2,}/.test(F)||"IE"==D&&(F&&!/^Win/.test(F)&&j>5.5||/\bWindows XP\b/.test(F)&&j>8||8==j&&!/\bTrident\b/.test(e)))&&!c.test(i=m.call(h,e.replace(c,"")+";"))&&i.name&&(i="ing as "+i.name+((i=i.version)?" "+i:""),c.test(D)?(/\bIE\b/.test(i)&&"Mac OS"==F&&(F=null),i="identify"+i):(i="mask"+i,D=R?d(R.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(i)&&(F=null),T||(j=null)),L=["Presto"],I.push(i));(i=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(i=[parseFloat(i.replace(/\.(\d)$/,".0$1")),i],"Safari"==D&&"+"==i[1].slice(-1)?(D="WebKit Nightly",N="alpha",j=i[1].slice(0,-1)):(j==i[1]||j==(i[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1]))&&(j=null),i[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(e)||0)[1],537.36==i[0]&&537.36==i[2]&&parseFloat(i[1])>=28&&"WebKit"==L&&(L=["Blink"]),T&&(_||i[1])?(L&&(L[1]="like Chrome"),i=i[1]||((i=i[0])<530?1:i<532?2:i<532.05?3:i<533?4:i<534.03?5:i<534.07?6:i<534.1?7:i<534.13?8:i<534.16?9:i<534.24?10:i<534.3?11:i<535.01?12:i<535.02?"13+":i<535.07?15:i<535.11?16:i<535.19?17:i<536.05?18:i<536.1?19:i<537.01?20:i<537.11?"21+":i<537.13?23:i<537.18?24:i<537.24?25:i<537.36?26:"Blink"!=L?"27":"28")):(L&&(L[1]="like Safari"),i=(i=i[0])<400?1:i<500?2:i<526?3:i<533?4:i<534?"4+":i<535?5:i<537?6:i<538?7:i<601?8:i<602?9:i<604?10:i<606?11:i<608?12:"12"),L&&(L[1]+=" "+(i+="number"==typeof i?".x":/[.+]/.test(i)?"":"+")),"Safari"==D&&(!j||parseInt(j)>45)?j=i:"Chrome"==D&&/\bHeadlessChrome/i.test(e)&&I.unshift("headless")),"Opera"==D&&(i=/\bzbov|zvav$/.exec(F))?(D+=" ",I.unshift("desktop mode"),"zvav"==i?(D+="Mini",j=null):D+="Mobile",F=F.replace(RegExp(" *"+i+"$"),"")):"Safari"==D&&/\bChrome\b/.exec(L&&L[1])?(I.unshift("desktop mode"),D="Chrome Mobile",j=null,/\bOS X\b/.test(F)?(M="Apple",F="iOS 4.3+"):F=null):/\bSRWare Iron\b/.test(D)&&!j&&(j=V("Chrome")),j&&0==j.indexOf(i=/[\d.]+$/.exec(F))&&e.indexOf("/"+i+"-")>-1&&(F=b(F.replace(i,""))),F&&-1!=F.indexOf(D)&&!RegExp(D+" OS").test(F)&&(F=F.replace(RegExp(" *"+y(D)+" *"),"")),L&&!/\b(?:Avant|Nook)\b/.test(D)&&(/Browser|Lunascape|Maxthon/.test(D)||"Safari"!=D&&/^iOS/.test(F)&&/\bSafari\b/.test(L[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(D)&&L[1])&&(i=L[L.length-1])&&I.push(i),I.length&&(I=["("+I.join("; ")+")"]),M&&U&&0>U.indexOf(M)&&I.push("on "+M),U&&I.push((/^on /.test(I[I.length-1])?"":"on ")+U),F&&(s=(i=/ ([\d.+]+)$/.exec(F))&&"/"==F.charAt(F.length-i[0].length-1),F={architecture:32,family:i&&!s?F.replace(i[0],""):F,version:i?i[1]:null,toString:function(){var e=this.version;return this.family+(e&&!s?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(i=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(C))&&!/\bi686\b/i.test(C)?(F&&(F.architecture=64,F.family=F.family.replace(RegExp(" *"+i),"")),D&&(/\bWOW64\b/i.test(e)||T&&/\w(?:86|32)$/.test(u.cpuClass||u.platform)&&!/\bWin64; x64\b/i.test(e))&&I.unshift("32-bit")):F&&/^OS X/.test(F.family)&&"Chrome"==D&&parseFloat(j)>=39&&(F.architecture=64),e||(e=null);var K={};return K.description=e,K.layout=L&&L[0],K.manufacturer=M,K.name=D,K.prerelease=N,K.product=U,K.ua=e,K.version=D&&j,K.os=F||{architecture:null,family:null,version:null,toString:function(){return"null"}},K.parse=m,K.toString=function(){return this.description||""},K.version&&I.unshift(j),K.name&&I.unshift(D),F&&D&&!(F==String(F).split(" ")[0]&&(F==D.split(" ")[0]||U))&&I.push(U?"("+F+")":"on "+F),I.length&&(K.description=I.join(" ")),K}var _=m();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(o.platform=_,define(function(){return _})):i&&s?h(_,function(e,t){i[t]=e}):o.platform=_}).call(this)},5539(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},8183(e,t,r){"use strict";var n=r(6334),o=r(4816);e.exports={formats:r(5539),parse:o,stringify:n}},4816(e,t,r){"use strict";var n=r(1954),o=Object.prototype.hasOwnProperty,i=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},c=function(e,t){var r={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=t.parameterLimit===1/0?void 0:t.parameterLimit,u=c.split(t.delimiter,t.throwOnLimitExceeded&&void 0!==l?l+1:l);if(t.throwOnLimitExceeded&&void 0!==l&&u.length>l)throw RangeError("Parameter limit exceeded. Only "+l+" parameter"+(1===l?"":"s")+" allowed.");var f=-1,p=t.charset;if(t.charsetSentinel)for(d=0;d<u.length;++d)0===u[d].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[d]?p="utf-8":"utf8=%26%2310003%3B"===u[d]&&(p="iso-8859-1"),f=d,d=u.length);for(d=0;d<u.length;++d)if(d!==f){var d,h,g,y=u[d],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;if(-1===b?(h=t.decoder(y,s.decoder,p,"key"),g=t.strictNullHandling?null:""):null!==(h=t.decoder(y.slice(0,b),s.decoder,p,"key"))&&(g=n.maybeMap(a(y.slice(b+1),t,i(r[h])?r[h].length:0),function(e){return t.decoder(e,s.decoder,p,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=String(g).replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),y.indexOf("[]=")>-1&&(g=i(g)?[g]:g),t.comma&&i(g)&&g.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");g=n.combine([],g,t.arrayLimit,t.plainObjects)}if(null!==h){var m=o.call(r,h);m&&("combine"===t.duplicates||y.indexOf("[]=")>-1)?r[h]=n.combine(r[h],g,t.arrayLimit,t.plainObjects):m&&"last"!==t.duplicates||(r[h]=g)}}return r},l=function(e,t,r,o){var i=0;if(e.length>0&&"[]"===e[e.length-1]){var s=e.slice(0,-1).join("");i=Array.isArray(t)&&t[s]?t[s].length:0}for(var c=o?t:a(t,r,i),l=e.length-1;l>=0;--l){var u,f=e[l];if("[]"===f&&r.parseArrays)u=n.isOverflow(c)?c:r.allowEmptyArrays&&(""===c||r.strictNullHandling&&null===c)?[]:n.combine([],c,r.arrayLimit,r.plainObjects);else{u=r.plainObjects?{__proto__:null}:{};var p="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,d=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,h=parseInt(d,10),g=!isNaN(h)&&f!==d&&String(h)===d&&h>=0&&r.parseArrays;if(r.parseArrays||""!==d)if(g&&h<r.arrayLimit)(u=[])[h]=c;else if(g&&r.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");else g?(u[h]=c,n.markOverflow(u,h)):"__proto__"!==d&&(u[d]=c);else u={0:c}}c=u}return c},u=function(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&o.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var n=[],i=r.indexOf("["),s=i>=0?r.slice(0,i):r;if(s){if(!t.plainObjects&&o.call(Object.prototype,s)&&!t.allowPrototypes)return;n[n.length]=s}for(var a=r.length,c=i,l=0;c>=0&&l<t.depth;){for(var u=1,f=c+1,p=-1;f<a&&p<0;){var d=r.charCodeAt(f);91===d?u+=1:93===d&&0==(u-=1)&&(p=f),f+=1}if(p<0)return n[n.length]="["+r.slice(c)+"]",n;var h=r.slice(c,p+1),g=h.slice(1,-1);if(!t.plainObjects&&o.call(Object.prototype,g)&&!t.allowPrototypes)return;n[n.length]=h,l+=1,c=r.indexOf("[",p+1)}if(c>=0){if(!0===t.strictDepth)throw RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");n[n.length]="["+r.slice(c)+"]"}return n},f=function(e,t,r,n){if(e){var o=u(e,r);if(o)return l(o,t,r,n)}},p=function(e){if(!e)return s;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?s.charset:e.charset,r=void 0===e.duplicates?s.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||s.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:s.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:s.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:s.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};e.exports=function(e,t){var r=p(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var o="string"==typeof e?c(e,r):e,i=r.plainObjects?{__proto__:null}:{},s=Object.keys(o),a=0;a<s.length;++a){var l=s[a],u=f(l,o[l],r,"string"==typeof e);i=n.merge(i,u,r)}return!0===r.allowSparse?i:n.compact(i)}},6334(e,t,r){"use strict";var n=r(6278),o=r(1954),i=r(5539),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,c(t)?t:[t])},f=Date.prototype.toISOString,p=i.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},h={},g=function e(t,r,i,s,a,l,f,p,g,y,v,b,m,_,S,w,k,O){for(var E,x,A=t,P=O,R=0,C=!1;void 0!==(P=P.get(h))&&!C;){var I=P.get(t);if(R+=1,void 0!==I)if(I===R)throw RangeError("Cyclic object value");else C=!0;void 0===P.get(h)&&(R=0)}if("function"==typeof y?A=y(r,A):A instanceof Date?A=m(A):"comma"===i&&c(A)&&(A=o.maybeMap(A,function(e){return e instanceof Date?m(e):e})),null===A){if(l)return S(g&&!w?g(r,d.encoder,k,"key",_):r);A=""}if("string"==typeof(E=A)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||o.isBuffer(A))return g?[S(w?r:g(r,d.encoder,k,"key",_))+"="+S(g(A,d.encoder,k,"value",_))]:[S(r)+"="+S(String(A))];var N=[];if(void 0===A)return N;if("comma"===i&&c(A))w&&g&&(A=o.maybeMap(A,function(e){return null==e?e:g(e)})),x=[{value:A.length>0?A.join(",")||null:void 0}];else if(c(y))x=y;else{var T=Object.keys(A);x=v?T.sort(v):T}var j=p?String(r).replace(/\./g,"%2E"):String(r),L=s&&c(A)&&1===A.length?j+"[]":j;if(a&&c(A)&&0===A.length)return L+"[]";for(var D=0;D<x.length;++D){var U=x[D],M="object"==typeof U&&U&&void 0!==U.value?U.value:A[U];if(!f||null!==M){var F=b&&p?String(U).replace(/\./g,"%2E"):String(U),B=c(A)?"function"==typeof i?i(L,F):L:L+(b?"."+F:"["+F+"]");O.set(t,R);var V=n();V.set(h,O),u(N,e(M,B,i,s,a,l,f,p,"comma"===i&&w&&c(A)?null:g,y,v,b,m,_,S,w,k,V))}}return N},y=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t,r=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==e.format){if(!s.call(i.formatters,e.format))throw TypeError("Unknown format option provided.");n=e.format}var o=i.formatters[n],l=d.filter;if(("function"==typeof e.filter||c(e.filter))&&(l=e.filter),t=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:t,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:l,format:n,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}};e.exports=function(e,t){var r,o=e,i=y(t);"function"==typeof i.filter?o=(0,i.filter)("",o):c(i.filter)&&(r=i.filter);var s=[];if("object"!=typeof o||null===o)return"";var l=a[i.arrayFormat],f="comma"===l&&i.commaRoundTrip;r||(r=Object.keys(o)),i.sort&&r.sort(i.sort);for(var p=n(),d=0;d<r.length;++d){var h=r[d];if(null!=h){var v=o[h];i.skipNulls&&null===v||u(s,g(v,h,l,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}}var b=s.join(i.delimiter),m=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&("iso-8859-1"===i.charset?m+="utf8=%26%2310003%3B"+i.delimiter:m+="utf8=%E2%9C%93"+i.delimiter),b.length>0?m+b:""}},1954(e,t,r){"use strict";var n=r(5539),o=r(6278),i=Object.prototype.hasOwnProperty,s=Array.isArray,a=o(),c=function(e,t){return a.set(e,t),e},l=function(e){return a.has(e)},u=function(e){return a.get(e)},f=function(e,t){a.set(e,t)},p=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),d=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(s(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&(n[n.length]=r[o]);t.obj[t.prop]=n}}},h=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:h,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t,r,n){if(l(e)){var o=u(e)+1;return e[o]=t,f(e,o),e}var i=[].concat(e,t);return i.length>r?c(h(i,{plainObjects:n}),i.length-1):i},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],s=Object.keys(i),a=0;a<s.length;++a){var c=s[a],l=i[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t[t.length]={obj:i,prop:c},r[r.length]=l)}return d(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var a="",c=0;c<s.length;c+=1024){for(var l=s.length>=1024?s.slice(c,c+1024):s,u=[],f=0;f<l.length;++f){var d=l.charCodeAt(f);if(45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===n.RFC1738&&(40===d||41===d)){u[u.length]=l.charAt(f);continue}if(d<128){u[u.length]=p[d];continue}if(d<2048){u[u.length]=p[192|d>>6]+p[128|63&d];continue}if(d<55296||d>=57344){u[u.length]=p[224|d>>12]+p[128|d>>6&63]+p[128|63&d];continue}f+=1,d=65536+((1023&d)<<10|1023&l.charCodeAt(f)),u[u.length]=p[240|d>>18]+p[128|d>>12&63]+p[128|d>>6&63]+p[128|63&d]}a+=u.join("")}return a},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:l,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:c,maybeMap:function(e,t){if(s(e)){for(var r=[],n=0;n<e.length;n+=1)r[r.length]=t(e[n]);return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(s(t)){var o=t.length;if(n&&"number"==typeof n.arrayLimit&&o>n.arrayLimit)return c(h(t.concat(r),n),o);t[o]=r}else if(!t||"object"!=typeof t)return[t,r];else if(l(t)){var a=u(t)+1;t[a]=r,f(t,a)}else{if(n&&n.strictMerge)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t){if(l(r)){for(var p=Object.keys(r),d=n&&n.plainObjects?{__proto__:null,0:t}:{0:t},g=0;g<p.length;g++)d[parseInt(p[g],10)+1]=r[p[g]];return c(d,u(r)+1)}var y=[t].concat(r);return n&&"number"==typeof n.arrayLimit&&y.length>n.arrayLimit?c(h(y,n),y.length-1):y}var v=t;return(s(t)&&!s(r)&&(v=h(t,n)),s(t)&&s(r))?(r.forEach(function(r,o){if(i.call(t,o)){var s=t[o];s&&"object"==typeof s&&r&&"object"==typeof r?t[o]=e(s,r,n):t[t.length]=r}else t[o]=r}),t):Object.keys(r).reduce(function(t,o){var s=r[o];if(i.call(t,o)?t[o]=e(t[o],s,n):t[o]=s,l(r)&&!l(t)&&c(t,u(r)),l(t)){var a=parseInt(o,10);String(a)===o&&a>=0&&a>u(t)&&f(t,a)}return t},v)}}},6521(e,t,r){"use strict";var n=r(3109),o=r(6757),i=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n},s=function(e,t){if(e){var r=i(e,t);return r&&r.value}},a=function(e,t,r){var n=i(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},c=function(e,t){if(e)return i(e,t,!0)};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new o("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=c(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return s(e,t)},has:function(t){var r;return!!(r=e)&&!!i(r,t)},set:function(t,r){e||(e={next:void 0}),a(e,t,r)}};return t}},3977(e,t,r){"use strict";var n=r(4295),o=r(8682),i=r(3109),s=r(6757),a=n("%Map%",!0),c=o("Map.prototype.get",!0),l=o("Map.prototype.set",!0),u=o("Map.prototype.has",!0),f=o("Map.prototype.delete",!0),p=o("Map.prototype.size",!0);e.exports=!!a&&function(){var e,t={assert:function(e){if(!t.has(e))throw new s("Side channel does not contain "+i(e))},delete:function(t){if(e){var r=f(e,t);return 0===p(e)&&(e=void 0),r}return!1},get:function(t){if(e)return c(e,t)},has:function(t){return!!e&&u(e,t)},set:function(t,r){e||(e=new a),l(e,t,r)}};return t}},8965(e,t,r){"use strict";var n=r(4295),o=r(8682),i=r(3109),s=r(3977),a=r(6757),c=n("%WeakMap%",!0),l=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("WeakMap.prototype.delete",!0);e.exports=c?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},delete:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(s&&t)return t.delete(r);return!1},get:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?l(e,r):t&&t.get(r)},has:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?f(e,r):!!t&&t.has(r)},set:function(r,n){c&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new c),u(e,r,n)):s&&(t||(t=s()),t.set(r,n))}};return r}:s},6278(e,t,r){"use strict";var n=r(6757),o=r(3109),i=r(6521),s=r(3977),a=r(8965)||s||i;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+o(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=a()),e.set(t,r)}};return t}},4532(e,t,r){!function(e){"use strict";var t,r,n=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),o=n&&"a=1"===new n({a:1}).toString(),i=n&&"+"===new n("s=%2B").get("s"),s=n&&"size"in n.prototype,a="__URLSearchParams__",c=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),l=d.prototype,u=!!(e.Symbol&&e.Symbol.iterator);if(!n||!o||!i||!c||!s){l.append=function(e,t){b(this[a],e,t)},l.delete=function(e){delete this[a][e]},l.get=function(e){var t=this[a];return this.has(e)?t[e][0]:null},l.getAll=function(e){var t=this[a];return this.has(e)?t[e].slice(0):[]},l.has=function(e){return _(this[a],e)},l.set=function(e,t){this[a][e]=[""+t]},l.toString=function(){var e,t,r,n,o=this[a],i=[];for(t in o)for(e=0,r=h(t),n=o[t];e<n.length;e++)i.push(r+"="+h(n[e]));return i.join("&")};var f=e.Proxy&&n&&(!i||!c||!o||!s);f?(r=new Proxy(n,{construct:function(e,t){return new e(new d(t[0]).toString())}})).toString=Function.prototype.toString.bind(d):r=d,Object.defineProperty(e,"URLSearchParams",{value:r});var p=e.URLSearchParams.prototype;p.polyfill=!0,!f&&e.Symbol&&(p[e.Symbol.toStringTag]="URLSearchParams"),"forEach"in p||(p.forEach=function(e,t){var r=v(this.toString());Object.getOwnPropertyNames(r).forEach(function(n){r[n].forEach(function(r){e.call(t,r,n,this)},this)},this)}),"sort"in p||(p.sort=function(){var e,t,r,n=v(this.toString()),o=[];for(e in n)o.push(e);for(o.sort(),t=0;t<o.length;t++)this.delete(o[t]);for(t=0;t<o.length;t++){var i=o[t],s=n[i];for(r=0;r<s.length;r++)this.append(i,s[r])}}),"keys"in p||(p.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),y(e)}),"values"in p||(p.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),y(e)}),"entries"in p||(p.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),y(e)}),u&&(p[e.Symbol.iterator]=p[e.Symbol.iterator]||p.entries),"size"in p||Object.defineProperty(p,"size",{get:function(){var e=v(this.toString());if(p===this)throw TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(e).reduce(function(t,r){return t+e[r].length},0)}})}function d(e){((e=e||"")instanceof URLSearchParams||e instanceof d)&&(e=e.toString()),this[a]=v(e)}function h(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function g(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(e){return decodeURIComponent(e)})}function y(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return u&&(r[e.Symbol.iterator]=function(){return r}),r}function v(e){var t={};if("object"==typeof e)if(m(e))for(var r=0;r<e.length;r++){var n=e[r];if(m(n)&&2===n.length)b(t,n[0],n[1]);else throw TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var o in e)e.hasOwnProperty(o)&&b(t,o,e[o]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var i=e.split("&"),s=0;s<i.length;s++){var a=i[s],c=a.indexOf("=");-1<c?b(t,g(a.slice(0,c)),g(a.slice(c+1))):a&&b(t,g(a),"")}}return t}function b(e,t,r){var n="string"==typeof r?r:null!=r&&"function"==typeof r.toString?r.toString():JSON.stringify(r);_(e,t)?e[t].push(n):e[t]=[n]}function m(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(void 0!==r.g?r.g:"u">typeof window?window:this)},9368(e){"use strict";e.exports=n},650(e){"use strict";e.exports=r},9207(t){"use strict";t.exports=e},5416(e){"use strict";e.exports=t},5610(){},7791(){},6550(){}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var a={};return(()=>{"use strict";let e;s.r(a),s.d(a,{DefaultHeaderHeight:()=>"50px",EventProviderStatus:()=>o,Manager:()=>rs,DefaultBoxShadowBottom:()=>t4,DefaultDisabledOpacity:()=>"0.3",DEFAULT_ICONSET:()=>re,DEFAULT_LANGUAGES:()=>rn,Util:()=>l,DefaultColor9:()=>t3,OREvent:()=>c,DefaultColor11:()=>t8,default:()=>rc,DefaultColor8:()=>t2,manager:()=>ra,DefaultColor7:()=>tX,DefaultColor2:()=>tZ,DefaultColor3:()=>t5,OPENREMOTE_CLIENT_ID:()=>rt,Console:()=>tv,normaliseConfig:()=>ri,DefaultBoxShadow:()=>t9,ORError:()=>i,DefaultColor10:()=>t6,DefaultColor6:()=>t1,DefaultColor4:()=>tY,DefaultColor1:()=>tQ,DefaultColor5:()=>t0,I18NEXT_TO_MOMENT_LOCALE:()=>ro,RESTRICTED_USER_REALM_ROLE:()=>rr,WebSocketEventProvider:()=>tx,subscribe:()=>tJ});var t,r,n,o,i,c,l={};s.r(l),s.d(l,{AssetQueryHelper:()=>th,Deferred:()=>ew,arrayRemove:()=>ej,blobToBase64:()=>tp,camelCaseToSentenceCase:()=>eD,capitaliseFirstLetter:()=>eM,cronStringToISOString:()=>eW,dateToCronString:()=>eH,difference:()=>eT,dispatchCancellableEvent:()=>tf,formatCronString:()=>eK,generateUniqueUUID:()=>td,getAllowedValueLabel:()=>eZ,getAssetTypeLabel:()=>eX,getAttributeLabel:()=>e1,getAttributeUnits:()=>tt,getAttributeValueAsString:()=>e3,getAttributeValueConstraints:()=>e7,getAttributeValueFormat:()=>tn,getBrowserLanguage:()=>ek,getComplexMetaItems:()=>eY,getEnumKeyAsString:()=>eF,getGeoNotificationsFromRulesSet:()=>ex,getMetaItemNameValueHolder:()=>e0,getMetaLabel:()=>e2,getMetaUnits:()=>tr,getMetaValue:()=>eq,getMetaValueAsString:()=>e6,getMetaValueConstraints:()=>te,getMetaValueFormat:()=>to,getPrimitiveMetaItems:()=>eJ,getQueryParameter:()=>eE,getQueryParameters:()=>eO,getValueAsString:()=>e4,getValueDescriptorLabel:()=>eQ,getWeekNumber:()=>eB,hasMetaItem:()=>eG,isComplexValueDescriptor:()=>e$,isObject:()=>eI,isPrimitiveValueDescriptor:()=>ez,isTimeDuration:()=>eP,isTimeDurationNegativeInfinity:()=>eC,isTimeDurationPositiveInfinity:()=>eR,loadJs:()=>tc,mergeObjects:()=>function e(t,r,n){if(t&&!r)return Object.assign({},t);if(r&&!t)return Object.assign({},r);let o=Object.assign({},t),i=[];return Object.entries(r).forEach(([t,r])=>{var s,a,c,l,u;let f;s=o,a=i,c=t,l=r,u=n,f=s,a.forEach(e=>{f.hasOwnProperty(e)||(f[e]={}),f=f[e]}),f&&(f.hasOwnProperty(c)?null==l?delete f[c]:Array.isArray(f[c])?u?f[c]=[...f[c],...l]:f[c]=[...l]:"object"==typeof l?f[c]=e(Object.assign({},f[c]),l,u):f[c]=l:null==l?delete f[c]:Array.isArray(l)?f[c]=[...l]:"object"==typeof l?f[c]=Object.assign({},l):f[c]=l)}),o},objectsEqual:()=>eN,resolveUnits:()=>e9,sentenceCaseToCamelCase:()=>eL,sortByNumber:()=>tl,sortByString:()=>tu,stringMatch:()=>eU,updateAsset:()=>ta}),s(4532);var u=s(650);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=f(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function g(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return(v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function m(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return y(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var E={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},x=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.init(t,r)}return g(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||E,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,O(O({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),A=function(){function e(){p(this,e),this.observers={}}return g(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function P(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function R(e){return null==e?"":""+e}function C(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var s=n(i.shift());!e[s]&&r&&(e[s]=new r),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return o()?{}:{obj:e,k:n(i.shift())}}function I(e,t,r){var n=C(e,t,Object);n.obj[n.k]=r}function N(e,t){var r=C(e,t),n=r.obj,o=r.k;if(n)return n[o]}function T(e,t,r){var n=N(e,r);return void 0!==n?n:N(t,r)}function j(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var L={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return L[e]}):e}var U="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,M=[" ",",","?","!",";"];function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var V=function(e){b(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),m(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return p(this,n),t=r.call(this),U&&A.call(y(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return g(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(s=e.split("."));var a=N(this.data,s);return a||!i||"string"!=typeof r?a:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),i=t,s=0;s<o.length;++s){if(!i||"string"==typeof i[o[s]]&&s+1<o.length)return;if(void 0===i[o[s]]){for(var a=2,c=o.slice(s,s+a).join(n),l=i[c];void 0===l&&o.length>s+a;)a++,l=i[c=o.slice(s,s+a).join(n)];if(void 0===l)return;if(null===l)return null;if(r.endsWith(c)){if("string"==typeof l)return l;if(c&&"string"==typeof l[c])return l[c]}var u=o.slice(s+a).join(n);if(u)return e(l,u,n);return}i=i[o[s]]}return i}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var s=[e,t];r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."),n=t,t=s[1]),this.addNamespaces(t),I(this.data,s,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),n=r,r=t,t=s[1]),this.addNamespaces(t);var a=N(this.data,s)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(a,r,o):a=B(B({},a),r),I(this.data,s,a),i.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?B(B({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(A),K={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach(function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))}),t}};function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function W(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var q={},G=function(e){b(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),m(this,e)});function n(e){var t,o,i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p(this,n),i=r.call(this),U&&A.call(y(i)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=y(i),t.forEach(function(t){e[t]&&(o[t]=e[t])}),i.options=s,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=x.create("translator"),i}return g(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=M.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),i=!o.test(e);if(!i){var s=e.indexOf(r);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i}(e,r,n);if(i&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:o};var c=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),e=c.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==f(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),c=a.key,l=a.namespaces,u=l[l.length-1],p=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(d){var h=t.nsSeparator||this.options.nsSeparator;return i?(g.res="".concat(u).concat(h).concat(c),g):"".concat(u).concat(h).concat(c)}return i?(g.res=c,g):c}var g=this.resolve(e,t),y=g&&g.res,v=g&&g.usedKey||c,b=g&&g.exactUsedKey||c,m=Object.prototype.toString.apply(y),_=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,w="string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y;if(S&&y&&w&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(m)&&("string"!=typeof _||"[object Array]"!==m)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,y,W(W({},t),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return i?(g.res=k,g):k}if(s){var O="[object Array]"===m,E=O?[]:{},x=O?b:v;for(var A in y)if(Object.prototype.hasOwnProperty.call(y,A)){var P="".concat(x).concat(s).concat(A);E[A]=this.translate(P,W(W({},t),{joinArrays:!1,ns:l})),E[A]===P&&(E[A]=y[A])}y=E}}else if(S&&"string"==typeof _&&"[object Array]"===m)(y=y.join(_))&&(y=this.extendTranslation(y,e,t,r));else{var R=!1,C=!1,I=void 0!==t.count&&"string"!=typeof t.count,N=n.hasDefaultValue(t),T=I?this.pluralResolver.getSuffix(p,t.count,t):"",j=t["defaultValue".concat(T)]||t.defaultValue;!this.isValidLookup(y)&&N&&(R=!0,y=j),this.isValidLookup(y)||(C=!0,y=c);var L=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:y,D=N&&j!==y&&this.options.updateMissing;if(C||R||D){if(this.logger.log(D?"updateKey":"missingKey",p,u,c,D?j:y),s){var U=this.resolve(c,W(W({},t),{},{keySeparator:!1}));U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var B=0;B<F.length;B++)M.push(F[B]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var V=function(e,r,n){var i=N&&n!==y?n:L;o.options.missingKeyHandler?o.options.missingKeyHandler(e,u,r,i,D,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,u,r,i,D,t),o.emit("missingKey",e,u,r,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?M.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){V([e],c+r,t["defaultValue".concat(r)]||j)})}):V(M,c,j))}y=this.extendTranslation(y,e,t,g,r),C&&y===c&&this.options.appendNamespaceToMissingKey&&(y="".concat(u,":").concat(c)),(C||R)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(c):c,R?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(g.res=y,g):y}},{key:"extendTranslation",value:function(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,W(W({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(W(W({},r),{interpolation:W(W({},this.options.interpolation),r.interpolation)}));var s,a="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=W(W({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),a){var u=e.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return o&&o[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var f=r.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=K.handle(p,e,t,this.options&&this.options.postProcessPassResolved?W({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!s.isValidLookup(t)){var c=s.extractFromKey(e,a),l=c.key;r=l;var u=c.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var f=void 0!==a.count&&"string"!=typeof a.count,p=f&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach(function(e){s.isValidLookup(t)||(i=e,!q["".concat(h[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(i)&&(q["".concat(h[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(r,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(function(r){if(!s.isValidLookup(t)){o=r;var i,c=[l];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(c,l,r,e,a);else{f&&(u=s.pluralResolver.getSuffix(r,a.count,a));var u,h="".concat(s.options.pluralSeparator,"zero");if(f&&(c.push(l+u),p&&c.push(l+h)),d){var g="".concat(l).concat(s.options.contextSeparator).concat(a.context);c.push(g),f&&(c.push(g+u),p&&c.push(g+h))}}for(;i=c.pop();)s.isValidLookup(t)||(n=i,t=s.getResource(r,e,i,a))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(A);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $=function(){function e(t){p(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}return g(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=z(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=z(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=z(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&i(r.formatLanguageCode(e))}),o}}]),e}(),J=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Y={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},X=["v1","v2","v3"],Q={zero:0,one:1,two:2,few:3,many:4,other:5},Z=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.languageUtils=t,this.options=n,this.logger=x.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},J.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:Y[e.fc]}})}),r)}return g(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return Q[e]-Q[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!X.includes(this.options.compatibilityJSON)}}]),e}();function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var er=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.logger=x.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return g(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:D,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?j(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?j(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?j(t.nestingPrefix):t.nestingPrefixEscaped||j("$t("),this.nestingSuffix=t.nestingSuffix?j(t.nestingSuffix):t.nestingSuffixEscaped||j(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,s,a=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(0>e.indexOf(a.formatSeparator)){var o=T(t,c,e);return a.alwaysFormat?a.format(o,void 0,r,et(et(et({},n),t),{},{interpolationkey:e})):o}var i=e.split(a.formatSeparator),s=i.shift().trim(),l=i.join(a.formatSeparator).trim();return a.format(T(t,c,s),l,r,et(et(et({},n),t),{},{interpolationkey:s}))};this.resetRegExp();var f=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?l(a.escape(e)):l(e)}}].forEach(function(t){for(s=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(i=u(r)))if("function"==typeof f){var c=f(e,o,n);i="string"==typeof c?c:""}else if(n&&n.hasOwnProperty(r))i="";else if(p){i=o[0];continue}else a.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),i="";else"string"==typeof i||a.useRawValueToEscape||(i=R(i));var l=t.safeValue(i);if(e=e.replace(o[0],l),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=et({},i);function a(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var i=(o=this.interpolate(o,s)).match(/'/g),a=o.match(/"/g);(i&&i.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{s=JSON.parse(o),t&&(s=et(et({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;r=this.nestingRegexp.exec(e);){var c=[],l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var u=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=u.shift(),c=u,l=!0}if((n=t(a.call(this,r[1].trim(),s),s))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=R(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=c.reduce(function(e,t){return o.format(e,t,i.lng,et(et({},i),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function en(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?en(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ei(e){var t={};return function(r,n,o){var i=n+JSON.stringify(o),s=t[i];return s||(s=e(n,o),t[i]=s),s(r)}}var es=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.logger=x.create("formatter"),this.options=t,this.formats={number:ei(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:ei(function(e,t){var r=new Intl.NumberFormat(e,eo(eo({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:ei(function(e,t){var r=new Intl.DateTimeFormat(e,eo({},t));return function(e){return r.format(e)}}),relativetime:ei(function(e,t){var r=new Intl.RelativeTimeFormat(e,eo({},t));return function(e){return r.format(e,t.range||"day")}}),list:ei(function(e,t){var r=new Intl.ListFormat(e,eo({},t));return function(e){return r.format(e)}})},this.init(t)}return g(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=ei(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var i=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(":"))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return w(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?w(e,void 0):void 0}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=n[0],i=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=i),"false"===i&&(r[o.trim()]=!1),"true"===i&&(r[o.trim()]=!0),isNaN(i)||(r[o.trim()]=parseInt(i,10))}})}return{formatName:t,formatOptions:r}}(t),s=i.formatName,a=i.formatOptions;if(o.formats[s]){var c=e;try{var l=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},u=l.locale||l.lng||n.locale||n.lng||r;c=o.formats[s](e,u,eo(eo(eo({},a),n),l))}catch(e){o.logger.warn(e)}return c}return o.logger.warn("there was no format function for ".concat(s)),e},e)}}]),e}();function ea(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ec(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ea(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ea(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var el=function(e){b(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),m(this,e)});function n(e,t,o){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p(this,n),i=r.call(this),U&&A.call(y(i)),i.backend=e,i.store=t,i.services=o,i.languageUtils=o.languageUtils,i.options=s,i.logger=x.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=s.maxParallelReads||10,i.readingCalls=0,i.maxRetries=s.maxRetries>=0?s.maxRetries:5,i.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,s.backend,s),i}return g(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i={},s={},a={},c={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var a="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[a]=2:o.state[a]<0||(1===o.state[a]?void 0===s[a]&&(s[a]=!0):(o.state[a]=1,n=!1,void 0===s[a]&&(s[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===c[t]&&(c[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var s={};this.queue.forEach(function(r){var n,a,c,l;n=r.loaded,(c=(a=C(n,[o],Object)).obj)[l=a.k]=c[l]||[],c[l].push(i),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){s[e]||(s[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===s[e][t]&&(s[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:i,callback:s}):(this.readingCalls++,this.backend[r](e,t,function(a,c){if(n.readingCalls--,n.waitingReads.length>0){var l=n.waitingReads.shift();n.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}a&&c&&o<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,o+1,2*i,s)},i):s(a,c)})):s(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,function(n,s){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&s&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),s),t.loaded(e,n,s)})}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null==r||""===r||(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,ec(ec({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(A);function eu(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ef(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ep(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ef(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ef(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ed(){}var eh=function(e){b(n,e);var t,r=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),m(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(p(this,n),t=r.call(this),U&&A.call(y(t)),t.options=eu(o),t.services={},t.logger=x,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=y(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),i&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,i),m(t,y(t));setTimeout(function(){t.init(o,i)},0)}return t}return g(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===f(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===f(e[2])||"object"===f(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=ep(ep(ep({},n),this.options),eu(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ep(ep({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?x.init(o(this.modules.logger),this.options):x.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"u">typeof Intl&&(i=es);var i,s=new $(this.options);this.store=new V(this.options.resources,this.options);var a=this.services;a.logger=x,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new Z(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(a.formatter=o(i),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new er(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new el(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(a.languageDetector=o(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=o(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new G(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=ed),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var l=P(),u=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ed,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var i=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>i.indexOf(e)&&i.push(e)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return s(e)}),this.options.preload&&this.options.preload.forEach(function(e){return s(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=P();return e||(e=this.languages),t||(t=this.options.ns),r||(r=ed),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&K.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=P();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},i=function(e,i){i?(o(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},s=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==f(o)){for(var i,s=arguments.length,a=Array(s>2?s-2:0),c=2;c<s;c++)a[c-2]=arguments[c];i=n.options.overloadTranslationOptionHandler([t,o].concat(a))}else i=ep({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||r||e.keyPrefix;var l=n.options.keySeparator||".",u=i.keyPrefix?"".concat(i.keyPrefix).concat(l).concat(t):t;return n.t(u,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var s=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var a=r.precheck(this,s);if(void 0!==a)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!o||s(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=P();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=P();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ed,o=ep(ep(ep({},this.options),t),{isClone:!0}),i=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(function(t){i[t]=e[t]}),i.services=ep({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new G(i.services,i.options),i.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];i.emit.apply(i,[e].concat(r))}),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(A);S(eh,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new eh(e,t)});var eg=eh.createInstance();eg.createInstance=eh.createInstance,eg.createInstance,eg.init,eg.loadResources,eg.reloadResources,eg.use,eg.changeLanguage,eg.getFixedT,eg.t,eg.exists,eg.setDefaultNamespace,eg.hasLoadedNamespace,eg.loadNamespaces,eg.loadLanguages;var ey=s(8183),ev=s.n(ey),eb=s(5416),em=s.n(eb),e_=s(3472),eS=s.n(e_);class ew{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),Object.freeze(this)}}function ek(){return navigator.language.split("-")[0]||"en"}function eO(e){return ev().parse(e,{ignoreQueryPrefix:!0})}function eE(e){let t;if(location.search&&""!==location.search&&(t=eO(location.search)),location.hash){let e=location.hash.indexOf("?");e>-1&&(t=eO(location.hash.substring(e+1)))}return t?t[e]:void 0}function ex(e){let t=[];return e.rules.forEach(e=>{if(e.when&&e.then&&e.then.length>0){let r=new Map;for(let n of(function(e,t){if(!e)return;let r=[];e.groups&&e.groups.forEach(e=>{e.items&&e.items.forEach(e=>{r.push(e)})}),e.items&&e.items.forEach(e=>{r.push(e)}),r&&r.forEach(e=>{if(e.assets&&e.assets.attributes){let r=[];if(function e(t,r){t&&(t.items.forEach(e=>{e.value&&("radial"===e.value.predicateType||"rect"===e.value.predicateType)&&r.push({predicate:e.value})}),t.groups&&t.groups.forEach(t=>e(t,r)))}(e.assets.attributes,r),r.length>0){let n=e.tag||"0";t.set(n,r)}}})}(e.when,r),r.size>0&&e.then.forEach(e=>(function(e,t){if(e&&"notification"===e.action&&e.notification&&e.notification.message&&"push"===e.notification.message.type){let r=e.target;if(r&&r.conditionAssets){let n=t.get(r.conditionAssets);n&&n.forEach(t=>{t.notification=e.notification.message})}else for(let r of t.values())r.forEach(t=>{t.notification=e.notification.message})}})(e,r)),r.values()))n.forEach(e=>{e.notification&&t.push(e)})}}),t}let eA=/([+-])?((\d+)[Dd])?\s*((\d+)[Hh])?\s*((\d+)[Mm]$)?\s*((\d+)[Ss])?\s*((\d+)([Mm][Ss]$))?\s*((\d+)[Ww])?\s*((\d+)[Mm][Nn])?\s*((\d+)[Yy])?/;function eP(e){return!!e&&(e=e.trim()).length>0&&(eA.test(e)||eR(e)||eC(e))}function eR(e){return"*"===(e=null!=e?e.trim():void 0)||"+*"===e}function eC(e){return"-*"===(e=null!=e?e.trim():void 0)}function eI(e){return!!e&&"object"==typeof e}function eN(e,t,r=!0){if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function||e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length||e instanceof Date||!(e instanceof Object)||!(t instanceof Object))return!1;if(r){if(Array.isArray(e))return e.every((e,r)=>eN(e,t[r]));let r=Object.keys(e);return Object.keys(t).every(e=>-1!==r.indexOf(e))&&r.every(r=>eN(e[r],t[r]))}return!1}function eT(e,t){let r=(e,t)=>eS()(e,function(e,n,o){eN(n,null==t?void 0:t[o])||(e[o]=eI(n)&&eI(null==t?void 0:t[o])?r(n,null==t?void 0:t[o]):n)});return r(e,t)}function ej(e,t){if(0===e.length)return;let r=e.indexOf(t);r>=0&&e.splice(r,1)}function eL(e){return null==e?"":e.split(" ").map((e,t)=>0===t?e[0].toLowerCase()+e.substring(1):e[0].toUpperCase()+e.substring(1)).join("")}function eD(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map((e,r,n)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){let t=!n[r-1]||"_"===n[r-1],o=r+1<n.length&&n[r+1]&&"_"!==n[r+1],i=r+3>n.length||!n[r+1]&&!n[r+3];(!t||o)&&(e=" "+e),!o&&(t||i)||(e=e.toLowerCase())}return e}).join("").trim()}function eU(e,t){if(t===e)return!0;let r=e.endsWith("*"),n=!r&&e.startsWith("*"),o=!r&&!n&&e.startsWith("^")&&e.endsWith("$");if(r&&t.startsWith(e.substr(0,e.length-1))||n&&t.endsWith(e.substr(1)))return!0;if(o)try{return new RegExp(e).test(t)}catch(e){console.error("Failed to compile needle as a RegExp: "+e)}return!1}function eM(e){if(e)return 1===e.length?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function eF(e,t){return Object.keys(e).find(r=>e[r]===t)}function eB(e){(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));let t=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-t.getTime())/864e5+1)/7)}let eV=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function eK(e,t,r,n,o,i,s){let a="";if(i?Array.isArray(i)?a+=i.toString().replace(" ",""):a+=i.toString():a+="0",a+=" ",o?Array.isArray(o)?a+=o.toString().replace(" ",""):a+=o.toString():a+="0",a+=" ",n?Array.isArray(n)?a+=n.toString().replace(" ",""):a+=n.toString():a+="0",a+=" ",r?Array.isArray(r)?a+=r.toString().replace(" ",""):a+=r.toString():a+="*",a+=" ",t)if(Array.isArray(t))if("number"==typeof t[0]){let e=[];t.forEach(t=>{e.push(eV[t].toString())}),a+=e.toString().replace(" ","")}else a+=t.toString().replace(" ","");else a+=t.toString();else a+="*";return a+=" ",s?a+=s.toString():a+="?",a+=" ",e?Array.isArray(e)?a+=e.toString().replace(" ",""):a+=e:a+="*",a}function eH(e){return eK(e.getFullYear(),eV[e.getMonth()],[e.getDate()],[e.getHours()],[e.getMinutes()])}function eW(e,t){let r=e.split(" ");if(!Number.isNaN(Number(r[0]))&&!Number.isNaN(Number(r[1]))&&!Number.isNaN(Number(r[2]))&&(!Number.isNaN(Number(r[3]))||"*"==r[3])){let e=(!Number.isNaN(Number(r[6]))?r[6]:new Date().getFullYear()).toString(),n="";n=1==(n="*"!=r[4]?eV.indexOf(r[4]).toString():new Date().getMonth().toString()).length?"0"+n:n;let o=1==r[3].length&&"*"!=r[3]?"0"+r[3]:r[3].replace("*","01"),i=1==r[2].length&&"*"!=r[2]?"0"+r[2]:r[2].replace("*","00"),s=1==r[1].length&&"*"!=r[1]?"0"+r[1]:r[1].replace("*","00"),a=1==r[0].length&&"*"!=r[0]?"0"+r[0]:r[0].replace("*","00");if(e.length>0&&n.length>0)if(t)return em().utc({year:Number(e),month:Number(n),date:Number(o),hour:Number(i),minute:Number(s),second:Number(a)}).toISOString();else return em()({year:Number(e),month:Number(n),date:Number(o),hour:Number(i),minute:Number(s),second:Number(a)}).toISOString()}}function eq(e,t,r){let n="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(n)?t.meta[n]:r&&r.meta?r.meta[n]:void 0}function eG(e,t,r){let n="string"==typeof e?e:e.name;return!!(t&&t.meta&&t.meta.hasOwnProperty(n)||r&&r.meta&&r.meta.hasOwnProperty(n))}function ez(e){return!e$(e)}function e$(e){return!!((null==e?void 0:e.jsonType)==="object"||(null==e?void 0:e.arrayDimensions)&&e.arrayDimensions>0)}function eJ(){return u.AssetModelUtil.getMetaItemDescriptors().filter(e=>ez(u.AssetModelUtil.getValueDescriptor(e.type)))}function eY(){return u.AssetModelUtil.getMetaItemDescriptors().filter(e=>e$(u.AssetModelUtil.getValueDescriptor(e.type)))}function eX(e){return("string"==typeof e&&(e=u.AssetModelUtil.getAssetDescriptor(e)),e)?eg.t("label.asset."+e.name,{defaultValue:eD(e.name)}):""}function eQ(e){if(!e)return eg.t("label.value.unknown",{defaultValue:"Unknown"});let t="string"==typeof e?e:e.name;return eg.t("label.value."+t,{defaultValue:eD(t||"")})}function eZ(e,t){if(e)return eg.t("label.allowedValue."+e,{defaultValue:t||eD(e||""),nsSeparator:!1})}function e0(e,t){let r="string"==typeof e?u.AssetModelUtil.getMetaItemDescriptor(e):e;return r?{name:r.name,type:r.type,value:t}:{name:typeof e,type:u.AssetModelUtil.resolveValueTypeFromValue(t),value:t}}function e1(e,t,r,n,o){return e5(e,t,r,n,!0,o)}function e2(e,t,r,n,o){return e5(e||e0(t,null),t,r,n,!1,o)}function e5(e,t,r,n,o,i){let s=ts("label",e,t,r,o),a="";if(s||(s=eq("label",e,t&&t.meta?t:void 0)),n&&(a=e9(ti("units",e,t,r,o))),!s){let r=e?e.name:t?"string"==typeof t?t:t.name:void 0;s=i||(r?eD(r):void 0)}return s?s+(a?" ("+a+")":""):a}function e3(e,t,r,n,o){return e8(e,t,r,n,!0,o)}function e6(e,t,r,n,o){return e8(e||e0(t,null),t,r,n,!1,o)}function e8(e,t,r,n,o,i){let s=e4(e?e.value:void 0,()=>ti("format",e,t,r,o),void 0,i),a=tt(e,t,r);return n&&a&&a.length&&(s=e9(ti("units",e,t,r,o),s)),s}function e4(e,t,r,n){let o="";if(null==e)o=n||"";else if("string"==typeof e)o=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){let n=t&&t();if(n&&0!==Object.keys(n).length)switch("number"==typeof e?n.asBoolean?e=!!e:n.asDate&&(e=new Date(e)):"boolean"==typeof e&&n.asNumber&&(e=+!!e),typeof e){case"number":o=new Intl.NumberFormat(r||eg.language,n).format(e);break;case"boolean":n.asOnOff&&(o=e?eg.t("on"):eg.t("off")),n.asOpenClosed&&(o=e?eg.t("open"):eg.t("closed")),n.asPressedReleased&&(o=e?eg.t("pressed"):eg.t("released"));break;case"object":if(n.momentJsFormat)o=em()(e).format(n.momentJsFormat);else if(n.iso8601)o=e.toISOString();else if(n.week){let t=eB(e);o="2-digit"===n.week?String(t).padStart(2,"0"):Number(t).toString(10)}else o=new Intl.DateTimeFormat(r||eg.language,n).format(e)}else o=Object(e).toString()}return o}function e9(e,t){if(!e)return"";t||(t="");let r=e.map((e,r)=>{if(3!==e.length||e.toUpperCase()!==e)return eg.t(["units."+e,"or:units."+e]);{let n=new Intl.NumberFormat(eg.language,{currency:e,style:"currency"}).formatToParts();if(0!==r||"currency"!==n[0].type)return"currency"===n[0].type?n[0].value:n[n.length-1].value;if(!t)return n[0].value;t=n[0].value+t}}).join("");return t.length>0?t+" "+r:r}function e7(e,t,r){return ti("constraints",e,t,r,!0)}function te(e,t,r){return ti("constraints",e||e0(t,null),t,r,!1)}function tt(e,t,r){return ti("units",e,t,r,!0)}function tr(e,t,r){return ti("units",e||e0(t,null),t,r,!1)}function tn(e,t,r){return ti("format",e,t,r,!0)}function to(e,t,r){return ti("format",e||e0(t,null),t,r,!1)}function ti(e,t,r,n,o){let i,s=[],a=ts(e,t&&"string"==typeof t?t:t?t.name:r?"string"==typeof r?r:r.name:void 0,r,n,o);if(a&&(i=JSON.parse(a)))if("format"!==e)return i;else s.push(i);if(t&&t.meta&&(i=eq(e,t,r)))if("format"!==e)return i;else s.push(i);if(r&&"string"!=typeof r&&r.hasOwnProperty(e)){if(i=r[e],"format"!==e)return i;s.push(i)}if(r&&r.type){if(i=u.AssetModelUtil.getValueDescriptor(r.type)[e],"format"!==e)return i;s.push(i)}if("format"!==e||0===s.length)return i;let c={};return s.reverse().forEach(e=>{c=Object.assign(Object.assign({},c),e)}),c}function ts(e,t,r,n,o,i){let s;if(t?s="string"==typeof t?t:t.name:r&&(s="string"==typeof r?r:r.name),!s)return;let a=[],c=e+"."+(o?"attribute":"meta")+".";if(n&&a.push(c+n+"."+s),r&&"string"!=typeof r&&(a.push(c+r.type+"."+s),a.push(c+r.type)),a.push(c+s),a.length>0)return eg.t(a,{defaultValue:i||""})}function ta(e,t){let r=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[r];else{let n=e.attributes[r];n&&(n.value=t.value,n.timestamp=t.timestamp)}return Object.assign({},e)}function tc(e){return new Promise((t,r)=>{let n=document.createElement("script");n.type="text/javascript",n.src=e,n.addEventListener("load",e=>t(e),!1),n.addEventListener("error",e=>r(e),!1),document.body.appendChild(n)})}function tl(e){return(t,r)=>{let n=e(t),o=e(r);return n||o?n&&!o?1:!n&&o?-1:n-o:0}}function tu(e){return(t,r)=>{let n=e(t),o=e(r);return n||o?n&&!o?1:!n&&o?-1:n.localeCompare(o):0}}function tf(e,t){let r=new ew;return e.dispatchEvent(t),window.setTimeout(()=>{r.resolve(t.detail)}),r.promise}function tp(e){return new Promise((t,r)=>{let n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)},n.onerror=e=>{r(e)}})}function td(){return"function"==typeof crypto.randomUUID?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}class th{constructor(e){e&&Object.assign(this,e)}matches(e){var t,r,n,o,i,s,a;if((null==(t=this.ids)?void 0:t.length)&&(!e.id||!this.ids.includes(e.id))||(null==(r=this.types)?void 0:r.length)&&(!e.type||!this.types.includes(e.type))||(null==(n=this.realm)?void 0:n.name)&&e.realm!==this.realm.name||(null==(o=this.parents)?void 0:o.length)&&!this.parents.some(t=>!t.id||e.parentId===t.id))return!1;if(null==(i=this.paths)?void 0:i.length){let t=null!=(s=e.path)?s:[];if(!this.paths.some(e=>{var r;return(null!=(r=e.path)?r:[]).every((e,r)=>t[r]===e)}))return!1}return(null==(a=this.names)||!a.length||!!this.names.every(t=>th._evalValuePredicate(e.name,t)))&&(!this.attributes||th._evalGroup(e,this.attributes))}static getUnsupportedFields(e){return Object.keys(e).filter(e=>!th._SUPPORTED_FIELDS.has(e))}collectAttributeNames(){return this.attributes?th._collectNames(this.attributes):[]}static _evalValuePredicate(e,t){var r;switch(t.predicateType){case"string":{let n;if(null==e)return!1;let o=!1!==t.caseSensitive?String(e):String(e).toLowerCase(),i=!1!==t.caseSensitive?t.value:null==(r=t.value)?void 0:r.toLowerCase();switch(t.match){case"BEGIN":n=o.startsWith(i);break;case"END":n=o.endsWith(i);break;case"CONTAINS":n=o.includes(i);break;default:n=o===i}return t.negate?!n:n}case"boolean":return e===t.value;case"number":{let r;if("number"!=typeof e)return!1;switch(t.operator){case"GREATER_THAN":r=e>t.value;break;case"GREATER_EQUALS":r=e>=t.value;break;case"LESS_THAN":r=e<t.value;break;case"LESS_EQUALS":r=e<=t.value;break;case"BETWEEN":r=e>=t.value&&e<=t.rangeValue;break;default:r=e===t.value}return t.negate?!r:r}}return!1}static _evalPredicate(e,t){var r,n;let o=null==(r=t.name)?void 0:r.value;if(!o)return!0;let i=null==(n=e.attributes)?void 0:n[o];if(!i)return!!t.negated;let s=!t.value||th._evalValuePredicate(i.value,t.value);return t.negated?!s:s}static _evalGroup(e,t){var r,n,o;let i=null!=(r=t.operator)?r:"AND",s=[...(null!=(n=t.items)?n:[]).map(t=>th._evalPredicate(e,t)),...(null!=(o=t.groups)?o:[]).map(t=>th._evalGroup(e,t))];return!s.length||("OR"===i?s.some(Boolean):s.every(Boolean))}static _collectNames(e){var t,r;return[...(null!=(t=e.items)?t:[]).map(e=>{var t;return null==(t=e.name)?void 0:t.value}).filter(e=>!!e),...(null!=(r=e.groups)?r:[]).flatMap(e=>th._collectNames(e))]}}th._SUPPORTED_FIELDS=new Set(["ids","types","names","parents","paths","realm","attributes"]);var tg=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};let ty=s(4461);class tv{constructor(e,t,r){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=e,this._autoEnable=t,this._enableCompleteCallback=r,window.OpenRemoteConsole=this;let n=new URLSearchParams(window.location.search),o=n.get("consoleName"),i=n.get("consoleVersion"),s=n.get("consolePlatform"),a=n.get("consoleProviders"),c=n.get("consoleAutoEnable"),l=a&&a.length>0?a.split(" "):["push"];this._pendingProviderEnables=l;let u=tv._createConsoleRegistration(),f=window.localStorage.getItem(this._storageKey);if(f)try{let e=JSON.parse(f);e.id&&(u.id=e.id),e.name&&(u.name=e.name),e.providers&&(u.providers=e.providers),e.apps&&(u.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let p=u.providers;for(let e of(u.providers={},l)){let t=p&&p.hasOwnProperty(e)?p[e]:{enabled:!1,disabled:!1};u.providers[e]=t}let d=rc.getAppName();d.length>0&&0>u.apps.indexOf(d)&&u.apps.push(d),this._registration=u,o&&(u.name=o),i&&(u.version=i),s&&(u.platform=s),c&&(this._autoEnable="TRUE"===c||"true"===c)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return tg(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 e of Object.keys(this._registration.providers))yield this._initialiseProvider(e);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(e){console.error(e)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return tg(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let e=this._pendingProviderEnables.length-1;e>-1;e--){let t=this._pendingProviderEnables[e];yield this.enableProvider(t)}})}enableProvider(e,t){return tg(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(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: enabling provider '"+e+"'");let r={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},n=yield this.sendProviderMessage(r,!0);this._registration.providers[e].hasPermission=n.hasPermission,this._registration.providers[e].success=n.success,this._registration.providers[e].enabled=n.success,this._registration.providers[e].data=n.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration().catch(()=>void 0),this._callCompletedCallback())),n})}disableProvider(e){return tg(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(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: disabling provider '"+e+"'");let t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[e].disabled=!0,this._registration.providers[e].enabled=!1,t})}getProvider(e){return this._registration&&this._registration.providers?this._registration.providers[e]:void 0}sendProviderMessage(e,t){return tg(this,void 0,void 0,function*(){if("storage"!==e.provider&&!this._registration.providers.hasOwnProperty(e.provider))throw console.debug("Invalid console provider '"+e.provider+"'"),Error("Invalid console provider '"+e.provider+"'");if(!t)return void this._doSendProviderMessage(e);let r=e.provider+e.action;if(this._pendingProviderPromises[r])throw Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");let n=new ew,o=()=>{delete this._pendingProviderPromises[r],n.reject("No response from provider")};return this._pendingProviderPromises[r]=[n,window.setTimeout(o,5e3)],this._doSendProviderMessage(e),n.promise})}sendRegistration(){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),new Promise((e,t)=>{this._registrationTimer=window.setTimeout(()=>tg(this,void 0,void 0,function*(){this._registrationTimer=null,console.debug("Console: updating registration");try{yield this._sendRegistration(!0),e()}catch(e){console.error("Failed to register console",e),t(e)}}))})}_sendRegistration(e){return tg(this,void 0,void 0,function*(){this._normaliseRegistration();let t=!!this._registration.id;try{let e=yield rc.rest.api.ConsoleResource.register(this._registration);if(200!==e.status)throw Error("Failed to register console");this._registration=e.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem(this._storageKey,JSON.stringify(this._registration))}catch(r){if(e&&t&&tv._isStaleRegistrationResponse(r)){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 r}})}_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(e){let t=e&&e.response?e.response.status:void 0;return 403===t||409===t}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return tg(this,void 0,void 0,function*(){let t=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:e},!0);try{let e=yield Promise.race([t,new Promise((e,t)=>setTimeout(t,2e3))]);if(e&&e.value){let t=e.value;return"null"===t?void 0:t}}catch(e){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(e,t){this._providerMessageListeners[e.provider+e.action]=t}removeProviderMessageListener(e){delete this._providerMessageListeners[e.provider+e.action]}_postNativeShellMessage(e){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(e));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(e)}catch(e){console.error("Failed to send shell message towards console",e)}}_doSendGenericMessage(e,t){let r={type:e,data:t};this.isMobile?this._postNativeShellMessage(r):console.warn("Failed to send generic message to console.",r)}_doSendProviderMessage(e){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:e});else{if(!e.provider||!e.action)return;switch(e.provider.trim().toUpperCase()){case"PUSH":switch(e.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 '"+e.provider+"' and action '"+e.action+"'")}break;case"STORAGE":switch(e.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 t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'store' action requires a `key`");null===e.value?window.localStorage.removeItem(t):window.localStorage.setItem(t,JSON.stringify(e.value))}break;case"RETRIEVE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'retrieve' action requires a `key`");let r=window.localStorage.getItem(t);if(null!==r)try{r=JSON.parse(r)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:r}))}break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;default:console.error("Unsupported provider: "+e.provider)}}}_handleProviderResponse(e){if(!e)return;let t=JSON.parse(e),r=t.provider,n=t.action,o=this._pendingProviderPromises[r+n];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[r+n],o[0].resolve(t));let i=this._providerMessageListeners[r+n];i&&i(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:ty.name,version:ty.version,platform:ty.os.toString(),apps:[],model:((ty.manufacturer?ty.manufacturer+" ":"")+(ty.product?ty.product:"")).trim()}}_initialiseProvider(e){return tg(this,void 0,void 0,function*(){let t;console.debug("Console: initialising provider '"+e+"'");try{t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_INIT"},!0),this._registration.providers[e].version=t.version,this._registration.providers[e].requiresPermission=t.requiresPermission,this._registration.providers[e].hasPermission=t.hasPermission,this._registration.providers[e].success=t.success,this._registration.providers[e].enabled=t.enabled,this._registration.providers[e].disabled=t.disabled,this._registration.providers[e].data=t.data}catch(e){console.error(e),t={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(t.success||(console.debug("Provider initialisation failed: '"+e+"'"),t.disabled=!0,this._registration.providers[e].disabled=!0),t.disabled||t.enabled){let t=this._pendingProviderEnables.indexOf(e);t>=0&&this._pendingProviderEnables.splice(t,1)}})}}var tb=s(9207),tm=s.n(tb),t_=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};(t=o||(o={})).DISCONNECTED="DISCONNECTED",t.CONNECTED="CONNECTED",t.CONNECTING="CONNECTING";let tS="SUBSCRIBED:",tw="UNAUTHORIZED:",tk="TRIGGERED:",tO="EVENT:";class tE{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=tx.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=o.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(e){this._statusCallbacks.push(e)}unsubscribeStatusChange(e){ej(this._statusCallbacks,e)}connect(){return(console.debug("Attempting to connect to events:",this.endpointUrl),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===o.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(o.CONNECTING),this._connectingDeferred=new ew,this._doConnect().then(e=>{if(this._connectingDeferred){let t=this._connectingDeferred;e?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=tx.MIN_RECONNECT_DELAY,this._onStatusChanged(o.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):console.debug("Failed to connect to event service: "+this.endpointUrl),t.resolve(e)}}).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!==o.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let r={eventSubscription:e,callback:t,deferred:new ew};return null!=this._pendingSubscription||this._status!==o.CONNECTED?(this._queuedSubscriptions.push(r),r.deferred.promise):(this._pendingSubscription=r,this._doSubscribe(e).then(e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();let r=t.deferred;t.deferred=null,r&&r.resolve(e)}},e=>{if(console.error(e),this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let r=t.deferred;t.deferred=null,r&&r.reject(e)}}),this._pendingSubscription.deferred.promise)}unsubscribe(e){return t_(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(e))return void this._doUnsubscribe(e);if(this._assetEventCallbackMap.delete(e)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let e=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(e)}return}if(this._attributeEventCallbackMap.delete(e)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}return}})}sendEvent(e){this._status===o.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==o.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,r){return t_(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,o="AssetEvent"+tE._subscriptionCounter++;if(!this._assetEventPromise){let e;rc.authenticated||(e={filterType:"asset",realm:rc.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(o,e=>{let t=e.asset.id;n?n.find(e=>t===e)&&r(e):e.asset.realm===rc.displayRealm&&r(e)}),this._assetEventPromise.then(()=>{try{if(n&&t){let e={messageID:"read-assets:"+n.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:n}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(o)&&e.assets.forEach(e=>{r({eventType:"asset",asset:e,cause:"READ"})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),o&&this.unsubscribe(o),t}return o})})}subscribeAttributeEvents(e,t,r){return t_(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0],o=n?e.map(e=>e.id):e,i=n?e:void 0,s="AttributeEvent"+tE._subscriptionCounter++;if(!this._attributeEventPromise){let e;rc.authenticated||(e={filterType:"asset",realm:rc.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let a=t=>{let i=t.ref;n?e.forEach(e=>{i.id===e.id&&i.name===e.name&&r(t)}):o?o.find(e=>i.id===e)&&r(t):t.realm===rc.displayRealm&&r(t)};return this._attributeEventCallbackMap.set(s,a),this._attributeEventPromise.then(()=>{try{if(t&&o){let e={messageID:"read-assets:"+o.join(",")+":"+s,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(s)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,r])=>{(!i||i.find(r=>r.id===e.id&&r.name===t))&&a({eventType:"attribute",timestamp:r.timestamp,value:r.value,ref:{id:e.id,name:t}})})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),s&&this.unsubscribe(s),t}return s})})}_processNextSubscription(){this._status===o.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then(t=>{let r=e.deferred;e.deferred=null,r&&r.resolve(t)},t=>{let r=e.deferred;e.deferred=null,r&&r.reject(t)})},0)}_onStatusChanged(e){e!==this._status&&(console.debug("Event provider status changed: "+e),this._status=e,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(t=>t(e))},0))}_onMessageReceived(e,t){let r=this._subscriptionMap.get(e);r&&r.callback(t)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let e in this._subscriptionMap)this._subscriptionMap.has(e)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(e));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===o.CONNECTED&&this._onStatusChanged(o.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(o.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<tx.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(tx.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}tE.MIN_RECONNECT_DELAY=0,tE.MAX_RECONNECT_DELAY=3e4,tE._subscriptionCounter=0;class tx extends tE{get endpointUrl(){return this._endpointUrl}constructor(e){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(e.startsWith("https:")?"wss":"ws")+"://"+e.substr(e.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let e=this._endpointUrl+"?Realm="+rc.config.realm;return this._connectDeferred=new ew,(rc.authenticated?rc.retrieveAuthorizationHeader().then(t=>{e+="&Authorization="+t}):Promise.resolve()).finally(()=>{this._webSocket=new WebSocket(e),this._webSocket.onopen=e=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(console.error("Event provider error:",e),this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.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 e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=e=>{let t=e.data;if(t&&t.startsWith(tS)){let e=JSON.parse(t.substring(tS.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&r.resolve(e.subscriptionId)}else if(t.startsWith(tw)){let e=JSON.parse(t.substring(tw.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&(console.warn("Unauthorized event subscription: "+JSON.stringify(e,null,2)),r.reject("Unauthorized"))}else if(t.startsWith(tk)){let e=JSON.parse(t.substring(tk.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(tO)){let e=JSON.parse(t.substring(tO.length));if(e.messageID){let t=this._repliesDeferred.get(e.messageID);this._repliesDeferred.delete(e.messageID),t&&t.resolve(e)}}}}),this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var e;null==(e=this._webSocket)||e.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(e){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new ew,e.subscriptionId||(e.subscriptionId=tx._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(e)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(e){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:e}))}_doSend(e){let t=tO+JSON.stringify(e);this._webSocket.send(t)}_doSendWithReply(e){if(e.messageID||(e.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(e.messageID))return Promise.reject("There's already a pending send and reply with this ID");let t=new ew;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(tO+JSON.stringify(e)),t.promise}}tx._subscriptionCounter=1;let tA=["__proto__","constructor","prototype"];function tP(e){return!("string"!=typeof e||0===e.length||e.length>128||tA.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function tR(e){return!(!tP(e)||e.indexOf("/")>-1)}let tC={lng:tR,ns:function(e){return tP(e)}};function tI(e){return"string"!=typeof e?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function tN(){return"function"==typeof XMLHttpRequest||"object"==typeof XMLHttpRequest}let tT=/\{\{(.+?)\}\}/g;function tj(e,t){let r=!1,n=e.replace(tT,(e,n)=>{let o=n.trim();if(tA.indexOf(o)>-1)return e;let i=t[o];if(null==i)return e;let s=tC[o]||tR,a=String(i).split("+");for(let t of a)if(!s(t))return r=!0,e;return a.join("+")});return r?null:n}let tL="u">typeof globalThis?globalThis:"u">typeof global?global:"u">typeof window?window:void 0;"function"==typeof fetch?e=fetch:tL&&"function"==typeof tL.fetch&&(e=tL.fetch);let tD=tN()&&tL?tL.XMLHttpRequest:void 0,tU="function"==typeof ActiveXObject&&tL?tL.ActiveXObject:void 0,tM=["__proto__","constructor","prototype"],tF=(e,t)=>{if(t&&"object"==typeof t){let r="";for(let e of Object.keys(t))tM.indexOf(e)>-1||(r+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]));if(!r)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+r.slice(1)}return e},tB=(t,r,n,o)=>{let i=e=>{if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(o){let e=o(t,r);if(e instanceof Promise)return void e.then(i).catch(n)}"function"==typeof fetch?fetch(t,r).then(i).catch(n):e(t,r).then(i).catch(n)},tV=(t,r,n,o)=>{if("function"==typeof n&&(o=n,n=void 0),o=o||(()=>{}),e&&0!==r.indexOf("file:")){var i=r,s=n,a=o;t.queryStringParams&&(i=tF(i,t.queryStringParams));let e={..."function"==typeof t.customHeaders?t.customHeaders():t.customHeaders};"u"<typeof window&&"u">typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(e["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),s&&(e["Content-Type"]="application/json");let c="function"==typeof t.requestOptions?t.requestOptions(s):t.requestOptions,l={method:s?"POST":"GET",body:s?t.stringify(s):void 0,headers:e,...t._omitFetchOptions?{}:c},u="function"==typeof t.alternateFetch&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{tB(i,l,a,u)}catch(e){if(!c||0===Object.keys(c).length||!e.message||0>e.message.indexOf("not implemented"))return a(e);try{Object.keys(c).forEach(e=>{delete l[e]}),tB(i,l,a,u),t._omitFetchOptions=!0}catch(e){a(e)}}return}if(tN()||"function"==typeof ActiveXObject){var c=r,l=n,u=o;l&&"object"==typeof l&&(l=tF("",l).slice(1)),t.queryStringParams&&(c=tF(c,t.queryStringParams));try{let e=tD?new tD:new tU("MSXML2.XMLHTTP.3.0");e.open(l?"POST":"GET",c,1),t.crossDomain||e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.withCredentials=!!t.withCredentials,l&&e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.overrideMimeType&&e.overrideMimeType("application/json");let r=t.customHeaders;if(r="function"==typeof r?r():r)for(let t of Object.keys(r))tM.indexOf(t)>-1||e.setRequestHeader(t,r[t]);e.onreadystatechange=()=>{e.readyState>3&&u(e.status>=400?e.statusText:null,{status:e.status,data:e.responseText})},e.send(l)}catch(e){console&&console.log(e)}return}o(Error("No fetch and no xhr implementation found!"))};var tK=class{constructor(e,t={},r={}){this.services=e,this.options=t,this.allOptions=r,this.type="backend",this.init(e,t,r)}init(e,t={},r={}){if(this.services=e,this.options={...{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,r)=>({[t]:r||""}),parseLoadPayload:(e,t)=>void 0,request:tV,reloadInterval:"u"<typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}},...this.options||{},...t},this.allOptions=r,this.services&&this.options.reloadInterval){let e=setInterval(()=>this.reload(),this.options.reloadInterval);"object"==typeof e&&"function"==typeof e.unref&&e.unref()}}readMulti(e,t,r){this._readAny(e,e,t,t,r)}read(e,t,r){this._readAny([e],e,[t],t,r)}_readAny(e,t,r,n,o){var i,s;let a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,r)),(a=(s=i=a)&&"function"==typeof s.then?i:Promise.resolve(i)).then(i=>{if(!i)return o(null,{});let s=tj(i,{lng:e.join("+"),ns:r.join("+")});if(null==s)return o(Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+e.map(tI).join(", ")+"] namespaces=["+r.map(tI).join(", ")+"]"),!1);this.loadUrl(s,o,t,n)})}loadUrl(e,t,r,n){let o=this.options.parseLoadPayload("string"==typeof r?[r]:r,"string"==typeof n?[n]:n),i=tI(function(e){if("string"!=typeof e||0===e.length)return e;try{let t=new URL(e);if(t.username||t.password)return t.username="",t.password="",t.toString();return e}catch(t){return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(e));this.options.request(this.options,e,o,(e,o)=>{let s,a;if(o&&(o.status>=500&&o.status<600||!o.status))return t("failed loading "+i+"; status code: "+o.status,!0);if(o&&o.status>=400&&o.status<500)return t("failed loading "+i+"; status code: "+o.status,!1);if(!o&&e&&e.message){let r=e.message.toLowerCase();if(["failed","fetch","network","load"].find(e=>r.indexOf(e)>-1))return t("failed loading "+i+": "+tI(e.message),!0)}if(e)return t(e,!1);try{s="string"==typeof o.data?this.options.parse(o.data,r,n):o.data}catch(e){a="failed parsing "+i+" to json"}if(a)return t(a,!1);t(null,s)})}create(e,t,r,n,o){if(!this.options.addPath)return;"string"==typeof e&&(e=[e]);let i=this.options.parsePayload(t,r,n),s=0,a=[],c=[];e.forEach(r=>{let n=this.options.addPath;"function"==typeof this.options.addPath&&(n=this.options.addPath(r,t));let l=tj(n,{lng:r,ns:t});if(null==l){s+=1,o&&s===e.length&&o(a,c);return}this.options.request(this.options,l,i,(t,r)=>{s+=1,a.push(t),c.push(r),s===e.length&&"function"==typeof o&&o(a,c)})})}reload(){let{backendConnector:e,languageUtils:t,logger:r}=this.services,n=e.language;if(n&&"cimode"===n.toLowerCase())return;let o=[],i=e=>{t.toResolveHierarchy(e).forEach(e=>{0>o.indexOf(e)&&o.push(e)})};i(n),this.allOptions.preload&&this.allOptions.preload.forEach(e=>i(e)),o.forEach(t=>{this.allOptions.ns.forEach(n=>{e.read(t,n,"read",null,null,(o,i)=>{o&&r.warn(`loading namespace ${n} for language ${t} failed`,o),!o&&i&&r.log(`loaded namespace ${n} for language ${t}`,i),e.loaded(`${t}|${n}`,o,i)})})})}};tK.type="backend";var tH=s(9368),tW=s(4954);class tq extends Error{}function tG(e,t){let r;if("string"!=typeof e)throw new tq("Invalid token specified: must be a string");t||(t={});let n=+(!0!==t.header),o=e.split(".")[n];if("string"!=typeof o)throw new tq(`Invalid token specified: missing part #${n+1}`);try{r=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(o)}catch(e){throw new tq(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new tq(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(tq.prototype.name="InvalidTokenError","u"<typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function tz(e){if(!(this instanceof tz))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,r,n=this,o=[],i={enable:!0,callbackList:[],interval:5},s=document.getElementsByTagName("script"),a=0;a<s.length;a++)(-1!==s[a].src.indexOf("keycloak.js")||-1!==s[a].src.indexOf("keycloak.min.js"))&&-1!==s[a].src.indexOf("version=")&&(n.iframeVersion=s[a].src.substring(s[a].src.indexOf("version=")+8).split("&")[0]);var c=!0,l=A(console.info),u=A(console.warn);function f(e,t){for(var r=function(e){var t=null,r=window.crypto||window.msCrypto;if(r&&r.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),r.getRandomValues(t),t;t=Array(e);for(var n=0;n<t.length;n++)t[n]=Math.floor(256*Math.random());return t}(e),n=Array(e),o=0;o<e;o++)n[o]=t.charCodeAt(r[o]%t.length);return String.fromCharCode.apply(null,n)}function p(){return void 0===n.authServerUrl?void 0:"/"==n.authServerUrl.charAt(n.authServerUrl.length-1)?n.authServerUrl+"realms/"+encodeURIComponent(n.realm):n.authServerUrl+"/realms/"+encodeURIComponent(n.realm)}function d(e,t){var r=e.code,o=e.error,i=e.prompt,s=new Date().getTime();if(e.kc_action_status&&n.onActionUpdate&&n.onActionUpdate(e.kc_action_status),o){if("none"!=i)if(e.error_description&&"authentication_expired"===e.error_description)n.login(e.loginOptions);else{var a={error:o,error_description:e.error_description};n.onAuthError&&n.onAuthError(a),t&&t.setError(a)}else t&&t.setSuccess();return}if("standard"!=n.flow&&(e.access_token||e.id_token)&&d(e.access_token,null,e.id_token,!0),"implicit"!=n.flow&&r){var u="code="+r+"&grant_type=authorization_code",f=n.endpoints.token(),p=new XMLHttpRequest;p.open("POST",f,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u+="&client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(u+="&code_verifier="+e.pkceCodeVerifier),p.withCredentials=!0,p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status){var e=JSON.parse(p.responseText);d(e.access_token,e.refresh_token,e.id_token,"standard"===n.flow),S()}else n.onAuthError&&n.onAuthError(),t&&t.setError()},p.send(u)}function d(r,o,i,a){g(r,o,i,s=(s+new Date().getTime())/2),c&&n.idTokenParsed&&n.idTokenParsed.nonce!=e.storedNonce?(l("[KEYCLOAK] Invalid nonce, clearing token"),n.clearToken(),t&&t.setError()):a&&(n.onAuthSuccess&&n.onAuthSuccess(),t&&t.setSuccess())}}function h(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function g(e,t,r,o){if(n.tokenTimeoutHandle&&(clearTimeout(n.tokenTimeoutHandle),n.tokenTimeoutHandle=null),t?(n.refreshToken=t,n.refreshTokenParsed=tG(t)):(delete n.refreshToken,delete n.refreshTokenParsed),r?(n.idToken=r,n.idTokenParsed=tG(r)):(delete n.idToken,delete n.idTokenParsed),e){if(n.token=e,n.tokenParsed=tG(e),n.sessionId=n.tokenParsed.sid,n.authenticated=!0,n.subject=n.tokenParsed.sub,n.realmAccess=n.tokenParsed.realm_access,n.resourceAccess=n.tokenParsed.resource_access,o&&(n.timeSkew=Math.floor(o/1e3)-n.tokenParsed.iat),null!=n.timeSkew&&(l("[KEYCLOAK] Estimated time difference between browser and server is "+n.timeSkew+" seconds"),n.onTokenExpired)){var i=(n.tokenParsed.exp-new Date().getTime()/1e3+n.timeSkew)*1e3;l("[KEYCLOAK] Token expires in "+Math.round(i/1e3)+" s"),i<=0?n.onTokenExpired():n.tokenTimeoutHandle=setTimeout(n.onTokenExpired,i)}}else delete n.token,delete n.tokenParsed,delete n.subject,delete n.realmAccess,delete n.resourceAccess,n.authenticated=!1}function y(){var e="0123456789abcdef",t=f(36,e).split("");return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function v(e){var t=function(e){switch(n.flow){case"standard":t=["code","state","session_state","kc_action_status","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}t.push("error"),t.push("error_description"),t.push("error_uri");var t,r,o,i=e.indexOf("?"),s=e.indexOf("#");if("query"===n.responseMode&&-1!==i?(r=e.substring(0,i),""!==(o=b(e.substring(i+1,-1!==s?s:e.length),t)).paramsString&&(r+="?"+o.paramsString),-1!==s&&(r+=e.substring(s))):"fragment"===n.responseMode&&-1!==s&&(r=e.substring(0,s),""!==(o=b(e.substring(s+1),t)).paramsString&&(r+="#"+o.paramsString)),o&&o.oauthParams){if("standard"===n.flow||"hybrid"===n.flow){if((o.oauthParams.code||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=r,o.oauthParams}else if("implicit"===n.flow&&(o.oauthParams.access_token||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=r,o.oauthParams}}(e);if(t){var o=r.get(t.state);return o&&(t.valid=!0,t.redirectUri=o.redirectUri,t.storedNonce=o.nonce,t.prompt=o.prompt,t.pkceCodeVerifier=o.pkceCodeVerifier,t.loginOptions=o.loginOptions),t}}function b(e,t){for(var r=e.split("&"),n={paramsString:"",oauthParams:{}},o=0;o<r.length;o++){var i=r[o].indexOf("="),s=r[o].slice(0,i);-1!==t.indexOf(s)?n.oauthParams[s]=r[o].slice(i+1):(""!==n.paramsString&&(n.paramsString+="&"),n.paramsString+=r[o])}return n}function m(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}function _(){var e=m();if(!i.enable||i.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");i.iframe=t,t.onload=function(){var t=n.endpoints.authorize();"/"===t.charAt(0)?i.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):i.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var r=n.endpoints.checkSessionIframe();return t.setAttribute("src",r),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t),window.addEventListener("message",function(e){if(e.origin===i.iframeOrigin&&i.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&n.clearToken();for(var t=i.callbackList.splice(0,i.callbackList.length),r=t.length-1;r>=0;--r){var o=t[r];"error"==e.data?o.setError():o.setSuccess("unchanged"==e.data)}}},!1),e.promise}function S(){i.enable&&n.token&&setTimeout(function(){w().then(function(e){e&&S()})},1e3*i.interval)}function w(){var e=m();if(i.iframe&&i.iframeOrigin){var t=n.clientId+" "+(n.sessionId?n.sessionId:"");i.callbackList.push(e);var r=i.iframeOrigin;1==i.callbackList.length&&i.iframe.contentWindow.postMessage(t,r)}else e.setSuccess();return e.promise}function k(){var e,t,r,o=m();if(i.enable||n.silentCheckSsoRedirectUri){var s=document.createElement("iframe");s.setAttribute("src",n.endpoints.thirdPartyCookiesIframe()),s.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),s.setAttribute("title","keycloak-3p-check-iframe"),s.style.display="none",document.body.appendChild(s);var a=function(e){s.contentWindow===e.source&&("supported"===e.data||"unsupported"===e.data)&&("unsupported"===e.data&&(u("[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"),i.enable=!1,n.silentCheckSsoFallback&&(n.silentCheckSsoRedirectUri=!1)),document.body.removeChild(s),window.removeEventListener("message",a),o.setSuccess())};window.addEventListener("message",a,!1)}else o.setSuccess();return e=o.promise,t=n.messageReceiveTimeout,r=null,Promise.race([e,new Promise(function(e,n){r=setTimeout(function(){n({error:"Timeout when waiting for 3rd party check iframe message."})},t)})]).finally(function(){clearTimeout(r)})}function O(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(n.createLoginUrl(e)),m().promise},logout:async function(e){if("GET"===(e?.logoutMethod??n.logoutMethod))return void window.location.replace(n.createLogoutUrl(e));let r=n.createLogoutUrl(e),o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:n.idToken,client_id:n.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(o.redirected){window.location.href=o.url;return}if(o.ok)return void window.location.reload();throw Error("Logout failed, request returned an error code.")},register:function(e){return window.location.assign(n.createRegisterUrl(e)),m().promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.location.href=e;else throw"Not supported by the OIDC server";return m().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:location.href}};if("cordova"==e){i.enable=!1;var r=function(e,t,r){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,r):window.open(e,t,r)},o=function(e){var t=e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce(function(t,r){return t[r]=e.cordovaOptions[r],t},{}):{};return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),Object.keys(t).reduce(function(e,r){return e.push(r+"="+t[r]),e},[]).join(",")},s=function(){return n.redirectUri||"http://localhost"};return{login:function(e){var t=m(),i=o(e),a=r(n.createLoginUrl(e),"_blank",i),c=!1,l=!1,u=function(){l=!0,a.close()};return a.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&(d(v(e.url),t),u(),c=!0)}),a.addEventListener("loaderror",function(e){c||(0==e.url.indexOf(s())?(d(v(e.url),t),u(),c=!0):(t.setError(),u()))}),a.addEventListener("exit",function(e){l||t.setError({reason:"closed_by_user"})}),t.promise},logout:function(e){var t,o=m(),i=r(n.createLogoutUrl(e),"_blank","location=no,hidden=yes,clearcache=yes");return i.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&i.close()}),i.addEventListener("loaderror",function(e){0==e.url.indexOf(s())||(t=!0),i.close()}),i.addEventListener("exit",function(e){t?o.setError():(n.clearToken(),o.setSuccess())}),o.promise},register:function(e){var t=m(),i=r(n.createRegisterUrl(),"_blank",o(e));return i.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&(i.close(),d(v(e.url),t))}),t.promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e){var t=r(e,"_blank","location=no");t.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&t.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(e){return s()}}}if("cordova-native"==e)return i.enable=!1,{login:function(e){var t=m(),r=n.createLoginUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),d(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},logout:function(e){var t=m(),r=n.createLogoutUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),n.clearToken(),t.setSuccess()}),window.cordova.plugins.browsertab.openUrl(r),t.promise},register:function(e){var t=m(),r=n.createRegisterUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),d(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.cordova.plugins.browsertab.openUrl(e);else throw"Not supported by the OIDC server"},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}n.init=function(o){if(n.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(n.didInitialize=!0,n.authenticated=!1,r=function(){try{return new E}catch(e){}return new x}(),t=o&&["default","cordova","cordova-native"].indexOf(o.adapter)>-1?O(o.adapter):o&&"object"==typeof o.adapter?o.adapter:window.Cordova||window.cordova?O("cordova"):O(),o){if(void 0!==o.useNonce&&(c=o.useNonce),void 0!==o.checkLoginIframe&&(i.enable=o.checkLoginIframe),o.checkLoginIframeInterval&&(i.interval=o.checkLoginIframeInterval),"login-required"===o.onLoad&&(n.loginRequired=!0),o.responseMode)if("query"===o.responseMode||"fragment"===o.responseMode)n.responseMode=o.responseMode;else throw"Invalid value for responseMode";if(o.flow){switch(o.flow){case"standard":n.responseType="code";break;case"implicit":n.responseType="id_token token";break;case"hybrid":n.responseType="code id_token token";break;default:throw"Invalid value for flow"}n.flow=o.flow}if(null!=o.timeSkew&&(n.timeSkew=o.timeSkew),o.redirectUri&&(n.redirectUri=o.redirectUri),o.silentCheckSsoRedirectUri&&(n.silentCheckSsoRedirectUri=o.silentCheckSsoRedirectUri),"boolean"==typeof o.silentCheckSsoFallback?n.silentCheckSsoFallback=o.silentCheckSsoFallback:n.silentCheckSsoFallback=!0,void 0!==o.pkceMethod){if("S256"!==o.pkceMethod&&!1!==o.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${o.pkceMethod}.`);n.pkceMethod=o.pkceMethod}else n.pkceMethod="S256";"boolean"==typeof o.enableLogging?n.enableLogging=o.enableLogging:n.enableLogging=!1,"POST"===o.logoutMethod?n.logoutMethod="POST":n.logoutMethod="GET","string"==typeof o.scope&&(n.scope=o.scope),"string"==typeof o.acrValues&&(n.acrValues=o.acrValues),"number"==typeof o.messageReceiveTimeout&&o.messageReceiveTimeout>0?n.messageReceiveTimeout=o.messageReceiveTimeout:n.messageReceiveTimeout=1e4}n.responseMode||(n.responseMode="fragment"),n.responseType||(n.responseType="code",n.flow="standard");var s=m(),a=m();a.promise.then(function(){n.onReady&&n.onReady(n.authenticated),s.setSuccess(n.authenticated)}).catch(function(e){s.setError(e)});var l=function(){var t=m();function r(e){e?n.endpoints={authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:n.endpoints={authorize:function(){return p()+"/protocol/openid-connect/auth"},token:function(){return p()+"/protocol/openid-connect/token"},logout:function(){return p()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=p()+"/protocol/openid-connect/login-status-iframe.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=p()+"/protocol/openid-connect/3p-cookies/step1.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},register:function(){return p()+"/protocol/openid-connect/registrations"},userinfo:function(){return p()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(s=e):s="keycloak.json",s){var o=new XMLHttpRequest;o.open("GET",s,!0),o.setRequestHeader("Accept","application/json"),o.onreadystatechange=function(){if(4==o.readyState)if(200==o.status||h(o)){var e=JSON.parse(o.responseText);n.authServerUrl=e["auth-server-url"],n.realm=e.realm,n.clientId=e.resource,r(null),t.setSuccess()}else t.setError()},o.send()}else{if(!e.clientId)throw"clientId missing";n.clientId=e.clientId;var i=e.oidcProvider;if(i)if("string"==typeof i){var s,a="/"==i.charAt(i.length-1)?i+".well-known/openid-configuration":i+"/.well-known/openid-configuration",o=new XMLHttpRequest;o.open("GET",a,!0),o.setRequestHeader("Accept","application/json"),o.onreadystatechange=function(){4==o.readyState&&(200==o.status||h(o)?(r(JSON.parse(o.responseText)),t.setSuccess()):t.setError())},o.send()}else r(i),t.setSuccess();else{if(!e.url){for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++)if(c[l].src.match(/.*keycloak\.js/)){e.url=c[l].src.substr(0,c[l].src.indexOf("/js/keycloak.js"));break}}if(!e.realm)throw"realm missing";n.authServerUrl=e.url,n.realm=e.realm,r(null),t.setSuccess()}}return t.promise}();function u(){var e=function(e){e||(r.prompt="none"),o&&o.locale&&(r.locale=o.locale),n.login(r).then(function(){a.setSuccess()}).catch(function(e){a.setError(e)})},t=function(){var e=document.createElement("iframe"),t=n.createLoginUrl({prompt:"none",redirectUri:n.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var r=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(d(v(t.data),a),document.body.removeChild(e),window.removeEventListener("message",r))};window.addEventListener("message",r)},r={};switch(o.onLoad){case"check-sso":i.enable?_().then(function(){w().then(function(r){r?a.setSuccess():n.silentCheckSsoRedirectUri?t():e(!1)}).catch(function(e){a.setError(e)})}):n.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function f(){var e=v(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return _().then(function(){d(e,a)}).catch(function(e){a.setError(e)});o?o.token&&o.refreshToken?(g(o.token,o.refreshToken,o.idToken),i.enable?_().then(function(){w().then(function(e){e?(n.onAuthSuccess&&n.onAuthSuccess(),a.setSuccess(),S()):a.setSuccess()}).catch(function(e){a.setError(e)})}):n.updateToken(-1).then(function(){n.onAuthSuccess&&n.onAuthSuccess(),a.setSuccess()}).catch(function(e){n.onAuthError&&n.onAuthError(),o.onLoad?u():a.setError(e)})):o.onLoad?u():a.setSuccess():a.setSuccess()}return l.then(function(){var e,t;(e=m(),t=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",t),e.setSuccess())},document.addEventListener("readystatechange",t),t(),e.promise).then(k).then(f).catch(function(e){s.setError(e)})}),l.catch(function(e){s.setError(e)}),s.promise},n.login=function(e){return t.login(e)},n.createLoginUrl=function(e){var o,i=y(),s=y(),a=t.redirectUri(e),l={state:i,nonce:s,redirectUri:encodeURIComponent(a),loginOptions:e};e&&e.prompt&&(l.prompt=e.prompt),o=e&&"register"==e.action?n.endpoints.register():n.endpoints.authorize();var u=e&&e.scope||n.scope;u?-1===u.indexOf("openid")&&(u="openid "+u):u="openid";var p=o+"?client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+encodeURIComponent(a)+"&state="+encodeURIComponent(i)+"&response_mode="+encodeURIComponent(n.responseMode)+"&response_type="+encodeURIComponent(n.responseType)+"&scope="+encodeURIComponent(u);if(c&&(p=p+"&nonce="+encodeURIComponent(s)),e&&e.prompt&&(p+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(p+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(p+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(p+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(p+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(p+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr&&(p+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:e.acr}}))),(e&&e.acrValues||n.acrValues)&&(p+="&acr_values="+encodeURIComponent(e.acrValues||n.acrValues)),n.pkceMethod){var d=f(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");l.pkceCodeVerifier=d,p+="&code_challenge="+function(e,t){if("S256"!==e)throw TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return btoa(String.fromCodePoint(...new Uint8Array(tW.arrayBuffer(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(n.pkceMethod,d)+"&code_challenge_method="+n.pkceMethod}return r.add(l),p},n.logout=function(e){return t.logout(e)},n.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??n.logoutMethod))return n.endpoints.logout();var r=n.endpoints.logout()+"?client_id="+encodeURIComponent(n.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return n.idToken&&(r+="&id_token_hint="+encodeURIComponent(n.idToken)),r},n.register=function(e){return t.register(e)},n.createRegisterUrl=function(e){return e||(e={}),e.action="register",n.createLoginUrl(e)},n.createAccountUrl=function(e){var r=p(),o=void 0;return void 0!==r&&(o=r+"/account?referrer="+encodeURIComponent(n.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),o},n.accountManagement=function(){return t.accountManagement()},n.hasRealmRole=function(e){var t=n.realmAccess;return!!t&&t.roles.indexOf(e)>=0},n.hasResourceRole=function(e,t){if(!n.resourceAccess)return!1;var r=n.resourceAccess[t||n.clientId];return!!r&&r.roles.indexOf(e)>=0},n.loadUserProfile=function(){var e=p()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(n.profile=JSON.parse(t.responseText),r.setSuccess(n.profile)):r.setError())},t.send(),r.promise},n.loadUserInfo=function(){var e=n.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(n.userInfo=JSON.parse(t.responseText),r.setSuccess(n.userInfo)):r.setError())},t.send(),r.promise},n.isTokenExpired=function(e){if(!n.tokenParsed||!n.refreshToken&&"implicit"!=n.flow)throw"Not authenticated";if(null==n.timeSkew)return l("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=n.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+n.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},n.updateToken=function(e){var t=m();if(!n.refreshToken)return t.setError(),t.promise;e=e||5;var r=function(){var r=!1;if(-1==e?(r=!0,l("[KEYCLOAK] Refreshing token: forced refresh")):(!n.tokenParsed||n.isTokenExpired(e))&&(r=!0,l("[KEYCLOAK] Refreshing token: token expired")),r){var i="grant_type=refresh_token&refresh_token="+n.refreshToken,s=n.endpoints.token();if(o.push(t),1==o.length){var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.withCredentials=!0,i+="&client_id="+encodeURIComponent(n.clientId);var c=new Date().getTime();a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){l("[KEYCLOAK] Token refreshed"),c=(c+new Date().getTime())/2;var e=JSON.parse(a.responseText);g(e.access_token,e.refresh_token,e.id_token,c),n.onAuthRefreshSuccess&&n.onAuthRefreshSuccess();for(var t=o.pop();null!=t;t=o.pop())t.setSuccess(!0)}else{u("[KEYCLOAK] Failed to refresh token"),400==a.status&&n.clearToken(),n.onAuthRefreshError&&n.onAuthRefreshError();for(var t=o.pop();null!=t;t=o.pop())t.setError(!0)}},a.send(i)}}else t.setSuccess(!1)};return i.enable?w().then(function(){r()}).catch(function(e){t.setError(e)}):r(),t.promise},n.clearToken=function(){n.token&&(g(null,null,null),n.onAuthLogout&&n.onAuthLogout(),n.loginRequired&&n.login())};var E=function(){if(!(this instanceof E))return new E;function e(){for(var e=new Date().getTime(),t=0;t<localStorage.length;t++){var r=localStorage.key(t);if(r&&0==r.indexOf("kc-callback-")){var n=localStorage.getItem(r);if(n)try{var o=JSON.parse(n).expires;(!o||o<e)&&localStorage.removeItem(r)}catch(e){localStorage.removeItem(r)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var r="kc-callback-"+t,n=localStorage.getItem(r);return n&&(localStorage.removeItem(r),n=JSON.parse(n)),e(),n}},this.add=function(t){e();var r="kc-callback-"+t.state;t.expires=new Date().getTime()+36e5,localStorage.setItem(r,JSON.stringify(t))}},x=function(){if(!(this instanceof x))return new x;this.get=function(n){if(n){var o=t("kc-callback-"+n);if(r("kc-callback-"+n,"",e(-100)),o)return JSON.parse(o)}},this.add=function(t){r("kc-callback-"+t.state,JSON.stringify(t),e(60))},this.removeItem=function(t){r(t,"",e(-100))};var e=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},t=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},r=function(e,t,r){var n=e+"="+t+"; expires="+r.toUTCString()+"; ";document.cookie=n}};function A(e){return function(){n.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var t$=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};let tJ=e=>t=>class extends t{constructor(){super(...arguments),this._connectRequested=!1,this._status=o.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){e.getEventProvider()?this._connectRequested||(this._connectRequested=!0,e.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect()):console.log("No event provider available so cannot subscribe")}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,e.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return t$(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&e.getEventProvider().status===o.CONNECTED}_onEventProviderStatusChanged(e){switch(e){case o.DISCONNECTED:this._onEventsDisconnect();break;case o.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return t$(this,void 0,void 0,function*(){let t=!!this._attributeRefs,r=!!this._assetIds,n=this._attributeRefs?this._attributeRefs:this._assetIds;if(n&&n.length>0){if(this._subscriptionIds=[],r){let t=yield e.getEventProvider().subscribeAssetEvents(n,!0,e=>this._onEvent(e)),r=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eN(n,r))return void e.getEventProvider().unsubscribe(t);this._subscriptionIds.push(t)}let o=yield e.getEventProvider().subscribeAttributeEvents(n,t,e=>this._onEvent(e)),i=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eN(n,i))return void e.getEventProvider().unsubscribe(o);this._subscriptionIds.push(o)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(t=>{e.getEventProvider().unsubscribe(t)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){eN(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){eN(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(t){e.getEventProvider().sendEvent(t)}_sendEventWithReply(t){return e.getEventProvider().sendEventWithReply(t)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},tY="#4d9d2a",tX="#FFFFFF",tQ="#FFFFFF",tZ="#F9F9F9",t0="#CCCCCC",t1="#be0000",t2="#FFFFFF",t5="#4c4c4c",t3="#000000",t6="#000000",t8="#FFFFFF",t4="0 5px 5px -5px rgba(0,0,0,0.3)",t9="0 1px 3px 0 rgba(0,0,0,0.21)";var t7=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};let re="mdi",rt="openremote",rr="restricted_user";(r=i||(i={})).MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",r.AUTH_FAILED="AUTH_FAILED",r.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",r.CONSOLE_ERROR="CONSOLE_INIT_ERROR",r.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",r.TRANSLATION_ERROR="TRANSLATION_ERROR",(n=c||(c={})).ERROR="ERROR",n.READY="READY",n.ONLINE="ONLINE",n.OFFLINE="OFFLINE",n.CONNECTING="CONNECTING",n.CONSOLE_INIT="CONSOLE_INIT",n.CONSOLE_READY="CONSOLE_READY",n.TRANSLATE_INIT="TRANSLATE_INIT",n.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",n.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED",n.LOGIN="LOGIN";let rn={en:"english",cn:"chinese",nl:"dutch",fr:"french",de:"german",it:"italian",pl:"polish",pt:"portuguese",ro:"romanian",es:"spanish",uk:"ukrainian"},ro={cn:"zh-cn"};function ri(e){let t=e?Object.assign({},e):{};return t.managerUrl&&""!==t.managerUrl?t.managerUrl=t.managerUrl.replace(/\/+$/,""):t.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),t.realm&&""!==t.realm||(t.realm="master"),t.auth||(t.auth="KEYCLOAK"),void 0===t.consoleAutoEnable&&(t.consoleAutoEnable=!0),void 0===t.applyConfigToAdmin&&(t.applyConfigToAdmin=!0),t.eventProviderType||(t.eventProviderType="WEBSOCKET"),(!t.pollingIntervalMillis||t.pollingIntervalMillis<5e3)&&(t.pollingIntervalMillis=1e4),void 0===t.loadIcons&&(t.loadIcons=!0),void 0===t.loadTranslations&&(t.loadTranslations=["or"]),void 0===t.translationsLoadPath&&(t.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===t.loadDescriptors&&(t.loadDescriptors=!0),void 0===t.clientId&&(t.clientId=rt),t}class rs{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 e=new Map;return this._keycloak?this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach(([t,r])=>{let n=r.roles;e.set(t,n)}):this._basicIdentity&&this._basicIdentity.roles&&e.set(this._config.clientId,this._basicIdentity.roles),e}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){var e;return null==(e=this._config)?void 0:e.managerUrl}get keycloakUrl(){var e;return null==(e=this._config)?void 0:e.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 tm()}get language(){return eg.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(eg.changeLanguage(e),this.console.storeData("LANGUAGE",e),this.authenticated&&this.updateKeycloakUserLanguage(e).catch(e=>console.error(e)))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(e){this.isSuperUser()&&this._displayRealm!==e&&(this._displayRealm=e,this._emitEvent(c.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||rt}getEventProvider(){return this.events}isManagerSameOrigin(){if(!this.ready)return!1;let e=new URL(this._config.managerUrl),t=window.location;return e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}addListener(e){0>this._listeners.indexOf(e)&&this._listeners.push(e)}removeListener(e){let t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}init(e){return t7(this,void 0,void 0,function*(){this._config&&console.debug("Already initialised"),this._config=ri(e);let t=yield this.loadManagerInfo(),r=new tv(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(c.CONSOLE_READY)});if(this._console=r,"BASIC"===this._config.auth)t=(yield this.doTranslateInit())&&t,t=yield this.doAuthInit();else if("KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){let e,t=new URL(this._config.managerUrl);this._authServerUrl.startsWith("//")&&(this._authServerUrl=t.protocol+this._authServerUrl);try{e=new URL(this._authServerUrl)}catch(r){(e=new URL(t)).pathname=this._authServerUrl}e.protocol||(e.protocol=t.protocol),e.hostname||(e.hostname=t.hostname),e.port||(e.port=t.port),this._config.keycloakUrl=e.toString()}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),(t=yield this.doAuthInit())||this._config.skipFallbackToBasicAuth||(console.debug("Falling back to basic auth"),this._config.auth="BASIC",t=yield this.doAuthInit())}return!!t&&(t&&(t=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),(t=(yield this.doTranslateInit())&&t)&&(t=yield this.doDescriptorsInit(),t=yield this.getConsoleAppConfig()),this.doIconInit(),t?(t=yield this.doEventsSubscriptionInit(),this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(c.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)})}loadManagerInfo(){return t7(this,void 0,void 0,function*(){try{let e=yield new Promise((e,t)=>{let r=new XMLHttpRequest;r.addEventListener("load",()=>{e(JSON.parse(r.responseText))}),r.addEventListener("error",()=>{t(Error("Failed to contact the manager"))}),r.open("GET",this._config.managerUrl+"/api/master/info"),r.send()});return this._managerVersion=e&&e.version?e.version:"",this._authServerUrl=e&&e.authServerUrl?e.authServerUrl:"",!0}catch(e){return console.error("Failed to contact the manager",e),this._setError(i.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return t7(this,void 0,void 0,function*(){if(eg.isInitialized)return!0;eg.on("initialized",e=>{this._emitEvent(c.TRANSLATE_INIT)}),eg.on("languageChanged",e=>{var t;em().locale(null!=(t=ro[e])?t:e),this._emitEvent(c.TRANSLATE_LANGUAGE_CHANGED)});let e={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(e,t,r)=>"uppercase"===t?e.toUpperCase():e instanceof Date?em()(e).format(t):e},backend:{loadPath:(e,t)=>1===t.length&&"or"===t[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(e);try{yield eg.use(tK).init(e)}catch(e){return console.error(e),this._setError(i.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return t7(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let e=yield tm().api.AssetModelResource.getAssetInfos(),t=yield tm().api.AssetModelResource.getMetaItemDescriptors(),r=yield tm().api.AssetModelResource.getValueDescriptors();u.AssetModelUtil._assetTypeInfos=e.data,u.AssetModelUtil._metaItemDescriptors=Object.values(t.data),u.AssetModelUtil._valueDescriptors=Object.values(r.data)}catch(e){return console.error(e),!1}return!0})}doAuthInit(){return t7(this,void 0,void 0,function*(){let e=!0;switch(this._config.auth){case"BASIC":e=yield this.initialiseBasicAuth();break;case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(i.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(tm().addRequestInterceptor(e=>{if(!e.headers.Authorization){let t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e}),e)})}doRestApiInit(){return tm().setTimeout(2e4),tm().initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return t7(this,void 0,void 0,function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new tx(this._config.managerUrl),this._events.subscribeStatusChange(e=>this._onEventProviderStatusChanged(e)),e=yield this._events.connect()),e||this._setError(i.EVENTS_CONNECTION_ERROR),e})}_connectEvents(){var e;(null==(e=this.events)?void 0:e.status)===o.DISCONNECTED?this.events.connect().catch(e=>{console.error("Failed to connect EventProvider."),console.error(e)}):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(e){switch(e){case o.DISCONNECTED:this._onDisconnect();break;case o.CONNECTED:break;case o.CONNECTING:this._emitEvent(c.CONNECTING)}}doConsoleInit(){return t7(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(c.CONSOLE_INIT),!0}catch(e){return this._setError(i.CONSOLE_ERROR),!1}})}doIconInit(){this._config.loadIcons&&(tH.IconSets.addIconSet("mdi",(0,tH.createMdiIconSet)(ra.managerUrl)),tH.IconSets.addIconSet("or",(0,tH.createSvgIconSet)(tH.OrIconSet.size,tH.OrIconSet.icons)))}getConsoleAppConfig(){return t7(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=ra.managerUrl)?e:"")+"/consoleappconfig/"+ra.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return t7(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return t7(this,arguments,void 0,function*(e=this._keycloak){if(e&&e.authenticated){let t=(null==e?void 0:e.profile)||(yield null==e?void 0:e.loadUserProfile());if(null==t?void 0:t.attributes){let e=new Map(Object.entries(t.attributes));if(e.has("locale")){let t=e.get("locale");if("string"==typeof t[0])return t[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(e){return t7(this,arguments,void 0,function*(e,t=this.rest){this.authenticated?t?yield t.api.UserResource.updateCurrentUserLocale(e,{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(e){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(e&&""!==e?{redirectUri:e}:void 0)):this._basicIdentity&&(this._basicIdentity=void 0,e?window.location.href=e:window.location.reload()))}login(e){switch(this._config.auth){case"BASIC":e&&e.credentials&&(this._config.credentials=Object.assign({},e.credentials)),this.doBasicLogin();break;case"KEYCLOAK":if(this._keycloak){let t={};e&&e.redirectUrl&&""!==e.redirectUrl&&(t.redirectUri=e.redirectUrl),(null==e?void 0:e.action)&&""!==e.action&&(t.action=e.action),this.isMobile()&&(t.scope="offline_access"),this._keycloak.login(t)}}}initialiseBasicAuth(){return t7(this,void 0,void 0,function*(){return this.config.basicLoginProvider?(this.config.autoLogin&&(this._readyCallback=()=>this.doBasicLogin()),!0):(console.debug("No basicLoginProvider defined on config so cannot display login UI"),!1)})}doBasicLogin(){return t7(this,void 0,void 0,function*(){var e,t,r,n;if(!this.config.basicLoginProvider)return;let o={username:(null==(e=this.config.credentials)?void 0:e.username)?null==(t=this.config.credentials)?void 0:t.username:"",password:(null==(r=this.config.credentials)?void 0:r.password)?null==(n=this.config.credentials)?void 0:n.password:"",cancel:!1},i=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!i;){if((o=yield this.config.basicLoginProvider(o.username,o.password)).cancel){console.debug("Basic authentication cancelled by user");break}if(!o.username||!o.password)continue;this._basicIdentity.token=btoa(o.username+":"+o.password);let e=!1;try{let t=yield tm().api.UserResource.getCurrent();200===t.status&&(e=!0,this._basicIdentity.user=t.data),e||401!==t.status&&403!==t.status||console.debug("Basic authentication invalid credentials, trying again")}catch(e){console.error("Basic auth failed: ",e)}if(e){console.debug("Basic authentication successful"),i=!0;let e=yield tm().api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}else{console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}}i&&this._onAuthenticated()})}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole(rr)}getApiBaseUrl(){let e=this._config.managerUrl;return e+("/api/"+this._config.realm+"/")}getAppName(){let e=location.pathname.split("/");return e.length>=1?e[1]:""}hasRealmRole(e){return this.isKeycloak()&&this._keycloak.hasRealmRole(e)}hasRole(e,t=this._config.clientId){let r=this.roles;return r&&r.has(t)&&r.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}retrieveAuthorizationHeader(){return t7(this,void 0,void 0,function*(){let e=yield this.retrieveKeycloakToken();return e?"Bearer "+e:"Basic "+this.getBasicToken()})}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}retrieveKeycloakToken(){return t7(this,void 0,void 0,function*(){if(this.isKeycloak())return yield this._updateKeycloakAccessToken(),this._keycloak.token})}getBasicToken(){return this._basicIdentity?this._basicIdentity.token:void 0}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 t7(this,void 0,void 0,function*(){var e,t,r,n,o;try{this._keycloak=new tz({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let i=yield this._getNativeOfflineRefreshToken(),s=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!s&&i)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=i,s=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(s){this._name=null==(e=this._keycloak.tokenParsed)?void 0:e.name,this._username=null==(t=this._keycloak.tokenParsed)?void 0:t.preferred_username,this.isMobile()&&(null==(n=null==(r=this._keycloak)?void 0:r.refreshTokenParsed)?void 0:n.typ)==="Offline"&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated(),this._createTokenUpdateInterval();let i=null==(o=this._keycloak.tokenParsed)?void 0:o.session_state;i&&sessionStorage.getItem("or-session")!==i&&(sessionStorage.setItem("or-session",i),this._emitEvent(c.LOGIN))}else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(i.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._authenticated?this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>t7(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 t7(this,void 0,void 0,function*(){let e=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+e),e&&this._onAuthenticated(),e})}_getNativeOfflineRefreshToken(){return t7(this,void 0,void 0,function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")})}_emitEvent(e){window.setTimeout(()=>{for(let t of this._listeners)t(e)},0)}_setError(e){this._error=e,this._emitEvent(c.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;this.isMobile()&&(null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0))}_onDisconnect(){return t7(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(c.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected to the Manager."),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(c.ONLINE)}reconnect(){return t7(this,arguments,void 0,function*(e=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 t=()=>t7(this,void 0,void 0,function*(){var e,t;if(console.debug("Reconnecting to the Manager..."),!this._authenticated){console.debug("User is not authenticated, skipping token refresh");let t=()=>{var e;return(null==(e=this.events)?void 0:e.status)===o.CONNECTED};return t()||(yield null==(e=this.events)?void 0:e.connect()),t()}if(!(yield this.isKeycloakReachable()))return console.error("Keycloak is not reachable. Reconnect attempt failed."),!1;try{yield this._updateKeycloakAccessToken()}catch(t){console.error("Could not update Keycloak access token, attempting again using offline token...",t);let e=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=e,e||console.warn("No offline token was found on this device.");try{yield this._updateKeycloakAccessToken()}catch(e){throw this.login(),Error("Cannot update access token so sending to login")}console.debug("Keycloak access token is valid")}let r=()=>{var e;return(null==(e=this.events)?void 0:e.status)===o.CONNECTED};return r()||(console.debug("Event provider offline, attempting to reconnect using latest auth token."),yield null==(t=this.events)?void 0:t.connect()),r()}),r=yield t();if(void 0!==r){if(!r){e=Math.min(rs.MAX_RECONNECT_DELAY,e+3e3),console.error(`Failed to reconnect to the Manager. Attempting again in ${e}...`),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return t7(this,arguments,void 0,function*(e=2e3){let t=new AbortController,r=setTimeout(()=>t.abort(),e);try{let e=this._keycloak.endpoints.token(),r=yield fetch(e,{method:"OPTIONS",signal:t.signal});return 200===r.status}catch(e){return!1}finally{clearTimeout(r)}})}}rs.MAX_RECONNECT_DELAY=45e3;let ra=new rs,rc=ra})(),a})());
|
|
2
2
|
//# sourceMappingURL=index.js.map
|